:root {
  --color-primario: #30B9B1;
  --color-primario-oscuro: #26938D;
  --color-fondo-suave: #A5DFDC;
  --color-texto: #333333;
  --color-blanco: #FFFFFF;
  --color-gris-claro: #D9D9D9;
  --color-azul-logo: #3B83BD;
  --color-morado-logo: #7E57C2;
  --color-aguamarina-logo: #4DD0E1;
}

body {
  padding-top: 40px;  
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f9f9f9;
  color: var(--color-texto);
  line-height: 1.6;
}

.contenedor {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* === BIENVENIDA ELEGANTE Y COMPACTA === */
.bienvenida {
  background: linear-gradient(to bottom right, #b7edea, #30b9b1);
  color: #333333;
  text-align: center;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;
  max-width: 1200px;
  margin: 2rem auto;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  animation: fadeInUp 1.2s ease-out both;
}

.bienvenida-contenido {
  max-width: 900px;
  animation: fadeInUp 1.2s ease;
}

.bienvenida h1 {
  font-size: 2.2rem;
  margin: 0.4rem 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 400;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.15);
}

.bienvenida .instituto {
  font-size: 2.6rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.15);
}

.bienvenida p {
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* === CARRUSEL PRINCIPAL === */
.carrusel {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: 300px;
  margin: 3rem auto 2rem auto;
  overflow: hidden;
  border-radius: 20px;
}

.carrusel img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.carrusel img.activo {
  opacity: 1;
  z-index: 2;
}

/* === RAZONES === */
.razones {
  padding: 2rem 1rem;
  text-align: center;
}

.razones h2 {
  font-size: 2rem;
  color: var(--color-primario);
  margin-bottom: 1rem;
}

.razones .items {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: center;
}

.razones .item {
  flex: 1 1 260px;
  background-color: var(--color-blanco);
  padding: 1.2rem;
  border-radius: 10px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

.razones .item:hover {
  transform: translateY(-5px);
}

.razones .item h3 {
  margin-top: 0;
  color: var(--color-primario-oscuro);
}

/* === BLOQUES INFORMATIVOS === */
.bloques {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 1rem;
}

.bloque {
  flex: 1 1 300px;
  max-width: 300px;
  background-color: var(--color-blanco);
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
  padding: 1rem;
  text-align: center;
}

.bloque img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 0.8rem;
}

.bloque h3 {
  color: var(--color-primario);
}

/* === TESTIMONIOS === */
.carrusel-testimonios {
  padding: 2rem 1rem;
  text-align: center;
}

.carrusel-testimonios h2 {
  color: var(--color-primario);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.carousel {
  position: relative;
  max-width: 800px;
  margin: 1rem auto;
  height: 240px;
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  width: 100%;
  opacity: 0;
  transition: opacity 1s ease;
  text-align: center;
  padding: 1rem 2rem;
  background-color: var(--color-blanco);
  border-left: 5px solid var(--color-morado-logo);
  border-radius: 20px; /* redondeado como el carrusel principal */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 0;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

.carousel-slide .texto {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--color-texto);
}

.carousel-slide .autor {
  font-weight: bold;
  color: var(--color-primario-oscuro);
  margin-top: 0.5rem;
}

.carousel-slide .estrellas {
  font-size: 1.4rem;
  color: gold;
  margin-bottom: 0.5rem;
}

.boton-valorar {
  display: inline-block;
  margin-top: 1.5rem;
  background-color: var(--color-primario);
  color: white;
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.boton-valorar:hover {
  background-color: var(--color-primario-oscuro);
}

/* === REDES SOCIALES === */
.social-icons {
  text-align: center;
  margin: 2rem 0;
}

.social-icons a {
  display: inline-block;
  margin: 0 10px;
  transition: transform 0.3s ease;
}

.social-icons img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.social-icons img:hover {
  transform: scale(1.1);
}

/* === ANIMACIONES === */
@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

@keyframes slideDown {
  from {transform: translateY(-20px); opacity: 0;}
  to {transform: translateY(0); opacity: 1;}
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === RESPONSIVE === */
@media screen and (max-width: 768px) {
  .razones .items,
  .bloques {
    flex-direction: column;
    align-items: center;
  }

  .razones .item,
  .bloque {
    width: 100%;
    max-width: 90%;
  }

  .carrusel {
    height: 220px;
  }

  .bienvenida-titulo {
    font-size: 2rem;
  }

  .bienvenida-subtitulo {
    font-size: 1.4rem;
  }
}
