/* ===== GALLERY SECTION ===== */
.gallery {
  padding: 100px 0;
  background: #f8f9fa;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-header {
  margin-bottom: 4rem;
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 1rem;
  text-align: center;
  position: relative;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  line-height: 1.2;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, var(--icon_color), var(--btn_color));
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #666;
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.gallery-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 300px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(85, 55, 61, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-content {
  text-align: center;
  color: white;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.gallery-item:hover .gallery-content {
  transform: translateY(0);
}

.gallery-content h4 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.gallery-content p {
  font-size: 1rem;
  opacity: 0.9;
  margin: 0;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 10px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2001;
}

.lightbox-close:hover {
  color: var(--icon_color);
  transform: scale(1.1);
}

.lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 20px;
  z-index: 2001;
}

.lightbox-caption h4 {
  margin: 0 0 5px 0;
  font-size: 1.2rem;
}

.lightbox-caption p {
  margin: 0;
  opacity: 0.9;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet Styles */
@media screen and (max-width: 768px) {
  .gallery {
    padding: 60px 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .gallery-item {
    height: 250px;
  }

  .container {
    padding: 0 15px;
  }
}

/* Mobile Styles */
@media screen and (max-width: 480px) {
  .gallery {
    padding: 40px 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-item {
    height: 200px;
  }

  .gallery-content h4 {
    font-size: 1.3rem;
  }

  .gallery-content p {
    font-size: 0.9rem;
  }

  .lightbox-close {
    top: 10px;
    right: 20px;
    font-size: 30px;
  }

  .lightbox-caption {
    bottom: 10px;
    padding: 8px 15px;
  }
}

/* Extra Small Mobile */
@media screen and (max-width: 320px) {
  .section-title {
    font-size: 1.6rem;
  }

  .gallery-item {
    height: 180px;
  }
}

/* ===== ACCESSIBILITY ===== */
.gallery-item {
  outline: none;
}

.gallery-item:focus {
  outline: 2px solid var(--icon_color);
  outline-offset: 2px;
}

.lightbox-close:focus {
  outline: 2px solid var(--icon_color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .gallery-overlay {
    background: rgba(0, 0, 0, 0.9);
  }

  .lightbox {
    background-color: rgba(0, 0, 0, 0.95);
  }
}
