/* ============================================================
   CEMI Core v1.2.74 — Home/header refinado
   Objetivo: recuperar tipografía CEMI, header inteligente y
   buscador protagonista sin romper la estructura del v1.2.73.
   ============================================================ */

:root{
  --cemi-74-dark:#1A2231;
  --cemi-74-ink:#0F172A;
  --cemi-74-pink:#D7266B;
  --cemi-74-pink-2:#C81768;
  --cemi-74-white:#FFFFFF;
}

/* ---------- Header fijo inteligente ---------- */
#cemi-hdr.cemi-hdr--fixed{
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:0!important;
  transform:translateY(0);
  transition:transform .28s ease, background .28s ease, box-shadow .28s ease, backdrop-filter .28s ease!important;
  will-change:transform;
}
#cemi-hdr.cemi-hdr--fixed.is-hidden-on-scroll:not(.menu-open):not(.search-open){
  transform:translateY(calc(-100% - 8px));
}
#cemi-hdr.cemi-hdr--fixed.is-at-top,
body.cemi-home-template #cemi-hdr.cemi-hdr--fixed:not(.is-scrolled){
  background:rgba(26,34,49,.26)!important;
  box-shadow:none!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
  backdrop-filter:blur(10px)!important;
  -webkit-backdrop-filter:blur(10px)!important;
}
#cemi-hdr.cemi-hdr--fixed.is-scrolled,
#cemi-hdr.cemi-hdr--fixed.is-visible-on-scroll,
#cemi-hdr.cemi-hdr--fixed.search-open,
#cemi-hdr.cemi-hdr--fixed.menu-open{
  background:rgba(26,34,49,.88)!important;
  box-shadow:0 14px 42px rgba(0,0,0,.22)!important;
  border-bottom:1px solid rgba(255,255,255,.10)!important;
  backdrop-filter:blur(16px)!important;
  -webkit-backdrop-filter:blur(16px)!important;
}

/* ---------- Home: tipografía CEMI, no editorial serif ---------- */
body.cemi-home-template .ch2,
body.cemi-home-page .ch2,
#cemi-home-v2.ch2{
  font-family:Montserrat,system-ui,-apple-system,Segoe UI,sans-serif!important;
}
body.cemi-home-template .ch2 h1,
body.cemi-home-template .ch2 h2,
body.cemi-home-template .ch2 h3,
body.cemi-home-page .ch2 h1,
body.cemi-home-page .ch2 h2,
body.cemi-home-page .ch2 h3,
#cemi-home-v2.ch2 h1,
#cemi-home-v2.ch2 h2,
#cemi-home-v2.ch2 h3{
  font-family:Montserrat,system-ui,-apple-system,Segoe UI,sans-serif!important;
  font-style:normal!important;
}
body.cemi-home-template .ch2 h1,
body.cemi-home-page .ch2 h1,
#cemi-home-v2.ch2 h1{
  font-weight:900!important;
  letter-spacing:-.07em!important;
  line-height:.88!important;
  text-transform:none;
  max-width:1050px!important;
  text-shadow:0 18px 60px rgba(0,0,0,.34);
}
body.cemi-home-template .ch2 h1 em,
body.cemi-home-template .ch2 h2 em,
body.cemi-home-page .ch2 h1 em,
body.cemi-home-page .ch2 h2 em,
#cemi-home-v2.ch2 h1 em,
#cemi-home-v2.ch2 h2 em{
  font-family:inherit!important;
  font-style:normal!important;
  color:#fff!important;
  position:relative;
  white-space:nowrap;
}
body.cemi-home-template .ch2 h1 em::after,
body.cemi-home-template .ch2 h2 em::after,
body.cemi-home-page .ch2 h1 em::after,
body.cemi-home-page .ch2 h2 em::after,
#cemi-home-v2.ch2 h1 em::after,
#cemi-home-v2.ch2 h2 em::after{
  content:"";
  position:absolute;
  left:.03em;right:.03em;bottom:.05em;
  height:.18em;
  border-radius:999px;
  background:linear-gradient(90deg,var(--cemi-74-pink),rgba(215,38,107,.30));
  z-index:-1;
}
body.cemi-home-template .ch2-lead h2,
body.cemi-home-template .ch2-why-copy h2,
body.cemi-home-template .ch2-cta h2,
body.cemi-home-page .ch2-lead h2,
body.cemi-home-page .ch2-why-copy h2,
body.cemi-home-page .ch2-cta h2,
#cemi-home-v2 .ch2-lead h2,
#cemi-home-v2 .ch2-why-copy h2,
#cemi-home-v2 .ch2-cta h2{
  font-weight:850!important;
  letter-spacing:-.055em!important;
}

