/* Flyglidar - bendras dizainas (2026-10). Naudoja templates/site_header.php ir site_footer.php.
   Spalvos ir dydžiai - kintamieji :root, kad visi puslapiai atrodytų vienodai. */

/* Spalvos - Flyglidar brandbook: navy #03122B / #082247, mėlyna #0088FF, žydra #00D5FF.
   Tema: šviesi / tamsi - html[data-theme], pagal nutylėjimą pagal įrenginio nustatymą (templates/site_header.php). */
:root {
    --sky-900: #03122B;
    --sky-800: #082247;
    --sky-700: #0066CC;
    --sky-500: #0088FF;
    --sky-300: #00D5FF;
    --sky-100: #EBF8FF;
    --sun-600: #0066CC;
    --sun-500: #0088FF;
    --sun-400: #00D5FF;
    --ok: #2e7d32;
    /* Paviršiai (keičiasi su tema) */
    --ink: #03122B;
    --muted: #55687B;
    --line: #E2E8F0;
    --bg: #F8FAFC;
    --bg-alt: #FFFFFF;
    --card: #FFFFFF;
    --shadow: 0 10px 30px rgba(3, 18, 43, 0.10);
    --link: #0088FF;
    --radius: 18px;
    --max: 1180px;
    --font: "Montserrat", "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --ink: #E3EEF7;
    --muted: #97ACC0;
    --line: #1C3550;
    --bg: #05131F;
    --bg-alt: #0A1D2D;
    --card: #0E2436;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --link: #7DD3FC;
    --sky-100: #0F2C44;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.site {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.site a { color: var(--link); }
.site img { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------------------------------------------------------------- Antraštė */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(3, 18, 43, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header.on-hero { position: fixed; left: 0; right: 0; background: linear-gradient(rgba(3, 18, 43, 0.75), rgba(3, 18, 43, 0)); border: 0; backdrop-filter: none; }
.site-header.on-hero.scrolled { background: rgba(3, 18, 43, 0.92); backdrop-filter: blur(10px); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: .2px; white-space: nowrap; }
/* Flyglidar logotipas: ikona + pavadinimas */
.brand { gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: 0.5px; text-transform: uppercase; }
.brand img { height: 36px; width: 36px; border-radius: 9px; }
.brand .fly { font-weight: 400; color: #00D5FF; }
.brand .glidar { font-weight: 800; color: #fff; }
.theme-toggle { background: none; border: 0; color: #dce8f5; font-size: 18px; cursor: pointer; padding: 8px 10px; border-radius: 10px; }
.theme-toggle:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav > li { list-style: none; position: relative; }
.nav, .nav ul { margin: 0; padding: 0; }
.nav > li > a, .nav > li > button {
    display: block; padding: 10px 14px; border-radius: 10px;
    color: #dce8f5; text-decoration: none; font-weight: 600; font-size: 15px;
    background: none; border: 0; cursor: pointer; font-family: inherit;
}
.nav > li > a:hover, .nav > li > button:hover, .nav > li.active > a { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav .sub {
    display: none; position: absolute; top: 100%; left: 0; min-width: 230px;
    background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; z-index: 10;
}
.nav > li:hover .sub, .nav > li:focus-within .sub { display: block; }
.nav .sub li { list-style: none; }
.nav .sub a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15px; }
.nav .sub a:hover { background: var(--sky-100); }
.nav .sub a small { display: block; color: var(--muted); font-size: 12px; }
.nav .cta > a { background: var(--sun-500); color: #fff; }
.nav .cta > a:hover { background: var(--sun-600); }
.nav .signin-btn > a { background: rgba(255,255,255,.13); border-radius: 20px; padding: 6px 15px; color: #fff; font-weight: 600; font-size: 14px; }
.nav .signin-btn > a:hover { background: rgba(255,255,255,.22); }
.nav .admin > a { color: #ff8a80; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; padding: 6px 10px; }

@media (max-width: 960px) {
    .nav-toggle { display: block; margin-left: 0; }
    .theme-toggle { margin-left: auto; }
    .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
        background: var(--sky-900); padding: 10px 16px 20px; gap: 2px; max-height: calc(100vh - 68px); overflow-y: auto; }
    .nav.open { display: flex; }
    .nav .sub { display: block; position: static; box-shadow: none; background: transparent; padding: 0 0 6px 14px; }
    .nav .sub a { color: #b9cde2; padding: 7px 10px; }
    .nav .sub a small { color: #7f97b0; }
    .nav .sub a:hover { background: rgba(255, 255, 255, 0.06); }
}

/* ---------------------------------------------------------------- Mygtukai */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 24px; border-radius: 14px; font-weight: 700; font-size: 16px;
    text-decoration: none !important; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s;
    font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-sun { background: var(--sun-500); color: #fff !important; box-shadow: 0 8px 24px rgba(0, 136, 255, 0.35); }
.btn-sun:hover { background: var(--sun-600); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.55); color: #fff !important; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.10); }
.btn-sky { background: var(--sky-500); color: #fff !important; }
.btn-outline { border-color: var(--link); color: var(--link) !important; background: transparent; }
.btn i { font-size: 20px; }
.btn .two { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.btn .two small { font-weight: 500; font-size: 12px; opacity: .85; }

/* ---------------------------------------------------------------- Sekcijos */
.section { padding: 84px 0; }
.section.alt { background: var(--bg-alt); }
.section.dark { background: var(--sky-900); color: #dce8f5; }
.eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: 13px; font-weight: 700; color: var(--sun-600); margin: 0 0 10px; }
.section.dark .eyebrow { color: var(--sun-400); }
.h2 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; margin: 0 0 14px; font-weight: 800; letter-spacing: -0.5px; }
.lead { font-size: 18px; color: var(--muted); max-width: 720px; margin: 0 0 36px; }
.section.dark .lead { color: #a9bfd6; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } .section { padding: 60px 0; } }

/* Telefono rėmelis ekrano nuotraukoms */
.phone {
    width: 270px; aspect-ratio: 9 / 20; border-radius: 38px; padding: 10px; background: #0d1520;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), inset 0 0 0 2px #2b3a4d; overflow: hidden; flex-shrink: 0;
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 28px; display: block; }

/* ---------------------------------------------------------------- Poraštė */
.site-footer { background: var(--sky-900); color: #a9bfd6; padding: 56px 0 28px; font-size: 15px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: 15px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: #a9bfd6; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: 36px; padding-top: 18px; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 800px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }

/* Tamsioje temoje tamsios sekcijos - Flyglidar navy, kad atsiskirtų nuo fono */
:root[data-theme="dark"] .section.dark { background: #091A32; }
:root[data-theme="dark"] .site-footer { background: #020C1B; }

/* Language picker */
.language-selector { display: flex; align-items: center; margin-right: 4px; }

.lang-picker { position: relative; }

.lang-btn {
    display: flex; align-items: center; gap: 5px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    padding: 5px 9px;
    font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.85);
    cursor: pointer; white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}
.lang-btn:hover, .lang-picker.open .lang-btn {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.35);
    color: #fff;
}
.lang-btn .fa-globe { font-size: 12px; opacity: 0.7; }

.lang-list {
    display: none;
    position: absolute; right: 0; top: calc(100% + 6px);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    min-width: 130px; padding: 4px 0;
    list-style: none; margin: 0; z-index: 200;
}
.lang-picker.open .lang-list { display: block; }
.lang-list li a {
    display: block; padding: 7px 14px;
    font-size: 13px; color: var(--ink); text-decoration: none;
    transition: background 0.1s;
}
.lang-list li a:hover { background: var(--hover); }
.lang-list li.active a { color: var(--primary); font-weight: 600; }

@media (max-width: 768px) {
    .language-selector { margin: 8px 0; justify-content: center; }
    .lang-list { right: auto; left: 0; }
    .site-header .wrap { grid-template-columns: 1fr auto auto auto; }
}

/* ---- Meniu: ilgi vertimai (LT) nelūžta ir nesulenkia mygtukų ---- */
.nav > li > a, .nav > li > button { white-space: nowrap; }
.nav .signin-btn > a { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
@media (min-width: 961px) and (max-width: 1280px) {
    .site-header .wrap { gap: 14px; }
    .nav { gap: 2px; }
    .nav > li > a, .nav > li > button { padding: 10px 9px; font-size: 14px; }
    .nav .signin-btn > a { padding: 6px 11px; font-size: 13px; }
}

/* ---- v2: logotipas niekada nesitraukia; antraštė plati; meniu kompaktiškas ir plotyje > 960 ---- */
.site-header .wrap { max-width: 1320px; gap: 16px; }
.brand { flex-shrink: 0; }
.nav { min-width: 0; }
.nav > li > a, .nav > li > button { padding: 10px 10px; font-size: 14px; }
.nav .signin-btn > a { padding: 6px 12px; font-size: 13px; }

/* ---- v3: meniu centruojamas antraštėje (logotipas kairėje, valdikliai dešinėje, meniu - per vidurį) ---- */
@media (min-width: 961px) {
    .site-header .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
    .brand { justify-self: start; }
    .nav { margin-left: 0; justify-self: center; }
    /* Kalbos pasirinkimas ir temos mygtukas - ta pati dešinioji sritis, mygtukas tiesiai dešinėje */
    .language-selector, .theme-toggle { grid-column: 3; grid-row: 1; }
    .theme-toggle { justify-self: end; }
    .language-selector { justify-self: end; margin-right: 48px; }
}
