/* ========================================
   UNIVERSAL PAGE STYLING - v9.0.0
   Consistent design system across all pages
   Based on homepage v9.0.0 redesign
   ======================================== */

/* ========================================
   ROOT VARIABLES - Design Tokens
   ======================================== */

:root {
    /* Colors - Predators Brand */
    --navy-500: #041E42;
    --navy-600: #031935;
    --gold-500: #FFB81C;
    --gold-600: #E6A519;

    /* Neutrals */
    --gray-50: #f8f9fa;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Semantic Colors */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Spacing */
    --space-4: 4px;
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-20: 20px;
    --space-24: 24px;
    --space-32: 32px;
    --space-48: 48px;
    --space-64: 64px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

body {
    background: #ffffff;
    color: var(--gray-900);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ========================================
   NAVIGATION BAR - Consistent Height
   ======================================== */

.universal-nav {
    height: 70px !important;
    background: #ffffff;
    border-bottom: 1px solid var(--gray-200);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.nav-container {
    height: 70px !important;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--space-24) !important;
    padding-left: max(var(--space-24), env(safe-area-inset-left)) !important;
    padding-right: max(var(--space-24), env(safe-area-inset-right)) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    font-size: 20px;
    font-weight: 700;
    color: var(--navy-500);
    text-decoration: none;
}

.nav-brand-logo {
    width: 40px;
    height: 40px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
    height: 70px;
}

.nav-link {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 var(--space-20);
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    color: var(--navy-500);
    background: var(--gray-50);
}

.nav-link.active {
    color: var(--navy-500);
    border-bottom-color: var(--gold-500);
}

.site-content {
    margin-top: 0 !important;
}

/* Mobile Menu Toggle */
/* DISABLED 2025-11-15: Conflicts with nhl-light-theme.css mobile nav */
/* To revert: uncomment this block and comment out nhl-light-theme.css mobile nav */
/*
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--navy-500);
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        height: auto;
        padding: var(--space-16) 0;
        box-shadow: var(--shadow-lg);
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-link {
        width: 100%;
        height: auto;
        padding: var(--space-16) var(--space-24);
        border-bottom: 1px solid var(--gray-200);
    }
}
*/

/* ========================================
   PAGE HEADER - Hero Section
   ======================================== */

.page-header {
    background: linear-gradient(135deg, var(--navy-500) 0%, var(--navy-600) 100%);
    border-bottom: 4px solid var(--gold-500);
    padding: var(--space-48) var(--space-24);
    margin-top: -70px;
    padding-top: 118px; /* 70px nav + 48px spacing */
    text-align: center;
}

.page-header-content {
    max-width: 1440px;
    margin: 0 auto;
}

.page-header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    color: var(--gold-500);
    margin: 0 0 var(--space-12) 0;
    line-height: 1;
    letter-spacing: -0.02em;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
}

.page-description {
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    letter-spacing: 0.03em;
    margin: 0;
}

/* ========================================
   PAGE CONTENT CONTAINER
   ======================================== */

.page-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: var(--space-48) var(--space-24) var(--space-64);
}

/* ========================================
   CARD SYSTEM - Modern Card Design
   ======================================== */

.card {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    margin-bottom: var(--space-32);
}

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

/* Card Headers */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-24);
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
}

.card-header h2,
.card-header h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 900;
    color: var(--navy-500);
    margin: 0;
    letter-spacing: -0.02em;
}

.card-meta {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: var(--space-8);
}

/* Card Body */
.card-body {
    padding: var(--space-24);
}

