/* SOS Albinos Panamá — site styles
   Palette drawn from the foundation's mola logo (moon + colorful geometric border). */

:root {
  --ink: #2b2140;
  --ink-soft: #574a72;
  --bg: #fdfaf3;
  --bg-alt: #f4ecd8;
  --bg-card: #ffffff;
  --line: #e6dcc3;

  --purple: #3a2a5c;
  --purple-dark: #241a3d;
  --teal: #147a82;
  --teal-dark: #0e5a60;
  --coral: #e0552b;
  --gold: #e8a91b;
  --green: #3c8f5c;
  --blue: #2f6ba8;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px -12px rgba(43, 33, 64, 0.25);
  --shadow-sm: 0 4px 14px -6px rgba(43, 33, 64, 0.2);

  --max: 1120px;
  --max-header: 1280px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font);
  color: var(--purple-dark);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 800;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }
a { color: var(--teal); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--purple-dark);
  padding: 12px 18px;
  font-weight: 700;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Mola-inspired accent stripe */
.stripe {
  height: 6px;
  background: linear-gradient(90deg, var(--coral) 0 20%, var(--gold) 20% 40%, var(--green) 40% 60%, var(--blue) 60% 80%, var(--purple) 80% 100%);
}

/* ---------- Header ---------- */
.site-header {
  background: var(--purple-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 24px;
  max-width: var(--max-header);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.3px;
}
.brand img { height: 52px; width: auto; }
.brand span { display: block; }
.brand .sub { font-weight: 500; font-size: 0.72rem; color: #d9cdf0; text-transform: uppercase; letter-spacing: 1px; }

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 800;
  flex-shrink: 0;
}
.lang-switch a {
  color: #cbbdf0;
  text-decoration: none;
  padding: 5px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}
.lang-switch a:hover, .lang-switch a:focus-visible {
  color: #fff;
  background: rgba(255,255,255,0.12);
}
.lang-switch a.active {
  color: #fff;
  background: rgba(255,255,255,0.18);
}
.lang-switch .sep { color: rgba(255,255,255,0.3); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.4);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  align-items: center;
  gap: 8px;
}

.main-nav > ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.main-nav a, .main-nav button.nav-link {
  color: #f2ecff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  white-space: nowrap;
}

.main-nav a:hover, .main-nav a:focus-visible,
.main-nav button.nav-link:hover, .main-nav button.nav-link:focus-visible {
  background: rgba(255,255,255,0.12);
}

.main-nav a[aria-current="page"] {
  background: var(--teal);
  color: #fff;
}

.nav-item.has-dropdown { position: relative; }

