/* CAROUSEL */

.carousel {
  position: relative;
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}


/* IMAGE OVERLAY (error + subtle depth) */

.image-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;

  display: flex;
  align-items: center;
  justify-content: center;

  color: rgba(255,255,255,0.9);
  font-weight: 600;
  text-align: center;
  padding: 12px;
  font-size: 0.95rem;

  background: linear-gradient(rgba(0,0,0,0.0), rgba(0,0,0,0.18));
}


/* NAV BUTTONS (minimal, no boxes) */

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  background: none;
  border: none;

  color: rgba(255,255,255,0.08); /* nearly invisible */
  font-size: 1.6rem;

  cursor: pointer;
  z-index: 10;

  transition: color 0.15s ease, transform 0.1s ease;
  line-height: 1;
}

/* position */
.nav.left { left: 10px; }
.nav.right { right: 10px; }

/* subtle reveal when hovering anywhere in gallery */
.carousel:hover .nav {
  color: rgba(255,255,255,0.25);
}

/* strong reveal on direct hover */
.nav:hover {
  color: rgba(255,255,255,0.9);
  transform: translateY(-50%) scale(1.1);
}

.nav:active {
  transform: translateY(-50%) scale(0.95);
}

.nav[disabled],
.nav[aria-disabled="true"] {
  opacity: 0.2;
  pointer-events: none;
}


/* GALLERY HEADER (HOME LINK) */
.gallery-header {
  cursor: pointer;
  user-select: none;

  background: #476b3c;
  color: #fff;
  padding: 10px;

  font-family: 'Knewave', cursive;
  font-size: 1.2rem;

  position: relative;
  z-index: 20;
}

/* focus accessibility */
.gallery-header:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(78,160,255,0.24);
}

.gallery-header:hover {
  filter: brightness(0.95);
}


/* FIXED GALLERY VIEWPORT */
.gallery-body {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 600px;

  position: relative;
}


/* LAYER STACKING */
.gallery-window .window-header { 
  position: relative; 
  z-index: 20; 
}

.gallery-window .window-body { 
  position: relative; 
  z-index: 5; 
}


/* RESPONSIVE */
@media (max-width: 640px) {
  .nav {
    font-size: 1.5rem;
  }

  .gallery-header {
    font-size: 1.05rem;
    padding: 8px;
  }
}


/* BANNER TILE */
.banner-tile .window-body.banner {
  cursor: pointer;
  height: 220px;
  overflow: hidden;
}

#galleryBanner {
  cursor: pointer;
  z-index: 5;
}

#galleryBanner .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* ACCESSIBILITY */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  border: 0 !important;
}

#galleryBanner:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(78,160,255,0.24);
}