/* RESET & FONTS */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #F9F4E9; /* Archival Cream */
    color: #1C3040; /* Inky Blue */
    font-family: 'Courier New', Courier, monospace, Georgia, serif;
    line-height: 1.6;
    padding-bottom: 60px;
}

/* CARTOON SPORT ALMANAC STYLING */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Impact', 'Arial Black', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1C3040;
    margin-bottom: 15px;
}

a {
    color: #8D3E48; /* Burgundy */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

a:hover {
    color: #446657; /* Forest Green */
    text-decoration: underline;
}

/* CARTOON BORDERS AND SHADOWS */
.cartoon-panel {
    background-color: #FFFFFF;
    border: 4px solid #1C3040;
    box-shadow: 6px 6px 0px #B18B4D; /* Brass Shadow */
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cartoon-panel:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px #8D3E48; /* Shift to Burgundy */
}

.btn-cartoon {
    display: inline-block;
    background-color: #446657; /* Forest Green */
    color: #F9F4E9;
    padding: 10px 20px;
    border: 3px solid #1C3040;
    border-radius: 8px;
    font-family: 'Impact', sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    cursor: pointer;
    text-align: center;
    box-shadow: 3px 3px 0px #1C3040;
    transition: all 0.1s ease;
}

.btn-cartoon:hover {
    background-color: #8D3E48;
    color: #F9F4E9;
    text-decoration: none;
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0px #1C3040;
}

.btn-cartoon:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #1C3040;
}

/* HEADER & NAVIGATION (PERFECT AND SLIM) */
header {
    background-color: #1C3040;
    border-bottom: 4px solid #B18B4D; /* Slimmer, cleaner brand border */
    padding: 8px 24px; /* Compact top/bottom padding for slim height */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(28, 48, 64, 0.15);
}

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

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

.logo-text {
    font-family: 'Impact', sans-serif;
    font-size: 1.4rem; /* Slimmer balanced typography */
    color: #F9F4E9;
    text-transform: uppercase;
    text-shadow: 1px 1px 0px #8D3E48; /* Tighter shadow for smaller text */
    letter-spacing: 0.5px;
}

.logo-tag {
    background-color: #B18B4D;
    color: #1C3040;
    padding: 1px 6px; /* Space-optimized padding */
    font-size: 0.7rem; /* Elegant smaller tag */
    font-weight: bold;
    border-radius: 4px;
    border: 2px solid #1C3040;
    text-transform: uppercase;
}

/* NAVIGATION */
nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 10px; /* Space-efficient spacing */
    list-style: none;
}

.nav-links a {
    color: #F9F4E9;
    font-size: 0.85rem; /* Tighter legibility font size */
    text-transform: uppercase;
    font-family: 'Impact', sans-serif;
    letter-spacing: 0.5px;
    padding: 4px 8px; /* Tighter, cleaner buttons */
    border-radius: 4px;
    transition: background-color 0.15s, transform 0.1s;
}

.nav-links a:hover, .nav-links a.active {
    background-color: #8D3E48;
    color: #F9F4E9;
    text-decoration: none;
}

/* HAMBURGER MENU */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #F9F4E9;
    font-size: 1.4rem; /* Balanced, refined toggle size */
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

/* ALMANAC COVER HERO */
.hero-almanac {
    background-color: #8D3E48; /* Burgundy Background */
    color: #F9F4E9;
    border: 6px solid #1C3040;
    border-radius: 16px;
    padding: 40px;
    margin: 30px auto;
    max-width: 1200px;
    box-shadow: 10px 10px 0px #1C3040;
    position: relative;
    overflow: hidden;
}

.hero-almanac::before {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: radial-gradient(circle, transparent 50%, rgba(28, 48, 64, 0.15) 100%);
    pointer-events: none;
}

.hero-tag {
    display: inline-block;
    background-color: #B18B4D;
    color: #1C3040;
    padding: 5px 15px;
    font-family: 'Impact', sans-serif;
    font-size: 1rem;
    text-transform: uppercase;
    border: 3px solid #1C3040;
    border-radius: 6px;
    margin-bottom: 20px;
    transform: rotate(-2deg);
}

