/*
 * Chrome-ul comun al site-ului public: header (meniul principal), sertarul de pe
 * mobil, footer-ul si sub-bara landing-urilor (.co-subnav).
 *
 * Tokens-urile (--navy, --amber, --font ...) si piesele refolosite (.co-wrap, .co-btn,
 * .co-nav__logo, .co-nav__mark) vin din landing.css, incarcat INAINTEA acestui fisier.
 * Partialele: private/partials/site/{header,footer}.inc.php, private/partials/landing/nav.inc.php.
 * Comportamentul (sertar, scrollspy pe sub-bara): assets/js/site.js.
 *
 * Clasele sunt prefixate site-* intentionat: paginile vechi au reguli pe .header,
 * .main-menu, .is-sticky (tema veche) care nu trebuie sa atinga header-ul nou.
 */
:root {
    --site-nav-h: 56px;
    --site-subnav-h: 0px;
}
@media (min-width: 768px) {
    :root { --site-nav-h: 64px; }
    html.has-subnav { --site-subnav-h: 48px; }
}

/* .main-wrapper (index.php) e containerul header-ului lipicios: unele pagini vechi au
   continut flotant care iesea din .page-body, iar wrapper-ul ramanea mai scurt decat pagina
   (header-ul se oprea din lipit). flow-root il face sa contina toate floats-urile. */
.main-wrapper { display: flow-root; }

/* Fontul sistemului de design pe tot site-ul, nu doar in header/footer: paginile vechi
   (articole, preturi, contact...) ramaneau pe Roboto din style.css. Iconitele (fa, bi)
   isi pastreaza fontul propriu, setat pe clasa lor. */
body { font-family: var(--font); }

