/* acercade.css cleaned: removed unused navbar/map/test/card components */

/* Variables de diseño */
:root {
  --fnd-ink: #0b2540;
  --fnd-accent: #0b61a4;
  --fnd-accent-alt: #c62828;
  --fnd-soft: #f8fafc;
  --fnd-border: rgba(11, 38, 64, 0.06);
  --fnd-shadow: 0 12px 35px rgba(11, 38, 64, 0.1);
}

/* Reset y base - usar tipografía del site.css */
body {
  background: #ffffff;
}

h2, h3, h4, h5 {
  color: var(--fnd-ink);
}

p {
  color: #556;
  line-height: 1.7;
}

/* Título principal usa .fnd-title de index_style.css con personalización mínima */
#fnd-programs-title {
  text-align: center;
  margin-top: 48px;
}

/* Centrar la raya del título principal */
#fnd-programs-title.fnd-title::after {
  margin-inline: auto;
}

/* Línea de colores bajo la primera palabra del título */
.underline-start {
  position: relative;
  display: inline-block;
}

/* Sección principal de descripción */
.card-info {
  max-inline-size: 920px;
  margin: 40px auto;
  padding: 40px;
  background: linear-gradient(135deg, #ffffff 0%, #f9fbfd 100%);
  box-shadow: 0 16px 45px rgba(11, 38, 64, 0.12);
  border-radius: 20px;
  border: 1px solid var(--fnd-border);
}

.card-info-body {
  display: grid;
  gap: 24px;
  align-items: center;
  /* imagen ocupa la mayor parte, contenido el resto (igual que .acercade-grid) */
  grid-template-columns: 60% 40%;
}

.card-info-body p {
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--fnd-ink);
  opacity: 0.88;
}

/* Mostrar la imagen del card-info ocupando la caja, recortando si es necesario */
.card-info-img-top {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  block-size: clamp(260px, 34vh, 420px);
  min-block-size: 220px;
  object-fit: cover;     /* la imagen llena la caja sin distorsionar (se recorta si hace falta) */
  object-position: center;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(11, 38, 64, 0.1);
  transition: transform 0.3s ease;
}

/* Scoped section container for this page */
.acercade-section {
  max-inline-size: 900px;
  margin: 48px auto;
  padding: 48px 40px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 12px 40px rgba(11, 38, 64, 0.09);
  border-radius: 18px;
  border: 1px solid var(--fnd-border);
}

.acercade-section h3 {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  margin: 0 0 18px;
  color: var(--fnd-ink);
}

.acercade-section p {
  font-size: 1.02rem;
  line-height: 1.75;
  opacity: 0.85;
  margin: 16px 0;
}

.acercade-section .icon {
  inline-size: 100%;
  max-inline-size: 280px;
  block-size: auto;
  margin: 24px auto 0;
  border-radius: 12px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.acercade-section:hover .icon {
  transform: translateY(-6px);
  filter: drop-shadow(0 12px 25px rgba(11, 38, 64, 0.15));
}

.icon {
  inline-size: 100%;
  block-size: auto;
  margin-inline-end: 10px;
}

.icon2 {
  max-inline-size: 100%;
  block-size: auto;
  margin-inline-end: 10px;
  transition: transform 0.3s, opacity 0.3s;
}

.acercade-section:hover .icon2 {
  transform: scale(1.1);
  opacity: 0.8;
}

/* Galerías (Misión / Visión): que la figura deje la imagen ocupar la mayor parte */
.fnd-gallery {
  position: relative;
  min-block-size: 360px;    /* altura para que la imagen sea protagonista */
  padding: 0;               /* quitar padding para que la figura y la imagen ocupen el espacio */
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.7), rgba(224, 239, 249, 0.4));
  border-radius: 16px;
}

.fnd-figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--fnd-shadow);
  background: #f5f7fb;
  border: 1px solid var(--fnd-border);
  inline-size: 100%;
  display: block;
  height: 100%;
}

/* Mostrar la imagen completa dentro del cuadro de Misión/Visión sin cambiar el tamaño del cuadro */
.fnd-gallery--md .fnd-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;    /* mostrar la imagen completa, manteniendo proporción */
  object-position: center;
  background-color: transparent; /* conserva el fondo de la figura si existe */
  display: block;
}

