/* === CONTENEDOR PRINCIPAL === */
.experiencia-container {
  max-width: 1100px;
  margin: 80px auto;
  padding: 0 20px;
  color: var(--texto-principal);
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* === INTRO === */
.intro {
  background-color: var(--tarjeta-fondo);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  text-align: center;
  animation: fadeIn 1s ease;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.intro h1 {
  color: var(--acento);
  font-size: 2rem;
  margin-bottom: 10px;
}

.intro .autor {
  color: var(--texto-secundario);
  font-style: italic;
  margin-bottom: 20px;
}

.intro .descripcion {
  color: var(--texto-secundario);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 15px;
}

/* === GALERÍA === */
.galeria {
  margin-top: 60px;
  text-align: center;
}

.galeria h2 {
  color: var(--acento);
  font-size: 1.8rem;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--acento);
  display: inline-block;
  padding-bottom: 6px;
}

/* === REJILLA CENTRADA (6 IMÁGENES) === */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  justify-items: center;
}

.foto {
  background-color: var(--fondo-principal);
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.4s ease;
}

.foto img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.foto:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.foto:hover img {
  transform: scale(1.1);
}

/* === ANIMACIÓN === */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === MODO CLARO === */
.light-mode .intro {
  background-color: #ffffff;
  color: #1E2A38;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.light-mode .foto {
  background-color: #f7f7f7;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.light-mode .intro .descripcion,
.light-mode .intro .autor {
  color: #333;
}

.light-mode .galeria h2 {
  color: #2A9D8F;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .intro {
    padding: 30px 20px;
  }

  .intro h1 {
    font-size: 1.6rem;
  }

  .galeria h2 {
    font-size: 1.5rem;
  }

  .galeria-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }

  .foto img {
    height: 190px;
  }
}

@media (min-width: 1500px) {
  .intro {
    max-width: 1200px;
  }

  .galeria-grid {
    gap: 40px;
  }

  .foto img {
    height: 260px;
  }
}