/* ===== Passport Academy — v4 (Spark-inspired) ===== */

:root {
  /* Outer / Inner */
  --outer: #1A1A4D;
  --inner: #F4F2EC;
  --inner-2: #ECE9E1;
  --card-bg: #FFFFFF;

  /* Text */
  --ink: #1A1A4D;
  --ink-2: #3B3B6B;
  --mute: #8B8DA6;
  --mute-2: #B8BACA;

  /* Brand */
  --brand: #5B4FCF;
  --brand-light: #8B7FFF;
  --brand-soft: #EEEDFE;
  --brand-dark: #3D34A0;
  /* Brend qradiyenti — bütün əsas/hover-rəngli düymələr üçün */
  --brand-gradient: linear-gradient(90deg, #4F46E5 0%, #7C3AED 55%, #C026D3 100%);

  /* Accents */
  --yellow: #FFD93D;
  --yellow-soft: #FFF5C2;
  --green: #22C55E;
  --green-soft: #D1FAE5;
  --orange: #FB923C;
  --orange-soft: #FFEDD5;
  --pink: #F472B6;
  --pink-soft: #FCE7F3;

  /* Border */
  --border: #E5E1D5;
  --border-soft: #EDEAE0;

  /* Radii */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-2xl: 40px;
  --r-3xl: 56px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(26, 26, 77, 0.04);
  --shadow: 0 8px 24px rgba(26, 26, 77, 0.06);
  --shadow-lg: 0 24px 48px rgba(26, 26, 77, 0.10);
  --shadow-pill: 0 6px 18px rgba(26, 26, 77, 0.16);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 200ms;
  --t-med: 400ms;
  --t-slow: 700ms;

  /* Layout */
  --shell-pad: 28px;
  --panel-pad: 80px;
  --gap: 36px;
}

/* ===== Reset ===== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--outer);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== Global 90% zoom on desktop/tablet ===== */
/* On viewports ≥901px, render the entire page at 90% scale to match
   the user-preferred density. Mobile (<901px) uses 80% — text feels lighter
   on small screens and avoids cramped layouts. */
@media (min-width: 901px) {
  body { zoom: 0.9; }
}
/* Mobile (<901px): NO global zoom.
   The old `body { zoom: 0.8 }` shrank body text below ~13px (hard to read on
   phones) and distorted media-query / viewport math, which caused the header
   overflow. Mobile sizing is now handled by real responsive rules below. */

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: opacity var(--t-fast) var(--ease); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
input, textarea { font-family: inherit; }

/* ===== Display Font ===== */

.display, h1, h2, h3, .h-display {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
}

h1 { font-size: clamp(3rem, 9.5vw, 8rem); }
h2 { font-size: clamp(2.25rem, 5vw, 4rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2.25rem); }

p { color: var(--ink-2); }

/* ===== Shell — outer dark navy frame, panels stack inside ===== */

.shell {
  padding: var(--shell-pad);
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.panel {
  background: var(--inner);
  border-radius: var(--r-3xl);
  position: relative;
  overflow: hidden;
}

.panel-pad {
  padding: var(--panel-pad);
}

.panel-deco-circles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}

.panel-deco-circles::before,
.panel-deco-circles::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.panel-deco-circles::before {
  width: 600px; height: 600px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.panel-deco-circles::after {
  width: 900px; height: 900px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

/* ===== Header ===== */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 26px 32px;
  position: relative;
  z-index: 10;
}
.header > .logo, .header .pill-nav { flex-shrink: 0; }

.logo img { height: 44px; }

.pill-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--card-bg);
  border-radius: var(--r-pill);
  padding: 6px;
  box-shadow: var(--shadow-sm);
}

.pill-nav a {
  display: inline-block;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
}

.pill-nav a:hover {
  background: var(--inner-2);
  color: var(--ink);
}

.pill-nav a.active {
  background: var(--brand-gradient);
  color: #fff;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  transition: all var(--t-fast) var(--ease);
}

.header-cta:hover {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
}

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
}

.menu-toggle span {
  position: relative;
  width: 22px; height: 2px;
  background: var(--ink);
}

.menu-toggle span::before, .menu-toggle span::after {
  content: "";
  position: absolute;
  width: 22px; height: 2px;
  background: var(--ink);
  transition: all var(--t-fast) var(--ease);
}

.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }

/* ===== Hero ===== */

.hero {
  padding: 40px var(--panel-pad) 100px;
  position: relative;
  text-align: center;
}

.hero-headline {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2.5rem, 8vw, 6.5rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 0;
  position: relative;
  z-index: 2;
}

.hero-headline .line-1 {
  display: block;
  margin-bottom: 40px;
}

.hero-headline .line-2 {
  display: block;
  margin-top: 40px;
}

.hl-pill {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 0.05em 0.35em 0.12em;
  border-radius: 100px;
  font-style: normal;
  letter-spacing: -0.04em;
  position: relative;
}

/* Hero center visual — illustration */
.hero-stage {
  position: relative;
  height: 480px;
  margin: 0 auto;
  max-width: 1100px;
  z-index: 1;
}

.hero-illustration {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 460px;
  height: auto;
  max-width: 70%;
  pointer-events: none;
  user-select: none;
}

