/*
Theme Name: Nomad Medical Missions
Theme URI: https://nomadmedicalmissions.org
Author: DEVICO (Loredana Romano Devico)
Author URI: https://devico.com.br
Description: Custom WordPress theme for Nomad Medical Missions LLC — a Christian-founded preventive medical mission organization. Built with editorial typography, accessibility (WCAG AA), and a content architecture that supports a global LLC with country-specific programs (starting with Brazil). Includes ACF-driven content blocks, custom post types for Missions and Team Members, multilingual readiness, and donation/volunteer workflows.
Version: 1.5.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: GPL v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nomad-medical
Tags: nonprofit, ngo, medical, missions, accessibility-ready, translation-ready, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --navy:        #06304A;
  --deep-navy:   #041D2D;
  --orange:      #F56B13;
  --orange-soft: #ff7a22;
  --gold:        #F7A51D;
  --green:       #347A3B;
  --teal:        #0C7C84;
  --cream:       #F7F4EC;
  --soft-blue:   #EAF4F6;
  --white:       #FFFFFF;
  --charcoal:    #1E2930;
  --muted:       #687680;
  --line:        rgba(6,48,74,.12);
  --line-strong: rgba(6,48,74,.22);

  --font-serif:  "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans:   "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius-sm:  10px;
  --radius-md:  18px;
  --radius-lg:  26px;
  --radius-pill: 999px;

  --shadow-sm:  0 6px 18px rgba(6,48,74,.06);
  --shadow-md:  0 14px 38px rgba(6,48,74,.10);
  --shadow-lg:  0 24px 60px rgba(4,29,45,.18);

  --container:  1180px;

  --ease:       cubic-bezier(.2,.7,.2,1);
}

/* ============================================================
   RESETS & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute; top: -100px; left: 8px; z-index: 9999;
  background: var(--navy); color: var(--white);
  padding: 12px 18px; border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 8px; }

.container { width: min(var(--container), 92%); margin: 0 auto; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  color: var(--navy);
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0 0 .5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.6rem, 5.8vw, 4.8rem); letter-spacing: -0.025em; font-weight: 500; }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
h4 { font-size: 1.15rem; letter-spacing: 0.02em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.eyebrow, .section-kicker {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--orange);
  margin-bottom: 14px;
}
.eyebrow { color: var(--gold); }

.section-lead {
  max-width: 720px;
  font-size: 1.18rem;
  color: var(--muted);
  margin-bottom: 44px;
  line-height: 1.6;
}

/* ============================================================
   HEADER & NAV
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.site-nav {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex; align-items: center; gap: 14px;
  color: var(--navy);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.brand img { width: 54px; height: 54px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; }
.brand-text .sub {
  font-family: var(--font-sans);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--orange);
  text-transform: uppercase;
  margin-top: 2px;
}

.primary-menu {
  display: flex; align-items: center; gap: 28px;
  list-style: none; margin: 0; padding: 0;
}
.primary-menu a {
  font-size: .92rem;
  font-weight: 600;
  color: var(--navy);
  transition: color .2s var(--ease);
}
.primary-menu a:hover { color: var(--orange); }
.primary-menu .menu-cta a {
  background: var(--orange); color: var(--white);
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.primary-menu .menu-cta a:hover {
  background: var(--orange-soft);
  color: var(--white);
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  background: transparent; border: 0;
  width: 44px; height: 44px;
  cursor: pointer;
  color: var(--navy);
}
.menu-toggle svg { width: 28px; height: 28px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  overflow: hidden;
  background: var(--deep-navy);
}

/* Background photo */
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  transition: transform 8s ease;
}
.hero:hover .hero-bg img {
  transform: scale(1.04);
}

/* Dark overlay — always on */
.hero-bg::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    160deg,
    rgba(4,29,45,.82) 0%,
    rgba(6,48,74,.65) 50%,
    rgba(4,29,45,.75) 100%
  );
}

/* Subtle gold glow at bottom */
.hero-bg::after {
  content: "";
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  height: 40%;
  background: linear-gradient(to top, rgba(4,29,45,.6), transparent);
}

