/*
 * Arrival Care: site extensions (hand-written, no build step).
 * Loaded after the compiled Astro/Tailwind bundle (/_astro/BaseLayout.*.css), which stays unchanged.
 * Only styles that the compiled bundle does not already provide live here:
 * navigation dropdowns, the homepage media feature, article typography and a few small helpers.
 * Colours, fonts and shadows reuse the bundle's CSS variables so the visual identity stays in one place.
 */

/* ---------- Desktop navigation dropdowns (>= 85rem, the existing "nav" breakpoint) ---------- */
.nav-dd { position: relative; }
.nav-dd-btn {
  display: inline-flex; align-items: center; gap: .3rem;
  position: relative; border-radius: .5rem; padding: .5rem .75rem;
  color: rgb(255 255 255 / .8); background: transparent; border: 0;
  font: inherit; cursor: pointer; transition: background-color .15s, color .15s;
}
.nav-dd-btn:hover, .nav-dd-btn[aria-expanded="true"] { background: rgb(255 255 255 / .1); color: #fff; }
.nav-dd-btn:focus-visible, .nav-dd-panel a:focus-visible, .m-dd-btn:focus-visible {
  outline: 2px solid var(--color-brand-400); outline-offset: 2px;
}
.nav-dd-btn .nav-dd-chev { width: .9rem; height: .9rem; transition: transform .2s; }
.nav-dd-btn[aria-expanded="true"] .nav-dd-chev { transform: rotate(180deg); }
/* Section indicator: matches the existing active-link underline (after:bg-brand-400) */
.nav-dd-btn.is-section { color: #fff; }
.nav-dd-btn.is-section::after {
  content: ""; position: absolute; left: .75rem; right: .75rem; bottom: -.125rem;
  height: .125rem; border-radius: 999px; background: var(--color-brand-400);
}
.nav-dd-panel {
  position: absolute; top: calc(100% + .5rem); left: -.5rem; z-index: 60;
  min-width: 17rem; padding: .5rem; border-radius: 1rem;
  background: #fff; color: var(--color-navy-900); white-space: normal;
  box-shadow: 0 2px 4px #102a430f, 0 24px 48px -16px #102a4359; outline: 1px solid #102a430d;
}
.nav-dd-panel[hidden] { display: none; }
/* Invisible bridge so the pointer can travel from button to panel without closing it */
.nav-dd-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -.6rem; height: .6rem; }
.nav-dd-panel--wide { min-width: 34rem; }
.nav-dd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem 1rem; }
.nav-dd-label {
  display: block; padding: .5rem .75rem .25rem; font: 600 11px/1.4 var(--font-display);
  letter-spacing: .12em; text-transform: uppercase; color: var(--color-brand-600);
}
.nav-dd-panel a {
  display: block; border-radius: .625rem; padding: .5rem .75rem;
  font-size: 15px; line-height: 1.35; font-weight: 500; color: var(--color-navy-900);
}
.nav-dd-panel a:hover { background: var(--color-brand-50); color: var(--color-brand-700); }
.nav-dd-panel a[aria-current="page"] { background: var(--color-brand-50); color: var(--color-brand-700); font-weight: 600; }
.nav-dd-panel .nav-dd-overview {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  margin-bottom: .25rem; border-bottom: 1px solid #102a431a; border-radius: .625rem .625rem 0 0;
  font-weight: 600;
}
.nav-dd-panel .nav-dd-overview span { font-size: 13px; font-weight: 500; color: var(--color-ink-500); }

/* Keep all primary links and the three header CTAs on one line from the 85rem breakpoint up (10 menu items). */
@media (min-width: 85rem) {
  #site-header nav[aria-label="Primary"] > ul > li > a,
  #site-header nav[aria-label="Primary"] .nav-dd-btn { padding-left: .375rem; padding-right: .375rem; font-size: 14.5px; }
  #site-header nav[aria-label="Primary"] > ul > li > a::after,
  #site-header nav[aria-label="Primary"] .nav-dd-btn.is-section::after { left: .375rem; right: .375rem; }
  /* Right-hand actions: same buttons, slightly tighter padding so all three CTAs stay visible at 1360px */
  #site-header .nav\:flex > a { font-size: 14.5px; }
  #site-header .nav\:flex > a:first-child { padding-left: .5rem; padding-right: .5rem; }
  #site-header .nav\:flex > a:nth-child(2) { padding-left: .875rem; padding-right: .875rem; }
  #site-header .nav\:flex > a:nth-child(3) { padding-left: 1rem; padding-right: 1rem; }
}