/* Floating pills around the illustration — 6 positions in clock pattern */
.float-pill {
  position: absolute;
  background: var(--card-bg);
  padding: 11px 18px;
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.float-pill .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Outer pills (fp-1 to fp-6) — 10% larger */
.fp-1, .fp-2, .fp-3, .fp-4, .fp-5, .fp-6 {
  padding: 13px 21px;
  font-size: 0.95rem;
}
.fp-1 .dot, .fp-2 .dot, .fp-3 .dot,
.fp-4 .dot, .fp-5 .dot, .fp-6 .dot {
  width: 9px; height: 9px;
}

/* 11 positions — outer pills moved closer to GIF, inner pills near center */
.fp-1 { top: 30px; left: 130px; }                               /* MAECI - top-left, closer */
.fp-2 { top: 60px; right: 100px; }                              /* Chevening - top-right, closer */
.fp-3 { top: 40%; left: 70px; }                                 /* DAAD - middle-left, closer */
.fp-4 { top: 32%; right: 130px; }                               /* DTP - middle-right, closer */
.fp-5 { bottom: 40px; left: 150px; }                            /* 25+ ölkə - bottom-left, closer */
.fp-6 { bottom: 70px; right: 70px; }                            /* 5000+ tələbə - bottom-right, closer */
.fp-7 { top: 14%; left: 38%; }                                  /* Erasmus Mundus - top-center close */
.fp-8 { top: 52%; left: 30%; }                                  /* Stipendium - close to GIF, mid-left */
.fp-9 { top: 60%; right: 32%; }                                 /* SI - close to GIF, mid-right */
.fp-10 { top: 22%; right: 24%; }                                /* Stefan Banach - upper right, close */
.fp-11 { top: 70%; left: 22%; }                                 /* Visegrad - lower left, close */

.fp-1 .dot { background: var(--green); }
.fp-2 .dot { background: var(--yellow); }
.fp-3 .dot { background: var(--orange); }
.fp-4 .dot { background: var(--pink); }
.fp-5 .dot { background: var(--brand); }
.fp-6 .dot { background: #3B82F6; }
.fp-7 .dot { background: #EF4444; }
.fp-8 .dot { background: #06B6D4; }
.fp-9 .dot { background: #A855F7; }
.fp-10 .dot { background: #14B8A6; }
.fp-11 .dot { background: #F59E0B; }

/* Float-pill hover lift — pauses the floating animation, scales + raises */
.float-pill {
  cursor: pointer;
  transition: box-shadow 220ms var(--ease-out), transform 220ms var(--ease-out);
  will-change: transform;
}
.float-pill:hover {
  animation-play-state: paused;
  transform: translateY(-6px) scale(1.06);
  box-shadow: 0 14px 30px rgba(26, 26, 77, 0.18);
  z-index: 5;
}

/* Hero bottom row */
.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 60px;
  gap: 40px;
  text-align: left;
}

.hero-foot-text {
  max-width: 300px;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

.hero-foot-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-foot-meta {
  font-size: 0.875rem;
  color: var(--mute);
  max-width: 240px;
  line-height: 1.5;
  text-align: right;
}

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 28px;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--r-pill);
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
  font-family: inherit;
  cursor: pointer;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: var(--shadow-pill);
}

.btn-primary:hover {
  filter: brightness(1.07);
  transform: translateY(-2px);
}

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

.btn-dark:hover { background: #2D2D6B; transform: translateY(-1px); }

.btn-light {
  background: var(--card-bg);
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-light:hover { background: var(--inner-2); }

/* ===== Banner — "Müraciətə inamla başla" ===== */

.panel-banner {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  padding: 80px;
  position: relative;
  overflow: hidden;
}

.panel-banner h2 {
  color: #fff;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  max-width: 720px;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.panel-banner p {
  color: rgba(255,255,255,0.8);
  margin-top: 16px;
  max-width: 520px;
  font-size: 1.0625rem;
}

.panel-banner-deco {
  position: absolute;
  right: 60px; top: 50%;
  transform: translateY(-50%);
  font-size: 8rem;
  color: rgba(255,255,255,0.15);
  font-weight: 100;
}

/* Ghost button inside violet CTA banner — white outline, transparent fill.
   This was missing — country-detail.js renders the class but it had no styles. */
.btn-banner-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  border: 1.5px solid rgba(255,255,255,0.4);
  background: transparent;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 200ms var(--ease-out);
}
.btn-banner-ghost:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.7);
}

/* ===== Two-tone heading ===== */

.duotone {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.duotone .ink { color: var(--ink); }
.duotone .mute { color: var(--mute-2); }

/* ===== Features Grid (2x2) ===== */

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px;
}

.feature-card {
  background: var(--card-bg);
  border-radius: var(--r-2xl);
  padding: 48px;
  position: relative;
  min-height: 440px;
  overflow: hidden;
}

.feature-card-content {
  max-width: 52%;
  position: relative;
  z-index: 2;
}

.feature-card h3 {
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.feature-card p {
  color: var(--mute);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Feature visuals */
.fc-icon-tile {
  position: absolute;
  width: 110px; height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.fc-icon-tile.tl { top: 32px; right: 40px; }

.fc-icon-tile img {
  width: 100%; height: 100%;
  object-fit: contain;
}

.fc-icon-tile .emoji-icon {
  font-size: 64px;
  line-height: 1;
}

/* Pill cluster — for both country and scholarship pills */
.pill-cluster {
  position: absolute;
  bottom: 32px;
  right: 32px;
  width: 320px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: flex-start;
  z-index: 1;
}

.cluster-pill {
  background: var(--card-bg);
  padding: 9px 16px;
  border-radius: var(--r-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  border: 1px solid var(--border-soft);
  color: var(--ink);
}

.cluster-pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.cluster-pill .dot.green { background: var(--green); }
.cluster-pill .dot.orange { background: var(--orange); }
.cluster-pill .dot.brand { background: var(--brand); }
.cluster-pill .dot.yellow { background: var(--yellow); }
.cluster-pill .dot.pink { background: var(--pink); }
.cluster-pill .dot.blue { background: #3B82F6; }
.cluster-pill .dot.red { background: #EF4444; }
.cluster-pill .dot.cyan { background: #06B6D4; }
.cluster-pill .dot.teal { background: #14B8A6; }

/* Cluster-pill hover — used for country & scholarship pills */
.cluster-pill {
  cursor: pointer;
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out);
}
.cluster-pill:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(26, 26, 77, 0.14);
  border-color: rgba(91, 79, 207, 0.25);
}

/* Card 1: Free consultation - no background tile */
.fc-1 .fc-icon-tile { background: transparent; }

/* Card 2: Free education - no background tile */
.fc-2 .fc-icon-tile { background: transparent; }

/* Card 3: Real-time tracking - no background tile */
.fc-3 .fc-icon-tile { background: transparent; }

/* Generic progress stack (used in tracking + visa cards) */
.progress-stack {
  position: absolute;
  bottom: 32px; right: 32px;
  width: 260px;
}
.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--card-bg);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  font-size: 0.8125rem;
}
.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--inner);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: 999px;
}

/* Card 4: Visa - no background tile */
.fc-4 .fc-icon-tile { background: transparent; }

/* ===== Centerpiece — "One simple promise" ===== */

.centerpiece-head {
  text-align: center;
  padding: 100px 60px 60px;
  max-width: 900px;
  margin: 0 auto;
}

.centerpiece-head p {
  margin-top: 24px;
  font-size: 1.0625rem;
  color: var(--mute);
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.centerpiece-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  padding: 0 16px 16px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--r-2xl);
  padding: 60px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 360px;
}

.stat-card-label-top {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.stat-card-number {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
  letter-spacing: -0.05em;
}

.stat-card-label-bottom {
  margin-top: 24px;
  color: var(--mute);
  font-size: 0.9375rem;
}

.tracking-card {
  background: var(--card-bg);
  border-radius: var(--r-2xl);
  padding: 60px 60px 0;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.tracking-card h3 {
  font-size: 1.875rem;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
  line-height: 1.05;
}

.tracking-card .duotone-inline {
  color: var(--mute-2);
  display: block;
}

.tracking-card p {
  margin-top: 20px;
  color: var(--mute);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 360px;
}

.tracking-visual {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.deadline-bricks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  max-width: 380px;
}

/* Brick pattern: rows 1 & 3 align, rows 2 & 4 offset (every 2nd row) */
.deadline-bricks .brick:nth-child(4n+3),
.deadline-bricks .brick:nth-child(4n+4) {
  margin-left: 18px;
  margin-right: -18px;
}

.brick {
  border-radius: var(--r-md);
  padding: 14px 16px;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: var(--shadow-sm);
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  cursor: default;
}

.brick:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.brick-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brick-meta {
  font-size: 0.6875rem;
  color: var(--ink-2);
  opacity: 0.75;
}

/* 8 soft pastel colors */
.brick-yellow { background: #FFF8DB; }
.brick-purple { background: #EDE9FE; }
.brick-red    { background: #FEE2E2; }
.brick-blue   { background: #DBEAFE; }
.brick-cyan   { background: #CFFAFE; }
.brick-green  { background: #D1FAE5; }
.brick-orange { background: #FFEDD5; }
.brick-pink   { background: #FCE7F3; }

/* ===== Country Cards (redesigned) ===== */

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 80px 60px 32px;
  gap: 40px;
}

.section-head-text h2 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.section-head-text p {
  margin-top: 12px;
  color: var(--mute);
  font-size: 0.9375rem;
  max-width: 420px;
}

.section-head-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.section-head-link::after {
  content: "→";
  transition: transform var(--t-fast) var(--ease);
}

.section-head-link:hover::after { transform: translateX(4px); }

/* ===== Countries (carousel) ===== */
.country-track-wrap {
  /* Top padding gives hover-lift room — prevents card top being clipped by overflow */
  padding: 16px 80px 60px;
  clip-path: inset(-20px 0 -20px 0);
  position: relative;
  /* Native horizontal scroll — pixel-perfect responsiveness */
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge */
}
.country-track-wrap::-webkit-scrollbar { display: none; }  /* Chrome/Safari */

.country-track {
  display: flex;
  gap: 16px;
  /* No transform animation — native scroll handles motion */
}

.country-track .country-card {
  flex: 0 0 calc((100% - 48px) / 4); /* 4 visible, 16px × 3 gaps */
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-2xl);
  overflow: hidden;
  display: block;
  background: var(--brand-soft);
  cursor: pointer;
  transition: transform var(--t-med) var(--ease-out);
  scroll-snap-align: start;
}

.country-track .country-card:hover { transform: translateY(-4px); }

.country-track .country-card-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 700ms var(--ease);
}

.country-track .country-card:hover .country-card-bg { transform: scale(1.06); }

.country-track .country-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(20, 20, 60, 0.85) 100%);
}

.country-track .country-card-content {
  position: absolute;
  bottom: 28px; left: 28px; right: 28px;
  color: #fff;
  z-index: 2;
}

.country-track .country-card-content h3 {
  color: #fff;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.country-track .country-card-content p {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.85);
}

/* Country images */
.bg-italy { background-image: url('../images/country-italy.webp'); }
.bg-germany { background-image: url('../images/country-germany.webp'); }
.bg-netherlands { background-image: url('../images/country-netherlands.webp'); }
.bg-uk { background-image: url('../images/country-uk.webp'); }
.bg-usa { background-image: url('../images/country-usa.webp'); }
.bg-canada { background-image: url('../images/country-canada.webp'); }
.bg-france { background-image: url('../images/country-france.webp'); }
.bg-spain { background-image: url('../images/country-spain.webp'); }
.bg-norway { background-image: url('../images/country-norway.webp'); }
.bg-sweden { background-image: url('../images/country-sweden.webp'); }
.bg-hungary { background-image: url('../images/country-hungary.webp'); }
.bg-poland { background-image: url('../images/country-poland.webp'); }

/* ===== Universities (carousel) ===== */

.uni-track-wrap {
  /* Top padding gives hover-lift + box-shadow room — prevents clipping */
  padding: 20px 80px 60px;
  clip-path: inset(-20px 0 -20px 0);
  position: relative;
  /* Native horizontal scroll — pixel-perfect responsiveness */
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.uni-track-wrap::-webkit-scrollbar { display: none; }

.uni-track {
  display: flex;
  gap: 20px;
  /* No transform animation — native scroll handles motion */
}

.uni-card {
  flex: 0 0 calc((100% - 60px) / 4); /* 4 visible, 20px × 3 gaps */
  background: var(--card-bg);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: all var(--t-fast) var(--ease);
  display: block;
  scroll-snap-align: start;
}

.uni-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.uni-img {
  aspect-ratio: 16 / 11;
  background-size: cover;
  background-position: center;
  background-color: var(--brand-soft);
}

.uni-bologna { background-image: url('../images/uni-bologna.webp'); }
.uni-polimi { background-image: url('../images/uni-polimi.webp'); }
.uni-sapienza { background-image: url('../images/uni-sapienza.webp'); }
.uni-rwth { background-image: url('../images/uni-rwth.webp'); }
.uni-tum { background-image: url('../images/uni-tum.webp'); }
.uni-uva { background-image: url('../images/uni-uva.webp'); }
.uni-tue { background-image: url('../images/uni-tue.webp'); }
.uni-warsaw { background-image: url('../images/uni-warsaw.webp'); }

/* Placeholder gradient backgrounds for new universities */
.uni-lmu      { background-image: url('../images/uni-lmu.webp'); background-size:cover; background-position:center; }
.uni-tudelft  { background-image: url('../images/uni-tudelft.webp'); background-size:cover; background-position:center; }
.uni-hec      { background-image: url('../images/uni-hec.webp'); background-size:cover; background-position:center; }
.uni-kth      { background-image: url('../images/uni-kth.webp'); background-size:cover; background-position:center; }

.uni-card-body { padding: 18px 20px; }

.uni-card-body h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.uni-card-body p {
  font-size: 0.8125rem;
  color: var(--mute);
}

/* Section head with nav buttons (countries/universities) */
.section-head-with-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 80px 60px 40px;
  gap: 32px;
}

.section-head-with-nav .section-head-text { flex: 1; }
.section-head-with-nav .section-head-text h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.05;
  margin-bottom: 14px;
}
.section-head-with-nav .section-head-text p {
  color: var(--mute);
  font-size: 1rem;
  max-width: 520px;
}

.section-head-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

/* ===== Testimonials (Spark-style carousel) ===== */

.testimonials-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 80px 60px 40px;
}

.testimonials-head h2 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

/* Generic nav arrows (used in testimonials, countries, universities) */
.nav-arrows {
  display: flex;
  gap: 8px;
  background: var(--card-bg);
  border-radius: var(--r-pill);
  padding: 6px;
  box-shadow: var(--shadow-sm);
}

.nav-arrows button,
.nav-arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}

.nav-arrows button:hover,
.nav-arrow:hover { background: var(--inner-2); }

.testimonials-track-wrap {
  padding: 16px 80px 20px;
  /* clip horizontally but allow vertical overflow for hover lift */
  clip-path: inset(-200px 0 -50px 0);
  position: relative;
  /* Native horizontal scroll — pixel-perfect responsiveness */
  overflow-x: auto;
  overflow-y: clip;        /* clip = no scrollbar but doesn't establish scroll context for descendants — hover lift via clip-path inset still works */
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.testimonials-track-wrap::-webkit-scrollbar { display: none; }

.testimonials-track {
  display: flex;
  gap: 16px;
  /* No transform animation — native scroll handles motion */
}

.testimonial-card {
  flex: 0 0 calc((100% - 32px) / 3);
  background: var(--card-bg);
  border-radius: var(--r-2xl);
  padding: 36px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
  cursor: default;
  z-index: 1;
  scroll-snap-align: start;
}

.testimonial-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 24px 48px rgba(26, 26, 77, 0.12);
  z-index: 5;
}

.testimonial-quote-mark {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 3rem;
  color: var(--mute-2);
  line-height: 0.5;
  margin-bottom: 24px;
  opacity: 0.5;
  font-weight: 700;
}

.testimonial-text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink-2);
  flex: 1;
  margin-bottom: 32px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

.testimonial-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--brand-soft);
  flex-shrink: 0;
}

.testimonial-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.testimonial-meta {
  font-size: 0.8125rem;
  color: var(--brand);
  font-weight: 500;
}

.testimonials-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 40px 60px 60px;
}

.testimonials-progress-count {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
}

.testimonials-progress-bar {
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.testimonials-progress-bar span {
  display: block;
  height: 100%;
  background: var(--ink);
  border-radius: 999px;
  width: 33%;
  transition: width var(--t-slow) var(--ease-out);
}

/* ===== Footer ===== */

.panel-footer {
  background: var(--inner);
  padding: 80px 60px 40px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.footer-top h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.footer-top a.email-big {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.footer-top a.email-big:hover { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

.footer-top-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: var(--brand-gradient);
  border-radius: var(--r-pill);
  padding: 13px 28px;
  text-decoration: none;
  box-shadow: var(--shadow-pill);
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast) var(--ease);
}
.footer-cta:hover { filter: brightness(1.07); transform: translateY(-2px); }
@media (max-width: 700px) {
  .footer-top-left { gap: 16px; }
}

.footer-grid {
  display: grid;
  grid-template-columns: 0.9fr 1fr 0.7fr 2fr;
  gap: 32px;
  padding: 56px 0;
}

.footer-col h5 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.footer-col ul li { margin-bottom: 10px; }

.footer-col a {
  color: var(--mute);
  font-size: 0.875rem;
}

.footer-col a:hover { color: var(--ink); }

.footer-social-tiles {
  display: flex;
  gap: 8px;
}

.footer-social-tiles a {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all var(--t-fast) var(--ease);
}

.footer-social-tiles a:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.footer-app-card {
  background: var(--card-bg);
  border-radius: var(--r-2xl);
  padding: 36px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: center;
  position: relative;
  overflow: hidden;
  min-height: 280px;
}

.footer-app-card-text h5 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
}

/* Store buttons row */
.app-store-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.app-store-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.app-store-icon {
  display: block;
  width: 56px;
  height: 56px;
  background: var(--brand-gradient);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  transition: transform var(--t-fast) var(--ease);
}

.app-store-link:hover .app-store-icon {
  transform: translateY(-2px) scale(1.05);
}

.app-store-link span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
}

/* Phone mockup — cropped at bottom */
.phone-mockup {
  position: absolute;
  right: -10px;
  top: 24px;
  width: 220px;
  height: 360px;
  background: var(--card-bg);
  border: 8px solid var(--ink);
  border-radius: 38px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(26, 26, 77, 0.18);
}

.phone-notch {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 18px;
  background: var(--ink);
  border-radius: 0 0 14px 14px;
  z-index: 5;
}

.phone-content {
  padding: 32px 14px 14px;
  height: 100%;
  background: #FAFAFA;
}

.phone-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.phone-greeting {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFE4E1, #FCE7F3);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.phone-hello {
  font-size: 0.5625rem;
  color: var(--mute);
  line-height: 1;
  margin-bottom: 1px;
}

.phone-name {
  font-size: 0.6875rem;
  color: var(--ink);
  font-weight: 600;
  line-height: 1;
}

.phone-coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--yellow);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--ink);
}

