/* ===== GALLERY PAGE STYLES ===== */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  /* Enhanced background with stronger contrast and patterns for better glassmorphism visibility */
  background: radial-gradient(circle at 25% 75%, rgba(0, 63, 136, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 75% 25%, rgba(255, 153, 51, 0.2) 0%, transparent 50%),
    linear-gradient(
      135deg,
      rgba(255, 245, 245, 0.9) 0%,
      rgba(255, 255, 255, 0.3) 25%,
      rgba(235, 245, 255, 0.9) 50%,
      rgba(255, 255, 255, 0.3) 75%,
      rgba(245, 255, 245, 0.9) 100%
    );
  background-attachment: fixed;
  min-height: 100vh;
}

/* Added subtle pattern overlay for enhanced glassmorphism effect */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.2) 1px, transparent 0);
  background-size: 25px 25px;
  pointer-events: none;
  z-index: -1;
}

/* ===== GALLERY CONTAINER ===== */
.gallery-container {
  position: relative;
  min-height: 100vh;
  padding: 80px 0;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== BACK NAVIGATION BUTTON ===== */
.back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  /* Enhanced glassmorphism with stronger blur and transparency */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(25px) saturate(180%);
  color: #003f88;
  padding: 12px 20px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.back-btn:hover {
  /* More dramatic hover effect with stronger glow */
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 20px 60px rgba(0, 63, 136, 0.3), inset 0 0 30px rgba(0, 63, 136, 0.15);
  border-color: rgba(0, 63, 136, 0.5);
  backdrop-filter: blur(30px) saturate(200%);
}

.back-btn i {
  font-size: 14px;
}

/* ===== GALLERY PAGES ===== */
.gallery-page {
  display: none;
  animation: fadeIn 0.5s ease-in;
}

.gallery-page.active {
  display: block;
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== GALLERY HEADER ===== */
.gallery-header {
  text-align: center;
  margin-bottom: 50px;
  padding-top: 40px;
}

.gallery-header h2 {
  font-size: 2.5rem;
  color: #1f2937;
  margin-bottom: 10px;
  font-weight: bold;
}

.gallery-header p {
  font-size: 1.1rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== GALLERY GRID ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

/* ===== GALLERY ITEMS ===== */
.gallery-item {
  position: relative;
  height: 250px;
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
  /* Enhanced glassmorphism with stronger transparency and blur */
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(25px) saturate(180%);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -1px 0
    rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.gallery-item:hover {
  /* More dramatic hover effect with enhanced glassmorphism */
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2), inset 0 0 40px rgba(0, 63, 136, 0.15), inset 0 1px 0
    rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 63, 136, 0.5);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(30px) saturate(200%);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

/* ===== GALLERY OVERLAY ===== */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Enhanced overlay with stronger glassmorphism */
  background: rgba(0, 63, 136, 0.7);
  backdrop-filter: blur(20px) saturate(150%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.4s ease;
  padding: 20px;
  text-align: center;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: blur(3px);
}

.gallery-overlay-text {
  color: white;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 500;
  /* Added subtle glow to overlay text */
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ===== LOADING ANIMATION ===== */
.loading {
  text-align: center;
  padding: 40px;
  font-size: 1.2rem;
  color: #6b7280;
}

.loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ===== ERROR STATE ===== */
.error-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.error-content {
  text-align: center;
  padding: 40px;
}

.error-content i {
  font-size: 4rem;
  color: #ef4444;
  margin-bottom: 20px;
}

.error-content h2 {
  font-size: 2rem;
  color: #1f2937;
  margin-bottom: 10px;
}

.error-content p {
  font-size: 1.1rem;
  color: #6b7280;
  margin-bottom: 30px;
}

.retry-btn {
  /* Enhanced glassmorphism for retry button */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(25px) saturate(180%);
  color: #003f88;
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.retry-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 20px 60px rgba(0, 63, 136, 0.3), inset 0 0 30px rgba(255, 153, 51, 0.15);
  backdrop-filter: blur(30px) saturate(200%);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .gallery-container {
    padding: 60px 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .gallery-header {
    margin-bottom: 40px;
    padding-top: 60px;
  }

  .gallery-header h2 {
    font-size: 2rem;
  }

  .gallery-item {
    height: 220px;
  }

  .back-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    padding: 10px 16px;
    font-size: 14px;
  }

  .gallery-overlay-text {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .gallery-container {
    padding: 40px 0;
  }

  .gallery-header h2 {
    font-size: 1.8rem;
  }

  .gallery-header p {
    font-size: 1rem;
  }

  .gallery-item {
    height: 200px;
  }

  .back-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .gallery-overlay-text {
    font-size: 0.85rem;
  }
}

/* ===== ACCESSIBILITY ===== */
.gallery-item:focus {
  outline: 2px solid #003f88;
  outline-offset: 2px;
}

.back-btn:focus {
  outline: 2px solid #003f88;
  outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
  .back-btn {
    display: none;
  }

  .gallery-overlay {
    display: none;
  }

  .gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
  }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
  .gallery-overlay {
    background: rgba(0, 0, 0, 0.9);
  }

  .back-btn {
    border: 2px solid white;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .gallery-item,
  .gallery-item img,
  .gallery-overlay,
  .back-btn {
    transition: none;
  }

  .loading::after {
    animation: none;
  }

  @keyframes fadeIn {
    from,
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* === FOOTER === */
.footer {
  background: linear-gradient(135deg, #0b1f4b 0%, #111827 100%);
  display: absolute;
  color: white;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding: 32px 20px;
  max-width: 1200px; 
  margin: 0 auto;     
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}


.footer-bottom p {
  color: #9ca3af;
  font-size: 14px;
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
  color: white;
}