/* ---------- Mobile menu sub-lists (< 85rem) ---------- */
.m-dd-btn {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  padding: .875rem 0; background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; text-align: left;
}
.m-dd-btn svg { width: 1.1rem; height: 1.1rem; transition: transform .2s; opacity: .8; }
.m-dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.m-dd-btn.is-section { color: var(--color-brand-200); }
.m-dd-list { margin: 0 0 .75rem; padding: .25rem 0 .25rem .75rem; border-left: 2px solid rgb(255 255 255 / .15); }
.m-dd-list[hidden] { display: none; }
.m-dd-list a { display: block; padding: .55rem 0; font-size: 16px; font-weight: 500; color: rgb(255 255 255 / .85); }
.m-dd-list a:hover { color: #fff; }
.m-dd-list a[aria-current="page"] { color: var(--color-brand-200); }

/* ---------- Footer: explore row (services and locations) ---------- */
.footer-explore-list { display: grid; gap: .1rem 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .footer-explore-list { grid-template-columns: 1fr 1fr; } }

/* ---------- Cards: whole-card link without nesting interactive elements ---------- */
.card-link { color: inherit; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-link:focus-visible { outline: none; }
.card-link:focus-visible::after { outline: 3px solid var(--color-brand-400); outline-offset: 3px; }
.card-more { position: relative; z-index: 1; }

/* ---------- Homepage media feature (sponsored video) ---------- */
.video-thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0;
  overflow: hidden; border-radius: 1.5rem; background: var(--color-navy-950); cursor: pointer;
  box-shadow: 0 2px 4px #0000001a, 0 30px 60px -20px #000000a6;
}
.video-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.video-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, #08162466 0%, #08162400 30%, #08162400 70%, #08162459 100%);
}
.video-thumb-play {
  position: absolute; left: 50%; top: 50%; z-index: 1; display: grid; place-items: center;
  width: 5rem; height: 5rem; margin: -2.5rem 0 0 -2.5rem; border-radius: 999px;
  background: var(--color-brand-600); color: #fff;
  box-shadow: 0 0 0 10px rgb(255 255 255 / .18), 0 0 32px 8px #3b82f68c; transition: transform .2s, background-color .2s;
}
.video-thumb-play svg { width: 2rem; height: 2rem; margin-left: .25rem; }
.video-thumb-meta {
  position: absolute; right: 1rem; top: 1rem; z-index: 1;
  display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px; padding: .3rem .7rem;
  background: rgb(8 22 36 / .72); color: #fff; font-size: 13px; font-weight: 600;
}
.video-thumb-meta svg { width: .8rem; height: .8rem; }
.video-thumb:hover img { transform: scale(1.03); }
.video-thumb:hover .video-thumb-play { transform: scale(1.06); background: var(--color-brand-700); }
.video-thumb:focus-visible { outline: 3px solid var(--color-brand-400); outline-offset: 4px; }
.sponsor-chip {
  display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px; padding: .3rem .75rem;
  background: #fff3; color: #fff; font: 600 12px/1.3 var(--font-sans); letter-spacing: .04em;
  text-transform: uppercase; outline: 1px solid rgb(255 255 255 / .3);
}
.sponsor-chip svg { width: .9rem; height: .9rem; }
@media (prefers-reduced-motion: reduce) {
  .video-thumb img, .video-thumb-play, .nav-dd-btn .nav-dd-chev, .m-dd-btn svg { transition: none; }
  .video-thumb:hover img { transform: none; }
}