.phone-tab-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.phone-tab-row strong {
  font-size: 0.6875rem;
  color: var(--ink);
  font-weight: 600;
}

.phone-tab-badge {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.5625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-feat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 12px;
}

.phone-feat-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.phone-feat-logo {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

.phone-feat-title {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.phone-feat-meta {
  font-size: 0.5625rem;
  color: var(--mute);
  margin-top: 2px;
}

.phone-feat-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: var(--green-soft);
}

.phone-feat-icon {
  width: 18px; height: 18px;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-size: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.phone-feat-status-title {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.phone-feat-status-meta {
  font-size: 0.5rem;
  color: var(--mute);
  margin-top: 1px;
}

.phone-list-title {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.phone-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.phone-item-icon {
  width: 24px; height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 700;
  flex-shrink: 0;
}

.phone-item-name {
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.1;
}

.phone-item-meta {
  font-size: 0.5rem;
  color: var(--mute);
  margin-top: 1px;
}

.phone-item-info {
  flex: 1;
  min-width: 0;
}

.phone-item-status {
  font-size: 0.5rem;
  color: var(--mute);
  font-weight: 500;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--mute);
}

.footer-bottom a { color: var(--mute); margin-left: 24px; }
.footer-bottom a:hover { color: var(--ink); }

/* ===== Animations — Intersection Observer driven ===== */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger via delay */
.reveal.d-1 { transition-delay: 80ms; }
.reveal.d-2 { transition-delay: 160ms; }
.reveal.d-3 { transition-delay: 240ms; }
.reveal.d-4 { transition-delay: 320ms; }
.reveal.d-5 { transition-delay: 400ms; }

/* Float animation for hero pills */
@keyframes float-up-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.float-pill {
  animation: float-up-down 4s ease-in-out infinite;
}
.fp-1 { animation-delay: 0s; }
.fp-2 { animation-delay: 0.4s; }
.fp-3 { animation-delay: 0.8s; }
.fp-4 { animation-delay: 1.2s; }
.fp-5 { animation-delay: 1.6s; }
.fp-6 { animation-delay: 2.0s; }
.fp-7 { animation-delay: 2.4s; }
.fp-8 { animation-delay: 2.8s; }
.fp-9 { animation-delay: 3.2s; }
.fp-10 { animation-delay: 3.6s; }
.fp-11 { animation-delay: 4.0s; }

/* Hero illustration gentle bob */
@keyframes illustration-bob {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 6px)); }
}

