/*
Theme Name: YourAviationNews
Theme URI: https://youraviationnews.com
Author: SATISFACTIONTV
Description: The YourAviationNews.com aviation news theme. Editorial design with lead story homepage, trending sidebar, article labels, sources section, share buttons, dark mode and Facebook-ready sharing cards. Rename the brand under Appearance → Customize → Site Identity.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: youraviationnews
*/

/* ────────────────────────────────────────────────
   Design tokens
──────────────────────────────────────────────── */
:root {
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-data: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  --bg: #FFFFFF;
  --bg-soft: #F5F7FA;
  --card: #FFFFFF;
  --ink: #111820;
  --ink-soft: #3D4852;
  --ink-faint: #6B7683;
  --hairline: #E3E8EF;
  --flight: #12365C;
  --flight-strong: #0C2540;
  --flight-link: #12365C;
  --flight-tint: #E9F0F7;
  --signal: #C77800;
  --signal-bright: #E8930C;
  --alert: #C6262E;
  --shadow: 0 1px 2px rgba(17, 24, 32, 0.05), 0 4px 16px rgba(17, 24, 32, 0.06);
}

html.dark {
  --bg: #0D1319;
  --bg-soft: #131B24;
  --card: #151E28;
  --ink: #E8EDF2;
  --ink-soft: #B9C2CD;
  --ink-faint: #8593A2;
  --hairline: #243040;
  --flight: #8FB6E3;
  --flight-strong: #B4CFEC;
  --flight-link: #8FB6E3;
  --flight-tint: #1B2A3D;
  --signal: #E8930C;
  --signal-bright: #F2A93B;
  --alert: #E4626A;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* ────────────────────────────────────────────────
   Base
──────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  transition: background-color .2s ease, color .2s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--flight-link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5rem; color: var(--ink); }
button { font-family: inherit; cursor: pointer; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.aw-wrap { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .aw-wrap { padding: 0 1.5rem; } }

/* ────────────────────────────────────────────────
   Signature elements
──────────────────────────────────────────────── */
.data-strip {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  font-family: var(--font-data); font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint);
  margin: 0;
}
.data-strip a { color: var(--signal); }
.data-strip .sep::before { content: '·'; color: var(--hairline); }

.runway-divider {
  border: 0; height: 2px; margin: 2.5rem 0;
  background-image: linear-gradient(90deg, var(--hairline) 55%, transparent 45%);
  background-size: 26px 2px;
}

.label-badge {
  display: inline-block; padding: .18rem .55rem; border-radius: 3px;
  font-family: var(--font-data); font-size: 10px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: #fff;
}
.label-breaking { background: var(--alert); }
.label-developing { background: var(--signal); }
.label-updated { background: var(--flight); color: #fff; }
html.dark .label-updated { background: #2E5580; }
.label-exclusive { background: #4A3670; }
.label-analysis { background: #3D4852; }
.label-demo { background: var(--ink-faint); }

/* ────────────────────────────────────────────────
   Header
──────────────────────────────────────────────── */
.aw-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg); border-bottom: 1px solid var(--hairline);
}
.aw-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; }
.aw-brand { display: flex; align-items: baseline; gap: .6rem; text-decoration: none !important; }
.aw-brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--ink); letter-spacing: -0.02em; }
.aw-brand-tag { display: none; font-family: var(--font-data); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
@media (min-width: 768px) { .aw-brand-tag { display: inline; } }
.aw-brand img { max-height: 34px; width: auto; }

.aw-nav { display: none; gap: 1.15rem; align-items: center; }
@media (min-width: 900px) { .aw-nav { display: flex; } }
.aw-nav ul { display: flex; gap: 1.15rem; list-style: none; margin: 0; padding: 0; }
.aw-nav a { font-size: .84rem; font-weight: 600; color: var(--ink-soft); }
.aw-nav a:hover { color: var(--flight); text-decoration: none; }

.aw-header-actions { display: flex; align-items: center; gap: .35rem; }
.aw-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink-soft); font-size: 1rem;
}
.aw-icon-btn:hover { background: var(--bg-soft); color: var(--flight); }

.aw-mobile-nav { display: none; border-top: 1px solid var(--hairline); padding: .6rem 0 .9rem; }
.aw-mobile-nav.open { display: block; }
.aw-mobile-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.aw-mobile-nav a { display: block; padding: .5rem .25rem; font-weight: 600; font-size: .95rem; color: var(--ink-soft); }
@media (min-width: 900px) { .aw-mobile-nav { display: none !important; } }

.aw-searchbar { display: none; border-top: 1px solid var(--hairline); padding: .75rem 0; }
.aw-searchbar.open { display: block; }