/* ---------- Hero: buscador como protagonista real ---------- */
body.cemi-home-template #cemi-home-v2 .ch2-hero,
body.cemi-home-page #cemi-home-v2 .ch2-hero{
  min-height:clamp(720px,92vh,980px)!important;
  align-items:center!important;
  justify-content:center!important;
}
body.cemi-home-template #cemi-home-v2 .ch2-hero-inner,
body.cemi-home-page #cemi-home-v2 .ch2-hero-inner{
  padding-top:clamp(130px,16vh,190px)!important;
  padding-bottom:clamp(70px,10vh,120px)!important;
}
body.cemi-home-template #cemi-home-v2 .ch2-hero-sub,
body.cemi-home-page #cemi-home-v2 .ch2-hero-sub{
  max-width:760px!important;
  font-size:clamp(17px,1.55vw,23px)!important;
  line-height:1.52!important;
  color:rgba(255,255,255,.78)!important;
}
body.cemi-home-template #cemi-home-v2 .ch2-search,
body.cemi-home-page #cemi-home-v2 .ch2-search{
  width:min(100%,1360px)!important;
  max-width:1360px!important;
  margin-top:clamp(30px,4vw,54px)!important;
  grid-template-columns:210px minmax(320px,1.6fr) minmax(210px,.85fr) minmax(220px,.85fr) 86px!important;
  min-height:88px!important;
  padding:12px!important;
  border-radius:30px!important;
  background:rgba(9,14,24,.78)!important;
  border:1px solid rgba(255,255,255,.20)!important;
  box-shadow:0 34px 110px rgba(0,0,0,.46), 0 0 0 1px rgba(215,38,107,.12) inset!important;
  backdrop-filter:blur(26px)!important;
  -webkit-backdrop-filter:blur(26px)!important;
}
body.cemi-home-template #cemi-home-v2 .ch2-search-tabs,
body.cemi-home-page #cemi-home-v2 .ch2-search-tabs{
  border-radius:22px!important;
  padding:6px!important;
  background:rgba(255,255,255,.075)!important;
  border:1px solid rgba(255,255,255,.08)!important;
}
body.cemi-home-template #cemi-home-v2 .ch2-search-tabs button,
body.cemi-home-page #cemi-home-v2 .ch2-search-tabs button{
  height:62px!important;
  border-radius:17px!important;
  font-weight:850!important;
  font-size:14px!important;
}
body.cemi-home-template #cemi-home-v2 .ch2-search-field,
body.cemi-home-page #cemi-home-v2 .ch2-search-field{
  border-radius:22px!important;
  padding:14px 22px!important;
  background:rgba(255,255,255,.045)!important;
}
body.cemi-home-template #cemi-home-v2 .ch2-search-field span,
body.cemi-home-template #cemi-home-v2 .ch2-search-field label,
body.cemi-home-page #cemi-home-v2 .ch2-search-field span,
body.cemi-home-page #cemi-home-v2 .ch2-search-field label{
  display:block!important;
  font-size:11px!important;
  font-weight:800!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
  color:rgba(255,255,255,.46)!important;
  margin-bottom:6px!important;
}
body.cemi-home-template #cemi-home-v2 .ch2-search input,
body.cemi-home-template #cemi-home-v2 .ch2-search select,
body.cemi-home-page #cemi-home-v2 .ch2-search input,
body.cemi-home-page #cemi-home-v2 .ch2-search select{
  font-size:16px!important;
  font-weight:700!important;
  color:#fff!important;
}
body.cemi-home-template #cemi-home-v2 .ch2-search-submit,
body.cemi-home-page #cemi-home-v2 .ch2-search-submit{
  width:74px!important;
  min-height:64px!important;
  border-radius:22px!important;
  background:linear-gradient(135deg,var(--cemi-74-pink),var(--cemi-74-pink-2))!important;
  box-shadow:0 18px 44px rgba(215,38,107,.34)!important;
}
body.cemi-home-template #cemi-home-v2 .ch2-search-submit svg,
body.cemi-home-page #cemi-home-v2 .ch2-search-submit svg{
  width:25px!important;
  height:25px!important;
}
body.cemi-home-template #cemi-home-v2 .ch2-chips,
body.cemi-home-page #cemi-home-v2 .ch2-chips{
  transform:translateY(-42px)!important;
  padding-top:0!important;
  position:relative;
  z-index:4;
}
body.cemi-home-template #cemi-home-v2 .ch2-chip,
body.cemi-home-page #cemi-home-v2 .ch2-chip{
  font-weight:700!important;
  background:rgba(255,255,255,.92)!important;
  color:#1A2231!important;
  border-color:rgba(15,23,42,.08)!important;
  box-shadow:0 10px 30px rgba(0,0,0,.09)!important;
}
body.cemi-home-template #cemi-home-v2 .ch2-chip.is-pink,
body.cemi-home-page #cemi-home-v2 .ch2-chip.is-pink{
  background:var(--cemi-74-pink)!important;
  color:#fff!important;
}

