/* Mujeres sin Fronteras — UI (v20)
   Objetivo: limpio, rápido, móvil primero, sin “glow” exagerado. */

:root{
  /* Paleta basada en la imagen principal (header) */
  --bg:#0b1220;   /* azul noche */
  --bg2:#070c16;  /* aún más oscuro */

  --surface: rgba(255,255,255,.045);
  --surface2: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.10);

  --text:#f8fafc;
  --muted: rgba(248,250,252,.72);

  --accent:#258e8f;        /* teal */
  --accentRgb: 37,142,143;

  --warm:#f1a61c;          /* dorado/naranja */
  --warmRgb: 241,166,28;

  --danger:#de3633;        /* rojo */
  --dangerRgb: 222,54,51;

  /* Alias para no romper estilos existentes */
  --primary: var(--accent);
  --donate: var(--warm);
  --wa:#22c55e;

  --shadow: 0 18px 42px rgba(0,0,0,.42);
  --shadowSoft: 0 10px 26px rgba(0,0,0,.30);

  --rSm: 10px;
  --r: 14px;
  --rLg: 22px;

  --max: 1120px;
  --pad: 16px;
}


*{ box-sizing:border-box; }
html{
  height:100%;
  scroll-behavior:smooth;
  scroll-padding-top: 86px; /* deja espacio para el header sticky */

  overflow-x: clip;
}
body{
  min-height:100%;
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background:
    radial-gradient(900px 520px at 15% -10%, rgba(var(--accentRgb), .16), transparent 58%),
    radial-gradient(900px 520px at 92% 0%, rgba(var(--warmRgb), .12), transparent 62%),
    radial-gradient(700px 420px at 80% 80%, rgba(var(--dangerRgb), .06), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

@supports not (overflow: clip){
  html, body{ overflow-x:hidden; }
}


a{ color:inherit; }
.wrap{
  width:min(var(--max), calc(100% - 2*var(--pad)));
  margin:0 auto;
}

.skip{
  position:absolute; left:-9999px; top:auto;
  width:1px; height:1px; overflow:hidden;
}
.skip:focus{
  left:16px; top:16px;
  width:auto; height:auto;
  padding:10px 12px;
  background: rgba(10,11,16,.92);
  border:1px solid var(--border);
  border-radius:12px;
  z-index:9999;
}

.srOnly{
  position:absolute!important;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}

/* ===== Header ===== */
.topbar{
  position:sticky; top:0;
  z-index:50;
  background: rgba(10,11,16,.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 0;
  flex-wrap: wrap;
  min-width: 0;
}
.topbar.topbar--scrolled .topbar__inner{ padding:9px 0; }

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
}
.brand__logo{
  border-radius:12px;
  box-shadow: 0 10px 22px rgba(0,0,0,.30);
}
.brand__name{
  font-weight:820;
  font-size:14px;
  line-height:1;
}
.brand__tag{
  font-size:12px;
  color:var(--muted);
  margin-top:3px;
}

.nav{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end; min-width:0; }

/* Tabs (Videos / Infografías) estilo “segmented control” */
.navSeg{
  display:inline-flex;
  gap:6px;
  padding:4px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  max-width: 100%;
}
.navSeg__item{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:34px;
  padding:0 12px;
  border-radius:999px;
  font-weight:780;
  font-size:13px;
  text-decoration:none;
  color: rgba(244,246,255,.78);
  border: 1px solid transparent;
  background: transparent;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.navSeg__item::before{
  display:inline-block;
  margin-right:8px;
  opacity:.9;
  transform: translateY(-.5px);
}
.navSeg__item[data-navtarget="videos"]::before{ content:"▶"; }
.navSeg__item[data-navtarget="recursos"]::before{ content:"▦"; }

.navSeg__item:hover{
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.08);
}
.navSeg__item.is-active{
  color: rgba(255,255,255,.96);
  background: rgba(var(--accentRgb),.14);
  border-color: rgba(var(--accentRgb),.28);
}

.navDonate{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:34px;
  padding:0 12px;
  border-radius: 999px;
  font-weight:820;
  font-size:13px;
  text-decoration:none;
  border:1px solid rgba(var(--warmRgb),.34);
  background: rgba(var(--warmRgb),.10);
  color: rgba(255,255,255,.92);
  transition: background .12s ease;
}
.navDonate:hover{ background: rgba(var(--warmRgb),.14); }


/* ===== Header responsive ===== */
@media (max-width: 680px){
  html{ scroll-padding-top: 124px; } /* header puede crecer en móvil */
  .topbar__inner{ padding:10px 0; }
  .brand{ flex:1 1 240px; min-width: 180px; }
  .nav{ width:100%; justify-content:space-between; }

  /* Layout: tabs ocupan ancho completo y Donar no se sale */
  .nav{
    display:grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "seg donate";
    align-items:center;
    gap:10px;
  }
  .navSeg{ grid-area: seg; width:100%; justify-content:space-between; }
  .navSeg__item{ flex:1 1 0; padding:0 10px; }
  .navDonate{ grid-area: donate; white-space:nowrap; }
}
@media (max-width: 420px){
  html{ scroll-padding-top: 140px; }
  .nav{
    grid-template-columns: 1fr;
    grid-template-areas:
      "seg"
      "donate";
    justify-items:stretch;
  }
  .navDonate{
    justify-self:end;
    height:32px;
    padding:0 12px;
  }
  /* En pantallas bien pequeñas, quitamos el iconito para ganar espacio */
  .navSeg__item::before{ display:none; }
}

/* ===== Buttons ===== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  text-decoration:none;
  height:34px;
  padding:0 12px;
  border-radius: var(--r);
  font-weight:780;
  font-size:13px;
  letter-spacing:0;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(244,246,255,.92);
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover{
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.16);
}
.btn:focus-visible{
  outline:2px solid rgba(var(--accentRgb),.55);
  outline-offset:2px;
}
.btn--ghost{
  background: transparent;
  border-color: rgba(255,255,255,.10);
}
.btn--ghost:hover{ background: rgba(255,255,255,.06); }

.btn--small{ height:30px; padding:0 10px; border-radius: 12px; font-size:12.5px; }

.btn--primary{
  border-color: rgba(var(--accentRgb),.32);
  background: rgba(var(--accentRgb),.10);
}
.btn--primary:hover{ background: rgba(var(--accentRgb),.14); }

.btn--donate{
  border-color: rgba(var(--warmRgb),.34);
  background: rgba(var(--warmRgb),.10);
}
.btn--donate:hover{ background: rgba(var(--warmRgb),.14); }

/* ===== Hero ===== */
.hero{
  padding:24px 0 10px;
  display:grid;
  grid-template-columns: 1.12fr .88fr;
  gap:22px;
  align-items:center;
}
.kicker{
  margin:0 0 10px;
  color: rgba(244,246,255,.60);
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
h1{
  margin:0;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height:1.08;
  letter-spacing:-.02em;
  font-weight: 880;
}
.sub{
  margin:12px 0 0;
  color:var(--muted);
  font-size:16px;
  line-height:1.55;
  max-width:56ch;
}
.cta{ display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }

.choiceHint{
  margin:14px 0 10px;
  font-size:13px;
  color: rgba(244,246,255,.78);
}

.heroSwitch{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
  margin-top:0;
}
.switchBtn{
  border-radius: var(--rLg);
  padding:14px 14px;
  min-height:76px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  display:flex;
  gap:12px;
  align-items:center;
  text-decoration:none;
  transition: background .12s ease, border-color .12s ease;
}
.switchBtn:hover{ background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.switchBtn.is-active{ background: rgba(var(--accentRgb),.12); border-color: rgba(var(--accentRgb),.28); }

.switchBtn__icon{
  width:40px; height:40px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  font-size:16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}
.switchBtn--videos .switchBtn__icon{ background: rgba(var(--accentRgb), .16); border-color: rgba(var(--accentRgb), .26); }
.switchBtn--info .switchBtn__icon{ background: rgba(var(--warmRgb), .16); border-color: rgba(var(--warmRgb), .26); }

.switchBtn__text{ display:flex; flex-direction:column; gap:2px; }
.switchBtn__title{ font-size:14.5px; font-weight: 860; }
.switchBtn__sub{ font-size:12.5px; color: var(--muted); }

.emergency{
  margin:14px 0 0;
  color: rgba(244,246,255,.80);
  font-size:14px;
}

.heroCard{
  border-radius: var(--rLg);
  overflow:hidden;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadowSoft);
}
.heroCard picture{ display:block; }
.heroCard img{
  width:100%;
  height:auto;
  display:block;
}

/* ===== Sections ===== */
.section{ padding:18px 0 8px; scroll-margin-top: 90px; }
.section__head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
h2{
  margin:0;
  font-size:22px;
  letter-spacing:-.01em;
  font-weight: 860;
}
.muted{ color:var(--muted); }
.small{ font-size:13px; }

/* Search */
.search{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  border-radius: var(--rLg);
  padding:8px 10px;
  min-width: min(520px, 100%);
}
.search input{
  width:100%;
  background: transparent;
  border:none;
  outline:none;
  color:var(--text);
  font-size:13.5px;
}
.search input::placeholder{ color: rgba(244,246,255,.45); }

.iconBtn{
  border:none;
  background: rgba(255,255,255,.05);
  color: rgba(244,246,255,.90);
  border-radius: 12px;
  width:34px; height:34px;
  cursor:pointer;
  border:1px solid rgba(255,255,255,.10);
  transition: background .12s ease, border-color .12s ease;
}
.iconBtn:hover{ background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); }

/* Topics */
.topics{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 6px 0 14px;
}
.topicChip{
  border-radius: 999px;
  height: 30px;
  padding: 0 10px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color: rgba(244,246,255,.90);
  font-weight:820;
  font-size:12.5px;
  cursor:pointer;
  transition: background .12s ease, border-color .12s ease;
}
.topicChip:hover{ background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.topicChip--active{
  background: rgba(var(--accentRgb),.16);
  border-color: rgba(var(--accentRgb),.30);
  color: rgba(255,255,255,.96);
}

/* Grid / Tiles */
.status{
  margin:10px 0 10px;
  color: rgba(244,246,255,.78);
  font-size:13px;
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
}
.groupHeader{
  grid-column: 1 / -1;
  margin: 6px 0 2px;
  padding: 10px 12px;
  border-radius: var(--r);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  font-weight: 860;
  letter-spacing:.2px;
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}
.badge--id{ background: rgba(var(--accentRgb),.14); border-color: rgba(var(--accentRgb),.26); }

.tile{
  text-align:left;
  padding:0;
  border:none;
  border-radius: var(--rLg);
  overflow:hidden;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.08);
  cursor:pointer;
  transition: border-color .12s ease;
}
.tile:hover{ border-color: rgba(255,255,255,.14); }
.tile__media{
  position:relative;
  aspect-ratio: 16 / 9;
  background: rgba(255,255,255,.03);
}
.tile__media img{
  width:100%; height:100%;
  object-fit:cover;
  display:block;
}
.tile__badge{ position:absolute; left:10px; top:10px; }
.tile__meta{ padding:10px 10px 12px; }
.tile__title{
  font-weight: 840;
  font-size:14px;
  line-height:1.2;
}
.tile__summary{
  margin-top:6px;
  font-size:13px;
  color: rgba(244,246,255,.70);
  line-height:1.35;
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
  min-height: 2.7em;
}

.pager{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:14px 0 0;
}
.pager__info{ text-align:center; flex:1; }

/* Videos */
.videoGroups{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top: 10px;
}
.vgroup{
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--rLg);
  overflow:hidden;
}
.vgroup > summary{
  list-style:none;
  cursor:pointer;
  padding: 12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-weight: 860;
}
.vgroup > summary::-webkit-details-marker{ display:none; }
.vgroup__meta{
  display:flex;
  align-items:center;
  gap:10px;
  color: rgba(244,246,255,.70);
  font-size: 13px;
  font-weight: 820;
}
.vgroup__count{
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}
.vgroup__body{ padding: 0 12px 12px; }

.videoTile .tile__play{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  pointer-events:none;
}
.videoTile .tile__play span{
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(0,0,0,.42);
  border: 1px solid rgba(255,255,255,.22);
  display:grid;
  place-items:center;
  font-size: 18px;
  line-height: 1;
  color: rgba(255,255,255,.92);
}

/* Modals */
.modal{
  position:fixed;
  inset:0;
  display:none;
  z-index:80;
}
.modal[aria-hidden="false"]{ display:block; }
.modal__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.60);
}
.modal__panel{
  position:relative;
  width:min(980px, calc(100% - 2*var(--pad)));
  margin: calc(24px + env(safe-area-inset-top)) auto;
  border-radius: var(--rLg);
  background: rgba(15,12,28,.92);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
  overflow:hidden;
  max-height: calc(100vh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  display:flex;
  flex-direction:column;
}
.modal__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 12px 0;
}
.modal__titleRow{ display:flex; align-items:center; gap:10px; }
.modal__title{ margin:0; font-size:16px; font-weight:860; }
.modal__actions{
  padding:10px 12px 12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.modal__body{
  padding:0 12px 14px;
  overflow:auto;
  -webkit-overflow-scrolling: touch;
}

.modalMedia{ position:relative; }

.navArrow{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  width:44px;
  height:44px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(20,18,39,.78);
  backdrop-filter: blur(6px);
  color: rgba(244,246,255,.92);
  font-size:22px;
  font-weight:860;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}
.navArrow:hover{ background: rgba(20,18,39,.92); }
.navArrow:disabled{ opacity:.35; cursor:not-allowed; }
.navArrow--left{ left:10px; }
.navArrow--right{ right:10px; }

.imgWrap{
  border-radius: 18px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.imgWrap img{ width:100%; height:auto; display:block; }

.modal__hint{ margin-top:10px; }

.videoWrap{ padding: 12px; }
.videoWrap iframe{
  width:100%;
  aspect-ratio: 16 / 9;
  border:0;
  border-radius: 14px;
  background: rgba(0,0,0,.25);
}

.modal__nav{
  padding: 0 12px 12px;
  display:flex;
  gap:10px;
  justify-content:space-between;
}

/* Toast */
.toast{
  position:fixed;
  left:50%;
  bottom: 16px;
  transform: translateX(-50%);
  background: rgba(20,18,39,.96);
  border:1px solid rgba(255,255,255,.12);
  color: rgba(244,246,255,.92);
  padding:10px 12px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  display:none;
  z-index:90;
  max-width: min(720px, calc(100% - 24px));
  text-align:center;
  font-weight:820;
  font-size:13px;
}

/* Footer */
.footer{
  margin-top:24px;
  padding:18px 0 28px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer__inner{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.footer__title{ font-weight: 860; }
.footer__meta{ text-align:right; }

/* ===== WhatsApp flotante ===== */
.fabWa{
  position: fixed;
  right: calc(16px + env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 999;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 0 14px;
  height: 52px;
  border-radius: 999px;
  background: rgba(34,197,94,.92);
  color: #ffffff;
  text-decoration:none;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 14px 28px rgba(0,0,0,.35);
}
.fabWa:hover{ background: rgba(34,197,94,.96); }
.fabWa__icon{
  width: 22px;
  height: 22px;
  color: currentColor;
}
.fabWa__icon path{ fill: currentColor; }
.fabWa__text{
  font-weight: 880;
  letter-spacing: .01em;
  font-size: 13px;
}

/* ===== Responsive ===== */
@media (max-width: 860px){
  .hero{ grid-template-columns: 1fr; }
  .hero__right{ order:-1; }
  .grid{ grid-template-columns: repeat(2, 1fr); }
  .footer__meta{ text-align:left; }
}
@media (max-width: 680px){
  .heroSwitch{ grid-template-columns: 1fr; }
  .fabWa{
    width: 56px;
    padding: 0;
    justify-content:center;
  }
  .fabWa__text{ display:none; }
}
@media (max-width: 560px){
  .grid{ grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .btn, .switchBtn, .navSeg__item{ transition:none; }
}
