/* SEALS Diving Center — blog stylesheet.
   Standalone: the blog never loads the React bundle, so this is the only CSS
   these pages get. Palette + type mirror src/components/LandingPage.jsx. */

:root {
  --abyss: #04101a;
  --ink: #06151f;
  --ink-alt: #0a212e;
  --cyan: #2ec5d9;
  --cyan-soft: #8fdce6;
  --teal: #1f7a73;
  --cream: #fbfaf6;
  --sand: #f4f1ea;
  --white: #ffffff;
  --text: #0e2630;
  --muted: #5d6b72;
  --line: rgba(14, 38, 48, 0.12);
  --wrap: 1180px;
  --read: 720px;
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ar: 'Cairo', 'Noto Kufi Arabic', 'Segoe UI', Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--cream);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body[dir="rtl"] { font-family: var(--font-ar); line-height: 1.95; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.read { max-width: var(--read); margin: 0 auto; }
.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;
}
/* Hidden ABOVE the viewport, not off to the side. `left: -9999px` is clipped in
   LTR but becomes real scrollable overflow under dir="rtl" — it gave every
   Arabic page ~10,000px of horizontal scroll into empty space. Vertical
   overflow above the origin is clipped in both directions. */
.skip-link {
  position: absolute; top: 0; inset-inline-start: 0; z-index: 999;
  background: var(--cyan); color: var(--abyss); padding: 12px 20px; font-weight: 700;
  transform: translateY(-200%);
  transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* Header */
.site-head {
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky; top: 0; z-index: 100;
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 66px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px;
}
.site-head img { height: 34px; width: auto; }
.head-nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.head-nav a {
  color: rgba(255, 255, 255, 0.9); text-decoration: none; font-size: 11px;
  font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase;
}
.head-nav a:hover { color: var(--cyan-soft); }
.lang-switch { display: flex; gap: 6px; align-items: center; }
.lang-switch a, .lang-switch span {
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-decoration: none;
  padding: 6px 12px; border-radius: 40px; border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.75);
}
.lang-switch .is-active { background: var(--cyan); border-color: var(--cyan); color: var(--abyss); }
.btn-book {
  background: var(--cyan); color: var(--abyss); border: 1px solid var(--cyan);
  border-radius: 40px; padding: 9px 18px; font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; text-decoration: none; white-space: nowrap;
}

/* Page heads */
.page-head { background: var(--ink); color: var(--white); padding: 56px 0 60px; }
.page-head h1 { font-size: clamp(30px, 5vw, 50px); line-height: 1.12; margin: 0 0 14px; font-weight: 800; letter-spacing: -0.6px; }
.page-head p { color: rgba(255, 255, 255, 0.72); font-size: 17px; margin: 0; max-width: 640px; }
.eyebrow {
  color: var(--cyan-soft); font-size: 11px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; margin: 0 0 16px;
}
body[dir="rtl"] .eyebrow { letter-spacing: 0; }

/* Search + filters */
.blog-tools { margin: -28px auto 0; position: relative; z-index: 2; }
.blog-search {
  width: 100%; padding: 16px 20px; font-size: 16px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  box-shadow: 0 10px 30px rgba(6, 21, 31, 0.1); color: var(--text);
}
.blog-search::placeholder { color: var(--muted); }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.cat-chips a, .cat-chips button {
  display: inline-block; padding: 7px 14px; border-radius: 40px; font-size: 12.5px;
  font-weight: 600; text-decoration: none; border: 1px solid var(--line);
  background: var(--white); color: var(--text); cursor: pointer; font-family: inherit;
}
.cat-chips .is-active, .cat-chips a:hover, .cat-chips button:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.search-note { color: var(--muted); font-size: 14px; margin: 16px 0 0; }

/* Card grid */
.card-grid {
  display: grid; gap: 26px; padding: 42px 0 10px; margin: 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .35s cubic-bezier(.22, .61, .36, 1), box-shadow .35s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 22px 46px rgba(6, 21, 31, 0.16); }
