/* Farevo Sky — 3D dizayn (UI_3D): gecə səması + fırlanan Yer kürəsi.
   Hər səhifənin yuxarı hissəsi (hero) hər iki rejimdə tünddür; dəyişənlər yalnız bu bölmə üçün dəyişdirilir.
   Növlər: --side (ana səhifə), --band (axtarış, haqqımızda), --horizon (giriş, hesab). */
.hero--3d {
  --bg: #070b14;
  --bg-deep: #1c2740;
  --surface: #121a2a;
  --text: #eef2f8;
  --muted: #a9b4c6;
  --faint: #7d889b;
  --line: rgba(160, 185, 230, 0.16);
  --accent: #8fb0f5;
  --accent-hover: #aac4fa;
  --accent-soft: rgba(143, 176, 245, 0.14);
  --on-accent: #0b1220;
  --glow: #ffb547;
  color-scheme: dark;
  position: relative;
  /* hero panelin altından başlayır ki, kürə şəffaf panelin arxasında da görünsün */
  margin-top: -65px;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 78% 40%, rgba(47, 88, 184, 0.28), transparent 60%),
    radial-gradient(800px 500px at 10% 100%, rgba(255, 181, 71, 0.07), transparent 70%),
    linear-gradient(180deg, #060912 0%, #0a1222 60%, #0b1426 100%);
  /* overflow: hidden YOX — təqvim formanın altında açılır və bu hissədən aşağı düşə bilər (telefonda kəsilirdi).
     Kürə öz qutusunda (.globe-stage) kəsilir; z-index — təqvim aşağıdakı kartların üstündə görünsün */
  z-index: 3;
  overflow-x: clip; /* yana daşma olmasın, amma aşağı (təqvim) açıq qalsın */
}
.hero--3d::before { display: none; }
/* aşağıda yumşaq kölgə */
.hero--3d::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 56px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(6, 9, 18, 0.5));
}

