/*
Theme Name: Aviator
Theme URI: https://github.com/aviator-theme
Author: Aviator Theme
Description: A bold aviation-themed WordPress theme with red, white & blue palette, automatic dark/light mode, and full mobile responsiveness.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aviator
Tags: aviation, responsive, dark-mode, light-mode, one-column, two-columns, custom-menu, custom-logo, featured-images, blog
*/

/* =========================================================
   CSS CUSTOM PROPERTIES — Light Mode (default)
   ========================================================= */
:root {
  /* Brand */
  --color-red:       #c8102e;
  --color-red-dark:  #9b0c23;
  --color-blue:      #002868;
  --color-blue-mid:  #1a3a8f;
  --color-blue-light:#2a52be;
  --color-white:     #ffffff;
  --color-silver:    #f0f4f8;

  /* Surfaces */
  --bg-page:        #f5f7fa;
  --bg-card:        #ffffff;
  --bg-nav:         #002868;
  --bg-footer:      #001a44;
  --bg-hero:        linear-gradient(135deg, #002868 0%, #1a3a8f 50%, #c8102e 100%);

  /* Text */
  --text-primary:   #0d1b2a;
  --text-secondary: #3d5166;
  --text-muted:     #6b7c93;
  --text-on-dark:   #ffffff;
  --text-on-red:    #ffffff;

  /* Borders */
  --border:         #d6dde6;
  --border-strong:  #b0bfcc;

  /* Accents */
  --accent:         #c8102e;
  --accent-hover:   #9b0c23;
  --link:           #1a3a8f;
  --link-hover:     #c8102e;

  /* Shadows */
  --shadow-sm:      0 1px 3px rgba(0,40,104,.08);
  --shadow-md:      0 4px 12px rgba(0,40,104,.12);
  --shadow-lg:      0 8px 30px rgba(0,40,104,.15);

  /* Sizing */
  --nav-height:     70px;
  --container:      1200px;
  --radius:         6px;
  --radius-lg:      12px;

  /* Transitions */
  --transition:     0.25s ease;
}

/* =========================================================
   Dark Mode — via prefers-color-scheme
   ========================================================= */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-page:        #0a0f1e;
    --bg-card:        #111827;
    --bg-nav:         #060d1f;
    --bg-footer:      #040810;
    --bg-hero:        linear-gradient(135deg, #060d1f 0%, #0d1f5c 50%, #7a0a1c 100%);

    --text-primary:   #e8edf5;
    --text-secondary: #9aafc5;
    --text-muted:     #5d7490;

    --border:         #1e2d45;
    --border-strong:  #2a3d58;

    --link:           #6b9fff;
    --link-hover:     #ff6b7a;

    --shadow-sm:      0 1px 3px rgba(0,0,0,.4);
    --shadow-md:      0 4px 12px rgba(0,0,0,.5);
    --shadow-lg:      0 8px 30px rgba(0,0,0,.6);
  }
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-page);
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
  max-width: 100vw;
}

img, video, iframe, embed { max-width: 100%; height: auto; display: block; }
.entry-content img,
.entry-content video,
.entry-content iframe { max-width: 100% !important; }
a { color: var(--link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--link-hover); }
ul, ol { padding-left: 1.5em; }
table { border-collapse: collapse; width: 100%; }
input, textarea, select, button { font: inherit; }

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: .5em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1.25em; }
p:last-child { margin-bottom: 0; }

blockquote {
  border-left: 4px solid var(--color-red);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
  font-style: italic;
}

code, pre {
  font-family: 'Courier New', monospace;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
code { padding: .15em .4em; font-size: .9em; }
pre { padding: 1.25rem; overflow-x: auto; margin-bottom: 1.5em; }
pre code { background: none; border: none; padding: 0; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* =========================================================
   LAYOUT
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) { .container { padding: 0 2rem; } }

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  flex: 1;
  padding: 3rem 0;
  overflow: hidden;
}

/* Content + Sidebar */
.content-area {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  min-width: 0;
  max-width: 100%;
}

.main-column {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
@media (min-width: 900px) {
  .content-area.has-sidebar {
    grid-template-columns: 1fr 320px;
  }
}

/* =========================================================
   NAVIGATION
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-nav);
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
  min-height: var(--nav-height);
  transition: background var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-height);
  flex-wrap: wrap;
  gap: .5rem;
  padding: .5rem 0;
}

/* Logo */
.site-branding {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}

.site-logo img {
  height: 46px;
  width: auto;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.1;
  color: var(--color-white);
}

.site-title a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.site-title .title-main {
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1.1rem;
}

.site-title .title-tagline {
  color: var(--color-red);
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Runway stripe accent */
.nav-runway {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--color-red) 0px,
    var(--color-red) 40px,
    transparent 40px,
    transparent 60px
  );
  opacity: .7;
}