@media (min-width:1600px){
  body.cemi-home-template #cemi-home-v2 .ch2-search,
  body.cemi-home-page #cemi-home-v2 .ch2-search{
    width:min(100%,1480px)!important;
    max-width:1480px!important;
    grid-template-columns:230px minmax(380px,1.7fr) minmax(240px,.9fr) minmax(240px,.9fr) 92px!important;
  }
  body.cemi-home-template #cemi-home-v2 .ch2-hero h1,
  body.cemi-home-page #cemi-home-v2 .ch2-hero h1{
    font-size:clamp(76px,5.8vw,122px)!important;
  }
}

@media (max-width:900px){
  body.cemi-home-template #cemi-home-v2 .ch2-hero,
  body.cemi-home-page #cemi-home-v2 .ch2-hero{
    min-height:auto!important;
    align-items:stretch!important;
  }
  body.cemi-home-template #cemi-home-v2 .ch2-hero-inner,
  body.cemi-home-page #cemi-home-v2 .ch2-hero-inner{
    padding-top:110px!important;
    padding-bottom:54px!important;
  }
  body.cemi-home-template #cemi-home-v2 .ch2-hero h1,
  body.cemi-home-page #cemi-home-v2 .ch2-hero h1{
    font-size:clamp(42px,12vw,72px)!important;
    line-height:.92!important;
    letter-spacing:-.06em!important;
  }
  body.cemi-home-template #cemi-home-v2 .ch2-search,
  body.cemi-home-page #cemi-home-v2 .ch2-search{
    grid-template-columns:1fr!important;
    min-height:0!important;
    padding:12px!important;
    border-radius:26px!important;
    gap:10px!important;
  }
  body.cemi-home-template #cemi-home-v2 .ch2-search-tabs,
  body.cemi-home-page #cemi-home-v2 .ch2-search-tabs{
    width:100%!important;
  }
  body.cemi-home-template #cemi-home-v2 .ch2-search-tabs button,
  body.cemi-home-page #cemi-home-v2 .ch2-search-tabs button{
    flex:1!important;
    height:52px!important;
  }
  body.cemi-home-template #cemi-home-v2 .ch2-search-field,
  body.cemi-home-page #cemi-home-v2 .ch2-search-field{
    padding:14px 16px!important;
  }
  body.cemi-home-template #cemi-home-v2 .ch2-search-submit,
  body.cemi-home-page #cemi-home-v2 .ch2-search-submit{
    width:100%!important;
    min-height:56px!important;
  }
  body.cemi-home-template #cemi-home-v2 .ch2-chips,
  body.cemi-home-page #cemi-home-v2 .ch2-chips{
    transform:none!important;
    padding-top:18px!important;
  }
}
