/* ============================================
   Generator Cereri MoldATSA — Stiluri
   ============================================ */

:root {
    --primary: #1a5276;
    --primary-light: #2980b9;
    --accent: #e67e22;
    --accent-light: #f39c12;
    --bg: #f0f4f8;
    --card-bg: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #dce1e8;
    --success: #27ae60;
    --danger: #e74c3c;
    --radius: 8px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ============================================
   Header — bară compactă cu logo propriu
   ============================================ */
/* Antetul și navigația formează un singur card alb: antetul ține colțurile
   de sus, nav-ul pe cele de jos. */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: var(--card-bg);
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.brand-mark {
    flex: 0 0 auto;
    display: block;
    line-height: 0;
}
/* Marca: patru rotoare pe o cruce, într-un cerc de scanare — dronă + spațiu aerian */
.bm-ring   { fill: none; stroke: var(--border); stroke-width: 1.5; }
.bm-ring-2 { stroke: var(--primary-light); opacity: 0.35; }
.bm-arms   { stroke: var(--primary); stroke-width: 2.2; stroke-linecap: round; }
.bm-rotor  { fill: none; stroke: var(--primary-light); stroke-width: 1.8; }
.bm-core   { fill: var(--accent); }

.brand-text { display: flex; flex-direction: column; min-width: 0; }

.brand-name {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--primary);
    line-height: 1.1;
}
.brand-dot { color: var(--accent); }
.brand-tld { color: var(--accent); }

.brand-tagline {
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.35;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Profile bar */
.profile-bar {
    background: #eafaf1;
    border: 1px solid var(--success);
    border-radius: var(--radius);
    padding: 10px 16px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9rem;
    color: #1e8449;
}

/* Form */
.flight-form {
    background: var(--card-bg);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 24px 30px;
}

fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

legend {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    padding: 0 10px;
}

.fieldset-note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 14px;
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 180px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: var(--text);
}

.required {
    color: var(--danger);
}

input[type="text"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background: #fafbfc;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.15);
    background: #fff;
}

input[readonly] {
    background: #f0f0f0;
    cursor: default;
}

textarea {
    resize: vertical;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.2s,
        transform 0.1s;
    font-family: inherit;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: #154360;
}

.btn-secondary {
    background: #ecf0f1;
    color: var(--text);
}

.btn-secondary:hover {
    background: #d5dbdb;
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}

.btn-accent:hover {
    background: #d35400;
}

