/* ==========================================================================
   Aviation News — Premium Dark Theme
   Inspired by Netflix/streaming design language
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS (Custom Properties)
   -------------------------------------------------------------------------- */
:root {
  /* Backgrounds */
  --bg-base: #0A0A0F;
  --bg-surface: #111118;
  --bg-elevated: #1A1A25;
  --bg-highest: #252535;

  /* Accent */
  --accent: #0EA5E9;
  --accent-dark: #0284C7;
  --accent-light: #38BDF8;
  --accent-pale: #7DD3FC;
  --accent-glow: rgba(14, 165, 233, 0.25);
  --accent-subtle: rgba(14, 165, 233, 0.10);

  /* Text */
  --text-primary: #FFFFFF;
  --text-muted: #B3B3C0;
  --text-subtle: #808094;

  /* Semantic */
  --color-error: #EF4444;
  --color-success: #22C55E;
  --color-warning: #F59E0B;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.1rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-accent: 0 4px 20px var(--accent-glow);

  /* Glass */
  --glass-bg: rgba(10, 10, 15, 0.85);
  --glass-blur: blur(20px);
  --glass-border: rgba(255, 255, 255, 0.06);

  /* Borders */
  --border-subtle: 1px solid rgba(255, 255, 255, 0.06);
  --border-accent: 1px solid var(--accent);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Layout */
  --container-max: 1280px;
  --nav-height: 64px;
}

/* --------------------------------------------------------------------------
   2. RESET & GLOBAL
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(14, 165, 233, 0.3);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(14, 165, 233, 0.5);
}

/* Selection */
::selection {
  background: var(--accent);
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   3. LAYOUT & CONTAINER
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.main-content {
  padding-top: calc(var(--nav-height) + var(--space-lg));
  min-height: 100vh;
}

/* --------------------------------------------------------------------------
   4. NAVIGATION / HEADER
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: var(--border-subtle);
  transition: background var(--transition-base);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.nav-logo .logo-accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  position: relative;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-muted);
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after,
.nav-link:hover::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.nav-search-btn:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: var(--space-sm);
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: var(--radius-pill);
  transition: all var(--transition-base);
}

.nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Drawer */
.nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--bg-surface);
  border-left: var(--border-subtle);
  z-index: 999;
  padding: calc(var(--nav-height) + var(--space-lg)) var(--space-lg) var(--space-lg);
  transition: right var(--transition-base);
  overflow-y: auto;
}

.nav-drawer.open {
  right: 0;
}

.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.nav-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer .nav-link {
  display: block;
  padding: var(--space-md) 0;
  font-size: var(--font-size-lg);
  border-bottom: var(--border-subtle);
}

/* --------------------------------------------------------------------------
   5. HERO SECTION
   -------------------------------------------------------------------------- */
.hero {
  display: block;
  position: relative;
  width: 100%;
  height: 500px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-2xl);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.hero:hover .hero-image {
  transform: scale(1.01);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(10, 10, 15, 0.3) 40%,
    rgba(10, 10, 15, 0.85) 75%,
    var(--bg-base) 100%
  );
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-2xl) var(--space-xl);
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--accent);
  color: var(--text-primary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-md);
}

.hero-title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  margin-bottom: var(--space-md);
  max-width: 720px;
}

.hero-excerpt {
  font-size: var(--font-size-lg);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: var(--space-md);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--font-size-sm);
  color: var(--text-subtle);
}

.hero-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-subtle);
}

/* --------------------------------------------------------------------------
   6. ARTICLE CARDS
   -------------------------------------------------------------------------- */

/* --- 6a. Standard Card --- */
.card {
  position: relative;
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.card-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.card:hover .card-image {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  padding: var(--space-xs) var(--space-sm);
  background: var(--accent);
  color: var(--text-primary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-radius: var(--radius-pill);
  z-index: 1;
}

.card-body {
  padding: var(--space-md);
}

.card-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-excerpt {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-xs);
  color: var(--text-subtle);
}

.card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-subtle);
}

/* --- 6b. Landscape Card --- */
.card-landscape {
  display: flex;
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.card-landscape .card-image-wrapper {
  flex: 0 0 40%;
  aspect-ratio: auto;
}

.card-landscape .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-md);
}

.card-landscape .card-title {
  font-size: 0.95rem;
}

