html {
  scroll-behavior: smooth;
}

img {
  transition: var(--transicion-time) ease all;
  transform: scale(1.03);
}

img:hover {
  transform: scale(1);
}

/* =========================================
   Estilos del Hero Section
   ========================================= */

.hero-tvc {
  position: relative;
  width: 100%;

  /* --- CAMBIO PRINCIPAL --- */
  /* Restamos los 108px del navbar al 100% de la altura del viewport */
  min-height: calc(100dvh - 108px);
  /* ------------------------ */

  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("../assets/quienes-somos.png");
  background-size: cover;
  background-position: 50% 70%;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Capa para oscurecer el fondo */
.hero-tvc .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(
    0,
    0,
    0,
    0.529
  ); /* 0.65 es la opacidad, modifícala a tu gusto */
  z-index: 1;
}

/* Contenedor del texto y botón */
.hero-tvc .hero-content {
  position: relative;
  z-index: 2; /* Para que quede por encima del overlay */
  padding: 0 20px;
  text-align: center;
}

/* Tipografía del título */
.hero-tvc .hero-content .hero-title {
  color: #ffffff;
  /* Uso de clamp para que el texto sea responsive automáticamente */
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.hero-tvc .hero-content .text-highlight {
  color: whitesmoke; /* El tono amarillo/dorado de la imagen */
}

/* =========================================
   Sección Nuestra Esencia
   ========================================= */

.seccion-esencia {
  /* No usamos padding lateral aquí para permitir que los bloques grises toquen los bordes */
  width: 100%;
  padding: 80px 0;
  overflow-x: hidden; /* Evita que el cálculo de bordes genere scroll horizontal */
}

.seccion-esencia .esencia-header {
  max-width: 1200px;
  margin: 0 auto 80px auto;
  padding: 0 5%;
  text-align: center;
}

.seccion-esencia .esencia-header h2 {
  margin-bottom: 20px;
  color: #000;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
}

.seccion-esencia .esencia-header p {
  color: #333;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 300;
}

.seccion-esencia .highlight-blue {
  color: #5c7cfa; /* Reemplaza con var(--secundario) si tienes este azul en tus variables */
}

/* =========================================
   Contenedor de Misión y Visión
   ========================================= */

.seccion-esencia .esencia-bloques {
  display: flex;
  justify-content: space-between;
  gap: 40px; /* El espacio blanco en el centro */
  width: 100%;
}

/* Estilos base para ambos bloques grises */
.seccion-esencia .bloque-mision,
.seccion-esencia .bloque-vision {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 48%; /* Ocupan casi la mitad de la pantalla */
  padding-top: 80px;
  padding-bottom: 80px;
  background-color: var(--gris-claro); /* El color gris de la imagen */
}

/* Tipografía dentro de las tarjetas */
.seccion-esencia .bloque-mision h3,
.seccion-esencia .bloque-vision h3 {
  margin-bottom: 25px;
  color: #000;
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  font-weight: 700;
}

.seccion-esencia .bloque-mision p,
.seccion-esencia .bloque-vision p {
  color: #1a1a1a;
  font-size: clamp(1rem, 1.1vw, 1.15rem);
  font-weight: 300;
  line-height: 1.6;
  text-align: justify;
}

/* =========================================
   Ajustes Específicos: Bordes y Alineación
   ========================================= */

/* MISIÓN (Izquierda) */
.seccion-esencia .bloque-mision {
  /* EL TRUCO MATEMÁTICO: 
     50vw es la mitad de la pantalla. Le restamos 600px (la mitad de un max-width estándar de 1200px).
     Esto hace que el texto se alinee perfectamente con el resto de tu web, 
     mientras el fondo gris crece infinitamente hacia la izquierda. */
  padding-left: max(5%, calc(50vw - 600px));
  padding-right: 50px; /* Padding interior hacia el hueco central */
  border-radius: 0 100px 100px 0; /* Curvas solo a la derecha */
  text-align: left;
}

/* VISIÓN (Derecha) */
.seccion-esencia .bloque-vision {
  /* El mismo truco, pero aplicado al padding derecho */
  padding-right: max(5%, calc(50vw - 600px));
  padding-left: 50px; /* Padding interior hacia el hueco central */
  border-radius: 100px 0 0 100px; /* Curvas solo a la izquierda */
  text-align: right;
}

/* =========================================
   Responsive (Celulares y Tablets)
   ========================================= */

@media (max-width: 992px) {
  .seccion-esencia .esencia-bloques {
    flex-direction: column; /* Se apilan uno sobre otro */
    gap: 60px;
  }

  .seccion-esencia .bloque-mision,
  .seccion-esencia .bloque-vision {
    width: 95%; /* Dejamos un 5% libre para que se note la curva del borde */
  }

  .seccion-esencia .bloque-mision {
    border-radius: 0 60px 60px 0;
    padding: 50px 30px 50px 5%; /* Reemplazamos la fórmula compleja en móviles */
  }

  .seccion-esencia .bloque-vision {
    align-self: flex-end; /* Empuja el bloque de Visión hacia la derecha de la pantalla */
    border-radius: 60px 0 0 60px;
    padding: 50px 5% 50px 30px;
  }
}

/* =========================================
   Sección Historia de Innovación
   ========================================= */

.seccion-historia {
  width: 100%;
  margin: 60px 0;
  overflow-x: hidden;
}

.seccion-historia .historia-wrapper {
  display: flex;
  align-items: stretch; /* Asegura que ambas columnas tengan la misma altura base */
  width: 100%;
}

/* =========================================
   Columna Izquierda: Fondo Gris e Imágenes
   ========================================= */
.seccion-historia .historia-imagenes {
  display: flex;
  align-items: center;
  width: 50%;
  /* El truco del borde izquierdo + el espacio derecho */
  padding: 10px 40px 60px max(5%, calc(50vw - 600px));
  background-color: var(--gris-claro); /* Color gris de la imagen */
  border-radius: 0 50px 50px 0; /* Curvo solo a la derecha */
}

/* Grid de los Placeholders Celestes */
.seccion-historia .historia-imagenes .grid-fotos {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
  gap: 20px;
  width: 100%;
  max-width: 700px;
  aspect-ratio: 1264/842;
}

.seccion-historia .historia-imagenes .foto-box {
  width: 100%;
  background-color: #87ceeb; /* Celeste temporal */
  border-radius: 20px;
}

.seccion-historia .historia-imagenes .foto-top {
  grid-column: 1 / 3; /* Ocupa las 2 columnas */
  height: 280px;
  overflow: hidden;
}
.seccion-historia .historia-imagenes .foto-top img {
  object-fit: cover;
  object-position: center;
}
.seccion-historia .historia-imagenes .foto-bottom-left img {
  object-fit: cover;
  object-position: left;
}
.seccion-historia .historia-imagenes .foto-bottom-right img {
  object-fit: cover;
  object-position: center;
}

.seccion-historia .historia-imagenes .foto-bottom-left,
.seccion-historia .historia-imagenes .foto-bottom-right {
  height: 180px;
  overflow: hidden;
}

/* Para cuando cambies los divs celestes por imágenes reales: */
/* .seccion-historia .historia-imagenes .foto-box { object-fit: cover; } */

/* =========================================
   Columna Derecha: Textos e Iconos
   ========================================= */
.seccion-historia .historia-texto {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 50%;
  /* Padding izquierdo normal, el derecho usa la matemática para alinear con el sitio */
  padding: 60px max(5%, calc(50vw - 600px)) 60px 60px;
}

.seccion-historia .historia-texto h2 {
  margin-bottom: 20px;
  color: #1a1a1a;
  font-size: clamp(2.5rem, 3.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
}

.seccion-historia .historia-texto .highlight-blue {
  color: var(--secundario); /* Tu azul característico */
  transition: var(--transicion-time) ease all;
}

.seccion-historia .historia-texto .highlight-blue:hover {
  color: var(--primario);
}

.seccion-historia .historia-texto .historia-intro {
  margin-bottom: 40px;
  color: var(--gris);
  font-size: 1.1rem;
  line-height: 1.6;
  font-weight: 400;
  text-align: justify;
}

/* =========================================
   Lista de Ítems (Icono + Texto)
   ========================================= */
.seccion-historia .lista-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.seccion-historia .lista-item:last-child {
  margin-bottom: 0;
}

/* El círculo del ícono */
.seccion-historia .lista-item .icono-circulo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0; /* Evita que el círculo se aplaste */
  width: 50px;
  height: 50px;
  border: 2px solid transparent; /* Por si quieres añadir un borde luego */
  border-radius: 50%;
  color: white;
  background-color: var(--secundario);
}

.seccion-historia .lista-item .icono-circulo svg {
  width: 32px;
  height: 32px;
}

.seccion-historia .lista-item .item-contenido h4 {
  margin-bottom: 8px;
  color: #1a1a1a;
  font-size: 1.2rem;
  font-weight: 600;
}

.seccion-historia .lista-item .item-contenido p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: justify;
}

