/* ==========================
   GLOBAL SAFETY RESET
========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  font-family: 'Poppins', sans-serif;
}

/* ==========================
   GALLERY MAIN WRAPPER
========================== */
.gallery-main {
  padding: 4rem 2rem;
  background: #f8f9fa;
  color: #222;
  width: 100%;
}


/* Push page content below navbar */
.gallery-main {
  margin-top: 90px; /* adjust if your nav is taller/shorter */
}

/* ==========================
   SECTION HEADER
========================== */
.gallery-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #0b2545;
}

.section-subtitle {
  font-size: 1rem;
  color: #555;
  margin-top: 0.5rem;
}

/* ==========================
   FILTER BUTTONS
========================== */
.gallery-filters {
  text-align: center;
  margin-bottom: 2rem;
}

.filter-btn {
  background: #e9ecef;
  color: #0b2545;
  border: none;
  padding: 0.6rem 1.2rem;
  margin: 0.3rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
  background: #0b2545;
  color: #fff;
}

/* ==========================
   GALLERY GRID
========================== */
.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ==========================
   GALLERY CARD
========================== */
.gallery-card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* ==========================
   CARD MEDIA
========================== */
.card-media {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-card:hover .card-media img {
  transform: scale(1.05);
}

/* ==========================
   OVERLAY
========================== */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 37, 69, 0.65);
  opacity: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
}

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

.view-text {
  color: #fff;
  font-weight: 600;
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

/* ==========================
   CARD CONTENT
========================== */
.card-content {
  padding: 1rem 1.2rem;
  text-align: center;
}

.card-content h3 {
  font-size: 1.1rem;
  color: #0b2545;
  margin-bottom: 0.5rem;
}

.card-content p {
  font-size: 0.9rem;
  color: #555;
}

/* ==========================
   DID YOU KNOW
========================== */
.did-you-know {
  background: #0b2545;
  color: #fff;
  text-align: center;
  margin: 3rem auto 0;
  padding: 2rem 1rem;
  border-radius: 15px;
  max-width: 1200px;
}

.did-you-know h3 {
  font-size: 1.2rem;
  color: #ffc107;
  margin-bottom: 0.5rem;
}

.did-you-know p {
  font-size: 1rem;
  color: #f8f9fa;
}

/* ==========================
   MODAL
========================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  padding-top: 70px;
  background: rgba(0,0,0,0.85);
}

.modal.show {
  display: block;
}

.modal-carousel {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.modal-carousel img,
.modal-carousel video {
  max-width: 80%;
  border-radius: 10px;
}

/* ==========================
   CLOSE BUTTON
========================== */
.close {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 35px;
  color: #fff;
  cursor: pointer;
}

.close:hover {
  color: #ffc107;
}

/* ==========================
   RESPONSIVE
========================== */
@media (max-width: 768px) {
  .gallery-main {
    padding: 2rem 1rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .card-media {
    height: 180px;
  }
}
