/* Universal Header Styles for Agblor Lodge */

:root {
  --header-height: 80px;
  --primary-color: #2c3e50;
  --accent-color: #c5a47e;
  --text-color: #333;
  --light-bg: #f9f9f9;
  --white: #ffffff;
  --gold: #c5a47e;
  --transition: all 0.3s ease;
}

/* Performance Optimizations */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

img[loading="lazy"] {
  filter: blur(0.5px);
  transition: filter 0.3s;
}

img[loading="lazy"][src] {
  filter: none;
}

/* Content-visibility optimization */
.room-card,
.contact-section,
.about-section {
  content-visibility: auto;
  contain-intrinsic-size: 0 500px;
}

/* Improved responsive images */
picture {
  display: block;
  width: 100%;
}

/* Responsive video optimization */
video {
  max-width: 100%;
  height: auto;
}

/* Cache busting for static assets */
[data-version] {
  content: attr(data-version);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: var(--text-color);
  line-height: 1.6;
  padding-top: var(--header-height);
}

/* Subtle page background image (transparent, decorative)
   Implemented with a pseudo-element so it doesn't affect layout or hit-testing */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0; /* behind the page content which sits above (header has z-index:1000) */
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  opacity: 0.06; /* very subtle */
  pointer-events: none;
  mix-blend-mode: soft-light;
}

/* Ensure main content and header appear above the decorative background */
header,
.container,
.booking-container {
  position: relative;
  z-index: 1;
}

/* Header & Navigation */
header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: var(--header-height);
}

/* Improve touch responsiveness: allow native panning and reduce need for preventDefault
   Only apply to interactive elements where we don't need to block touch actions */
.menu-toggle,
.nav-links,
.hero-video,
.room-slideshow,
.room-slideshow .slide,
.dots {
  touch-action: manipulation;
}

/* For the main document we allow vertical panning while preventing accidental horizontal swipes
   (use with caution: may restrict horizontal gestures in some components) */
html,
body {
  touch-action: pan-y;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 5%;
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
}

.logo img {
  height: clamp(48px, 6vw, 80px);
  width: auto;
  display: block;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #555;
  font-weight: 500;
  transition: var(--transition);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.nav-links a:hover {
  color: var(--accent-color);
}

/* Footer */
.footer {
  background: var(--primary-color);
  color: #ccc;
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem);
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.copyright {
  margin: 0;
  font-size: clamp(0.8rem, 1.5vw, 0.95rem);
}

/* Designer attribution inside footer */
.footer .designer {
  margin-top: 0.75rem;
  color: #f5f5f5;
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  opacity: 0.9;
  text-align: center;
}
.footer .designer a {
  color: var(--gold);
  text-decoration: none;
}
.footer .designer a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

@media (max-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

@media (max-width: 992px) {
  .container {
    max-width: 960px;
  }

  .hero {
    min-height: calc(80vh - var(--header-height));
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  .container {
    max-width: 720px;
  }

  .nav-links {
    gap: 1rem;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 4vw, 3rem);
  }
}

@media (max-width: 576px) {
  :root {
    --header-height: 60px;
  }

  .menu-toggle {
    display: block;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    color: #000; /* make hamburger/menu icon black on mobile */
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    right: 0;
    background: #fff;
    width: 200px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 12px 0;
    border-radius: 8px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    pointer-events: none;
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links li {
    display: block;
    margin: 6px 0;
    padding: 8px 20px;
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
  }

  .logo img {
    height: 40px;
  }

  .room-grid {
    gap: 1rem;
  }
}

@media (max-width: 375px) {
  .container {
    padding: 0 10px;
  }

  body {
    font-size: 14px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Common Utility Classes */
.text-center {
  text-align: center;
}
.my-1 {
  margin: 1rem 0;
}
.my-2 {
  margin: 2rem 0;
}
.my-3 {
  margin: 3rem 0;
}
.py-1 {
  padding: 1rem 0;
}
.py-2 {
  padding: 2rem 0;
}
.py-3 {
  padding: 3rem 0;
}