/* --- 6c. Compact Card --- */
.card-compact {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.card-compact:hover {
  background: var(--bg-elevated);
}

.card-compact-rank {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  color: var(--accent);
  opacity: 0.4;
  min-width: 36px;
  text-align: center;
  line-height: 1;
}

.card-compact-thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.card-compact-body {
  flex: 1;
  min-width: 0;
}

.card-compact-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-compact-date {
  font-size: var(--font-size-xs);
  color: var(--text-subtle);
}

/* --------------------------------------------------------------------------
   7. CONTENT GRIDS
   -------------------------------------------------------------------------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

/* --------------------------------------------------------------------------
   8. SECTION HEADERS
   -------------------------------------------------------------------------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.section-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-primary);
  padding-left: var(--space-md);
  border-left: 3px solid var(--accent);
}

.section-link {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--accent);
  transition: color var(--transition-fast);
}

.section-link:hover {
  color: var(--accent-light);
}

.section {
  margin-bottom: var(--space-3xl);
}

/* --------------------------------------------------------------------------
   9. ARTICLE DETAIL PAGE
   -------------------------------------------------------------------------- */
.article-hero {
  position: relative;
  width: 100%;
  height: 450px;
  margin-bottom: var(--space-xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 30%,
    var(--bg-base) 100%
  );
}

.article-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.article-header {
  margin-bottom: var(--space-xl);
}

.article-category {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: var(--accent-subtle);
  color: var(--accent-light);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-md);
}

.article-title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--font-size-sm);
  color: var(--text-subtle);
  flex-wrap: wrap;
}

.article-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-subtle);
}

/* Article Content Typography */
.article-content {
  font-size: var(--font-size-lg);
  line-height: 1.8;
  color: var(--text-muted);
}

.article-content p {
  margin-bottom: var(--space-lg);
}

.article-content h2 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.article-content h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.article-content img {
  width: 100%;
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
}

.article-content a {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:hover {
  color: var(--accent-pale);
}

.article-content blockquote {
  border-left: 3px solid var(--accent);
  background: var(--bg-surface);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-muted);
}

.article-content ul,
.article-content ol {
  padding-left: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: var(--space-sm);
}

.article-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: var(--border-subtle);
}

.article-tag {
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  font-weight: 500;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

.article-tag:hover {
  background: var(--accent-subtle);
  color: var(--accent-light);
}

/* Author Bio */
.author-card {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: var(--space-2xl);
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-name {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.author-bio {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   10. YOUTUBE SHORTS SECTION
   -------------------------------------------------------------------------- */
.shorts-scroll {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-sm);
  scrollbar-width: none;
}

.shorts-scroll::-webkit-scrollbar {
  display: none;
}

.shorts-card {
  flex-shrink: 0;
  width: 200px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  cursor: pointer;
}

.shorts-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.shorts-card:hover img {
  transform: scale(1.05);
}

.shorts-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(10, 10, 15, 0.9) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-md);
}

.shorts-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.shorts-card:hover .shorts-play {
  opacity: 1;
}

.shorts-play svg {
  width: 20px;
  height: 20px;
  fill: var(--text-primary);
  margin-left: 2px;
}

.shorts-duration {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  padding: 2px var(--space-sm);
  background: rgba(0, 0, 0, 0.7);
  color: var(--text-primary);
  font-size: var(--font-size-xs);
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.shorts-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   11. FLIGHT TRACKER
   -------------------------------------------------------------------------- */
.flight-search {
  display: flex;
  gap: var(--space-md);
  align-items: flex-end;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.flight-search .form-group {
  flex: 1;
  min-width: 150px;
}

.form-label {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
}

.form-input {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
  color: var(--text-subtle);
}

.btn-search {
  padding: var(--space-md) var(--space-xl);
  background: var(--accent);
  color: var(--text-primary);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  white-space: nowrap;
}

.btn-search:hover {
  background: var(--accent-dark);
}

/* Flight Result Card */
.flight-card {
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  margin-bottom: var(--space-md);
}

.flight-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.flight-airline {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-muted);
}

.flight-number {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-subtle);
}

.flight-status {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-xs);
  font-weight: 600;
  border-radius: var(--radius-pill);
}

.flight-status.on-time {
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-success);
}

.flight-status.delayed {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
}

.flight-status.cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-error);
}

.flight-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.flight-endpoint {
  text-align: center;
  flex: 0 0 auto;
}

.flight-endpoint.departure {
  text-align: left;
}

.flight-endpoint.arrival {
  text-align: right;
}

.flight-code {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.flight-city {
  font-size: var(--font-size-sm);
  color: var(--text-subtle);
  margin-top: var(--space-xs);
}

.flight-time {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-top: var(--space-xs);
}

.flight-connector {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 80px;
}

.flight-connector-line {
  width: 100%;
  height: 2px;
  background: var(--bg-highest);
  position: relative;
}

.flight-connector-line::before {
  content: '';
  position: absolute;
  left: 0;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.flight-connector-line::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.flight-plane-icon {
  position: absolute;
  color: var(--accent);
  font-size: var(--font-size-xl);
  background: var(--bg-surface);
  padding: 0 var(--space-sm);
}

/* Flight Progress Bar */
.flight-progress {
  height: 4px;
  background: var(--bg-highest);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.flight-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent-light));
  border-radius: var(--radius-pill);
  transition: width var(--transition-slow);
}

/* --------------------------------------------------------------------------
   12. SEARCH PAGE
   -------------------------------------------------------------------------- */
.search-hero {
  text-align: center;
  padding: var(--space-2xl) 0;
}

