/* =====================
   IBG HOME PAGE STYLES
   Prefijo: home-
   Estilos compartidos (inner, section, hero, eyebrow, fade-up,
   buttons) → ibg-base.css
   ===================== */

.home-page {
  font-family: system-ui, sans-serif;
}

/* ----------------------------------------------------------
   Tipografía — override con alta especificidad contra Elementor
   Solo necesario para clases h1/h2/p/a que el kit global pisa.
   Las clases ibg- quedan correctas desde ibg-base.css en la
   mayoría de casos; acá solo blindamos los heading puntales.
---------------------------------------------------------- */
.page-template-page-home .home-page h1.ibg-hero-title {
  font-family: inherit;
  color: #fff;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-transform: none;
}

.page-template-page-home .home-page h2.ibg-section-title,
.page-template-page-home .home-page h2.home-mision-title,
.page-template-page-home .home-page h2.home-redes-title {
  font-family: inherit;
  color: #3E3838;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
}

.page-template-page-home .home-page h2.home-mision-title {
  font-size: 24px;
  line-height: 1.2;
}

.page-template-page-home .home-page h2.home-redes-title {
  font-size: 22px;
  line-height: 1.2;
}

/* font-family reset general */
.page-template-page-home .home-page .ibg-hero-title,
.page-template-page-home .home-page .ibg-section-title,
.page-template-page-home .home-page .home-mision-title,
.page-template-page-home .home-page .home-redes-title,
.page-template-page-home .home-page .home-serie-title,
.page-template-page-home .home-page .home-red-card-name,
.page-template-page-home .home-page .home-bento-overlay-text {
  font-family: inherit;
  letter-spacing: inherit;
}

.page-template-page-home .home-page .home-serie-title,
.page-template-page-home .home-page .home-red-card-name {
  color: #3E3838;
}

.page-template-page-home .home-page .home-serie-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.page-template-page-home .home-page .home-faq-q {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.page-template-page-home .home-page .home-red-card-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.page-template-page-home .home-page .home-bento-overlay-text {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.page-template-page-home .home-page p.ibg-hero-sub,
.page-template-page-home .home-page p.home-mision-body,
.page-template-page-home .home-page .home-red-card-handle {
  font-family: inherit;
}

.page-template-page-home .home-page a.ibg-btn-white,
.page-template-page-home .home-page a.ibg-btn-ghost-white,
.page-template-page-home .home-page a.home-mision-link,
.page-template-page-home .home-page a.home-series-ver-todas,
.page-template-page-home .home-page a.home-red-card,
.page-template-page-home .home-page a.home-serie-card {
  font-family: inherit;
  text-decoration: none;
}


/* =====================
   VIDEO — dentro del hero (solo home tiene video de fondo)
   ===================== */

.home-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.home-hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* =====================
   BENTO GRID
   ===================== */

.home-bento {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 220px 220px;
  gap: 10px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.home-bento-cell {
  overflow: hidden;
  position: relative;
  background: #e0ddd8;
}
.home-bento-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-bento-cell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-bento-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s;
}
.home-bento-cell:hover::after {
  background: rgba(0,0,0,0.08);
}
.home-bento-cell--large {
  grid-row: span 2;
  background: #c8d5cc;
}
.home-bento-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(2,69,85,0.75));
  z-index: 1;
}
.home-bento-overlay-tag {
  font-size: 10px;
  font-weight: 700;
  color: #FF5C1B;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 0.3rem;
}
.home-bento-overlay-text {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}


/* =====================
   MISIÓN
   ===================== */

.home-mision {
  max-width: 580px;
}
.home-mision-title {
  font-size: 24px;
  font-weight: 700;
  color: #3E3838;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.home-mision-body {
  font-size: 16px;
  color: #555;
  line-height: 1.75;
  margin-bottom: 0.5rem;
}
.home-mision-founded {
  font-size: 13px;
  color: #999;
  margin-bottom: 1.25rem;
}
.home-mision-link {
  font-size: 13px;
  font-weight: 600;
  color: #3E3838;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid #e8e8e8;
  padding-bottom: 2px;
  transition: border-color 0.15s, color 0.15s;
}
.home-mision-link:hover {
  border-color: #FF5C1B;
  color: #FF5C1B;
}


/* =====================
   SERIES
   ===================== */

.home-series-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  margin-top: 0.5rem;
}
.home-series-ver-todas {
  font-size: 13px;
  font-weight: 600;
  color: #3E3838;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid #e8e8e8;
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.home-series-ver-todas:hover {
  color: #FF5C1B;
  border-color: #FF5C1B;
}

.home-series-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

.home-serie-card {
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  border: 0.5px solid #e8e8e8;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  background: #fff;
}
.home-serie-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  border-color: #ddd;
}

.home-serie-img {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #024555;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-serie-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-serie-card--featured .home-serie-img {
  aspect-ratio: 16/10;
}
.home-serie-card--featured .home-serie-body {
  padding: 1.1rem 1.25rem;
}
.home-serie-card--featured .home-serie-title {
  font-size: 17px;
}

.home-serie-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #FF5C1B;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 3px 10px;
  border-radius: 100px;
  z-index: 1;
}

