/*
Theme Name: StudentPilot
Theme URI: https://studentpilot.com
Author: PilotMall.com
Author URI: https://www.pilotmall.com
Description: Modern, content-first aviation training theme for StudentPilot.com - fast, CFI-reviewed editorial layout with PilotMall gear modules.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: studentpilot
*/

/* StudentPilot.com - design system (content-first, aviation-inspired) */

:root {
  --navy: #0b1f3a;
  --navy-2: #102a4c;
  --sky: #1e88e5;
  --sky-light: #e8f2fd;
  --amber: #ff9500;
  --amber-dark: #e07b00;
  --ink: #0f172a;
  --slate: #475569;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f6f9fc;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --shadow-lg: 0 12px 40px rgba(11,31,58,.14);
  --maxw: 1180px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Sora", var(--font);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-family: var(--display); color: var(--navy); line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 2.2em 0 .6em; }
h3 { font-size: 1.25rem; margin: 1.8em 0 .4em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 20px; height: 68px; flex-wrap: nowrap; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--navy); }
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; }
.brand-logo { height: 34px; width: auto; display: block; }
.logo-chip { display: inline-block; background: #fff; padding: 8px 12px; border-radius: 10px; }
.logo-chip img { height: 30px; width: auto; display: block; }
.nav-links { display: flex; gap: 18px; margin-left: 4px; flex-wrap: nowrap; }
.nav-links a { color: var(--slate); font-weight: 500; font-size: .92rem; white-space: nowrap; }
.nav-links a:hover { color: var(--navy); text-decoration: none; }
.nav-spacer { flex: 1; }
.nav-cta {
  background: var(--amber); color: #fff; padding: 9px 18px; border-radius: 999px;
  font-weight: 600; font-size: .92rem;
}
.nav-cta:hover { background: var(--amber-dark); text-decoration: none; }
.nav-gear { color: var(--muted); font-size: .92rem; font-weight: 500; }
.nav-search input { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: .88rem; width: 150px; background: var(--bg-soft); transition: width .15s ease, border-color .15s ease; }
.nav-search input:focus { outline: none; border-color: var(--sky); width: 190px; background: #fff; }
@media (max-width: 980px) { .nav-search { display: none; } }
.library-list { columns: 2; column-gap: 36px; list-style: none; padding: 0; margin: 0 0 18px; }
.library-list li { margin: 5px 0; break-inside: avoid; }
.library-cat { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); margin: 30px 0 12px; padding-bottom: 6px; }
.library-cat a.more { font-size: .85rem; white-space: nowrap; }
@media (max-width: 640px) { .library-list { columns: 1; } }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1200px 500px at 75% -10%, #1c4f8f 0%, var(--navy) 55%);
  color: #fff; position: relative; overflow: hidden;
}
.hero .container { padding-top: 84px; padding-bottom: 96px; position: relative; z-index: 2; max-width: 820px; }
.hero .eyebrow { color: #8fc1f5; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.hero h1 { color: #fff; margin-top: 12px; }
.hero p { font-size: 1.2rem; color: #cdddf0; max-width: 620px; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: 1rem;
}
.btn-primary { background: var(--amber); color: #fff; }
.btn-primary:hover { background: var(--amber-dark); text-decoration: none; }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.18); text-decoration: none; }
.hero-horizon { position: absolute; bottom: -2px; left: 0; width: 100%; z-index: 1; opacity: .5; }

/* ---------- Pathways ---------- */
.section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }
.kicker { color: var(--sky); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }

.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1.4fr .9fr; }

