/* ==========================================================
   GRUPO 8 BJ · PARA FAMILIAS
   Base: assets/css/styles.css
   ========================================================== */

.familias-page{
  overflow-x:hidden;
  background:#fff;
  color:var(--text);
}

.familias-page main{overflow:hidden}

.familias-page .hero-header.header-hidden{transform:translateX(-50%)!important;opacity:1!important}

/* HERO */
.families-hero{
  position:relative;
  min-height:560px;
  overflow:hidden;
  border-radius:0 0 28px 28px;
  background:#176ED6;
}

.families-hero-photo{
  position:absolute;
  inset:0;
  background-image:url("../img/preparados-para-la-vida.png");
  background-size:cover;
  background-position:center 48%;
}

.families-hero-overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(
    90deg,
    rgba(19,74,154,.98) 0%,
    rgba(24,91,181,.93) 30%,
    rgba(30,104,194,.72) 45%,
    rgba(28,97,181,.30) 60%,
    rgba(28,97,181,.05) 76%,
    rgba(28,97,181,0) 100%
  );
}

.families-hero-inner{
  position:relative;
  z-index:2;
  min-height:540px;
  display:flex;
  align-items:center;
  padding-top:122px;
  padding-bottom:54px;
}

.families-hero-copy{max-width:940px;color:#fff;margin-bottom:28px;}

.families-hero-copy h1{
  width:max-content;
  max-width:940px;
  margin:8px 0 20px;
  color:#fff;
  font-size:clamp(3.1rem,4.25vw,4.4rem);
  line-height:.94;
  letter-spacing:-.052em;
  white-space:nowrap;
}

.families-hero-copy h1 span{
  display:block;
  color:var(--yellow);
}

.families-hero-copy p{
  max-width:610px;
  margin:0;
  color:#fff;
  font-size:1.05rem;
  line-height:1.6;
}

/* BASE DE SECCIONES */
.families-section{padding:78px 0}
.families-heading{
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(360px,.72fr);
  gap:78px;
  align-items:end;
  margin-bottom:38px;
}

.families-heading h2,
.prepared-copy h2,
.communication-grid h2,
.faq-heading-row h2{
  margin:0;
  color:var(--ink);
  font-size:clamp(2.55rem,3.7vw,3.8rem);
  line-height:.95;
  letter-spacing:-.045em;
}

.families-heading h2 span,
.prepared-copy h2 span,
.communication-grid h2 span,
.faq-heading-row h2 span{color:var(--blue-bright)}

.families-heading>p{
  max-width:560px;
  margin:0 0 3px;
  font-size:1rem;
  line-height:1.62;
}

.compact-heading{margin-bottom:34px}

/* RESPALDO */
.families-support{background:linear-gradient(180deg,#fff 0%,#F7FBFF 100%)}

.family-support-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}

.family-support-card{
  position:relative;
  min-height:265px;
  padding:26px 22px 24px;
  overflow:hidden;
  border:1px solid rgba(31,91,177,.08);
  border-radius:24px;
  background:#fff;
  box-shadow:0 16px 34px rgba(24,53,108,.08);
}

.family-support-card::after{
  content:"";
  position:absolute;
  inset:auto 0 0;
  height:6px;
}

.family-support-icon{
  width:66px;
  height:66px;
  display:grid;
  place-items:center;
  margin-bottom:19px;
  border-radius:20px;
}

.family-support-icon svg{
  width:32px;
  height:32px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.family-support-card h3{
  margin:0 0 9px;
  color:var(--ink);
  font-size:1.08rem;
  line-height:1.16;
}

.family-support-card p{
  margin:0;
  font-size:.88rem;
  line-height:1.55;
}

.support-sisas .family-support-icon{color:#176ED6;background:#E8F3FF}
.support-insurance .family-support-icon{color:#0D8A61;background:#E5F7EF}
.support-safe .family-support-icon{color:#B37A00;background:#FFF2C4}
.support-protocols .family-support-icon{color:#6D58D9;background:#EFEAFF}
.support-sisas::after{background:#2A7BDD}
.support-insurance::after{background:#22AD79}
.support-safe::after{background:#F9CA32}
.support-protocols::after{background:#806CE6}

/* SEGURIDAD / PREPARACION */
.families-prepared{background:#fff}

.prepared-grid{
  display:grid;
  grid-template-columns:minmax(320px,.82fr) minmax(0,1.18fr);
  gap:86px;
  align-items:center;
}

.prepared-copy{max-width:510px}
.prepared-copy p{margin:18px 0 0;font-size:1rem;line-height:1.65}

.prepared-steps{position:relative;display:grid;gap:0}

.prepared-steps::before{
  content:"";
  position:absolute;
  top:32px;
  bottom:32px;
  left:25px;
  width:2px;
  background:linear-gradient(#C9DFF7,#D8E8F7);
}

.prepared-steps article{
  position:relative;
  display:grid;
  grid-template-columns:54px 1fr;
  gap:18px;
  align-items:start;
  padding:16px 0;
}

.prepared-steps article>span{
  position:relative;
  z-index:2;
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border:6px solid #fff;
  border-radius:50%;
  color:#17498F;
  background:#DDEEFF;
  font-family:"Bricolage Grotesque",sans-serif;
  font-size:.8rem;
  font-weight:800;
  box-shadow:0 8px 18px rgba(24,53,108,.08);
}

.prepared-steps h3{margin:3px 0 4px;font-size:1rem}
.prepared-steps p{margin:0;font-size:.86rem;line-height:1.5}

/* REGISTRO */
.families-registration{background:#F3F9FF}

.registration-steps{
  position:relative;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
  margin:0;
  padding:0;
  list-style:none;
}

.registration-steps::before{
  content:"";
  position:absolute;
  top:29px;
  left:9%;
  right:9%;
  height:3px;
  border-radius:999px;
  background:linear-gradient(90deg,#F9CA32,#63A6E9,#42BE8D,#2B76D5);
  opacity:.72;
}

.registration-steps li{
  position:relative;
  z-index:1;
  padding-top:0;
}

.step-number{
  width:60px;
  height:60px;
  display:grid;
  place-items:center;
  margin-bottom:18px;
  border:6px solid #F3F9FF;
  border-radius:50%;
  color:#173A8C;
  background:#fff;
  font-family:"Bricolage Grotesque",sans-serif;
  font-size:1rem;
  font-weight:800;
  box-shadow:0 10px 24px rgba(24,53,108,.11);
}

.registration-steps h3{margin:0 0 6px;font-size:1.02rem}
.registration-steps p{margin:0;max-width:235px;font-size:.86rem;line-height:1.5}

/* COMUNICACION */
.families-communication{
  position:relative;
  overflow:hidden;
  background:#fff;
}

.families-communication::after{
  content:"";
  position:absolute;
  right:-70px;
  bottom:-100px;
  width:300px;
  height:300px;
  border:3px dashed #D8E9F8;
  border-radius:50%;
  opacity:.65;
}

.communication-grid{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:minmax(0,.85fr) minmax(360px,1fr);
  gap:82px;
  align-items:center;
}

.communication-copy{
  padding:32px 34px;
  border-left:5px solid var(--yellow);
  border-radius:0 22px 22px 0;
  background:#F8FBFF;
}

.communication-copy p{margin:0;font-size:1rem;line-height:1.65}
.communication-copy p+p{margin-top:13px}

/* FAQ */
.families-faq{background:linear-gradient(180deg,#F7FBFF 0%,#fff 100%)}
.faq-heading-row{margin-bottom:30px}
.faq-heading-row>div{max-width:760px}

.faq-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px 18px;
}

.faq-item{
  border:1px solid #E0EAF6;
  border-radius:18px;
  background:#fff;
  box-shadow:0 8px 20px rgba(24,53,108,.05);
}

.faq-item summary{
  position:relative;
  padding:19px 52px 19px 20px;
  cursor:pointer;
  color:var(--ink);
  font-family:"Bricolage Grotesque",sans-serif;
  font-size:.98rem;
  font-weight:750;
  line-height:1.3;
  list-style:none;
}

.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::after{
  content:"+";
  position:absolute;
  top:50%;
  right:19px;
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#176ED6;
  background:#EEF6FF;
  transform:translateY(-50%);
  font-size:1.15rem;
  line-height:1;
}
.faq-item[open] summary::after{content:"−"}
.faq-item p{margin:0;padding:0 20px 20px;font-size:.89rem;line-height:1.55}

/* CTA final: deja el componente global, solo afina el span */
.familias-page .visit-cta h2 span{color:var(--yellow)}
.familias-page .visit-secondary{color:#fff;border-color:rgba(255,255,255,.72)}

/* RESPONSIVE */
@media(max-width:1050px){
  .families-heading,
  .prepared-grid,
  .communication-grid{grid-template-columns:1fr;gap:28px}
  .families-heading>p{max-width:680px}
  .family-support-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .prepared-copy{max-width:700px}
  .registration-steps{grid-template-columns:repeat(2,minmax(0,1fr));gap:34px 24px}
  .registration-steps::before{display:none}
  .communication-copy{max-width:760px}
  .families-hero-copy{ max-width:720px;}

  .families-hero-copy h1{
    width:auto;
    max-width:720px;
    white-space:normal;
  }
}

@media(max-width:720px){
  .families-hero{min-height:650px;border-radius:0 0 20px 20px}
  .families-hero-photo{background-position:62% center}
  .families-hero-overlay{
    background:linear-gradient(180deg,rgba(26,78,151,.08) 0 23%,rgba(23,90,182,.82) 48%,rgba(20,79,166,.98) 72%);
  }
  .families-hero-inner{min-height:650px;align-items:flex-end;padding:330px 0 48px}
  .families-hero-copy h1{font-size:clamp(2.65rem,11vw,3.55rem)}
  .families-hero-copy p{font-size:.96rem}

  .families-section{padding:58px 0}
  .families-heading h2,
  .prepared-copy h2,
  .communication-grid h2,
  .faq-heading-row h2{font-size:clamp(2.3rem,10vw,3rem)}

  .family-support-grid{grid-template-columns:1fr}
  .family-support-card{min-height:unset}
  .registration-steps{grid-template-columns:1fr}
  .faq-grid{grid-template-columns:1fr}
  .communication-copy{padding:25px 22px}
}

@media(max-width:480px){
  
  .prepared-steps article{grid-template-columns:50px 1fr;gap:14px}
  .prepared-steps article>span{width:48px;height:48px}
}
@media (max-width: 720px) {
  .familias-page .registration-steps {
    grid-template-columns: 1fr;
    row-gap: 22px;
  }

  .familias-page .registration-steps > li {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    column-gap: 14px;
    align-items: start;
  }

  .familias-page .registration-steps .step-number {
    width: 54px;
    height: 54px;
    margin-bottom: 0;
  }

  .familias-page .registration-steps li > div {
    min-width: 0;
  }

  .familias-page .registration-steps p {
    max-width: none;
  }
}