:root {
  --primary-color: #003f5c;
  --accent-color: #2a9d8f;
  --highlight-color: #2f855a;
  --bg-color: #fdfcfb;
  --text-color: #1a202c;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
}

header {
  position: relative;
  height: 355px;
  overflow: hidden;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
  padding: 1rem 0;
}
#bg-layer {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}

header > h1 {
  z-index: 1;
  margin: 0;
  padding: 0.75rem 2rem;
  background: rgba(0, 63, 92, 0.7);
  color: #e0f7fa;
  font-size: 2.5rem;
  font-weight: 700;
  border-radius: 0.5rem;
  backdrop-filter: blur(2px);
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
  text-align: center;
}


header > nav {
  z-index: 2;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.75rem 0;
  width: 100%;
  text-align: center;
}

nav a {
  margin: 0 1.5rem;
  color: #e0f7fa;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

nav a:hover {
  color: white;
}

main {
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

footer {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: 3rem;
}

.site-nav {
  background-color: var(--primary-color);
  position: relative;
  padding: 0.5rem 1rem;
}

.nav-toggle {
  display: none;
  background: none;
  color: #e0f7fa;
  font-size: 1.5rem;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Base nav list */
.site-nav .nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav a {
  color: #e0f7fa;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  display: block;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: white;
}

/* Dropdown */
.site-nav .has-dropdown {
  position: relative;
}

.site-nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--primary-color);
  min-width: 200px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 1000;
  border-radius: 0 0 4px 4px;
}

.site-nav .dropdown a {
  padding: 0.75rem 1.5rem;
  white-space: nowrap;
}

/* Desktop styles */
@media (min-width: 769px) {
  .site-nav .has-dropdown:hover > .dropdown {
    display: block;
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  .site-nav {
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1000;
  }

  .nav-toggle {
    display: block;
    padding: 0.75rem;
    margin: 0;
  }

  .site-nav .nav-menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 3.5rem 1rem 1rem;
    gap: 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    z-index: 1000;
  }

  .site-nav.open .nav-menu {
    display: flex;
  }

  .site-nav li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .site-nav li:last-child {
    border-bottom: none;
  }

  .site-nav .has-dropdown > a {
    position: relative;
    padding-right: 2rem;
  }

  .site-nav .has-dropdown > a::after {
    content: "▼";
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
    transition: transform 0.2s ease;
  }

  .site-nav .has-dropdown.open > a::after {
    transform: translateY(-50%) rotate(180deg);
  }

  .site-nav .dropdown {
    position: static;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    min-width: 100%;
    padding-left: 1rem;
  }

  .site-nav .has-dropdown.open .dropdown {
    display: block;
  }
}

/* Dropdown styles */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--primary-color);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 5;
}

.dropdown li {
  width: max-content;
}

.dropdown a {
  padding: 0.75rem 1.5rem;
  white-space: nowrap;
}

.image-gallery {
  margin-top: 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  margin: 0;
}

.gallery-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1; /* Uniform square boxes */
  overflow: hidden;
  text-decoration: none;
  color: white;
  background: #000; /* Optional: background to fill empty space */
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Or 'contain' if you want letterboxing instead */
  display: block;
  transition: transform 0.3s ease;
}

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

/* Caption overlay */
.gallery-caption {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 0.5rem 1rem;
  background: rgba(0, 63, 92, 0.75);
  font-size: 0.95rem;
  color: #e0f7fa;
  text-align: center;
  box-sizing: border-box;
}

#gallery-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 20, 30, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#gallery-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.overlay-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  margin: auto;
}

#gallery-overlay img {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
  margin: 0;
}

.overlay-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
  z-index: 1;
}

.overlay-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.overlay-prev {
  left: 1rem;
}

.overlay-next {
  right: 1rem;
}

.overlay-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  z-index: 1;
}

.overlay-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Hide dropdowns by default */
.site-nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--primary-color);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 5;
}

/* Show dropdowns only when parent is hovered */
.site-nav li.has-dropdown:hover > .dropdown {
  display: block;
}

/* Album listing styles */
.album-listing {
  margin-top: 2rem;
}

.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  margin: 0;
}

.album-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  text-decoration: none;
  color: white;
  background: #000;
}

.album-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.album-item:hover img {
  transform: scale(1.05);
}

.album-caption {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 0.5rem 1rem;
  background: rgba(0, 63, 92, 0.75);
  font-size: 0.95rem;
  color: #e0f7fa;
  text-align: center;
  box-sizing: border-box;
}
