/* Adventure Image Gallery Styles - Vista Arenal Adventure Park */

.adventure-gallery {
  padding: var(--space-xl) 0;
  background: linear-gradient(135deg, var(--warm-sand) 0%, var(--cloud-white) 100%);
}

/* Gallery Header */
.gallery-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.gallery-title {
  font-family: var(--heading-font);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--primary-green);
  margin-bottom: var(--space-sm);
  font-weight: 700;
}

.gallery-description {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  color: var(--volcano-gray);
  margin-bottom: var(--space-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Gallery Filters */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.filter-btn {
  background: var(--cloud-white);
  border: 2px solid var(--primary-green);
  color: var(--primary-green);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary-green);
  transition: left 0.3s ease;
  z-index: 0;
}

.filter-btn span {
  position: relative;
  z-index: 1;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-green);
  color: var(--cloud-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 168, 89, 0.3);
}

.filter-btn:hover::before,
.filter-btn.active::before {
  left: 0;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  padding: 0 var(--space-md);
  max-width: 1400px;
  margin: 0 auto;
}

/* Gallery Items */
.gallery-item {
  background: var(--cloud-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  position: relative;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.gallery-item.loading {
  background: linear-gradient(90deg, var(--warm-sand) 25%, transparent 50%, var(--warm-sand) 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

.gallery-item.loaded {
  animation: fade-in-up 0.6s ease forwards;
}

/* Image Container */
.gallery-image-container {
  position: relative;
  overflow: hidden;
}

.gallery-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.05);
}

/* Gallery Overlay */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(0, 168, 89, 0.9) 0%,
    rgba(124, 179, 66, 0.9) 50%,
    rgba(2, 119, 189, 0.9) 100%
  );
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  backdrop-filter: blur(2px);
}

.gallery-overlay.active {
  opacity: 1;
  visibility: visible;
}

.overlay-content {
  text-align: center;
  color: var(--cloud-white);
  padding: var(--space-md);
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.gallery-overlay.active .overlay-content {
  transform: translateY(0);
}

.image-title {
  font-family: var(--heading-font);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.image-narrative {
  font-size: 1rem;
  margin-bottom: var(--space-md);
  line-height: 1.5;
  opacity: 0.95;
}

.view-btn {
  background: var(--cloud-white);
  color: var(--primary-green);
  border: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  transition: all 0.3s ease;
}

.view-btn:hover {
  background: var(--primary-green);
  color: var(--cloud-white);
  transform: scale(1.05);
}

.btn-icon {
  font-size: 1.2rem;
}

/* Gallery Meta */
.gallery-meta {
  padding: var(--space-md);
}

.meta-title {
  font-family: var(--heading-font);
  font-size: 1.25rem;
  color: var(--primary-green);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.meta-description {
  color: var(--volcano-gray);
  line-height: 1.5;
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
}

.meta-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.keyword-tag {
  background: var(--warm-sand);
  color: var(--volcano-gray);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: lowercase;
}

/* Adventure Category Animations */
.animate-hero {
  animation: hero-adventure 0.6s ease;
}

.animate-adventure {
  animation: adventure-thrill 0.6s ease;
}

.animate-people {
  animation: people-joy 0.6s ease;
}

.animate-social {
  animation: social-share 0.6s ease;
}

/* Gallery CTA */
.gallery-cta {
  text-align: center;
  margin-top: var(--space-xl);
  padding: var(--space-lg);
}

.btn-adventure-cta {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
  color: var(--cloud-white);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-adventure-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--secondary-green) 0%, var(--accent-blue) 100%);
  transition: left 0.4s ease;
  z-index: 0;
}

.btn-adventure-cta span {
  position: relative;
  z-index: 1;
}

.btn-adventure-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 168, 89, 0.4);
}

.btn-adventure-cta:hover::before {
  left: 0;
}

/* Lightbox Styles */
.adventure-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: lightbox-fade-in 0.3s ease forwards;
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: var(--cloud-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  animation: lightbox-scale-in 0.3s ease forwards;
}

.lightbox-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: var(--cloud-white);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.lightbox-close:hover {
  background: var(--primary-green);
  color: var(--cloud-white);
  transform: scale(1.1);
}

.lightbox-image {
  width: 100%;
  height: auto;
  display: block;
}

.lightbox-info {
  padding: var(--space-md);
  background: var(--cloud-white);
}

.lightbox-info h3 {
  font-family: var(--heading-font);
  color: var(--primary-green);
  margin-bottom: var(--space-sm);
}

.lightbox-info p {
  color: var(--volcano-gray);
  line-height: 1.5;
}

/* Filter Animations */
.filter-enter {
  animation: filter-enter 0.4s ease forwards;
}

.filter-exit {
  animation: filter-exit 0.3s ease forwards;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: 0 var(--space-sm);
  }
  
  .gallery-filters {
    flex-direction: column;
    align-items: center;
  }
  
  .filter-btn {
    min-width: 200px;
  }
  
  .lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
  }
  
  .image-title {
    font-size: 1.25rem;
  }
  
  .image-narrative {
    font-size: 0.9rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .gallery-item,
  .gallery-image,
  .gallery-overlay,
  .overlay-content,
  .filter-btn,
  .view-btn,
  .btn-adventure-cta {
    transition: none;
    animation: none;
  }
  
  .gallery-item:hover {
    transform: none;
  }
  
  .gallery-item:hover .gallery-image {
    transform: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .gallery-overlay {
    background: rgba(0, 0, 0, 0.9);
  }
  
  .filter-btn {
    border-width: 3px;
  }
  
  .keyword-tag {
    border: 1px solid var(--volcano-gray);
  }
}

/* Keyframe Animations */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-adventure {
  0% { transform: scale(0.9) rotate(-2deg); }
  50% { transform: scale(1.05) rotate(1deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes adventure-thrill {
  0% { transform: translateY(10px) scale(0.95); }
  50% { transform: translateY(-5px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes people-joy {
  0% { transform: scale(0.9); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes social-share {
  0% { transform: rotate(-5deg) scale(0.9); }
  50% { transform: rotate(5deg) scale(1.05); }
  100% { transform: rotate(0deg) scale(1); }
}

@keyframes lightbox-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes lightbox-scale-in {
  from { 
    transform: scale(0.8);
    opacity: 0;
  }
  to { 
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes filter-enter {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes filter-exit {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
  }
}

@keyframes loading-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Print Styles */
@media print {
  .adventure-gallery {
    background: none;
  }
  
  .gallery-overlay,
  .filter-btn,
  .view-btn,
  .btn-adventure-cta {
    display: none;
  }
  
  .gallery-grid {
    display: block;
  }
  
  .gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}