.hero-illustration {
  animation: illustration-bob 5s ease-in-out infinite;
}

/* ===== Page transitions =====
   Two layers:
   1. View Transitions API (modern browsers) — automatic smooth crossfade
   2. JS-driven .page-leave class fallback — works everywhere */

/* ===== Page Transitions (senior-tuned) =====================
   Strategy: let the browser do the work.
   - Cross-document View Transitions handle the visual crossfade.
   - Speculation Rules (in HTML) prerender hover-targeted pages so the
     click activation is instant (the new page is already painted).
   - JS intercept is only kept as a tiny fallback for browsers without
     either feature; fade is short enough to feel snappy.
*/

@view-transition {
  navigation: auto;
}

/* Snappy crossfade — 200ms is the sweet spot between visible and laggy */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 200ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reduce motion: respect user preference */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 1ms;
  }
}

/* JS fallback: only for browsers without cross-doc VT or speculation rules.
   Kept very short so it never feels like a delay. */
body {
  transition: opacity 80ms linear;
}
body.page-leave {
  opacity: 0;
}

/* Cold-load entry animation — runs only on the very first page of the
   session (set by transitions.js). Internal navs use VT crossfade instead. */
.is-cold-load .page-enter {
  animation: page-enter 280ms var(--ease-out);
}
@keyframes page-enter {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===== Responsive ===== */

@media (max-width: 1200px) {
  .country-track .country-card { flex-basis: calc((100% - 32px) / 3); }
  .uni-track .uni-card { flex-basis: calc((100% - 40px) / 3); }
  .testimonial-card { flex-basis: calc((100% - 16px) / 2); }
  .features-grid { gap: 12px; padding: 12px; }
  .feature-card { padding: 36px; }
}

@media (max-width: 900px) {
  :root { --shell-pad: 16px; --panel-pad: 40px; --gap: 20px; }
  .pill-nav { display: none; }
  .menu-toggle { display: flex; }
  .header { padding: 20px 24px; }
  /* Konsultasiya CTA in header is redundant on mobile — it lives inside the
     hamburger drawer footer. Hiding it gives the logo more room and prevents
     the "Konsult..." truncation seen on small screens. */
  .header-cta { display: none; }
  /* Mobile header = logo + search icon + hamburger only.
     Auth (Giriş/Qeydiyyat / avatar) and the AZ/EN language switch are moved
     into the hamburger drawer, so hide their header-injected versions. */
  .header > #lang-switch { display: none !important; }
  /* Mobil: profil avatarı yalnız giriş edilmiş istifadəçiyə header-də görünür
     (toxununca dropdown açılır). Giriş/Qeydiyyat isə drawer-də qalır.
     order:6 — avatarı ən sağ küncə (hamburger-dən sonra) gətirir ki, açılan
     menyu sağ kənara hizalanıb ekrana rahat sığsın. */
  .header > .auth-zone { display: none !important; }
  body.is-authed .header > .auth-zone { display: flex !important; order: 6; }
  .logo img { height: 34px; }

  .panel { border-radius: var(--r-2xl); }

  .hero { padding: 24px 24px 60px; }
  .hero-headline {
    font-size: clamp(1.625rem, 7.5vw, 2.5rem);
    line-height: 1.1;
  }
  .hero-headline .line-1,
  .hero-headline .line-2 {
    white-space: nowrap;
  }
  .hero-headline .line-1 { margin-bottom: 12px; }
  .hero-headline .line-2 { margin-top: 12px; }
  /* The "bizimlə." pill should hug its text, not span the whole line */
  .hero-headline .hl-pill { padding: 0.18em 0.55em; }
  .hero-stage { height: 280px; max-width: 100%; }
  .hero-illustration { width: 280px; }
  .float-pill { font-size: 0.7rem; padding: 7px 12px; }
  .float-pill .dot { width: 6px; height: 6px; }
  .hero-foot { flex-direction: column; align-items: stretch; text-align: center; }
  .hero-foot-text { max-width: 100%; }
  .hero-foot-right { flex-direction: column; align-items: center; gap: 12px; }
  .hero-foot-meta { text-align: center; }

  .panel-banner { padding: 48px 32px; }
  .panel-banner-deco { display: none; }

  .features-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: auto; padding: 32px; padding-bottom: 32px; }
  .feature-card-content { max-width: 100%; margin-bottom: 24px; }
  .fc-icon-tile.tl { position: static; margin-bottom: 24px; width: 72px; height: 72px; }
  .fc-icon-tile img { width: 44px; height: 44px; }
  .pill-cluster { position: static; width: 100%; justify-content: flex-start; margin-top: 16px; }
  .progress-stack { position: static; width: 100%; margin-top: 16px; }
  .fc-4 .lock-decor { position: static; margin: 16px auto 0; }

  .centerpiece-head { padding: 60px 24px 40px; }
  .centerpiece-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: auto; padding: 40px 24px; }
  .tracking-card { grid-template-columns: 1fr; padding: 40px 32px 32px; }
  .tracking-visual { padding: 16px 0 0; }
  .deadline-bricks { max-width: 100%; }
  .deadline-bricks .brick:nth-child(4n+3),
  .deadline-bricks .brick:nth-child(4n+4) { margin-left: 12px; margin-right: -12px; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; padding: 48px 40px 24px; }
  .section-head-with-nav { flex-direction: column; align-items: flex-start; gap: 16px; padding: 48px 40px 24px; }
  .country-track-wrap, .uni-track-wrap { padding: 16px 40px 40px; }
  .country-track .country-card, .uni-track .uni-card { flex-basis: 80%; }

  .testimonials-head { padding: 48px 40px 24px; flex-direction: column; gap: 24px; align-items: flex-start; }
  .testimonials-track-wrap { padding: 16px 40px 20px; }
  .testimonial-card { flex-basis: 85%; }
  .testimonials-progress { padding: 24px; }

  .panel-footer { padding: 48px 20px 24px; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 12px; padding-bottom: 24px; }
  .footer-top h2 { font-size: 1.75rem; line-height: 1.1; }
  .footer-top a.email-big { font-size: 1.25rem; }
  /* 2-column layout — keeps the footer compact instead of one tall stack.
     Left column: Sayt xəritəsi.
     Right column: Mətbuat üçün + Dəstək (already in same .footer-col) +
                   Sosial (positioned beneath via grid placement). */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
    padding: 24px 0 8px;
  }
  /* Last col contains the iOS/Android promo card — overkill on mobile, hide it. */
  .footer-grid .footer-col:last-child { display: none; }
  /* Cleaner heading + list spacing on mobile (~20% tighter) */
  .footer-col h5 { margin-bottom: 14px; font-size: 0.875rem; }
  .footer-col ul li { margin-bottom: 8px; }
  .footer-col a { font-size: 0.875rem; }
  /* Place columns: left tall (Sayt xəritəsi) spans both rows;
     right top = Mətbuat+Dəstək; right bottom = Sosial */
  .footer-grid .footer-col:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / span 2;
  }
  .footer-grid .footer-col:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }
  .footer-grid .footer-col:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
  }
  /* Sosial heading sits a bit closer to whatever's above it on the right side */
  .footer-grid .footer-col:nth-child(3) h5 { margin-top: 0; margin-bottom: 10px; }
  .footer-social-tiles { gap: 8px; }
  .footer-social-tiles a { width: 36px; height: 36px; }
  .phone-mockup { display: none; }
  .app-store-row { gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; padding-top: 20px; font-size: 0.75rem; }
  .footer-bottom div:last-child a { margin: 0 10px; }

  /* ===== Card 1 (Ödənişsiz konsultasiya) — country pill cluster =====
     Make pills smaller and hide the last 3 entries (Macarıstan, İsveç, UK)
     so the cluster fits in two compact rows on mobile. The HTML keeps all
     9 entries; CSS only hides them visually on small screens. */
  .feature-card .pill-cluster .cluster-pill {
    font-size: 0.75rem;
    padding: 7px 12px;
    gap: 6px;
  }
  .feature-card .pill-cluster .cluster-pill .dot {
    width: 6px; height: 6px;
  }
  /* In Card 1 there are 9 country pills — hide the last 3.
     In Card 2 there are 9 scholarship pills — hide the last 3.
     The structural CSS is the same for both cards. */
  .feature-card .pill-cluster .cluster-pill:nth-last-child(-n+3) {
    display: none;
  }

  /* ===== Card 4 (deadline tracker) — bricks =====
     Tighter padding and smaller font. Hide the last 2 deadline bricks
     (DTP Azərbaycan, Visegrad Fund) to reduce vertical real estate. */
  .deadline-bricks { gap: 10px; max-width: 320px; }
  .deadline-bricks .brick {
    padding: 10px 12px;
    min-height: 56px;
  }
  .deadline-bricks .brick-name { font-size: 0.78rem; }
  .deadline-bricks .brick-meta { font-size: 0.72rem; }
  .deadline-bricks .brick:nth-last-child(-n+2) { display: none; }
  /* The original layout uses a brick offset every 4th row — recompute the
     offset because we now have 6 visible bricks instead of 8. Disable the
     stagger entirely on mobile so bricks line up cleanly in pairs. */
  .deadline-bricks .brick:nth-child(4n+3),
  .deadline-bricks .brick:nth-child(4n+4) {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 480px) {
  :root { --panel-pad: 24px; }
  .country-track .country-card, .uni-track .uni-card { flex-basis: 90%; }
  .section-head, .section-head-with-nav { padding: 40px 24px 20px; }
  .country-track-wrap, .uni-track-wrap { padding: 12px 24px 32px; }
  .testimonials-head { padding: 40px 24px 20px; }
  .testimonials-track-wrap { padding: 12px 24px 16px; }
  .float-pill.fp-2, .float-pill.fp-4, .float-pill.fp-6, .float-pill.fp-7, .float-pill.fp-8, .float-pill.fp-10, .float-pill.fp-11 { display: none; }
}

