/* ==========================================================
   IBG BASE — Estilos compartidos entre todos los templates
   Prefijo: ibg-
   Este archivo se encola en TODOS los page templates IBG.
   Los templates específicos (home.css, visitanos.css, etc.)
   solo definen lo que difiere de esta base.
   ========================================================== */

*, *::before, *::after { box-sizing: border-box; }


/* ----------------------------------------------------------
   Contenedor inner compartido
---------------------------------------------------------- */
.ibg-inner {
  max-width: 896px;
  margin: 0 auto;
  padding: 0 2rem;
}


/* ----------------------------------------------------------
   Secciones base
---------------------------------------------------------- */
.ibg-section {
  background: #fff;
  padding: 3.5rem 0;
  border-bottom: 0.5px solid #e8e0d8;
}

.ibg-section--gray {
  background: #F5F4F0;
  border-top: 0.5px solid #e8e0d8;
  border-bottom: 0.5px solid #e8e0d8;
}

.ibg-section:last-of-type {
  border-bottom: none;
}

.ibg-section-header {
  margin-bottom: 2rem;
}

.ibg-section-desc {
  font-size: 16px;
  color: #555;
  margin: 0;
  line-height: 1.7;
}


/* ----------------------------------------------------------
   Eyebrow (naranja por defecto; override blanco en hero
   de visitanos vía visitanos.css)
---------------------------------------------------------- */
.ibg-section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: #FF5C1B;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.6rem;
}

.ibg-section-eyebrow-line {
  width: 20px;
  height: 1.5px;
  background: #FF5C1B;
  flex-shrink: 0;
}

/* Título de sección compartido */
.ibg-section-title {
  font-size: 28px;
  font-weight: 700;
  color: #3E3838;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}


/* ----------------------------------------------------------
   Animación fade-up (IntersectionObserver)
   JS activa .ibg-visible cuando el elemento entra en viewport
---------------------------------------------------------- */
.ibg-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.ibg-fade-up.ibg-visible {
  opacity: 1;
  transform: translateY(0);
}

.ibg-fade-up:nth-child(2) { transition-delay: 0.1s; }
.ibg-fade-up:nth-child(3) { transition-delay: 0.2s; }
.ibg-fade-up:nth-child(4) { transition-delay: 0.3s; }


/* ----------------------------------------------------------
   Hero compartido
   Variantes (eyebrow blanco en visitanos, video en home)
   se definen como overrides en el CSS de cada página.
---------------------------------------------------------- */
.ibg-hero {
  position: relative;
  height: 580px;
  background-color: #024555;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.ibg-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.82) 0%,
    rgba(0,0,0,0.30) 55%,
    rgba(0,0,0,0.10) 100%
  );
}

.ibg-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem 3.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.ibg-hero-left {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 560px;
}

/* Hero eyebrow — naranja en home, blanco en visitanos */
.ibg-hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: #FF5C1B;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ibg-hero-eyebrow-line {
  width: 24px;
  height: 1.5px;
  background: #FF5C1B;
  flex-shrink: 0;
}

.ibg-hero-title {
  font-size: 44px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 1rem;
}

.ibg-hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 440px;
}

.ibg-hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* Badge glassmorphism */
.ibg-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.1);
  border: 0.5px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.ibg-hero-badge-dot {
  width: 7px;
  height: 7px;
  background: #FF5C1B;
  border-radius: 50%;
  flex-shrink: 0;
}

.ibg-hero-badge-text {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  white-space: nowrap;
}

.ibg-hero-badge-sub {
  font-size: 11.5px;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
}


/* ----------------------------------------------------------
   Botones hero compartidos
---------------------------------------------------------- */
.ibg-btn-white {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  color: #3E3838;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
  min-height: 44px;
}

.ibg-btn-white:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  color: #3E3838;
}

.ibg-btn-white:active { transform: scale(0.98); }