.hero-almanac h1 {
    color: #F9F4E9;
    font-size: 3rem;
    line-height: 1.1;
    text-shadow: 4px 4px 0px #1C3040;
    margin-bottom: 20px;
}

.hero-meta {
    font-size: 1.1rem;
    background-color: rgba(28, 48, 64, 0.2);
    padding: 10px 15px;
    border-left: 5px solid #B18B4D;
    display: inline-block;
}

/* SIGNATURE COMPONENT: ALMANAC INDEX */
.almanac-index {
    background-color: #1C3040;
    color: #F9F4E9;
    border: 4px solid #B18B4D;
    border-radius: 12px;
    padding: 25px;
    max-width: 1200px;
    margin: 30px auto;
}

.almanac-index h2 {
    color: #F9F4E9;
    border-bottom: 3px double #B18B4D;
    padding-bottom: 10px;
    text-align: center;
}

.almanac-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.index-item {
    background-color: #F9F4E9;
    border: 3px solid #1C3040;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 4px 4px 0px #B18B4D;
    transition: transform 0.2s, box-shadow 0.2s;
}

.index-item:hover {
    transform: translateY(-3px);
    box-shadow: 6px 6px 0px #8D3E48;
}

.index-item a {
    color: #1C3040;
    font-family: 'Impact', sans-serif;
    font-size: 1.2rem;
    display: block;
    text-transform: uppercase;
}

.index-item a:hover {
    color: #8D3E48;
    text-decoration: none;
}

.index-num {
    display: block;
    font-size: 0.8rem;
    color: #8D3E48;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    margin-bottom: 5px;
}

/* MAIN STRUCTURE */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* CHAPTER DIVIDERS */
.chapter-divider {
    border-top: 4px dashed #1C3040;
    margin: 50px 0 30px 0;
    position: relative;
    text-align: center;
}

.chapter-badge {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #B18B4D;
    color: #F9F4E9;
    border: 3px solid #1C3040;
    padding: 2px 15px;
    font-family: 'Impact', sans-serif;
    font-size: 1rem;
    border-radius: 20px;
}

/* TABLES & DATA GRID LISTINGS */
.almanac-table-container {
    overflow-x: auto;
    margin-bottom: 25px;
}

.almanac-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #FFFFFF;
    border: 4px solid #1C3040;
    box-shadow: 6px 6px 0px #1C3040;
}

.almanac-table th {
    background-color: #446657; /* Forest Green */
    color: #F9F4E9;
    font-family: 'Impact', sans-serif;
    text-transform: uppercase;
    font-weight: normal;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 4px solid #1C3040;
}

.almanac-table td {
    padding: 12px 15px;
    border-bottom: 2px solid #1C3040;
    font-size: 0.95rem;
}

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

.almanac-table tr:nth-child(even) {
    background-color: #F9F4E9;
}

.status-tag {
    display: inline-block;
    padding: 4px 8px;
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-radius: 4px;
    border: 2px solid #1C3040;
}

.status-confirmed {
    background-color: #446657;
    color: #F9F4E9;
}

.status-pending {
    background-color: #B18B4D;
    color: #1C3040;
}

/* CARDS GRID FOR ROUTES AND HOSTS */
.almanac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.route-card {
    background-color: #FFFFFF;
    border: 4px solid #1C3040;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 6px 6px 0px #1C3040;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.route-header {
    border-bottom: 3px double #1C3040;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.route-num {
    font-family: 'Impact', sans-serif;
    color: #8D3E48;
    font-size: 1.2rem;
}

.route-time {
    font-size: 0.85rem;
    color: #1C3040;
    font-weight: bold;
}

.route-teams {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1C3040;
    margin: 15px 0;
}

.route-footer {
    background-color: #F9F4E9;
    border: 2px solid #1C3040;
    border-radius: 6px;
    padding: 10px;
    font-size: 0.85rem;
}

/* HOST CARDS SPECIFIC */
.host-card {
    background-color: #FFFFFF;
    border: 4px solid #1C3040;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 6px 6px 0px #B18B4D;
}

.host-banner {
    background-color: #8D3E48;
    color: #F9F4E9;
    padding: 15px;
    text-align: center;
    border-bottom: 4px solid #1C3040;
}

