/* ========== GLOBAL BODY ========== */
body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #f9f9fb, #f0f4f7);
  color: #222;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Scrollbar elegante */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-thumb {
  background: #2bc4e3;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: #1d2b2d;
}
::-webkit-scrollbar-track {
  background: #e6ecf0;
}

/* ========== GALLERY PAGE ========== */
.gallery-page {
  width: 100%;
  max-width: 1980px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

/* HERO estilo portada */
.gallery-hero {
  position: relative;
  height: 550px;
  width: 100%;
  background: url('../images/gallery/4.png') center 30%/cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-bottom: 60px;
}

.gallery-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35); /* leve oscurecido */
}

.gallery-hero .hero-content {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px) saturate(180%);
  padding: 35px 50px;
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  max-width: 800px;
  color: #fff;
}

/* Texto hero con animación pastel */
.gallery-hero .hero-content h1 {
  font-size: 46px;
  font-weight: 900;
  margin-bottom: 15px;
  background: linear-gradient(90deg, #fff, #ffb6c1, #87ceeb, #fff, #b19cd9);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pastelShift 10s ease infinite;
}

.gallery-hero .hero-content p {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
  color: #fff;
  background: linear-gradient(90deg, #fff, #ffe4b5, #add8e6, #fff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pastelShift 12s ease infinite;
}

/* Animación pastel infinita */
@keyframes pastelShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ========== GRID ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  padding: 0 clamp(20px, 6vw, 80px) 60px;
  animation: fadeUp 1s ease both;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  aspect-ratio: 1 / 1;
  transition: transform .3s ease, box-shadow .3s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* ========== LOAD MORE BUTTON ========== */
.load-more-container {
  text-align: center;
  margin: 50px 0;
}

#load-more {
  padding: 14px 36px;
  border: none;
  background: linear-gradient(135deg, #2bc4e3, #1d2b2d);
  color: #fff;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: all .3s ease;
}

#load-more:hover {
  background: linear-gradient(135deg, #1d2b2d, #2bc4e3);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* ========== LIGHTBOX ========== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  padding: 20px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 20, 20, 0.95);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.4s ease both;
}

.lightbox-img {
  max-width: 85%;
  max-height: 80%;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  animation: zoomIn 0.4s ease both;
  object-fit: contain;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #fff;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
  transition: none; /* hover desactivado */
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  font-size: 40px;
  color: #fff;
  user-select: none;
  transform: translateY(-50%);
  transition: color .3s ease, transform .3s ease;
}

.prev { left: 20px; }
.next { right: 20px; }

.prev:hover, .next:hover {
  color: #2bc4e3;
  transform: scale(1.1) translateY(-50%);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes zoomIn {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .gallery-hero .hero-content h1 { font-size: 38px; }
  .gallery-hero .hero-content p { font-size: 16px; }
}

@media (max-width: 768px) {
  .gallery-hero { height: 450px; }
  .gallery-hero .hero-content h1 { font-size: 28px; }
  .gallery-hero .hero-content p { font-size: 14px; }
  .gallery-grid { gap: 18px; }
  .prev, .next { font-size: 32px; }
  .lightbox-img { max-width: 95%; max-height: 70%; }
}

@media (max-width: 480px) {
  .gallery-hero { height: 480px; }
  .gallery-hero .hero-content { padding: 20px; }
  .gallery-hero .hero-content h1 { font-size: 22px; }
  .gallery-hero .hero-content p { font-size: 12px; }
  .lightbox { padding: 10px; }
  .lightbox-img { max-width: 100%; max-height: 60%; }
  .prev, .next { font-size: 26px; top: 55%; }
  .close-btn { font-size: 26px; }
}
