/*
Theme Name: Union Hockey Analytics (UHS)
Theme URI: https://unionhockeyblog.com
Author: UHS Development
Description: A bespoke, ultra-lightweight theme custom-built to perfectly display the Union Hockey Core data application.
Version: 1.0.0
Text Domain: uhs-theme
*/

/* ========================================================
   1. VARIABLES & BASE STYLES
   ======================================================== */
:root {
    /* Base Brand Colors */
    --uhs-brand-garnet: #5a1222;
    --uhs-brand-navy: #002b5c;
    --uhs-brand-gold: #d4af37;
    
    /* Deep 3D Theme Gradients (Driven by WP Customizer) */
    --uhs-grad-start: #001d3d;
    --uhs-grad-mid: #420d19;
    --uhs-grad-end: #22050b;

    /* Interface Colors */
    --uhs-bg-light: #f8fafc;
    --uhs-text-main: #1a202c;
    --uhs-text-muted: #64748b;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--uhs-text-main);
    -webkit-font-smoothing: antialiased;
    /* Authentic Pond Ice Background */
    background: radial-gradient(circle at 50% 20%, rgba(255,255,255,0.15) 0%, transparent 60%),
                linear-gradient(135deg, rgba(8, 20, 35, 0.82) 0%, rgba(15, 32, 52, 0.88) 100%),
                url('./images/pond-ice-bg.jpg') no-repeat center center fixed;
    background-size: cover;
}

.uhs-theme-container {
    max-width: 1400px !important;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================================
   2. SCOREBOARD TICKER
   ======================================================== */
.uhs-top-ticker-bar {
    background: #111;
    border-bottom: 1px solid #222;
    padding: 8px 0;
    overflow: hidden;
}

.uhs-ticker-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.uhs-ticker-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 4px;
}

.uhs-ticker-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 6px 12px;
    min-width: 130px;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: #eee;
}

.ticker-status {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--uhs-brand-gold);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.ticker-team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1.3;
}