.dropdown {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  min-width: 260px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-direction: column;
  gap: 2px;
  display: none;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.nav-item.has-dropdown.open .dropdown {
  display: flex;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.dropdown a {
  color: var(--ink);
  font-weight: 600;
  padding: 10px 12px;
  font-size: 0.95rem;
}
.dropdown a:hover, .dropdown a:focus-visible { background: var(--bg-alt); }

.caret { font-size: 0.7em; margin-left: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-family: var(--font);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--coral); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #c9481f; color: #fff; }

.btn-outline { background: transparent; border-color: currentColor; color: var(--purple-dark); }
.btn-outline:hover { background: var(--purple-dark); color: #fff; }

.btn-light { background: #fff; color: var(--purple-dark); }
.btn-light:hover { background: var(--gold); color: var(--purple-dark); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
}
.hero-media {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center 30%;
}
.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(36,26,61,0.75) 0%, rgba(36,26,61,0.55) 45%, rgba(36,26,61,0.88) 100%);
}
.hero-content {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 70px 24px;
  width: 100%;
}
.eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero p.lead { max-width: 55ch; font-size: 1.2rem; color: #f0e9ff; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* simple page hero (no photo) */
.page-hero {
  background: var(--purple-dark);
  background-image: radial-gradient(circle at 15% 20%, rgba(20,122,130,0.5), transparent 45%),
                     radial-gradient(circle at 85% 80%, rgba(224,85,43,0.35), transparent 45%);
  color: #fff;
  padding: 64px 0 48px;
}
.page-hero h1 { color: #fff; }
.page-hero p.lead { color: #ece4ff; font-size: 1.15rem; max-width: 65ch; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 70ch; margin-bottom: 40px; }
.section-head .kicker {
  color: var(--teal-dark);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  margin-bottom: 8px;
  display: block;
}

.grid {
  display: grid;
  gap: 28px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border-top: 5px solid var(--teal);
}
.donation-tile {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.donation-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card.c-coral { border-top-color: var(--coral); }
.card.c-gold { border-top-color: var(--gold); }
.card.c-green { border-top-color: var(--green); }
.card.c-blue { border-top-color: var(--blue); }
.card.c-purple { border-top-color: var(--purple); }

.card .icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--bg-alt);
  margin-bottom: 16px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-row .stat strong {
  display: block;
  font-size: 2.1rem;
  color: var(--coral);
  font-weight: 800;
}
.stat-row .stat span { color: var(--ink-soft); font-size: 0.95rem; }

blockquote.testimonial {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin: 0;
  border-left: 6px solid var(--gold);
  font-size: 1.15rem;
  color: var(--ink-soft);
}
blockquote.testimonial footer {
  margin-top: 16px;
  font-weight: 700;
  color: var(--purple-dark);
  font-style: normal;
}

.callout {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  border-radius: var(--radius);
  padding: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.callout h2, .callout p { color: #fff; margin: 0; }
.callout p { margin-top: 8px; opacity: 0.92; }

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.two-col img { border-radius: var(--radius); box-shadow: var(--shadow); }

.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.tag-list span {
  background: var(--bg-alt);
  color: var(--purple-dark);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ---------- Map card ---------- */
.map-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.map-card img { width: 100%; display: block; }
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: center;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.map-legend .lg-item { display: flex; align-items: center; gap: 8px; }
.map-legend b { color: var(--purple-dark); }
.map-legend .swatch {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--coral); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line);
  flex-shrink: 0;
}
.map-legend .dash { width: 24px; height: 0; border-top: 2.4px dashed var(--coral); display: inline-block; flex-shrink: 0; }

/* ---------- Data table ---------- */
.data-table-wrap { overflow-x: auto; background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 480px; }
.data-table thead th {
  text-align: left; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 700; padding: 16px 16px 10px; border-bottom: 1px solid var(--line);
}
.data-table thead th.num, .data-table tbody td.num { text-align: right; }
.data-table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table .rank { color: var(--ink-soft); font-variant-numeric: tabular-nums; width: 28px; }
.data-table .area { font-weight: 700; color: var(--purple-dark); }
.data-table .num { font-variant-numeric: tabular-nums; }
.data-table td.muted { color: var(--ink-soft); }
.data-table .bar { width: 34%; min-width: 110px; }
.data-table .track { display: block; height: 9px; border-radius: 6px; background: var(--bg-alt); overflow: hidden; }
.data-table .fill { display: block; height: 100%; border-radius: 6px; background: var(--coral); }
.data-table tfoot td { padding: 14px 16px; font-weight: 800; border-top: 2px solid var(--line); font-variant-numeric: tabular-nums; color: var(--purple-dark); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--purple-dark); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
}
fieldset { border: none; padding: 0; margin: 0 0 18px; }
fieldset legend { font-weight: 700; margin-bottom: 8px; color: var(--purple-dark); padding: 0; }
.radio-group { display: flex; gap: 24px; }
.radio-group label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.radio-group input { width: auto; }
.form-note {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--purple-dark);
  color: #d9cdf0;
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: #d9cdf0; text-decoration: none; font-size: 0.95rem; }
.footer-grid a:hover { color: #fff; text-decoration: underline; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { height: 46px; }
.footer-brand strong { color: #fff; font-size: 1.05rem; }
.social-row { display: flex; gap: 12px; margin-top: 16px; }
.social-row a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.social-row a:hover { background: var(--teal); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 22px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Breadcrumb / misc ---------- */
.breadcrumb { font-size: 0.9rem; color: #cfc2ec; margin-bottom: 14px; }
.breadcrumb a { color: #cfc2ec; }

.prose h2 { margin-top: 1.4em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.5em; }

.anchor-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.anchor-nav a {
  background: var(--bg-alt);
  color: var(--purple-dark);
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}
.anchor-nav a:hover { background: var(--teal); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1050px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--purple-dark);
    padding: 10px 16px 20px;
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a, .main-nav button.nav-link { width: 100%; white-space: normal; }
  .dropdown { position: static; box-shadow: none; background: rgba(255,255,255,0.06); display: none; }
  .nav-item.has-dropdown.open .dropdown { display: flex; }
  .dropdown a { color: #f2ecff; }
  .dropdown a:hover { background: rgba(255,255,255,0.12); }
}

@media (max-width: 760px) {
  body { font-size: 17px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .callout { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  section { padding: 52px 0; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