/* Iconos/pequeñas ilustraciones usados en secciones (no afecta .valor-card img) */
.icon,
.icon2 {
  display: block;
  margin: 18px auto;
  width: 100%;
  max-width: 420px; /* aumentar para que sean más visibles */
  height: auto;
  object-fit: contain;
}

/* De Aqui para abajo es exclusivo del CSS de la Jerarquia, de momento esta aqui, hay que hacerle un CSS */
.hierarchy {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f9fbfd 100%);
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(11, 38, 64, 0.1);
  margin: 28px auto;
  max-inline-size: 900px;
  overflow: hidden;
  border: 1px solid var(--fnd-border);
}

.hierarchy img {
  inline-size: 300px;
  block-size: 400px;
  object-fit: cover;
}

.text-content {
  padding: 32px;
  flex: 1;
}

@media (max-width: 768px) {
  .hierarchy {
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-inline-size: 90%;
    margin: 20px auto;
  }
  .hierarchy img {
    inline-size: 100%;
    block-size: auto;
    max-inline-size: 300px;
  }
  .text-content {
    padding: 20px;
  }
}

/* Misión & Visión merged utility block */
.fnd-section {
  padding: 60px 24px;
  background: linear-gradient(180deg, #f9fbfd 0%, #ffffff 100%);
  margin: 40px 0;
}

.fnd-section--alt {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 2px solid var(--fnd-border);
}

.fnd-container {
  max-inline-size: var(--fnd-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* .fnd-title y .fnd-title::after definidos en index_style.css */

.fnd-grid {
  display: grid;
  gap: 28px;
}

.fnd-grid-2 {
  grid-template-columns: repeat(1, 1fr);
}

.fnd-grid--center {
  align-items: center;
}

@media (min-width: 768px) {
  .fnd-grid--50 {
    grid-template-columns: 1fr 1fr;
  }
  .fnd-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.fnd-gallery {
  position: relative;
  min-block-size: 360px;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.7), rgba(224, 239, 249, 0.4));
  border-radius: 16px;
  transition: all 0.3s ease;
}

.fnd-gallery:hover {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(224, 239, 249, 0.6));
}

.fnd-figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--fnd-shadow);
  background: #f5f7fb;
  border: 1px solid var(--fnd-border);
  inline-size: 100%;
  display: block;
  height: 100%;
}

.fnd-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;     /* ocupa la figura; recorta si hace falta */
  object-position: center;
  margin: 0;
}

.fnd-gallery--md {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0; /* la figura ocupará la caja */
  min-block-size: 0; /* evitamos conflictos con reglas previas */
}

.fnd-gallery--md .fnd-figure {
  inline-size: 100%;
  /* altura fija para igualar ambas imágenes */
  block-size: 280px;
  max-inline-size: 100%; /* ocupar todo el ancho disponible */
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  display: block;
}

/* Mostrar la imagen completa dentro del cuadro de Misión/Visión sin cambiar el tamaño del cuadro */
.fnd-gallery--md .fnd-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;    /* mostrar la imagen completa, manteniendo proporción */
  object-position: center;
  background-color: transparent; /* conserva el fondo de la figura si existe */
  display: block;
}

/* Responsive: adaptación en pantallas pequeñas */
@media (max-width: 767px) {
  .fnd-gallery--md .fnd-figure {
    block-size: 220px;
    max-inline-size: 100%;
  }
}

/* Valores: grid de cards moderna y atractiva */
.valores-section {
  padding: 48px 40px;
  background: linear-gradient(135deg, #f0f5fb 0%, #ffffff 100%);
  border-radius: 20px;
  margin: 48px auto;
  max-inline-size: 1000px;
  box-shadow: 0 12px 35px rgba(11, 38, 64, 0.08);
  border: 1px solid var(--fnd-border);
}

.valores-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: stretch;
  margin-top: 36px;
}

.valor-card {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(11, 38, 64, 0.1);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  text-align: center;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--fnd-border);
  position: relative;
}

.valor-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #0b61a4 0%, #c62828 100%);
  border-radius: 16px 16px 0 0;
}

.valor-card:hover {
  transform: translateY(-14px) scale(1.02);
  box-shadow: 0 28px 60px rgba(11, 38, 64, 0.16);
}

