/* =================== Brand variables (CMIC-based) =================== */
:root{
  --cmic-red: #9C2132;
  --cmic-gray: #444242;

  --cmic-black: #141414;
  --cmic-white: #ffffff;
  --cmic-bg: #f6f6f7;
  --cmic-border: rgba(20,20,20,.12);
  --cmic-muted: rgba(20,20,20,.72);

  --radius: 20px;
  --maxw: 1100px;

  --btn-radius: 999px;
  --btn-pad-y: 10px;
  --btn-pad-x: 16px;

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

/* =================== Base reset =================== */
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }

body{
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--cmic-bg);
  color: var(--cmic-black);
  line-height: 1.7;
}

.skip-link{
  position:absolute;
  left:-999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left:16px;
  top:16px;
  width:auto;
  height:auto;
  padding:10px 14px;
  border-radius: var(--btn-radius);
  background: var(--cmic-red);
  color: var(--cmic-white);
  z-index: 9999;
  outline: 3px solid rgba(156,33,50,.35);
  outline-offset: 2px;
}

/* =================== Utilities =================== */
.container{
  width: min(92%, var(--maxw));
  margin-inline: auto;
}
.lead{ font-size:1.1rem; color: var(--cmic-muted); }

/* =================== Header =================== */
.main-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;

  padding:10px 5vw;
  position: sticky;
  top: 0;
  z-index: 50;

  background: rgba(246,246,247,.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--cmic-border);
}

.brand{
  display:flex;
  align-items:center;
  height: 110px;
  width: clamp(220px, 24vw, 340px);
  flex: 0 0 auto;
}

.brand img{
  width: 170%;
  height: 170%;
  object-fit: contain;
  display: block;
}

@media (max-width: 820px){
  .main-header{ padding:10px 4vw; }
  .brand{ height: 56px; width: 240px; }
}

.header-nav ul{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin:0;
  padding:0;
}
.header-nav li{ list-style:none; margin:0; padding:0; }

/* =================== Buttons =================== */
.btn,
.header-nav a{
  display:inline-block;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--btn-radius);
  font-weight: 600;
  text-decoration:none;
  line-height: 1.15;

  border: 1px solid transparent;
  transition:
    transform .15s var(--ease),
    background-color .2s var(--ease),
    color .2s var(--ease),
    border-color .2s var(--ease),
    box-shadow .2s var(--ease);
}

.btn:hover,
.header-nav a:hover{
  transform: translateY(-1px);
}

.btn:focus-visible,
.header-nav a:focus-visible{
  outline: 3px solid rgba(156,33,50,.35);
  outline-offset: 3px;
}

.btn-primary{
  background: var(--cmic-red);
  color: var(--cmic-white);
  box-shadow: 0 10px 24px rgba(156,33,50,.18);
}
.btn-primary:hover{
  box-shadow: 0 14px 30px rgba(156,33,50,.28);
}

.btn-outline{
  border-color: var(--cmic-red);
  color: var(--cmic-red);
  background: transparent;
}
.btn-outline:hover{
  background: rgba(156,33,50,.08);
}

.btn-ghost{
  background: transparent;
  border-color: transparent;
  color: var(--cmic-black);
}
.btn-ghost:hover{
  background: rgba(20,20,20,.06);
}

.btn-pill{ border-radius: 9999px; }

/* =================== Hero =================== */
.hero{
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 22px;
  align-items: center;

  width: min(96%, 1200px);
  margin: 22px auto 28px;
}

.hero-media{
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--cmic-border);
  background: var(--cmic-white);
}
.hero-media img{
  display:block;
  width:100%;
  height:auto;
}

.hero-copy{
  padding: 18px 22px;
  border-left: 4px solid var(--cmic-red);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(156,33,50,.08), rgba(255,255,255,0));
}

.hero h1{
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  color: var(--cmic-red);
  letter-spacing: .2px;
}
.hero p{ margin: 0; color: var(--cmic-muted); }

