/* ================== Root Colors ================== */
:root {
  --navy-dark: #0a1f44;
  --navy: #102a5c;
  --navy-light: #1e3a8a;
  --accent: #38bdf8;
  --sand: #e2d3a7;
  --white: #ffffff;
}

/* ================== Global ================== */
body {
  font-family: 'Poppins', sans-serif;
  background: var(--navy-dark);
  color: var(--white);
  margin: 0;
}

/* ================== HEADER ================== */
.map-header {
  background:
    linear-gradient(rgba(10,31,68,0.92), rgba(10,31,68,0.92)),
    url('https://www.transparenttextures.com/patterns/old-map.png');
  color: var(--white);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.map-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;  /* prevent wrapping */
}

/* Logo */
.map-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Cinzel', serif;
  font-size: 28px;
  letter-spacing: 1px;
}
.map-logo i {
  color: var(--sand);
  font-size: 28px;
}

/* Nav */
.map-nav {
  display: flex;
  gap: 28px;
  flex-shrink: 1;  /* lets nav shrink to stay on one line */
}

.map-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

/* Nav underline animation */
.map-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: 0.3s;
}

.map-nav a:hover::after,
.map-nav a.active::after {
  width: 100%;
}

/* Menu toggle for mobile */
.menu-toggle {
  display: none;
  font-size: 22px;
  cursor: pointer;
}

/* Compass divider */
.compass-bar {
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
  color: var(--sand);
  letter-spacing: 8px;
  opacity: 0.8;
}

/* ================== ALBUM & PHOTO GRID ================== */
/* Album & photo grid */
.album-grid,
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  padding: 20px;
  justify-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.album-grid a img,
.photo-grid img {
  width: 100%;
  max-width: 250px;   /* max thumbnail width */
  height: 200px;      /* uniform thumbnail height */
  object-fit: cover;  /* preserves portrait/landscape without distortion */
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s;
}

.album-grid a img:hover,
.photo-grid img:hover {
  transform: scale(1.05);
}

.album-grid a p {
  text-align: center;
  margin-top: 6px;
  color: var(--white);
  font-weight: 500;
}

#title,
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto 20px auto; /* center horizontally, add bottom spacing */
  padding: 0 10px;          /* small horizontal padding for mobile */
  text-align: left;
}

/* ================== LIGHTBOX ================== */
#lightbox {
  display: none;
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  flex-direction: column;
  overflow: hidden;
}

#lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

/* Lightbox arrows */
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  color: var(--white);
  cursor: pointer;
  user-select: none;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 10000;
}

.lightbox-arrow:hover {
  opacity: 1;
}

.lightbox-arrow.left {
  left: 20px;
}

.lightbox-arrow.right {
  right: 20px;
}

/* Caption (optional) */
.lightbox-caption {
  color: var(--white);
  margin-top: 10px;
  font-size: 16px;
  text-align: center;
}

/* ================== FOOTER ================== */
.map-footer {
  background:
    linear-gradient(rgba(10,31,68,0.95), rgba(10,31,68,0.95)),
    url('https://www.transparenttextures.com/patterns/old-map.png');
  color: var(--white);
  padding: 30px 20px;
  margin-top: 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  justify-items: center;
  text-align: center;
}

.footer-section h4 {
  font-family: 'Cinzel', serif;
  margin-bottom: 10px;
  color: var(--sand);
}

.footer-section a {
  display: block;
  color: var(--white);
  text-decoration: none;
  margin-bottom: 6px;
  font-size: 14px;
}

.footer-section a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  opacity: 0.7;
}

/* ================== MOBILE ================== */
@media (max-width: 768px) {
  /* Mobile nav */
  .map-nav {
    position: absolute;
    top: 60px;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    width: 220px;
    padding: 15px;
    display: none;
  }

  .map-nav.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  /* Album & photo grid responsive */
  .album-grid,
  .photo-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .album-grid a img,
  .photo-grid img {
    height: 120px;
  }

  /* Footer padding smaller on mobile */
  .map-footer {
    padding: 20px 15px;
  }
}

@media (max-width: 480px) {
  .album-grid,
  .photo-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }

  .album-grid a img,
  .photo-grid img {
    height: 100px;
  }
}
