/* ═══════════════════════════════════════════════════════
   ORION EXPRESS — Global Styles with Dark/Light Themes
   Версия: исправлена контрастность текста
   ═══════════════════════════════════════════════════════ */

/* ── LIGHT THEME (по умолчанию) ── */
:root {
    --primary: #0A2540;
    --primary-hover: #0d2e4f;
    --accent: #E85D04;
    --accent-hover: #d14f00;
    --bg: #F8F9FA;
    --bg-header: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-hero-start: #0A2540;
    --bg-hero-end: #1a3a5c;
    --bg-geo: #0A2540;
    --bg-cta: #0A2540;
    --bg-footer: #051626;
    --text: #1a1a2e;
    --text-secondary: #2d3748;
    --text-muted: #4a5568;
    --text-on-dark: #FFFFFF;
    --text-on-hero: #FFFFFF;
    --border: #e2e8f0;
    --border-glass: rgba(0,0,0,0.08);
    --shadow: 0 5px 20px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
    --input-bg: #FFFFFF;
    --input-border: #cbd5e1;
    --input-text: #1a1a2e;
    --glass-bg: rgba(255,255,255,0.95);
    --glass-bg-hover: rgba(248,250,252,1);
    --glass-border: rgba(0,0,0,0.08);
    --tag-bg: rgba(100,116,139,0.12);
    --tag-text: #374151;
    --tag-success-bg: rgba(16,185,129,0.12);
    --tag-success-text: #047857;
    --tag-warning-bg: rgba(245,158,11,0.12);
    --tag-warning-text: #b45309;
    --tag-info-bg: rgba(59,130,246,0.12);
    --tag-info-text: #1d4ed8;
    --tag-danger-bg: rgba(239,68,68,0.12);
    --tag-danger-text: #b91c1c;
    --tag-purple-bg: rgba(139,92,246,0.12);
    --tag-purple-text: #6d28d9;
    --scrollbar-thumb: #cbd5e1;
    --scrollbar-track: transparent;
}

/* ── DARK THEME ── */
[data-theme="dark"] {
    --primary: #3B82F6;
    --primary-hover: #2563eb;
    --accent: #E85D04;
    --accent-hover: #f06a15;
    --bg: #0B1120;
    --bg-header: #0F172A;
    --bg-card: #152238;
    --bg-hero-start: #0A1628;
    --bg-hero-end: #0F172A;
    --bg-geo: #0A1628;
    --bg-cta: #0A1628;
    --bg-footer: #050B14;
    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-on-dark: #f1f5f9;
    --text-on-hero: #FFFFFF;
    --border: rgba(255,255,255,0.1);
    --border-glass: rgba(255,255,255,0.1);
    --shadow: 0 5px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
    --input-bg: #1E293B;
    --input-border: rgba(255,255,255,0.18);
    --input-text: #f1f5f9;
    --glass-bg: rgba(15,23,42,0.85);
    --glass-bg-hover: rgba(21,34,56,0.95);
    --glass-border: rgba(255,255,255,0.1);
    --tag-bg: rgba(148,163,184,0.18);
    --tag-text: #cbd5e1;
    --tag-success-bg: rgba(16,185,129,0.18);
    --tag-success-text: #6ee7b7;
    --tag-warning-bg: rgba(245,158,11,0.18);
    --tag-warning-text: #fcd34d;
    --tag-info-bg: rgba(59,130,246,0.18);
    --tag-info-text: #93c5fd;
    --tag-danger-bg: rgba(239,68,68,0.18);
    --tag-danger-text: #fca5a5;
    --tag-purple-bg: rgba(139,92,246,0.18);
    --tag-purple-text: #c4b5fd;
    --scrollbar-thumb: #334155;
    --scrollbar-track: transparent;
}

/* ── Base ── */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
html { scroll-behavior: smooth; }

/* Убираем стрелочки (spin buttons) у числовых полей */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