/* Primary Menu */
.primary-menu-wrap {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.primary-menu {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: .1rem;
}

.primary-menu li { position: relative; }

.primary-menu a {
  display: block;
  padding: .5rem .9rem;
  color: rgba(255,255,255,.85);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current-page-ancestor > a {
  background: var(--color-red);
  color: var(--color-white);
}

/* Dropdown */
.primary-menu .sub-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: .4rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--transition);
  z-index: 100;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-menu .sub-menu a {
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: 0;
  font-size: .875rem;
  border-radius: 0;
  padding: .5rem 1rem;
}

.primary-menu .sub-menu a:hover {
  background: var(--bg-page);
  color: var(--color-red);
}

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: var(--radius);
  padding: .4rem .6rem;
  cursor: pointer;
  color: white;
  gap: 5px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all .3s ease;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1100px) {
  .menu-toggle { display: flex; }
  .primary-menu-wrap {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-nav);
    padding: 1rem 1.25rem 1.5rem;
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    transition: transform .3s ease, opacity .3s ease, visibility .3s ease;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    z-index: 999;
  }
  .primary-menu-wrap.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .primary-menu {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }
  .primary-menu li {
    width: 100%;
  }
  .primary-menu > li > a {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .primary-menu a {
    padding: .75rem 1rem;
    font-size: 1rem;
  }
  .primary-menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,.05);
    padding-left: 1rem;
  }
  .primary-menu .sub-menu a { color: rgba(255,255,255,.7); }
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
  background: var(--bg-hero);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 400'%3E%3Cpath d='M0 300 Q300 200 600 280 T1200 260 L1200 400 L0 400Z' fill='rgba(255,255,255,0.04)'/%3E%3C/svg%3E") center/cover no-repeat;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero h1 {
  color: var(--color-white);
  text-shadow: 0 2px 20px rgba(0,0,0,.4);
  margin-bottom: 1rem;
}

.hero h1 .highlight { color: var(--color-red); }

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,.85);
  max-width: 640px;
  margin: 0 auto 2rem;
}

/* Airplane SVG decoration */
.hero-plane {
  font-size: 5rem;
  display: block;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 4px 20px rgba(200,16,46,.5));
  animation: glide 6s ease-in-out infinite;
}

@keyframes glide {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50%       { transform: translateY(-12px) rotate(-3deg); }
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-red);
  color: white;
  border-color: var(--color-red);
}
.btn-primary:hover {
  background: var(--color-red-dark);
  border-color: var(--color-red-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200,16,46,.4);
}

.btn-outline {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,.1);
  border-color: white;
  color: white;
}

.btn-blue {
  background: var(--color-blue-mid);
  color: white;
  border-color: var(--color-blue-mid);
}
.btn-blue:hover {
  background: var(--color-blue);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,40,104,.4);
}

/* =========================================================
   CARDS
   ========================================================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-page);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.card:hover .card-thumb img { transform: scale(1.04); }

/* Featured post hero image — contain full portrait/landscape images */
.featured-post .card-thumb {
  aspect-ratio: unset;
  height: 420px;
  overflow: hidden;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-post .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-body { padding: 1.5rem; }

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: .75rem;
}

.card-category {
  background: var(--color-red);
  color: white;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: .2rem .6rem;
  border-radius: 20px;
  text-decoration: none;
}
.card-category:hover { background: var(--color-red-dark); color: white; }

.card-date {
  font-size: .8rem;
  color: var(--text-muted);
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: .5rem;
}
.card-title a { color: var(--text-primary); }
.card-title a:hover { color: var(--color-red); }

.card-excerpt {
  font-size: .9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.read-more {
  font-size: .85rem;
  font-weight: 700;
  color: var(--color-red);
  text-transform: uppercase;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  gap: .3rem;
}
.read-more:hover { color: var(--color-red-dark); gap: .5rem; }
.read-more::after { content: '→'; }

/* =========================================================
   POST GRID
   ========================================================= */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(3, 1fr); }
}

.posts-grid.two-col {
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .posts-grid.two-col { grid-template-columns: repeat(2, 1fr); }
}

/* Featured Post */
.featured-post {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .featured-post { grid-template-columns: 1fr 1fr; }
}

.featured-post .card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-label {
  display: inline-block;
  background: var(--color-blue-mid);
  color: white;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: .25rem .75rem;
  border-radius: 20px;
  margin-bottom: .75rem;
}

.featured-post .card-title { font-size: clamp(1.3rem, 3vw, 1.8rem); }

/* =========================================================
   SECTION HEADERS
   ========================================================= */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  display: flex;
  align-items: center;
  gap: .6rem;
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.2em;
  background: var(--color-red);
  border-radius: 2px;
}

/* =========================================================
   SINGLE POST
   ========================================================= */
.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-header h1 { margin-bottom: .75rem; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  font-size: .875rem;
  color: var(--text-muted);
}

.post-meta a { color: var(--text-muted); }
.post-meta a:hover { color: var(--color-red); }

.post-featured-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  background: var(--bg-card);
  max-width: 100%;
  box-sizing: border-box;
  width: 100%;
}

.post-featured-image img,
img.attachment-aviator-featured,
img.wp-post-image {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  max-height: 520px;
}