.card-media { position: relative; aspect-ratio: 16 / 10; background: var(--sand); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-cat {
  position: absolute; top: 12px; inset-inline-start: 12px; background: rgba(4, 16, 26, 0.86);
  color: var(--cyan-soft); font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; padding: 6px 11px; border-radius: 40px; text-decoration: none;
}
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body h2, .card-body h3 { font-size: 19px; line-height: 1.35; margin: 0 0 10px; font-weight: 700; }
.card-body h2 a, .card-body h3 a { color: var(--text); text-decoration: none; }
.card-body h2 a:hover, .card-body h3 a:hover { color: var(--teal); }
.card-body p { color: var(--muted); font-size: 14.5px; line-height: 1.65; margin: 0 0 16px; }
.card-meta {
  margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  color: var(--muted); font-size: 12px; padding-top: 6px; border-top: 1px solid var(--line);
}
.card-meta time { white-space: nowrap; }
.read-more { color: var(--teal); font-weight: 700; font-size: 13px; text-decoration: none; margin-inline-start: auto; }
.read-more:hover { text-decoration: underline; }

/* Article */
.article-head { background: var(--ink); color: var(--white); padding: 44px 0 46px; }
.crumbs { font-size: 12.5px; color: rgba(255, 255, 255, 0.55); margin: 0 0 18px; }
.crumbs a { color: rgba(255, 255, 255, 0.78); text-decoration: none; }
.crumbs a:hover { color: var(--cyan-soft); }
.article-head h1 { font-size: clamp(28px, 4.6vw, 44px); line-height: 1.16; margin: 0 0 18px; font-weight: 800; letter-spacing: -0.5px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: rgba(255, 255, 255, 0.66); }
.article-meta a { color: rgba(255, 255, 255, 0.8); }
.hero-figure { margin: 0; background: var(--ink); }
.hero-figure img { width: 100%; max-height: 520px; object-fit: cover; }
.hero-figure figcaption { color: var(--muted); font-size: 13px; padding: 10px 24px 0; text-align: center; }

.article-body { padding: 40px 0 10px; font-size: 17.5px; }
.article-body > * { max-width: var(--read); margin-inline: auto; }
/* `auto` on the sides, not 0 — `.article-body p` outranks the `> *` rule above,
   so a `margin: 0 0 22px` here silently pins every paragraph to the left edge
   while the headings stay centred. */
.article-body p { margin: 0 auto 22px; }
.article-body h2 {
  font-size: clamp(23px, 3.4vw, 30px); line-height: 1.28; font-weight: 800;
  margin: 46px auto 16px; letter-spacing: -0.3px; scroll-margin-top: 84px;
}
.article-body h3 { font-size: 20px; line-height: 1.35; font-weight: 700; margin: 32px auto 12px; scroll-margin-top: 84px; }
.article-body ul, .article-body ol { margin: 0 auto 24px; padding-inline-start: 26px; }
.article-body li { margin-bottom: 9px; }
.article-body strong { font-weight: 700; color: var(--ink); }
.article-body a { color: var(--teal); text-underline-offset: 3px; }
.article-body blockquote {
  border-inline-start: 4px solid var(--cyan); background: var(--sand);
  margin: 0 auto 26px; padding: 16px 22px; border-radius: 0 10px 10px 0; color: var(--text);
}
body[dir="rtl"] .article-body blockquote { border-radius: 10px 0 0 10px; }
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 40px auto; }

.table-scroll { overflow-x: auto; margin: 0 auto 28px; max-width: var(--read); -webkit-overflow-scrolling: touch; }
.article-body table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--white); min-width: 460px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 11px 14px; text-align: start; vertical-align: top; }
.article-body th { background: var(--ink); color: var(--white); font-weight: 700; font-size: 13px; letter-spacing: .3px; }
.article-body tbody tr:nth-child(even) { background: var(--sand); }

