/* GENERAL */
:root {
  --color-primary: #122E5D;
  --color-secondary: #FD5902;
  --color-text: #333;
  --color-light: #fff;
  --color-background: #f5f5f5;
  --font-main: "Quicksand", sans-serif;
}

body {
    font-family: "Quicksand", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ENCABEZADO */
header {
    text-align: center;
    background-color: #122E5D;
    color: white;
    padding: 20px;
}

header img {
    width: 100px;
    height: auto;
    margin-bottom: 10px;
}

/* ==========================================================================
   1. Variables y Estilos Base
========================================================================== */

header h1 {
    font-size: 3rem;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

/* ==========================================================================
   2. Header y Navegación
   ========================================================================== */
header {
  background-color: var(--color-primary);
  color: var(--color-light);
  padding: 1.25rem 1.5rem;
  text-align: center;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

header .logo {
  width: 6.25rem; /* 100px */
  height: auto;
  margin: 0 auto 0.625rem;
}

header h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: bold;
  margin: 0 0 0.25rem;
}

header h2 {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 400;
    margin: 0;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

nav ul li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: var(--color-primary);
  color: var(--color-light);
  border-radius: 0.3125rem;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.3s ease;
}

nav ul li a:hover {
  background: var(--color-secondary);
}

/* ==========================================================================
   3. Contenido Principal
   ========================================================================== */

/* Sección de Bienvenida */
#bienvenida {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background-color: var(--color-light);
}

#bienvenida h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

#bienvenida p {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--color-secondary);
  font-weight: bold;
  letter-spacing: 1px;
}

/* Carrusel de Imágenes Principal */
.carousel {
  position: relative;
  max-width: 80rem; /* 1280px */
  width: 95%;
  margin: 2rem auto;
  overflow: hidden;
  border-radius: 0.625rem;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.2);
  aspect-ratio: 16 / 8; /* Mantiene la forma en todos los dispositivos */
}

.carousel-container {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Botones del Carrusel */
.carousel .prev, .carousel .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.4);
  color: var(--color-light);
  border: none;
  padding: 0.75rem;
  cursor: pointer;
  font-size: 1.5rem;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}
.carousel .prev:hover, .carousel .next:hover {
  background-color: rgba(0, 0, 0, 0.7);
}
.carousel .prev { left: 1rem; }
.carousel .next { right: 1rem; }


/* Sección de Testimonios */
.testimonios {
  background-color: var(--color-light);
  padding: 3rem 0;
  text-align: center;
  margin-top: 3rem;
}

.testimonios h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--color-primary);
  margin-bottom: 2rem;
}

/* Contenedor principal del carrusel */
.testimonios-carousel {
  position: relative;
  max-width: 75rem; /* 1200px */
  margin: auto;
}

/* Wrapper: Este es el 'marco' que permite el scroll */
.testimonios-wrapper {
  overflow-x: auto; /* PERMITE el scroll horizontal */
  scroll-snap-type: x mandatory; /* Habilita el 'snap' */
  
  /* Oculta la barra de scroll para un look más limpio */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
}
.testimonios-wrapper::-webkit-scrollbar {
  display: none; /* Chrome, Safari, etc. */
}

/* Container: Este es el 'track' que contiene las tarjetas y se desborda */
.testimonios-container {
  display: grid;
  grid-auto-flow: column; /* FORZA la fila horizontal */
  grid-auto-columns: 80%; /* Cada tarjeta ocupa 80% del ancho */
  gap: 1.5rem;
  padding: 1.5rem; 
}

/* Tarjeta de testimonio individual */
.testimonio {
  width: 100%; 
  height: 100%; 
  scroll-snap-align: center;
  background: var(--color-light);
  color: var(--color-primary);
  padding: 1.5rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.testimonio:hover {
  transform: scale(1.02);
}

.testimonio-texto {
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 1rem;
}

.testimonio-nombre {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--color-secondary);
}

/* Flechas de Navegación */
.prev-testimonio, .next-testimonio {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-light);
  color: var(--color-primary);
  border: none;
  width: 3rem;
  height: 3rem;
  font-size: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  display: none; /* Oculto por defecto, visible en pantallas grandes */
}

.prev-testimonio { left: -1.5rem; }
.next-testimonio { right: -1.5rem; }

/* Mostrar flechas solo en pantallas suficientemente grandes */
@media (min-width: 768px) {
  .prev-testimonio, .next-testimonio {
    display: block;
  }
}

/* ==========================================================================
   4. Footer
   ========================================================================== */