.globe-stage { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.globe-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y; /* telefonda səhifə yuxarı-aşağı sürüşə bilsin */
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
.globe-canvas.is-ready { opacity: 1; }
.globe-canvas.is-dragging { cursor: grabbing; }
.no-webgl .globe-canvas { display: none; }

.hero--3d .wrap { position: relative; z-index: 2; pointer-events: none; }
.hero--3d .wrap > * { pointer-events: auto; }
.hero--3d h1 { text-shadow: 0 2px 30px rgba(6, 9, 18, 0.6); }
.hero--3d .eyebrow,
.hero--3d .hero-sub { color: var(--muted); }
.hero--3d .trust li { color: var(--muted); }

.hero--3d .search-card,
.hero--3d .auth-card {
  background: rgba(18, 26, 42, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 24px 60px -20px rgba(0, 0, 0, 0.7);
}
/* əsas düymələr kürədəki xətlər kimi qızılı */
.hero--3d .btn-search,
.hero--3d .btn-primary { background: var(--glow); color: #1a1205; }
.hero--3d .btn-search:hover,
.hero--3d .btn-primary:hover { background: #ffc46b; }

/* --- Ana səhifə: kürə sağda, böyük --- */
.hero--3d-side {
  min-height: min(860px, calc(100svh - 64px));
  padding: 153px 0 56px;
}
.hero--3d-side .hero-copy { max-width: 560px; margin-bottom: 40px; }
.hero--3d-side .hero-sub { max-width: 46ch; }
.globe-hint {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  animation: fade-up 0.8s var(--ease) 0.9s both;
}
.globe-hint::before { content: "↻ "; color: var(--glow); }

/* --- Axtarış / Haqqımızda: alçaq zolaq, kürə sağda yarımçıq görünür --- */
.hero--3d-band { padding: 121px 0 160px; }
.hero--3d-band .about-hero { padding-bottom: 16px; }
.hero--3d-band .about-hero .hero-sub { max-width: 52ch; }

/* --- Giriş / Hesab: kürə aşağıda üfüq kimi, kart ortada --- */
.hero--3d-horizon {
  min-height: min(820px, 100svh);
  padding: 137px 0 120px;
}
.hero--3d-horizon .field input { background: rgba(7, 11, 20, 0.6); color: var(--text); }
.hero--3d-horizon .btn-google { background: #fff; color: #1f1f1f; }

/* Kürədəki şəhər adları (HTML, hər kadrda yerləşdirilir) */
.globe-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.g-label {
  position: absolute;
  left: 0; top: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 7px;
  border-radius: 999px;
  background: rgba(8, 13, 24, 0.72);
  border: 1px solid rgba(255, 181, 71, 0.28);
  color: #f3f5fa;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
  pointer-events: auto;
  transform: translate(-50%, calc(-100% - 10px));
  transition: opacity 0.35s var(--ease), border-color 0.25s, background 0.25s;
  will-change: transform, opacity;
}
.g-label b { font-family: var(--mono); font-weight: 600; color: var(--glow); }
.g-label.is-origin { border-color: rgba(143, 176, 245, 0.6); font-weight: 600; }
.g-label.is-hidden { opacity: 0; pointer-events: none; }
.g-label.is-dim { opacity: 0.35; }
.g-label.is-hot, .g-label:hover { background: rgba(255, 181, 71, 0.95); color: #1a1205; border-color: transparent; z-index: 2; }
.g-label.is-hot b, .g-label:hover b { color: #1a1205; }

/* Kartlar: üzərinə gələndə 3D əyilmə */
@media (prefers-reduced-motion: no-preference) {
  .dests--3d { perspective: 1200px; }
  .js .dests--3d .dest.is-in {
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
    transition: opacity 0.7s var(--ease), transform 0.25s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  }
  .js .dests--3d .dest.is-in:hover {
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
    box-shadow: 0 30px 50px -24px rgba(24, 32, 43, 0.45);
  }
}

/* Üst panel: kürənin üstündə şəffaf, aşağı sürüşdürəndə adi (kağız) panelə qayıdır */
body:has(.hero--3d) .topbar {
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}
.topbar.topbar--clear {
  --bg: #070b14;
  --bg-deep: rgba(255, 255, 255, 0.1);
  --text: #eef2f8;
  --muted: #b7c1d2;
  --faint: #8b96a8;
  --line: transparent;
  color: var(--text);
  background: linear-gradient(180deg, rgba(6, 9, 18, 0.55), transparent) border-box no-repeat;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.topbar.topbar--clear .nav-btn,
.topbar.topbar--clear .nav-link {
  padding: 6px 12px;
  border-radius: var(--r-sm);
  background: rgba(8, 13, 24, 0.45);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.topbar.topbar--clear .nav-link { box-shadow: none; padding: 8px 12px; }
.topbar.topbar--clear .nav-link.is-current::after { left: 12px; right: 12px; bottom: 2px; background: var(--glow); }
.topbar.topbar--clear .nav-btn:hover { background: rgba(255, 255, 255, 0.2); }
.topbar.topbar--clear .langs { padding: 2px; border-radius: 8px; background: rgba(8, 13, 24, 0.45); }
.topbar.topbar--clear .logo span,
.topbar.topbar--clear .langs a { text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7); }

@media (max-width: 860px) {
  .hero--3d-side { padding-top: calc(min(92vw, 500px) + 60px); min-height: 0; }
  .hero--3d-side .globe-stage {
    bottom: auto;
    height: calc(min(92vw, 500px) + 64px);
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
    mask-image: linear-gradient(180deg, #000 70%, transparent);
  }
  .hero--3d-side .hero-copy { margin-bottom: 28px; }

  .hero--3d-band { padding: 97px 0 100px; }
  .hero--3d-horizon { padding: 105px 0 140px; min-height: 0; }
}
@media (max-width: 600px) {
  .hero--3d-side { padding-bottom: 32px; }
  .g-label { font-size: 11px; padding: 2px 7px 2px 6px; }
}

/* Aşağıdakı təyyarəli/buludlu zolaq 3D dizaynda yoxdur — footer birbaşa başlayır */
body:has(.hero--3d) .footer-sky { display: none; }
body:has(.hero--3d) .footer { padding-top: 48px; }
body:has(.hero--3d) .footer-sky + .wrap { padding-top: 0; }

/* Haqqımızda / Məxfilik: yığcam görünüş — kiçik başlıq, bölmələr yan-yana kartlarda */
.hero--3d-band:has(.about-hero) { padding: 105px 0 36px; }
.hero--3d-band .about-hero h1 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 10px; }
.hero--3d-band .about-hero .hero-sub { font-size: 16px; max-width: 58ch; margin: 0; }
body:has(.hero--3d) .about {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  padding-top: 36px;
  padding-bottom: 56px;
}
body:has(.hero--3d) .about-card,
body:has(.hero--3d) .about-card:first-child {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
body:has(.hero--3d) .about-card h2 { font-size: 17px; }
body:has(.hero--3d) .about-card p,
body:has(.hero--3d) .about-card ol { font-size: 14.5px; line-height: 1.55; gap: 6px; }
body:has(.hero--3d) .about-actions { margin-top: auto; padding-top: 8px; }
body:has(.hero--3d) .about-actions { gap: 8px; }
body:has(.hero--3d) .about-actions a { padding: 8px 12px; font-size: 13.5px; }
@media (max-width: 860px) {
  .hero--3d-band:has(.about-hero) { padding: 89px 0 28px; }
  body:has(.hero--3d) .about { padding-top: 24px; padding-bottom: 40px; }
  /* telefonda kürə mətnin arxasında — solğun olsun ki, yazı oxunsun */
  .hero--3d-band:has(.about-hero) .globe-canvas.is-ready { opacity: 0.3; }
  .hero--3d-band .about-hero .hero-sub { color: var(--text); }
}

/* --- Skyscanner kimi axtarış: tünd fonda ağ xanalar, ayrıca böyük qızılı "Axtar" düyməsi --- */
.mode-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; animation: fade-up 0.7s var(--ease) 0.2s both; }
.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: rgba(8, 13, 24, 0.45);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.mode-tab:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7); }
.mode-tab.is-on { background: var(--glow); color: #1a1205; box-shadow: none; }

.hero--sky-search .hero-top { margin-bottom: 22px; }
.hero--sky-search .hero-copy { max-width: 720px; margin-bottom: 0; }
.hero--sky-search h1 { font-size: clamp(32px, 4.4vw, 54px); max-width: 16ch; }

.hero--3d .search-card--sky {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.hero--3d .search-card--sky .pill-select select {
  background: rgba(8, 13, 24, 0.55);
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero--3d .search-card--sky .search-fields {
  /* xanalar ağ (Skyscanner kimi); içindəki siyahılar (şəhər təklifləri, sərnişinlər) də açıq rəngdə */
  --bg: #ffffff;
  --bg-deep: #eef1f6;
  --surface: #ffffff;
  --text: #161b26;
  --muted: #566070;
  --faint: #8a93a3;
  --line: #dde2ea;
  --accent: #2f58b8;
  --accent-hover: #264a9e;
  --on-accent: #ffffff;
  color-scheme: light;
  gap: 4px;
  color: var(--text);
  background: transparent;
  border: 0;
}
.hero--3d .search-card--sky .field { background: #fff; border-left: 0; }
.hero--3d .search-card--sky .search-fields > .field:first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.hero--3d .search-card--sky .pax-field { border-radius: 0 var(--r-md) var(--r-md) 0; }
.hero--3d .search-card--sky .field:hover { background: #f3f5f9; }
.hero--3d .search-card--sky .field:focus-within { background: #fff; box-shadow: inset 0 0 0 2px var(--accent); }
.hero--3d .search-card--sky .swap { margin: 0 -19px; width: 38px; height: 38px; border: 3px solid #0b1426; background: #fff; color: #161b26; }
.hero--3d .search-card--sky .btn-search {
  margin: 0 0 0 8px;
  padding: 0 30px;
  font-size: 17px;
  border-radius: var(--r-md);
  background: var(--glow);
  color: #1a1205;
}
.hero--3d .search-card--sky .btn-search:hover { background: #ffc46b; }
.hero--3d .search-opts .check { color: var(--text); }
.hero--3d .search-opts .check input { accent-color: var(--glow); }

@media (max-width: 900px) {
  .hero--3d .search-card--sky .search-fields > .field:first-child { border-radius: var(--r-md) 0 0 0; }
  .hero--3d .search-card--sky .search-fields > .field:nth-child(3) { border-radius: 0 var(--r-md) 0 0; }
  .hero--3d .search-card--sky .pax-field { border-radius: 0 0 var(--r-md) var(--r-md); }
  .hero--3d .search-card--sky .field { border-top: 0 !important; }
  .hero--3d .search-card--sky .btn-search { margin: 6px 0 0; padding: 15px; }
}
@media (max-width: 600px) {
  .hero--3d .search-card--sky .search-fields > .field:first-child { border-radius: var(--r-md) var(--r-md) 0 0; }
  .hero--3d .search-card--sky .search-fields > .field:nth-child(3) { border-radius: 0; }
  .hero--3d .search-card--sky .swap { margin: 0; border-color: #dde2ea; }
}
