body {
  background: linear-gradient(180deg, #042937 0%, #063447 100%);
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
}

html {
  scroll-behavior: smooth;
}

.galeria {
  margin-top: 30px;
  margin-bottom: 70px;
}

/* HERO */
.galeria-hero {
  min-height: 58vh;
  background-image: url("../imagenes/portada1.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 40px 20px;
}

.galeria-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.40),
    rgba(0, 0, 0, 0.62)
  );
}

.galeria-hero-content {
  position: relative;
  z-index: 1;
  max-width: 850px;
  color: #ffffff;
}

.galeria-etiqueta {
  display: inline-block;
  padding: 8px 18px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(214, 161, 6, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f6d67a;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.galeria-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 18px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.galeria-hero p {
  font-size: 1.08rem;
  line-height: 1.8;
  margin: 0 auto;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.95);
}

/* ENCABEZADO */
.galeria-header {
  margin-bottom: 35px;
}

.galeria-header h2 {
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 12px;
}

.galeria-header p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.7;
}

/* GRID */
.galeria-grid .row {
  display: flex;
  flex-wrap: wrap;
}

.galeria-grid .col-lg-4,
.galeria-grid .col-md-6 {
  display: flex;
}

/* CARD IMAGEN */
.galeria-card {
  position: relative;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.galeria-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 38px rgba(0, 0, 0, 0.24);
}

.galeria-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.galeria-card:hover .galeria-img {
  transform: scale(1.06);
}

/* OVERLAY */
.galeria-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 20px 20px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.82),
    rgba(0, 0, 0, 0.40),
    rgba(0, 0, 0, 0.05)
  );
  color: #ffffff;
}

.galeria-overlay h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #f6d67a;
}

/* RESPONSIVE */
@media (max-width: 991px) {
  .galeria-hero {
    min-height: 50vh;
  }

  .galeria-hero h1 {
    font-size: 2.4rem;
  }

  .galeria-hero p {
    font-size: 1rem;
  }

  .galeria-img {
    height: 290px;
  }
}

@media (max-width: 768px) {
  .galeria {
    margin-top: 20px;
    margin-bottom: 50px;
  }

  .galeria-hero {
    min-height: 45vh;
    padding: 35px 15px;
  }

  .galeria-hero h1 {
    font-size: 2rem;
    line-height: 1.3;
  }

  .galeria-hero p {
    font-size: 0.97rem;
    line-height: 1.7;
  }

  .galeria-header {
    margin-bottom: 25px;
  }

  .galeria-header h2 {
    font-size: 1.7rem;
  }

  .galeria-header p {
    font-size: 0.95rem;
    padding: 0 8px;
  }

  .galeria-img {
    height: 260px;
  }

  .galeria-card:hover {
    transform: none;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  }

  .galeria-card:hover .galeria-img {
    transform: none;
  }
}

@media (max-width: 576px) {
  .galeria-hero h1 {
    font-size: 1.75rem;
  }

  .galeria-etiqueta {
    font-size: 0.84rem;
    padding: 7px 15px;
  }

  .galeria-hero p {
    font-size: 0.93rem;
  }

  .galeria-img {
    height: 230px;
  }

  .galeria-overlay {
    padding: 18px 16px 16px;
  }

  .galeria-overlay h3 {
    font-size: 1.08rem;
  }
}