/* =================== Sections (formal blocks) =================== */
.section-title{
  margin: 26px 0 8px;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: .2px;
}
.section-title .accent{ color: var(--cmic-red); }

.story p{ margin: 14px 0; }

.story p:first-of-type::first-letter{
  font-size: 3.0rem;
  line-height: 1;
  margin-right: 6px;
  float: left;
  color: var(--cmic-red);
  font-weight: 700;
}

/* =================== Cards grid =================== */
.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.card{
  background: var(--cmic-white);
  border: 1px solid var(--cmic-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 26px rgba(20,20,20,.06);
}
.card h3{ margin: 0 0 8px; }
.card p{ margin: 0; color: var(--cmic-muted); }

/* =================== Footer =================== */
.footer{
  margin-top: 50px;
  padding: 26px 5vw;
  text-align: center;
  border-top: 1px solid var(--cmic-border);
  background: var(--cmic-white);
}
.footer .copyright{
  margin: 0;
  color: rgba(20,20,20,.55);
}

/* =================== Responsive =================== */
@media (max-width: 900px){
  .hero{ grid-template-columns: 1fr; gap: 16px; }
  .grid{ grid-template-columns: 1fr; }
}

/* =================== Reduced motion =================== */
@media (prefers-reduced-motion: reduce){
  .btn, .header-nav a{ transition: none; }
  .btn:hover, .header-nav a:hover{ transform: none; }
}

.section{
  padding: 12px 0 10px;
}

/* ---------- Stats (4) + counters (3) ---------- */
.stats-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.stats-grid--3{
  grid-template-columns: repeat(3, 1fr);
}

.stat{
  text-align: center;
  background: var(--cmic-white);
  border: 1px solid var(--cmic-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 26px rgba(20,20,20,.06);
}

.stat-icon{
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(156,33,50,.08);
  color: var(--cmic-red);
}

.stat-icon svg{
  width: 28px;
  height: 28px;
  stroke: currentColor;
}

.stat-title{
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.stat-text{
  margin: 0;
  color: var(--cmic-muted);
  font-size: .95rem;
}

.stat-number{
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: .2px;
}

.stat-label{
  margin-top: 4px;
  font-size: .95rem;
  color: var(--cmic-muted);
}

.stat--compact{
  padding: 18px 14px;
}

/* ---------- Brands grid (4 columns) ---------- */
.brands-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.brand-card{
  text-align: left;
}

.brand-card-logo{
  width: 100%;
  height: 64px;
  object-fit: contain;
  display: block;
  margin-bottom: 10px;
}

.brand-kicker{
  margin: 0 0 6px;
  font-size: .88rem;
  color: rgba(20,20,20,.58);
}

/* ---------- Video section ---------- */
.video-actions{
  margin: 14px 0 16px;
  text-align: center;
}

.video-embed{
  border-radius: var(--radius);
  border: 1px solid var(--cmic-border);
  background: linear-gradient(180deg, rgba(20,20,20,.08), rgba(255,255,255,0));
  min-height: 220px;

  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  padding: 14px;
}

.video-placeholder-text{
  margin: 0;
  color: var(--cmic-muted);
  text-align: center;
  max-width: 60ch;
}

.video-embed iframe{
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius);
}

/* ---------- Split layout (Maestrías) ---------- */
.split-grid{
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  align-items: start;
}

.split-media{
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--cmic-border);
  background: var(--cmic-white);
  margin: 0;
}

.split-media img{
  display: block;
  width: 100%;
  height: auto;
}

.split-actions{
  margin-top: 14px;
}

/* ---------- Sponsors ---------- */
.sponsors-header{
  text-align: center;
  margin-bottom: 10px;
}

.anniversary-mark{
  width: min(280px, 80%);
  height: auto;
  display: block;
  margin: 0 auto 14px;
}

.sponsors-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  align-items: center;
  margin-top: 18px;
}

