/* =======================
   Base
======================= */
html {
  overflow-y: scroll;
}

body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background-color: #0b1b2a;
  color: #dde1e4;
  /* These new lines make the body a full-height flex container */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex-grow: 1;
}
main.page-container,
main.gallery-page {
  padding-top: 10rem;  /* Increased from 9rem to add space */
  padding-bottom: 2rem;
}

/* =======================
   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;
}

.logo-img {
  height: 110px;
  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;
}

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

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

.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;
  border-radius: 4px;
  list-style: none;
}
.nav-links.active { display: flex; }

.menu-icon {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  color: #dde1e4;
  position: relative;
  z-index: 1501;
}

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

@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 (Homepage)
======================= */
.hero {
  height: 100vh;
  background: url('/images/m45post.png') no-repeat center center/cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: #fff;
}

.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;
}

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

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

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

/* =======================
   Homepage Sections (Gallery & Blog)
======================= */
#gallery {
  padding: 4rem 2rem;
  background-color: #0f2639;
  text-align: center;
}

/* Homepage Sections (Gallery & Blog) */
#gallery {
  padding: 4rem 2rem;
  background-color: #0f2639; /* The background color for the homepage gallery */
  text-align: center;
}

/* This rule overrides the above when the gallery is inside a content box */
.content-box #gallery {
  background-color: transparent;
  padding: 0;
  margin-top: 0;
}

.blog {
  background-color: #0b1b2a;
  /* This increases top padding to 9rem to clear the header, and maintains original side/bottom padding */
  padding: 9rem 2rem 4rem;
  text-align: center;
}

#gallery h2,
.blog h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: 2rem;
}

.blog-post {
  position: relative;
  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);
  text-align: left;
}

.blog-post a {
  color: #80d8ff; /* Same as your nav hover color - a nice light blue */
  text-decoration: none;
}

.blog-post a:hover {
  color: #b3e5ff; /* Slightly lighter on hover */
  text-decoration: underline;
}

.blog-post a:visited {
  color: #80d8ff; /* Keeps the same color even after clicking */
}

.badge-new {
  position: absolute;
  top: 0.75rem;
  left: 2rem;
  background-color: #ffc107;
  color: #111;
  padding: 0.2rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

.blog-post h3, .blog-post .date, .blog-post p, .read-more {
  text-align: left;
}

/* =======================
   Page Content Styles (for Gallery, Equipment pages, etc.)
======================= */
.page-container {
  padding-top: 8rem;
  padding-bottom: 4rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.content-box {
  background-color: #132a3d;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
  margin-left: auto;
  margin-right: auto;
  max-width: 900px;
}

@media (max-width: 768px) {
  .page-container {
    padding-top: 7rem;
    padding-left: 0;
    padding-right: 0;
  }
  .content-box {
    border-radius: 0;
    max-width: 100%;
  }
}

.content-box h1,
.content-box h2 {
  font-family: 'Montserrat', sans-serif;
  color: #fff;
  text-align: center;
  margin-top: 0;
}

.content-box h1 {
  font-size: 2.2rem;
  margin-bottom: 2.5rem;
}

.content-box h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

/* =======================
   Component Styles (Galleries, Equipment Grids, etc.)
======================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  background-color: #132330;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  text-align: center;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

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

.gallery-item p {
  margin: 0;
  padding: 0.8rem;
  font-weight: 600;
  color: #a8b3bd;
  background-color: #132330;
}

.equipment-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1.5rem 2rem;
  align-items: start;
}

.equipment-grid .category h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  text-align: right;
  color: #80d8ff;
  margin: 0;
}

.equipment-grid .items p {
  margin: 0 0 0.75rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .equipment-grid {
    grid-template-columns: 1fr;
  }
  .equipment-grid .category h2 {
    text-align: left;
    border-bottom: 1px solid #2a3e4f;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
  }
}

/* =======================
   Lightbox
======================= */
.lightbox[hidden] { display: none; }

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

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

.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; }

.gallery-grid img { cursor: zoom-in; }

.lightbox-viewport {
  width: min(90vw, 1200px);
  height: min(80vh, 900px);
  max-width: 90vw;
  max-height: 80vh;
  overflow: hidden;
  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;
  -webkit-user-drag: none;
  user-select: none;
}

@media (min-width: 1024px) {
  .lightbox-viewport { max-width: 68vw; max-height: 68vh; }
}
@media (min-width: 1440px) {
  .lightbox-viewport { max-width: 55vw; max-height: 60vh; }
}

.lightbox.zoomed .lightbox-viewport {
  width: 90vw;
  height: 80vh;
  max-width: none;
  max-height: none;
  overflow: auto;
}
.lightbox.zoomed .lightbox-viewport img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

.lightbox.zoomed .lightbox-viewport {
  overflow: auto;
  scrollbar-width: none;
}
.lightbox.zoomed .lightbox-viewport::-webkit-scrollbar { display: none; }

/* =======================
   Footer
======================= */
.site-footer {
  background-color: #0b1b2a;
  border-top: 1px solid #2a3e4f;
  padding: 2rem;
  color: #a8b3bd;
  font-size: 0.9rem;
  
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-content p {
  margin: 0;
}

@media (max-width: 640px) {
  .footer-content {
    flex-direction: column;
    gap: 1rem;
  }
}

.social-icon {
  display: inline-block;
  margin: 0 0.5rem;
}

.social-icon svg {
  width: 28px;
  height: 28px;
  fill: #a8b3bd;
  transition: fill 0.2s ease-in-out;
}

.social-icon:hover svg {
  fill: #80d8ff;
}

/* Prevent image selection and dragging */
img {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: auto;
  -webkit-user-drag: none;
}