/**
 * NextStep International — UI polish layer (mobile + desktop)
 * Loaded after inline styles in index.html
 */

:root {
  --space-xs: clamp(0.5rem, 1.5vw, 0.75rem);
  --space-sm: clamp(0.75rem, 2vw, 1rem);
  --space-md: clamp(1rem, 2.5vw, 1.5rem);
  --space-lg: clamp(1.5rem, 4vw, 2.5rem);
  --space-xl: clamp(2.5rem, 6vw, 4.5rem);
  --shadow-sm: 0 1px 3px rgba(10, 31, 68, 0.06);
  --shadow-md: 0 8px 30px rgba(10, 31, 68, 0.1);
  --shadow-lg: 0 20px 50px rgba(10, 31, 68, 0.14);
  --focus-ring: 0 0 0 3px rgba(212, 168, 67, 0.45);
  --header-h: 72px;
  --mobile-bar-h: 64px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Skip link ─── */
.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -100px;
  z-index: 1000;
  padding: 0.65rem 1rem;
  background: var(--navy);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--rsm);
  box-shadow: var(--shadow-md);
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus {
  top: var(--space-sm);
  outline: none;
  box-shadow: var(--focus-ring), var(--shadow-md);
}

/* ─── Focus & selection (keyboard / a11y) ─── */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.btn:focus-visible,
.hamburger:focus-visible,
.nav-x:focus-visible,
.modal-x:focus-visible,
.back-top:focus-visible {
  box-shadow: var(--focus-ring);
}
details.fq summary:focus-visible {
  border-radius: 4px;
  box-shadow: inset var(--focus-ring);
}
::selection {
  background: rgba(212, 168, 67, 0.35);
  color: var(--ink);
}

/* ─── Header — frosted sticky bar ─── */
.site-header {
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  background: rgba(255, 255, 255, 0.92);
}
.site-header.scrolled {
  box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
}

.hdr {
  padding-left: clamp(16px, 4vw, 28px);
  padding-right: clamp(16px, 4vw, 28px);
}

.hdr-nav a:focus-visible {
  color: var(--navy);
}

/* Hamburger → X animation */
.hamburger {
  min-width: 44px;
  min-height: 44px;
}
.hamburger.is-open span:nth-child(1) {
  transform: translateY(6.8px) rotate(45deg);
}
.hamburger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.is-open span:nth-child(3) {
  transform: translateY(-6.8px) rotate(-45deg);
}

