
/* ============================================================
   STICKY SIDEBAR
   Works on top of ACE's own sidebar positioning.
   Desktop: sidebar sticks to the top and scrolls internally.
   Mobile: sidebar slides in/out as normal (ACE handles this).
============================================================ */
@media (min-width: 768px) {
    #sidebar.sidebar {
        position: fixed !important;
        top: 0;
        bottom: 0;
        left: 0;
        height: 100vh !important;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 1030;
        /* Smooth scrollbar on webkit */
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.2) transparent;
    }
    #sidebar.sidebar::-webkit-scrollbar {
        width: 4px;
    }
    #sidebar.sidebar::-webkit-scrollbar-track {
        background: transparent;
    }
    #sidebar.sidebar::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.2);
        border-radius: 4px;
    }
    /* Push main content right to account for fixed sidebar */
    .main-container > .main-content {
        margin-left: 190px;
        transition: margin-left 0.2s ease;
    }
    /* When sidebar is collapsed (ACE adds .sidebar-collapse class) */
    .main-container.sidebar-collapse > .main-content {
        margin-left: 43px;
    }
}

/* ============================================================
   HERO BAR — today's date + live pulse
============================================================ */
.index-hero {
    background: linear-gradient(135deg, #0d1b2a 0%, #1a3a5c 60%, #0d1b2a 100%);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.25);
}
.index-hero .hero-left h2 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 3px;
}
.index-hero .hero-left p {
    color: rgba(255,255,255,0.6);
    font-size: 0.82rem;
    margin: 0;
}
.index-hero .hero-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;          /* the right group hugs its content */
    width: auto;
}
.index-hero .hero-clock {
    text-align: right;
    color: rgba(255,255,255,0.75);
    font-size: 0.82rem;
}
.index-hero .hero-clock span {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
}
.live-pill {
    display: inline-flex !important;   /* shrink to content, defeat framework overrides */
    width: auto !important;
    max-width: max-content !important;
    align-items: center;
    gap: 6px;
    background: rgba(233,30,99,0.15);
    border: 1px solid rgba(233,30,99,0.5);
    border-radius: 20px;
    padding: 5px 12px;
    color: #f48fb1;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    flex: 0 0 auto !important;          /* never grow inside the hero flexbox */
    align-self: center;
}
.live-pill .pulse-dot {
    width: 8px;
    height: 8px;
    background: #e91e63;
    border-radius: 50%;
    animation: pulseDot 1.4s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes pulseDot {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%       { transform: scale(1.5); opacity: 0.5; }
}

/* ============================================================
   TAB STRIP
============================================================ */
.index-tabs > .nav-tabs {
    border-bottom: 2px solid #dde3ec;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    display: flex;
}
.index-tabs > .nav-tabs::-webkit-scrollbar { display: none; }

.index-tabs > .nav-tabs > li > a {
    white-space: nowrap;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    color: #666;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 10px 16px;
    background: transparent !important;
    border-radius: 0 !important;
    transition: color 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.index-tabs > .nav-tabs > li.active > a,
.index-tabs > .nav-tabs > li > a:hover {
    color: #1a3a5c !important;
    border-bottom-color: #1a3a5c !important;
}
/* Heartbeat notify badge stays */
.index-tabs .notify {
    position: relative;
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 4px;
}
.index-tabs .heartbit {
    position: absolute;
    top: -5px; left: -5px;
    width: 22px; height: 22px;
    border: 3px solid #e91e63;
    border-radius: 50%;
    animation: heartbeat 1s ease-out infinite;
}
.index-tabs .point {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #e91e63;
    position: absolute;
    top: 0; left: 0;
}
@keyframes heartbeat {
    0%   { transform: scale(0); opacity: 0; }
    50%  { opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* Tab pane */
.index-tabs .tab-content .tab-pane {
    padding: 14px 0 0;
}
.tab-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 9px 14px;
    background: #f4f7fb;
    border-left: 4px solid #1a3a5c;
    border-radius: 4px;
    margin-bottom: 12px;
}
.tab-section-header h5 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a3a5c;
}
/* Inline live indicator inside the Livescores section header.
   Inline-flex within an <h5> — it can never stretch the layout. */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #e91e63;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    padding: 4px 12px;
    border-radius: 999px;
    box-shadow: 0 0 8px rgba(233,30,99,0.5);
    animation: liveGlow 1.4s ease-in-out infinite alternate;
}
.live-indicator-dot {
    width: 7px;
    height: 7px;
    background: #fff;
    border-radius: 50%;
    animation: pulseDot 1.2s ease-in-out infinite;
}
.tab-section-header .tab-meta {
    font-size: 0.78rem;
    color: #999;
}

/* ============================================================
   SKELETON LOADER
============================================================ */
.skeleton-wrap { padding: 8px 0; }
.skeleton-block { margin-bottom: 12px; }
.skeleton-line {
    height: 11px;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 6px;
    margin-bottom: 7px;
}
.skeleton-line.long   { width: 82%; }
.skeleton-line.medium { width: 58%; }
.skeleton-line.short  { width: 36%; }
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   UPDATING INDICATOR
============================================================ */
#updating-indicator {
    position: fixed;
    bottom: 18px;
    right: 18px;
    background: #1a3a5c;
    color: #fff;
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    display: none;
    z-index: 9999;
    box-shadow: 0 3px 14px rgba(0,0,0,0.25);
    align-items: center;
    gap: 8px;
}
#updating-indicator .spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes liveGlow {
    from { box-shadow: 0 0 6px  rgba(233,30,99,0.4); }
    to   { box-shadow: 0 0 18px rgba(233,30,99,0.9); }
}

