/* Reset browser defaults that cause white edges */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding: 0; background-color: #0a0e14; }

:root {
    --nwi-primary: #166088;
    --nwi-accent: #00b4d8;
    --nwi-dark: #0a0e14;
    --nwi-card: #111827;
    --nwi-border: rgba(0, 180, 216, 0.2);
    --nwi-text: #e2e8f0;
    --nwi-muted: #94a3b8;
    --rye: 'Rye', serif;
    --mono: 'DM Mono', monospace;
}

/* ── Hero ───────────────────────────────────────────────── */
.nwi-hero {
    background: linear-gradient(135deg, #040710 0%, #0d1b2a 55%, #166088 100%);
    padding: 72px 24px 60px;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.nwi-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 60%, rgba(0,180,216,0.10) 0%, transparent 68%);
    pointer-events: none;
}
.nwi-hero h1 {
    font-family: var(--rye);
    font-size: clamp(2.6rem, 6.5vw, 5rem);
    color: var(--nwi-accent);
    text-shadow: 0 0 36px rgba(0,180,216,0.45);
    margin-bottom: 0.6rem;
    position: relative;
}
.nwi-hero p {
    font-family: var(--rye);
    font-size: clamp(1.1rem, 2.8vw, 1.8rem);
    color: var(--nwi-text);
    opacity: 0.82;
    position: relative;
    margin: 0;
}

/* ── Three-column strip ─────────────────────────────────── */
.nwi-strip {
    background: var(--nwi-dark);
    padding: 48px 24px 56px;
}

/* CTA card */
.nwi-cta-card {
    background: var(--nwi-card);
    border: 1px solid var(--nwi-border);
    border-radius: 14px;
    padding: 32px 24px;
    height: 100%;
    text-align: center;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.nwi-cta-card:hover {
    border-color: var(--nwi-accent);
    box-shadow: 0 0 28px rgba(0,180,216,0.12);
}
.nwi-cta-card h2 {
    font-family: var(--rye);
    color: var(--nwi-accent);
    font-size: 1.25rem;
    margin-bottom: 10px;
}
.nwi-cta-card p {
    font-family: var(--mono);
    font-size: 0.88rem;
    color: var(--nwi-muted);
    line-height: 1.65;
}

/* Calendar card */
.nwi-cal-card {
    background: var(--nwi-card);
    border: 1px solid var(--nwi-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 32px rgba(0,0,0,0.5);
}
.nwi-cal-header {
    background: linear-gradient(90deg, #0d1b2a 0%, #166088 100%);
    padding: 13px 20px;
    font-family: var(--rye);
    color: var(--nwi-accent);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    text-align: center;
}
.nwi-cal-card iframe {
    display: block;
    width: 100%;
}

/* News card */
.nwi-news-card {
    background: var(--nwi-card);
    border: 1px solid var(--nwi-border);
    border-radius: 14px;
    padding: 28px 22px 52px;
    min-height: 280px;
    height: 100%;
    position: relative;
}
.nwi-news-card .carousel-item h2,
.nwi-news-card .carousel-item h3 {
    font-family: var(--rye);
    color: var(--nwi-accent);
    font-size: 1.1rem;
    margin-bottom: 14px;
}
.nwi-news-card .carousel-item p {
    font-family: var(--mono);
    color: var(--nwi-text);
    font-size: 0.87rem;
    line-height: 1.7;
}
.nwi-news-card .carousel-indicators {
    bottom: 12px;
    margin: 0;
}
.nwi-news-card .carousel-indicators button {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: none;
    background-color: var(--nwi-accent);
    opacity: 0.35;
}
.nwi-news-card .carousel-indicators button.active {
    opacity: 1;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn-nwi-primary {
    background: linear-gradient(135deg, var(--nwi-primary) 0%, var(--nwi-accent) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 28px;
    font-family: var(--mono);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s, transform 0.15s;
}
.btn-nwi-primary:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    color: #fff;
}
.btn-nwi-outline {
    background: transparent;
    color: var(--nwi-accent);
    border: 1px solid var(--nwi-accent);
    border-radius: 8px;
    padding: 10px 26px;
    font-family: var(--mono);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s, color 0.2s;
}
.btn-nwi-outline:hover {
    background: var(--nwi-accent);
    color: var(--nwi-dark);
}

/* ── Content sections ───────────────────────────────────── */
.nwi-sections {
    background: var(--nwi-dark);
    padding: 0 0 32px;
}
.nwi-section-card {
    background: var(--nwi-card);
    border: 1px solid var(--nwi-border);
    border-radius: 16px;
    padding: 40px 36px;
    transition: border-color 0.3s;
}
.nwi-section-card:hover {
    border-color: rgba(0,180,216,0.4);
}
.nwi-section-card h1 {
    font-family: var(--rye);
    color: var(--nwi-accent);
    font-size: clamp(1.4rem, 3vw, 2rem);
    text-shadow: 0 0 18px rgba(0,180,216,0.22);
    margin-bottom: 10px;
}
.nwi-section-card h4 {
    font-family: var(--rye);
    color: var(--nwi-text);
    font-size: 0.98rem;
    opacity: 0.78;
    margin-bottom: 20px;
    font-weight: normal;
}
.nwi-section-card p {
    font-family: var(--mono);
    color: var(--nwi-muted);
    font-size: 0.9rem;
    line-height: 1.82;
}
.nwi-section-card a:not(.btn-nwi-outline):not(.btn-nwi-primary) {
    color: var(--nwi-accent);
    text-decoration: none;
}
.nwi-section-card a:not(.btn-nwi-outline):not(.btn-nwi-primary):hover {
    text-decoration: underline;
}
.nwi-collapse-body {
    border-top: 1px solid var(--nwi-border);
    margin-top: 24px;
    padding-top: 24px;
}

/* ── Photo carousel (shared across all pages) ───────────── */
.nwi-photos {
    background: var(--nwi-dark);
    padding: 20px 0 80px;
}
.nwi-carousel {
    max-width: 700px;
    margin: 0 auto;
}
.nwi-carousel img {
    border-radius: 14px;
    max-height: 420px;
    width: 100%;
    object-fit: cover;
    box-shadow: 0 8px 40px rgba(0,0,0,0.55);
}
.nwi-carousel .carousel-indicators {
    bottom: -44px;
}
.nwi-carousel .carousel-indicators button {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: none;
    background-color: var(--nwi-accent);
    opacity: 0.35;
}
.nwi-carousel .carousel-indicators button.active {
    opacity: 1;
}

/* ── Navbar ─────────────────────────────────────────────── */
#mainNavbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 14, 20, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 180, 216, 0.22);
    padding: 0 24px;
    font-family: 'Xanh Mono', monospace;
}
.nwi-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
}
.nwi-brand {
    font-family: var(--rye);
    font-size: 1.55rem;
    color: var(--nwi-accent);
    text-decoration: none;
    text-shadow: 0 0 18px rgba(0,180,216,0.35);
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: text-shadow 0.2s;
}
.nwi-brand:hover {
    color: var(--nwi-accent);
    text-shadow: 0 0 30px rgba(0,180,216,0.6);
}

/* Hamburger */
.nwi-toggler {
    background: none;
    border: 1px solid rgba(0,180,216,0.4);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    display: none;
}
.nwi-toggler span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--nwi-accent);
    margin: 4px 0;
    border-radius: 2px;
    transition: all 0.25s;
}