.hero > .container {
  position: relative; z-index: 3;
  padding: 140px 0 120px;
  width: 100%;
}

.hero--centered > .container {
  display: flex;
  justify-content: center;
}

.hero-content { max-width: 820px; }

.hero-content--centered {
  max-width: 860px;
  text-align: center;
}

.hero-content--centered h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  letter-spacing: -0.03em;
  line-height: 1.06;
}

.hero h1 { color: var(--white); margin-bottom: 24px; }

.hero p.lead {
  font-size: 1.18rem;
  color: rgba(255,255,255,.85);
  margin-bottom: 38px;
  line-height: 1.6;
}

.hero-content--centered p.lead {
  max-width: 660px;
  margin-left: auto;
  margin-right: auto;
}

.hero .eyebrow { color: var(--gold); }

.hero-content--centered .eyebrow {
  display: block;
  margin-bottom: 20px;
}

.hero-divider {
  display: block;
  width: 56px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 32px;
}

.button-row--centered { justify-content: center; }

/* ============================================================
   BUTTONS
   ============================================================ */
.button-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .98rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
  border: 0;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover {
  background: var(--orange-soft);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(245,107,19,.32);
}
.btn-secondary {
  background: transparent;
  border: 2px solid rgba(255,255,255,.7);
  color: var(--white);
}
.btn-secondary:hover {
  background: var(--white); color: var(--navy);
  transform: translateY(-2px);
}
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--deep-navy); transform: translateY(-2px); }

.btn::after {
  content: "→";
  transition: transform .2s var(--ease);
}
.btn:hover::after { transform: translateX(4px); }

/* ============================================================
   SECTIONS
   ============================================================ */
section { padding: 100px 0; }
section.soft  { background: var(--soft-blue); }
section.cream { background: var(--cream); }
section.navy  { background: var(--navy); color: var(--white); }
section.navy h2, section.navy h3 { color: var(--white); }
section.navy .section-lead { color: rgba(255,255,255,.82); }

.split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 64px;
  align-items: center;
}
.split.reverse > div:first-child { order: 2; }

/* ============================================================
   PANELS & CARDS
   ============================================================ */
.panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}
.panel.highlight { border-left: 6px solid var(--orange); border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.panel h3 { font-size: 1.5rem; margin-bottom: 14px; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  border-top: 5px solid var(--teal);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card.orange { border-top-color: var(--orange); }
.card.green  { border-top-color: var(--green); }
.card.gold   { border-top-color: var(--gold); }
.card h3 { font-size: 1.32rem; line-height: 1.2; margin-bottom: 12px; }
.card p { color: #3d4a52; font-size: .98rem; }

.list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.list li { position: relative; padding-left: 32px; color: #34454F; }
.list li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--orange);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M6.5 11.5L3 8l1.1-1.1 2.4 2.4 5.4-5.4L13 5z'/%3E%3C/svg%3E");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
}

/* ============================================================
   VIP / CONCIERGE GRID
   ============================================================ */
.vip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 28px;
}
.vip-box {
  background: var(--white);
  padding: 30px 28px;
  border-radius: var(--radius-md);
  border-left: 5px solid var(--gold);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease);
}
.vip-box:hover { transform: translateY(-3px); }
.vip-box h4 {
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: 1.02rem;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

/* ============================================================
   WHERE WE SERVE
   ============================================================ */
.where-we-serve { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.country-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 38px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.country-card .flag {
  position: absolute; top: 0; right: 0;
  width: 8px; height: 100%;
  background: linear-gradient(180deg, var(--green) 0% 50%, var(--gold) 50% 100%);
}
.country-card .status {
  display: inline-block;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .15em;
  color: var(--green); background: rgba(52,122,59,.1);
  padding: 5px 12px; border-radius: var(--radius-pill);
  margin-bottom: 14px;
}
.country-card h3 { font-size: 1.8rem; margin-bottom: 12px; }
.future-list { margin-top: 30px; display: grid; gap: 14px; }
.future-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: rgba(255,255,255,.6);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: .95rem;
}
.future-item .pin { color: var(--gold); font-weight: 700; }

/* ============================================================
   QUOTE BAND
   ============================================================ */
.quote-band {
  background-color: var(--deep-navy);
  background-image:
    linear-gradient(rgba(4,29,45,.92), rgba(4,29,45,.92)),
    url("https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?auto=format&fit=crop&w=1800&q=80");
  background-size: cover; background-position: center;
  color: var(--white);
  text-align: center;
  padding: 110px 0;
}
.quote-band h2 {
  color: var(--white);
  max-width: 920px;
  margin: 0 auto 20px;
  font-style: italic;
  font-weight: 400;
}
.quote-band p {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(255,255,255,.82);
  font-size: 1.1rem;
}

/* ============================================================
   GOALS / IMPACT STRIP
   ============================================================ */
.goals-band {
  background: var(--deep-navy);
  color: var(--white);
  padding: 72px 0;
}
.goals-band .label {
  text-align: center;
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 14px;
}
.goals-band .title {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--white);
  margin-bottom: 40px;
  font-weight: 500;
}
.goals-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  text-align: center;
}
.goals-item {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md);
  padding: 26px 14px;
}
.goals-item strong {
  display: block;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 10px;
  font-weight: 500;
}
.goals-item span {
  font-size: .88rem;
  color: rgba(255,255,255,.82);
  line-height: 1.4;
}

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  background-color: var(--navy);
  background-image:
    linear-gradient(135deg, rgba(6,48,74,.94), rgba(12,124,132,.88)),
    url("https://images.unsplash.com/photo-1559757148-5c350d0d3c56?auto=format&fit=crop&w=1800&q=80");
  background-size: cover; background-position: center;
  color: var(--white);
  text-align: center;
  padding: 120px 0;
}
.cta-band h2 { color: var(--white); max-width: 880px; margin: 0 auto 18px; }
.cta-band p {
  max-width: 720px;
  margin: 0 auto 36px;
  color: rgba(255,255,255,.9);
  font-size: 1.12rem;
}
.cta-band .button-row { justify-content: center; }

