/* =====================================================================
   Timberlark site menu — ONE shared component for every page.
   Self-contained on purpose: every class is prefixed "tl-" so it cannot clash with
   (or be broken by) the styles of the page it sits on. The markup is generated by
   site-nav.js at build time (see eleventy.config.js). Do not restyle this menu
   inside individual pages.

   Desktop (wider than 1180px): groups open as dropdowns.
   Phone / tablet: one list of big tap targets; groups tap to open.
   ===================================================================== */

.tl-nav, .tl-nav * { box-sizing: border-box; }
.tl-nav {
    --tl-green: #2D5016; --tl-green-dark: #1E3A0E; --tl-gold: #D4A017; --tl-gold-light: #E8B730; --tl-ink: #2C3E50;
    background: rgba(45, 80, 22, 0.97);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    padding: 12px 0;
    font-family: 'Open Sans', 'Segoe UI', Arial, sans-serif; font-size: 16px; line-height: 1.4; text-align: left;
    position: sticky; top: 0; left: 0; right: 0; z-index: 1000; width: 100%;
    /* some pages style a bare `nav {}` element (display:flex, padding...); do not inherit any of that */
    display: block; align-items: initial; justify-content: initial; flex-direction: initial; gap: 0; margin: 0;
}
/* pages that carry the red announcement bar: fixed, sitting just below it */
.tl-nav.tl-nav--fixed { position: fixed; top: var(--announce-h, 0px); }
.tl-nav a, .tl-nav button, .tl-nav ul, .tl-nav li { margin: 0; letter-spacing: normal; text-transform: none; }
.tl-nav ul { list-style: none; padding: 0; }
.tl-nav a { text-decoration: none; }

.tl-in { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.tl-logo { display: flex; align-items: center; gap: 10px; color: #fff; flex-shrink: 0; }
.tl-logo-icon { font-size: 1.5rem; line-height: 1; }
.tl-logo-text { font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif; font-weight: 800; font-size: 1.4rem; color: #fff; letter-spacing: 2px; }

.tl-links { display: flex; align-items: center; justify-content: flex-end; gap: 6px 18px; }
.tl-links > li { position: relative; }
.tl-links a, .tl-group-btn { color: rgba(255,255,255,0.86); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.02em; white-space: nowrap; }
.tl-links a:hover, .tl-group-btn:hover, .tl-group:focus-within .tl-group-btn { color: var(--tl-gold); }
.tl-group-btn { background: none; border: none; cursor: pointer; font-family: inherit; padding: 8px 4px; }
.tl-sub {
    display: none; position: absolute; top: 100%; left: -12px; min-width: 240px; z-index: 1100; padding: 8px;
    background: var(--tl-green-dark); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,0.35);
}
.tl-group:hover .tl-sub, .tl-group:focus-within .tl-sub, .tl-group.open .tl-sub { display: block; }
.tl-sub a { display: block; padding: 11px 14px; border-radius: 8px; }
.tl-sub a:hover { background: rgba(255,255,255,0.08); }

.tl-links a.tl-live { background: var(--tl-gold); color: var(--tl-ink); font-weight: 800; padding: 9px 16px; border-radius: 100px; }
.tl-links a.tl-live:hover { background: var(--tl-gold-light); color: var(--tl-ink); }
.tl-links a.tl-login { border: 1.5px solid rgba(75,191,122,0.55); color: #4bbf7a; padding: 8px 16px; border-radius: 6px; }
.tl-links a.tl-login:hover { background: rgba(75,191,122,0.12); color: #4bbf7a; }
.tl-links a.tl-cta { background: var(--tl-gold); color: var(--tl-ink); font-weight: 700; padding: 9px 16px; border-radius: 6px; }
.tl-links a.tl-cta:hover { background: var(--tl-gold-light); color: var(--tl-ink); }

/* hidden on desktop; shown in the phone layout */
.tl-mlogin { display: none; border: 1.5px solid rgba(75,191,122,0.6); color: #4bbf7a; padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 700; margin-left: auto; margin-right: 10px; white-space: nowrap; }
.tl-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px 6px; }
.tl-burger span { display: block; width: 25px; height: 3px; background: #fff; border-radius: 3px; transition: transform 0.2s, opacity 0.2s; }
.tl-burger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.tl-burger.active span:nth-child(2) { opacity: 0; }
.tl-burger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1180px) {
    .tl-mlogin { display: inline-block; }
    .tl-burger { display: flex; }
    .tl-links {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 2px; padding: 10px 16px 22px;
        background: var(--tl-green-dark); max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto; -webkit-overflow-scrolling: touch;
    }
    /* with the red announcement bar above the menu, the panel must also leave room for that bar, or its bottom (Log in / Sign up) falls off-screen */
    .tl-nav--fixed .tl-links { max-height: calc(100vh - var(--announce-h, 0px) - 80px); max-height: calc(100dvh - var(--announce-h, 0px) - 80px); }
    .tl-links.active { display: flex; }
    .tl-links a { display: block; font-size: 1.05rem; padding: 14px 10px; white-space: normal; border-radius: 8px; }
    .tl-links a:active { background: rgba(255,255,255,0.08); }
    .tl-group-btn {
        display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left;
        font-size: 1.05rem; font-weight: 700; color: #fff; padding: 15px 10px; border-radius: 8px; border-top: 1px solid rgba(255,255,255,0.1);
    }
    .tl-caret { display: inline-block; transition: transform 0.15s; }
    .tl-group.open .tl-caret { transform: rotate(180deg); }
    .tl-group:hover .tl-sub, .tl-group:focus-within .tl-sub { display: none; }
    .tl-group.open .tl-sub, .tl-group.open:hover .tl-sub { display: block; }
    .tl-sub { position: static; min-width: 0; padding: 0 0 6px; background: none; border: none; box-shadow: none; }
    .tl-sub a { padding: 13px 10px 13px 22px; color: rgba(255,255,255,0.85); }
    .tl-links a.tl-live { text-align: center; margin: 6px 0 4px; padding: 15px 16px; border-radius: 12px; }
    .tl-links a.tl-login { text-align: center; margin-top: 10px; }
    .tl-links a.tl-cta { text-align: center; margin-top: 4px; padding: 15px 16px; border-radius: 12px; }
}
@media (max-width: 400px) {
    .tl-logo-icon { white-space: nowrap; font-size: 1.15rem; }
    .tl-logo-text { font-size: 1.15rem; letter-spacing: 1.5px; }
    .tl-mlogin { padding: 6px 10px; margin-right: 6px; }
}
@media print { .tl-nav { display: none !important; } }
@media (max-width: 360px) {
    .tl-in { padding: 0 12px; gap: 8px; }
    .tl-logo { gap: 6px; }
    .tl-logo-text { font-size: 1.02rem; letter-spacing: 1px; }
    .tl-mlogin { font-size: 12px; padding: 6px 9px; margin-right: 4px; }
    .tl-burger { padding: 8px 2px; }
}
