/* ParamotorFlights Ground School - matches site blue theme */
:root {
  --cloud-blue-light: #e0f2fe;
  --cloud-blue: #bae6fd;
  --cloud-blue-medium: #7dd3fc;
  --cloud-blue-dark: #0ea5e9;
  --cloud-blue-deep: #0284c7;
  --cloud-white: #ffffff;
  --cloud-gray-light: #f8fafc;
  --cloud-gray: #e2e8f0;
  --text-dark: #1e293b;
  --text-medium: #475569;
  --text-light: #64748b;
  --sidebar-w: 280px;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(14, 165, 233, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 3.25rem; }
body {
  margin: 0;
  color: var(--text-dark);
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 45%, #f8fafc 100%);
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
}
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--cloud-blue-deep); color: #fff; padding: 0.5rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }
.menu-toggle {
  display: none;
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 40;
  background: var(--cloud-blue-deep); color: #fff; border: 0;
  border-radius: 8px; padding: 0.55rem 0.9rem; font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow);
}
.toc {
  position: fixed; top: 48px; left: 0; bottom: 0; width: var(--sidebar-w);
  overflow-y: auto; background: rgba(255,255,255,0.95);
  border-right: 1px solid var(--cloud-gray);
  padding: 1rem 0.85rem 2rem;
  backdrop-filter: blur(8px);
  z-index: 30;
}
.toc-brand a {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; color: var(--cloud-blue-deep);
  font-weight: 800; font-size: 1.02rem; line-height: 1.25; margin-bottom: 0.85rem;
  padding: 0.35rem 0.5rem;
}
.toc-brand svg { width: 1.45rem; height: auto; flex: 0 0 auto; }
.toc-brand-text { display: block; }
.toc-brand span { font-weight: 600; color: var(--text-medium); font-size: 0.92rem; }
#toc-search {
  width: 100%; padding: 0.55rem 0.7rem; border: 2px solid var(--cloud-gray);
  border-radius: 8px; margin-bottom: 0.85rem; font-size: 0.9rem;
}
#toc-search:focus { outline: none; border-color: var(--cloud-blue-dark); }
.toc-group { margin-bottom: 0.85rem; }
.toc-group h4 {
  margin: 0.5rem 0.5rem 0.35rem; font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-light);
}
.toc-group ul { list-style: none; margin: 0; padding: 0; }
.toc-group li { display: flex; align-items: flex-start; gap: 0.1rem; }
.toc-check {
  margin: 0.42rem 0 0 0.15rem;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  accent-color: #0284c7;
  cursor: pointer;
}
.toc-group a {
  display: block; flex: 1; min-width: 0; padding: 0.35rem 0.55rem; border-radius: 6px;
  color: var(--text-medium); text-decoration: none; font-size: 0.88rem;
}
.toc-group a:hover, .toc-group a.active {
  background: var(--cloud-sky, #f0f9ff); color: var(--cloud-blue-deep); font-weight: 600;
}
.toc-group a.active { background: #e0f2fe; }
.toc-group li.hidden { display: none; }
main section.search-hidden { display: none; }
mark.gs-hit { background: #fde68a; color: inherit; border-radius: 2px; padding: 0 0.05em; }
.backdrop {
  display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.35); z-index: 25;
}
main {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  max-width: 1080px;
  padding: 1.5rem clamp(1rem, 2vw, 2.25rem) 3rem;
}
.hero {
  background: linear-gradient(135deg, rgba(186,230,253,0.45) 0%, rgba(255,255,255,0.9) 100%);
  border: 1px solid var(--cloud-gray);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow);
}
.eyebrow {
  margin: 0 0 0.35rem; color: var(--cloud-blue-deep); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.78rem;
}
.hero h1 {
  margin: 0 0 0.5rem; font-size: clamp(1.8rem, 4vw, 2.4rem);
  background: linear-gradient(135deg, var(--cloud-blue-deep), var(--cloud-blue-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.subtitle { margin: 0 0 0.75rem; color: var(--text-medium); font-size: 1.05rem; }
.meta { margin: 0; color: var(--text-light); font-size: 0.85rem; }
.section {
  background: #fff;
  border: 1px solid var(--cloud-gray);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem 1.35rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.section h2 {
  display: flex; align-items: center; gap: 0.55rem;
  margin: 0 0 1rem; padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--cloud-blue-dark);
  color: var(--text-dark); font-size: 1.45rem;
}
.section-check {
  width: 1.15rem; height: 1.15rem; margin: 0;
  flex: 0 0 auto; accent-color: #0284c7; cursor: pointer;
}
.section h3 {
  margin: 1.25rem 0 0.5rem; color: var(--cloud-blue-deep); font-size: 1.08rem;
}
.section p { margin: 0 0 0.85rem; color: var(--text-medium); }
.section p.lead { color: var(--text-dark); font-size: 1.02rem; }
.section p.item { margin: 0.25rem 0; padding-left: 0.5rem; }
.section p.note {
  background: #f0f9ff; border-left: 3px solid var(--cloud-blue-dark);
  padding: 0.75rem 1rem; border-radius: 0 8px 8px 0; color: var(--text-medium);
}
.section ul { margin: 0.25rem 0 1rem; padding-left: 1.25rem; color: var(--text-medium); }
.section li { margin: 0.3rem 0; }
.diagram {
  margin: 1rem 0 1.25rem; padding: 0; background: var(--cloud-gray-light);
  border: 1px solid var(--cloud-gray); border-radius: 10px; overflow: hidden;
  min-width: 0;
}
.diagram img { display: block; width: 100%; max-width: 100%; height: auto; }
.diagram figcaption {
  padding: 0.45rem 0.75rem; font-size: 0.8rem; color: var(--text-light);
  border-top: 1px solid var(--cloud-gray);
}
.site-footer {
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--cloud-gray);
  color: var(--text-light); font-size: 0.9rem;
}
.site-footer a { color: var(--cloud-blue-deep); }
.official-links { margin: 0.25rem 0 1rem; padding-left: 1.2rem; }
.official-links li { margin: 0.4rem 0; }
.official-links a { color: var(--cloud-blue-deep); font-weight: 600; }
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(180px, 0.85fr);
  gap: 0.75rem 1.5rem;
  align-items: start;
  margin: 0.25rem 0 0.5rem;
}
.split > * { min-width: 0; }
.split img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0;
  border-radius: 10px;
  border: 1px solid var(--cloud-gray);
  background: #f8fafc;
}
.type-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(0, 1.2fr);
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin: 0 0 1.15rem;
}
.type-row > * { min-width: 0; }
.type-row img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--cloud-gray);
  background: #f8fafc;
}
.type-row > p { margin: 0; }
.type-row div p { margin: 0 0 0.75rem; }
.type-row div p:last-child { margin-bottom: 0; }
.type-row > div img + img { margin-top: 0.75rem; }
.media-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 0.5rem 1.25rem;
  align-items: center;
  margin: 0.15rem 0 0.85rem;
}
.media-row > div { grid-column: 1; grid-row: 1; min-width: 0; }
.media-row > img { grid-column: 2; grid-row: 1; justify-self: end; }
.media-row:nth-of-type(even) { grid-template-columns: 280px minmax(0, 1fr); }
.media-row:nth-of-type(even) > div { grid-column: 2; }
.media-row:nth-of-type(even) > img { grid-column: 1; justify-self: start; }
.media-row.pic-left { grid-template-columns: 280px minmax(0, 1fr); }
.media-row.pic-left > div { grid-column: 2; }
.media-row.pic-left > img { grid-column: 1; justify-self: start; }
.media-row p { margin: 0; }
.media-row > *,
.app-card,
.gear-card {
  min-width: 0;
}
.section img,
.gear-card img,
.app-card img,
.photo-row img {
  max-width: 100%;
  height: auto;
}
.media-row img {
  width: auto;
  height: auto;
  max-width: 260px;
  max-height: 170px;
  display: block;
  object-fit: contain;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--cloud-gray);
}
.media-row.aircraft-row > img {
  width: 260px;
  max-width: 100%;
  max-height: none;
  height: auto;
}
.gear-card img, .app-card img, .photo-row img {
  width: 100%;
  display: block;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--cloud-gray);
}
.gear-card img { max-height: 150px; object-fit: contain; }
.figure {
  display: block;
  width: auto;
  max-width: min(100%, 480px);
  height: auto;
  margin: 0.5rem 0 0.25rem;
  border-radius: 10px;
  border: 1px solid var(--cloud-gray);
  background: #f8fafc;
}
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 340px));
  gap: 0.85rem 1.25rem;
  margin: 0.5rem 0 1.1rem;
}
.gear-grid, .photo-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 210px));
  gap: 0.85rem 1.25rem;
  margin: 0.5rem 0 1.1rem;
}
.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 0.4rem 0 1.1rem;
}
.shot-grid img,
img.diagram {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid var(--cloud-gray);
  border-radius: 10px;
}
.shot-grid img { max-height: 280px; }
.shot-grid.diagrams { grid-template-columns: 1fr; }
.shot-grid.diagrams img,
img.diagram {
  max-height: none;
  max-width: min(100%, 860px);
}
.app-card, .gear-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.app-card img { width: 56px; height: 56px; max-width: 56px; object-fit: cover; flex-shrink: 0; }
.gear-card { flex-direction: column; gap: 0.2rem; }
.gear-card strong, .app-card strong { color: var(--text-dark); }
.gear-label { display: block; }
.gear-label strong { display: block; line-height: 1.2; }
.gear-note { display: block; font-weight: 400; color: var(--text-medium); font-size: 0.92rem; line-height: 1.25; margin-top: 0.1rem; }
.app-card p, .gear-card p { margin: 0.15rem 0 0; font-size: 0.92rem; }
@media (max-width: 900px) {
  .menu-toggle { display: inline-block; top: 3.6rem; z-index: 70; }
  .toc {
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    width: min(300px, 86vw);
    box-shadow: 8px 0 30px rgba(0,0,0,0.12);
  }
  body.toc-open .toc { transform: translateX(0); }
  body.toc-open .backdrop { display: block; }
  main { margin-left: 0; width: 100%; padding: 3.5rem 1rem 2.5rem; max-width: none; }
  .media-row,
  .media-row:nth-of-type(even),
  .media-row.pic-left { grid-template-columns: 1fr; }
  .media-row > img,
  .media-row:nth-of-type(even) > img,
  .media-row.pic-left > img { grid-column: 1; grid-row: 1; justify-self: start; }
  .media-row > div,
  .media-row:nth-of-type(even) > div,
  .media-row.pic-left > div { grid-column: 1; grid-row: 2; }
}
@media (max-width: 700px) {
  .split, .type-row { grid-template-columns: 1fr; }
}
main img { cursor: zoom-in; }
.gs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem 1.25rem;
  background: rgba(15, 23, 42, 0.86);
}
.gs-lightbox[hidden] { display: none; }
.gs-lightbox img {
  max-width: min(96vw, 1400px);
  max-height: calc(100vh - 4.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4);
  cursor: default;
}
.gs-lightbox-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  background: #fff;
  color: #0f172a;
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
@media print {
  .toc, .menu-toggle, .backdrop, .gs-lightbox { display: none !important; }
  main { margin: 0; width: 100%; max-width: none; }
  .section { break-inside: avoid; box-shadow: none; }
}
