:root {
    /* BRAND COLORS */
    --brand-main: #21a7a2;
    --brand-dark: #134e4a;
    --brand-accent: #bef264;

    /* UI COLORS */
    --bg-page: #cbd5e1;
    --nav-bg: #ffffff;
    --text-bold: #0f172a;
    --text-body: #334155;
    --border-strong: #94a3b8;

    --container-width: 900px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background: var(--bg-page);
    color: var(--text-body);
    line-height: 1.6;
    padding-bottom: 5rem;
}

/* LAYOUT */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* HEADER */
header {
    background: linear-gradient(135deg, #134e4a 0%, #1a8a86 100%);
    color: white;
    padding: 3rem 0 2rem;
    text-align: center;
}

.logo-area img {
    height: 105px;
    width: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

h1 {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: uppercase;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* STICKY NAV */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nav-bg);
    border-bottom: 4px solid var(--brand-main);
    padding: 0.75rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.nav-link {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.5rem 0.8rem;
    color: var(--brand-dark);
    text-decoration: none;
    border-radius: 6px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--brand-main);
    background: #f1f5f9;
}

.nav-link.contact-link {
    color: var(--brand-main);
}

/* CARDS */
section {
    margin-top: 2.5rem;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(90deg, #134e4a 0%, var(--brand-main) 100%);
    color: white;
    padding: 1.1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 2rem;
}

/* BACK TO TOP BUTTON */
.back-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.2);
}

.back-to-top:hover {
    background: var(--brand-accent);
    color: var(--brand-dark);
    transform: translateY(-2px);
}

/* LISTS */
.bullet-list {
    list-style: none;
}

.bullet-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.85rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-bold);
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.5rem;
}

.bullet-list li:last-child {
    border-bottom: none;
}

.bullet-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--brand-main);
    font-weight: 900;
    font-size: 1.8rem;
    line-height: 0.8;
}

.msg-list li::before {
    content: "🏓";
    font-size: 1rem;
}

.msg-list li {
    border-bottom: none;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* GRIDS */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
}

.subs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.sub-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s;
}

.sub-pill:hover {
    border-color: var(--brand-main);
    transform: translateY(-2px);
}

