/* ==================== ESTILOS GALERÍA DE FOTOS ==================== */
/* Diseño PREMIUM - Mejores prácticas UI/UX */

/* Hero Section - Espectacular */
.hero-fotos {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 7rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-fotos::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.hero-fotos::after {
  content: "";
  position: absolute;
  bottom: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(30px, 30px) rotate(180deg);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-fotos h1 {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.hero-fotos p {
  font-size: 1.75rem;
  font-weight: 300;
  opacity: 0.95;
  margin-bottom: 2rem;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease 0.2s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sección de Contenido */
.seccion-contenido {
  padding: 5rem 0;
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.fotos-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Filtros Premium */
.filtro-fotos {
  background: white;
  padding: 2.5rem;
  border-radius: 2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  margin-bottom: 4rem;
  border-top: 5px solid var(--primary);
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.busqueda-fotos {
  flex: 1;
  min-width: 300px;
  padding: 1.125rem 1.5rem;
  border: 2px solid var(--gray-200);
  border-radius: 2rem;
  font-size: 1rem;
  font-family: var(--font-primary);
  color: var(--gray-900);
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
}

.busqueda-fotos:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.15);
  background: white;
  transform: translateY(-2px);
}

.busqueda-fotos::placeholder {
  color: var(--gray-500);
}

.filtro-categoria {
  flex: 0 0 250px;
  padding: 1.125rem 1.5rem;
  border: 2px solid var(--gray-200);
  border-radius: 2rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-primary);
  color: var(--gray-900);
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232e7d32' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.5rem center;
  padding-right: 3rem;
}

.filtro-categoria:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.15);
  background-color: white;
  transform: translateY(-2px);
}

/* Galería Grid Premium */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.foto-item {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  aspect-ratio: 4 / 3;
  background: var(--gray-200);
  border: 3px solid transparent;
}

.foto-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 2;
}

.foto-item:hover::before {
  transform: scaleX(1);
}

.foto-item:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 60px rgba(46, 125, 50, 0.25);
  border-color: var(--primary);
  z-index: 10;
}

.foto-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.foto-item:hover img {
  transform: scale(1.15);
}

.foto-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: all 0.4s ease;
}

.foto-item:hover .foto-overlay {
  opacity: 1;
}

.foto-overlay h3 {
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  line-height: 1.3;
}

.foto-overlay p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.btn-ver {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.938rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
  align-self: flex-start;
  position: relative;
  overflow: hidden;
}

.btn-ver::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-ver:hover::before {
  width: 300px;
  height: 300px;
}

.btn-ver:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.5);
}

/* Paginación Premium */
.paginacion {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 5rem;
  padding: 2rem;
  background: white;
  border-radius: 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  border-top: 5px solid var(--primary);
}

.pag-btn {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 1rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
  position: relative;
  overflow: hidden;
}

.pag-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.pag-btn:hover::before {
  width: 300px;
  height: 300px;
}

.pag-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4);
}

.pag-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.pag-info {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
  border-radius: 2rem;
  border: 2px solid var(--gray-200);
}

/* Sección Compartir Premium */
.compartir-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 4rem 3rem;
  border-radius: 2rem;
  color: white;
  text-align: center;
  box-shadow: 0 15px 50px rgba(46, 125, 50, 0.3);
  position: relative;
  overflow: hidden;
}

.compartir-section::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.compartir-section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.compartir-section > p {
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}

.compartir-opciones {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.btn-compartir {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.125rem 2rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 2rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-compartir::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.btn-compartir:hover::before {
  transform: scaleX(1);
}

.btn-compartir:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-compartir span {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.btn-compartir:hover span {
  transform: scale(1.2) rotate(5deg);
}

/* Responsive Design */
@media (max-width: 1600px) {
  .container {
    max-width: 1200px;
  }
}

@media (max-width: 1200px) {
  .galeria-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 992px) {
  .hero-fotos {
    padding: 6rem 0 5rem;
  }

  .hero-fotos h1 {
    font-size: 3rem;
  }

  .hero-fotos p {
    font-size: 1.5rem;
  }

  .seccion-contenido {
    padding: 4rem 0;
  }

  .filtro-fotos {
    flex-direction: column;
  }

  .busqueda-fotos,
  .filtro-categoria {
    width: 100%;
    min-width: auto;
  }

  .compartir-section {
    padding: 3rem 2rem;
  }

  .compartir-section h2 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-fotos {
    padding: 5rem 0 4rem;
  }

  .hero-fotos h1 {
    font-size: 2.5rem;
  }

  .hero-fotos p {
    font-size: 1.25rem;
  }

  .filtro-fotos {
    padding: 2rem;
  }

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

  .foto-overlay {
    padding: 1.5rem;
  }

  .foto-overlay h3 {
    font-size: 1.25rem;
  }

  .paginacion {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
  }

  .pag-btn {
    width: 100%;
  }

  .compartir-opciones {
    flex-direction: column;
  }

  .btn-compartir {
    width: 100%;
  }

  .compartir-section {
    padding: 2.5rem 1.5rem;
  }

  .compartir-section h2 {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-fotos h1 {
    font-size: 2rem;
  }

  .hero-fotos p {
    font-size: 1.125rem;
  }

  .filtro-fotos {
    padding: 1.5rem;
  }

  .galeria-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .foto-overlay {
    padding: 1.25rem;
  }

  .foto-overlay h3 {
    font-size: 1.125rem;
  }

  .foto-overlay p {
    font-size: 0.938rem;
  }

  .btn-ver {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }

  .compartir-section h2 {
    font-size: 1.5rem;
  }

  .compartir-section > p {
    font-size: 1.125rem;
  }
}