.host-banner h3 {
    color: #F9F4E9;
    margin: 0;
}

.host-body {
    padding: 20px;
}

.host-status {
    font-weight: bold;
    text-transform: uppercase;
    color: #8D3E48;
    margin-bottom: 15px;
    border-bottom: 2px dashed #1C3040;
    padding-bottom: 5px;
}

.host-detail-item {
    margin-bottom: 12px;
}

.host-detail-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: bold;
    color: #446657;
}

.host-detail-val {
    font-size: 1rem;
    font-weight: bold;
    color: #1C3040;
}

/* MARGIN NOTES / SIDEBAR */
.sidebar-note {
    background-color: #F9F4E9;
    border-left: 6px solid #B18B4D;
    padding: 15px;
    margin-bottom: 25px;
    font-style: italic;
    font-size: 0.9rem;
}

/* FORM STYLING FOR CONTACT */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 3px solid #1C3040;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background-color: #FFFFFF;
}

.form-control:focus {
    outline: none;
    border-color: #8D3E48;
    box-shadow: 0 0 0 3px rgba(141, 62, 72, 0.25);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* COOKIE BANNER */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: #1C3040;
    color: #F9F4E9;
    border: 4px solid #B18B4D;
    border-radius: 12px;
    padding: 20px;
    z-index: 2000;
    box-shadow: 0px 8px 24px rgba(0,0,0,0.3);
    max-width: 800px;
    margin: 0 auto;
    display: none; /* Controlled by JS */
}

.cookie-content {
    margin-bottom: 15px;
}

.cookie-title {
    font-family: 'Impact', sans-serif;
    color: #B18B4D;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.cookie-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    background-color: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 6px;
}

.cookie-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Impact', sans-serif;
    text-transform: uppercase;
    cursor: pointer;
    border: 2px solid #1C3040;
}

.cookie-btn-accept {
    background-color: #446657;
    color: #F9F4E9;
}

.cookie-btn-reject {
    background-color: #8D3E48;
    color: #F9F4E9;
}

.cookie-btn-pref {
    background-color: #B18B4D;
    color: #1C3040;
}

/* FOOTER */
footer {
    background-color: #1C3040;
    color: #F9F4E9;
    border-top: 6px solid #8D3E48;
    padding: 40px 5%;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-brand h4 {
    color: #F9F4E9;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.footer-address {
    font-style: normal;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 10px;
    border-left: 3px solid #B18B4D;
    padding-left: 10px;
}

.footer-links h5 {
    color: #B18B4D;
    margin-bottom: 15px;
}

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

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

.footer-links a {
    color: #F9F4E9;
    font-size: 0.9rem;
    font-weight: normal;
}

.footer-links a:hover {
    color: #B18B4D;
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1200px;
    margin: 30px auto 0 auto;
    padding-top: 20px;
    border-top: 2px dashed rgba(249, 244, 233, 0.2);
    text-align: center;
    font-size: 0.8rem;
    color: rgba(249, 244, 233, 0.7);
}

/* TOAST/NOTIFICATIONS */
.toast-msg {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #446657;
    color: #F9F4E9;
    border: 3px solid #1C3040;
    box-shadow: 4px 4px 0px #1C3040;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 3000;
    display: none;
    font-family: 'Impact', sans-serif;
    letter-spacing: 0.5px;
}

/* ACCESSIBILITY FEATURES */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

:focus-visible {
    outline: 4px solid #8D3E48;
    outline-offset: 2px;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1200px) {
    .hero-almanac h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 8px 16px;
    }
    .nav-toggle {
        display: block;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #1C3040;
        border-bottom: 4px solid #B18B4D;
        padding: 16px;
        gap: 12px;
    }
    .nav-links.active {
        display: flex;
    }
    .hero-almanac h1 {
        font-size: 2rem;
    }
    .almanac-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-almanac {
        padding: 20px;
    }
    .hero-almanac h1 {
        font-size: 1.6rem;
    }
    .logo-text {
        font-size: 1.2rem;
    }
    .almanac-table th, .almanac-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    .cookie-buttons {
        flex-direction: column;
    }
    .cookie-btn {
        width: 100%;
        text-align: center;
    }
}