/* ═══════════════════════════════════════════════
   ALLSFLY — app.css
═══════════════════════════════════════════════ */

:root {
    --navy:   #05103a;
    --navy2:  #0b1f5e;
    --blue:   #1a3fd4;
    --accent: #f5a623;
    --white:  #ffffff;
    --text-dim: rgba(255,255,255,0.55);
    --radius: 20px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--navy);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── ARKA PLAN ──────────────────────────────── */
.bg-layer {
    position: fixed; inset: 0; z-index: 0;
    background: linear-gradient(135deg, #05103a 0%, #0b1f5e 50%, #0d2880 100%);
    pointer-events: none;
}
.grid-deco {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
    background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ── TÜRSAB ÜSTBILGI ─────────────────────────── */
.tursab-bar {
    position: relative; z-index: 10;
    background: rgba(245,166,35,.15); border-bottom: 1px solid rgba(245,166,35,.3);
    padding: 8px 20px;
}
.tursab-inner {
    max-width: 900px; margin: 0 auto;
    display: flex; align-items: center; gap: 16px;
    font-size: .78rem; color: rgba(255,255,255,.7);
}
.tursab-inner a { color: var(--accent); font-weight: 700; text-decoration: none; }

/* ── SAYFA SARICI ─────────────────────────────── */
.page-wrap {
    position: relative; z-index: 1;
    max-width: 900px; margin: 0 auto;
    padding: 40px 16px 80px;
}
.logo-area { text-align: center; margin-bottom: 28px; }
.site-logo  { font-family: 'Sora', sans-serif; font-size: 2.8rem; font-weight: 800; }
.logo-sub   { font-size: .85rem; color: var(--text-dim); margin-top: 6px; }

/* ── ARAMA KARTI ──────────────────────────────── */
.search-card {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 24px;
    overflow: hidden;
}

/* Sekmeler */
.trip-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.trip-tab {
    padding: 8px 18px; border-radius: 20px; border: none; cursor: pointer;
    font-family: 'Sora', sans-serif; font-size: .82rem; font-weight: 700;
    background: rgba(255,255,255,.08); color: rgba(255,255,255,.6);
    transition: all .2s;
}
.trip-tab.active { background: var(--blue); color: #fff; }

/* Havalimanı satırı */
.airports-row { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 12px; }
.swap-btn {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.12); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s; margin-bottom: 2px;
}
.swap-btn:hover { background: var(--blue); transform: rotate(180deg); }

/* Field */
.field { position: relative; }
.field-label {
    display: block; font-size: .65rem; font-weight: 700;
    color: rgba(255,255,255,.45); letter-spacing: .8px; margin-bottom: 6px;
}
.field-input {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.12);
    border-radius: 12px; padding: 10px 12px;
    transition: border-color .2s;
}
.field-input:focus-within { border-color: rgba(255,255,255,.4); }
.field-input i { color: rgba(255,255,255,.4); font-size: .85rem; flex-shrink: 0; }
.field-input input, .field-input select {
    flex: 1; background: transparent; border: none; outline: none;
    color: #fff; font-family: 'DM Sans', sans-serif; font-size: .9rem; min-width: 0;
}
.field-input input::placeholder { color: rgba(255,255,255,.3); }
.field-input input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.5); cursor: pointer; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }

/* Airport dropdown */
.airport-picker { position: relative; }
.airport-dropdown {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: #1a2f6e; border: 1px solid rgba(255,255,255,.15);
    border-radius: 12px; z-index: 100; overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.apt-item {
    padding: 12px 14px; font-size: .85rem; cursor: pointer;
    color: rgba(255,255,255,.8); border-bottom: 1px solid rgba(255,255,255,.06);
    transition: background .15s;
}
.apt-item:last-child { border-bottom: none; }
.apt-item:hover { background: rgba(255,255,255,.1); }
.apt-item strong { color: var(--accent); margin-right: 4px; }

/* Yolcu paneli */
.passenger-trigger { cursor: pointer; user-select: none; }
.passenger-panel {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: #1a2f6e; border: 1px solid rgba(255,255,255,.15);
    border-radius: 12px; z-index: 100; padding: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.passenger-panel.open { display: block; }
.pax-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.pax-label { font-size: .88rem; font-weight: 700; color: #fff; }
.pax-hint  { font-size: .72rem; color: rgba(255,255,255,.4); }
.pax-ctrl  { display: flex; align-items: center; gap: 12px; }
.pax-ctrl button {
    width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.2);
    background: transparent; color: #fff; cursor: pointer; font-size: 1rem;
    display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.pax-ctrl button:hover { background: var(--blue); border-color: var(--blue); }
.pax-ctrl span { min-width: 20px; text-align: center; font-weight: 700; }

/* Arama butonu */
.btn-search {
    width: 100%; padding: 15px; margin-top: 12px;
    background: linear-gradient(135deg, #1a3fd4, #4364f7);
    color: #fff; border: none; border-radius: 14px;
    font-family: 'Sora', sans-serif; font-size: 1rem; font-weight: 700;
    cursor: pointer; transition: all .2s;
    box-shadow: 0 8px 24px rgba(26,63,212,.4);
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-search:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(26,63,212,.5); }
.btn-search:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Loading spinner */
.loading-spinner {
    width: 40px; height: 40px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,.15);
    border-top-color: #fff; animation: spin .8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── UÇUŞ KARTI ──────────────────────────────── */
.flight-card {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px; overflow: hidden;
    margin-bottom: 10px; width: 100%;
    transition: border-color .2s;
}
.flight-card:hover { border-color: rgba(255,255,255,.25); }
.card-body { padding: 14px 16px; }
.card-top  { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.card-top-left { flex: 1; min-width: 0; }
.airline-name {
    font-family: 'Sora', sans-serif; font-size: .88rem; font-weight: 700;
    color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px;
}
.price-inline {
    font-family: 'Sora', sans-serif; font-size: 1.25rem; font-weight: 800;
    color: var(--accent); white-space: nowrap; flex-shrink: 0;
}
.card-bottom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.route-row { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; min-width: 0; }
.time-big  { font-family: 'Sora', sans-serif; font-size: 1.3rem; font-weight: 800; color: #fff; }
.route-code { font-size: .72rem; font-weight: 700; color: rgba(255,255,255,.45); }
.route-arrow { color: rgba(255,255,255,.3); font-size: .75rem; }
.dur-badge { font-size: .72rem; color: rgba(255,255,255,.4); margin-left: auto; white-space: nowrap; }

.stop-badge { font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 20px; flex-shrink: 0; }
.stop-direct  { background: #e8faf0; color: #1a9c52; }
.stop-layover { background: #fff0eb; color: #e05c1f; }
.fn-badge  { font-size: .65rem; font-weight: 700; color: rgba(255,255,255,.5); background: rgba(255,255,255,.08); padding: 2px 6px; border-radius: 6px; margin-right: 4px; }
.agent-badge { font-size: .65rem; font-weight: 600; color: #aaa; background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 6px; margin-right: 4px; display: inline-block; margin-top: 3px; }
.suspicious-badge { font-size: .65rem; font-weight: 700; color: #ff6b6b; background: rgba(255,107,107,.12); padding: 2px 6px; border-radius: 6px; display: inline-block; }

.btn-select {
    padding: 9px 18px; background: var(--blue); color: #fff; border: none;
    border-radius: 10px; font-family: 'Sora', sans-serif; font-size: .85rem; font-weight: 700;
    cursor: pointer; transition: all .2s; flex-shrink: 0;
}
.btn-select:hover { background: #0f2fb0; transform: translateY(-1px); }

.return-leg {
    padding: 10px 16px; border-top: 1px solid rgba(255,255,255,.08);
    font-size: .82rem; color: rgba(255,255,255,.7);
}
.ret-label { font-size: .68rem; font-weight: 700; color: rgba(255,255,255,.35); margin-bottom: 4px; }
.time-small { font-weight: 700; color: rgba(255,255,255,.9); }

/* ── REZERVASYOn MODALI ──────────────────────── */
.booking-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .3s;
}
.booking-overlay.open { opacity: 1; pointer-events: all; }
.booking-sheet {
    background: #fff; width: 100%; max-width: 560px; border-radius: 24px 24px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 16px);
    transform: translateY(100%); transition: transform .35s cubic-bezier(.22,.61,.36,1);
    max-height: 90vh; overflow-y: auto;
}
.booking-overlay.open .booking-sheet { transform: translateY(0); }
.bs-handle { width: 40px; height: 4px; background: #e0e3ef; border-radius: 2px; margin: 12px auto 4px; }
.bs-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 12px 20px 8px; }
.bs-title  { font-family: 'Sora', sans-serif; font-size: 1rem; font-weight: 800; color: #0d1f54; }
.bs-price  { font-family: 'Sora', sans-serif; font-size: 1.5rem; font-weight: 800; color: var(--blue); }
.bs-close  { background: #f5f5f8; border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; color: #888; font-size: .9rem; display: flex; align-items: center; justify-content: center; }
.bs-leg    { padding: 12px 20px; border-top: 1px solid #f0f2f8; }
.bs-leg-inner {}
.bs-leg-label { font-size: .7rem; font-weight: 800; color: #8892b0; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.bs-leg-route { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bs-time  { font-family: 'Sora', sans-serif; font-size: 1.5rem; font-weight: 800; color: #0d1f54; }
.bs-code  { font-size: .78rem; font-weight: 700; color: #8892b0; }
.bs-date  { font-size: .72rem; color: #aaa; margin-top: 2px; }
.bs-stop-pill { font-size: .7rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.bs-note { margin: 8px 20px 12px; padding: 10px 14px; background: #fef9ec; border: 1px solid #fde9a2; border-radius: 10px; font-size: .78rem; color: #8a6800; display: flex; gap: 8px; }
.bs-actions { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.btn-whatsapp {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px; border-radius: 12px; border: none; cursor: pointer;
    font-family: 'Sora', sans-serif; font-size: .95rem; font-weight: 700;
    text-decoration: none; background: linear-gradient(135deg,#075e54,#25d366); color: white;
}
.btn-call {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px; border-radius: 12px; border: none; cursor: pointer;
    font-family: 'Sora', sans-serif; font-size: .9rem; font-weight: 700;
    text-decoration: none; background: linear-gradient(135deg,#1a3fd4,#4364f7); color: white;
}
.btn-site {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px; border-radius: 10px; border: 1.5px solid #e8eaf0;
    background: transparent; cursor: pointer;
    font-family: 'Sora', sans-serif; font-size: .82rem; font-weight: 600;
    color: #8892b0; text-decoration: none;
}

/* ── FOOTER ───────────────────────────────────── */
.site-footer { position: relative; z-index: 1; background: rgba(0,0,0,.3); border-top: 1px solid rgba(255,255,255,.08); margin-top: 60px; }
.footer-inner { max-width: 900px; margin: 0 auto; padding: 32px 20px 20px; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.footer-logo { font-family: 'Sora', sans-serif; font-size: 1.4rem; font-weight: 800; display: block; margin-bottom: 8px; }
.footer-brand p { font-size: .82rem; color: rgba(255,255,255,.4); }
.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-contact a { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: rgba(255,255,255,.6); text-decoration: none; }
.footer-contact a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.footer-links a { font-size: .78rem; color: rgba(255,255,255,.4); text-decoration: none; }
.footer-links a:hover { color: rgba(255,255,255,.7); }
.footer-tursab { font-size: .75rem; color: rgba(255,255,255,.3); margin-bottom: 8px; }
.footer-tursab a { color: var(--accent); text-decoration: none; }
.footer-copy { font-size: .72rem; color: rgba(255,255,255,.25); }

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 480px) {
    .page-wrap { padding: 20px 12px 60px; }
    .search-card { padding: 16px 14px; }
    .field-grid { grid-template-columns: 1fr; }
    .airports-row { gap: 6px; }
    .time-big { font-size: 1.1rem; }
    .price-inline { font-size: 1.05rem; }
}