/* ============================================================
   PRIMARY SITE MENU (Home / About / Contact)
   Desktop: inline horizontal links in the navbar.
   Mobile:  collapses into a dropdown under a hamburger.
============================================================ */
.site-menu-toggle {
    display: none;               /* hidden on desktop */
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    padding: 0 12px;
    height: 45px;
    cursor: pointer;
    float: left;
}
.site-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    float: left;
    display: flex;
    height: 45px;
}
.site-menu > li { display: flex; }
.site-menu > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 45px;
    padding: 0 16px;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.site-menu > li > a:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.site-menu > li > a i { font-size: 0.95rem; }

@media (max-width: 767px) {
    .site-menu-toggle { display: block; }
    .site-menu {
        display: none;
        position: absolute;
        top: 45px;
        left: 0;
        right: 0;
        flex-direction: column;
        height: auto;
        background: #2b3542;
        box-shadow: 0 6px 16px rgba(0,0,0,0.3);
        z-index: 1040;
    }
    .site-menu.open { display: flex; }
    .site-menu > li { width: 100%; }
    .site-menu > li > a {
        width: 100%;
        height: auto;
        padding: 13px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
}

/* ============================================================
   MOBILE
============================================================ */
@media (max-width: 767px) {
    .index-hero { padding: 12px 14px; }
    .index-hero .hero-right { display: none; }

    /* Keep fixed helpers compact and clear of each other on phones */
    #updating-indicator { bottom: 12px; right: 12px; padding: 6px 12px; font-size: 0.72rem; }

    /* Tighten hero so the livescores table gets more room */
    .index-hero .hero-left h2 { font-size: 1.05rem; }

    /* ── Mobile tabs — full-width, readable, no zoom needed ──
       The four tabs share the row equally (no horizontal scroll),
       with the icon stacked above the label so each is a clear,
       tappable block instead of a cramped inline link. */
    .index-tabs > .nav-tabs {
        overflow-x: visible;        /* no sideways scroll on mobile */
    }
    .index-tabs > .nav-tabs > li {
        flex: 1 1 0;                /* equal width, fill the row */
        text-align: center;
        float: none;
    }
    .index-tabs > .nav-tabs > li > a {
        flex-direction: column;     /* icon over text */
        gap: 3px;
        padding: 9px 4px;
        font-size: 0.72rem;
        line-height: 1.1;
        justify-content: center;
        white-space: normal;        /* allow 'Livescores' to fit */
        border-bottom-width: 3px !important;
    }
    .index-tabs > .nav-tabs > li > a i {
        font-size: 1rem;            /* larger, clearer icon */
        margin: 0;
    }
    /* Keep the live "notify" dot from pushing the label around */
    .index-tabs .notify {
        position: absolute;
        top: 6px;
        right: 50%;
        margin-right: -22px;
        width: 8px; height: 8px;
    }
    .index-tabs .heartbit { width: 16px; height: 16px; top: -4px; left: -4px; border-width: 2px; }
    .index-tabs .point { width: 6px; height: 6px; }
    .index-tabs > .nav-tabs > li > a { position: relative; }

    /* Reclaim wasted horizontal space — ACE's default gutters are wide
       for phones, which forces content narrow and invites zooming. */
    .page-content { padding-left: 8px !important; padding-right: 8px !important; }
    .main-content-inner { padding: 0 !important; }

    /* Compact welcome banner so it doesn't dominate the first screen */
    .welcome-alert { font-size: 0.85rem; padding: 9px 12px; }
    .welcome-alert img { height: 14px; }

    /* Section headers sit tighter and wrap cleanly */
    .tab-section-header { padding: 8px 10px; }
    .tab-section-header .tab-meta { font-size: 0.72rem; }
}

/* ── Ad banners ────────────────────────────────────────
   Responsive ad slots. The placeholder styling shows only
   until real ad code replaces the inner block; live ad
   creatives sit centred and never overflow the container. */
.ad-banner {
    margin: 14px 0;
    display: flex;
    justify-content: center;
}
.ad-slot {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ad-slot img,
.ad-slot ins,
.ad-slot iframe { max-width: 100%; height: auto; }
.ad-placeholder {
    width: 100%;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #c7d0dd;
    border-radius: 8px;
    background:
        repeating-linear-gradient(45deg, #f4f7fb, #f4f7fb 12px, #eef2f8 12px, #eef2f8 24px);
    color: #8a97a8;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    text-align: center;
    padding: 10px;
}
@media (max-width: 767px) {
    .ad-banner { margin: 10px 0; }
    .ad-slot, .ad-placeholder { min-height: 60px; }   /* mobile-friendly height */
}

/* ── Welcome alert ─────────────────────────────────── */
.welcome-alert {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.95rem;
    border-radius: 8px;
    /* Blends with the page's navy hero theme, solid enough that the
       message never looks faint (overrides ACE's pale alert-success). */
    background: linear-gradient(135deg, #0d1b2a 0%, #1a3a5c 60%, #0d1b2a 100%) !important;
    border: 1px solid #0d1b2a !important;
    color: #ffffff !important;
    padding: 12px 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.welcome-alert,
.welcome-alert strong,
.welcome-alert .welcome-guest {
    color: #ffffff !important;   /* bright text on the navy */
}
/* Keep the "360 Football" name in the brand green for a pop of accent */
.welcome-alert .green { color: #35d07f !important; }
.welcome-alert .fa-futbol-o { color: #35d07f !important; }
.welcome-alert .close {
    color: #ffffff !important;
    opacity: 0.85;
    text-shadow: none;
}
.welcome-alert .close:hover { opacity: 1; }
.welcome-alert .welcome-guest { display: inline-flex; align-items: center; gap: 6px; }
.welcome-alert img { margin: 0 2px; }