/* ---------- header ---------- */
.site-nav {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(11, 27, 51, .94);
    backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    font-family: var(--font);
    min-height: 0;
}
.site-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--site-nav-h); }
.site-nav .co-nav__logo, .site-footer .co-nav__logo, .site-drawer .co-nav__logo { font-family: var(--font); line-height: 1.2; }
.site-nav__links { display: none; align-items: center; gap: 4px; }
.site-nav__link {
    /* 14px / 8px: dimensiunea aleasa cand bara avea 8 elemente; pastrata si cu 6 (dropdown inclus) */
    display: inline-block; padding: 8px 8px; border-radius: 999px;
    color: #CBD5E1 !important; text-decoration: none; font: 600 14px/1.2 var(--font); white-space: nowrap;
    transition: color .2s ease, background .2s ease;
}
.site-nav__link:hover, .site-nav__link:focus-visible { color: #fff !important; background: rgba(255, 255, 255, .06); }
.site-nav__link.is-active { color: #fff !important; background: rgba(96, 165, 250, .16); box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .28); }
/* dropdown "Pentru CAR-uri": panoul sta in interiorul header-ului (z-index 1000), deci
   acopera si sub-bara landing-urilor (.co-subnav, z-index 999) */
.site-nav__dd { position: relative; }
.site-nav__dd-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    border: 0; background: transparent; cursor: pointer; margin: 0;
}
.site-nav__dd-chevron { width: 10px; height: 10px; flex: 0 0 auto; transition: transform .2s ease; }
.site-nav__dd-toggle[aria-expanded="true"] .site-nav__dd-chevron { transform: rotate(180deg); }
.site-nav__dd-toggle[aria-expanded="true"]:not(.is-active) { color: #fff !important; background: rgba(255, 255, 255, .06); }
.site-nav__dd-panel {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 1;
    display: flex; flex-direction: column; gap: 2px; min-width: 250px; padding: 8px;
    background: rgba(11, 27, 51, .98); border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px;
    box-shadow: 0 18px 40px rgba(2, 8, 23, .45);
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}
/* puntea invizibila dintre buton si panou: cursorul nu "cade" in gol la hover */
.site-nav__dd-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -9px; height: 9px; }
.site-nav__dd.is-open .site-nav__dd-panel {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity .16s ease, transform .16s ease, visibility 0s;
}
.site-nav__dd-link {
    display: block; padding: 10px 14px; border-radius: 10px;
    color: #CBD5E1 !important; text-decoration: none; font: 600 14px/1.25 var(--font); white-space: nowrap;
    transition: color .2s ease, background .2s ease;
}
.site-nav__dd-link:hover, .site-nav__dd-link:focus-visible { color: #fff !important; background: rgba(255, 255, 255, .06); }
.site-nav__dd-link.is-active { color: #fff !important; background: rgba(96, 165, 250, .16); }
.site-nav__cta { margin-left: 10px; font-family: var(--font); line-height: 1.2; }
.site-nav__cta.is-active { box-shadow: 0 0 0 3px rgba(245, 158, 11, .35); }
.site-nav :focus-visible, .site-drawer :focus-visible, .site-footer :focus-visible, .co-subnav :focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }

/* hamburger */
.site-nav__burger {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 44px; height: 44px; margin-right: -8px; padding: 0; border: 0; border-radius: 12px;
    background: transparent; color: #fff; cursor: pointer; line-height: 1;
}
.site-nav__burger:hover { background: rgba(255, 255, 255, .08); }
.site-nav__burger-bars, .site-nav__burger-bars::before, .site-nav__burger-bars::after {
    display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; position: relative;
}
.site-nav__burger-bars::before, .site-nav__burger-bars::after { content: ""; position: absolute; left: 0; }
.site-nav__burger-bars::before { top: -7px; }
.site-nav__burger-bars::after { top: 7px; }

/* ---------- sertarul de pe mobil ---------- */
.site-drawer { position: fixed; inset: 0; z-index: 2000; visibility: hidden; pointer-events: none; font-family: var(--font); }
.site-drawer__backdrop { position: absolute; inset: 0; background: rgba(2, 8, 23, .55); opacity: 0; transition: opacity .25s ease; }
.site-drawer__panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 360px);
    display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
    background: radial-gradient(500px 300px at 100% 0%, rgba(37, 99, 235, .35), transparent 60%), var(--navy);
    box-shadow: -24px 0 48px rgba(2, 8, 23, .35);
    transform: translateX(100%); transition: transform .28s ease;
    padding: 0 16px calc(24px + env(safe-area-inset-bottom));
}
.site-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--site-nav-h); flex: 0 0 auto; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.site-drawer__close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -8px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: #fff; cursor: pointer; }
.site-drawer__close:hover { background: rgba(255, 255, 255, .08); }
.site-drawer__close svg { width: 22px; height: 22px; fill: currentColor; }
.site-drawer__links { display: flex; flex-direction: column; gap: 4px; padding-top: 16px; }
.site-drawer__link {
    display: block; padding: 13px 14px; border-radius: 12px;
    color: #E2E8F0 !important; text-decoration: none; font: 700 17px/1.3 var(--font);
}
.site-drawer__link:hover { background: rgba(255, 255, 255, .06); color: #fff !important; }
.site-drawer__link.is-active { background: rgba(96, 165, 250, .16); color: #fff !important; box-shadow: inset 3px 0 0 var(--blue-light); }
/* grupul "Pentru CAR-uri" din sertar: titlu (nu e link) + sub-linkuri indentate, fara acordeon */
.site-drawer__group { display: flex; flex-direction: column; gap: 2px; }
.site-drawer__group-title {
    display: block; margin-top: 12px; padding: 6px 14px 4px;
    color: #94A3B8; font: 700 12px/1.3 var(--font); letter-spacing: .08em; text-transform: uppercase;
}
.site-drawer__link--sub { padding: 10px 14px 10px 28px; font: 600 15px/1.3 var(--font); }
.site-drawer__group + .site-drawer__link { margin-top: 8px; }
.site-drawer__cta { margin-top: 16px; font-family: var(--font); line-height: 1.2; }
html.site-drawer-open { overflow: hidden; }
html.site-drawer-open .site-drawer { visibility: visible; pointer-events: auto; }
html.site-drawer-open .site-drawer__backdrop { opacity: 1; }
html.site-drawer-open .site-drawer__panel { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
    .site-drawer__backdrop, .site-drawer__panel, .site-nav__link,
    .site-nav__dd-chevron, .site-nav__dd-panel, .site-nav__dd.is-open .site-nav__dd-panel, .site-nav__dd-link { transition: none; }
    .site-nav__dd-panel { transform: none; }
}

/* ---------- desktop: linkurile in bara, fara hamburger ---------- */
@media (min-width: 1140px) {
    .site-nav__links { display: flex; }
    .site-nav__burger { display: none; }
    html.site-drawer-open { overflow: auto; }
    html.site-drawer-open .site-drawer { visibility: hidden; pointer-events: none; }
}
/* Meniul are 6 elemente in bara (din 2026-10-14 Software, Credite online, F3000 si restul
   paginilor pentru CAR-uri stau in dropdown-ul "Pentru CAR-uri"): incape de la 1140px cu
   logo-ul intreg si linkuri la 14px, deci nu mai e nevoie de compresia 1140-1199px. */
@media (min-width: 1140px) {
    .site-nav__logo { flex: 0 0 auto; }
}

/* ---------- sub-bara landing-urilor (ancore + CTA), doar >= 768px ---------- */
.co-subnav { display: none; }
@media (min-width: 768px) {
    .co-subnav {
        display: block; position: sticky; top: var(--site-nav-h); z-index: 999;
        background: rgba(18, 42, 77, .94);
        backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
        border-bottom: 1px solid rgba(255, 255, 255, .08);
        font-family: var(--font);
    }
    .co-subnav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 48px; }
    .co-subnav__links { display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
    .co-subnav__links::-webkit-scrollbar { display: none; }
    .co-subnav__links a {
        flex: 0 0 auto; padding: 6px 11px; border-radius: 999px;
        color: #CBD5E1; text-decoration: none; font: 600 14px/1.2 var(--font); white-space: nowrap;
        transition: color .2s ease, background .2s ease;
    }
    .co-subnav__links a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
    .co-subnav__links a.is-current { color: #fff; background: rgba(96, 165, 250, .16); }
    .co-subnav .co-btn--sm { flex: 0 0 auto; padding: 7px 14px; }

    /* ancorele si elementele lipicioase tin cont de header + sub-bara */
    html.has-subnav .co-form input, html.has-subnav .co-form textarea, html.has-subnav .co-form select { scroll-margin-top: calc(var(--site-nav-h) + var(--site-subnav-h) + 32px); }
}
@media (min-width: 1024px) {
    html.has-subnav main .co-lead-sec__copy, html.has-subnav main .co-dossier { top: calc(var(--site-nav-h) + var(--site-subnav-h) + 24px); }
}
/* ancorele din pagina nu ajung sub header (si sub sub-bara, pe landing-uri) */
main [id], .page-body [id] { scroll-margin-top: calc(var(--site-nav-h) + var(--site-subnav-h) + 8px); }

/* ---------- footer ---------- */
.site-footer { background: #07142A; color: #94A3B8; padding: 48px 0 32px; font: 400 14px/1.6 var(--font); }
.site-footer__top { display: grid; gap: 32px; }
.site-footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; }
.site-footer__title { display: block; margin-bottom: 12px; color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer li { line-height: 1.4; }
.site-footer ul a { display: inline; color: #CBD5E1 !important; text-decoration: none; }
.site-footer ul a:hover { color: #fff !important; text-decoration: underline; }
.site-footer__bottom { display: flex; flex-direction: column; gap: 16px; margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .08); }
.site-footer__logos { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.site-footer__logos a { display: inline-block; line-height: 0; }
.site-footer__logos img { display: block; height: 36px; width: auto; max-width: 100%; border-radius: 6px; }
.site-footer__copy { margin: 0; font-family: var(--font); color: #94A3B8; }
.site-footer__copy a { display: inline; color: #CBD5E1 !important; text-decoration: none; }
.site-footer__copy a:hover { color: #fff !important; text-decoration: underline; }
.site-footer--sticky-cta { padding-bottom: 110px; }
@media (min-width: 768px) {
    .site-footer { padding-top: 64px; }
    .site-footer__cols { grid-template-columns: repeat(4, 1fr); }
    .site-footer__bottom { flex-direction: row; align-items: center; justify-content: space-between; }
    .site-footer--sticky-cta { padding-bottom: 32px; }
    .site-footer__logos img { height: 44px; }
}
@media (min-width: 1024px) {
    .site-footer__top { grid-template-columns: 240px 1fr; gap: 48px; }
}
