/*
Theme Name: Iglesia Valle de la Orotava
Theme URI: http://localhost:8090
Description: Tema hijo personalizado de Kadence para Iglesia Valle de la Orotava.
Author: Isaac Ortega
Template: kadence
Version: 1.0.0
Text Domain: iglesia-valle-child
*/

/* =========================================================
   VARIABLES VISUALES
   ========================================================= */

:root {
  --ivlo-bg: #f7f5f0;
  --ivlo-bg-soft: #eae5db;
  --ivlo-surface: #fcfbf8;

  --ivlo-text: #1e2021;
  --ivlo-text-muted: #5c6060;

  --ivlo-accent: #89745a;
  --ivlo-accent-dark: #675440;
  --ivlo-accent-light: #c4b39c;
}

.entry-content-wrap {
  padding: 0 !important;
}

/* =========================================================
   BASE
   ========================================================= */

body {
  background-color: var(--ivlo-bg);
  color: var(--ivlo-text);
}

.site-container,
.content-container {
  max-width: 1280px;
}

/* =========================================================
   PORTADA: HERO PEGADO A LA CABECERA
   Solo afecta a Inicio.
   ========================================================= */

body.home #primary,
body.home .content-area,
body.home .site-main,
body.home .entry-content,
body.home .entry-content-wrap {
  margin-top: 0;
  padding-top: 0;
}

/*
  El primer bloque Fondo/Cover de Inicio no debe heredar
  separación superior del contenido de Kadence.
*/
body.home .entry-content > .wp-block-cover:first-child,
body.home .entry-content > .wp-block-cover.alignfull:first-child {
  margin-top: 0 !important;
}

/*
  Si el bloque Fondo está a ancho completo, elimina el
  margen que Gutenberg aplica entre bloques.
*/
body.home .wp-block-cover.alignfull {
  margin-bottom: 0;
}


.hero-paisaje {
  overflow: hidden;
}

.hero-paisaje .wp-block-cover__image-background {
  transform-origin: center center !important;
  will-change: transform;
  animation: respiracion-paisaje 10s ease-in-out infinite !important;
}


.titulo-hero {
  -webkit-text-stroke: 1px #1e2021 !important;
  paint-order: stroke fill !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45) !important;
}

@keyframes respiracion-paisaje {
  0% {
    transform: scale(1.02) translateX(-0.4%);
  }

  50% {
    transform: scale(1.09) translateX(0.6%);
  }

  100% {
    transform: scale(1.02) translateX(-0.4%);
  }
}


/* =========================================================
   CABECERA
   ========================================================= */

.site-header {
  background-color: var(--ivlo-bg);
}

.site-header .site-container {
  max-width: 1440px;
}

/* =========================================================
   BOTONES
   ========================================================= */

.wp-block-button__link {
  border-radius: 2px;
  font-weight: 600;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.wp-block-button__link:hover {
  transform: translateY(-1px);
}

/* =========================================================
   ACCESIBILIDAD
   ========================================================= */

a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible {
  outline: 3px solid var(--ivlo-accent);
  outline-offset: 3px;
}

.ivlo-pastor-image img {
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.nuestra-iglesia-button-container .wp-block-button__link {
  background-color: transparent !important;
}




/* DIRECCIÓN */

.fila-ubicacion {
  justify-content: center !important;
  align-items: center !important;
  gap: 40px !important;
}

.fila-ubicacion .bloque-mapa {
  flex: 0 1 520px !important;
  width: 520px;
  margin: 0 !important;
}

.fila-ubicacion .bloque-direccion {
  flex: 0 1 330px !important;
  width: 330px;
  margin: 0 !important;
}


/* GALERÍA DE IMÁGENES */
/* Galería editorial */
.ivlo-gallery {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 180px;
  gap: 16px;
}

.ivlo-gallery .wp-block-image {
  width: 100% !important;
  height: 100%;
  margin: 0 !important;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
}

.ivlo-gallery .wp-block-image:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}

.ivlo-gallery .wp-block-image:nth-child(4) {
  grid-column: span 2;
}

.ivlo-gallery img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.ivlo-gallery .wp-block-image::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fcfbf8;
  font-size: 2.5rem;
  background: rgba(30, 32, 33, 0);
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.ivlo-gallery .wp-block-image:hover img {
  transform: scale(1.05);
  filter: brightness(0.75);
}

.ivlo-gallery .wp-block-image:hover::after {
  background: rgba(30, 32, 33, 0.35);
  opacity: 1;
}

/* Visor de fotos */
.ivlo-lightbox {
  position: fixed;
  z-index: 99999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 12, 13, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ivlo-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.ivlo-lightbox__image {
  max-width: min(1100px, 88vw);
  max-height: 82vh;
  display: block;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.ivlo-lightbox__close,
.ivlo-lightbox__previous,
.ivlo-lightbox__next {
  position: absolute;
  border: 0;
  color: #fcfbf8;
  background: transparent;
  cursor: pointer;
  line-height: 1;
}

.ivlo-lightbox__close {
  top: 20px;
  right: 24px;
  font-size: 3rem;
}

.ivlo-lightbox__previous,
.ivlo-lightbox__next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3.5rem;
  padding: 16px;
}

.ivlo-lightbox__previous {
  left: 16px;
}

.ivlo-lightbox__next {
  right: 16px;
}

@media (max-width: 767px) {
  .ivlo-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 150px;
    gap: 10px;
  }

  .ivlo-gallery .wp-block-image:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .ivlo-gallery .wp-block-image:nth-child(4) {
    grid-column: span 1;
  }

  .ivlo-lightbox__image {
    max-width: 100%;
    max-height: 76vh;
  }

  .ivlo-lightbox__previous,
  .ivlo-lightbox__next {
    font-size: 2.6rem;
  }
}

.ivlo-gallery .wp-block-image,
.ivlo-gallery .wp-block-image > a,
.ivlo-gallery .wp-block-image > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

.ivlo-gallery .wp-block-image > a {
  overflow: hidden;
}

.ivlo-gallery .wp-block-image > img {
  object-fit: cover !important;
}

.link_world_vision{
  text-decoration: underline !important;
}

/* En móvil: mapa arriba y dirección debajo */
@media screen and (max-width: 900px) {
  .fila-ubicacion {
    flex-direction: column !important;
    gap: 28px !important;
  }

  .fila-ubicacion .bloque-mapa,
  .fila-ubicacion .bloque-direccion {
    width: 100% !important;
    max-width: 520px;
  }

  .fila-ubicacion .bloque-direccion {
    text-align: center;
  }
}

@media (max-width: 767px) {
  .nuestra-iglesia-fila {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 28px !important;
  }

  .nuestra-iglesia-fila > * {
    width: 100% !important;
    flex-basis: 100% !important;
  }

  .nuestra-iglesia-fila .wp-block-image,
  .nuestra-iglesia-fila .wp-block-image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .nuestra-iglesia-imagen {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding-right: 0 !important;
  }

  .nuestra-iglesia-imagen img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    padding-right: 0 !important;
    border: none !important;
  }

  .nuestra-iglesia-titulo {
    display: flex !important;
    text-align: center !important;
  }
}