.seccion-historia .highlight-green {
  color: #7bc676; /* Verde de TVC */
  font-weight: 700;
}

/* =========================================
   Diseño Responsivo (Móviles y Tablets)
   ========================================= */
@media (max-width: 992px) {
  .seccion-historia .historia-wrapper {
    flex-direction: column; /* Apila las columnas */
  }

  .seccion-historia .historia-imagenes {
    width: 95%; /* Deja un margen del 5% a la derecha para ver la curva */
    border-radius: 0 40px 40px 0;
    padding: 40px 30px 40px 5%;
  }

  .seccion-historia .grid-fotos {
    max-width: 100%;
  }

  .seccion-historia .historia-texto {
    width: 100%;
    padding: 50px 5%;
  }
}

@media (max-width: 576px) {
  /* En teléfonos muy pequeños, las fotos de abajo pasan a estar una sobre otra */
  .seccion-historia .grid-fotos {
    grid-template-columns: 1fr;
  }
  .seccion-historia .foto-top {
    grid-column: 1 / 2;
  }
}

/* =========================================
   Sección Testimonio (CEO)
   ========================================= */

.seccion-testimonio {
  background-color: var(
    --gris-claro
  ); /* El fondo gris que ocupa todo el ancho */
  width: 100%;
  padding: 80px 0;
  margin: 60px 0;
}

