/* =======================
   Base
======================= */
body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background-color: #0b1b2a;
  color: #dde1e4;
}

/* =======================
   Header
======================= */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgba(0, 0, 0, 0.7);
  position: fixed;
  width: 100%;
  z-index: 1000;
  box-sizing: border-box;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  z-index: auto; /* don't cover the hamburger */
}

.logo-img {
  height: 110px;         /* header logo size */
  margin-right: 10px;
}

.site-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: bold;
  color: #dde1e4;
  white-space: nowrap;
}

/* =======================
   Navigation
======================= */
.nav {
  position: relative;
  z-index: 1500;           /* sits above header background */
}

.nav a {
  text-decoration: none;
  color: #dde1e4;
  font-weight: 600;
}

.nav a:hover { color: #80d8ff; }

/* Mobile dropdown (hidden by default) */
.nav-links {
  display: none;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.95);
  position: absolute;
  top: 60px;
  right: 1rem;
  padding: 1rem;
  z-index: 3000;           /* ensure taps land on the menu */
  border-radius: 4px;
  list-style: none;
}
.nav-links.active { display: flex; }

/* Hamburger Button */
.menu-icon {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  color: #dde1e4;
  position: relative;
  z-index: 1501;           /* above anything near it */
}

/* Mobile */
@media (max-width: 768px) {
  .menu-icon { display: block; }
  .nav-links { width: 160px; }
  .nav-links li a { display: block; padding: 0.6rem 0; }
}

/* Desktop */
@media (min-width: 769px) {
  .nav-links {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: none;
    padding: 0;
    gap: 1.5rem;
  }
  .menu-icon { display: none; }
}

/* =======================
   Hero
======================= */
.hero {
  height: 100vh;
  background: url('/images/m45post.png') no-repeat center center/cover; /* root-relative for CF Pages */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: #fff;
}

.hero-content { max-width: 800px; }

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-family: 'Montserrat', sans-serif;
}

.hero p,
.hero .subheading {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.hero .btn {
  background-color: #80d8ff;
  color: #000;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: 2rem;
  cursor: pointer;
}

/* Small emblem in hero */
.hero-logo {
  max-width: 120px;
  margin: 2rem auto 1rem;
  display: block;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.6));
}

/* Development note */
.dev-note {
  font-size: 1.1rem;
  color: #ffc107;             /* Light attention-grabbing orange */
  margin-top: 2rem;
  font-style: italic;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

/* =======================
   Tagline
======================= */
.tagline {
  font-size: 1.25rem;
  color: #fff;
  font-style: italic;
}

/* =======================
   Logo Feature (optional section)
======================= */
.logo-feature {
  background-color: #111927;
  text-align: center;
  padding: 3rem 1rem;
}
.logo-feature img { max-width: 200px; margin-bottom: 1rem; }

/* =======================
   Gallery
======================= */
.gallery {
  padding: 4rem 2rem;
  background-color: #0f2639;
  text-align: center;
}
.gallery h2 { font-size: 2rem; margin-bottom: 2rem; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}
.gallery-item p { margin-top: 0.5rem; color: #ccc; font-size: 1rem; }

/* Tablet */
@media (max-width: 1000px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* Phone */
@media (max-width: 640px) { .gallery-grid { grid-template-columns: 1fr; } }

/* =======================
   Blog
======================= */
.blog {
  background-color: #0b1b2a;
  padding: 4rem 2rem;
}
.blog h2 { font-size: 2rem; margin-bottom: 2rem; text-align: center; }

.blog-post {
  max-width: 700px;
  margin: 0 auto 3rem;
  background-color: #132a3d;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}
.blog-post h3 { font-family: 'Montserrat', sans-serif; margin-bottom: 0.5rem; }
.blog-post .date { font-size: 0.9rem; color: #aaa; margin-bottom: 1rem; }
.blog-post p { line-height: 1.6; color: #dde1e4; }
.read-more {
  display: inline-block;
  margin-top: 1rem;
  color: #80d8ff;
  text-decoration: none;
  font-weight: bold;
}
.read-more:hover { text-decoration: underline; }

/* =======================
   Lightbox (overlay + zoom)
======================= */

/* Hidden state */
.lightbox[hidden] { display: none; }

/* Overlay */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: grid;
  place-items: center;
  z-index: 4000;         /* above everything */
  padding: 2rem;
}

/* Caption */
.lightbox-caption {
  margin-top: 0.75rem;
  color: #ddd;
  text-align: center;
  font-size: 1rem;
}

/* Controls */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(0,0,0,0.45);
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.2); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev  { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 16px; top: 50%; transform: translateY(-50%); }

.lightbox button { -webkit-tap-highlight-color: transparent; }
body.lb-open { overflow: hidden; }

/* Thumbs feel clickable */
.gallery-grid img { cursor: zoom-in; }

/* --- Viewport (fit-to-screen) --- */
.lightbox-viewport {
  /* make a real box even before image loads */
  width: min(90vw, 1200px);
  height: min(80vh, 900px);
  max-width: 90vw;
  max-height: 80vh;

  overflow: hidden;         /* no scroll until zoomed */
  display: grid;
  place-items: center;
  background: transparent;
}

.lightbox-viewport img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  cursor: zoom-in;
}

/* Start a bit smaller on larger screens */
@media (min-width: 1024px) {
  .lightbox-viewport { max-width: 68vw; max-height: 68vh; }
}
@media (min-width: 1440px) {
  .lightbox-viewport { max-width: 55vw; max-height: 60vh; }
}

/* --- Zoomed (100% + pan) --- */
.lightbox.zoomed .lightbox-viewport {
  width: 90vw;
  height: 80vh;
  max-width: none;
  max-height: none;
  overflow: auto;           /* enable panning */
}
.lightbox.zoomed .lightbox-viewport img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

/* Hover-pan: keep scroll but hide bars */
.lightbox.zoomed .lightbox-viewport {
  overflow: auto;                 /* we pan by scrolling */
  scrollbar-width: none;          /* Firefox */
}
.lightbox.zoomed .lightbox-viewport::-webkit-scrollbar { display: none; } /* WebKit */
.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