.ticker-team-row .team-name { font-weight: 700; }
.ticker-team-row .team-score { font-weight: 900; color: #fff; }

/* ========================================================
   3. HEADER, NAVIGATION & DYNAMIC GRADIENTS
   ======================================================== */
   
/* Unified Gradient Rule for all major headers and hubs */
.uhs-site-header,
.desktop-nav ul ul,
.card-header,
.module-title,
.navy-header,
.uhs-hub-banner-box,
.uhs-season-header-bar {
    background: linear-gradient(135deg, var(--uhs-grad-start) 0%, var(--uhs-grad-mid) 30%, var(--uhs-grad-end) 100%) !important;
    border-bottom: 3px solid var(--uhs-brand-gold) !important;
    color: #ffffff !important;
}

.uhs-site-header {
    padding: 12px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    position: relative;
    z-index: 1000;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Custom Logo Sizing */
.site-branding img, .custom-logo {
    max-height: 68px !important;
    width: auto !important;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Fallback Header Title Styling */
.site-title-text {
    color: #fff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.site-title-text .t-main {
    font-family: 'Arial Black', sans-serif;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.5px;
}
.site-title-text .t-sub {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--uhs-brand-gold);
}

/* Desktop Dropdown Navigation */
.desktop-nav { display: block; }
.desktop-nav ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    gap: 5px;
}

.desktop-nav li {
    position: relative;
    list-style: none !important;
}

.desktop-nav a {
    display: block;
    padding: 10px 14px;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s, background 0.2s;
    border-radius: 4px;
}

.desktop-nav a:hover, .desktop-nav li:hover > a {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* Nested Sub-Menus: Side Pop-Out Fix */
.desktop-nav ul ul { 
        display: none;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        margin: 0 !important;
        padding: 10px 0 !important;
        min-width: max-content !important; /* Forces box to expand to fit text exactly */
        background: var(--uhs-grad-mid) !important;
        border: 1px solid rgba(212, 175, 55, 0.3) !important;
        border-top: 3px solid var(--uhs-brand-gold) !important;
        border-radius: 6px !important;
        box-shadow: 6px 6px 20px rgba(0,0,0,0.5) !important;
        z-index: 1001 !important;
        flex-direction: column !important;
        align-items: flex-start !important; /* Forces all items to snap to the left */
    }
    
    .desktop-nav li:hover > ul { display: flex !important; }
    .desktop-nav ul ul li { width: 100% !important; display: block !important; margin: 0 !important; }
    .desktop-nav ul ul li a { 
        text-align: left !important; 
        padding: 12px 25px !important; 
        width: 100% !important; 
        box-sizing: border-box !important; 
        white-space: nowrap !important; /* Prevents text from breaking onto two lines */
        font-size: 0.85rem !important;
        border-radius: 0 !important;
        color: #cbd5e1 !important;
    }
    .desktop-nav ul ul li a:hover {
        background: var(--uhs-brand-garnet, #5a1222) !important;
        color: var(--uhs-brand-gold, #d4af37) !important;
    }
    /* Third Level Pop-out to the right */
    .desktop-nav > ul > li > ul > li > ul { top: 0 !important; left: 100% !important; background: var(--uhs-grad-end) !important;}


/* Omni Search Bar */
.uhs-omni-search {
    display: flex;
    align-items: center;
    background: transparent !important; /* Removes duplicate background */
    border: none !important; /* Removes duplicate border */
    padding: 0;
}
.uhs-omni-search:focus-within {
    background: transparent !important;
    border-color: transparent !important;
}

.omni-input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.82rem;
    width: 180px;
    padding: 4px 0;
}

.uhs-omni-search:focus-within .omni-input { color: #1a202c; }
.omni-input::placeholder { color: #cbd5e1; }
.omni-submit { background: none; border: none; cursor: pointer; font-size: 0.9rem; padding: 0; }

/* ========================================================
   4. HAMBURGER MENU & FLYOUT DRAWER
   ======================================================== */
.uhs-hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.uhs-hamburger-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

.uhs-flyout-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.uhs-flyout-overlay.active { opacity: 1; visibility: visible; }

.uhs-flyout-drawer {
    position: fixed;
    top: 0; left: -300px;
    width: 280px; height: 100%;
    background: #001022;
    color: #fff;
    z-index: 9999;
    box-shadow: 4px 0 15px rgba(0,0,0,0.3);
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.uhs-flyout-drawer.active { left: 0; }

.flyout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--uhs-grad-start) 0%, var(--uhs-grad-mid) 100%);
    border-bottom: 3px solid var(--uhs-brand-gold);
}

.flyout-title { font-weight: 900; letter-spacing: 1px; }
.flyout-close-btn { background: none; border: none; color: #fff; font-size: 1.8rem; cursor: pointer; line-height: 1; }

/* ========================================================
   FLYOUT MENU: VERTICAL ACCORDION FIX
   ======================================================== */
/* Must be visible so the flyouts aren't clipped by the drawer */
.flyout-body { padding: 20px; overflow-y: auto !important; height: 100%; } 
.flyout-body ul { text-align: left; list-style: none; margin: 0; padding: 0; }
.flyout-body ul li { position: relative; width: 100%; }
.flyout-body ul li a {
    display: block;
    padding: 12px 0;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    border-bottom: 1px solid #1a2a3a;
    transition: color 0.2s;
}
.flyout-body ul li a:hover { color: var(--uhs-brand-gold); }

/* Hide sub-menus by default, expand them DOWN vertically on hover/focus */
.flyout-body ul ul { 
    display: none; 
    position: relative !important; 
    top: 0 !important; 
    left: 0 !important; 
    width: 100% !important; 
    background: rgba(0, 0, 0, 0.2) !important; 
    border: none !important; 
    border-left: 2px solid var(--uhs-brand-gold) !important; 
    margin: 0 0 10px 10px !important; 
    padding: 5px 0 !important; 
    box-shadow: none !important; 
    z-index: 1 !important; 
}

/* Reveal the flyout by pushing content down */
.flyout-body ul li:hover > ul,
.flyout-body ul li:active > ul,
.flyout-body ul li:focus-within > ul { 
    display: block !important; 
}

.flyout-body ul ul li a { 
    font-size: 0.85rem !important; 
    padding: 10px 15px !important; 
    border-bottom: 1px solid rgba(255,255,255,0.05) !important; 
    color: #cbd5e1 !important; 
    white-space: normal !important;
}

.flyout-body ul ul li a:hover {
    background: var(--uhs-brand-garnet, #5a1222) !important;
    color: #ffffff !important;
}

/* ========================================================
   5. HOMEPAGE GRID & CARDS
   ======================================================== */
.uhs-dashboard-grid {
    display: grid;
    grid-template-columns: 240px 1fr 300px;
    gap: 25px;
    margin-top: 0 !important;
    margin-bottom: 15px !important;
}

.uhs-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header,
.module-title,
.navy-header {
    margin: 0;
    padding: 12px 15px;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.quick-links-list, .headlines-list, .sub-link-list { list-style: none; margin: 0; padding: 0; }
.quick-links-list li a, .headlines-list li a, .sub-link-list li a { 
    display: block; 
    padding: 12px 15px; 
    text-decoration: none; 
    color: var(--uhs-text-main); 
    font-size: 0.9rem; 
    font-weight: 600; 
    border-bottom: 1px solid #f1f5f9; 
    transition: background 0.15s, color 0.15s; 
}
.quick-links-list li a:hover, .headlines-list li a:hover { background: #f8fafc; color: var(--uhs-brand-garnet); }

/* Hero Section */
.hero-image-link:hover .hero-image { transform: scale(1.03); }
.hero-content { padding: 25px; }
.hero-title { margin: 0 0 10px 0; font-size: 1.8rem; font-weight: 900; line-height: 1.15; }
.hero-title a { color: var(--uhs-text-main); text-decoration: none; transition: color 0.2s; }
.hero-title a:hover { color: var(--uhs-brand-garnet); }
.hero-excerpt { margin-bottom: 15px; color: var(--uhs-text-muted); font-size: 0.95rem; line-height: 1.5; }
.hero-read-more {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--uhs-brand-navy);
    text-decoration: none;
    letter-spacing: 0.5px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}
.hero-read-more:hover {
    border-bottom-color: var(--uhs-brand-garnet);
    color: var(--uhs-brand-garnet);
}

/* ========================================================
   6. RIGHT RAIL WIDGETS
   ======================================================== */
.widget-card { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.widget-body { padding: 15px; }

.news-item { border-bottom: 1px solid #edf2f7; padding-bottom: 12px; margin-bottom: 12px; }
.news-item:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.news-item.compact { padding-bottom: 8px; margin-bottom: 8px; }

.news-title a { color: #1a202c; font-weight: 800; font-size: 0.95rem; text-decoration: none; line-height: 1.25; transition: color 0.2s; }
.news-title a:hover { color: var(--uhs-brand-garnet); }
.news-date { font-size: 0.7rem; font-weight: 800; color: var(--uhs-brand-gold); text-transform: uppercase; margin-bottom: 2px; }
.news-snippet { font-size: 0.8rem; color: #64748b; margin-top: 4px; }

.navy-widget { border: 1px solid #001a38; }
.gold-date { color: var(--uhs-brand-gold) !important; font-weight: 900 !important; }
.history-text { font-size: 0.85rem; color: #2d3748; margin: 5px 0 15px 0; line-height: 1.35; }

/* ========================================================
   7. HIGH-CONTRAST PLAYER SPOTLIGHT STAT BUBBLES
   ======================================================== */
.focus-widget-override { padding: 0 !important; overflow-x: hidden !important; }

.uhs-spotlight-card {
    padding: 15px 10px;
    background: #ffffff;
}

.uhs-spotlight-header {
    text-align: center;
    margin-bottom: 15px;
}

.uhs-spotlight-name {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--uhs-brand-navy);
    text-transform: uppercase;
    margin: 0 0 8px 0;
}

.uhs-spotlight-meta {
    display: inline-block;
    background: #e2e8f0;
    color: #1a202c;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.uhs-spotlight-bubbles {
    display: flex; /* Swapped to flex for dynamic spacing */
    justify-content: center;
    gap: 8px;
    text-align: center;
    width: 100%;
}

.uhs-stat-bubble {
    flex: 1; /* Automatically stretches 3 bubbles to 33% or 5 bubbles to 20% */
    min-width: 0; /* Prevents overflow clipping */
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.uhs-bubble-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 900;
    color: #4a5568;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.uhs-bubble-val {
    display: block;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--uhs-brand-garnet);
    white-space: nowrap; /* Forces records like '40-22-13' to stay on a single line */
}

/* ========================================================
   8. ANALYTICS & ARCHIVE HUB (FIXED SPACING & BUTTONS)
   ======================================================== */
.uhs-analytics-section {
    margin-top: 35px !important;
    margin-bottom: 35px !important;
    clear: both;
}

.uhs-hub-banner-box {
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 22px 25px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    /* Background gradient handled globally by Section 3 */
}

.hub-banner-title {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.uhs-hub-links-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
    gap: 12px !important;
}

.hub-btn {
    display: inline-flex !important;
    width: auto !important;
    background: #ffffff !important; /* Solid white background */
    border: 2px solid var(--uhs-brand-navy) !important; /* Crisp navy border */
    color: var(--uhs-brand-navy) !important; /* Primary Navy font color */
    padding: 10px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 900 !important; /* Extra bold to pop */
    font-size: 0.85rem;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important; /* Lifts the button off the banner */
}

/* Premium Hover State */
.hub-btn:hover {
    background: var(--uhs-brand-navy) !important; /* Inverts to Navy */
    border-color: var(--uhs-brand-gold) !important; /* Gold accent border */
    color: #ffffff !important; /* White text */
    transform: translateY(-2px); /* Slight lift effect */
}

/* ========================================================
   9. LOWER 4-COLUMN HUB GRID
   ======================================================== */
.uhs-bottom-hub-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    align-items: start; /* Forces cards to end immediately after their content */
}

.uhs-home-module-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
}

.compact-body {
    padding: 12px !important;
    font-size: 0.85rem;
}

/* Custom Mini Leaderboard Box */
.home-leader-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 900;
    color: #1a202c;
    margin-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 6px;
    text-transform: uppercase;
}
.home-leader-header a { color: var(--uhs-brand-garnet); text-decoration: none; }

.home-leader-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    color: #2d3748;
}
.home-leader-table th { text-align: left; color: #64748b; font-weight: 800; font-size: 0.7rem; padding-bottom: 4px; border-bottom: 1px solid #e2e8f0; }
.home-leader-table th:last-child { text-align: center; }
.home-leader-table td { padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
.home-leader-table td:last-child { text-align: center; color: var(--uhs-brand-garnet); font-weight: bold; }

/* Live Standings */
.mini-standings-box { border-top: 1px solid #edf2f7; padding-top: 10px; margin-top: 15px; }
.live-tag { font-size: 0.65rem; color: var(--uhs-brand-garnet); }
.mini-standings-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.mini-standings-table th { text-align: center; color: #64748b; padding-bottom: 4px; border-bottom: 1px solid #e2e8f0; }
.mini-standings-table th:nth-child(2), .mini-standings-table td:nth-child(2) { text-align: left; }
.mini-standings-table td { padding: 4px 2px; text-align: center; border-bottom: 1px solid #f1f5f9; }
.mini-standings-table .m-logo { width: 14px; height: 14px; object-fit: contain; vertical-align: middle; margin-right: 4px; }
.mini-standings-table tr.highlight-row td { background: #e6fffa; font-weight: bold; }

/* Milestone Watch Display Card */
.milestone-display-card {
    background: linear-gradient(180deg, #111 0%, #1a1a1a 100%);
    border: 2px solid var(--uhs-brand-garnet);
    border-radius: 8px;
    padding: 25px 15px;
    text-align: center;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.ms-tag { background: var(--uhs-brand-garnet); display: inline-block; padding: 4px 15px; border-radius: 15px; font-size: 0.7rem; font-weight: 900; text-transform: uppercase; margin-bottom: 15px; }
.ms-mark { font-size: 0.7rem; color: #a0aec0; letter-spacing: 1px; margin-bottom: 5px; }
.ms-player { font-size: 1.5rem; font-weight: 900; text-transform: uppercase; margin-bottom: 15px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.ms-target { background: var(--uhs-brand-garnet); display: inline-block; padding: 6px 20px; border-radius: 4px; font-size: 0.85rem; font-weight: 900; text-transform: uppercase; margin-bottom: 15px; box-shadow: inset 0 2px 4px rgba(255,255,255,0.1); }
.ms-needs { font-size: 0.75rem; color: #cbd5e1; font-style: italic; }

/* Sublinks */
.sub-link-list li a { padding: 8px 0; color: var(--uhs-text-main); font-size: 0.8rem; }
.sub-link-list li a:hover, .hub-sublinks li a:hover { color: var(--uhs-brand-garnet); }

/* Hot / Cold Split Grid */
.hot-cold-split-grid { display: flex; gap: 15px; margin-top: 15px; }
.hc-column { flex: 1; border-radius: 6px; padding: 15px 10px; text-align: center; border: 1px solid #e2e8f0; }
.hot-col { background: linear-gradient(180deg, #fff5f5 0%, #fed7d7 100%); border-top: 4px solid #e53e3e; }
.cold-col { background: linear-gradient(180deg, #ebf8ff 0%, #b2f5ea 100%); border-top: 4px solid #3182ce; }
.hc-title { font-size: 0.85rem; font-weight: 900; text-transform: uppercase; margin-bottom: 15px; letter-spacing: 0.5px; }
.hot-col .hc-title { color: #c53030; }
.cold-col .hc-title { color: #2b6cb0; }
.hc-player { display: flex; flex-direction: column; margin-bottom: 15px; }
.hc-player:last-child { margin-bottom: 0; }
.hc-player span { font-size: 0.7rem; font-weight: 800; color: #4a5568; text-transform: uppercase; }
.hc-player strong { font-size: 0.95rem; font-weight: 900; color: #1a202c; margin-top: 2px; }
.hot-col .hc-player strong { color: #9b2c2c; }
.cold-col .hc-player strong { color: #2c5282; }

/* ECAC Team Logos Grid */
.ecac-logo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.ecac-logo-grid a { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #2d3748; font-size: 0.65rem; font-weight: 800; padding: 6px 2px; border-radius: 6px; border: 1px solid #edf2f7; transition: background 0.2s, border-color 0.2s; }
.ecac-logo-grid a:hover { background: #f8fafc; border-color: var(--uhs-brand-navy); }
.ecac-logo-grid img { width: 26px; height: 26px; object-fit: contain; margin-bottom: 4px; }

/* ========================================================
   10. BESPOKE SITE FOOTER
   ======================================================== */
.uhs-site-footer {
    width: 100%;
    position: relative;
    z-index: 10;
    background: #001022; 
    background: linear-gradient(180deg, #001022 0%, #00050d 100%);
    color: #cbd5e1;
    border-top: 4px solid var(--uhs-brand-gold);
    padding: 45px 0 25px 0;
    margin-top: 60px;
    font-size: 0.85rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 35px;
}

.footer-col { display: flex; flex-direction: column; }
.footer-logo img, .footer-logo .custom-logo { max-height: 55px !important; width: auto !important; margin-bottom: 12px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.footer-title-text { text-decoration: none; color: #ffffff; display: flex; flex-direction: column; margin-bottom: 12px; }
.footer-title-text .t-main { font-family: 'Arial Black', sans-serif; font-size: 1.2rem; font-weight: 900; letter-spacing: 0.5px; }
.footer-title-text .t-sub { font-size: 0.75rem; font-weight: 800; color: var(--uhs-brand-gold); letter-spacing: 1.5px; }
.footer-disclaimer { color: #94a3b8; line-height: 1.5; margin: 0; max-width: 420px; font-size: 0.8rem; }
.footer-heading { color: #ffffff; font-size: 0.85rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 15px 0; border-bottom: 2px solid var(--uhs-brand-garnet); padding-bottom: 6px; display: inline-block; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #cbd5e1; text-decoration: none; font-weight: 600; transition: color 0.2s; }
.footer-links a:hover { color: var(--uhs-brand-gold); }

/* Footer Bottom Bar */
.footer-bottom { border-top: 1px solid #1a2a3a; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; color: #64748b; font-size: 0.75rem; }
.copyright-text { margin: 0; }
.back-to-top { color: var(--uhs-brand-gold); text-decoration: none; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; transition: color 0.2s; }
.back-to-top:hover { color: #ffffff; }

/* ========================================================
   11. JOURNALISTIC SINGLE POST PRINT STYLING
   ======================================================== */
.single-post-main { padding-top: 25px !important; }

.uhs-journalistic-card {
    max-width: 1275px;
    margin: 0 auto 40px auto;
    background: #ffffff;
    border-radius: 8px;
    padding: 45px 55px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
}

.entry-category-badge { display: inline-block; background: var(--uhs-brand-garnet); color: #ffffff; font-weight: 900; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; padding: 4px 12px; border-radius: 4px; margin-bottom: 15px; }
.entry-title { font-family: 'Arial Black', 'Impact', sans-serif; font-size: 2.3rem; font-weight: 900; color: var(--uhs-brand-navy); line-height: 1.15; margin: 0 0 15px 0; letter-spacing: -0.5px; text-transform: uppercase; }
.entry-meta-bar { font-size: 0.85rem; font-weight: 700; color: #64748b; border-bottom: 2px solid #e2e8f0; padding-bottom: 15px; margin-bottom: 30px; text-transform: uppercase; letter-spacing: 0.5px; }
.entry-meta-bar strong { color: var(--uhs-brand-navy); }
.meta-divider { margin: 0 8px; color: var(--uhs-brand-gold); }
.entry-featured-media { margin-bottom: 30px; border-radius: 6px; overflow: hidden; }
.entry-featured-media img { width: 100%; height: auto; display: block; }

/* Editorial Print Typography */
.journalistic-body { font-family: 'Georgia', 'Cambria', 'Times New Roman', Times, serif; font-size: 1.125rem; line-height: 1.8; color: #1e293b; }
.journalistic-body p { margin-bottom: 24px; }
.journalistic-body h2, .journalistic-body h3, .journalistic-body h4 { font-family: 'Segoe UI', Roboto, sans-serif; font-weight: 900; color: var(--uhs-brand-navy); margin: 35px 0 15px 0; line-height: 1.25; text-transform: uppercase; }
.journalistic-body h2 { font-size: 1.5rem; border-bottom: 1px solid #cbd5e1; padding-bottom: 8px; }
.journalistic-body h3 { font-size: 1.25rem; }
.journalistic-body blockquote { margin: 30px 0; padding: 18px 25px; background: #f8fafc; border-left: 5px solid var(--uhs-brand-garnet); font-style: italic; font-size: 1.2rem; color: #334155; border-radius: 0 6px 6px 0; }
.journalistic-body a { color: var(--uhs-brand-garnet); text-decoration: underline; font-weight: 700; }
.journalistic-body a:hover { color: var(--uhs-brand-navy); }
.entry-footer { margin-top: 40px; padding-top: 20px; border-top: 2px solid #e2e8f0; }
.post-nav-links { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 800; }
.post-nav-links a { color: var(--uhs-brand-navy); text-decoration: none; text-transform: uppercase; }
.post-nav-links a:hover { color: var(--uhs-brand-garnet); }


/* ========================================================
   12. SHORTCODE PAGE STYLING, GAP KILLERS & ICE OVERRIDES
   ======================================================== */

/* 1. Reduces the dead space between the header and plugin cards to exactly 18px */
.site-main { padding-top: 15px !important; padding-bottom: 50px !important; }
.uhs-master-wrapper { padding-top: 18px !important; display: flow-root !important; }

/* Strip WordPress internal template double-padding */
.uhs-page-main, .uhs-raw-page-content { padding-top: 0 !important; margin-top: 0 !important; }
.uhs-raw-page-content > *:first-child, .uhs-raw-page-content > p:first-child, .uhs-raw-page-content > p:first-child > *:first-child { margin-top: 0 !important; padding-top: 0 !important; }
.uhs-raw-page-content > p:first-child:empty { display: none !important; }

/* Nuke negative margins fighting the wrapper for standard WP pages */
.uhs-master-wrapper > article, .uhs-master-wrapper > main { margin-top: 0 !important; }

/* RESTORE THE 35px GAP FOR DYNAMICALLY INJECTED PAGES (Players, Opponents, Boxscores) */
.uhs-master-wrapper > div,
.uhs-master-wrapper > .uhs-season-wrapper,
.uhs-profile-wrap, 
.uhs-season-wrap,
.uhs-boxscore-outer-wrap { 
    margin-top: 35px !important; 
}

/* Prevent double-gaps if these elements are used inside a standard WP page via shortcode */
.site-main .uhs-profile-wrap, 
.site-main .uhs-season-wrap,
.site-main .uhs-boxscore-outer-wrap,
.site-main .uhs-season-wrapper { 
    margin-top: 0 !important; 
}

/* 2. Plugin Data Wrappers -> Expand to full 1400px width with clean borders */
.uhs-season-wrapper {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    margin-bottom: 30px !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

/* Force inner wrappers to be transparent so the master wrapper style handles the card */
.uhs-directory-container, .uhs-profile-wrap, .uhs-season-wrap, .uhs-boxscore-outer-wrap {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}
.uhs-rb-body, .uhr-body-container { padding: 20px 0 !important; }

/* 3. Plugin Headers Typography Sync */
.uhs-season-header-bar h2,
.uhs-season-header-bar .uhs-season-title,
.uhs-season-header-bar div {
    color: #ffffff !important;
}

/* ========================================================
   13. GLOBAL MEDIA QUERIES
   ======================================================== */
@media (max-width: 1100px) {
    .uhs-bottom-hub-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
    .desktop-nav { display: none; }
    .omni-input { width: 120px; }
    .uhs-dashboard-grid { grid-template-columns: 1fr; }
    .uhs-rail-left { order: 2; }
    .uhs-center-hero { order: 1; }
    .uhs-rail-right { order: 3; }
}

@media (max-width: 850px) {
    /* MOBILE FOOTER FIX: Split side-by-side */
    .footer-grid { 
        grid-template-columns: 1fr 1fr; 
        gap: 25px; 
    }
    .footer-col:first-child { 
        grid-column: span 2; 
        text-align: center;
    }
    .footer-bottom { 
        flex-direction: column; 
        gap: 12px; 
        text-align: center; 
    }
}

@media (max-width: 650px) {
    .uhs-bottom-hub-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .uhs-journalistic-card { padding: 25px 20px; }
    .entry-title { font-size: 1.7rem; }
    /* Mobile Omni Search Layout Fixes */
    .uhs-omni-input, .omni-input { 
        font-size: 16px !important; /* CRITICAL: Prevents iOS auto-zoom bug */
    }
    .uhs-omni-results { 
        position: fixed !important; /* Breaks the dropdown out of the hidden header */
        top: 130px !important; 
        left: 5% !important; 
        right: 5% !important; 
        width: 90% !important; 
        max-height: 70vh !important; 
        z-index: 999999 !important; 
    }
}

/* ========================================================
   21. SHORTCODE CONTAINER EXPANSION & RESTORATION
   ======================================================== */

/* 1. Restore the clean white card backgrounds and borders to ALL plugin containers */
.uhs-season-wrapper,
.uhs-directory-container,
.uhs-profile-wrap,
.uhs-season-wrap,
.uhs-boxscore-outer-wrap {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    /* Centers the card and gives it bottom breathing room */
    margin: 0 auto 35px auto !important;
    /* Caps the width so it doesn't stretch awkwardly on ultra-wide screens */
    max-width: 1250px !important; 
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 2. The Season Wrapper uses edge-to-edge flush headers, so it gets 0 padding */
.uhs-season-wrapper {
    padding: 0 !important;
    overflow: hidden !important;
}

/* 3. The Profile, Directory, and Boxscore wrappers get generous inner padding */
.uhs-profile-wrap,
.uhs-directory-container,
.uhs-season-wrap,
.uhs-boxscore-outer-wrap {
    padding: 40px 50px !important; 
}

/* 4. Ensure inner body blocks of edge-to-edge shortcodes (Record Book) breathe well */
.uhs-rb-body,
.uhr-body-container,
.uhs-tracker-body {
    padding: 30px 40px !important; 
}

/* 5. Mobile padding adjustments to prevent squishing on phones */
@media (max-width: 768px) {
    .uhs-profile-wrap,
    .uhs-directory-container,
    .uhs-season-wrap,
    .uhs-boxscore-outer-wrap {
        padding: 20px 15px !important;
        border-radius: 6px !important;
    }
    .uhs-rb-body,
    .uhr-body-container,
    .uhs-tracker-body {
        padding: 20px 10px !important;
    }
}

/* ========================================================
   23. UNIFIED SHORTCODE HEADER TYPOGRAPHY
   ======================================================== */
.uhs-season-header-bar {
    padding: 25px 35px !important;
}

/* Master Shortcode Title (Giant, Arial Black) */
.uhs-season-header-bar h2,
.uhs-season-header-bar .uhs-season-title {
    font-family: 'Arial Black', 'Impact', sans-serif !important;
    font-size: 2.6rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: 1px !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    margin: 0 0 10px 0 !important;
    padding-bottom: 12px !important;
    /* The crisp white separator line */
    border-bottom: 1px solid rgba(255, 255, 255, 0.7) !important;
}

/* Master Shortcode Subtitle */
.uhs-season-header-bar .uhs-season-title + div {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin-top: 0 !important;
}

/* Ensure mobile header fonts shrink gracefully */
@media (max-width: 768px) {
    .uhs-season-header-bar h2,
    .uhs-season-header-bar .uhs-season-title {
        font-size: 1.8rem !important;
    }
    .uhs-season-header-bar .uhs-season-title + div {
        font-size: 0.85rem !important;
    }
}

/* ========================================================
   24. DYNAMIC HOVER CONTROLS
   ======================================================== */

/* Wire custom menu hover colors */
.desktop-nav a:hover, 
.desktop-nav li:hover > a,
.post-nav-links a:hover,
.footer-links a:hover {
    color: var(--uhs-hover-color) !important;
}

.desktop-nav ul ul li a:hover {
    background: var(--uhs-hover-color) !important;
    color: #ffffff !important;
}

/* Wire custom table hover colors */
.uhs-premium-table tbody tr:hover td,
.focus-widget-override table tr:hover td {
    background-color: var(--uhs-table-hover) !important;
    border-bottom-color: rgba(0,0,0,0.5) !important;
    color: #ffffff !important;
}

/* ========================================================
   OMNI SEARCH: DOUBLE BOX & MOBILE FIXES
   ======================================================== */
/* Force the header omni-search to override the plugin's aggressive CSS */
.uhs-site-header .uhs-omni-wrapper {
    background: rgba(255,255,255,0.12) !important;
    border: 1px solid rgba(255,255,255,0.25) !important;
    border-radius: 25px !important;
    height: 38px !important;
    padding: 0 15px !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important; /* Keeps magnifying glass on the same line */
}

.uhs-site-header .uhs-omni-input,
.uhs-site-header .uhs-omni-input:focus,
.uhs-site-header .uhs-omni-input:-webkit-autofill,
.uhs-site-header .uhs-omni-input:-webkit-autofill:focus {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 0.9rem !important;
    padding: 0 !important;
    box-shadow: none !important;
    height: 100% !important;
    line-height: normal !important;
    flex: 1 !important; /* Allows input to take up space without pushing the icon */
    width: 100% !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    -webkit-text-fill-color: inherit !important;
    transition: background-color 5000s ease-in-out 0s !important; /* Fixes autofill white box */
}

.uhs-site-header .omni-submit-icon {
    flex-shrink: 0 !important; /* Stops the magnifying glass from getting squished */
    margin-left: 8px !important;
    display: inline-block !important;
}

.uhs-site-header .uhs-omni-wrapper:focus-within {
    background: #ffffff !important;
    border-color: var(--uhs-brand-gold, #d4af37) !important;
}

.uhs-site-header .uhs-omni-wrapper:focus-within .uhs-omni-input {
    color: #1a202c !important;
    -webkit-text-fill-color: #1a202c !important;
}

@media (max-width: 768px) {
    .uhs-site-header .uhs-omni-input { 
        font-size: 16px !important; /* Stops iOS Auto-Zoom */
    }
    .uhs-site-header .uhs-omni-results { 
        position: fixed !important; /* Breaks out of the hidden header trap */
        top: 210px !important; /* Drops results safely below the mobile search bar */
        left: 5% !important; 
        right: 5% !important; 
        width: 90% !important; 
        max-height: 60vh !important; 
        z-index: 999999 !important; 
    }
}

/* ========================================================
   MASTERCLASS POLISH: 10/10 REFINEMENTS
   ======================================================== */

/* 1. Visual Alignment of the Hero Banners (Top Section) */
.uhs-dashboard-grid {
    align-items: stretch !important;
}
.uhs-rail-left, 
.uhs-center-hero, 
.uhs-rail-right {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.uhs-rail-left .uhs-card, 
.uhs-center-hero .uhs-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 0 !important;
}
.uhs-center-hero .hero-image-link {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.uhs-center-hero .hero-image {
    flex-grow: 1;
}
/* Ensure the right column stretches to match the center hero */
.uhs-rail-right {
    gap: 25px; /* Matches the grid gap */
    justify-content: space-between;
}
.uhs-rail-right .widget-card {
    margin-bottom: 0 !important;
}
.uhs-rail-right .widget-card:first-child {
    flex-grow: 1; /* Pushes the bottom widget perfectly flush */
}

/* 2. Typography & Label Contrast in Sidebar Widgets */
/* For dark background cards: Use crisp off-white */
.ms-mark, 
.ms-needs, 
.ticker-status {
    color: #f1f5f9 !important;
    font-weight: 700 !important;
}
/* For light background cards: Use high-contrast dark text */
.hc-player span, 
.home-leader-table th, 
.uhs-spotlight-meta, 
.uhs-bubble-label,
.uhs-leader-label {
    color: #1a202c !important;
    font-weight: 800 !important;
}

/* 3. Iconography for the Top Navigation Dropdowns */
.desktop-nav ul ul li a {
    display: flex !important;
    align-items: center !important;
}
.desktop-nav ul ul li a::before {
    content: '→';
    margin-right: 8px;
    color: var(--uhs-brand-gold, #d4af37);
    opacity: 0.4;
    font-weight: 900;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.desktop-nav ul ul li a:hover::before {
    opacity: 1;
    transform: translateX(4px);
}

/* 4. Spacing on the Analytics & Archive Hub Bar */
.uhs-hub-links-grid {
    gap: 12px !important;
}
.hub-btn {
    padding: 12px 18px !important;
    justify-content: center !important;
}