/* Gallery Page Styles */

/* Hero Section */
.gallery-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  position: relative;
  color: white;
  padding: 120px 0;
  text-align: center;
  overflow: hidden;
}

.gallery-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(0, 191, 166, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 105, 92, 0.08) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }
  50% { transform: translateY(-20px) rotate(180deg) scale(1.1); }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.gallery-hero .container {
  position: relative;
  z-index: 2;
}

.gallery-hero h1 {
  font-size: 4em;
  font-weight: 900;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff, #00BFA6, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(0, 191, 166, 0.3);
  animation: glow 3s ease-in-out infinite alternate;
}

.gallery-hero p {
  font-size: 1.4em;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
  line-height: 1.6;
}

@keyframes glow {
  from { text-shadow: 0 0 30px rgba(0, 191, 166, 0.3); }
  to { text-shadow: 0 0 50px rgba(0, 191, 166, 0.6), 0 0 70px rgba(0, 191, 166, 0.4); }
}

/* Gallery Section */
.gallery-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 80px 0;
  min-height: 100vh;
}

.gallery-header {
  text-align: center;
  margin-bottom: 60px;
}

.gallery-header h2 {
  font-size: 3.5em;
  font-weight: 800;
  background: linear-gradient(135deg, #00BFA6, #00695c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.gallery-header p {
  font-size: 1.2em;
  color: #64748b;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Gallery Filters */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 12px 24px;
  border: 2px solid #00BFA6;
  background: transparent;
  color: #00BFA6;
  border-radius: 25px;
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, #00BFA6, #00695c);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 191, 166, 0.3);
}

/* Pinterest-like Masonry Grid */
.gallery-grid {
  columns: 3;
  column-gap: 25px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Gallery Item */
.gallery-item {
  break-inside: avoid;
  margin-bottom: 25px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: white;
  position: relative;
  display: block;
  width: 100%;
}

.gallery-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.gallery-item-inner {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: all 0.4s ease;
  object-fit: cover;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Gallery Overlay */
.gallery-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.8) 100%
  );
  opacity: 0;
  transition: all 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: 30px;
}

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

.gallery-info {
  color: white;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.gallery-item:hover .gallery-info {
  transform: translateY(0);
}

.gallery-info h3 {
  font-size: 1.4em;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.gallery-info p {
  font-size: 1em;
  margin-bottom: 10px;
  opacity: 0.9;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.gallery-date {
  display: inline-block;
  background: rgba(0, 191, 166, 0.9);
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.9em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .gallery-grid {
    columns: 3;
    column-gap: 20px;
  }
}

@media (max-width: 768px) {
  .gallery-hero {
    padding: 80px 0;
  }
  
  .gallery-hero h1 {
    font-size: 2.5em;
  }
  
  .gallery-hero p {
    font-size: 1.1em;
  }
  
  .gallery-header h2 {
    font-size: 2.5em;
  }
  
  .gallery-header p {
    font-size: 1em;
  }
  
  .gallery-filters {
    gap: 10px;
  }
  
  .filter-btn {
    padding: 10px 20px;
    font-size: 0.9em;
  }
  
  .gallery-grid {
    columns: 2;
    column-gap: 15px;
    padding: 0 15px;
  }
  
  .gallery-overlay {
    padding: 20px;
  }
  
  .gallery-info h3 {
    font-size: 1.2em;
  }
  
  .gallery-info p {
    font-size: 0.9em;
  }
}

@media (max-width: 480px) {
  .gallery-hero h1 {
    font-size: 2em;
  }
  
  .gallery-header h2 {
    font-size: 2em;
  }
  
  .gallery-grid {
    columns: 1;
    column-gap: 15px;
  }
  
  .gallery-filters {
    flex-direction: column;
    align-items: center;
  }
  
  .filter-btn {
    width: 200px;
  }
}

/* Loading Animation */
.gallery-item {
  animation: fadeInUp 0.6s ease-out;
}

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

/* Staggered Animation for Items */
.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }
.gallery-item:nth-child(9) { animation-delay: 0.9s; }
.gallery-item:nth-child(10) { animation-delay: 1.0s; }
.gallery-item:nth-child(11) { animation-delay: 1.1s; }
.gallery-item:nth-child(12) { animation-delay: 1.2s; }
.gallery-item:nth-child(13) { animation-delay: 1.3s; }
.gallery-item:nth-child(14) { animation-delay: 1.4s; }
.gallery-item:nth-child(15) { animation-delay: 1.5s; }
.gallery-item:nth-child(16) { animation-delay: 1.6s; }
.gallery-item:nth-child(17) { animation-delay: 1.7s; }

/* Filter Animation */
.gallery-item {
  transition: all 0.4s ease;
}

.gallery-item.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.gallery-item.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: all;
}

/* Lightbox styles */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox.is-open { display: flex; }

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

.lightbox-image {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  z-index: 1002;
  opacity: 1;
  transition: opacity .3s ease;
}

.lb-fade-in { opacity: 0; animation: lbFade .3s ease forwards; }
@keyframes lbFade { to { opacity: 1; } }

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 1003;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
  transition: transform .2s ease, background .2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.2); transform: scale(1.06); }

.lightbox-close { top: 20px; right: 20px; font-size: 28px; line-height: 1; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); font-size: 22px; }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); font-size: 22px; }

.lightbox-caption {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  color: #e2e8f0;
  background: rgba(0,0,0,0.5);
  padding: 10px 16px;
  border-radius: 10px;
  z-index: 1003;
  max-width: 90vw;
}

@media (max-width: 768px) {
  .lightbox-prev, .lightbox-next { display: none; }
  .lightbox-image { max-width: 94vw; max-height: 80vh; }
}