/* ===== Mobile Menu Overlay (drawer) =====
   Hidden by default. Only shown when JS adds .is-open. The drawer slides in
   from the right and covers the whole viewport on mobile. Desktop sees nothing
   because .menu-toggle (the trigger) is display:none above 900px. */
.mm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(26, 26, 77, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms var(--ease), visibility 0s linear 240ms;
  -webkit-tap-highlight-color: transparent;
}
.mm-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 240ms var(--ease), visibility 0s linear 0s;
}

.mm-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  /* Panel is wide enough for content but always leaves a small gap on the
     left so the rounded edge and shadow are visible against the dim backdrop.
     Below 320px (rare) it falls back to 100% width. */
  width: min(420px, calc(100% - 32px));
  background: var(--card-bg);
  /* Drawer is glued to the right edge, so only the LEFT corners are visible.
     Rounding them matches the brand's overall soft, pill-friendly shape. */
  border-radius: 22px 0 0 22px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 280ms var(--ease-out);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: -16px 0 40px rgba(13, 10, 50, 0.18);
}
.mm-overlay.is-open .mm-panel { transform: translateX(0); }

.mm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  background: var(--card-bg);
  z-index: 2;
}
.mm-close {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  color: var(--ink);
  background: transparent;
  transition: background var(--t-fast) var(--ease);
}
.mm-close:active { background: var(--inner-2); }
.mm-logo img { height: 32px; display: block; }
.mm-head-spacer { width: 40px; } /* visually balances the close button */