.sub-icon {
    width: 35px;
    height: 35px;
    background: var(--brand-main);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.sub-name {
    font-weight: 700;
    color: var(--text-bold);
    font-size: 1rem;
}

/* SCHEDULE */
.sch-item {
    display: flex;
    gap: 2rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.sch-item:last-child {
    border-bottom: none;
}

.sch-time {
    min-width: 140px;
    font-weight: 900;
    color: var(--brand-main);
    font-size: 0.95rem;
    text-transform: uppercase;
}

/* TABLES - COMPLETE TOP ALIGNMENT FIX */
.table-wrap {
    width: 100%;
    overflow-x: auto;
}

/* Target the outer table that contains both group tables */
.table-wrap table,
.table-wrap table tr,
.table-wrap table td {
    vertical-align: top;
}

/* Ensure the outer table cells align top */
.table-wrap > center > table,
.table-wrap > center > table > tbody,
.table-wrap > center > table > tbody > tr,
.table-wrap > center > table > tbody > tr > td {
    vertical-align: top;
}

/* Main schedule table styles with vertical-align top */
.schedule-table,
.absent-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

/* Force top alignment on ALL schedule table cells */
.schedule-table th,
.schedule-table td {
    vertical-align: top !important;
    text-align: left;
    padding: 12px 15px;
    border: 1px solid var(--border-strong);
}

/* Ensure thead cells also align top */
.schedule-table th {
    background: var(--brand-dark);
    color: #ffffff;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    vertical-align: top !important;
}

/* Style for pod headings inside cells */
.schedule-table td h3,
.schedule-table td h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 800;
    color: var(--brand-dark);
    font-size: 1rem;
}

.schedule-table td h3:first-child,
.schedule-table td h4:first-child {
    margin-top: 0;
}

/* Clean link - no underline, no hover effects */
.cleanlink,
.cleanlink:hover,
.cleanlink:visited,
.cleanlink:active {
    text-decoration: none !important;
    color: inherit !important;
    border-bottom: none !important;
}

.cleanlink:hover {
    color: inherit !important;        /* Prevents color change on hover */
    background: none !important;
}

/* Target the outer container table that holds the two schedule tables */
table[cellpadding="0"] td,
table[cellspacing="0"] td {
    vertical-align: top;
}

/* Also target any nested tables for top alignment */
table table,
table table td,
table table th {
    vertical-align: top;
}

/* Absent table styles */
.absent-table th,
.absent-table td {
    padding: 10px 15px;
    border: 1px solid #cbd5e1;
    font-weight: 500;
    vertical-align: top;
}

.absent-table th {
    background: var(--brand-dark);
    color: #ffffff;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.schedule-table thead,
.absent-table thead {
    background: var(--brand-dark);
    color: #ffffff;
}

.schedule-table tbody tr:nth-child(even),
.absent-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.schedule-table tbody tr:hover,
.absent-table tbody tr:hover {
    background-color: #e9f6f5;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }
    .teams-grid {
        grid-template-columns: 1fr;
    }
    .nav-link {
        padding: 0.4rem 0.5rem;
        font-size: 0.65rem;
    }
    .container {
        padding: 0 1rem;
    }
    .schedule-table th,
    .schedule-table td {
        padding: 8px 10px;
    }
}

/* MISC */
.absent-table-container h3 {
    margin-bottom: 1.5rem;
    text-align: center;
}

#schedule .teams-grid {
    grid-template-columns: 1fr;
}

/* FAQ COLLAPSIBLE STYLES */
.faq-wrapper {
    display: flex;
    flex-direction: column;
}

.faq-wrapper details {
    border-bottom: 1px solid #f1f5f9;
    padding: 0.85rem 0;
    transition: all 0.3s ease;
}

.faq-wrapper details:last-child {
    border-bottom: none;
}

.faq-wrapper summary {
    list-style: none; /* Hides default arrow */
    cursor: pointer;
    font-weight: 700;
    color: var(--text-bold);
    display: flex;
    align-items: center;
    gap: 10px;
    outline: none;
    user-select: none;
}

/* Custom indicator using your brand color */
.faq-wrapper summary::before {
    content: "▶";
    color: var(--brand-main);
    font-size: 0.7rem;
    transition: transform 0.2s ease;
    display: inline-block;
}

/* Rotate indicator when open */
.faq-wrapper details[open] summary::before {
    transform: rotate(90deg);
}

/* Change summary color on hover to match your nav links */
.faq-wrapper summary:hover {
    color: var(--brand-main);
}

/* The answer text styling */
.faq-content {
    padding: 0.75rem 0 0.5rem 1.5rem;
    color: var(--text-body);
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 500;
}

/* Safari fix for hiding the default arrow */
.faq-wrapper summary::-webkit-details-marker {
    display: none;
}

/* RESULTS SECTION */
/* RESULTS SECTION - New Layout */
.rankings-row {
    margin-bottom: 2.5rem;
    text-align: center;
}

/* Rankings Box */
.ranking-box {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-main));
    color: white;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1.35;
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
    display: inline-block;
    max-width: 520px;
    width: 100%;
}

.ranking-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -5px rgba(33, 167, 162, 0.35);
}

.ranking-box span {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
    display: block;
    margin-top: 0.4rem;
}

/* Scoresheets Section */
.scoresheets-section {
    text-align: center;
}

.sheets-header {
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--brand-dark);
    margin-bottom: 1.25rem;
}

.sheets-float {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    justify-content: center;
}

.sheet-pill {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    padding: 1rem 1.75rem;
    border-radius: 9999px;
    font-weight: 700;
    color: var(--text-bold);
    transition: all 0.25s ease;
    min-width: 140px;
    font-size: 1.05rem;
}

.sheet-pill:hover {
    background: white;
    border-color: var(--brand-main);
    color: var(--brand-main);
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 10px 20px -3px rgba(33, 167, 162, 0.2);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .ranking-box {
        padding: 2rem 1.25rem;
        font-size: 1.3rem;
    }

    .sheet-pill {
        min-width: 130px;
        padding: 0.95rem 1.4rem;
        font-size: 1rem;
    }
}