/* Nav links */
.nwi-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nwi-nav-links > li {
    position: relative;
}
.nwi-nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    color: var(--nwi-text);
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border: none;
}
.nwi-nav-link:hover,
.nwi-nav-links > li.open > .nwi-nav-link {
    background: rgba(0,180,216,0.1);
    color: var(--nwi-accent);
}
.nwi-nav-link .nwi-chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    display: inline-block;
    transition: transform 0.2s;
}
.nwi-nav-links > li.open > .nwi-nav-link .nwi-chevron {
    transform: rotate(-135deg) translateY(-2px);
}

/* Dropdown panels */
.nwi-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 230px;
    background: #0f1623;
    border: 1px solid var(--nwi-border);
    border-radius: 12px;
    padding: 8px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
.nwi-nav-links > li.open > .nwi-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nwi-dropdown-item {
    display: block;
    padding: 9px 14px;
    color: var(--nwi-muted);
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    border-radius: 8px;
    border-left: 2px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.nwi-dropdown-item:hover {
    background: rgba(0,180,216,0.08);
    color: var(--nwi-accent);
    border-left-color: var(--nwi-accent);
}
.nwi-dropdown-divider {
    height: 1px;
    background: var(--nwi-border);
    margin: 6px 8px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 991px) {
    .nwi-toggler { display: block; }
    .nwi-nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px 0 16px;
    }
    .nwi-nav-links.open { display: flex; }
    .nwi-nav-link { border-radius: 8px; }
    .nwi-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(255,255,255,0.03);
        border-radius: 8px;
        padding: 4px 0 4px 12px;
        margin-top: 2px;
        display: none;
    }
    .nwi-nav-links > li.open > .nwi-dropdown { display: block; }
    .nwi-hide-sm { display: none !important; }
    .nwi-cal-card iframe { height: 420px; }
}

@media (min-width: 992px) {
    .nwi-hide-sm { display: block; }
}