.path-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
  display: block; color: inherit;
}
.path-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.path-card .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--sky-light); display: grid; place-items: center; margin-bottom: 16px; }
.path-card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.path-card p { color: var(--muted); font-size: .95rem; margin: 0; }
.path-card .step { color: var(--sky); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Featured guides ---------- */
.guide-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; color: inherit; display: block;
}
.guide-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.guide-card .thumb { height: 116px; background: linear-gradient(135deg, #1c4f8f, var(--navy)); position: relative; overflow: hidden; display: flex; align-items: flex-end; }
.guide-card .thumb.v2 { background: linear-gradient(135deg, #2b6cb0, #1a365d); }
.guide-card .thumb.v3 { background: linear-gradient(135deg, #0e7490, #155e75); }
.guide-card .thumb::after { content: ""; position: absolute; right: -12px; bottom: -16px; width: 118px; height: 118px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M21 16v-2l-8-5V3.5a1.5 1.5 0 0 0-3 0V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5z'/%3E%3C/svg%3E") no-repeat center / contain; opacity: .13; transform: rotate(16deg); }
.guide-card .thumb.has-img::after { display: none; }
.guide-card .thumb .tag { position: relative; z-index: 1; margin: 0 0 12px 14px; background: rgba(255,255,255,.18); color: #fff; padding: 5px 11px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .05em; }
.guide-card .body { padding: 18px 20px 22px; }
.guide-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.guide-card p { color: var(--muted); font-size: .92rem; margin: 0; }
.guide-meta { display:flex; gap:10px; align-items:center; color: var(--muted); font-size:.82rem; margin-top:14px; }

/* ---------- Topic pills ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { background: #fff; border: 1px solid var(--line); padding: 8px 16px; border-radius: 999px; color: var(--slate); font-weight: 500; font-size: .92rem; }
.pill:hover { border-color: var(--sky); color: var(--sky); text-decoration: none; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--navy), #1c4f8f); color: #fff; border-radius: 20px; padding: 48px; display:flex; align-items:center; justify-content:space-between; gap:30px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { color: #cdddf0; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #b9c8dc; padding: 56px 0 30px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin: 0 0 14px; font-family: var(--font); letter-spacing: .02em; }
.site-footer a { color: #b9c8dc; font-size: .92rem; display: block; margin-bottom: 9px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 20px; font-size: .85rem; color: #7e93ad; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 12px; }
.footer-legal a { color: #7e93ad; font-size: .85rem; }
.footer-legal a:hover { color: #fff; }
.footer-brand { display:flex; align-items:center; gap:10px; color:#fff; font-family: var(--display); font-weight:700; font-size:1.1rem; margin-bottom:12px; }

/* ---------- Article ---------- */
.breadcrumb { font-size: .85rem; color: var(--muted); padding: 22px 0 0; }
.breadcrumb a { color: var(--muted); }
.article-head { padding: 14px 0 8px; max-width: 760px; }
.article-head h1 { margin-bottom: 16px; }
.byline { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .92rem; flex-wrap: wrap; }
.byline .avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg,var(--sky),var(--navy)); color:#fff; display:grid; place-items:center; font-weight:700; }
.byline .reviewed { background: var(--sky-light); color: #0b66c2; padding: 3px 10px; border-radius: 999px; font-weight: 600; font-size: .8rem; }
.updated { color: var(--muted); font-size: .84rem; }

.article-layout { padding: 36px 0 72px; }
.article-layout.has-toc { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { width: 230px; position: sticky; top: 90px; font-size: .9rem; }
.toc h4 { font-family: var(--font); text-transform: uppercase; letter-spacing:.06em; font-size:.74rem; color: var(--muted); margin: 0 0 12px; }
.toc a { display: block; color: var(--slate); padding: 5px 0 5px 12px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--sky); border-color: var(--sky); text-decoration: none; }

.prose { max-width: 760px; min-width: 0; margin: 0 auto; }
.article-layout.has-toc > .prose { margin: 0; }
.prose p { margin: 1em 0; color: #1f2a3a; }
.prose h2 { scroll-margin-top: 90px; }
.prose h3 { scroll-margin-top: 90px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .4em 0; }

.callout { background: var(--sky-light); border: 1px solid #c5e0fa; border-left: 4px solid var(--sky); border-radius: var(--radius-sm); padding: 18px 22px; margin: 26px 0; }
.callout strong { color: var(--navy); }
.callout.tip { background: #fff7e8; border-color: #ffe2b0; border-left-color: var(--amber); }

.lead { font-size: 1.2rem; color: var(--slate); }

table.data { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .95rem; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.data th { background: var(--bg-soft); font-family: var(--font); color: var(--navy); font-weight: 700; }
table.data tr:last-child td { border-bottom: none; font-weight: 700; }

/* Gear module */
.gear { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin: 36px 0; }
.gear .gear-head { display:flex; align-items:center; gap:10px; margin-bottom: 6px; }
.gear .gear-head h3 { margin: 0; }
.gear > p { color: var(--muted); margin: 0 0 20px; font-size: .95rem; }
.gear-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.product {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; display:flex; flex-direction:column;
  transition: box-shadow .18s ease, transform .18s ease;
}
.product:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product .pimg { height: 150px; background:#fff; display:grid; place-items:center; padding:12px; border-bottom: 1px solid var(--line); }
.product .pimg img { max-height: 126px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.product .pbody { padding: 12px 14px 16px; display:flex; flex-direction:column; flex:1; }
.product .pname { font-weight: 600; font-size: .9rem; color: var(--ink); line-height:1.35; }
.product .pmeta { display:flex; align-items:center; justify-content:flex-start; margin-top: auto; padding-top: 12px; }
.product .buy { width: 100%; text-align: center; }
.product .price { font-family: var(--display); font-weight: 700; color: var(--navy); }
.product .buy { background: var(--sky); color:#fff; padding: 6px 14px; border-radius: 999px; font-size:.82rem; font-weight:600; }
.product .buy:hover { background: #1666b3; text-decoration:none; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 18px; margin: 10px 0; background:#fff; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--navy); padding: 12px 0; font-family: var(--display); list-style: none; display:flex; justify-content:space-between; align-items:center; }
.faq summary::-webkit-details-marker { display:none; }
.faq summary::after { content: "+"; color: var(--sky); font-size: 1.4rem; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; color: var(--slate); }

.related { border-top: 1px solid var(--line); padding-top: 30px; margin-top: 40px; margin-bottom: 72px; }
.related h3 { margin-top: 0; }

/* Responsive */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .article-layout.has-toc { grid-template-columns: 1fr; }
  .toc { display: none; }
  .gear-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .gear-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 30px; }
}

/* ---------- WordPress adjustments ---------- */
ul.nav-links { list-style: none; margin: 0; padding: 0; }
.footer-menu { list-style: none; margin: 0; padding: 0; }
.site-footer .footer-menu a { display: block; margin-bottom: 9px; }
.prose img { border-radius: var(--radius-sm); height: auto; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { color: var(--muted); font-size: .85rem; text-align: center; margin-top: 8px; }
.alignwide { width: min(960px, 100%); }
.alignfull { width: 100%; }
.wp-block-button__link { background: var(--amber); color: #fff; padding: 13px 24px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* Author bio box */
.author-bio { display: flex; gap: 16px; align-items: flex-start; max-width: 720px; margin: 8px auto 0; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.author-bio .avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--sky), var(--navy)); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.author-bio-name { font-family: var(--display); font-weight: 700; color: var(--navy); }
.author-bio-creds { color: var(--sky); font-size: .85rem; font-weight: 600; }
.author-bio p { margin: .4em 0 0; color: var(--slate); font-size: .95rem; }