.home-serie-body {
  padding: 1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: #fff;
}

.home-serie-eyebrow {
  font-size: 10px;
  font-weight: 700;
  color: #FF5C1B;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.home-serie-title {
  font-size: 15px;
  font-weight: 700;
  color: #3E3838;
  line-height: 1.3;
}

.home-serie-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 0.5rem;
}

.home-serie-count {
  font-size: 12px;
  font-weight: 500;
  color: #2563EB;
  background: #EFF6FF;
  border-radius: 100px;
  padding: 2px 9px;
}

.home-serie-year {
  font-size: 12px;
  color: #bbb;
}


/* =====================
   PRIMERA VISITA — CTA hacia /visitanos
   ===================== */

.home-visit-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.home-visit-cta-desc {
  font-size: 16px;
  color: #555;
  line-height: 1.7;
  margin: 0.5rem 0 1.5rem;
  max-width: 420px;
}

.home-visit-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FF5C1B;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  min-height: 44px;
}
.home-visit-cta-btn:hover { opacity: 0.9; transform: translateY(-1px); color: #fff; }

.home-visit-chips {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.home-visit-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  background: #fff;
  border: 0.5px solid #e8e8e8;
  border-radius: 100px;
  padding: 0.55rem 1rem;
  white-space: nowrap;
}

.home-visit-chip svg {
  flex-shrink: 0;
}


/* =====================
   REDES SOCIALES
   ===================== */

.home-redes-title {
  font-size: 22px;
  font-weight: 700;
  color: #3E3838;
  letter-spacing: -0.02em;
}
.home-redes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.home-red-card {
  border: 0.5px solid #e8e8e8;
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  background: #fff;
}
.home-red-card:hover {
  transform: translateY(-2px);
}
.home-red-card--ig:hover {
  border-color: #E1306C;
  box-shadow: 0 4px 20px rgba(225,48,108,0.1);
}
.home-red-card--yt:hover {
  border-color: #FF0000;
  box-shadow: 0 4px 20px rgba(255,0,0,0.08);
}
.home-red-card--fb:hover {
  border-color: #1877F2;
  box-shadow: 0 4px 20px rgba(24,119,242,0.1);
}
.home-red-card-icon--ig,
.home-red-card-icon--yt,
.home-red-card-icon--fb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-red-card-icon--ig { background: #FFF0F5; }
.home-red-card-icon--yt { background: #FFF0F0; }
.home-red-card-icon--fb { background: #EFF5FF; }
.home-red-card-name {
  font-size: 16px;
  font-weight: 700;
  color: #3E3838;
}
.home-red-card-handle {
  font-size: 13px;
  color: #999;
  margin-top: 2px;
}
.home-red-card-cta {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}
.home-red-card-cta--ig { color: #E1306C; }
.home-red-card-cta--yt { color: #FF0000; }
.home-red-card-cta--fb { color: #1877F2; }


/* =====================
   RESPONSIVE — mobile ≤ 640px
   Los estilos compartidos (hero, sections, inner) → ibg-base.css
   ===================== */

@media (max-width: 640px) {
  .page-template-page-home .home-page h1.ibg-hero-title {
    font-size: 30px;
  }
  .page-template-page-home .home-page h2.ibg-section-title {
    font-size: 22px;
  }
  .page-template-page-home .home-page h2.home-redes-title {
    font-size: 20px;
  }
  .page-template-page-home .home-page h2.home-mision-title {
    font-size: 20px;
  }

  .sermo-widget-featured {
    grid-template-columns: 1fr;
  }
  .sermo-widget-img {
    aspect-ratio: 16/9;
  }
  .sermo-widget-body {
    padding: 1rem 1.1rem 1.1rem;
    border-left: none;
    border-top: 0.5px solid #f0f0f0;
  }
  .sermo-widget-title {
    font-size: 18px;
  }

  .home-bento {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 150px 150px 150px;
  }
  .home-bento-cell--large {
    grid-row: span 1;
    grid-column: span 2;
  }
  .home-bento-overlay {
    padding: 1rem;
  }
  .home-bento-overlay-text {
    font-size: 14px;
  }

  .home-mision-title {
    font-size: 20px;
  }
  .home-mision-body {
    font-size: 15px;
  }

  /* ibg-location-grid → responsive en ibg-base.css */

  .home-series-grid {
    grid-template-columns: 1fr;
  }
  .home-serie-card--featured .home-serie-img {
    aspect-ratio: 16/9;
  }
  .home-series-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* Primera visita CTA → apila en mobile */
  .home-visit-cta {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .home-visit-chips {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .home-redes-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .home-red-card {
    flex-direction: row;
    align-items: center;
    padding: 1rem 1.25rem;
    gap: 1rem;
  }
  .home-red-card > div:nth-child(2) {
    min-width: 0;
    flex: 1;
  }
  .home-red-card-handle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .home-red-card-icon--ig,
  .home-red-card-icon--yt,
  .home-red-card-icon--fb {
    flex-shrink: 0;
  }
  .home-red-card-cta {
    margin-top: 0;
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
  }
}