.btn-small {
    padding: 6px 14px;
    font-size: 0.85rem;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

.btn-small:hover {
    background: #c0392b;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}

/* Hartă */
.map-container {
    height: 450px;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    margin-bottom: 10px;
    z-index: 1;
}

.map-container-lg { height: 560px; }
@media (max-width: 600px) { .map-container-lg { height: 420px; } }

/* ---- Pagina principală: harta „pot zbura aici?" ---- */
.map-intro { margin-bottom: 16px; }
.map-intro h2 { color: var(--primary); margin-bottom: 6px; }
.map-intro p { color: var(--text-light); font-size: 0.95rem; }

.verdict {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-left-width: 5px;
    background: #f8f9fa;
    margin-bottom: 16px;
}

.verdict-icon { font-size: 1.8rem; line-height: 1; flex: 0 0 auto; }
/* min-width:0 — fără el copilul de flex nu coboară sub lățimea conținutului
   și textul lung iese în afara cardului în loc să se rupă pe rânduri */
.verdict-body { flex: 1 1 auto; min-width: 0; }
.verdict-title { font-weight: 700; margin-bottom: 4px; }
.verdict-text { font-size: 0.9rem; color: var(--text-light); overflow-wrap: anywhere; }

.verdict-idle     { border-left-color: var(--text-light); }
.verdict-checking { border-left-color: var(--primary-light); }
.verdict-good     { border-left-color: var(--success); background: #f0faf4; }
.verdict-good .verdict-title  { color: var(--success); }
.verdict-bad      { border-left-color: var(--danger); background: #fdf3f2; }
.verdict-bad .verdict-title   { color: var(--danger); }
.verdict-warn     { border-left-color: var(--accent); background: #fdf8f0; }
.verdict-warn .verdict-title  { color: var(--accent); }

.verdict-zones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.zone-chip {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.82rem;
}
.zone-chip b { color: var(--text); }
.zone-chip span { color: var(--text-light); margin-left: 6px; }
.zone-chip-muted { opacity: 0.62; }

.zone-group-head {
    flex: 1 0 100%;
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 6px 0 0;
}

/* ---- Etichete „de ce ai nevoie aici" ---- */
.req-labels:empty { display: none; }
.req-head {
    font-weight: 700;
    font-size: 0.88rem;
    margin: 14px 0 8px;
}
.req-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.req-chip {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--text-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 8px 12px;
}
.req-chip b { display: block; font-size: 0.9rem; }
.req-chip span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 2px;
}
.req-ok   { border-left-color: var(--success); }
.req-ok b { color: var(--success); }
.req-warn { border-left-color: var(--accent); }
.req-warn b { color: var(--accent); }
.req-bad  { border-left-color: var(--danger); }
.req-bad b { color: var(--danger); }

.req-disc {
    font-size: 0.76rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-top: 10px;
}

.border-dist {
    font-size: 0.82rem;
    color: var(--text-light);
}
.border-dist.near {
    color: var(--danger);
    font-weight: 600;
}

/* ---- Bloc pliabil „Detalii despre zone" ---- */
.zone-details {
    margin-top: 14px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}
.zone-details > summary {
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--primary);
    padding: 6px 2px;
    user-select: none;
}
.zone-details > summary::-webkit-details-marker { display: none; }
.zone-details > summary::before {
    content: "▸";
    font-size: 0.9rem;
    transition: transform 0.15s;
    display: inline-block;
}
.zone-details[open] > summary::before { transform: rotate(90deg); }
.zone-details > summary:hover .zd-label { text-decoration: underline; }
.zd-count { color: var(--text-light); font-weight: 400; }
.zone-details .verdict-zones { margin-top: 4px; }

/* ---- Graficul vertical al straturilor de spațiu aerian ---- */
.alt-chart { margin-top: 16px; }
.alt-chart:empty { display: none; }

.alt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 8px;
    font-size: 0.78rem;
    color: var(--text-light);
}
.alt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.alt-sw {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}
.alt-sw-hit  { background: rgba(231, 76, 60, 0.55); }
.alt-sw-high { background: rgba(127, 140, 141, 0.28); }
.alt-sw-info { background: rgba(41, 128, 185, 0.18); }

.alt-chart-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text);
    margin-bottom: 8px;
}
.alt-chart-note {
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-top: 8px;
}

/* graficul se încadrează în lățimea disponibilă — fără derulare orizontală.
   Cadrul se strânge pe lățimea graficului, ca să nu rămână alb gol pe desktop. */
.alt-frame {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 4px;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
}
.alt-svg {
    display: block;
    max-width: 100%;
    height: auto;
}

.alt-grid { stroke: var(--border); stroke-width: 1; }
.alt-tick { font-size: 10px; fill: var(--text-light); }

.alt-bar { stroke: #fff; stroke-width: 1; }
.alt-bar-hit  { fill: rgba(231, 76, 60, 0.55); }
.alt-bar-high { fill: rgba(127, 140, 141, 0.28); }
.alt-bar-info { fill: rgba(41, 128, 185, 0.18); }

.alt-ceiling {
    stroke: var(--danger);
    stroke-width: 2;
    stroke-dasharray: 6 4;
}
.alt-ceiling-lbl {
    font-size: 10px;
    font-weight: 700;
    fill: var(--danger);
}

.alt-lbl {
    font-size: 10px;
    font-weight: 700;
    fill: var(--text);
}
.alt-lbl-sub { font-size: 9px; fill: var(--text-light); }

.map-coords-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #f8f9fa;
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.map-coords-bar .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

.legend {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 20px;
}
.legend h3 { color: var(--primary); font-size: 1rem; margin-bottom: 10px; }
.legend-list { list-style: none; display: grid; gap: 8px; margin: 0 0 10px; padding: 0; }
.legend-list li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.lg-swatch {
    width: 18px; height: 18px; border-radius: 4px; flex: 0 0 18px;
    border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border);
}
.lg-zone { background: rgba(231, 76, 60, 0.45); }
.lg-me   { background: var(--primary-light); border-radius: 50%; }
.lg-pick { background: var(--accent); }
.legend-note { font-size: 0.82rem; color: var(--text-light); line-height: 1.5; }