/* ============================================================
   FORMS
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 28px;
}
.form-grid .full { grid-column: 1 / -1; }
.form-grid label {
  display: block;
  font-size: .85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--navy);
  margin-bottom: 8px;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--charcoal);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(245,107,19,.12);
  outline: none;
}
.form-grid textarea { min-height: 140px; resize: vertical; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--deep-navy);
  color: var(--white);
  padding: 70px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 42px;
}
.site-footer h4 {
  font-family: var(--font-sans);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 18px;
}
.site-footer p, .site-footer a {
  color: rgba(255,255,255,.72);
  font-size: .95rem;
  line-height: 1.65;
}
.site-footer a { display: block; margin-bottom: 10px; transition: color .2s var(--ease); }
.site-footer a:hover { color: var(--gold); }
.footer-logo {
  width: 86px;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 8px;
  margin-bottom: 18px;
}
.footer-mission p { margin-bottom: 14px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .88rem;
  color: rgba(255,255,255,.58);
}
.footer-bottom a { display: inline; margin: 0 0 0 18px; }

/* ============================================================
   SUBTLE ANIMATIONS (reveal on scroll)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .menu-toggle { display: inline-flex; }
  .primary-menu {
    position: absolute; top: 84px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 12px 0;
    display: none;
  }
  .primary-menu.is-open { display: flex; }
  .primary-menu li { width: 100%; }
  .primary-menu a {
    display: block; padding: 14px 24px;
    border-bottom: 1px solid var(--line);
  }
  .primary-menu .menu-cta a {
    margin: 14px 24px; text-align: center;
    border-bottom: 0;
  }

  .split, .where-we-serve { grid-template-columns: 1fr; gap: 36px; }
  .split.reverse > div:first-child { order: 0; }
  .cards { grid-template-columns: 1fr; }
  .vip-grid { grid-template-columns: 1fr; }
  .goals-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  section { padding: 72px 0; }
  .hero { min-height: auto; }
  .hero > .container { padding: 100px 0; }
}

@media (max-width: 560px) {
  .brand img { width: 46px; height: 46px; }
  .brand-text { font-size: 1rem; }
  .goals-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }
  section { padding: 60px 0; }
}