.valor-card img {
  margin: 12px auto 0; /* centrada horizontalmente, separada del texto */
  display: block;
  inline-size: 80%;
  max-inline-size: 260px;
  block-size: auto;
  object-fit: cover;
  border-radius: 12px;
}

.valor-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fnd-ink);
  letter-spacing: -0.3px;
}

.valor-card-desc {
  margin: 0;
  font-size: 0.95rem;
  color: #556;
  line-height: 1.5;
  flex-grow: 1;
}

/* Responsive móvil */
@media (max-width: 768px) {
  .acercade-section {
    margin: 24px auto;
    padding: 28px 20px;
  }

  .card-info_body {
    grid-template-columns: 1fr;
  }

  .valores-grid {
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .valor-card {
    padding: 16px;
  }

  .valor-card img {
    block-size: 130px;
  }

  .fnd-section {
    padding: 40px 20px;
  }

  .fnd-gallery {
    padding: 40px 20px;
    min-block-size: 260px;
  }

  .acercade-title-center {
    margin: 32px auto 12px;
  }
}

/* Títulos usando estilos estándar de .fnd-title de index_style.css */

/* Layout de sección: media grande + contenido */
.acercade-grid {
  display: grid;
  gap: 28px;
  align-items: center;
  grid-template-columns: 60% 40%; /* imagen ocupa la mayor parte */
}

/* variante para invertir orden (imagen a la derecha) */
.acercade-grid.reverse {
  grid-template-columns: 40% 60%;
}

/* contenedor de la imagen: ocupa todo el espacio de la columna */
.acercade-media {
  display: block;
  width: 100%;
  min-block-size: 340px; /* altura para que la imagen sea protagonista */
  overflow: hidden;
  border-radius: 12px;
}

/* la imagen rellena su contenedor y se recorta si hace falta (visual grande) */
.acercade-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
}

/* contenedor de texto */
.acercade-content {
  padding: 6px 4px;
}

/* Ajustes para que en móvil las secciones .acercade-grid siempre muestren el texto antes que la imagen */
@media (max-width: 767px) {
	.acercade-grid,
	.acercade-grid.reverse {
		/* cambiar a flex en móvil para que 'order' funcione de forma predecible */
		display: flex;
		flex-direction: column;
		gap: 18px;
		grid-template-columns: none;
	}

	/* contenido primero, imagen siempre después */
	.acercade-grid .acercade-content,
	.acercade-grid.reverse .acercade-content {
		order: 1;
	}

	.acercade-grid .acercade-media,
	.acercade-grid.reverse .acercade-media {
		order: 2;
		min-block-size: 220px;
	}
}

/* Los títulos .fnd-title ya tienen su ::after definido en index_style.css */
/* Solo aplicar raya personalizada a títulos de valores que no usan .fnd-title */
.acercade-section .valor h3 {
  position: relative;
  padding-bottom: 6px;
}

.acercade-section .valor h3::after {
  content: "";
  display: block;
  height: 4px;
  width: 84px;
  margin-top: 8px;
  background: linear-gradient(90deg, var(--fnd-accent) 0%, #ffffff 50%, var(--fnd-accent-alt) 100%);
  border-radius: 4px;
}

/* --- Responsive: card-info: texto arriba, imagen abajo en pantallas pequeñas --- */
@media (max-width: 767px) {
  .card-info-body {
    /* usar flex en móvil para controlar el orden */
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
    grid-template-columns: none;
  }

  .card-info-body > p {
    order: 1; /* texto primero */
  }

  .card-info-img-top {
    order: 2; /* imagen después del texto */
    width: 100%;
    max-inline-size: 100%;
    /* altura responsiva pero no demasiado pequeña */
    block-size: clamp(220px, 30vh, 380px);
    min-block-size: 180px;
    object-fit: cover;
    object-position: center;
    margin-inline: 0;
  }
}



/* En móvil: mover la galería de "Nuestra misión" (fnd-section--alt) debajo del texto */
@media (max-width: 767px) {
  .fnd-section.fnd-section--alt .fnd-grid-2 {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  /* asegurar que la galería (imagen) quede después del contenido textual */
  .fnd-section.fnd-section--alt .fnd-gallery,
  .fnd-section.fnd-section--alt .fnd-gallery--md {
    order: 2;
  }

  /* cualquier otro hijo (texto) primero */
  .fnd-section.fnd-section--alt .fnd-grid-2 > *:not(.fnd-gallery):not(.fnd-gallery--md) {
    order: 1;
  }
}


.valores {
  width: 95%; /* ocupa casi todo el ancho */
  max-width: 2400px; /* opcional: límite máximo */
  margin: 60px auto; /* centrado vertical y horizontal */
  padding: 20px; /* espacio interno */
  text-align: center;
}

.valores h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: #333;
  position: relative;
}

.grid-valores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.valor {
  background: rgb(253, 253, 253);
  padding: 15px;
  border-radius: 16px;
  transition: transform 0.2s ease;
}

.valor:hover {
  transform: translateY(-5px);
}

.valor img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
}