.next-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.step-card {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s, transform 0.15s;
}
.step-card:hover { border-color: var(--primary-light); transform: translateY(-2px); }
.step-ico { display: block; font-size: 1.5rem; margin-bottom: 6px; }
.step-t   { display: block; font-weight: 600; color: var(--primary); }
.step-d   { display: block; font-size: 0.82rem; color: var(--text-light); margin-top: 3px; }

.footer-social a { font-weight: 600; }

/* ---- Poarta „ai autorizație?" ---- */
.auth-gate {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
    margin-bottom: 20px;
    text-align: center;
}
.auth-gate-inner { max-width: 620px; margin: 0 auto; }
.auth-gate-ico { font-size: 2.4rem; display: block; margin-bottom: 8px; }
.auth-gate h2 { color: var(--primary); margin-bottom: 10px; }
.auth-gate-note {
    color: var(--text-light);
    font-size: 0.93rem;
    line-height: 1.6;
    margin-bottom: 18px;
}
.auth-gate-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.auth-gate-hint {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 14px;
}

.gate-back {
    background: #fdf8f0;
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 20px;
}
.gate-back-title { font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.gate-back-text { font-size: 0.9rem; color: var(--text-light); margin-bottom: 12px; }

/* ---- Restul ajustărilor pentru ecrane mici (pragul inițial de 600px) ---- */
@media (max-width: 600px) {
    .auth-gate { padding: 22px 16px; }
    .auth-gate-actions .btn { width: 100%; }

    /* verdictul: pictograma trece deasupra textului, ca să rămână lățime utilă */
    .verdict { padding: 14px; gap: 10px; }
    .verdict-icon { font-size: 1.5rem; }
    .verdict-title { font-size: 0.98rem; }
    .verdict-text { font-size: 0.86rem; }
    .alt-legend { font-size: 0.72rem; gap: 4px 10px; }
    .alt-chart-note { font-size: 0.74rem; }
    .zone-chip { font-size: 0.78rem; padding: 5px 10px; }

    /* selectorul de straturi: strâns sub pictogramă, iar când e deschis
       nu depășește jumătate din lățimea hărții */
    .leaflet-control-layers-expanded {
        max-width: 58vw;
        font-size: 0.82rem;
        padding: 8px 10px;
    }
    .leaflet-control-layers-expanded label { line-height: 1.5; }
}

.map-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.map-hint {
    font-size: 0.85rem;
    color: var(--text-light);
}

.map-coords-info {
    background: #f8f9fa;
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-top: 8px;
}

.coords-raw {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* Geoportal status */
.geoportal-controls {
    margin-top: 14px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.geoportal-controls h4 {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.geoportal-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    margin-top: 6px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    background: #bdc3c7;
}

.status-indicator.loading {
    background: var(--accent);
    animation: pulse 1s infinite;
}

.status-indicator.loaded {
    background: var(--success);
}

.status-indicator.error {
    background: var(--danger);
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* Result area */
.result-area {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-top: 20px;
}

.result-area h2 {
    color: var(--success);
    margin-bottom: 12px;
}

.pdf-links a {
    display: inline-block;
    margin: 6px 12px 6px 0;
    padding: 10px 20px;
    background: var(--success);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: background 0.2s;
}

.pdf-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.pdf-actions .btn {
    padding: 10px 18px;
    font-size: 0.95rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    font-family: inherit;
}

.pdf-actions .btn-primary {
    background: var(--primary);
    color: #fff;
}

.pdf-actions .btn-primary:hover {
    background: #154360;
}

.pdf-actions .btn-secondary {
    background: #ecf0f1;
    color: var(--text);
}

.pdf-actions .btn-secondary:hover {
    background: #d5dbdb;
}

.pdf-actions .btn-accent {
    background: var(--accent);
    color: #fff;
}

.pdf-actions .btn-accent:hover {
    background: #d35400;
}

@media (max-width: 600px) {
    .pdf-actions {
        flex-direction: column;
    }
    .pdf-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: #fff;
    font-size: 1.2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Navigare principală (toate paginile)
   ============================================ */
.main-nav {
    display: flex;
    gap: 0;
    background: var(--card-bg);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.nav-link {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    background: var(--card-bg);
    transition: background 0.2s, color 0.2s;
    border-bottom: 3px solid transparent;
    /* eticheta rămâne mereu pe o singură linie — altfel meniul își schimbă înălțimea */
    white-space: nowrap;
}

/* Pe desktop burger-ul e ascuns, iar linkurile din .nav-more stau în rând cu celelalte */
.nav-burger { display: none; }
.nav-more { display: contents; }

.nav-link:hover {
    background: #f0f4f8;
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: #f7faff;
}

.beta-badge {
    display: inline-block;
    vertical-align: super;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    background: var(--accent);
    border-radius: 4px;
    padding: 1px 5px;
    line-height: 1.3;
}

/* ---- Navigația pe ecrane mici ----
   Blocul stă DUPĂ regulile de bază ale meniului, altfel ar fi suprascris
   de .nav-more { display: contents } și .main-nav { overflow: hidden }. */
@media (max-width: 700px) {
    /* Pe telefon rămân vizibile doar „Unde zbor" și „Cerere zbor";
       restul paginilor apar într-un dropdown sub butonul burger (≡). */
    .main-nav {
        position: relative;
        overflow: visible; /* altfel dropdown-ul absolut ar fi tăiat */
    }
    .main-nav > .nav-link {
        flex: 1 1 0;
        font-size: 0.85rem;
        padding: 12px 6px;
        white-space: nowrap;
    }
    /* colțul stânga-jos rămâne rotunjit (overflow nu mai taie) */
    .main-nav > .nav-link:first-child { border-radius: 0 0 0 var(--radius); }
    .nav-burger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        flex: 0 0 52px;
        border: none;
        border-left: 1px solid var(--border);
        border-radius: 0 0 var(--radius) 0;
        background: var(--card-bg);
        color: var(--text);
        cursor: pointer;
        padding: 12px 6px;
    }
    .nb-line {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: transform 0.2s, opacity 0.2s;
    }
    /* pe pagina activă din dropdown, burgerul e evidențiat */
    .nav-burger.active { color: var(--primary); background: #f7faff; }
    /* deschis: liniuțele devin un X */
    .nav-burger.is-open { color: var(--primary); }
    .nav-burger.is-open .nb-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .nav-burger.is-open .nb-line:nth-child(2) { opacity: 0; }
    .nav-burger.is-open .nb-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    /* dropdown-ul: card plutitor sub meniu, aliniat la dreapta */
    .main-nav .nav-more {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        min-width: 220px;
        flex-direction: column;
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
        overflow: hidden;
        z-index: 1100;
    }
    .main-nav .nav-more.open { display: flex; }
    .nav-more .nav-link {
        flex: none;
        text-align: left;
        font-size: 0.92rem;
        padding: 13px 16px;
        border-bottom: 1px solid var(--border);
    }
    .nav-more .nav-link:last-child { border-bottom: none; }
    .nav-more .nav-link.active {
        border-left: 3px solid var(--primary);
        background: #f7faff;
    }
}

/* Comutator limbă — pastile conturate pe fundal alb */
.lang-switch {
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
    background: var(--bg);
    border-radius: 999px;
    padding: 3px;
}

.lang-switch a {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-light);
    transition: background 0.2s, color 0.2s;
}

.lang-switch a:hover { color: var(--primary); }

.lang-switch a.on {
    background: var(--primary);
    color: #fff;
}

/* Footer comun */
.site-footer {
    text-align: center;
    padding: 20px 10px 30px;
    color: var(--text-light);
    font-size: 0.85rem;
}

.site-footer a {
    color: var(--primary-light);
}

/* ============================================
   Localizator dronă pierdută
   ============================================ */
.page-lead {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 0.95rem;
    color: var(--text);
}

.locator-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.locator-panel {
    border-radius: var(--radius);
}

.locator-map-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.map-container-tall {
    height: 380px;
}

/* Segmented control */
.seg {
    display: flex;
    background: #eef2f6;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.seg button {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.seg button.on {
    background: var(--primary);
    color: #fff;
}

/* Upload fișier */
.file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-file {
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
}

.file-name {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Ghid log pliabil */
.howto {
    margin-top: 12px;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.9rem;
}

.howto summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary);
}

.howto ol {
    margin: 10px 0 4px 20px;
}

.howto li {
    margin-bottom: 6px;
}

/* Corecție spoofing */
.spoof-box {
    border-color: #d6c9f0;
    background: #fbfaff;
}

.spoof-box legend {
    color: #6c3483;
}

.spoof-status {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    line-height: 1.5;
}

.spoof-status.ok {
    background: #eafaf1;
    border: 1px solid var(--success);
    color: #1e8449;
}

.spoof-status.warn {
    background: #fef9e7;
    border: 1px solid #f1c40f;
    color: #7d6608;
}

.spoof-status.err {
    background: #fdedec;
    border: 1px solid var(--danger);
    color: #922b21;
}

/* Legendă hartă locator */
.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--text);
}

.map-legend .li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.map-legend .dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}

.pin-lbl {
    font-weight: 700;
    font-size: 11px;
}

/* Rezultat locator */
.stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}