.seccion-testimonio .testimonio-container {
  display: flex;
  align-items: center;
  gap: 60px; /* Separación entre la imagen y el texto */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

/* =========================================
   Columna Izquierda: Imagen con Filtro
   ========================================= */
.seccion-testimonio .testimonio-container .testimonio-imagen {
  flex: 0 0 45%; /* Ocupa el 45% del ancho del contenedor */
  border-radius: 20px;
  overflow: hidden; /* Asegura que la imagen no se salga de los bordes curvos al hacer zoom */
  /* Sombra sutil opcional para darle profundidad */
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.seccion-testimonio .testimonio-container .testimonio-imagen img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  /* AQUÍ ESTÁ LA MAGIA DEL BLANCO Y NEGRO */
  filter: grayscale(100%);
  /* Transición suave para el filtro y un ligero zoom */
  transition:
    filter 0.5s ease,
    transform 0.5s ease;
}

/* Efecto al pasar el cursor */
.seccion-testimonio .testimonio-container .testimonio-imagen img:hover {
  filter: grayscale(0%); /* Quita el filtro gris y vuelve a su color natural */
  transform: scale(1.03); /* Se acerca un poquitito para hacerlo más dinámico */
}

/* =========================================
   Columna Derecha: Texto y Comillas
   ========================================= */
.seccion-testimonio .testimonio-container .testimonio-contenido {
  display: flex;
  flex-direction: column;
  flex: 1; /* Toma el espacio restante */
}

.seccion-testimonio .testimonio-container .testimonio-contenido .cita-texto {
  margin: 15px 0;
  color: #1a1a1a;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 300;
  line-height: 1.6;
}

/* Autor */
.seccion-testimonio .testimonio-container .testimonio-contenido .cita-autor {
  margin-top: 10px;
  color: #3b5bdb; /* Un azul similar al de tu imagen. Usa var(--secundario) si prefieres */
  font-size: 1.2rem;
  font-weight: 400;
}

/* Comillas SVG */
.seccion-testimonio .testimonio-container .testimonio-contenido .quote-mark {
  width: 100%;
}

.seccion-testimonio .testimonio-container .testimonio-contenido .text-left {
  text-align: left;
}

.seccion-testimonio .testimonio-container .testimonio-contenido .text-right {
  text-align: right;
  margin-top: -10px; /* Sube la comilla inferior un poco para que abrace al texto */
}

.seccion-testimonio .testimonio-container .testimonio-contenido .quote-svg {
  width: 40px;
  height: 40px;
  color: #1a1a1a; /* Color casi negro para las comillas */
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 992px) {
  .seccion-testimonio .testimonio-container {
    flex-direction: column; /* Apila la imagen arriba y el texto abajo */
    gap: 40px;
  }

  .seccion-testimonio .testimonio-imagen {
    width: 100%; /* La imagen ocupa todo el ancho disponible */
    max-width: 600px; /* Evita que la imagen se haga gigante en tablets */
  }

  .seccion-testimonio .testimonio-contenido {
    width: 100%;
    text-align: center;
  }

  /* Ajustamos las comillas para móvil */
  .seccion-testimonio .text-left,
  .seccion-testimonio .text-right {
    text-align: center;
  }

  .seccion-testimonio .text-right {
    margin-top: 15px;
  }
}

/* =========================================
   Sección Nuestro Equipo
   ========================================= */

.seccion-equipo {
  max-width: 1200px;
  margin: 30px auto;
  text-align: center;
  padding: 20px 5%;
}

.seccion-equipo .equipo-header {
  margin-bottom: 10px; /* Margen grande abajo porque las cabezas sobresalen hacia arriba */
}

.seccion-equipo .equipo-header h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: #000;
}

