/* Base styles */
.outer-wrapper {
  width: 100%;
  margin: auto;
}

#galleryContainer > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  margin-top: 20px;
}

/* Main content */
.main-content {
  padding: 10px;
}

/* Topbar */
.topbar {
  background: linear-gradient(to right, #781c1c, #000000);
  color: white;
  padding: 7.5px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.topbar h1 {
  font-size: 24px;
  margin: 0;
  font-weight: 700;
  letter-spacing: 1px;
}

.load-more-btn {
  width: 180px;
  color: #fff;
  display: block;
  text-align: center;
  margin: 40px auto;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background-color: blue;
  transition: 0.3s;
}

/* .load-more-btn:hover {
  box-shadow: 0 0.5em 0.5em -0.4em var(--hover);
  transform: translateY(-0.25em);
} */

.load-more-btn:hover, 
.load-more-btn:focus {
  animation: load-more-btn 1s;
  box-shadow: 0 0 0 2em rgba(#fff,0);
}

/* Hero banner */
.hero-banner {
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 15px 15px;
  position: relative;
}

.hero-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero-banner h2 {
  font-size: 48px;
  font-weight: 700;
  z-index: 2;
  position: relative;
}

.hero-banner p {
  font-size: 18px;
  margin-top: 10px;
  z-index: 2;
  position: relative;
}

.accesseasy {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 8px 10px;
}

/* Gallery controls */
.gallery-controls {
  margin-bottom: 1rem;
}

/* Gallery grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding-top: 40px;
}

.item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateZ(0);
}

.thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.thumb:focus-visible {
  outline: 3px solid #0077b6;
  outline-offset: 2px;
}

.item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transition: transform 0.45s ease, filter 0.45s ease;
  will-change: transform;
}

.item:hover img {
  transform: scale(1.03);
}

/* Gallery event heading */
.gallery-event-heading {
  display: inline-block;
  padding: 6px 20px;
  margin: 5px 5px;
  font-size: 1.25rem;
  text-decoration-color: #0024f0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-left: 5px solid;
  background-color: #e9e9e9;
  color: #0024f0;
  border-color: #0024f0;
  width: auto;
  border-radius: 4px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.05);
}

/* Event description */
.event-description {
  margin: 10px 5px;
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
  padding: 0 20px;
}

/* Lightbox (Modal) */
.lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  background: rgba(0, 6, 15, 0.72);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 1100;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox__stage {
  width: min(92vw, 1100px);
  height: min(78vh, 70vw);
  border-radius: 12px;
  overflow: hidden;
  background: #0a0d13;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  display: grid;
  place-items: center;
  position: relative;
}

.lightbox__img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.lightbox__controls {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

/* Base Style (Adjusted for 3D) */
.ctrl {
  /* ... (Existing styles maintained) ... */
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 0;
  background: #c70000;
  background: linear-gradient(90deg, rgba(199, 0, 0, 1) 0%, rgba(9, 9, 121, 1) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  
  /* CRITICAL FOR 3D: Add a small transform for the button to have a stable starting point */
  transform: translateZ(0); 

  /* ENHANCEMENT: Smoother transition for multiple properties */
  transition: 
    transform 0.3s cubic-bezier(0.2, 0.8, 0.4, 1.2), /* Smooth bounce effect */
    box-shadow 0.3s ease-in-
}

/* 1. HOVER EFFECT: 3D Tilt and Lift */
/* The parent container needs perspective for the 3D effect to work, 
   but for a single element, we can sometimes fake it by only applying the transform. */
.ctrl:hover {
  /* Tilt: Rotate slightly on X and Y axis, based on mouse direction if possible, 
     but a fixed tilt is simpler and effective. */
  transform: 
    translateY(-3px) /* Lift higher than before */
    rotateX(5deg)    /* Subtle 3D tilt */
    rotateY(-5deg)
    scale(1.05);     /* Slightly grow the button */

  /* Shadow: Lifted and with a subtle glow */
  box-shadow: 
    0 10px 20px rgba(0, 0, 0, 0.45), /* Deeper main shadow */
    0 0 15px rgba(255, 50, 50, 0.7); /* Stronger red glow */

  /* Filter: A little brightness boost */
  filter: brightness(1.15); 
  
  /* Resetting the background hover, as it disrupts the gradient */
  background: linear-gradient(90deg, rgba(199, 0, 0, 1) 0%, rgba(9, 9, 121, 1) 100%);
}

/* 2. ACTIVE EFFECT: Deep Press and Radial Pulse */
.ctrl:active {
  /* Press: Squash the button, removing the 3D tilt */
  transform: scale(0.9) translateY(0); 
  
  /* Shadow: Flattened shadow to simulate contact */
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
  
  /* Animation: Trigger a custom pulse effect */
  animation: pulse-ring 0.4s ease-out;
}

/* Keyframes for the Radial Pulse */
@keyframes pulse-ring {
  0% {
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  50% {
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3), 0 0 0 15px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
}

.lightbox__meta {
  width: min(92vw, 1100px);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 4px 6px;
  color: #ccc;
  font-size: 0.95rem;
  align-items: center;
}

.lightbox__caption {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox__count,
.lightbox__total {
  font-weight: bold;
}

/* Collapsible content */
.collapsible {
  overflow: hidden;
  max-height: 0;
  transition: max-height 300ms ease-out;
}

.collapsible.is-open {
  max-height: 9999px;
}

@media screen and (max-width: 987px) {
  .collapsible.is-open {
    max-height: 12781px;
  }
}

/* Expand button */
.expand-wrapper {
  text-align: center;
  margin: 20px 0;
}

#expandBtn {
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: #fff;
  font-size: 1.1rem;
  padding: 12px 28px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#expandBtn:hover {
  background: linear-gradient(135deg, #66bb6a, #388e3c);
  transform: translateY(-2px);
}

#expandBtn:active {
  transform: scale(0.96);
}

/* Scroll to top button */
#scrollTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: #0077b6;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1000;
}

#scrollTopBtn.show {
  opacity: 1;
  visibility: visible;
}

/* Float button (WhatsApp) */
.float {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 1000;
}

.my-float {
  width: 60px;
  height: 60px;
}

/* Header and Navbar */
.headcontainer {
  width: 100%;
  margin: 0 auto;
  padding: 5px;
}

.tab-box {
  text-align: center;
}

.header-logo {
  width: 99%;
  height: auto;
  display: block;
  margin: 10px;
}

.custom-navbar {
  padding: 5px;
  background: linear-gradient(90deg, #8b0000, #1a1a2e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 1001;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.custom-navbar .brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.3rem;
  font-weight: bold;
  margin-right: 100px;
  text-decoration: none;
  color: #fff;
}

.custom-navbar .brand img {
  height: 40px;
  width: auto;
  display: block;
}

.custom-navbar .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  transition: right 0.3s;
}

.custom-navbar .nav-link {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  display: block;
}

.custom-navbar .nav-link:hover,
.custom-navbar .nav-link:focus {
  background: #d63911;
  color: #fff;
}

.custom-navbar .nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  margin-left: 1rem;
}

/* Footer */
.footer-section {
  margin-left: 10px;
  margin-right: 10px;
  margin-top: 20px;
  background: linear-gradient(90deg, #800000 0%, #1a1a2e 100%);
  color: #fff;
  font-family: "Poppins", Arial, sans-serif;
  padding: 2.5rem 0 1.2rem 0;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -2px 16px rgba(128, 0, 0, 0.08);
}

.footer-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.1rem;
  letter-spacing: 0.04em;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: #ffd700;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
  transition: color 0.2s, background 0.2s;
  border-radius: 6px;
  padding: 0.1em 0.2em;
}

.footer-link:hover {
  color: #fff;
  background: rgba(128, 0, 0, 0.12);
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  color: #eee;
  font-size: 0.98rem;
  margin-top: 2rem;
  letter-spacing: 0.03em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-banner h2 {
    font-size: 36px;
  }

  .hero-banner p {
    font-size: 16px;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
  }

  .custom-navbar {
    margin-left: 10px;
  }

  .footer-section {
    margin-left: 10px;
    margin-right: 10px;
  }
}

@media (max-width: 900px) {
  .custom-navbar .nav-links {
    position: fixed;
    top: 60px;
    right: -100vw;
    background: #1a1a2e;
    flex-direction: column;
    width: 220px;
    height: 100vh;
    align-items: flex-start;
    padding: 2rem 1.2rem;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.12);
    z-index: 2000;
    transition: right 0.3s cubic-bezier(0.4, 2, 0.6, 1);
  }

  .custom-navbar .nav-links.open {
    right: 0;
    top: 150px;
  }

  .custom-navbar .nav-toggle {
    display: block;
  }
}

@media (min-width: 992px) {
  .custom-navbar {
    margin-right: 10px;
    padding: 20px;
  }

  .footer-section {
    margin-right: 10px;
  }
}