body {
    color: var(--text);
    line-height: 1.6;
    background-color: var(--bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════ */
header {
    background: var(--bg-header);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky; top: 0; z-index: 100;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
[data-theme="dark"] header {
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border-bottom: 1px solid var(--border);
}
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; }

.logo-link { text-decoration: none; display: block; cursor: pointer; transition: opacity 0.2s; }
.logo-link:hover { opacity: 0.8; }
.logo {
    font-size: 1.5rem; font-weight: 800;
    color: var(--text);
    text-transform: uppercase; letter-spacing: 1px;
    transition: color 0.3s ease;
}
[data-theme="light"] .logo { color: var(--primary); }
.logo span { color: var(--accent); }

.nav-right { display: flex; align-items: center; }
.nav-links { display: flex; align-items: center; }
.nav-links a {
    margin-left: 24px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent); }

.portal-btn {
    background: #E85D04 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 7px 14px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #E85D04 !important;
    transition: all 0.2s ease !important;
    margin-left: 20px !important;
    margin-right: 6px !important;
    box-shadow: 0 2px 6px rgba(232, 93, 4, 0.25) !important;
    flex-shrink: 0 !important;
}
.portal-btn:hover {
    background: #D14F00 !important;
    border-color: #D14F00 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(232, 93, 4, 0.35) !important;
}

.header-contacts { text-align: right; font-size: 0.9rem; margin-left: 12px; }
.header-contacts a { color: var(--text-secondary); text-decoration: none; font-weight: 600; display: block; transition: color 0.3s; }
.header-contacts a:hover { color: var(--accent); }

/* Language + Theme switchers */
.lang-switcher { display: flex; gap: 5px; margin-left: 4px; }
.lang-btn {
    display: inline-block; padding: 5px 12px;
    border: 1px solid var(--primary); background: transparent;
    color: var(--text-secondary); border-radius: 3px;
    font-size: 0.85rem; font-weight: 600; transition: all 0.2s;
    text-decoration: none; cursor: pointer;
}
.lang-btn.active { background: var(--primary); color: var(--text-on-dark); cursor: default; }
.lang-btn:hover:not(.active) { background: rgba(10, 37, 64, 0.1); }
[data-theme="dark"] .lang-btn { border-color: #94a3b8; color: #cbd5e1; }
[data-theme="dark"] .lang-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
[data-theme="dark"] .lang-btn:hover:not(.active) { background: rgba(255,255,255,0.08); }

.theme-btn {
    background: none;
    border: 1px solid var(--primary);
    color: var(--text-secondary);
    border-radius: 3px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    margin-left: 10px;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    min-width: 36px; height: 32px;
}
.theme-btn:hover { background: rgba(10, 37, 64, 0.1); }
[data-theme="dark"] .theme-btn { border-color: #94a3b8; color: #cbd5e1; }
[data-theme="dark"] .theme-btn:hover { background: rgba(255,255,255,0.08); }
[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }

/* ═══════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════ */
.hero {
    background: linear-gradient(135deg, var(--bg-hero-start) 0%, var(--bg-hero-end) 100%);
    color: var(--text-on-hero);
    padding: 100px 0; text-align: center;
    position: relative; overflow: hidden;
}
[data-theme="dark"] .hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 60% 50% at 70% 30%, rgba(232, 93, 4, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero h1 { font-size: 3rem; margin-bottom: 20px; line-height: 1.2; }
.hero .subtitle { font-size: 1.5rem; color: var(--accent); font-weight: 600; margin-bottom: 30px; }
.hero p { font-size: 1.2rem; max-width: 800px; margin: 0 auto 40px; opacity: 0.9; }

/* ═══════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════ */
.btn {
    display: inline-block; background: var(--accent); color: var(--text-on-dark);
    padding: 15px 35px; border-radius: 5px; text-decoration: none;
    font-weight: 700; font-size: 1.1rem;
    transition: transform 0.2s, background 0.3s;
    border: none; cursor: pointer;
}
.btn:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-2px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.back-link {
    display: inline-block; margin-bottom: 16px;
    color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.9rem;
}
.back-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════
   TAGS
   ═══════════════════════════════════════════════════════ */
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.tag {
    background: rgba(255,255,255,0.1);
    padding: 8px 16px; border-radius: 20px;
    font-size: 0.9rem; border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-on-hero);
}

.tag-default { background: var(--tag-bg); color: var(--tag-text); border: 1px solid transparent; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.tag-success { background: var(--tag-success-bg); color: var(--tag-success-text); }
.tag-warning { background: var(--tag-warning-bg); color: var(--tag-warning-text); }
.tag-info { background: var(--tag-info-bg); color: var(--tag-info-text); }
.tag-danger { background: var(--tag-danger-bg); color: var(--tag-danger-text); }
.tag-purple { background: var(--tag-purple-bg); color: var(--tag-purple-text); }

/* ═══════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════ */
section { padding: 80px 0; }
.section-title {
    text-align: center; font-size: 2.2rem;
    color: var(--text);
    margin-bottom: 50px; position: relative;
    transition: color 0.3s ease;
}
.section-title::after {
    content: ''; display: block;
    width: 60px; height: 4px;
    background: var(--accent);
    margin: 15px auto 0; border-radius: 2px;
}

/* ── Services Grid ── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card {
    background: var(--bg-card);
    padding: 30px; border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, background-color 0.3s, box-shadow 0.3s;
    border-top: 4px solid var(--accent);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card h3 { color: var(--text); margin-bottom: 15px; font-size: 1.3rem; transition: color 0.3s; }
.card p { color: var(--text-secondary); transition: color 0.3s; }
.card ul { list-style: none; padding-left: 0; }
.card ul li {
    margin-bottom: 10px; padding-left: 20px; position: relative;
    color: var(--text-secondary); transition: color 0.3s;
}
.card ul li::before { content: '✓'; color: var(--accent); position: absolute; left: 0; font-weight: bold; }

/* ── Geography ── */
.geo { background: var(--bg-geo); color: var(--text-on-hero); text-align: center; transition: background-color 0.3s; }
.geo .section-title { color: var(--text-on-hero); }
.geo-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; font-size: 1.2rem; font-weight: 500; }
.geo-item { background: rgba(255,255,255,0.1); padding: 10px 25px; border-radius: 5px; }

/* ── Team ── */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 40px; }
.team-card {
    background: var(--bg-card);
    padding: 40px; border-radius: 10px; text-align: center;
    box-shadow: var(--shadow);
    transition: background-color 0.3s, box-shadow 0.3s;
}
.team-card h3 { color: var(--text); font-size: 1.5rem; margin-bottom: 10px; transition: color 0.3s; }
.team-card .role { color: var(--accent); font-weight: 600; margin-bottom: 20px; display: block; }
.team-card p { color: var(--text-secondary); transition: color 0.3s; }
.team-card .contact { margin-top: 20px; font-size: 1.1rem; }
.team-card .contact a { color: var(--text-secondary); text-decoration: none; display: block; margin: 5px 0; transition: color 0.2s; }
.team-card .contact a:hover { color: var(--accent); }

/* ── Advantages ── */
.advantages { background: var(--bg); transition: background-color 0.3s; }
.adv-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.adv-item {
    background: var(--bg-card);
    padding: 25px; border-radius: 8px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow);
    transition: background-color 0.3s, box-shadow 0.3s;
}
.adv-item h4 { color: var(--text); margin-bottom: 10px; transition: color 0.3s; }
.adv-item p { color: var(--text-secondary); transition: color 0.3s; }
[data-theme="dark"] .adv-item { border-left-color: var(--accent); }

/* ── CTA Section ── */
.cta-section {
    background: var(--bg-cta);
    color: var(--text-on-hero);
    text-align: center;
    transition: background-color 0.3s;
}
.cta-section .section-title { color: var(--text-on-hero); }

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
footer {
    background: var(--bg-footer);
    color: rgba(255,255,255,0.8);
    padding: 50px 0 20px; text-align: center;
    transition: background-color 0.3s;
}
footer .logo { color: #fff; }
footer .footer-contacts { margin-bottom: 30px; }
footer .footer-contacts a { color: rgba(255,255,255,0.9); text-decoration: none; margin: 0 15px; font-size: 1.1rem; transition: color 0.2s; }
footer .footer-contacts a:hover { color: var(--accent); }
footer .copyright { font-size: 0.9rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; margin-top: 20px; color: rgba(255,255,255,0.7); }
footer .copyright a { color: var(--accent); text-decoration: none; font-weight: 600; }

/* ═══════════════════════════════════════════════════════
   CALCULATOR PAGE
   ═══════════════════════════════════════════════════════ */
.calc-wrapper { max-width: 900px; margin: 0 auto; padding: 40px 20px 80px; }
.calc-title { text-align: center; font-size: 2rem; color: var(--text); margin-bottom: 8px; transition: color 0.3s; }
.calc-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 32px; font-size: 1rem; transition: color 0.3s; }

/* Tabs */
.tabs { display: flex; gap: 0; margin-bottom: 24px; }
.tab-btn {
    flex: 1; padding: 14px 24px;
    border: 2px solid var(--primary);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 700; font-size: 1rem; cursor: pointer; transition: all 0.2s;
}
.tab-btn:first-child { border-radius: 10px 0 0 10px; }
.tab-btn:last-child { border-radius: 0 10px 10px 0; }
.tab-btn.active { background: var(--primary); color: var(--text-on-dark); }
[data-theme="dark"] .tab-btn { border-color: var(--accent); color: #cbd5e1; background: var(--bg-card); }
[data-theme="dark"] .tab-btn.active { background: var(--accent); color: #fff; }

/* Panels */
.calc-panel {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 28px; margin-bottom: 24px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.form-section { margin-bottom: 20px; }
.form-section:last-child { margin-bottom: 0; }
.form-section-title {
    font-size: 0.85rem; font-weight: 700;
    color: var(--text);
    text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: 12px; padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
    transition: color 0.3s;
}
[data-theme="dark"] .form-section-title { color: var(--accent); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

label.form-label {
    display: block; font-size: 0.8rem; font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.03em;
    transition: color 0.3s;
}
/* Убедимся, что лейблы достаточно контрастны в обеих темах */
[data-theme="light"] label.form-label { color: #4a5568; }
[data-theme="dark"] label.form-label { color: #b0bec5; }

input.glass-input, select.glass-select {
    width: 100%; padding: 10px 14px;
    border: 1.5px solid var(--input-border);
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--input-text);
    background: var(--input-bg);
    outline: none; transition: border-color 0.2s, background-color 0.3s, color 0.3s;
    font-family: inherit;
}
input.glass-input::placeholder { color: var(--text-muted); }
input.glass-input:focus, select.glass-select:focus { border-color: var(--accent); }
select.glass-select {
    appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}
[data-theme="dark"] select.glass-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* Autocomplete */
.autocomplete-wrapper { position: relative; }
.autocomplete-list {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-card);
    border: 1.5px solid var(--accent);
    border-radius: 10px; margin-top: 4px;
    max-height: 220px; overflow-y: auto; z-index: 50;
    box-shadow: var(--shadow-lg);
}
.autocomplete-item {
    padding: 10px 14px; cursor: pointer; font-size: 0.9rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: rgba(232, 93, 4, 0.08); }
.autocomplete-item .iata { color: var(--accent); font-weight: 700; margin-left: 6px; }

/* Checkboxes */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.checkbox-label {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; font-size: 0.9rem;
    color: var(--text);
    user-select: none; transition: color 0.3s;
}
.checkbox-label input { accent-color: var(--accent); width: 18px; height: 18px; cursor: pointer; }

/* Submit button */
.submit-btn {
    width: 100%; padding: 16px;
    background: var(--accent); color: var(--text-on-dark);
    border: none; border-radius: 10px;
    font-size: 1.1rem; font-weight: 700; cursor: pointer;
    transition: all 0.2s; margin-top: 8px;
}
.submit-btn:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-2px); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════
   RESULTS
   ═══════════════════════════════════════════════════════ */
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.results-title { font-size: 1.5rem; color: var(--text); transition: color 0.3s; }
.sort-select {
    padding: 8px 36px 8px 12px;
    border: 1.5px solid var(--input-border);
    border-radius: 10px; font-size: 0.85rem;
    background: var(--input-bg);
    color: var(--input-text);
    appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
[data-theme="dark"] .sort-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* Tariff cards */
.tariff-card {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 24px; margin-bottom: 16px;
    border-left: 4px solid var(--accent);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s;
}
.tariff-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tariff-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.tariff-route { font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: 8px; transition: color 0.3s; }
.tariff-route .arrow { color: var(--accent); margin: 0 8px; }
.tariff-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.tariff-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; transition: color 0.3s; }
[data-theme="light"] .tariff-meta { color: #4a5568; }
[data-theme="dark"] .tariff-meta { color: #b0bec5; }

.tariff-price-row { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 12px; transition: border-color 0.3s; }
.tariff-price { font-size: 1.75rem; font-weight: 800; color: var(--text); transition: color 0.3s; }
.tariff-price .currency { font-size: 1rem; color: var(--text-muted); font-weight: 500; }
.book-btn {
    padding: 12px 28px;
    background: var(--primary);
    color: var(--text-on-dark);
    border: none; border-radius: 10px;
    font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: all 0.2s;
}
.book-btn:hover { opacity: 0.9; transform: translateY(-1px); }
[data-theme="dark"] .book-btn { background: var(--accent); }

.tariff-details-toggle {
    background: none; border: none;
    color: var(--accent);
    cursor: pointer; font-size: 0.85rem; font-weight: 600;
    padding: 4px 0; margin-top: 8px;
}
.tariff-details {
    margin-top: 12px; padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem; color: var(--text-muted);
    transition: border-color 0.3s, color 0.3s;
}
[data-theme="light"] .tariff-details { color: #4a5568; }
[data-theme="dark"] .tariff-details { color: #b0bec5; }
.tariff-details table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.tariff-details th, .tariff-details td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--border); transition: border-color 0.3s; }
.tariff-details th { font-weight: 600; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; }
[data-theme="light"] .tariff-details th { color: #4a5568; }
[data-theme="dark"] .tariff-details th { color: #b0bec5; }

.no-results { text-align: center; padding: 48px 24px; color: var(--text-muted); background: var(--bg-card); border-radius: 16px; transition: background-color 0.3s, color 0.3s; }
.no-results h3 { color: var(--text); margin-bottom: 8px; transition: color 0.3s; }
[data-theme="light"] .no-results { color: #4a5568; }
[data-theme="dark"] .no-results { color: #b0bec5; }

/* Lower rate */
.lower-rate-block {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 28px; margin-top: 32px; text-align: center;
    border: 2px dashed var(--accent);
    transition: background-color 0.3s;
}
.lower-rate-block h3 { color: var(--text); margin-bottom: 16px; transition: color 0.3s; }
.lower-rate-form { max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }

/* ═══════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 20px;
}
.modal-content {
    background: var(--bg-card);
    border-radius: 16px; padding: 32px;
    max-width: 480px; width: 100%; position: relative;
    box-shadow: var(--shadow-lg);
    transition: background-color 0.3s;
}
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); }
.modal-close:hover { color: var(--text); }
.modal-title { font-size: 1.3rem; color: var(--text); margin-bottom: 8px; transition: color 0.3s; }
.modal-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; transition: color 0.3s; }
[data-theme="light"] .modal-desc { color: #4a5568; }
[data-theme="dark"] .modal-desc { color: #b0bec5; }
.modal-form { display: flex; flex-direction: column; gap: 16px; }
.modal-form textarea { min-height: 80px; resize: vertical; }

/* Loading spinner */
.spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════
   MOBILE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .nav-links { display: none; }
    .header-contacts { display: none; }
    
    .nav-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px 16px;
        padding: 12px 0;
    }
    
    .logo-link { order: 0; }
    .logo { font-size: 1.2rem; white-space: nowrap; }
    
    .nav-right { flex-wrap: nowrap; align-items: center; gap: 4px; }
    
    .portal-btn {
        margin-left: 6px !important;
        margin-right: 6px !important;
        padding: 5px 12px !important;
        font-size: 0.8rem !important;
    }
    
    .lang-switcher { margin-left: 0; display: flex; align-items: center; gap: 4px; }
    .lang-btn {
        height: 30px; display: inline-flex; align-items: center; justify-content: center;
        padding: 0 10px; line-height: 1; font-size: 0.8rem;
    }
    .theme-btn {
        margin-left: 0; height: 30px; min-width: 34px; width: 34px;
        padding: 0; display: inline-flex; align-items: center; justify-content: center;
        font-size: 0.95rem; line-height: 1;
    }
    
    .calc-title { font-size: 1.5rem; }
    .tariff-price { font-size: 1.4rem; }
    .tariff-price-row { flex-direction: column; align-items: stretch; text-align: center; }
    .book-btn { width: 100%; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .back-link { font-size: 0.85rem; }
    
    footer .footer-contacts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
    footer .footer-contacts a { margin: 0; font-size: 1rem; word-break: break-all; }
    footer .logo { font-size: 1.2rem; }
}

@media (max-width: 380px) {
    .logo { font-size: 1.05rem; }
    .lang-btn { padding: 0 8px; font-size: 0.75rem; }
    .theme-btn { min-width: 30px; width: 30px; height: 28px; font-size: 0.85rem; }
    .hero h1 { font-size: 1.6rem; }
    .hero .subtitle { font-size: 1.1rem; }
}

/* ── Autocomplete ── */
.autocomplete-wrapper { position: relative; }

.autocomplete-input { padding-right: 2.5rem; }

.autocomplete-clear {
    position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 1.3rem; line-height: 1; padding: 0.25rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: color 0.2s;
}
.autocomplete-clear:hover { color: var(--accent); }

.autocomplete-list {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius, 8px);
    max-height: 240px; overflow-y: auto; z-index: 60;
    box-shadow: var(--shadow-lg);
}

.autocomplete-item {
    padding: 0.7rem 0.9rem; cursor: pointer; font-size: 0.92rem;
    color: var(--text); border-bottom: 1px solid var(--border);
    transition: background 0.15s;
    display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: rgba(232, 93, 4, 0.10); }

.autocomplete-item .iata {
    color: var(--accent); font-weight: 700; font-size: 0.85rem;
    background: rgba(232, 93, 4, 0.12); padding: 0.1rem 0.45rem;
    border-radius: 4px; flex-shrink: 0;
}

.autocomplete-item .country-tag {
    font-size: 0.75rem; color: var(--text-muted);
    background: var(--tag-bg); padding: 0.1rem 0.4rem;
    border-radius: 4px; flex-shrink: 0;
}

/* ── FAQ Section ── */
.faq-section {
    padding: 80px 0;
    background: var(--bg);
}

.faq-list {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-item:hover {
    border-color: var(--accent);
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    gap: 1rem;
}

.faq-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
    color: var(--accent);
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.25rem 1.5rem;
}

/* ── Cookie Consent Banner ── */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    animation: cookieSlideUp 0.4s ease-out;
}

@keyframes cookieSlideUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.cookie-btn {
    padding: 0.65rem 1.25rem;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.cookie-btn:hover {
    opacity: 0.9;
}

/* ── Floating Chat Widget ── */
.floating-chat-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E85D04, #d14f00);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    box-shadow: 0 8px 24px rgba(232, 93, 4, 0.45);
    cursor: pointer;
    z-index: 900;
    border: none;
    text-decoration: none;
    transition: transform 0.25s, box-shadow 0.25s;
}

.floating-chat-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 30px rgba(232, 93, 4, 0.6);
}

.floating-chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.725rem;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
}