.search-hero h1 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.search-input-wrapper {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-input {
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  padding-left: 48px;
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-lg);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input::placeholder {
  color: var(--text-subtle);
}

.search-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
}

.search-results-count {
  font-size: var(--font-size-sm);
  color: var(--text-subtle);
  margin-bottom: var(--space-lg);
}

/* --------------------------------------------------------------------------
   13. PAGINATION
   -------------------------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
  padding: var(--space-xl) 0;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: var(--border-subtle);
  transition: all var(--transition-fast);
}

.pagination-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.pagination-btn.active {
  background: var(--accent);
  color: var(--text-primary);
  border-color: var(--accent);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-ellipsis {
  color: var(--text-subtle);
  padding: 0 var(--space-xs);
}

/* --------------------------------------------------------------------------
   14. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: var(--bg-surface);
  border-top: var(--border-subtle);
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-2xl);
}

.footer-about p {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: var(--space-md);
}

.footer-heading {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-md);
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-social {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--accent);
  color: var(--text-primary);
}

.footer-bottom {
  border-top: var(--border-subtle);
  padding: var(--space-md) 0;
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--text-subtle);
}

/* --------------------------------------------------------------------------
   15. ANIMATIONS
   -------------------------------------------------------------------------- */

/* Fade in up (scroll reveal) */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children > *:nth-child(1) { transition-delay: 0s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.05s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.15s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.25s; }
.stagger-children > *:nth-child(7) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(8) { transition-delay: 0.35s; }

/* --------------------------------------------------------------------------
   16. LOADING / SKELETON
   -------------------------------------------------------------------------- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    var(--bg-highest) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-image {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.skeleton-text {
  height: 14px;
  margin-bottom: var(--space-sm);
}

.skeleton-text.sm {
  width: 60%;
}

.skeleton-text.xs {
  width: 40%;
  height: 12px;
}

.skeleton-title {
  height: 20px;
  margin-bottom: var(--space-sm);
  width: 80%;
}

.skeleton-card {
  background: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-card .skeleton-body {
  padding: var(--space-md);
}

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

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   17. UTILITY CLASSES
   -------------------------------------------------------------------------- */
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }

.bg-surface  { background: var(--bg-surface); }
.bg-elevated { background: var(--bg-elevated); }
.bg-highest  { background: var(--bg-highest); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-xs);
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: var(--accent-subtle);
  color: var(--accent-light);
}

.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
}

.badge-error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-error);
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-center { text-align: center; }
.text-right  { text-align: right; }

/* --------------------------------------------------------------------------
   18. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */

/* Tablet landscape and below: 1024px */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: var(--font-size-3xl);
  }

  .article-title {
    font-size: var(--font-size-3xl);
  }
}

/* Tablet portrait and below: 768px */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .hero {
    height: 350px;
  }

  .hero-title {
    font-size: var(--font-size-2xl);
  }

  .hero-excerpt {
    font-size: var(--font-size-base);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-content {
    padding: var(--space-lg);
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .article-hero {
    height: 280px;
    border-radius: 0;
  }

  .article-title {
    font-size: var(--font-size-2xl);
  }

  .article-wrapper {
    padding: 0 var(--space-md);
  }

  .flight-route {
    flex-direction: column;
    text-align: center;
  }

  .flight-endpoint.departure,
  .flight-endpoint.arrival {
    text-align: center;
  }

  .flight-connector {
    width: 100%;
    min-height: 40px;
    transform: rotate(90deg);
  }

  .flight-search {
    flex-direction: column;
  }

  .flight-search .form-group {
    min-width: 100%;
  }

  .author-card {
    flex-direction: column;
    text-align: center;
  }

  .section-title {
    font-size: var(--font-size-xl);
  }

  .container {
    padding: 0 var(--space-md);
  }
}

/* Mobile: 480px */
@media (max-width: 480px) {
  :root {
    --space-lg: 16px;
    --space-xl: 24px;
    --space-2xl: 32px;
    --space-3xl: 48px;
  }

  .hero {
    height: 300px;
    border-radius: var(--radius-md);
  }

  .hero-title {
    font-size: var(--font-size-xl);
  }

  .hero-badge {
    font-size: 10px;
  }

  .card-landscape {
    flex-direction: column;
  }

  .card-landscape .card-image-wrapper {
    flex: none;
    aspect-ratio: 16 / 9;
  }

  .shorts-card {
    width: 160px;
  }

  .search-input {
    font-size: var(--font-size-base);
    padding: var(--space-md);
    padding-left: 40px;
  }

  .pagination-btn {
    min-width: 36px;
    height: 36px;
    font-size: var(--font-size-xs);
  }

  .flight-code {
    font-size: var(--font-size-2xl);
  }

  .article-content {
    font-size: var(--font-size-base);
  }
}

/* Ultra-wide: 1280px+ */
@media (min-width: 1280px) {
  .container {
    padding: 0 var(--space-xl);
  }
}