/* Callouts: "SEALS Instructor Tip", "Local Diving Note", etc. */
.callout {
  max-width: var(--read); margin: 0 auto 28px; padding: 20px 24px; border-radius: 14px;
  background: var(--white); border: 1px solid var(--line); border-inline-start: 5px solid var(--cyan);
}
.callout-title {
  font-size: 11px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--teal); margin: 0 0 8px;
}
body[dir="rtl"] .callout-title { letter-spacing: 0; }
.callout p:last-child { margin-bottom: 0; }
.callout--safety { border-inline-start-color: #e5484d; background: #fff6f6; }
.callout--safety .callout-title { color: #b7242a; }

/* FAQ, sources, author, CTA, related */
.section-block { max-width: var(--read); margin: 0 auto; padding: 8px 0; }
.section-block h2 { font-size: 26px; font-weight: 800; margin: 46px 0 18px; }
.faq details {
  border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  margin-bottom: 10px; padding: 0 20px;
}
.faq summary {
  cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; font-size: 16px;
  display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cyan); font-size: 22px; line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding-bottom: 18px; color: var(--muted); }
.faq details > div p:last-child { margin-bottom: 0; }

.sources { font-size: 14px; color: var(--muted); }
.sources ol { padding-inline-start: 22px; margin: 0; }
.sources li { margin-bottom: 8px; }

.byline {
  display: flex; gap: 16px; align-items: flex-start; background: var(--white);
  border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin: 40px auto 0;
  max-width: var(--read); font-size: 14.5px;
}
.byline .avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--cyan-soft);
  display: flex; align-items: center; justify-content: center; font-weight: 800; flex: 0 0 auto;
}
.byline strong { display: block; }
.byline span { color: var(--muted); }

.cta-band {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-alt) 100%);
  color: var(--white); border-radius: 18px; padding: 36px 34px; margin: 46px auto 0;
  max-width: var(--read); text-align: center;
}
.cta-band h2 { color: var(--white); font-size: 25px; margin: 0 0 10px; font-weight: 800; }
.cta-band p { color: rgba(255, 255, 255, 0.75); margin: 0 0 22px; font-size: 15.5px; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-buttons a {
  padding: 13px 26px; border-radius: 40px; font-size: 12px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase; text-decoration: none;
}
body[dir="rtl"] .cta-buttons a { letter-spacing: 0; }
.cta-solid { background: var(--cyan); color: var(--abyss); }
.cta-ghost { border: 1px solid rgba(255, 255, 255, 0.45); color: var(--white); }

.related { padding: 20px 0 60px; }
.related h2 { font-size: 26px; font-weight: 800; margin: 46px 0 6px; text-align: center; }

/* Footer */
.site-foot { background: var(--abyss); color: rgba(255, 255, 255, 0.65); padding: 54px 0 30px; font-size: 14px; }
.foot-grid { display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr 1fr; }
.site-foot img { height: 40px; width: auto; margin-bottom: 16px; }
.site-foot h2 { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--cyan-soft); margin: 0 0 14px; font-weight: 700; }
.site-foot a { color: rgba(255, 255, 255, 0.65); text-decoration: none; display: block; margin-bottom: 9px; }
.site-foot a:hover { color: var(--cyan-soft); }
.foot-base {
  border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 36px; padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  font-size: 12px; color: rgba(255, 255, 255, 0.4);
}

.wa-float {
  position: fixed; bottom: 22px; inset-inline-end: 22px; width: 56px; height: 56px;
  border-radius: 50%; background: #25d366; display: flex; align-items: center;
  justify-content: center; box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45); z-index: 300;
}

@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr; }
  .head-nav { display: none; }
  .site-head .wrap { min-height: 58px; }
}
@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .article-body { font-size: 17px; }
  .page-head { padding: 40px 0 46px; }
  .article-head { padding: 30px 0 34px; }
  .cta-band { padding: 28px 22px; border-radius: 14px; }
  .byline { flex-direction: column; }
  .card-grid { gap: 20px; padding-top: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
  .card:hover { transform: none; }
}
