/* =====================================================================
   MODERN THEME — "Bento" + Liga Portugal-style navigation (Benfica colours)

   Imports the default theme stylesheet first so ALL shared base styling
   (hero / match centre / season overview / widgets / forum / responsive sidebar
   columns) is preserved, then layers the cloned three-tier navigation, the bento
   grid and the Sport Lisboa e Benfica palette on top.

   NOTE: header.php ALSO loads this same default stylesheet via a render-blocking
   <link> placed BEFORE this file (the fast path that avoids the @import "waterfall"
   landing after first paint). This @import is kept as a guaranteed fallback so the
   base styles can never go missing if the PHP/<link> change hasn't been picked up
   yet (e.g. OPcache still serving an older header). The two paths produce the same
   cascade (default first, modern on top); the duplicate fetch is harmless.
   ===================================================================== */
@import url("../../default/css/style.css");

/* ===== Sport Lisboa e Benfica palette ===== */
:root {
    --team-primary: #C8102E;            /* SLB official red (Pantone 186 C) */
    --team-primary-rgb: 200, 16, 46;
    --team-secondary: #3d0008;          /* deep maroon */
    --team-secondary-rgb: 61, 0, 8;
    --team-accent: #ffffff;
    --benfica-red-bright: #E30613;
    --benfica-gold: #F4B223;            /* eagle gold accent */
    --benfica-gold-rgb: 244, 178, 35;

    /* Deep-red navigation surfaces — harmonises with the hero (same Benfica
       red family) but uses darker shades + a vertical gradient so the two
       sections read as related, not identical. */
    --lp-nav-bg: linear-gradient(180deg, #e8112c 0%, #cc1029 100%);  /* bright Benfica red primary bar */
    --lp-nav-solid: #d6102a;
    --lp-strip-bg: #be0f25;      /* crest strip (slightly deeper for hierarchy) */
    --lp-subnav-bg: #c50f27;     /* secondary bar */
    --lp-ink: #ffffff;           /* white text on red */
    --lp-ink-dim: rgba(255, 255, 255, 0.74);
    --lp-line: rgba(255, 255, 255, 0.14);

    --t: 0.25s;
}

html, body, * { -ms-overflow-style: none; scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, *::-webkit-scrollbar { display: none; width: 0; height: 0; background: transparent; }

/* Pull-to-refresh stays enabled (overscroll left on the document). The page
   canvas is the nav's red so overscrolling at the very top reveals red under the
   gold border instead of a white gap. */
html { background-color: #e8112c !important; }
html, body { overscroll-behavior-y: none; }

body {
    background:
        radial-gradient(1200px 600px at 100% -10%, rgba(var(--team-primary-rgb), 0.06), transparent 60%),
        var(--bs-body-bg);
}

/* =====================================================================
   NAVIGATION — three-tier clone
   ===================================================================== */
/* Force tier order with flexbox so the app's nav JS (which makes the first
   <nav> sticky) can never push the crest strip out of place. */
.lp-nav { position: relative; z-index: 1030; display: flex; flex-direction: column; }
.lp-nav > .lp-topstrip { order: 0; }
.lp-nav > .lp-primary  { order: 1; }
.lp-nav > .lp-subnav   { order: 2; }
.lp-nav > .lp-drawer   { order: 3; }
.lp-nav.lp-sticky { position: sticky; top: 0; }
/* Neutralise the inline red background the nav JS sets on the container */
/* Only strip the container background when OUR modern nav (.lp-nav) is inside it
   to provide its own colour. Pages that reuse #navigation-container with a plain
   navbar (e.g. maintenance.php) must keep the default red background, otherwise
   the white brand text + buttons become invisible on a white page. */
#navigation-container:has(.lp-nav) { background: transparent !important; }
#navigation-container:has(#maintenance-nav), #navigation-container:has(#error-nav) { background: var(--team-primary) !important; }

/* Standalone pages (error.php / maintenance.php) use <body class="p-0"> but
   have NO fixed navbar at the top — the red bar sits BELOW the hero. The
   default theme's `body.p-0 { padding-top: var(--navbar-height) }` is meant to
   offset a fixed nav, so here it only adds a blank ~65px strip above the hero.
   Zero it. (The default rule has equal specificity but comes earlier via the
   @import, so this later rule wins. On the normal site the nav's inline JS sets
   body padding via an inline style, which still overrides this.) */
body.p-0:not(:has(.lp-nav)) { padding-top: 0 !important; }

/* ---- TIER 0: crest strip (deep red) ---- */
.lp-topstrip { background: var(--lp-strip-bg); border-bottom: 1px solid var(--lp-line); position: relative; z-index: 1050; }
.lp-topstrip-inner { display: flex; align-items: center; gap: 0.85rem; padding: 0.3rem 0.9rem; }
.lp-topstrip-label {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.45rem;
    color: var(--lp-ink); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.13em;
    text-transform: uppercase; text-decoration: none;
    padding-right: 0.85rem; border-right: 1px solid var(--lp-line);
}
.lp-topstrip-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--benfica-gold); box-shadow: 0 0 0 3px rgba(var(--benfica-gold-rgb), 0.25); }
.lp-topstrip-label i { font-size: 0.7rem; opacity: 0.8; }

/* Season name acts as a dropdown but looks like plain text */
.lp-season-dd { position: relative; flex: 0 0 auto; }
.lp-season-toggle {
    background: transparent !important; border: 0 !important;
    border-right: 1px solid var(--benfica-gold) !important;
    box-shadow: none !important; cursor: pointer; line-height: 1.4;
}
.lp-season-toggle::after { display: none !important; }
.lp-season-caret { font-size: 0.55rem !important; opacity: 0.85; margin-left: 0.15rem; }
.dropdown-menu.lp-season-menu {
    min-width: 142px !important; width: max-content !important; max-width: 200px; max-height: 60vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(0, 0, 0, 0.06) !important; border-radius: 0.8rem !important; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18) !important; padding: 0.25rem !important; z-index: 2000 !important;
    font-size: 0.76rem;
}
/* Don't let the crest strip / nav wrappers clip the open season dropdown */
.lp-topstrip, .lp-topstrip-inner, .lp-season-dd { overflow: visible !important; }
.dropdown-menu.lp-season-menu .dropdown-item {
    border: 0; background: transparent; width: 100%; text-align: left; cursor: pointer;
    border-radius: 0.5rem !important; font-size: 0.76rem !important; font-weight: 600; letter-spacing: 0.01em; padding: 0.32rem 0.6rem !important; color: var(--bs-body-color);
    transition: background var(--t), color var(--t); line-height: 1.25;
}
.lp-season-menu .dropdown-item:hover { background: rgba(var(--team-primary-rgb), 0.10); }
.lp-season-menu .dropdown-item.active { background: var(--team-primary); color: #fff; }

/* Season switcher relocated into the secondary bar (leads the NEWS ... row). */
.lp-season-li { display: inline-flex !important; align-items: center; }
.lp-season-sub { overflow: visible !important; }
.lp-season-sub .lp-season-toggle {
    border-right: 0 !important;
    display: inline-flex; align-items: center; gap: 0.4rem;
    color: var(--lp-ink); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em;
    text-transform: uppercase; padding: 0.65rem 0.85rem 0.65rem 0.4rem; line-height: 1;
    transition: color var(--t);
}
.lp-season-sub .lp-season-toggle:hover { color: #fff; }
.lp-season-sub .lp-season-ico,
.lp-season-sub .lp-season-caret { color: var(--benfica-gold); }

/* Secondary bar on mobile: keep the season switcher + editorial links on one
   swipeable row; the institutional links live in the drawer instead. */
@media (max-width: 1199.98px) {
    .lp-subnav-inner { justify-content: flex-start !important; gap: 0 !important; padding: 0 0.5rem !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
    .lp-subnav-left { flex-wrap: nowrap !important; }
    .lp-subnav-left > li { flex: 0 0 auto !important; }
    .lp-subnav-right { display: none !important; }
    .lp-sublink { padding: 0.55rem 0.6rem !important; white-space: nowrap; }
    .lp-season-sub .lp-season-toggle { padding: 0.55rem 0.6rem 0.55rem 0.3rem !important; white-space: nowrap; }
}
.lp-crest-track { display: flex; align-items: center; gap: 0.3rem; overflow-x: auto; flex: 0 1 auto; }
.lp-crest {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%; color: var(--lp-ink-dim);
    background: rgba(255, 255, 255, 0.06); text-decoration: none;
    transition: transform var(--t), background var(--t), color var(--t);
}
.lp-crest:hover { transform: translateY(-2px) scale(1.08); background: rgba(255, 255, 255, 0.18); color: #fff; }
.lp-crest img { width: 22px; height: 22px; object-fit: contain; }
.lp-crest i { font-size: 0.95rem; }
.lp-crest-next {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; color: var(--benfica-gold);
    background: transparent; text-decoration: none; font-size: 1rem; transition: color var(--t);
}
.lp-crest-next:hover { color: #ffd86b; background: transparent; }

/* Competition chips (icon + name) in the top strip */
.lp-crest.lp-comp { width: auto; height: auto; padding: 0.12rem 0.6rem 0.12rem 0.18rem; border-radius: 999px; gap: 0.4rem; }
.lp-comp .lp-comp-icon { width: 22px !important; height: 22px !important; border-radius: 50%; object-fit: contain; flex: 0 0 auto; }
.lp-comp-name { font-size: 0.7rem; font-weight: 700; white-space: nowrap; color: var(--lp-ink-dim); letter-spacing: 0.02em; }
.lp-crest.lp-comp:hover { transform: translateY(-1px); }
.lp-crest.lp-comp:hover .lp-comp-name { color: #fff; }

/* ---- TIER 1: primary bar (deep red) ---- */
.lp-primary { background: var(--lp-nav-bg); box-shadow: 0 2px 14px rgba(0, 0, 0, 0.20); }
/* Keep the nav fully visible when sticky (disable the app's hide-on-scroll) */
.lp-primary.hidden, #main-nav.hidden { transform: none !important; }
.lp-primary-inner { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.9rem; min-height: 60px; flex-wrap: nowrap; }
/* The default theme sets overflow-x:clip on #navigation-container, which forces
   vertical clipping too and cuts the logo badge. Allow the nav to overflow. */
#navigation-container:has(.lp-nav), .lp-nav, .lp-primary, .lp-primary-inner { overflow: visible !important; }

.lp-burger { width: 40px; height: 40px; border: 1px solid var(--lp-line); border-radius: 0.6rem; background: rgba(255, 255, 255, 0.10); color: #fff; flex: 0 0 auto; }

/* ===== Reusable "SLBenfica.net" wordmark logo =====
   Drop <a class="slb-logo"> (or any element) anywhere. It adapts to the active
   theme automatically (the wordmark follows the theme text colour, the eagle is
   Benfica red, ".net" is gold) and scales fluidly with clamp() for any screen.
   On the red nav bar it is forced to white/gold (see the .lp-brand block). */
.slb-logo { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; line-height: 1; white-space: nowrap; }
.slb-logo-mark { flex: 0 0 auto; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 0.6rem; background: rgba(var(--team-primary-rgb), 0.10); box-shadow: inset 0 0 0 1px rgba(var(--team-primary-rgb), 0.30); transition: transform var(--t), box-shadow var(--t); }
.slb-logo:hover .slb-logo-mark { transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(var(--team-primary-rgb), 0.55), 0 4px 12px rgba(0, 0, 0, 0.15); }
.slb-logo-mark i { font-size: 1.7rem !important; color: var(--team-primary); line-height: 1; }
.slb-logo-text { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; transition: transform var(--t); }
.slb-logo-word { position: relative; font-weight: 800; letter-spacing: -0.025em; font-size: clamp(1.15rem, 3.9vw, 1.5rem); color: var(--bs-body-color); transition: text-shadow var(--t); }
.slb-logo-tag { margin-top: 4px; font-size: 0.42rem; font-weight: 700; font-style: italic; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bs-secondary-color); white-space: nowrap; line-height: 1; }
.slb-logo:hover .slb-logo-text { transform: translateY(-1px); }
.slb-logo:hover .slb-logo-word { text-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
.slb-logo-net { color: var(--benfica-gold); font-weight: 900; text-transform: none; }
.slb-logo-word::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--team-primary), var(--benfica-gold)); }

/* On the red primary bar the logo is always white + gold, regardless of theme. */
.lp-brand.slb-logo { color: #fff; }
.lp-brand.slb-logo .slb-logo-word { color: #fff; }
.lp-brand.slb-logo .slb-logo-mark { background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)); box-shadow: inset 0 0 0 1px rgba(var(--benfica-gold-rgb), 0.55); }
.lp-brand.slb-logo .slb-logo-mark i { color: #fff; }
.lp-brand.slb-logo .slb-logo-tag { color: rgba(255, 255, 255, 0.8); }
.lp-brand.slb-logo:hover .slb-logo-mark { box-shadow: inset 0 0 0 1px rgba(var(--benfica-gold-rgb), 0.85), 0 4px 12px rgba(0, 0, 0, 0.25); }

/* Standalone navs (error / maintenance / legal pages) reuse the .slb-logo brand.
   These live in the (cache-busted) theme CSS so they apply without waiting on PHP
   OPcache: restore the main-nav hover shadow that the pages' inline #id box-shadow
   would otherwise win over, and kill the default anchor underline on hover. */
#error-nav .slb-logo:hover .slb-logo-mark,
#maintenance-nav .slb-logo:hover .slb-logo-mark,
#legal-nav .slb-logo:hover .slb-logo-mark { box-shadow: inset 0 0 0 1px rgba(var(--benfica-gold-rgb), 0.85), 0 4px 12px rgba(0, 0, 0, 0.25) !important; transform: translateY(-1px); }
#error-nav .slb-logo:hover .slb-logo-text,
#maintenance-nav .slb-logo:hover .slb-logo-text,
#legal-nav .slb-logo:hover .slb-logo-text { transform: translateY(-1px); }
#error-nav .slb-logo:hover .slb-logo-word,
#maintenance-nav .slb-logo:hover .slb-logo-word,
#legal-nav .slb-logo:hover .slb-logo-word { text-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
#error-nav a.slb-logo, #error-nav a.slb-logo:hover, #error-nav a.slb-logo:focus, #error-nav a.slb-logo:active,
#maintenance-nav a.slb-logo, #maintenance-nav a.slb-logo:hover, #maintenance-nav a.slb-logo:focus, #maintenance-nav a.slb-logo:active,
#legal-nav a.slb-logo, #legal-nav a.slb-logo:hover, #legal-nav a.slb-logo:focus, #legal-nav a.slb-logo:active { text-decoration: none !important; }

/* Grouped pill tabs */
.lp-tabgroup {
    display: flex; align-items: center; gap: 0.15rem;
    margin-left: 0.9rem; padding: 0.25rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--lp-line);
    border-radius: 999px;
}
.lp-tab {
    display: inline-flex; align-items: center; white-space: nowrap;
    color: var(--lp-ink-dim) !important; font-weight: 700; font-size: 0.82rem;
    padding: 0.45rem 0.95rem; border-radius: 999px; text-decoration: none;
    transition: color var(--t), background var(--t);
}
.lp-tab:hover { color: #fff !important; background: rgba(255, 255, 255, 0.10); }
.lp-tab.active { color: #2e0509 !important; background: var(--benfica-gold); box-shadow: 0 2px 8px rgba(var(--benfica-gold-rgb), 0.35); }
.lp-tab i { color: var(--benfica-gold); }
.lp-tab:hover i { color: var(--benfica-gold); }

/* ---- Mega-menu under the Matches tab (desktop) ---- */
.lp-tab-mega-wrap { position: relative; display: inline-flex; }
/* invisible bridge so the menu stays open while crossing the gap */
.lp-tab-mega-wrap::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.lp-tab-has-mega .lp-tab-mega-caret { font-size: 0.55rem; margin-left: 0.4rem; opacity: 0.85; transition: transform var(--t); }
.lp-tab-mega-wrap:hover .lp-tab-mega-caret { transform: rotate(180deg); }
.lp-mega {
    position: absolute; top: calc(100% + 10px); left: 0; z-index: 2500;
    display: none; grid-template-columns: 1fr 212px;
    min-width: 620px; max-width: 92vw;
    background: #fff; border-radius: 1rem; overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    opacity: 0; transform: translateY(6px); transition: opacity var(--t), transform var(--t);
}
.lp-tab-mega-wrap:hover .lp-mega, .lp-tab-mega-wrap:focus-within .lp-mega { display: grid; opacity: 1; transform: translateY(0); }
.lp-mega-main { padding: 1rem 1.1rem; min-width: 0; }
.lp-mega-title { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--team-primary); margin-bottom: 0.65rem; display: flex; align-items: center; gap: 0.4rem; }
.lp-mega-teams { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.1rem 0.4rem; max-height: 320px; overflow-y: auto; }
.lp-mega-team { display: flex; align-items: center; gap: 0.5rem; min-width: 0; padding: 0.4rem 0.5rem; border-radius: 0.5rem; color: var(--bs-body-color); text-decoration: none; font-size: 0.82rem; font-weight: 600; transition: background var(--t), color var(--t); }
.lp-mega-team:hover { background: rgba(var(--team-primary-rgb), 0.08); color: var(--team-primary); }
.lp-mega-team img, .lp-mega-team-logo { width: 22px !important; height: 22px !important; object-fit: contain; flex: 0 0 auto; }
.lp-mega-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-mega-empty { color: #888; font-size: 0.85rem; padding: 0.5rem; grid-column: 1 / -1; }
.lp-mega-side { background: linear-gradient(180deg, var(--team-primary), var(--team-secondary)); padding: 0.85rem 0.55rem; display: flex; flex-direction: column; gap: 0.08rem; }
.lp-mega-link { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.65rem; border-radius: 0.55rem; color: #fff; text-decoration: none; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; transition: background var(--t); }
.lp-mega-link i { width: 1.1rem; text-align: center; color: var(--benfica-gold); flex: 0 0 auto; }
.lp-mega-link:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
[data-bs-theme="dark"] .lp-mega { background: var(--bs-body-bg); border-color: rgba(255, 255, 255, 0.08); }
/* Squad mega: players grouped by position (4 columns) */
.lp-mega--players { min-width: 720px; }
.lp-mega-squad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.3rem 0.85rem; max-height: 340px; overflow-y: auto; }
.lp-mega-pos { min-width: 0; }
.lp-mega-pos-h { display: flex; align-items: center; gap: 0.35rem; font-size: 0.61rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--bs-secondary-color, #6c757d); padding: 0.15rem 0.4rem 0.35rem; border-bottom: 1px solid rgba(0, 0, 0, 0.07); margin-bottom: 0.25rem; }
.lp-mega-pos-h i { color: var(--team-primary); font-size: 0.7rem; }
.lp-mega-player { display: flex; align-items: center; gap: 0.45rem; min-width: 0; padding: 0.28rem 0.45rem; border-radius: 0.5rem; color: var(--bs-body-color); text-decoration: none; font-size: 0.79rem; font-weight: 600; transition: background var(--t), color var(--t); }
.lp-mega-player:hover { background: rgba(var(--team-primary-rgb), 0.08); color: var(--team-primary); }
.lp-mega-num { flex: 0 0 auto; width: 1.4rem; text-align: center; font-size: 0.7rem; font-weight: 800; color: var(--team-primary); }
.lp-mega-pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Stats mega: category tiles (2 columns) */
.lp-mega--statcats { min-width: 560px; }
.lp-mega-statcats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.lp-mega-statcat { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.8rem; border-radius: 0.7rem; border: 1px solid rgba(0, 0, 0, 0.07); background: var(--bs-tertiary-bg, rgba(0, 0, 0, 0.02)); color: var(--bs-body-color); text-decoration: none; font-size: 0.85rem; font-weight: 700; transition: background var(--t), color var(--t), border-color var(--t), transform var(--t); }
.lp-mega-statcat i { color: var(--team-primary); font-size: 1rem; width: 1.4rem; text-align: center; flex: 0 0 auto; }
.lp-mega-statcat:hover { background: rgba(var(--team-primary-rgb), 0.08); color: var(--team-primary); border-color: rgba(var(--team-primary-rgb), 0.3); transform: translateY(-1px); }
[data-bs-theme="dark"] .lp-mega-pos-h { border-bottom-color: rgba(255, 255, 255, 0.08); }
[data-bs-theme="dark"] .lp-mega-statcat { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); }
/* Forum mega: category list (2 columns) */
.lp-mega--forum { min-width: 600px; }
.lp-mega-forum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem 0.5rem; max-height: 330px; overflow-y: auto; }
.lp-mega-cat { display: flex; align-items: center; gap: 0.6rem; min-width: 0; padding: 0.5rem 0.6rem; border-radius: 0.6rem; color: var(--bs-body-color); text-decoration: none; font-size: 0.84rem; font-weight: 600; transition: background var(--t), color var(--t); }
.lp-mega-cat i { color: var(--team-primary); font-size: 0.9rem; flex: 0 0 auto; width: 1.2rem; text-align: center; }
.lp-mega-cat:hover { background: rgba(var(--team-primary-rgb), 0.08); color: var(--team-primary); }
/* Show the full category name (wrap instead of truncating) */
.lp-mega-cat-name { flex: 1 1 auto; min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.lp-mega-cat-count { flex: 0 0 auto; font-size: 0.66rem; font-weight: 800; color: var(--bs-secondary-color, #6c757d); background: var(--bs-tertiary-bg, rgba(0, 0, 0, 0.06)); border-radius: 99px; padding: 0.05rem 0.5rem; }
[data-bs-theme="dark"] .lp-mega-cat-count { background: rgba(255, 255, 255, 0.08); }
/* Matches mega: recent results + next fixtures (2 columns) */
.lp-mega--matches { min-width: 600px; }
.lp-mega-matches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.3rem 1.2rem; max-height: 330px; overflow-y: auto; }
.lp-mega-subh { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--bs-secondary-color, #6c757d); display: flex; align-items: center; gap: 0.4rem; padding: 0.15rem 0.4rem 0.4rem; border-bottom: 1px solid rgba(0, 0, 0, 0.07); margin-bottom: 0.25rem; }
.lp-mega-subh i { color: var(--team-primary); font-size: 0.7rem; }
.lp-mega-match { display: flex; align-items: center; gap: 0.5rem; min-width: 0; padding: 0.32rem 0.45rem; border-radius: 0.5rem; color: var(--bs-body-color); text-decoration: none; font-size: 0.8rem; font-weight: 600; transition: background var(--t), color var(--t); }
.lp-mega-match:hover { background: rgba(var(--team-primary-rgb), 0.08); color: var(--team-primary); }
.lp-mega-opp { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-mega-res { flex: 0 0 auto; width: 1.25rem; height: 1.25rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 0.35rem; font-size: 0.66rem; font-weight: 800; color: #fff; }
.lp-mega-res-W { background: #1a8a4a; }
.lp-mega-res-D { background: #9a7a00; }
.lp-mega-res-L { background: #b02a2a; }
.lp-mega-score { flex: 0 0 auto; font-weight: 800; font-size: 0.78rem; }
.lp-mega-vs { flex: 0 0 auto; width: 1.1rem; text-align: center; font-size: 0.7rem; font-weight: 800; color: var(--team-primary); }
.lp-mega-date { flex: 0 0 auto; font-size: 0.68rem; font-weight: 700; color: var(--bs-secondary-color, #6c757d); }
[data-bs-theme="dark"] .lp-mega-subh { border-bottom-color: rgba(255, 255, 255, 0.08); }

/* ---- Mobile drawer: expandable mega sections ---- */
.lp-drawer-mega { display: block; }
.lp-drawer-mega > summary { list-style: none; cursor: pointer; }
.lp-drawer-mega > summary::-webkit-details-marker { display: none; }
.lp-drawer-mega > summary::after { display: none !important; } /* hide the row chevron */
.lp-dmega-caret { margin-left: auto; font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); transition: transform var(--t); flex: 0 0 auto; }
.lp-drawer-mega[open] > summary .lp-dmega-caret { transform: rotate(180deg); }
.lp-drawer-mega-body { background: #fff; color: var(--bs-body-color); border-radius: 0.85rem; padding: 0.85rem 0.9rem; margin: 0.15rem 0.55rem 0.55rem; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05); }
.lp-dmega-open { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.74rem; font-weight: 800; color: var(--team-primary); text-decoration: none; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.7rem; }
.lp-drawer-mega-body .lp-mega-teams { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
.lp-drawer-mega-body .lp-mega-squad,
.lp-drawer-mega-body .lp-mega-matches,
.lp-drawer-mega-body .lp-mega-statcats,
.lp-drawer-mega-body .lp-mega-forum { grid-template-columns: 1fr; max-height: none; }
.lp-drawer-mega-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; margin-top: 0.75rem; }
.lp-drawer-mega-body .lp-mega-link { color: var(--team-primary); background: rgba(var(--team-primary-rgb), 0.07); text-transform: none; letter-spacing: 0; font-weight: 700; padding: 0.5rem 0.6rem; }
.lp-drawer-mega-body .lp-mega-link i { color: var(--team-primary); }
.lp-drawer-mega-body .lp-mega-link:hover { background: rgba(var(--team-primary-rgb), 0.14); color: var(--team-primary); }
[data-bs-theme="dark"] .lp-drawer-mega-body { background: var(--bs-body-bg); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
/* Icon-only quick bar for mega tabs at the top of the drawer */
.lp-dmega-bar { display: flex; gap: 0.5rem; padding: 0.1rem 0.05rem 0.7rem; }
.lp-dmega-ico { flex: 1 1 0; min-width: 0; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.06); border-radius: 0.75rem; color: #fff; text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem; padding: 0.55rem 0.25rem; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background var(--t), transform var(--t), border-color var(--t); }
.lp-dmega-ico i { font-size: 1.15rem; color: var(--benfica-gold); transition: color var(--t); }
.lp-dmega-lbl { font-size: 0.64rem; font-weight: 700; color: var(--bs-body-color); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-dmega-ico.active .lp-dmega-lbl { color: #2e0509; }
.lp-dmega-ico:hover { background: rgba(255, 255, 255, 0.12); }
.lp-dmega-ico:active { transform: scale(0.95); }
.lp-dmega-ico.active { background: var(--benfica-gold); border-color: var(--benfica-gold); }
.lp-dmega-ico.active i { color: #2e0509; }
.lp-dmega-panel[hidden] { display: none !important; }
.lp-dmega-panel { margin: 0 0.05rem 0.7rem !important; animation: lpDrawerIn 0.25s ease backwards; }

/* =====================================================================
   Reference-style drawer: profile header + clean light/dark body
   ===================================================================== */
.lp-drawer { background: var(--bs-body-bg) !important; border-bottom: 0 !important; padding: 0 !important; border-radius: 0 0 1.3rem 1.3rem; margin-top: 0; }
.lp-drawer-scroll { padding: 0 0.9rem 0.6rem !important; }
/* Header */
/* Drawer profile header mirrors the hero section: same diagonal red gradient,
   gold radial glow, and gold top accent. */
.lp-drawer-profile { position: relative; overflow: hidden; margin-top: -0.4px; background: linear-gradient(90deg, var(--benfica-gold), var(--team-primary)) bottom center / 100% 2px no-repeat, linear-gradient(135deg, #e8112c 0%, #9c0f18 52%, #33000a 100%); color: #fff; padding: 1.2rem 1.1rem 1.5rem; border-radius: 0; text-align: left; }
.lp-drawer-profile::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 120% at 90% 30%, rgba(var(--benfica-gold-rgb), 0.20), transparent 58%); pointer-events: none; z-index: 0; }
/* Gold hairline flush at the very top edge (no border-box gap, so it reads as a
   clean gold line rather than a washed-out 0.5px border). */
.lp-drawer-profile::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 0.6px; background: var(--benfica-gold); z-index: 3; }
.lp-drawer-profile > * { position: relative; z-index: 1; }
.lp-drawer-profile-row { display: flex; align-items: center; gap: 0.95rem; }
.lp-drawer-profile-info { min-width: 0; flex: 1 1 auto; }
.lp-drawer-avatar { width: 64px; height: 64px; flex: 0 0 auto; margin: 0; border-radius: 50%; overflow: hidden; border: 3px solid rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.12); display: flex; align-items: center; justify-content: center; }
.lp-drawer-avatar img { width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 50%; }
.lp-drawer-avatar-fallback { color: #fff; font-size: 1.6rem; }
.lp-drawer-name { font-weight: 800; font-size: 1.25rem; color: #fff; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-drawer-status { font-size: 0.82rem; color: rgba(255, 255, 255, 0.85); margin-top: 0.2rem; display: flex; align-items: center; gap: 0.35rem; }
.lp-drawer-status i { color: var(--benfica-gold); font-size: 0.75rem; }
.lp-drawer-viewprofile { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.55rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #fff; text-decoration: none; background: rgba(255, 255, 255, 0.16); padding: 0.32rem 0.75rem; border-radius: 999px; transition: background var(--t); }
.lp-drawer-viewprofile:hover { background: rgba(255, 255, 255, 0.3); color: #fff; }
.lp-drawer-stats { display: flex; gap: 0.5rem; margin-top: 1rem; }
.lp-drawer-stat { flex: 1 1 0; min-width: 0; text-align: center; background: rgba(255, 255, 255, 0.13); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 0.7rem; padding: 0.5rem 0.3rem; }
.lp-drawer-stat strong { display: block; font-size: 1.1rem; font-weight: 800; color: #fff; line-height: 1.1; }
.lp-drawer-stat span { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.72); }
/* Section headings — plain muted (drop the gold tick/line) */
.lp-drawer-heading { color: var(--bs-secondary-color, #8a8a8a) !important; padding: 1rem 0.5rem 0.45rem !important; }
.lp-drawer-heading::before, .lp-drawer-heading::after { display: none !important; }
/* List rows — clean, dark text, outline icons, no gold tile */
.lp-drawer-link { color: var(--bs-body-color) !important; background: transparent !important; border: 1px solid transparent !important; border-radius: 999px !important; padding: 0.7rem 0.9rem !important; transform: none !important; box-shadow: none !important; }
.lp-drawer-link::after { display: none !important; }
.lp-drawer-link > i:first-child { background: none !important; box-shadow: none !important; width: 1.6rem !important; height: auto !important; border-radius: 0 !important; color: var(--bs-body-color) !important; font-size: 1.15rem !important; transform: none !important; }
.lp-drawer-link:hover { background: rgba(var(--team-primary-rgb), 0.06) !important; color: var(--team-primary) !important; transform: none !important; }
.lp-drawer-link:hover > i:first-child { background: none !important; color: var(--team-primary) !important; transform: none !important; }
.lp-drawer-link.active { background: var(--bs-body-bg) !important; border-color: rgba(0, 0, 0, 0.06) !important; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09) !important; color: var(--team-primary) !important; }
.lp-drawer-link.active > i:first-child { color: var(--team-primary) !important; }
/* Sign out */
.lp-drawer-sep { height: 1px; background: var(--bs-border-color, rgba(0, 0, 0, 0.08)); margin: 0.55rem 0.5rem; list-style: none; }
.lp-drawer-signout, .lp-drawer-signout > i:first-child { color: #e23b4e !important; }
.lp-drawer-signout:hover { background: rgba(226, 59, 78, 0.08) !important; color: #e23b4e !important; }
.lp-drawer-signout:hover > i:first-child { color: #e23b4e !important; }
/* Bottom action buttons */
.lp-drawer-foot { display: flex; gap: 0.6rem; padding: 0.5rem 0.9rem 1.1rem; }
.lp-drawer-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.7rem 0.9rem; border-radius: 999px; font-weight: 700; font-size: 0.9rem; text-decoration: none; transition: background var(--t), color var(--t); }
.lp-drawer-btn-primary { background: var(--team-primary); color: #fff; }
.lp-drawer-btn-primary:hover { background: var(--team-secondary); color: #fff; }
.lp-drawer-btn-ghost { background: transparent; color: var(--bs-body-color); border: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.15)); }
.lp-drawer-btn-ghost:hover { background: rgba(var(--team-primary-rgb), 0.06); color: var(--team-primary); }
/* Search + icon bar adapted to the light body */
.lp-drawer-scroll form.mb-2 { margin-top: 0.6rem; }
.lp-dmega-ico { background: rgba(var(--team-primary-rgb), 0.06) !important; border-color: rgba(var(--team-primary-rgb), 0.14) !important; }
.lp-dmega-ico.active { background: var(--benfica-gold) !important; border-color: var(--benfica-gold) !important; }

/* ---- Extra polish on the Explore/Club links + headings ---- */
.lp-drawer-heading { display: flex !important; align-items: center; gap: 0.55rem; }
.lp-drawer-heading::before { display: inline-block !important; content: "" !important; width: 16px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--team-primary), var(--benfica-gold)); flex: 0 0 auto; }
.lp-drawer-list .lp-drawer-link { gap: 0.85rem !important; }
.lp-drawer-list .lp-drawer-link > i:first-child { width: 2.15rem !important; height: 2.15rem !important; display: inline-flex !important; align-items: center; justify-content: center; border-radius: 0.65rem !important; background: var(--bs-tertiary-bg, rgba(0, 0, 0, 0.045)) !important; color: var(--bs-body-color) !important; font-size: 1rem !important; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05); transition: background var(--t), color var(--t), transform var(--t), box-shadow var(--t); }
.lp-drawer-list .lp-drawer-link:hover > i:first-child { background: rgba(var(--team-primary-rgb), 0.12) !important; color: var(--team-primary) !important; transform: scale(1.06); }
.lp-drawer-list .lp-drawer-link.active > i:first-child { background: var(--team-primary) !important; color: #fff !important; box-shadow: 0 5px 14px rgba(var(--team-primary-rgb), 0.38); }
.lp-drawer-list .lp-drawer-link::after { display: inline-flex !important; content: "\203A"; margin-left: auto; padding-left: 0.4rem; font-size: 1.15rem; line-height: 1; color: var(--bs-secondary-color, #9a9a9a); opacity: 0; transform: translateX(-5px); transition: opacity var(--t), transform var(--t); }
.lp-drawer-list .lp-drawer-link:hover::after, .lp-drawer-list .lp-drawer-link.active::after { opacity: 1; transform: translateX(0); }
.lp-drawer-list .lp-drawer-link.active::after { color: var(--team-primary); }
.lp-drawer-list .lp-drawer-signout:hover > i:first-child { background: rgba(226, 59, 78, 0.12) !important; color: #e23b4e !important; }
[data-bs-theme="dark"] .lp-drawer-list .lp-drawer-link > i:first-child { background: rgba(255, 255, 255, 0.06) !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }

/* ---- Bolder section headings (Explore / Club) ---- */
.lp-drawer-heading { color: var(--team-primary) !important; font-size: 0.7rem !important; font-weight: 800 !important; letter-spacing: 0.15em !important; padding: 1.2rem 0.5rem 0.55rem !important; }
.lp-drawer-heading::before { width: 20px !important; height: 3px !important; border-radius: 3px; background: linear-gradient(90deg, var(--team-primary), var(--benfica-gold)) !important; box-shadow: 0 1px 4px rgba(var(--team-primary-rgb), 0.35); }
.lp-drawer-heading::after { display: inline-block !important; content: "" !important; flex: 1 1 auto; height: 1px; margin-left: 0.55rem; background: linear-gradient(90deg, rgba(var(--team-primary-rgb), 0.30), transparent) !important; }

/* Drop shadow under the drawer so its bottom edge reads as elevated */
.lp-drawer { box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22) !important; }
[data-bs-theme="dark"] .lp-drawer { box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5) !important; }

/* ---- Compact drawer rows ---- */
.lp-drawer-list { padding-top: 0 !important; padding-bottom: 0.3rem !important; }
.lp-drawer-link { padding: 0.42rem 0.85rem !important; }
.lp-drawer-list .lp-drawer-link { gap: 0.7rem !important; }
.lp-drawer-list .lp-drawer-link > i:first-child { width: 1.9rem !important; height: 1.9rem !important; font-size: 0.92rem !important; border-radius: 0.55rem !important; }
.lp-drawer-heading { padding: 0.8rem 0.5rem 0.35rem !important; }
.lp-tab.active i { color: #2e0509; }

/* Right action cluster */
.lp-actions { gap: 0.5rem; flex-wrap: nowrap; }
.lp-circle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--lp-line); background: rgba(255, 255, 255, 0.08);
    color: #fff; transition: background var(--t), transform var(--t); flex: 0 0 auto;
}
.lp-circle:hover { background: rgba(255, 255, 255, 0.18); transform: translateY(-1px); }

.lp-search-toggle { position: relative; }
.lp-nav.search-open .lp-search-toggle { color: var(--team-primary) !important; background: #fff !important; border-color: #fff !important; }
/* Full-width search bar that drops in below the primary bar when opened */
.lp-searchbar { display: none; background: #ffffff; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); }
.lp-nav.search-open .lp-searchbar { display: block; }
.lp-searchbar-inner { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.9rem; }
.lp-searchbar-icon { color: var(--team-primary); font-size: 1rem; flex: 0 0 auto; }
.lp-searchbar input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; color: #1a1a1a; font-size: 1rem; height: 38px; }
.lp-searchbar input::placeholder { color: #9097a1; }
.lp-searchbar-go { flex: 0 0 auto; border: 0; border-radius: 999px; background: var(--team-primary); color: #fff; font-weight: 700; font-size: 0.85rem; padding: 0.5rem 1.2rem; cursor: pointer; }
.lp-searchbar-go:hover { background: var(--team-secondary); }
.lp-searchbar-close { flex: 0 0 auto; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: #6b6f78; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.lp-searchbar-close:hover { background: rgba(0, 0, 0, 0.06); color: var(--team-primary); }

/* Full-width filter bar (same pattern as the search bar) */
.lp-filterbar { display: none; background: #ffffff; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); }
.lp-nav.filter-open .lp-filterbar { display: block; }
.lp-nav.filter-open .lp-filter-toggle { color: var(--team-primary) !important; background: #fff !important; border-color: #fff !important; }
.lp-filterbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; padding: 0.6rem 0.9rem; }
.lp-filterbar-title { display: inline-flex; align-items: center; align-self: center; font-weight: 800; color: var(--team-primary); font-size: 0.85rem; margin-right: 0.3rem; }
/* Label sits to the LEFT of each selector, inline */
.lp-filter-field { display: flex; flex-direction: row; align-items: center; gap: 0.45rem; min-width: 210px; flex: 1 1 210px; }
.lp-filter-field label { margin: 0; flex: 0 0 auto; white-space: nowrap; font-size: 0.68rem; font-weight: 700; color: #6b6f78; text-transform: uppercase; letter-spacing: 0.03em; }
.lp-filter-field .form-select { flex: 1 1 auto; min-width: 0; font-size: 0.85rem; }
.lp-filterbar-go { flex: 0 0 auto; align-self: center; height: 38px; border: 0; border-radius: 999px; background: var(--team-primary); color: #fff; font-weight: 700; font-size: 0.85rem; padding: 0 1.2rem; cursor: pointer; }
.lp-filterbar-go:hover { background: var(--team-secondary); }
.lp-filterbar-close { flex: 0 0 auto; align-self: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: #6b6f78; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.lp-filterbar-close:hover { background: rgba(0, 0, 0, 0.06); color: var(--team-primary); }
[data-bs-theme="dark"] .lp-searchbar, [data-bs-theme="dark"] .lp-filterbar { background: var(--bs-tertiary-bg); }
[data-bs-theme="dark"] .lp-searchbar input, [data-bs-theme="dark"] .lp-filter-field label { color: var(--bs-body-color); }


.lp-tv-pill {
    display: inline-flex; align-items: center; white-space: nowrap;
    padding: 0.5rem 0.95rem; border-radius: 999px; font-weight: 800; font-size: 0.8rem;
    color: #2e0509; text-decoration: none;
    background: var(--benfica-gold);
    border: 0; transition: transform var(--t), box-shadow var(--t);
}
.lp-tv-pill:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(var(--benfica-gold-rgb), 0.45); color: #2e0509; background: #ffd86b; }

.lp-lang { display: inline-flex; align-items: center; white-space: nowrap; border: 1px solid var(--lp-line); border-radius: 999px; background: transparent; color: var(--lp-ink); font-weight: 700; font-size: 0.85rem; padding: 0.4rem 0.7rem; }
.lp-lang:hover { color: var(--benfica-gold); border-color: var(--benfica-gold); }

/* Theme toggle + framework buttons in the bar -> white on red */
.lp-theme, .lp-theme .btn { color: #fff !important; }
.lp-actions .btn-outline-light,
.lp-theme.btn,
.lp-actions .user-dropdown-btn {
    color: #fff !important;
    border-color: var(--lp-line) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-width: 1px !important;
}
.lp-actions .btn-outline-light:hover,
.lp-actions .user-dropdown-btn:hover { background: rgba(255, 255, 255, 0.18) !important; color: #fff !important; }
/* Golden border on the round nav "bubble" buttons (search, theme, filter, bell, avatar). */
.lp-circle, .lp-burger,
.lp-actions .notification-popup-toggle,
.lp-actions .btn-outline-light,
.lp-actions .user-dropdown-btn,
.lp-theme.btn { border-color: rgba(var(--benfica-gold-rgb), 0.6) !important; }

/* Auth / account cluster — keep everything on ONE row */
.lp-auth { display: inline-flex; align-items: center; gap: 0.4rem; }
.lp-auth > .dropdown, .lp-auth .auth-controls, .lp-guest-auth { display: inline-flex; align-items: center; gap: 0.4rem; }
.lp-guest-auth .btn { border-radius: 999px !important; font-weight: 800; padding: 0.5rem 1.2rem !important; }
.lp-guest-auth a[href*="login"] { background: #ffffff !important; color: var(--team-primary) !important; border-color: #ffffff !important; }
.lp-guest-auth a[href*="login"]:hover { background: rgba(255, 255, 255, 0.88) !important; color: var(--team-secondary) !important; border-color: rgba(255, 255, 255, 0.88) !important; }
/* Uniform circular icon buttons: the notification bell matches the
   search/filter circles exactly; the account button is a pill with the name on
   tablet/desktop and a plain avatar circle on phones. */
.lp-actions .notification-popup-toggle,
.lp-nav .lp-theme,
.lp-nav .theme-toggle,
.lp-nav button.mobile-account-theme {
    width: 40px !important; height: 40px !important;
    min-width: 40px !important; min-height: 40px !important;
    max-width: 40px !important; max-height: 40px !important; /* beat the default .theme-toggle{max-height:31px} cap */
    padding: 0 !important;
    border-radius: 50% !important; display: inline-flex !important;
    align-items: center; justify-content: center; flex: 0 0 auto; position: relative;
    border: 1px solid var(--lp-line) !important; background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important; margin: 0 !important;
}
.lp-actions .notification-popup-toggle:hover,
.lp-nav .lp-theme:hover,
.lp-nav .theme-toggle:hover { background: rgba(255, 255, 255, 0.18) !important; }
.lp-actions .notification-popup-toggle i,
.lp-nav .lp-theme i,
.lp-nav .theme-toggle i { font-size: 1rem !important; }
/* Golden border on the theme toggle, notification bell and account circle too. */
.lp-actions .notification-popup-toggle,
.lp-nav .lp-theme,
.lp-nav .theme-toggle,
.lp-nav button.mobile-account-theme { border-color: rgba(var(--benfica-gold-rgb), 0.6) !important; }
.lp-auth .user-dropdown-btn {
    border-radius: 999px !important; font-weight: 700; padding: 0.3rem 0.6rem !important;
    display: inline-flex !important; align-items: center; gap: 0.35rem; height: 40px; flex: 0 0 auto;
}
.lp-auth .user-dropdown-btn img { width: 26px !important; height: 26px !important; border-radius: 50%; object-fit: cover; margin: 0 !important; }
@media (max-width: 767.98px) {
    .lp-auth .user-dropdown-btn { width: 40px; min-width: 40px; padding: 0 !important; border-radius: 50% !important; justify-content: center; }
    .lp-auth .user-dropdown-btn::after { display: none !important; }
}
.lp-pill-primary { border-radius: 999px; font-weight: 700; color: #fff; background: var(--team-primary); border: 1px solid var(--team-primary); }
.lp-pill-primary:hover { background: var(--team-secondary); border-color: var(--team-secondary); color: #fff; }

/* ---- TIER 2: secondary bar (deep red) ---- */
.lp-subnav { background: var(--lp-subnav-bg); border-bottom: 0.6px solid var(--benfica-gold); }
.lp-subnav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 0.9rem; }
.lp-subnav-left { display: flex; align-items: center; flex-wrap: wrap; gap: 0; list-style: none; margin: 0; padding: 0; }
.lp-subnav-left > li { display: inline-flex; align-items: center; }
.lp-subnav-left > li + li::before { content: ""; width: 1px; height: 13px; background: var(--benfica-gold); margin: 0 0.25rem; }
.lp-sublink {
    display: inline-block; color: var(--lp-ink-dim); font-weight: 700; font-size: 0.74rem;
    letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
    padding: 0.65rem 0.85rem; border-bottom: 2px solid transparent; transition: color var(--t), border-color var(--t);
}
.lp-sublink:hover { color: #fff; }
.lp-sublink.active { color: #fff; border-bottom-color: transparent; }

.lp-subnav-right { display: flex; align-items: center; gap: 0.3rem; flex: 0 0 auto; }
.lp-inst-link {
    color: var(--lp-ink); font-weight: 700; font-size: 0.78rem; text-decoration: none;
    padding: 0.55rem 0.7rem; border: 0; background: transparent; transition: color var(--t);
}
.lp-inst-link:hover { color: var(--benfica-gold); }
.lp-inst-dropdown .dropdown-menu { border: 0; border-radius: 0.8rem; box-shadow: 0 0.35rem 1.1rem rgba(17, 12, 12, 0.10); padding: 0.35rem; background: var(--bs-body-bg) !important; }
.lp-inst-dropdown .dropdown-item { border-radius: 0.5rem; font-size: 0.85rem; padding: 0.45rem 0.7rem; color: var(--bs-body-color) !important; }
.lp-inst-dropdown .dropdown-item:hover { background: rgba(var(--team-primary-rgb), 0.10); color: var(--team-primary) !important; }

/* ---- Mobile drawer (deep red) ---- */
.lp-drawer { background: var(--lp-nav-solid); border-bottom: 3px solid var(--benfica-gold); }
.lp-drawer-list { list-style: none; margin: 0; padding: 0.25rem 0 0.5rem; }
.lp-drawer-heading { padding: 0.9rem 1rem 0.35rem; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.lp-drawer-link { display: flex; align-items: center; gap: 0.85rem; color: #fff; font-weight: 600; font-size: 1.02rem; padding: 0.8rem 1rem; text-decoration: none; border-radius: 0.7rem; transition: background var(--t); }
.lp-drawer-link:hover, .lp-drawer-link:active { background: rgba(255, 255, 255, 0.10); color: #fff; }
.lp-drawer-link.active { background: rgba(255, 255, 255, 0.14); }
.lp-drawer-link > i:first-child { width: 1.5rem; text-align: center; font-size: 1rem; color: var(--benfica-gold); flex: 0 0 auto; }
.lp-drawer-link span { flex: 1 1 auto; }
.lp-drawer-ext { font-size: 0.7rem; opacity: 0.6; }
.lp-drawer .input-group { margin-bottom: 0.5rem; }
.lp-drawer-actions .lp-guest-auth { width: 100%; }
.lp-drawer-actions .lp-guest-auth .btn { flex: 1; }
/* The default theme shows a fixed full-screen backdrop when the menu opens,
   which sits on top of this in-flow drawer and swallows taps. Disable it so the
   drawer links are clickable, and keep the page scrollable. */
#mobile-nav-backdrop { display: none !important; }
body.mobile-nav-open { overflow: visible !important; }
.lp-drawer { position: relative; z-index: 1042; max-height: calc(100vh - 120px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: none; }
.lp-drawer-link { position: relative; z-index: 1; -webkit-tap-highlight-color: transparent; }

/* ---- Dynamic drawer polish ---- */
.lp-drawer { background: linear-gradient(180deg, var(--lp-nav-solid) 0%, #4d000a 100%); }
.lp-drawer-heading { display: flex; align-items: center; gap: 0.5rem; }
.lp-drawer-heading::before { content: ""; width: 16px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--benfica-gold), transparent); }
.lp-drawer-link { margin: 0.1rem 0.55rem; padding: 0.7rem 0.8rem; gap: 0.7rem; border: 1px solid transparent; overflow: hidden; }
.lp-drawer-link > i:first-child { width: 2.15rem; height: 2.15rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 0.6rem; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(var(--benfica-gold-rgb), 0.22); font-size: 0.95rem; transition: transform var(--t), background var(--t), color var(--t); }
.lp-drawer-link::after { content: "\203A"; margin-left: auto; padding-left: 0.5rem; font-size: 1.25rem; line-height: 1; color: rgba(255, 255, 255, 0.28); opacity: 0; transform: translateX(-5px); transition: opacity var(--t), transform var(--t); }
.lp-drawer-link:hover, .lp-drawer-link:active { background: rgba(255, 255, 255, 0.08); transform: translateX(5px); border-color: rgba(var(--benfica-gold-rgb), 0.22); }
.lp-drawer-link:hover > i:first-child, .lp-drawer-link:active > i:first-child { background: var(--benfica-gold); color: #2e0509; transform: scale(1.06); }
.lp-drawer-link:hover::after, .lp-drawer-link:active::after { opacity: 1; transform: translateX(0); }
.lp-drawer-link.active { background: linear-gradient(90deg, rgba(var(--benfica-gold-rgb), 0.20), rgba(255, 255, 255, 0.03)); border-color: rgba(var(--benfica-gold-rgb), 0.38); box-shadow: inset 3px 0 0 var(--benfica-gold); }
.lp-drawer-link.active > i:first-child { background: var(--benfica-gold); color: #2e0509; }
.lp-drawer-link.active::after { opacity: 1; transform: translateX(0); color: var(--benfica-gold); }
/* Staggered entrance each time the drawer opens */
body.mobile-nav-open .lp-drawer-link { animation: lpDrawerIn 0.3s ease backwards; }
body.mobile-nav-open .lp-drawer-list li:nth-child(1) .lp-drawer-link { animation-delay: 0.03s; }
body.mobile-nav-open .lp-drawer-list li:nth-child(2) .lp-drawer-link { animation-delay: 0.06s; }
body.mobile-nav-open .lp-drawer-list li:nth-child(3) .lp-drawer-link { animation-delay: 0.09s; }
body.mobile-nav-open .lp-drawer-list li:nth-child(4) .lp-drawer-link { animation-delay: 0.12s; }
body.mobile-nav-open .lp-drawer-list li:nth-child(5) .lp-drawer-link { animation-delay: 0.15s; }
body.mobile-nav-open .lp-drawer-list li:nth-child(6) .lp-drawer-link { animation-delay: 0.18s; }
body.mobile-nav-open .lp-drawer-list li:nth-child(7) .lp-drawer-link { animation-delay: 0.21s; }
@keyframes lpDrawerIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

/* ---- Premium drawer refinements ---- */
.lp-drawer { background: radial-gradient(130% 70% at 100% 0%, rgba(var(--benfica-gold-rgb), 0.07), transparent 58%), linear-gradient(180deg, var(--lp-nav-solid) 0%, #45000a 100%); }
.lp-drawer > div { padding: 0.85rem 0.75rem 1.1rem !important; }
/* Frosted search field with gold focus ring */
.lp-drawer form.mb-2 { margin-bottom: 0.9rem !important; }
.lp-drawer .input-group { border-radius: 0.9rem; overflow: hidden; background: #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28); transition: box-shadow var(--t); }
.lp-drawer .input-group:focus-within { box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28), 0 0 0 2px var(--benfica-gold); }
.lp-drawer .input-group-text { background: #fff; border: 0; color: var(--team-primary); padding-left: 0.9rem; }
.lp-drawer .form-control { border: 0; box-shadow: none !important; padding: 0.72rem 0.6rem; font-size: 1rem; }
/* Section headings: accent bar + trailing hairline */
.lp-drawer-heading { margin-top: 0.4rem; padding: 0.9rem 0.6rem 0.4rem; }
.lp-drawer-heading::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent); }
/* Items: gradient tile, hover lift, glowing active state */
.lp-drawer-link > i:first-child { background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)); }
.lp-drawer-link:hover, .lp-drawer-link:active { box-shadow: 0 5px 16px rgba(0, 0, 0, 0.20); }
.lp-drawer-link.active { box-shadow: inset 3px 0 0 var(--benfica-gold), 0 5px 16px rgba(0, 0, 0, 0.20); }
.lp-drawer-link.active > i:first-child { box-shadow: 0 0 0 1px var(--benfica-gold), 0 0 12px rgba(var(--benfica-gold-rgb), 0.45); }

.card-header { border-bottom: 1px solid var(--bs-border-color); font-weight: 700; background: var(--bs-tertiary-bg); }
/* renderSection cards: match the DEFAULT theme — plain solid-red header,
   no gradient and no gold accent bar. */
.card-header.bg-primary, .card-header.bg-team-primary {
    background: var(--team-primary) !important;
    color: #fff !important;
}
.section-card .card-header::before { content: none !important; }

/* Re-align reds that theme_manager.php injects inline (hardcoded #B01B1D) */
html .card-header.bg-primary, html .card-header.bg-team-primary { background-color: var(--team-primary) !important; }
html .border-team-primary { border-color: var(--team-primary) !important; }
/* Section-card borders match their header colour (the .card neutral border above
   otherwise overrides Bootstrap's border-* and they all look silver). */
html .border-primary { border-color: var(--team-primary) !important; }
html .border-info { border-color: rgba(var(--bs-info-rgb, 13, 202, 240), 1) !important; }
html .border-warning { border-color: rgba(var(--bs-warning-rgb, 255, 193, 7), 1) !important; }
html .border-success { border-color: rgba(var(--bs-success-rgb, 25, 135, 84), 1) !important; }
html .border-danger { border-color: rgba(var(--bs-danger-rgb, 220, 53, 69), 1) !important; }
html .border-secondary { border-color: rgba(var(--bs-secondary-rgb, 108, 117, 125), 1) !important; }
html .border-dark { border-color: rgba(var(--bs-dark-rgb, 33, 37, 41), 1) !important; }
html .text-team-primary { color: var(--team-primary) !important; }

.btn { border-radius: 0.6rem; }
.btn-primary { background: var(--team-primary); border-color: var(--team-primary); }
.btn-primary:hover { background: var(--team-secondary); border-color: var(--team-secondary); }
.btn-outline-primary { color: var(--team-primary); border-color: var(--team-primary); }
.btn-outline-primary:hover { background: var(--team-primary); border-color: var(--team-primary); }
.badge.bg-primary { background-color: var(--team-primary) !important; }
/* Loading / refresh spinning wheel uses Benfica gold instead of Bootstrap blue. */
.spinner-border, .spinner-grow { color: var(--benfica-gold) !important; }
.preloader .spinner-border, .preloader .spinner-grow,
.preloader [class*="spinner"], .preloader [class*="loader"] { color: var(--benfica-gold) !important; border-right-color: transparent !important; }
.fa-spinner.fa-spin, .fa-circle-notch.fa-spin { color: var(--benfica-gold) !important; }
/* Tinted badges (e.g. the monthly "X Total") keep the pale blue tint so they
   match the "Total" stat box instead of going solid team-red. */
.badge.bg-primary.bg-opacity-10 { background-color: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.1) !important; }
/* Fixtures stat boxes (Total / Played / Upcoming / Wins / Draws / Losses):
   flat tinted tiles with no border and no shadow. */
.p-1.border.rounded.bg-opacity-10.h-100 { border: 0 !important; box-shadow: none !important; }

/* Match header meta row (date, venue, attendance, referee, MOTM) -> gold */
body .match-header-meta, body .match-header-meta div, body .match-header-meta span,
body .match-header-meta a, body .match-header-meta i, body .match-header-meta strong,
body .match-header-meta time, body .match-header-meta small { color: var(--benfica-gold) !important; }
body .match-header-meta a:hover { color: #ffd86b !important; }

#back-to-top { position: fixed; right: 1.1rem; bottom: 1.1rem; width: 46px; height: 46px; display: none; z-index: 1030; background: var(--team-primary); border: 0; box-shadow: 0 0.5rem 1.2rem rgba(var(--team-primary-rgb), 0.4); }
#back-to-top.show { display: inline-flex; align-items: center; justify-content: center; }

/* =====================================================================
   DARK MODE
   ===================================================================== */
[data-bs-theme="dark"] body { background: radial-gradient(1200px 600px at 100% -10%, rgba(var(--team-primary-rgb), 0.12), transparent 60%), var(--bs-body-bg); }
[data-bs-theme="dark"] .card, [data-bs-theme="dark"] .section-card, [data-bs-theme="dark"] .widget { background: var(--bs-tertiary-bg); }
[data-bs-theme="dark"] .card-header { background: rgba(255, 255, 255, 0.03); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1199.98px) {
    /* No divider between the primary bar and the secondary bar. The secondary
       bar's thin gold bottom line is drawn as a box-shadow so it overlaps the
       hero's top edge — eliminating the faint white sub-pixel gap a 0.5px
       border leaves between the line and the hero. */
    .lp-primary { border-bottom: 0 !important; }
    .lp-subnav { border-bottom: 0 !important; box-shadow: 0 0.6px 0 0 var(--benfica-gold) !important; }
    /* Fixed height + evenly centred items (symmetric top/bottom space) */
    .lp-primary-inner { padding: 4px 0.6rem !important; min-height: 50px !important; height: auto !important; gap: 0.4rem; align-items: center; }
    .lp-brand { font-size: 1.1rem; }
    .lp-actions { gap: 0.35rem; }
    .lp-circle, .lp-burger, .lp-actions .notification-popup-toggle, .lp-nav .lp-theme, .lp-nav .theme-toggle, .lp-nav button.mobile-account-theme, .slb-logo-mark { width: 38px !important; height: 38px !important; min-width: 38px !important; min-height: 38px !important; max-width: 38px !important; max-height: 38px !important; }
    .slb-logo-mark i { font-size: 1.55rem !important; }
    /* keep search from over-expanding next to the avatar/bell on phones */
    .lp-search.open .lp-search-input { width: 150px; }
}
@media (max-width: 575.98px) {
    .lp-topstrip-label { font-size: 0.6rem; padding-right: 0.6rem; }
    .lp-crest { width: 26px; height: 26px; }
    .lp-brand { font-size: 0.92rem; gap: 0.4rem; }
    .lp-brand .fa-benfica-logo-mask { font-size: 1.35rem; }
    /* Show the full wordmark on small screens — never truncate the logo. */
    .lp-brand-text { max-width: none; overflow: visible; text-overflow: clip; white-space: nowrap; }
    .lp-primary-inner { padding: 5px 0.6rem !important; min-height: 50px !important; height: auto !important; align-items: center !important; }
    .lp-actions { gap: 0.25rem; }
    .lp-circle, .lp-burger,
    .lp-actions .notification-popup-toggle,
    .lp-nav .lp-theme, .lp-nav .theme-toggle, .lp-nav button.mobile-account-theme,
    .lp-auth .user-dropdown-btn,
    .slb-logo-mark { width: 34px !important; height: 34px !important; min-width: 34px !important; min-height: 34px !important; max-width: 34px !important; max-height: 34px !important; padding: 0 !important; }
    .slb-logo-mark i { font-size: 1.4rem !important; }
    .lp-auth .user-dropdown-btn img { width: 22px !important; height: 22px !important; }
    .lp-search.open .lp-search-input { width: 108px; }
}
@media (prefers-reduced-motion: reduce) {
    .card, .section-card, .widget, .lp-crest, .lp-tab, .lp-search-input { transition: none !important; }
    .card:hover, .section-card:hover, .widget:hover { transform: none; }
}

/* =====================================================================
   UNIFIED HERO — reskin the default per-page heroes (match, player,
   squad, news, my-benfica, etc.) to share the home .mh-hero branded
   look: the same diagonal red→maroon gradient, gold radial glow and
   gold underline accent. Only the container chrome changes; all the
   dynamic hero content (scores, trophies, stats) is preserved.
   The home page renders its own .mh-hero markup, so these .hero-header
   rules never touch it.
   ===================================================================== */
html .team-gradient-bg,
html .hero-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #e8112c 0%, #9c0f18 52%, #33000a 100%) !important;
}
html .hero-header[style*="background"] {
    background: linear-gradient(135deg, #e8112c 0%, #9c0f18 52%, #33000a 100%) !important;
}
.hero-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 120% at 90% 30%, rgba(var(--benfica-gold-rgb), 0.20), transparent 58%);
    pointer-events: none;
    z-index: 0;
}
.hero-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--benfica-gold), var(--team-primary));
    z-index: 2;
}
.hero-header > * {
    position: relative;
    z-index: 1;
}
/* Gold accent touches that echo the home hero's eyebrow / fact icons. */
.hero-header .hero-match-pill {
    border: 1px solid rgba(var(--benfica-gold-rgb), 0.35);
}
.hero-header i,
.hero-header .my-benfica-kicker,
.mh-hero i {
    color: var(--benfica-gold) !important;
}
/* ...but match-event icons in the key-moments timeline keep their default
   colours (white goals, green/red substitution arrows) instead of going gold.
   Card icons use SVG background-images so they're unaffected either way. */
.hero-header .hkm-ic i {
    color: #fff !important;
}
.hero-header .hkm-ic .text-success {
    color: var(--bs-success, #198754) !important;
}
.hero-header .hkm-ic .text-danger {
    color: var(--bs-danger, #dc3545) !important;
}
/* Action-button icons (Follow, Manage, etc.) follow their button's own text
   colour instead of going gold, matching the default theme. */
.hero-header .btn i {
    color: inherit !important;
}
/* Same entrance effect as the home hero: the content fades/slides up when it
   deploys, on every page's hero. */
@keyframes heroUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}
.hero-header .hero-content-inner {
    animation: heroUp 0.45s both;
}
@media (prefers-reduced-motion: reduce) {
    .hero-header .hero-content-inner { animation: none !important; }
}