.mm-nav {
  flex: 1;
  padding: 8px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mm-link {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 16px 14px;
  border-radius: var(--r-md);
  color: var(--ink);
  transition: background var(--t-fast) var(--ease);
  position: relative;
}
.mm-link:active { background: var(--inner-2); }
.mm-link.is-active {
  background: var(--brand-soft);
}
.mm-link.is-active .mm-link-label { color: var(--brand-dark); }

.mm-link-label {
  grid-column: 1;
  grid-row: 1;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.mm-link-desc {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.8125rem;
  color: var(--mute);
  margin-top: 2px;
}
.mm-link-arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--mute-2);
  flex-shrink: 0;
}
.mm-link.is-active .mm-link-arrow { color: var(--brand); }

.mm-foot {
  padding: 16px 22px 24px;
  border-top: 1px solid var(--border-soft);
  position: sticky;
  bottom: 0;
  background: var(--card-bg);
}
.mm-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: var(--ink);
  color: var(--card-bg);
  border-radius: var(--r-pill);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  transition: transform var(--t-fast) var(--ease);
}
.mm-cta:active { transform: scale(0.98); }

/* ===== Drawer: language switch + auth (mobile only) =====
   These replace the header-injected language switch and auth zone, which are
   hidden below 901px. Self-contained classes — no dependency on the header. */