.stat .k {
    font-size: 0.9rem;
    color: var(--text-light);
}

.stat .v {
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.stat .v.big {
    font-size: 1.3rem;
    color: var(--primary);
}

.stat .v.danger {
    color: var(--danger);
}

.stat .v.mono {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.85rem;
}

#out .note {
    margin-top: 12px;
    font-size: 0.88rem;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    line-height: 1.5;
}

#out .disc {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
}

/* Salvare caz */
.case-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.case-box legend {
    font-weight: 700;
    color: var(--primary);
    padding: 0 8px;
}

.case-result {
    margin-top: 12px;
    background: #eafaf1;
    border: 1px solid var(--success);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-size: 0.9rem;
}

.case-link {
    display: block;
    word-break: break-all;
    color: var(--primary-light);
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    margin-top: 4px;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

/* ============================================
   Responsive — mobile first
   ============================================ */

/* Desktop: locator pe două coloane */
@media (min-width: 1000px) {
    .locator-layout {
        flex-direction: row;
        align-items: flex-start;
    }
    .locator-panel {
        flex: 0 0 420px;
        max-width: 420px;
    }
    .locator-map-col {
        flex: 1;
        position: sticky;
        top: 10px;
    }
    .map-container-tall {
        height: 520px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    header h1 {
        font-size: 1.4rem;
    }
    .form-row {
        flex-direction: column;
    }
    .form-row .form-group {
        min-width: unset;
    }
    .map-container {
        height: 300px;
    }
    .form-actions {
        flex-direction: column;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
    .nav-link {
        font-size: 0.82rem;
        padding: 12px 4px;
    }
    .flight-form {
        padding: 14px 12px 20px;
    }
    fieldset {
        padding: 14px 12px;
    }
    .stat .v.big {
        font-size: 1.1rem;
    }
    .site-header { padding: 10px 12px; }
    .brand { gap: 9px; }
    .brand-mark svg { width: 27px; height: 27px; }
    .brand-name { font-size: 1.15rem; }
    /* pe telefon taglina ar împinge comutatorul de limbă — o ascundem,
       titlul paginii spune oricum ce faci acolo */
    .brand-tagline { display: none; }
    .lang-switch a { padding: 5px 10px; font-size: 0.78rem; }
}

/* ============ Pagina Linkuri utile ============ */
.links-intro {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 22px;
    margin-bottom: 20px;
}
.links-intro h2 { color: var(--primary); margin-bottom: 8px; }
.links-intro p { color: var(--text); }

.links-section { margin-bottom: 26px; }
.links-section-title {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 12px;
}
.links-section-title .ls-icon { margin-right: 4px; }

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.link-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, transform 0.15s;
}
.link-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}
.lc-title { font-weight: 700; color: var(--primary); }
.lc-desc { font-size: 0.88rem; color: var(--text); }
.lc-host { font-size: 0.76rem; color: var(--text-light); }
.lc-badge {
    display: inline-block;
    vertical-align: middle;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    background: var(--accent);
    border-radius: 4px;
    padding: 1px 6px;
    line-height: 1.4;
}
.links-note {
    font-size: 0.82rem;
    color: var(--text-light);
    margin: 4px 2px 20px;
}

/* ============ Pagina 404 ============ */
.notfound {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px 24px;
    text-align: center;
    margin-bottom: 24px;
}
.notfound .nf-code {
    font-size: 3.4rem;
    font-weight: 800;
    color: var(--primary-light);
    line-height: 1;
    margin-bottom: 8px;
}
.notfound h2 { color: var(--primary); margin-bottom: 8px; }
.notfound p { color: var(--text); margin-bottom: 12px; }
