/* ============================================
   Gallery Page - Styles
   ============================================ */

/* Gallery page global overrides to prevent main.css conflicts */
#main.gallery-page {
  background: white !important;
}

#main.gallery-page h2 {
  color: inherit !important;
}

#main.gallery-page p {
  color: inherit !important;
}

/* Hero Section */
.gallery-hero {
  /* background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-orange) 100%); */
  /* background: linear-gradient(255deg, var(--primary-blue) 0%, var(--accent-footer) 100%); */
  background: var(--primary-blue);
  color: white;
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.gallery-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent),
              radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.05), transparent);
  pointer-events: none;
}

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

.gallery-title {
  font-size: clamp(3.2rem, 6vw, 6rem);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
  font-family: var(--font-display);
}

.gallery-title .highlight {
  background: linear-gradient(120deg, var(--primary-yellow), var(--secondary-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gallery-subtitle {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: rgba(255, 255, 255, 0.95);
  max-width: 900px;
  margin: 0 auto 30px;
  font-weight: 300;
  line-height: 1.6;
}

.gallery-tagline {
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .gallery-hero {
    padding: 80px 0;
  }

  .gallery-title {
    font-size: 2.5rem;
  }

  .gallery-subtitle {
    font-size: 1.1rem;
  }

  .gallery-tagline {
    font-size: 0.95rem;
  }
}

/* ============================================
   Gallery Filters
   ============================================ */

.gallery-filters-section {
  padding: 60px 0;
  background: white;
  border-bottom: 1px solid #e5e7eb;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-btn {
  background: white;
  border: 2px solid #e5e7eb;
  color: var(--text-dark);
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-red));
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.3);
}

.filter-btn i {
  font-size: 1.6rem;
}

@media (max-width: 768px) {
  .gallery-filters-section {
    padding: 40px 0;
  }

  .filter-buttons {
    gap: 10px;
  }

  .filter-btn {
    padding: 10px 16px;
    font-size: 1.1rem;
  }

  .filter-btn i {
    font-size: 1.2rem;
  }
}

/* ============================================
   Masonry Gallery Grid
   ============================================ */

.gallery-grid-section {
  padding: var(--section-padding);
  background: white;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  grid-auto-rows: 300px;
}

/* Create varying heights for masonry effect */
.gallery-item:nth-child(2) {
  grid-row: span 1.2;
}

.gallery-item:nth-child(4) {
  grid-row: span 0.9;
}

.gallery-item:nth-child(5) {
  grid-row: span 1.1;
}

.gallery-item:nth-child(7) {
  grid-row: span 1.15;
}

.gallery-item {
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  opacity: 1;
  transform: scale(1);
  animation: fadeInScale 0.6s ease-out;
}

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

.gallery-image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.gallery-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

.gallery-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.7), rgba(252, 161, 20, 0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}

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

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

.overlay-content {
  text-align: center;
  color: white;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

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

.overlay-content h3 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  font-weight: 600;
  font-family: var(--font-display);
}

.overlay-content p {
  font-size: 1.2rem;
  margin-bottom: 15px;
  opacity: 0.95;
}

.overlay-content i {
  font-size: 2.4rem;
  animation: float 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.image-placeholder {
  width: 100%;
  height: 100%;
}

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
  }

  .gallery-item {
    grid-row: span 1 !important;
  }
}

@media (max-width: 768px) {
  .gallery-grid-section {
    padding: 40px var(--section-padding-x);
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    grid-auto-rows: 250px;
  }

  .overlay-content h3 {
    font-size: 1.4rem;
  }

  .overlay-content p {
    font-size: 1rem;
  }
}

/* ============================================
   GLightbox Custom Styling
   ============================================ */

.glightbox .gslide-inner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.glightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
}

.gslide-title {
  color: white;
  font-size: 2rem;
  margin-top: 20px;
  font-family: var(--font-display);
}

.gslide-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.4rem;
  margin-top: 10px;
  max-width: 600px;
  text-align: center;
}

/* ============================================
   Instagram CTA Section
   ============================================ */

.gallery-cta {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.gallery-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent),
              radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.05), transparent);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-icon {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
  font-size: 4rem;
  backdrop-filter: blur(10px);
}

.gallery-cta h2 {
  font-size: clamp(2.4rem, 5vw, 4.4rem) !important;
  margin-bottom: 20px !important;
  font-family: var(--font-display) !important;
  color: white !important;
}

.gallery-cta p {
  font-size: clamp(1.4rem, 3vw, 2rem) !important;
  margin-bottom: 40px !important;
  max-width: 700px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  opacity: 0.95 !important;
  color: white !important;
}

.gallery-cta .btn {
  font-size: 1.6rem !important;
  padding: 15px 40px !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  background: white !important;
  color: var(--primary-blue) !important;
}

.gallery-cta .btn:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2) !important;
}

@media (max-width: 768px) {
  .gallery-cta {
    padding: 60px 0;
  }

  .cta-icon {
    width: 80px;
    height: 80px;
    font-size: 3rem;
  }

  .gallery-cta h2 {
    font-size: 2rem;
  }

  .gallery-cta p {
    font-size: 1rem;
  }
}

/* ============================================
   Utility Classes
   ============================================ */

.gallery-page main {
  background: white;
}

/* ============================================
   Simple Modal Lightbox Styles
   ============================================ */

.gallery-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

.gallery-modal.hidden {
  display: none;
  opacity: 0;
}

.gallery-modal-content {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  animation: zoomIn 0.3s ease-out;
}

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

.gallery-modal-caption {
  color: white;
  text-align: center;
  padding: 15px;
  font-size: 1.1rem;
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 80%;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  border-radius: 5px;
}

.gallery-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  user-select: none;
}

.gallery-modal-close:hover {
  color: var(--primary-yellow);
}

.gallery-modal-prev,
.gallery-modal-next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 30px;
  transition: 0.3s ease;
  border-radius: 3px;
  background-color: rgba(0, 0, 0, 0.5);
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  text-align: center;
}

.gallery-modal-prev:hover,
.gallery-modal-next:hover {
  background-color: var(--primary-blue);
  color: var(--primary-yellow);
}

.gallery-modal-prev {
  left: 20px;
}

.gallery-modal-next {
  right: 20px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .gallery-modal-content {
    max-width: 95vw;
    max-height: 70vh;
  }

  .gallery-modal-close {
    font-size: 35px;
    top: 10px;
    right: 15px;
  }

  .gallery-modal-prev,
  .gallery-modal-next {
    padding: 10px;
    font-size: 20px;
    min-width: 40px;
  }

  .gallery-modal-prev {
    left: 10px;
  }

  .gallery-modal-next {
    right: 10px;
  }

  .gallery-modal-caption {
    bottom: 10px;
    font-size: 0.9rem;
    max-width: 90%;
    padding: 8px 15px;
  }
}