.ibg-btn-ghost-white {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  font-weight: 500;
  padding: 13px 26px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.3);
  transition: border-color 0.15s, color 0.15s, transform 0.1s;
  white-space: nowrap;
  min-height: 44px;
}

.ibg-btn-ghost-white:hover {
  border-color: rgba(255,255,255,0.7);
  color: #fff;
  transform: translateY(-1px);
}

.ibg-btn-ghost-white:active { transform: scale(0.98); }


/* ----------------------------------------------------------
   Ícono cuadrado con fondo naranja suave
   Usado en: location cards, expect cards (visitanos)
---------------------------------------------------------- */
.ibg-card-icon {
  width: 40px;
  height: 40px;
  background: #FFF0EB;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}


/* ----------------------------------------------------------
   Link inline compartido
---------------------------------------------------------- */
.ibg-link {
  font-size: 14px;
  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;
}
.ibg-link:hover { border-color: #FF5C1B; color: #FF5C1B; }


/* ----------------------------------------------------------
   Sección: Horarios y ubicación
   Usado en: page-home.php, page-visitanos.php
   Partial:  partials/ibg-location.php
---------------------------------------------------------- */
.ibg-location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.ibg-location-card {
  background: #fff;
  border: 0.5px solid #e8e8e8;
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ibg-location-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.ibg-location-card-sub {
  font-size: 13px;
  color: #999;
  margin-top: 2px;
}

/* Tabla de horarios */
.ibg-schedule-table {
  width: 100%;
  border-collapse: collapse;
}

.ibg-schedule-table tr {
  border-top: 0.5px solid #f0ede8;
}

.ibg-schedule-table tr:first-child {
  border-top: none;
}

.ibg-schedule-time {
  font-size: 14px;
  font-weight: 600;
  color: #3E3838;
  padding: 0.6rem 0.6rem 0.6rem 0;
  white-space: nowrap;
  width: 52px;
  vertical-align: top;
}

.ibg-schedule-label {
  font-size: 14px;
  color: #555;
  padding: 0.6rem 0;
  vertical-align: top;
  line-height: 1.45;
}

/* Fila destacada — culto principal */
.ibg-schedule-main .ibg-schedule-time {
  color: #FF5C1B;
}

.ibg-schedule-main .ibg-schedule-label {
  color: #3E3838;
  font-weight: 600;
}

.ibg-schedule-badge {
  display: inline-block;
  background: #FFF0EB;
  color: #FF5C1B;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}

.ibg-schedule-note {
  font-size: 13px;
  color: #999;
  margin: 0;
  line-height: 1.55;
  padding-top: 0.35rem;
  border-top: 0.5px solid #f0ede8;
}

/* Mapa embed */
.ibg-map-embed {
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
}

.ibg-map-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ibg-map-meta-note {
  font-size: 13px;
  color: #999;
}


/* ----------------------------------------------------------
   Responsive — mobile ≤ 640px
---------------------------------------------------------- */
@media (max-width: 640px) {

  /* Inner + sections */
  .ibg-inner { padding: 0; }

  .ibg-section { padding: 3rem 1.25rem; }
  .ibg-section--gray { padding: 3rem 1.25rem; }

  .ibg-section-title { font-size: 22px; }

  /* Hero */
  .ibg-hero {
    height: 520px;
    align-items: flex-end;
  }

  .ibg-hero-content {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 1.25rem 2.5rem;
  }

  .ibg-hero-left {
    max-width: 100%;
  }

  .ibg-hero-title { font-size: 30px; }

  .ibg-hero-sub {
    font-size: 15px;
    margin-bottom: 1.5rem;
  }

  .ibg-hero-actions {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .ibg-btn-white,
  .ibg-btn-ghost-white {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    padding: 12px 20px;
  }

  .ibg-hero-badge { display: none; }

  /* Location */
  .ibg-location-grid { grid-template-columns: 1fr; }

  .ibg-location-card { padding: 1.25rem; }

}