@media (max-width: 600px) {
  .post-featured-image img,
  img.attachment-aviator-featured,
  img.wp-post-image {
    max-height: 220px;
    width: 100%;
    object-fit: contain;
  }
}

/* Entry Content */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 2rem;
  margin-bottom: .75rem;
}

.entry-content ul, .entry-content ol {
  margin-bottom: 1.5em;
}

.entry-content li { margin-bottom: .4em; }

.entry-content a {
  color: var(--color-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content img {
  border-radius: var(--radius);
  margin: 1.5em 0;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.tag-item {
  background: var(--bg-page);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: .8rem;
  padding: .25rem .75rem;
  border-radius: 20px;
  text-decoration: none;
  transition: all var(--transition);
}
.tag-item:hover {
  background: var(--color-blue-mid);
  border-color: var(--color-blue-mid);
  color: white;
}

/* Author Box */
.author-box {
  display: flex;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--color-blue-mid);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 2.5rem;
  align-items: flex-start;
}

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

.author-name { font-weight: 700; margin-bottom: .25rem; }
.author-bio { font-size: .9rem; color: var(--text-secondary); margin: 0; }

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar { display: flex; flex-direction: column; gap: 2rem; }

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--color-red);
  margin-bottom: 1rem;
}

.widget ul { list-style: none; padding: 0; }
.widget ul li {
  padding: .4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text-primary); }
.widget ul li a:hover { color: var(--color-red); }

.widget_search .search-form {
  display: flex;
  gap: .5rem;
}

.widget_search input[type="search"] {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .6rem .9rem;
  background: var(--bg-page);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
}
.widget_search input[type="search"]:focus {
  border-color: var(--color-blue-mid);
}

.widget_search button {
  background: var(--color-red);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: .6rem 1rem;
  cursor: pointer;
  font-weight: 700;
  transition: background var(--transition);
}
.widget_search button:hover { background: var(--color-red-dark); }

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .9rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  text-decoration: none;
}

.page-numbers:hover,
.page-numbers.current {
  background: var(--color-red);
  border-color: var(--color-red);
  color: white;
}

.page-numbers.prev, .page-numbers.next {
  width: auto;
  padding: 0 1rem;
}

/* =========================================================
   404 PAGE
   ========================================================= */
.error-404 {
  text-align: center;
  padding: 5rem 0;
}

.error-404 .error-code {
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 900;
  color: var(--color-red);
  line-height: 1;
  opacity: .15;
  display: block;
}

.error-404 .error-plane {
  font-size: 4rem;
  display: block;
  margin: -2rem auto 1.5rem;
  animation: spin-fall 3s ease-in-out infinite;
}

@keyframes spin-fall {
  0%, 100% { transform: rotate(-10deg) translateY(0); }
  50%       { transform: rotate(10deg) translateY(-10px); }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--bg-footer);
  color: rgba(255,255,255,.7);
  padding: 3.5rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 600px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-brand .site-title .title-main { color: white; }

.footer-brand p {
  margin-top: .75rem;
  font-size: .9rem;
  line-height: 1.6;
}

.footer-heading {
  color: white;
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--color-red);
  display: inline-block;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li { margin-bottom: .5rem; }

.footer-links a {
  color: rgba(255,255,255,.6);
  font-size: .9rem;
  transition: color var(--transition);
}

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

/* Footer bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
}

/* Red/White/Blue runway stripe */
.footer-runway {
  height: 5px;
  background: linear-gradient(90deg, 
    var(--color-red) 0%,
    var(--color-red) 33.33%,
    white 33.33%,
    white 66.66%,
    var(--color-blue-mid) 66.66%,
    var(--color-blue-mid) 100%
  );
  margin-bottom: 0;
}

/* =========================================================
   BREADCRUMBS
   ========================================================= */
.breadcrumbs {
  padding: .75rem 0;
  font-size: .8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
}

.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--color-red); }
.breadcrumbs .sep { color: var(--border-strong); }

/* =========================================================
   UTILITY CLASSES
   ========================================================= */
.text-center { text-align: center; }
.text-red    { color: var(--color-red); }
.text-blue   { color: var(--color-blue-mid); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.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;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-red);
  color: white;
  padding: .5rem 1rem;
  z-index: 9999;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { top: 0; }

/* =========================================================
   COMMENTS
   ========================================================= */
.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.comments-title {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.comment-list { list-style: none; padding: 0; }
.comment { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }

.comment-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
}

.comment-author-name { font-weight: 700; }
.comment-date { font-size: .8rem; color: var(--text-muted); }

.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .7rem 1rem;
  background: var(--bg-card);
  color: var(--text-primary);
  margin-bottom: 1rem;
  outline: none;
  transition: border-color var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--color-blue-mid);
}

.comment-form textarea { min-height: 130px; resize: vertical; }

/* =========================================================
   RESPONSIVE UTILITIES
   ========================================================= */
@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
  .site-content { padding: 2rem 0; }
}

@media (min-width: 641px) {
  .show-mobile { display: none !important; }
}

/* Print */
@media print {
  .site-header, .site-footer, .sidebar, .pagination { display: none; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
}