/* ────────────────────────────────────────────────
   Cards & story lists
──────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: 10px; box-shadow: var(--shadow); overflow: hidden;
}
.card-pad { padding: 1.1rem 1.2rem; }

.story-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--bg-soft); overflow: hidden; }
.story-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
a:hover .story-thumb img { transform: scale(1.03); }

.story-title { font-weight: 700; }
.story-title a { color: var(--ink); }
.story-title a:hover { color: var(--flight); text-decoration: none; }
.story-excerpt { color: var(--ink-faint); font-size: .9rem; margin: .35rem 0 0; }

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

.home-lead-grid { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .home-lead-grid { grid-template-columns: 7fr 5fr; } }
.lead-title { font-size: 1.7rem; }
@media (min-width: 640px) { .lead-title { font-size: 2.1rem; } }

.side-stack { display: grid; gap: 1rem; align-content: start; }
.side-item { display: grid; grid-template-columns: 6.5rem 1fr; gap: .8rem; align-items: start; }
.side-item .story-thumb { aspect-ratio: 4 / 3; border-radius: 6px; }
.side-item .story-title { font-size: .95rem; font-family: var(--font-body); letter-spacing: 0; line-height: 1.35; }

.home-main-grid { display: grid; gap: 2.2rem; }
@media (min-width: 900px) { .home-main-grid { grid-template-columns: 2fr 1fr; } }

.feed-item { display: grid; grid-template-columns: 1fr; gap: .9rem; padding: 1.1rem 0; border-bottom: 1px solid var(--hairline); }
@media (min-width: 560px) { .feed-item { grid-template-columns: 13rem 1fr; } }
.feed-item .story-thumb { border-radius: 8px; }
.feed-item .story-title { font-size: 1.15rem; }

.rank-list { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.rank-list li { counter-increment: rank; display: flex; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--hairline); }
.rank-list li:last-child { border-bottom: 0; }
.rank-list li::before {
  content: counter(rank, decimal-leading-zero);
  font-family: var(--font-data); font-size: 1rem; font-weight: 700; color: var(--signal);
}
.rank-list .story-title { font-size: .92rem; font-family: var(--font-body); line-height: 1.35; }

.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 1.1rem; }
.section-header h2 { font-size: 1.35rem; margin: 0; }
.section-header a { font-family: var(--font-data); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--signal); white-space: nowrap; }
.grid-3 { display: grid; gap: 1.25rem; }
@media (min-width: 700px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-3 .story-title { font-size: 1.02rem; }

/* ────────────────────────────────────────────────
   Article page
──────────────────────────────────────────────── */
.article-header { max-width: 780px; margin: 0 auto; }
.article-title { font-size: 1.9rem; }
@media (min-width: 640px) { .article-title { font-size: 2.5rem; } }
.article-sub { font-size: 1.12rem; color: var(--ink-soft); font-weight: 400; margin: .4rem 0 0; }
.byline { display: flex; align-items: center; gap: .7rem; margin-top: 1rem; font-size: .87rem; color: var(--ink-faint); }
.byline img { width: 2.2rem; height: 2.2rem; border-radius: 999px; object-fit: cover; }
.byline b { color: var(--ink); font-weight: 600; }

.article-figure { max-width: 900px; margin: 1.6rem auto; }
.article-figure img { width: 100%; border-radius: 10px; }
.article-figure figcaption { margin-top: .45rem; font-size: .8rem; color: var(--ink-faint); }
.article-figure .credit { font-family: var(--font-data); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }

.article-body { max-width: 700px; margin: 0 auto; font-size: 1.06rem; line-height: 1.78; }
.article-body > * { margin: 0 0 1.15em; }
.article-body h2 { font-size: 1.45rem; margin: 1.8em 0 .6em; }
.article-body h3 { font-size: 1.18rem; margin: 1.6em 0 .5em; }
.article-body a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--flight-link) 40%, transparent); text-underline-offset: 2px; }
.article-body blockquote {
  margin: 1.6em 0; padding: .2em 0 .2em 1.1em;
  border-left: 3px solid var(--signal);
  font-family: var(--font-display); font-size: 1.15em; color: var(--ink-soft);
}
.article-body blockquote p { margin: 0; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li { margin-bottom: .4em; }
.article-body img { border-radius: 8px; margin: 1.4em auto; }
.article-body figure { margin: 1.6em 0; }
.article-body figcaption, .wp-caption-text { font-size: .8rem; color: var(--ink-faint); text-align: center; margin-top: .4rem; }
.article-body iframe { max-width: 100%; }
.article-body .wp-block-embed, .video-embed { margin: 1.6em 0; }
.video-embed { position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.alignleft { float: left; margin: .4em 1.2em .8em 0; }
.alignright { float: right; margin: .4em 0 .8em 1.2em; }
.aligncenter { margin-left: auto; margin-right: auto; }

.article-aside { max-width: 700px; margin: 0 auto; }

.sources-box { background: var(--bg-soft); border: 1px solid var(--hairline); border-radius: 10px; padding: 1.1rem 1.25rem; }
html.dark .sources-box { background: var(--bg-soft); }
.sources-box h2 { font-family: var(--font-data); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 .7rem; }
.sources-box ol { margin: 0; padding-left: 1.2rem; font-size: .88rem; color: var(--ink-soft); }
.sources-box li { margin-bottom: .35rem; }
.sources-box .outlet { font-weight: 600; color: var(--ink); }

.tag-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.tag-pill {
  display: inline-block; padding: .28rem .7rem; border-radius: 999px;
  background: var(--flight-tint); color: var(--flight-link);
  font-size: .78rem; font-weight: 600;
}
.tag-pill:hover { text-decoration: none; filter: brightness(.96); }

.share-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.share-label { font-family: var(--font-data); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-right: .2rem; }
.share-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .42rem .8rem; border-radius: 6px; border: 1px solid var(--hairline);
  background: var(--card); color: var(--ink-soft); font-size: .8rem; font-weight: 600;
}
.share-btn:hover { border-color: var(--flight); color: var(--flight); text-decoration: none; }
.share-btn.fb { background: #1877F2; border-color: #1877F2; color: #fff; }
.share-btn.fb:hover { background: #145FC4; color: #fff; }

.updated-note { font-family: var(--font-data); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--signal); }

.breadcrumbs { font-size: .78rem; color: var(--ink-faint); margin-bottom: 1rem; }
.breadcrumbs a { color: var(--ink-faint); }
.breadcrumbs a:hover { color: var(--flight); }

/* Related */
.related-wrap { border-top: 1px solid var(--hairline); margin-top: 2.5rem; padding-top: 2rem; }

/* ────────────────────────────────────────────────
   Archive / search / pages
──────────────────────────────────────────────── */
.archive-head { margin: 2rem 0 1.5rem; max-width: 760px; }
.archive-head h1 { font-size: 1.9rem; }
.archive-head p { color: var(--ink-faint); margin: .3rem 0 0; }

.pagination { display: flex; gap: .4rem; flex-wrap: wrap; margin: 2rem 0; }
.pagination .page-numbers {
  display: inline-flex; min-width: 2.2rem; height: 2.2rem; padding: 0 .6rem;
  align-items: center; justify-content: center; border-radius: 6px;
  border: 1px solid var(--hairline); font-size: .85rem; font-weight: 600; color: var(--ink-soft);
}
.pagination .current { background: var(--flight); border-color: var(--flight); color: #fff; }
html.dark .pagination .current { background: #2E5580; border-color: #2E5580; }
.pagination a:hover { border-color: var(--flight); color: var(--flight); text-decoration: none; }

.page-content { max-width: 720px; margin: 0 auto; }
.page-content h1 { font-size: 2rem; }

/* Forms */
.input {
  width: 100%; padding: .55rem .75rem; border-radius: 7px;
  border: 1px solid var(--hairline); background: var(--card); color: var(--ink);
  font-size: .92rem; font-family: inherit;
}
.input:focus { outline: 2px solid var(--flight); outline-offset: 1px; border-color: transparent; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--flight); color: #fff; border: 0; border-radius: 7px;
  padding: .6rem 1.1rem; font-size: .9rem; font-weight: 600;
}
html.dark .btn-primary { background: #2E5580; }
.btn-primary:hover { filter: brightness(1.1); text-decoration: none; color: #fff; }

.search-form { display: flex; gap: .5rem; max-width: 560px; }

/* Newsletter box */
.newsletter-box h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.newsletter-box p { font-size: .85rem; color: var(--ink-faint); margin: 0 0 .8rem; }

/* ────────────────────────────────────────────────
   Footer
──────────────────────────────────────────────── */
.aw-footer { border-top: 1px solid var(--hairline); background: var(--bg-soft); margin-top: 3.5rem; }
.aw-footer-grid { display: grid; gap: 2rem; padding: 2.5rem 0 2rem; }
@media (min-width: 760px) { .aw-footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.aw-footer h4 { font-family: var(--font-data); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 .8rem; }
.aw-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.aw-footer a { color: var(--ink-soft); font-size: .87rem; }
.aw-footer a:hover { color: var(--flight); }
.aw-footer-bottom { border-top: 1px solid var(--hairline); padding: 1.1rem 0 1.4rem; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; font-size: .78rem; color: var(--ink-faint); }
.footer-brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--ink); }
.footer-tag { font-size: .85rem; color: var(--ink-faint); margin: .3rem 0 0; max-width: 34ch; }

/* Misc */
.notice-empty { text-align: center; padding: 4rem 1rem; color: var(--ink-faint); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ────────────────────────────────────────────────
   Ad slots — reserved height (no layout jumps),
   clearly labeled, visually quiet
──────────────────────────────────────────────── */
.ad-slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .4rem; margin: 1.8rem auto; padding: .6rem;
  max-width: 100%; overflow: hidden;
  background: var(--bg-soft); border: 1px solid var(--hairline); border-radius: 10px;
}
.ad-slot-label {
  align-self: flex-start;
  font-family: var(--font-data); font-size: 9px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint);
}
.ad-slot:empty { display: none; }
.article-body .ad-slot { margin: 2.2rem auto; }