/* Remove emojis from card icons */
.card-icon {
    display: none !important;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    padding: 12px 24px;
    background: var(--gold-500);
    color: var(--navy-500);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    background: var(--gold-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: #ffffff;
    color: var(--navy-500);
    border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

/* ========================================
   SEARCH & FILTERS
   ======================================== */

.search-box,
.search-bar {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-box input,
.search-bar input {
    width: 100%;
    padding: 12px 20px 12px 48px;
    background: #ffffff;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--gray-900);
    transition: all 0.2s ease;
}

.search-box input:focus,
.search-bar input:focus {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(255, 184, 28, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
}

/* Filters Container */
.filters-container {
    display: flex;
    gap: var(--space-16);
    flex-wrap: wrap;
    align-items: center;
    padding: var(--space-24);
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-32);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: var(--space-12);
}

.filter-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-select {
    padding: 10px 16px;
    background: #ffffff;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    color: var(--gray-900);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:hover {
    border-color: var(--gray-400);
}

.filter-select:focus {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(255, 184, 28, 0.1);
}

/* ========================================
   TABS
   ======================================== */

.tabs-container {
    display: flex;
    gap: var(--space-8);
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: var(--space-32);
}

.tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--gray-600);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab:hover {
    color: var(--navy-500);
    background: var(--gray-50);
}

.tab.active {
    color: var(--navy-500);
    border-bottom-color: var(--gold-500);
}

/* ========================================
   TABLES
   ======================================== */

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead th {
    background: var(--gray-100);
    color: var(--navy-500);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
    padding: 16px 12px;
    text-align: left;
    border-bottom: 3px solid var(--gold-500);
    position: sticky;
    top: 0;
    z-index: 10;
}

tbody td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-800);
}

tbody tr:hover {
    background: var(--gray-50);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   STATS GRID
   ======================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-20);
    margin: var(--space-32) 0;
}

.stat-box {
    padding: var(--space-24);
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all 0.2s ease;
}

.stat-box:hover {
    background: var(--gray-200);
    border-color: var(--gray-400);
    transform: translateY(-2px);
}

.stat-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-600);
    margin-bottom: var(--space-8);
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 900;
    color: var(--navy-500);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-positive {
    color: var(--success);
}

.stat-negative {
    color: var(--error);
}

/* ========================================
   LOADING STATES
   ======================================== */

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-48);
    gap: var(--space-16);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--gold-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 600;
}

/* ========================================
   MODALS
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-24);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: var(--space-48);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    color: var(--gray-900);
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--gold-500);
    border-color: var(--gold-500);
    color: var(--navy-500);
    transform: rotate(90deg);
}

/* ========================================
   GRID LAYOUTS
   ======================================== */

.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-32);
}

.grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-24);
}

.grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-20);
}

@media (max-width: 1024px) {
    .grid-2col,
    .grid-3col,
    .grid-4col {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   NEWS PAGE SPECIFIC
   ======================================== */

.news-container {
    background: #ffffff !important;
}

.news-toolbar {
    display: flex;
    gap: var(--space-16);
    align-items: center;
    padding: var(--space-24);
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-32);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .page-header {
        padding: var(--space-32) var(--space-16);
        padding-top: 108px;
    }

    .page-header h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .page-content {
        padding: var(--space-32) var(--space-16) var(--space-48);
    }

    .card {
        margin-bottom: var(--space-24);
    }

    .card-header,
    .card-body {
        padding: var(--space-16);
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-12);
    }

    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-select {
        width: 100%;
    }

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

/* ========================================
   ACCESSIBILITY
   ======================================== */

button:focus,
a:focus,
input:focus,
select:focus {
    outline: 3px solid var(--gold-500);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: fixed;
    top: -100px;
    left: 0;
    background: var(--gold-500);
    color: var(--navy-500);
    padding: 12px 24px;
    font-weight: 700;
    text-decoration: none;
    z-index: 1000;
    transition: top 0.3s ease;
}

.skip-to-main:focus {
    top: 0;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-gold { color: var(--gold-500) !important; }
.text-navy { color: var(--navy-500) !important; }
.text-muted { color: var(--gray-600) !important; }

.bg-gold { background-color: var(--gold-500) !important; }
.bg-navy { background-color: var(--navy-500) !important; }
.bg-gray { background-color: var(--gray-100) !important; }

.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

.uppercase { text-transform: uppercase; }

.mb-0 { margin-bottom: 0 !important; }
.mb-16 { margin-bottom: var(--space-16) !important; }
.mb-24 { margin-bottom: var(--space-24) !important; }
.mb-32 { margin-bottom: var(--space-32) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-16 { margin-top: var(--space-16) !important; }
.mt-24 { margin-top: var(--space-24) !important; }
.mt-32 { margin-top: var(--space-32) !important; }

/* Mobile touch target improvements */
@media (max-width: 768px) {
    .btn {
        padding: 16px 28px; /* Increased from 12px 24px */
        font-size: 15px;
        min-height: 48px; /* Minimum touch target */
        min-width: 48px;
        touch-action: manipulation; /* Prevents double-tap zoom, faster response */
    }

    a, button {
        touch-action: manipulation; /* Removes 300ms tap delay on mobile */
    }
}