.mm-foot { display: flex; flex-direction: column; gap: 12px; }

/* Language segmented control */
.mm-lang {
  display: flex;
  gap: 4px;
  background: rgba(26, 26, 77, 0.06);
  border-radius: var(--r-pill);
  padding: 4px;
  align-self: center;
}
.mm-lang-opt {
  border: none;
  background: transparent;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--mute);
  padding: 8px 22px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.mm-lang-opt.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 8px rgba(26, 26, 77, 0.14);
}

/* Auth rows — logged-out (Giriş / Qeydiyyat) vs logged-in (Profil / Çıxış) */
.mm-auth-out { display: flex; gap: 10px; }
.mm-auth-in  { display: none; gap: 10px; }
body.is-authed .mm-auth-out { display: none; }
body.is-authed .mm-auth-in  { display: flex; }

.mm-auth-out > *, .mm-auth-in > * {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: var(--r-pill);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.mm-auth-login,
.mm-auth-profile {
  background: var(--inner);
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.mm-auth-login:active,
.mm-auth-profile:active { background: var(--inner-2); transform: scale(0.98); }
.mm-auth-signup {
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-pill);
}
.mm-auth-signup:active { transform: scale(0.98); filter: brightness(1.05); }
.mm-auth-logout {
  background: #FEF2F2;
  color: #DC2626;
  border: 1.5px solid #FECACA;
}
.mm-auth-logout:active { background: #FEE2E2; transform: scale(0.98); }

/* Hamburger animates into an X when active (visual feedback) */
.menu-toggle.is-active span { background: transparent; }
.menu-toggle.is-active span::before {
  top: 0;
  transform: rotate(45deg);
}
.menu-toggle.is-active span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Hide overlay completely on desktop — extra safety. .menu-toggle is already
   display:none above 900px, but this keeps the DOM clean if JS misfires. */
@media (min-width: 901px) {
  .mm-overlay { display: none !important; }
}

/* ===== Scroll-to-top rocket button ===== */
.scroll-top-rocket {
  position: fixed;
  right: 32px;
  bottom: 32px;
  width: 64px;
  height: 88px;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 100;
  opacity: 0;
  transform: translateY(24px) scale(0.85);
  transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
  pointer-events: none;
  padding: 0;
  filter: drop-shadow(0 8px 16px rgba(91, 79, 207, 0.25));
}

.scroll-top-rocket.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.scroll-top-rocket img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 300ms var(--ease-out);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  position: relative;
  z-index: 2;
}

.scroll-top-rocket:hover img {
  transform: translateY(-6px);
}

.scroll-top-rocket.launching img {
  animation: rocket-bump 900ms var(--ease-out);
}

@keyframes rocket-bump {
  0%   { transform: translateY(0); }
  20%  { transform: translateY(-4px); }
  45%  { transform: translateY(-18px) rotate(-1.2deg); }
  70%  { transform: translateY(-10px) rotate(0.6deg); }
  100% { transform: translateY(0); }
}

/* ===== Rocket flames — only visible during .launching ===== */
.rocket-flame {
  position: absolute;
  left: 50%;
  top: calc(100% - 18px);
  width: 32px;
  height: 56px;
  pointer-events: none;
  opacity: 0;
  z-index: 1;
  transform: translateX(-50%);
}

.scroll-top-rocket.launching .rocket-flame {
  opacity: 1;
}

.flame {
  position: absolute;
  left: 50%;
  top: 0;
  transform-origin: 50% 0%;
  border-radius: 50% 50% 35% 35% / 25% 25% 75% 75%;
  filter: blur(1px);
}

.flame-outer {
  width: 28px;
  height: 50px;
  margin-left: -14px;
  background: radial-gradient(ellipse at 50% 5%, rgba(251, 146, 60, 0.95) 0%, rgba(251, 146, 60, 0.45) 55%, rgba(195, 21, 255, 0) 100%);
}

.flame-mid {
  width: 16px;
  height: 36px;
  margin-left: -8px;
  background: radial-gradient(ellipse at 50% 8%, #FFD93D 0%, #FB923C 60%, rgba(251, 146, 60, 0) 100%);
}

.flame-inner {
  width: 8px;
  height: 22px;
  margin-left: -4px;
  background: radial-gradient(ellipse at 50% 10%, #FFFFFF 0%, #FFE680 55%, rgba(255, 217, 61, 0) 100%);
}

/* Flicker — fast, slightly out-of-sync per layer for organic feel */
.scroll-top-rocket.launching .flame-outer {
  animation: flame-flick-outer 110ms ease-in-out infinite alternate;
}
.scroll-top-rocket.launching .flame-mid {
  animation: flame-flick-mid 80ms ease-in-out infinite alternate;
}
.scroll-top-rocket.launching .flame-inner {
  animation: flame-flick-inner 60ms ease-in-out infinite alternate;
}

@keyframes flame-flick-outer {
  from { transform: scaleY(0.85) scaleX(1.08); opacity: 0.85; }
  to   { transform: scaleY(1.18) scaleX(0.92); opacity: 1; }
}
@keyframes flame-flick-mid {
  from { transform: scaleY(0.9) scaleX(1.12); opacity: 0.88; }
  to   { transform: scaleY(1.25) scaleX(0.88); opacity: 1; }
}
@keyframes flame-flick-inner {
  from { transform: scaleY(0.92); opacity: 0.92; }
  to   { transform: scaleY(1.3); opacity: 1; }
}

/* Sparks — small bright dots that drift down + fade */
.flame-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #FFE680;
  box-shadow: 0 0 6px rgba(255, 217, 61, 0.9);
  opacity: 0;
  top: 18px;
  left: 50%;
  margin-left: -2px;
}
.scroll-top-rocket.launching .spark-1 { animation: spark-drift 520ms ease-out infinite; animation-delay: 0ms; }
.scroll-top-rocket.launching .spark-2 { animation: spark-drift 460ms ease-out infinite; animation-delay: 140ms; }
.scroll-top-rocket.launching .spark-3 { animation: spark-drift 600ms ease-out infinite; animation-delay: 280ms; }

@keyframes spark-drift {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  60%  { opacity: 0.7; }
  100% { opacity: 0; transform: translate(var(--sx, 6px), 28px) scale(0.4); }
}
.spark-1 { --sx: -8px; }
.spark-2 { --sx: 10px; }
.spark-3 { --sx: -3px; }

@media (max-width: 700px) {
  .scroll-top-rocket {
    right: 20px;
    bottom: 20px;
    width: 52px;
    height: 72px;
  }
  .rocket-flame {
    width: 26px;
    height: 44px;
    top: calc(100% - 14px);
  }
  .flame-outer { width: 22px; height: 40px; margin-left: -11px; }
  .flame-mid   { width: 13px; height: 28px; margin-left: -6.5px; }
  .flame-inner { width: 6px;  height: 18px; margin-left: -3px; }
}

/* ===== Disable text/image selection across the site ===== */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Allow selection in form fields so users can type/paste */
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Prevent image dragging and right-click save */
img, svg {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

/* ============================================================
 * DTP Star + Tooltip — Global utility class
 * ============================================================
 * Bütün səhifələrdə istifadə olunur (universitetler, ölkələr, proqramlar).
 * Tooltip parent transform-undan asılı olmadan düz qalır;
 * kursor normal qalır (sual işarəsinə çevrilmir).
 */
.dtp-star {
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  color: #F5A623;
  text-shadow: 0 1px 2px rgba(245, 166, 35, 0.3);
  cursor: default;
  position: relative;
  margin-left: 6px;
  user-select: none;
  vertical-align: middle;
  transition: transform 200ms ease, color 200ms ease;
}
.dtp-star:hover {
  transform: scale(1.18);
  color: #FFB938;
}
/* Köhnə pseudo-element tooltip artıq istifadə olunmur — `tooltip.js`
   real DOM elementi ilə body-yə tooltip əlavə edir. Bu blok tamamilə
   gizlədilir ki, iki tooltip üst-üstə düşməsin. */
.dtp-star::before { display: none !important; }
.dtp-star::after { display: none !important; }

/* ============================================
   Flag icons — v9.20
   Emoji bayraqları (🇮🇹, 🇩🇪, ...) Icons8 dairəvi PNG-ə dəyişir.
   shared.js avtomatik yerləşdirir; emoji fallback iconu olmayan ölkələr üçün.
   ============================================ */
.flag-icon {
  display: inline-block;
  vertical-align: middle;
  width: 1.4em;
  height: 1.4em;
  object-fit: contain;
  flex-shrink: 0;
  /* Icons8 dairəvi flag — border-radius gərək deyil, amma yumşaq edge */
  border-radius: 50%;
}

/* When flag-icon replaces an emoji span, the parent already has font-size set —
   so 1.4em scales relative to that. */

/* Specific contexts — finetune size */
.sp-flag.flag-icon,        /* Ölkələr siyahı kartları */
.cc-flag.flag-icon,        /* Country card */
.ct-flag.flag-icon,        /* Comparison table header */
.td-flag.flag-icon,        /* Təqaüd səhifələri başlıq */
.tl-card-flag.flag-icon,   /* Təqaüdlər list card */
.ul-card-flag.flag-icon,   /* Universitetlər card */
.ul-pill-flag.flag-icon {  /* Universitetlər filter pill */
  width: 1.4em;
  height: 1.4em;
}

/* Bigger flag for country detail hero */
.cd-flag.flag-icon {
  width: 1em;     /* parent font-size is huge — keep at 1em */
  height: 1em;
}

/* Tighten spacing when flag is followed by text in the same line */
.flag-icon + * { margin-left: 4px; }
