/* =====================================================================
   site-chrome.css — SHARED header (top-bar + navbar chrome) + language
   selector, injected on every page alongside partials/header.html +
   partials/footer.html. Nav/mega-menu + footer base styling already live
   in style.css; this file only carries the top-bar chrome that used to be
   duplicated inline in each page.
   ===================================================================== */

/* ---- TOP BAR / HEADER SHELL ---- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.top-bar {
    height: 40px;
    background: rgba(3, 7, 18, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #d4d4d8;
    transition: all 0.4s ease;
    /* sit above #navbar (z:1100) so the language dropdown overlays the logo cleanly */
    position: relative;
    z-index: 1300;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.top-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.top-link:hover {
    color: #06b6d4;
}

.top-bar-center {
    font-weight: 500;
}

.price-highlight {
    color: #06b6d4;
    font-weight: 800;
    background: rgba(6, 182, 212, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 4px;
    font-family: 'Fira Code', monospace;
}

.n8n-pink {
    color: #ea4b71 !important;
    font-weight: 800;
}

/* Navbar sits inside the fixed header */
#navbar {
    position: relative;
    top: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(3, 7, 18, 0.8) !important;
}

.main-header.scrolled {
    background: rgba(3, 7, 18, 0.9);
    backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.main-header.scrolled .top-bar {
    background: transparent;
    height: 36px;
}

.main-header.scrolled #navbar {
    background: transparent !important;
    backdrop-filter: none;
    padding: 0.6rem 0;
}

/* ---- BURGER (base) ---- */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10001;
}

.mobile-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 2px;
}

.btn-mobile-nav {
    display: none !important;
}

/* ---- CONTENT TOP BAR (secondary marquee, mobile only) ---- */
.content-top-bar {
    display: none;
}

@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* ---- LANGUAGE SELECTOR (sel4b — code chip + steaguri) ---- */
.top-bar-left { display: inline-flex; align-items: center; gap: 14px; }
.sel4b-flag { width: 18px; height: 12px; border-radius: 2px; flex: 0 0 auto; display: block; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 1px 2px rgba(0, 0, 0, .4); }
.sel4b-wrap { position: relative; font-family: 'Fira Code', monospace; }
.sel4b-chip { display: inline-flex; align-items: center; gap: .4rem; background: linear-gradient(180deg, rgba(148, 163, 184, .09), rgba(148, 163, 184, .04)); border: 1px solid rgba(148, 163, 184, .16); color: #f1f5f9; font-family: 'Fira Code', monospace; font-size: .76rem; font-weight: 600; letter-spacing: .06em; padding: .3rem .5rem; border-radius: 7px; cursor: pointer; line-height: 1; transition: background .18s ease, border-color .18s ease, box-shadow .18s ease; }
.sel4b-chip:hover { background: linear-gradient(180deg, rgba(148, 163, 184, .15), rgba(148, 163, 184, .07)); border-color: rgba(148, 163, 184, .32); }
.sel4b-chip:focus-visible { outline: none; box-shadow: 0 0 0 2px #04060e, 0 0 0 4px #22d3ee; }
.sel4b-cur { color: #f1f5f9; }
.sel4b-chev { width: 10px; height: 10px; stroke: #22d3ee; fill: none; stroke-width: 2.6; flex: 0 0 auto; transition: transform .26s ease; }
.sel4b-wrap.open .sel4b-chev { transform: rotate(180deg); }
.sel4b-drop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 1200; min-width: 100%; background: #0a1120; border: 1px solid rgba(148, 163, 184, .16); border-radius: 9px; padding: .26rem; box-shadow: 0 14px 36px -12px rgba(0, 0, 0, .7); opacity: 0; visibility: hidden; transform: translateY(-5px); transform-origin: top; transition: opacity .16s ease, transform .2s ease, visibility .2s; }
.sel4b-wrap.open .sel4b-drop { opacity: 1; visibility: visible; transform: translateY(0); }
.sel4b-item { display: flex; align-items: center; gap: .44rem; width: 100%; text-align: left; background: none; border: 0; color: #94a3b8; cursor: pointer; font-family: 'Fira Code', monospace; font-size: .76rem; font-weight: 600; letter-spacing: .06em; padding: .4rem .55rem; border-radius: 6px; line-height: 1; white-space: nowrap; transition: background .14s ease, color .14s ease; }
.sel4b-item:hover { background: rgba(34, 211, 238, .1); color: #f1f5f9; }
.sel4b-item:focus-visible { outline: none; background: rgba(34, 211, 238, .14); color: #f1f5f9; }
.sel4b-item[aria-selected="true"] { color: #22d3ee; background: rgba(34, 211, 238, .06); }
.sel4b-item[hidden] { display: none; }

/* ---- MOBILE (≤991px) ---- */
@media (max-width: 991px) {
    .top-bar-center {
        flex: 1;
        margin: 0 15px;
        overflow: hidden;
        white-space: nowrap;
        position: relative;
        display: flex;
        align-items: center;
    }

    .promo-text {
        display: inline-block;
        padding-left: 100%;
        animation: marquee 15s linear infinite;
        font-size: 11px;
    }

    .top-bar-left,
    .top-bar-right {
        flex-shrink: 0;
    }

    .top-link span {
        display: none;
    }

    .top-bar-center .promo-text {
        display: none !important;
    }

    /* secondary content top bar (marquee) shows on mobile */
    .content-top-bar {
        height: 40px;
        background: #030712 !important;
        display: flex;
        align-items: center;
        overflow: hidden;
        position: relative;
        z-index: 10001;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .content-top-bar .marquee-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 0 15px;
    }

    .content-top-bar .marquee-content {
        flex: 1;
        overflow: hidden;
        white-space: nowrap;
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 1px;
        display: flex;
    }

    .content-top-bar .marquee-text {
        display: block;
        padding: 12px 0;
        color: #d4d4d8 !important;
        font-family: inherit !important;
        text-align: center;
        width: 100%;
        font-size: 11px;
        white-space: normal;
        animation: none;
        letter-spacing: normal;
    }

    /* mobile nav drawer */
    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(3, 7, 18, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 25px;
        transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 40px;
        z-index: 9999;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links .btn-mobile-nav {
        display: flex !important;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }

    .btn-desktop {
        display: none !important;
    }

    .nav-item-mega .mega-menu {
        display: none;
    }

    /* burger animation */
    .mobile-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}


/* =====================================================================
   MOBILE LITE (<=991px) — kill effects that DON'T have a
   prefers-reduced-motion fallback of their own. The rest are handled by
   mobile-lite.js (JS effects) + each page's reduced-motion CSS blocks
   (which now also trigger at max-width:991px).
   ===================================================================== */
@media (max-width: 991px) {
    /* NOTE: the "Optimizat...aplicaţii" logo marquee KEEPS scrolling on mobile
       (user request). The stuck-on-tap bug is fixed in-page by gating the
       hover-pause behind @media (hover:hover) so touch never pauses it. */

    /* domain: twinkling starfield -> static */
    .star-field { animation: none !important; }

    /* misc decorative effects without their own reduced-motion fallback */
    .global-breathe-frame,
    .hud-scan,
    .pulse-spark { animation: none !important; }

    /* drifting starfield spans not covered by a section-wide reduced-motion block
       (#supStars sits behind the support chat, which itself stays animated) */
    #prStars span,
    #supStars span,
    .t1-motes span { animation: none !important; }
}