.sponsor{
  background: var(--cmic-white);
  border: 1px solid var(--cmic-border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 26px rgba(20,20,20,.06);
  display: grid;
  place-items: center;
}

.sponsor img{
  width: 100%;
  max-width: 240px;
  height: 70px;
  object-fit: contain;
  display: block;
}

/* ---------- CTA (Contacto) ---------- */
.cta{
  margin-top: 44px;
  padding: 56px 0;
  color: var(--cmic-white);
  background: linear-gradient(90deg, rgba(156,33,50,.70), var(--cmic-red));
}

.cta-inner h2{
  margin: 0;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.15;
  text-align: center;
}

.cta-actions{
  margin: 18px 0 10px;
  text-align: center;
}

.cta-note{
  margin: 0 auto 18px;
  text-align: center;
  max-width: 70ch;
  color: rgba(255,255,255,.85);
}

.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.contact-card{
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 16px;
  padding: 16px;
}

.contact-card h3{
  margin: 0 0 10px;
}

.contact-card p{
  margin: 0 0 8px;
  color: rgba(255,255,255,.92);
}

.map-placeholder{
  min-height: 180px;
  border-radius: 14px;
  background: rgba(20,20,20,.18);
  border: 1px dashed rgba(255,255,255,.35);
  display: grid;
  place-items: center;
  padding: 12px;
}

.map-placeholder p{
  margin: 0;
  text-align: center;
  color: rgba(255,255,255,.85);
}

.btn-dark{
  background: var(--cmic-black);
  color: var(--cmic-white);
  box-shadow: 0 10px 24px rgba(20,20,20,.22);
}
.btn-dark:hover{
  box-shadow: 0 14px 30px rgba(20,20,20,.28);
}

/* ---------- Floating back-to-top ---------- */
.to-top{
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;

  border-radius: 12px;
  background: var(--cmic-red);
  color: var(--cmic-white);
  text-decoration: none;

  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 12px 26px rgba(20,20,20,.18);
  z-index: 60;

  transition:
    transform .15s var(--ease),
    box-shadow .2s var(--ease),
    background-color .2s var(--ease);
}

.to-top:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(20,20,20,.22);
}

.to-top:focus-visible{
  outline: 3px solid rgba(255,255,255,.55);
  outline-offset: 3px;
}

/* ---------- Responsive updates ---------- */
@media (max-width: 980px){
  .brands-grid{ grid-template-columns: repeat(2, 1fr); }
  .stats-grid{ grid-template-columns: repeat(2, 1fr); }
  .stats-grid--3{ grid-template-columns: 1fr; }
  .split-grid{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 520px){
  .brands-grid{ grid-template-columns: 1fr; }
  .stats-grid{ grid-template-columns: 1fr; }
}

.map-embed{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
}

.map-embed iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* =================== Footer =================== */
.footer{
  margin-top: 50px;
  padding: 28px 5vw 22px;
  text-align: center;
  border-top: 1px solid var(--cmic-border);
  background: var(--cmic-white);
}

.footer-contact__inner{
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px 24px;
  align-items: center;
  justify-content: center;
  max-width: 860px;
  margin: 0 auto 18px;
  text-align: left;
}

.footer-contact__logo{
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-contact__logo img{
  display: block;
  width: auto;
  height: 72px;
  max-width: min(220px, 100%);
  object-fit: contain;
}

.footer-contact__info{
  display: grid;
  gap: 6px;
}

.footer-contact__label{
  margin: 0;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cmic-red);
}

.footer-contact__info p{
  margin: 0;
  color: var(--cmic-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.footer-contact__info strong{
  color: var(--cmic-black);
  font-weight: 700;
}

.footer-contact__info a{
  color: inherit;
  text-decoration: none;
}

.footer-contact__info a:hover,
.footer-contact__info a:focus{
  text-decoration: underline;
}

.footer .copyright{
  margin: 0;
  color: rgba(20,20,20,.55);
}

@media (max-width: 700px){
  .footer{
    padding: 24px 5vw 20px;
  }

  .footer-contact__inner{
    grid-template-columns: 1fr;
    text-align: center;
    gap: 14px;
  }

  .footer-contact__logo img{
    height: 60px;
    margin-inline: auto;
  }
}