/* =========================================
   GALLERY PAGE STYLES
   ========================================= */

/* Hero Section */
.gallery-hero {
  position: relative;
  background-color: #E1F1F6;
  padding: 180px 20px 120px;
  text-align: center;
  overflow: hidden;
}

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

.breadcrumb-trail {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  color: #F28C53;
  margin-bottom: 20px;
}
.breadcrumb-trail a { color: #4B8B9B; text-decoration: none; transition: color 0.2s; }
.breadcrumb-trail a:hover { color: #F28C53; }
.breadcrumb-trail i { font-size: 0.8rem; margin: 0 8px; color: #9AD1D4; }

.gallery-hero-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 3.5rem;
  color: #2B4E5B;
  margin-bottom: 15px;
}

.gallery-hero-sub {
  font-family: 'Nunito', sans-serif;
  font-size: 1.2rem;
  color: #4B8B9B;
  max-width: 600px;
  margin: 0 auto;
}

.gallery-float { position: absolute; animation: float 4s ease-in-out infinite; }
.gallery-float-1 { top: 15%; left: 15%; }
.gallery-float-2 { top: 50%; right: 15%; animation-delay: 1s; }
.gallery-float-3 { bottom: 25%; left: 20%; animation-delay: 2s; }

.gallery-hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 2;
}

/* Gallery Section */
.gallery-section {
  padding: 40px 20px 80px;
  background-color: #FFFFFF;
}

.gallery-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Masonry Grid */
.masonry-grid {
  columns: 3;
  column-gap: 20px;
}

@media (max-width: 1024px) {
  .masonry-grid { columns: 2; }
}

@media (max-width: 600px) {
  .masonry-grid { columns: 1; }
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  background-color: #f4f4f4;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  animation: fadeUpItem 0.6s ease forwards;
}

@keyframes fadeUpItem {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gallery-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
  z-index: 2;
}

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

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(43,78,91,0.8), rgba(43,78,91,0) 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

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

.gallery-icon {
  color: #FFF;
  font-size: 1.5rem;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.3s ease 0.1s, opacity 0.3s ease 0.1s;
}

.gallery-item:hover .gallery-icon {
  transform: translateY(0);
  opacity: 1;
}

/* View More */
.view-more-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 50px;
}

.btn-view-more {
  padding: 15px 30px;
  font-size: 1.1rem;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #F28C53;
}
.btn-view-more:hover { background-color: #d97d4a; }

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 20, 25, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-container {
  max-width: 85%;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.lightbox-overlay.active .lightbox-img {
  transform: scale(1);
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  background: none;
  border: none;
  color: #FFF;
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
  z-index: 10000;
}
.lightbox-close:hover {
  color: #F28C53;
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: #FFF;
  font-size: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.2s;
  z-index: 10000;
}
.lightbox-nav:hover {
  background: rgba(242, 140, 83, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

@media (max-width: 768px) {
  .lightbox-prev { left: 10px; width: 40px; height: 40px; font-size: 1.2rem; }
  .lightbox-next { right: 10px; width: 40px; height: 40px; font-size: 1.2rem; }
  .lightbox-close { top: 15px; right: 15px; font-size: 2.5rem; }
  .lightbox-img-container { max-width: 95%; }
}

/* =========================================
   CTA & FOOTER (Imported from classes.css)
   ========================================= */
.cls-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.cls-cta {
  padding: 80px 0;
  background: var(--color-bg-hero);
}

.cta-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-secondary), #1e3842);
  border-radius: 28px;
  padding: 60px 40px;
  text-align: center;
}

.cta-doodle {
  position: absolute;
  opacity: 0.5;
  animation: floatA 5s ease-in-out infinite;
}
.cd-1 { top: 20px; left: 30px; }
.cd-2 { bottom: 20px; right: 40px; animation-delay: 1s; }

.cta-card h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.cta-card p {
  font-family: var(--font-body);
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 28px;
  position: relative;
  z-index: 2;
}

.btn-cta {
  font-size: 16px;
  padding: 14px 36px;
  position: relative;
  z-index: 2;
}

/* ---- FOOTER ---- */
.cls-footer {
  background: var(--color-secondary);
  padding: 50px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.footer-brand .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.footer-tagline { font-family: var(--font-body); font-size: 14px; color: rgba(255,255,255,0.6); }
.footer-links { display: flex; gap: 28px; }
.footer-links a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--color-primary); }
.footer-copy { font-family: var(--font-body); font-size: 13px; color: rgba(255,255,255,0.4); margin-top: 8px; }

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

.anim-el { opacity: 0; }
.anim-el.is-visible[data-anim="fadeUp"] {
  animation: fadeInUp 0.8s ease forwards;
}

/* =========================================
   VIDEO TESTIMONIAL CAROUSEL
   ========================================= */
.video-carousel-section {
  padding: 80px 20px;
  background-color: #f8f8f8;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.video-carousel-header h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 10px;
}
.video-carousel-header p {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 40px;
}

.carousel-container-outer {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  gap: 20px;
  padding: 40px 0;
  width: 100%;
}
.carousel-track::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* empty pseudo elements to push first and last items to the middle */
.carousel-track::before,
.carousel-track::after {
  content: '';
  flex: 0 0 calc(50% - 310px); /* half of card width + half gap */
}

.carousel-card {
  flex: 0 0 600px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 400ms ease;
}

.carousel-card.is-active {
  /* You can add active states here if needed later */
}

.vid-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  margin-bottom: 20px;
  background-color: #000;
}

.vid-container iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-card h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-primary);
  margin-bottom: 5px;
}

.carousel-card p {
  font-family: var(--font-body);
  font-size: 1rem;
  color: #777;
}


/* Navigation Buttons */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-100%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #1a2a33;
  color: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  display: grid;
  place-content: center;
  transition: all 200ms ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.carousel-nav-btn:hover {
  background-color: var(--color-primary);
  transform: translateY(-100%) scale(1.1);
}
.carousel-nav-btn.prev {
  left: -60px;
}
.carousel-nav-btn.next {
  right: -60px;
}
@media (max-width: 768px) {
  .carousel-nav-btn { display: none; }
  .carousel-track { gap: 20px; }
  .carousel-track::before,
  .carousel-track::after {
    flex: 0 0 calc(50% - 160px); /* Adjust based on new card size for mobile */
  }
  .carousel-card { flex: 0 0 300px; }
}

/* Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #d1d5db;
  cursor: pointer;
  transition: all 300ms ease;
}
.dot.active {
  background-color: var(--color-primary);
  transform: scale(1.3);
}
