/* Hero Section */
.gallery-hero {
    height: 60vh;
    background: url('img/new/gallery_p.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.5);
    padding: 40px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-overlay h1 {
    font-size: 4.5rem;
    text-transform: uppercase;
    letter-spacing: 8px;
    color: #fff;
    animation: fadeInUp 1s ease;
}

/* Header & Setup */
.gallery-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 60px 20px; 
}

.gallery-header { 
    text-align: center; 
    margin-bottom: 40px; 
}

.gallery-header h2 {
    font-size: 2.8rem; 
    line-height: 1.6; 
    color: #281f60;
}

.gallery-header p {
    color: #1e72b8;
}

/* Dynamic Filter Controls */
.filter-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border: 2px solid transparent;
    background: #fff;
    color: #281f60;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.filter-btn:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #1e72b8;
    color: white;
    box-shadow: 0 6px 15px rgba(30, 114, 184, 0.3);
}

/* Gallery Grid & Hover Overlay */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 3rem;
    min-height: 400px; 
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    background: #838181;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.gallery-item img {
    width: 100%;
    display: block;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-item img.loaded {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(30, 41, 59, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.event-name {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    padding: 1rem;
    transform: translateY(20px);
    transition: transform 0.4s ease;
    letter-spacing: 1px;
}

.gallery-item:hover .event-name {
    transform: translateY(0);
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
}

.page-btn {
    padding: 10px 20px;
    border: none;
    background: #281f60;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background: #1e72b8;
}

.page-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.page-info {
    font-weight: 600;
    color: #281f60;
    font-size: 1.1rem;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.close-lightbox {
    position: absolute;
    top: 25px;
    right: 40px;
    color: white;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-lightbox:hover {
    color: #1e72b8;
}

#lightbox-caption {
    color: white;
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* CTA Section */
.gallery-cta {
    background-image: url("https://images.unsplash.com/photo-1492724441997-5dc865305da7");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-content { text-align: center; color: #fff; padding: 40px 20px; }
.cta-content h2 { font-size: 2.2rem; margin-bottom: 10px; }
.cta-content p { font-size: 1.1rem; margin-bottom: 20px; opacity: 0.9; }
.cta-button { display: inline-block; padding: 12px 28px; background: #281f60; color: #fff; text-decoration: none; border-radius: 4px; font-weight: 600; transition: 0.3s ease; }
.cta-button:hover { background: #1e72b8; }

/* Responsive grid adjustments */
@media (max-width: 1024px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery-grid { grid-template-columns: 1fr; } }

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  background: none;
  border: none;
  gap: 5px;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: white;
  transition: all 0.3s ease;
}

/* Mobile Responsiveness – matches home hero reduction */
@media (max-width: 768px) {
  /* Show the toggle button */
  .menu-toggle {
    display: flex;
  }

  /* Hide the nav links by default and stack them */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    text-align: center;
    background-color: #444;
    position: absolute;
    top: 60px;
    left: 0;
  }

  .nav-links li {
    padding: 15px 0;
  }

  .nav-links.active {
    display: flex;
  }

  /* ---------- Compact hero (same as home) ---------- */
  .gallery-hero {
    height: 55vh;              /* smaller height */
    padding: 60px 1.5rem 80px; /* tighter padding */
  }

  .hero-overlay {
    padding: 20px;             /* reduce inner space */
  }

  .hero-overlay h1 {
    font-size: 2rem;           /* scaled down from 3rem/4.5rem */
    letter-spacing: 4px;
  }
}

/* Extra‑small phones */
@media (max-width: 480px) {
  .gallery-hero {
    height: 45vh;
    padding: 40px 1rem 60px;
  }

  .hero-overlay h1 {
    font-size: 1.8rem;
    letter-spacing: 2px;
  }
}