/* =========================================
   Grid del Equipo
   ========================================= */
.seccion-equipo .equipo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columnas */
  column-gap: 10px;
  row-gap: 20px; /* Mucho espacio vertical para que no choquen las cabezas con las tarjetas de arriba */
  margin-bottom: 80px;
}

/* =========================================
   Diseño de la Tarjeta y Efecto Pop-Out
   ========================================= */
.seccion-equipo .equipo-grid .equipo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 15px 25px 15px; /* Sin padding arriba para pegar el fondo gris al borde */
  background-color: #f8f9fa; /* Color hueso/gris muy claro de la tarjeta completa */
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

/* Contenedor relativo para posicionar la foto absoluta */
.seccion-equipo .equipo-grid .equipo-card .equipo-foto-container {
  position: relative;
  width: 100%;
  height: 220px; /* Altura base del cuadro gris */
  margin-bottom: 20px;
}

/* El fondo gris curvo */
.seccion-equipo .equipo-grid .equipo-card .equipo-foto-container .foto-fondo {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%; /* Ocupa los 220px */
  background-color: #d2d6d9; /* Gris azulado de tu diseño */
  border-radius: 15px;
}

/* La magia del Pop-Out */
.seccion-equipo .equipo-grid .equipo-card .equipo-foto-container .foto-persona {
  position: absolute;
  bottom: 0; /* Pegado a la parte inferior del recuadro gris */
  left: 50%;
  z-index: 2; /* Por encima del fondo gris */
  width: 90%; /* Ajusta el ancho de la persona respecto a la caja */
  height: auto;
  max-height: 260px; /* ¡MÁS ALTO QUE EL FONDO (220px)! Esto hace que sobresalga por arriba */
  object-fit: contain;
  object-position: bottom; /* Asegura que si la imagen se corta, sea de los lados, no de abajo */
  transform: translateX(-50%); /* Centra la imagen horizontalmente */
  filter: grayscale(100%);
  transition: var(--transicion-time) ease all;
}

.seccion-equipo
  .equipo-grid
  .equipo-card
  .equipo-foto-container
  .foto-persona:hover {
  filter: grayscale(0%);
  transform: translateX(-80%); /* Centra la imagen horizontalmente */
}

/* Textos de la tarjeta */
.seccion-equipo .equipo-grid .equipo-card .equipo-info h3 {
  margin-bottom: 8px;
  color: #000000;
  font-size: 1.1rem;
  font-weight: 500;
}

.seccion-equipo .equipo-grid .equipo-card .equipo-info p {
  color: #666;
  font-size: 0.9rem;
  font-weight: 300;
}

/* =========================================
   Eslogan Final
   ========================================= */
.seccion-equipo .equipo-slogan {
  margin-top: 40px;
}

.seccion-equipo .equipo-slogan h2 {
  margin-bottom: 15px;
  color: #000;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 900;
  letter-spacing: -1px;
}

/* Colores de las letras. Ajusta las variables según tu :root */
.seccion-equipo .equipo-slogan .highlight-green {
  color: var(--primario);
}
.seccion-equipo .equipo-slogan .highlight-yellow {
  color: var(--terciario);
}
.seccion-equipo .equipo-slogan .highlight-blue {
  color: var(--secundario);
}

.seccion-equipo .equipo-slogan p {
  color: var(--gris);
  font-size: 1.1rem;
  font-weight: 300;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 992px) {
  .seccion-equipo .equipo-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets */
  }
}

@media (max-width: 576px) {
  .seccion-equipo .equipo-grid {
    grid-template-columns: 1fr; /* 1 columna en celulares */
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
  }
}
