/* ==== Reset básico ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* ==== Header ==== */
header {
  background-color: #2e7d32;
  color: white;
  padding: 1.5rem;
  text-align: center;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

nav a {
  color: white;
  margin: 0 1rem;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* ==== Hero (Inicio) ==== */
.hero {
  background-image: url('../images/page/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 5rem 1rem;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.boton {
  background-color: #66bb6a;
  color: white;
  padding: 0.7rem 1.5rem;
  text-decoration: none;
  border-radius: 0.3rem;
  font-weight: bold;
}

.boton:hover {
  background-color: #4caf50;
}

/* ==== Intro (Inicio) ==== */
.intro {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  text-align: center;
  font-size: 1.1rem;
}

/* ==== Galería ==== */
.gallery {
  display: grid; /* Usamos grid para una distribución más ordenada */
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Distribuir las imágenes */
  gap: 1rem;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery h2 {
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #2e7d32;
}

.foto {
  margin-bottom: 2rem;
  width: 100%; /* Asegura que las imágenes no excedan el contenedor */
  display: inline-block;
  box-sizing: border-box;
}

.foto img {
  width: 100%; /* Hacer que las imágenes se adapten al tamaño del contenedor */
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.2s ease-in-out; /* Efecto suave al hacer hover */
}

.foto:hover img {
  transform: scale(1.05); /* Agrandar ligeramente la imagen al pasar el ratón */
}

/* ==== Descripción de la imagen ==== */
.foto .caption {
  display: none; /* Ocultar las descripciones por defecto */
  margin-top: 1rem;
  padding: 1rem;
  background-color: #ffffff;
  border-left: 4px solid #2e7d32;
  border-radius: 0.3rem;
  text-align: left;
  font-size: 0.9rem; /* Reducir el tamaño en vista general */
}

.foto:hover .caption {
  display: block; /* Mostrar las descripciones solo cuando se pasa el ratón sobre la imagen */
}

/* ==== Modal ==== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal img {
  max-width: 90%;
  max-height: 60vh;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.modal-caption {
  background-color: #fff;
  color: #333;
  padding: 1.5rem;
  border-radius: 0.5rem;
  max-width: 800px;
  text-align: left;
}

.modal-caption h3 {
  color: #2e7d32;
  margin-bottom: 0.5rem;
}

.cerrar {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

.cerrar:hover {
  color: #ccc;
}

/* ==== Sobre mí ==== */
.about {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
  font-size: 1.1rem;
}