/* ── Sub-page hero (smaller than main hero) ─────────────── */
.nwi-hero-sm {
    background: linear-gradient(135deg, #040710 0%, #0d1b2a 55%, #166088 100%);
    padding: 48px 24px 40px;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.nwi-hero-sm::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 80%, rgba(0,180,216,0.10) 0%, transparent 68%);
    pointer-events: none;
}
.nwi-hero-sm h1 {
    font-family: var(--rye);
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    color: var(--nwi-accent);
    text-shadow: 0 0 30px rgba(0,180,216,0.45);
    margin-bottom: 0.5rem;
    position: relative;
}
.nwi-hero-sm p {
    font-family: var(--rye);
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    color: var(--nwi-text);
    opacity: 0.78;
    position: relative;
    margin: 0;
}

/* ── Shared card header (tables, calendar, etc.) ────────── */
.nwi-card-header {
    background: linear-gradient(90deg, #0d1b2a 0%, #166088 100%);
    padding: 13px 20px;
    font-family: var(--rye);
    color: var(--nwi-accent);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
}

/* ── Tables ─────────────────────────────────────────────── */
.nwi-table-card {
    background: var(--nwi-card);
    border: 1px solid var(--nwi-border);
    border-radius: 14px;
    overflow: hidden;
}
.nwi-table-scroll {
    overflow-x: auto;
}
.nwi-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--mono);
    font-size: 0.85rem;
    margin: 0;
}
.nwi-table thead th {
    background: rgba(0, 180, 216, 0.10);
    color: var(--nwi-accent);
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 13px 18px;
    border: 1px solid var(--nwi-border);
    font-weight: 600;
    white-space: nowrap;
}
.nwi-table thead th:first-child { border-left: none; }
.nwi-table thead th:last-child  { border-right: none; }
.nwi-table tbody tr {
    transition: background 0.15s;
}
.nwi-table tbody tr:hover {
    background: rgba(0, 180, 216, 0.06);
}
.nwi-table tbody td,
.nwi-table tbody th {
    padding: 11px 18px;
    color: var(--nwi-text);
    font-weight: normal;
    white-space: nowrap;
    border: 1px solid rgba(0, 180, 216, 0.12);
}
.nwi-table tbody td:first-child,
.nwi-table tbody th:first-child { border-left: none; }
.nwi-table tbody td:last-child,
.nwi-table tbody th:last-child  { border-right: none; }
.nwi-table tbody tr:last-child td,
.nwi-table tbody tr:last-child th { border-bottom: none; }
.nwi-table a {
    color: var(--nwi-accent);
    text-decoration: none;
}
.nwi-table a:hover {
    text-decoration: underline;
}
/* Gold tint for the top-ranked row */
.nwi-table tbody tr.nwi-row-top td,
.nwi-table tbody tr.nwi-row-top th {
    color: #f0c040;
}
/* Muted row for non-standard entries (e.g. COVID season) */
.nwi-table tbody tr.nwi-row-muted td,
.nwi-table tbody tr.nwi-row-muted th {
    color: var(--nwi-muted);
    font-style: italic;
}
/* Season number badge */
.nwi-season-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.25);
    border-radius: 6px;
    color: var(--nwi-accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.nwi-season-num:hover {
    background: rgba(0, 180, 216, 0.2);
    border-color: var(--nwi-accent);
    color: var(--nwi-accent);
    text-decoration: none;
}

/* ── DataTables overrides ───────────────────────────────── */
/* Force transparent backgrounds so .nwi-table dark styles win */
.dataTables_wrapper                                { color: var(--nwi-text); }
table.dataTable                                    { background-color: transparent !important; }
table.dataTable tbody tr                           { background-color: transparent !important; }
table.dataTable tbody tr.odd,
table.dataTable tbody tr.even                      { background-color: transparent !important; }
table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd               { background-color: rgba(0,180,216,0.04) !important; }
table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover             { background-color: rgba(0,180,216,0.06) !important; }
table.dataTable tbody tr.odd > .sorting_1,
table.dataTable tbody tr.even > .sorting_1,
table.dataTable.order-column tbody tr > .sorting_1 { background-color: transparent !important; }

/* Remove DataTables default header background */
table.dataTable thead th,
table.dataTable thead td                           { border-bottom: 1px solid var(--nwi-border) !important; }

/* Sort arrow icons */
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc               { background-image: none !important; cursor: pointer; }
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after        { content: ' ⇅'; font-size: 0.65rem; opacity: 0.5; }
table.dataTable thead .sorting_asc::after         { content: ' ↑'; opacity: 1; }
table.dataTable thead .sorting_desc::after        { content: ' ↓'; opacity: 1; }