footer {
  text-align: center;
  padding: 1.25rem;
  background: var(--color-primary);
  color: var(--color-light);
  font-size: 1rem;
  margin-top: 2.5rem;
}
    font-weight: bold;
    margin-bottom: 5px;
}

header h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 0;
}

/* Barra de navegación general */
nav ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  text-align: center;
}

nav ul li {
  display: inline-block;
  margin: 0 12px;
}

/* ——— Botones texto e icono comparten reglas base ——— */
nav ul li a {
  display: inline-flex;          /* Ícono o texto, siempre centrado */
  align-items: center;          /* Asegura la alineación vertical en el centro */
  justify-content: center;
  padding: 12px;
  background: #122E5D;
  color: #f4f4f4;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  transition: background .3s ease, color .3s ease;
}

/* Íconos dentro de cualquier enlace */
nav ul li a img {
  width: 24px;
  height: 24px;
  vertical-align: middle; /* Mantenemos esta propiedad importante */
  display: inline-block; /* Asegura que vertical-align funcione correctamente */
}

/* Ajuste específico para la imagen dentro del .home-link */
.home-link img {
  transform: translateY(6px); /* Aplica el transform SOLO a la imagen */
}

/* Efecto hover: cambia fondo y blanquea el png con filter */
nav ul li a:hover {
  background: #FD5902;
  color: #fff;
}

nav ul li a:hover img {
  filter: brightness(0) invert(1); /* icono se vuelve blanco */
}

/* ——— Ajuste mínimo para el link SOLO-icono (sin texto) ——— */
.home-link {
  min-width: 48px; /* asegurar área clickable similar al resto */
  padding: 12px;   /* cuadrado, queda visualmente equilibrado */
}



/* Estilo para la sección de bienvenida */
#bienvenida {
    text-align: center;
    padding: 3px 15px;
    background-color: white;
}

#bienvenida h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #122E5D;
    letter-spacing: 1px;
}

#bienvenida p {
    font-size: 1.5rem;
    color: #FD5902;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Responsividad */
@media (max-width: 768px) {
    #bienvenida h2 {
        font-size: 2.5rem; /* Reduce el tamaño del título en pantallas pequeñas */
    }

    #bienvenida p {
        font-size: 1rem; /* Reducir tamaño del texto */
    }
}


/* CARRUSEL */
.carousel {
    position: relative;
    max-width: 90%;
    margin: 30px auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-slide img {
    width: 100%;
    height: 580px;
    object-fit: cover; /* Hace que todas las imágenes tengan el mismo tamaño */
    border-radius: 10px;
}

/* BOTONES DEL CARRUSEL */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 50%;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}
/* Estilos generales para los testimonios */
.testimonios {
    background-color: white;
    padding: 50px 0;
    text-align: center;
    margin-top: 50px;
}

.testimonios h2 {
    font-size: 2.5rem;
    color: #122E5D;
    margin-bottom: 30px;
}

/* Contenedor principal del carrusel */
.testimonios-carousel {
    position: relative;
    width: 80%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 15px;
    
}

/* Wrapper para evitar desbordamiento */
.testimonios-wrapper {
    overflow: hidden;
    width: 100%;
}

/* Contenedor flexible con transición suave */
.testimonios-container {
    display: flex;
    gap: 15px;
    transition: transform 0.6s ease-in-out;
}

/* Diseño de cada testimonio */
.testimonio {
    flex: 1 0 calc(45% - 20px);
    max-width: calc(45% - 20px);
    background: white;
    color: #122E5D;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

/* Efecto hover */
.testimonio:hover {
    transform: scale(1.05);
}

/* Texto del testimonio */
.testimonio-texto {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 10px;
}

/* Nombre */
.testimonio-nombre {
    font-size: 1.3rem;
    font-weight: bold;
    color: #FD5902;
}

/* Flechas de navegación */
.prev-testimonio, .next-testimonio {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #122E5D;
    border: none;
    padding: 12px 15px;
    font-size: 1.8rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.prev-testimonio { left: 25px; }
.next-testimonio { right: 25px; }

.prev-testimonio:hover, .next-testimonio:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Responsivo */
@media (max-width: 768px) {
    .testimonios-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .testimonio {
        flex: 1 0 80%;
        max-width: 80%;
        margin-bottom: 20px;
    }

    .prev-testimonio, .next-testimonio {
        display: none;
    }
}


/* FOOTER */
footer {
    text-align: center;
    padding: 20px;
    background: #122E5D;
    color: white;
    font-size: 1rem;
}