/* ---------- Blog cover tiles (no photography needed) ---------- */
.blog-cover {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden;
  background: linear-gradient(135deg, var(--color-brand-600), var(--color-navy-900));
  color: #fff;
}
.blog-cover::before, .blog-cover::after {
  content: ""; position: absolute; border-radius: 999px; filter: blur(40px); pointer-events: none;
}
.blog-cover::before { width: 60%; height: 80%; right: -15%; top: -30%; background: #5c9bf766; }
.blog-cover::after { width: 50%; height: 70%; left: -10%; bottom: -35%; background: #2f7df64d; }
.blog-cover--sand { background: linear-gradient(135deg, var(--color-sand-700), var(--color-navy-900)); }
.blog-cover--navy { background: linear-gradient(135deg, var(--color-navy-700), var(--color-navy-950)); }
.blog-cover-icon {
  position: relative; z-index: 1; display: grid; place-items: center; width: 4.5rem; height: 4.5rem;
  border-radius: 1.25rem; background: rgb(255 255 255 / .14); outline: 1px solid rgb(255 255 255 / .25);
}
.blog-cover-icon svg { width: 2.25rem; height: 2.25rem; }

/* ---------- Article typography ---------- */
.ac-prose { color: var(--color-ink-700); font-size: 17px; line-height: 1.75; }
.ac-prose > * + * { margin-top: 1.15em; }
.ac-prose h2 {
  margin-top: 2.2em; font: 600 1.6rem/1.25 var(--font-display); letter-spacing: -.01em; color: var(--color-navy-900);
  scroll-margin-top: 96px;
}
.ac-prose h3 { margin-top: 1.8em; font: 600 1.2rem/1.35 var(--font-display); color: var(--color-navy-900); scroll-margin-top: 96px; }
.ac-prose h2 + *, .ac-prose h3 + * { margin-top: .6em; }
.ac-prose ul, .ac-prose ol { padding-left: 1.35em; }
.ac-prose ul { list-style: disc; }
.ac-prose ol { list-style: decimal; }
.ac-prose li + li { margin-top: .45em; }
.ac-prose li::marker { color: var(--color-brand-600); }
.ac-prose a { color: var(--color-brand-700); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ac-prose a:hover { color: var(--color-brand-600); text-decoration-thickness: 2px; }
.ac-prose strong { color: var(--color-navy-900); font-weight: 600; }
.ac-prose table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.ac-prose th, .ac-prose td { padding: .75rem; border-bottom: 1px solid #102a431a; text-align: left; vertical-align: top; }
.ac-prose th { font-family: var(--font-display); font-weight: 600; color: var(--color-navy-900); background: var(--color-brand-50); }
.ac-table-wrap { overflow-x: auto; border-radius: 1rem; outline: 1px solid #102a431a; }
.ac-prose sup a { text-decoration: none; font-weight: 600; font-size: .75em; }
.ac-callout {
  border-radius: 1.25rem; padding: 1.25rem 1.5rem; background: var(--color-brand-50);
  outline: 1px solid #102a4314; color: var(--color-navy-900);
}
.ac-callout--sand { background: var(--color-sand-50); }
.ac-callout > :first-child { margin-top: 0; }
.ac-toc a { color: var(--color-ink-700); font-weight: 500; text-decoration: none; }
.ac-toc a:hover { color: var(--color-brand-700); }
.ac-refs { font-size: 14.5px; line-height: 1.6; }
.ac-refs li + li { margin-top: .5em; }
.ac-refs a { overflow-wrap: anywhere; }

/* ---------- Article layout helpers ---------- */
.ac-article { max-width: 46rem; }
@media (min-width: 64rem) { .ac-aside-sticky { position: sticky; top: 96px; } }
.ac-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Draft-only banner (pages kept outside the deployable site) ---------- */
.draft-banner {
  position: relative; z-index: 70; padding: .75rem 1rem; text-align: center;
  background: #fef3c7; color: #451a03; font: 600 14px/1.4 var(--font-sans); border-bottom: 2px solid #d97706;
}
.draft-slot {
  border: 2px dashed #d97706; border-radius: 1.25rem; padding: 1.25rem 1.5rem; background: #fffbeb; color: #451a03;
}
.draft-slot ul { list-style: disc; padding-left: 1.25rem; }
.ac-ratio-video { aspect-ratio: 16 / 9; }
.ac-refs-ol { list-style: decimal; }
.ac-article-col { min-width: 0; }
