/* Custom CSS: Visual Design System for Rankpatchpont.website
   Style: Cartoon Sport / Folded Tournament Map / Pocket Notebook
   Palette: Off-white (#FFFDF0), Yellow (#FFC72C), Vibrant Red (#D6222E), Deep Burgundy Red (#B30006), Charcoal-Brown (#1A120B)
*/

:root {
    --bg-color: #FFFDF0;      /* Soft warm cream with yellow tint */
    --text-color: #1A120B;    /* High contrast dark carbon */
    --route-blue: #FFC72C;    /* Vibrant Gold-Yellow (replaces old blue) */
    --route-red: #D6222E;     /* Vibrant Red */
    --field-green: #B30006;   /* Rich Burgundy Red (replaces green for yellow-red theme) */
    --pale-tan: #FFE494;      /* Lighter yellow accent */
    --tan-light: #FFF7D6;     /* Light pastel yellow background */
    --white: #FFFFFF;
    
    --comic-border: 3px solid #1A120B;
    --comic-shadow: 5px 5px 0px 0px #1A120B;
    --comic-shadow-hover: 8px 8px 0px 0px #1A120B;
    --comic-shadow-sm: 3px 3px 0px 0px #1A120B;
    
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

/* Global Setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-color);
    font-weight: 700;
}

a {
    color: var(--route-red);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

a:hover {
    color: #900C3F;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.my-section {
    padding: 60px 0;
}

.text-center { text-align: center; }
.text-white { color: var(--white); }
.text-blue { color: var(--route-red); } /* Text styled "blue" now rendered as distinct red */
.text-red { color: var(--route-red); }
.text-green { color: var(--field-green); }

.max-w-600 { max-width: 600px; }
.max-w-1000 { max-width: 1000px; }
.margin-auto { margin-left: auto; margin-right: auto; }
.mt-3 { margin-top: 20px; }
.mt-4 { margin-top: 30px; }
.mb-0 { margin-bottom: 0px; }
.mb-3 { margin-bottom: 20px; }
.mb-4 { margin-bottom: 30px; }
.hidden { display: none !important; }

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Header & Mobile Navigation */
.site-header {
    background-color: var(--white);
    border-bottom: var(--comic-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 24px;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-color);
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 6px;
    border: 2px solid transparent;
    text-decoration: none;
}

.nav-link:hover, .nav-link.active {
    border-color: var(--text-color);
    background-color: var(--route-blue);
    color: var(--text-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--text-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Hero & Folded Notebook Banner */
.hero-section {
    padding: 40px 20px;
    background-color: var(--route-red);
    border-bottom: var(--comic-border);
}

.folded-notebook-banner {
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--bg-color);
    border: var(--comic-border);
    border-radius: 12px;
    box-shadow: var(--comic-shadow);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* Notebook Binding Spiral Visual */
.notebook-holes {
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 20px;
    display: flex;
    justify-content: space-between;
}

.notebook-holes span {
    width: 12px;
    height: 12px;
    background-color: var(--text-color);
    border-radius: 50%;
    display: block;
    margin-top: -6px;
}

.hero-content {
    text-align: center;
}

.main-title {
    font-size: 44px;
    line-height: 1.1;
    margin: 15px 0;
}

.hero-lead {
    font-size: 18px;
    color: #43535e;
    margin-bottom: 25px;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    border: 2px solid var(--text-color);
}

.badge-accent {
    background-color: var(--route-blue);
    color: var(--text-color);
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Buttons */
.btn {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-block;
    border: var(--comic-border);
    box-shadow: var(--comic-shadow-sm);
    transition: all 0.15s ease;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--comic-shadow);
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px 0px var(--text-color);
}

.btn-primary {
    background-color: var(--route-red);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #B30006;
}

.btn-secondary {
    background-color: var(--route-blue);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #E0AF26;
}

.btn-outline {
    background-color: var(--white);
    color: var(--text-color);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* Comic / Notebook styled cards */
.comic-card {
    background-color: var(--white);
    border: var(--comic-border);
    border-radius: 12px;
    box-shadow: var(--comic-shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--comic-shadow-hover);
}

.card-header {
    padding: 15px 20px;
    border-bottom: var(--comic-border);
}

.bg-blue { background-color: var(--route-blue); color: var(--text-color) !important; }
.bg-blue h3 { color: var(--text-color) !important; }
.bg-red { background-color: var(--route-red); color: var(--white) !important; }
.bg-red h3 { color: var(--white) !important; }
.bg-green { background-color: var(--field-green); color: var(--white) !important; }
.bg-green h3 { color: var(--white) !important; }

.card-date {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    background-color: rgba(0,0,0,0.15);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 5px;
}

.card-body {
    padding: 25px;
}

.card-body.bg-tan-light {
    background-color: var(--tan-light);
}

.border-blue { border-color: var(--route-blue); }
.border-red { border-color: var(--route-red); }
.border-green { border-color: var(--field-green); }

.section-heading {
    font-size: 28px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-heading::after {
    content: '';
    display: block;
    height: 4px;
    width: 60%;
    background-color: var(--route-red);
    border-radius: 2px;
    margin-top: 4px;
}

.text-center .section-heading::after {
    margin-left: auto;
    margin-right: auto;
}

.p-text {
    font-size: 15px;
    color: var(--text-color);
    margin-bottom: 15px;
}

/* Read guide block stylings */
.read-guide-box {
    margin-top: 25px;
    background-color: var(--tan-light);
    border: var(--comic-border);
    border-radius: 8px;
    padding: 15px 20px;
}

.guide-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.custom-list {
    list-style: none;
}

.custom-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 14px;
}

.custom-list li::before {
    content: '⚽';
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 12px;
}

/* Legend Styling (Map Illustration Slot) */
.map-illustration {
    background-color: var(--pale-tan);
    border: var(--comic-border);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legend-card {
    background-color: var(--white);
    border: var(--comic-border);
    border-radius: 8px;
    padding: 20px;
    width: 100%;
}

.legend-title {
    font-size: 20px;
    margin-bottom: 15px;
}

.legend-item {
    margin-bottom: 15px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    border: 2px solid var(--text-color);
    margin-bottom: 5px;
}

.badge-known {
    background-color: var(--route-blue);
    color: var(--text-color);
}

.badge-pending {
    background-color: var(--route-red);
    color: var(--white);
}

.legend-desc {
    font-size: 13px;
    color: #4a4a4a;
}

/* Diagonal / Map Flow Route Visual */
.route-map-container {
    background-color: var(--pale-tan);
    border: var(--comic-border);
    border-radius: 16px;
    padding: 40px 25px;
}

.route-flow-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 35px;
}

.flow-stage {
    flex: 1;
    background-color: var(--white);
    border: var(--comic-border);
    border-radius: 10px;
    padding: 20px;
    position: relative;
    box-shadow: var(--comic-shadow-sm);
}

.flow-stage.highlight {
    background-color: var(--tan-light);
    border-color: var(--route-red);
}

.stage-tag {
    position: absolute;
    top: -12px;
    left: 15px;
    background-color: var(--text-color);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.flow-stage h3 {
    font-size: 18px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.flow-stage p {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.inline-link {
    font-size: 13px;
    font-weight: 700;
}

.flow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 60px;
}

.arrow-line {
    height: 4px;
    background-color: var(--text-color);
    width: 100%;
}

.arrow-head {
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 10px solid var(--text-color);
    position: absolute;
    right: 0;
}

.handdrawn-arrow {
    display: block;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    color: var(--route-red);
    text-align: center;
}

/* Card internal specific components */
.route-slot {
    font-size: 16px;
    background-color: var(--bg-color);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px dashed var(--text-color);
    margin-bottom: 8px;
}

.card-divider {
    border: 0;
    border-top: 2px solid var(--text-color);
    margin: 15px 0;
}

.route-status-item {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Group Stage Status Grid */
.group-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 25px 0;
}

.summary-box {
    background-color: var(--white);
    border: var(--comic-border);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--comic-shadow-sm);
}

.summary-number {
    display: block;
    font-size: 44px;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.summary-label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    display: block;
    margin-bottom: 5px;
}

.small-text {
    font-size: 12px;
    color: #555555;
}

/* Hero strip for secondary pages */
.hero-strip {
    background-color: var(--pale-tan);
    padding: 50px 0;
    border-bottom: var(--comic-border);
}

.page-title {
    font-size: 38px;
    margin: 10px 0;
}

/* Filter controls (Route Board) */
.filter-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.filter-label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
}

.btn-filter {
    background-color: var(--white);
    border: 2px solid var(--text-color);
    padding: 6px 16px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-filter.active, .btn-filter:hover {
    background-color: var(--text-color);
    color: var(--white);
}

.route-legend-mini {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.legend-pill {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.pill-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.color-known { background-color: var(--route-blue); }
.color-pending { background-color: var(--route-red); }

/* Route board cards */
.routeboard-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.route-strip-card {
    background-color: var(--white);
    border: var(--comic-border);
    border-radius: 12px;
    box-shadow: var(--comic-shadow-sm);
    display: flex;
    align-items: center;
    padding: 20px;
    transition: all 0.2s ease;
}

.route-strip-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--comic-shadow);
}

.strip-date {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    background-color: var(--pale-tan);
    padding: 10px;
    border-radius: 8px;
    border: 2px solid var(--text-color);
    text-align: center;
    min-width: 110px;
}

.strip-details {
    flex: 1;
    padding: 0 25px;
}

.strip-match {
    font-size: 20px;
    margin-bottom: 4px;
}

.vs-badge {
    font-size: 12px;
    background-color: var(--text-color);
    color: var(--white);
    padding: 1px 6px;
    border-radius: 4px;
    vertical-align: middle;
}

.strip-status {
    font-size: 14px;
}

.strip-tag {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 50px;
    border: 2px solid var(--text-color);
}

.tag-known {
    background-color: var(--route-blue);
    color: var(--text-color);
}

.tag-pending {
    background-color: var(--route-red);
    color: var(--white);
}

/* Groups Detail Page (Tables) */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.group-card {
    background-color: var(--white);
    border: var(--comic-border);
    border-radius: 12px;
    box-shadow: var(--comic-shadow);
    overflow: hidden;
}

.group-card-header {
    padding: 12px 20px;
    border-bottom: var(--comic-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-title {
    font-size: 22px;
}

.status-badge {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    border: 2px solid var(--text-color);
}

.status-pending {
    background-color: var(--pale-tan);
    color: var(--text-color);
}

.status-completed {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.table-responsive {
    overflow-x: auto;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.standings-table th, .standings-table td {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.standings-table th {
    background-color: var(--tan-light);
    font-weight: 700;
    color: var(--text-color);
    font-family: var(--font-heading);
}

.standings-table tr:last-child td {
    border-bottom: none;
}

.highlight-row {
    background-color: rgba(255, 199, 44, 0.15);
}

.status-summary-bar {
    background-color: var(--white);
    border: var(--comic-border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 30px;
    text-align: center;
}

/* Contact / Forms */
.custom-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
}

.form-group input, .form-group select, .form-group textarea {
    font-family: var(--font-body);
    font-size: 15px;
    padding: 10px 14px;
    border: 2px solid var(--text-color);
    border-radius: 6px;
    background-color: var(--bg-color);
    outline: none;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--route-red);
    background-color: var(--white);
}

.form-success {
    margin-top: 20px;
    background-color: var(--tan-light);
    border: 3px dashed var(--field-green);
    border-radius: 8px;
    padding: 15px;
    font-weight: 700;
    color: var(--field-green);
    text-align: center;
}

.flex-column { display: flex; flex-direction: column; }
.justify-between { justify-content: space-between; }
.align-stretch { align-items: stretch; }

/* About and Legal Styles */
.legal-content h3 {
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 10px;
}

.legal-content p {
    font-size: 14px;
    color: #333333;
    margin-bottom: 15px;
}

.last-updated {
    font-size: 12px;
    color: #777777;
    margin-bottom: 15px;
}

.editorial-seal {
    text-align: center;
    background-color: var(--white);
    border: var(--comic-border);
    border-radius: 50%;
    width: 180px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px auto;
    box-shadow: var(--comic-shadow-sm);
    padding: 15px;
}

.seal-icon { font-size: 28px; }
.editorial-seal h4 { font-size: 14px; margin: 4px 0; }
.editorial-seal p { font-size: 10px; line-height: 1.2; }

.editorial-rules-box {
    background-color: var(--white);
    border: 2px dashed var(--text-color);
    padding: 15px;
    border-radius: 8px;
    width: 100%;
}

.border-left-comic {
    border-left: var(--comic-border);
}

.cookie-reset-box {
    text-align: left;
}

/* Footer Section */
.site-footer {
    background-color: var(--text-color);
    color: var(--white);
    border-top: var(--comic-border);
    padding: 50px 0 20px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo {
    color: var(--white);
    font-size: 26px;
    margin-bottom: 15px;
}

.footer-disclaimer {
    font-size: 12px;
    line-height: 1.5;
    color: #cbdce8;
}

.footer-links h4, .footer-contact h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--route-blue);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 8px;
}

.footer-links ul li a {
    font-size: 13px;
    color: #cbdce8;
    transition: color 0.15s ease;
    text-decoration: none;
}

.footer-links ul li a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-contact p {
    font-size: 13px;
    color: #cbdce8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    font-size: 12px;
    color: #cbdce8;
}

/* Cookie Banner styling */
.cookie-banner {
    position: fixed;
    bottom: 25px;
    left: 25px;
    right: 25px;
    background-color: var(--white);
    border: var(--comic-border);
    border-radius: 12px;
    box-shadow: var(--comic-shadow-hover);
    padding: 20px;
    z-index: 2000;
    max-width: 900px;
    margin: 0 auto;
}

.cookie-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-text h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.cookie-text p {
    font-size: 12px;
    margin-bottom: 0;
}

.cookie-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Mobile responsive alterations (Media Queries) */
@media (max-width: 1200px) {
    .container {
        padding: 0 25px;
    }
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-about {
        grid-column: span 2;
    }
    .border-left-comic {
        border-left: none;
        border-top: var(--comic-border);
    }
}

@media (max-width: 768px) {
    /* Navigation bar mobile conversion */
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        border-bottom: var(--comic-border);
        flex-direction: column;
        padding: 20px 0;
        gap: 15px;
        transform: translateY(-120%);
        transition: transform 0.3s ease-in-out;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .nav-menu.open {
        transform: translateY(0);
    }

    .grid-2, .grid-3, .groups-grid {
        grid-template-columns: 1fr;
    }

    .route-flow-grid {
        flex-direction: column;
        gap: 25px;
    }

    .flow-arrow {
        transform: rotate(90deg);
        height: 40px;
    }

    .cookie-container {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .main-title {
        font-size: 32px;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: center;
    }

    .hero-ctas .btn {
        width: 100%;
        max-width: 300px;
    }

    .route-strip-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 15px;
    }

    .strip-details {
        padding: 0;
    }

    .strip-tag {
        align-self: center;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 26px;
    }

    .section-heading {
        font-size: 22px;
    }

    .folded-notebook-banner {
        padding: 25px 15px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-about, .footer-links, .footer-contact {
        grid-column: span 1;
    }
}