/* General reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Light Mode (default) */
:root {
  --background-color: #f9f9f9;
  --text-color: #333;
  --header-footer-bg: #f4f4f4;
  --header-footer-border: #ddd;
  --box-shadow: rgba(0, 0, 0, 0.1);
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #1a1a1a;
    --text-color: #f4f4f4;
    --header-footer-bg: #333;
    --header-footer-border: #444;

    --box-shadow: rgba(0, 0, 0, 0.5);
  }
}

/* Apply Theme Variables */
body {
  background-color: var(--background-color);
  color: var(--text-color);
}

header,
footer {
  background-color: var(--header-footer-bg);
  border-color: var(--header-footer-border);
  box-shadow: 0 4px 6px var(--box-shadow);
}

/* Header with Neutral Tone */
header {
  text-align: center;
  padding: 1rem;
  font-family: 'Arial', sans-serif;
  border-bottom: 2px solid #ddd;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  padding: 1rem;
}

.gallery-grid img {
  transition: transform 0.3s ease;
  /* Smooth effect for parallax */
  width: 100%;
  /* Ensure the image always fills its grid cell */
  height: auto;
  /* Maintain aspect ratio */
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.gallery-grid img:hover {
  transform: scale(1.02);
  /* Subtle hover effect */
}

/* Small screens */
@media (max-width: 600px) {
  .gallery-grid {
    gap: 5px;
  }
}

/* Medium screens */
@media (max-width: 1024px) {
  .gallery-grid {
    gap: 8px;
    /* Proportional gap for medium screens */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* Footer with Neutral Tone */
footer {
  text-align: center;
  padding: 1rem;
  font-family: 'Arial', sans-serif;
  border-top: 2px solid #ddd;
  font-size: clamp(0.8rem, 1vw, 1rem);
  /* Responsive font size */
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

/* Lightbox Overlay */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#lightbox img.loading {
  filter: blur(10px);
  transition: filter 0.3s ease;
}

#lightbox img:not(.loading) {
  filter: none;
}


.lightbox.visible {
  visibility: visible;
  opacity: 1;
}


.lightbox img {
  max-width: 90vw;
  /* Limit to 90% of the viewport width */
  max-height: 90vh;
  /* Limit to 90% of the viewport height */
  width: auto;
  /* Automatically adjust width */
  height: auto;
  /* Automatically adjust height */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  /* Ensure the image scales without cropping */
  display: block;
  /* Ensure the image respects centering */
  margin: auto;
  /* Center image within lightbox */
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: none;
  color: white;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  padding: 0 1rem;
}

.lightbox-nav.prev {
  left: 1rem;
}

.lightbox-nav.next {
  right: 1rem;
}

.hidden {
  visibility: hidden;
  /* Hides the image without removing it from the layout */
}

.loading-spinner {
  position: fixed;
  /* Fixed position to overlay on the screen */
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-size: 1.2rem;
  color: #0077cc;
  z-index: 1000;
  /* Ensure it appears above other elements */
  display: none;
  /* Initially hidden */
  pointer-events: none;
  /* Prevent spinner from interfering with clicks */
}

.loading-spinner.visible {
  display: block;
  /* Show spinner when needed */
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 255, 0.2);
  /* Light blue border */
  border-top-color: #0077cc;
  /* Blue for the spinner effect */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

.transition-image {
  position: fixed;
  z-index: 9999;
  /* above everything */
  transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease;
  transform-origin: center center;
}

.load-more-container {
  text-align: center;
  margin: 20px 0;
}

#load-more {
  background-color: #0077cc;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#load-more:hover {
  background-color: #005fa3;
}

/* ageModal.css */
#age-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

#age-modal {
  background-color: #fff;
  color: #000;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
  width: 80%;
}

#age-modal h2 {
  margin-bottom: 1rem;
}

#age-modal button {
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
}

#checkAdultContainer {
  position: fixed; /* Fix it in place */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10; /* Ensure it stays above other content */
  background: rgba(255, 255, 255, 0.8); /* Slightly opaque for contrast */
  border: 2px solid #ccc;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#blurOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Darken the background */
  backdrop-filter: blur(10px); /* Apply the blur effect */
  z-index: 5; /* Ensure it's below the checkAdult box */
}

.ad-block {
  /* This ensures it spans just like an image would */
  width: 100%;
  height: auto; 
  min-height: 200px; /* or whatever you want */
  display: flex;
  align-items: center;
  justify-content: center;
  /* Some placeholder styling */
  background-color: #fff3;
  border: 2px dashed #ccc;
  margin-bottom: 1rem;
}



@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}