/* ─── Mobile drawer — slide + stagger ─── */
.nav-drawer.open .nav-overlay {
  animation: uiFadeIn 0.25s var(--ease-out);
}
.nav-drawer.open .nav-panel {
  animation: uiSlideIn 0.32s var(--ease-out);
}
.nav-panel {
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-links a {
  min-height: 48px;
  display: flex;
  align-items: center;
}
.nav-panel-foot .btn {
  min-height: 48px;
  width: 100%;
}

@keyframes uiFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes uiSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* ─── Hero — mobile-first rhythm ─── */
.hero {
  min-height: min(88vh, 780px);
}
.hero-in {
  padding: clamp(2.5rem, 8vw, 4.5rem) clamp(1rem, 4vw, 1.5rem) clamp(3rem, 10vw, 4.5rem);
}
.hero-btns {
  flex-direction: column;
  align-items: stretch;
}
.hero-btns .btn {
  width: 100%;
  min-height: 52px;
  justify-content: center;
}
.hero-stats {
  max-width: none;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.hstat {
  padding: clamp(14px, 3vw, 18px) clamp(10px, 2vw, 16px);
}

@media (min-width: 520px) {
  .hero-btns {
    flex-direction: row;
    align-items: center;
  }
  .hero-btns .btn {
    width: auto;
  }
}

@media (min-width: 768px) {
  .hero-stats {
    max-width: 500px;
  }
}

/* ─── Sections — consistent vertical rhythm ─── */
.sec {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  padding-left: clamp(1rem, 4vw, 1.5rem);
  padding-right: clamp(1rem, 4vw, 1.5rem);
}
.sec-sm {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}
.lead {
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  max-width: 58ch;
}

/* ─── Buttons — touch + active states ─── */
.btn {
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
@media (hover: hover) {
  .btn:active {
    transform: translateY(-1px);
  }
}

/* ─── Program cards — premium card UX ─── */
.prog {
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.prog-img {
  height: clamp(200px, 42vw, 240px);
}
.prog:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), var(--shadow-md);
}
.prog-data {
  padding: clamp(18px, 3vw, 22px);
}
.prog-cta {
  min-height: 40px;
  padding: 10px 16px;
}
@media (hover: none) {
  .prog:active {
    transform: scale(0.985);
  }
  .prog:hover {
    transform: none;
  }
}

/* ─── Cards & FAQ ─── */
.bcard,
.wcard,
.testi-card,
.tcard,
.video-card {
  border-radius: 14px;
}
details.fq summary {
  min-height: 56px;
  padding-top: 18px;
  padding-bottom: 18px;
}

/* ─── Trust strip — horizontal scroll on small phones ─── */
.trust-strip {
  padding-left: 0;
  padding-right: 0;
}
.trust-inner {
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 clamp(1rem, 4vw, 1.5rem) 4px;
  gap: 16px;
}
.trust-inner::-webkit-scrollbar {
  display: none;
}
.trust-uni {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ─── Compare table scroll hint ─── */
.compare-wrap {
  position: relative;
}
.compare-table-wrap {
  -webkit-overflow-scrolling: touch;
}

/* ─── Contact methods — 48px tap rows ─── */
.contact-method {
  min-height: 72px;
}

/* ─── Footer ─── */
.footer {
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}
@media (max-width: 767px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .f-copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ─── Floating actions — stack above mobile bar ─── */
.wa-float {
  bottom: calc(88px + env(safe-area-inset-bottom));
}
.back-top {
  bottom: calc(156px + env(safe-area-inset-bottom));
}

@media (min-width: 768px) {
  .wa-float {
    bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .back-top {
    bottom: calc(92px + env(safe-area-inset-bottom));
  }
}

/* ─── Mobile sticky CTA bar ─── */
.mobile-action-bar {
  display: flex;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 450;
  padding: 10px clamp(12px, 3vw, 16px);
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  gap: 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(10, 31, 68, 0.08);
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
}
.mobile-action-bar.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-action-bar .btn {
  flex: 1;
  min-height: 48px;
  font-size: 0.875rem;
  padding: 12px 14px;
}
.mobile-action-bar .btn-wa {
  flex: 0 0 auto;
  min-width: 48px;
  padding-left: 14px;
  padding-right: 14px;
}
.mobile-action-bar .btn-wa span {
  display: none;
}
@media (min-width: 768px) {
  .mobile-action-bar {
    display: none !important;
  }
}

body.has-mobile-bar {
  padding-bottom: calc(var(--mobile-bar-h) + env(safe-area-inset-bottom));
}
@media (min-width: 768px) {
  body.has-mobile-bar {
    padding-bottom: 0;
  }
}

/* ─── Notice bar — compact mobile ─── */
@media (max-width: 480px) {
  .notice {
    font-size: 0.72rem;
    line-height: 1.45;
    padding: 8px 12px;
  }
  .notice a {
    display: inline-block;
    margin-left: 0;
    margin-top: 4px;
  }
}

/* ─── Modal — safe area ─── */
.modal-ft {
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
}

/* ─── Destination cards ─── */
.dest-card {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
@media (hover: none) {
  .dest-card:active {
    transform: scale(0.98);
  }
}

/* ─── Video gallery ─── */
.video-card {
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
@media (hover: hover) {
  .video-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
  }
}

/* ─── CTA section ─── */
.cta-btns .btn {
  min-height: 52px;
  min-width: 160px;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .nav-drawer.open .nav-panel,
  .nav-drawer.open .nav-overlay,
  .mobile-action-bar {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