.valor h3 {
  margin-top: 10px;
  font-size: 1.2rem;
  color: #222;
}

.valor p {
  font-size: 0.95rem;
  color: #555;
  margin-top: 5px;
}

.valores h2::after {
  content: "";
  display: block;
  width: 60px; /* longitud de la línea */
  height: 3px; /* grosor */
  background-color: #000; /* color negro */
  margin: 10px auto 0; /* centrado debajo del título */
  border-radius: 2px;
}

@media (max-width: 1024px) {
  .grid-valores {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .valor img {
    height: 180px;
  }

  .valores h2 {
    font-size: 1.8rem;
  }
}

/* Móviles (pantallas pequeñas) */
@media (max-width: 768px) {
  .grid-valores {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .valor {
    padding: 12px;
  }

  .valor img {
    height: 160px;
  }

  .valores h2 {
    font-size: 1.6rem;
  }

  .valores h2::after {
    width: 50px;
  }
}



/* --- Ajuste general de "Acerca de" --- */
.acercade-grid {
  display: grid;
  align-items: center;
  justify-content: center;
  grid-template-columns: 50% 50%; /* más balanceado */
  gap: 20px; /* menos espacio entre texto e imagen */
  transition: all 0.3s ease;
}

/* variante invertida (imagen a la derecha) */
.acercade-grid.reverse {
  grid-template-columns: 50% 50%;
}

/* contenedor de la imagen */
.acercade-media {
  display: block;
  width: 100%;
  min-block-size: 340px;
  overflow: hidden;
  border-radius: 14px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* efecto hover para imagen */
.acercade-media:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 25px rgba(11, 38, 64, 0.15);
}

/* imagen rellena su contenedor */
.acercade-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* efecto hover de la imagen en sí */
.acercade-media img:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* texto */
.acercade-content {
  padding: 8px 6px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* efecto hover para el contenido de texto */
.acercade-content:hover {
  transform: translateY(-4px);
  opacity: 0.95;
}

/* título de sección */
.acercade-section {
  max-inline-size: 1000px;
  margin: 48px auto;
  padding: 48px 40px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 12px 35px rgba(11, 38, 64, 0.1);
  border-radius: 18px;
  border: 1px solid var(--fnd-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* hover suave de cada sección */
.acercade-section:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(11, 38, 64, 0.15);
}

/* --- Hover para las cards de valores --- */
.valor {
  background: rgb(253, 253, 253);
  padding: 15px;
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  border: 1px solid rgba(11, 38, 64, 0.05);
}

.valor:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(11, 38, 64, 0.15);
  background: linear-gradient(135deg, #ffffff 0%, #f2f8ff 100%);
}

/* imágenes dentro de las cards */
.valor img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.valor:hover img {
  transform: scale(1.05);
  opacity: 0.9;
}

/* título y descripción */
.valor h3 {
  margin-top: 10px;
  font-size: 1.2rem;
  color: #222;
  transition: color 0.3s ease;
}

.valor:hover h3 {
  color: var(--fnd-accent);
}

.valor p {
  font-size: 0.95rem;
  color: #555;
  margin-top: 5px;
  transition: opacity 0.3s ease;
}

.valor:hover p {
  opacity: 0.8;
}

/* Responsive móvil */
@media (max-width: 767px) {
  .acercade-grid,
  .acercade-grid.reverse {
    display: flex;
    flex-direction: column;
    gap: 18px;
    grid-template-columns: none;
  }

  .acercade-grid .acercade-content,
  .acercade-grid.reverse .acercade-content {
    order: 1;
  }

  .acercade-grid .acercade-media,
  .acercade-grid.reverse .acercade-media {
    order: 2;
    min-block-size: 220px;
  }
}
