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

/* AGGRESSIVE RED BORDER REMOVAL - CHROME DESKTOP FIX */
*,
*::before,
*::after {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Force remove any possible red borders */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  border: none !important;
  outline: none !important;
}

/* Chrome specific override */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  * {
    border: none !important;
    outline: none !important;
  }

  body,
  html {
    border: none !important;
    outline: none !important;
  }
}

/* Fix logo centering that was affected by the reset */
.is-container > .row.relative:first-child {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
}
/* We need to reset the styles on the center tag that are inherited */
.is-container > .row.relative:first-child > center {
  all: unset;
  display: block;
}
.is-container > .row.relative:first-child .column {
  width: auto !important;
  flex: none !important;
}

/* Remove any injected debugging styles */
body * {
  outline: none !important;
}

/* Specifically remove debugging borders from main elements */
body,
html,
.home-banner-threejs,
.main-header,
.home-main,
.hamburger-menu,
.nav-menu {
  outline: none !important;
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Ensure full screen coverage for background */
html,
body {
  width: 100%;
  height: 100%;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

:root {
  --color-dark: #000101;
  --color-dark-gray: #1f2222;
  --color-medium-gray: #2a2d2d;
  --color-light-gray: #3a3d3d;
  --color-light: #ffffff;
  --color-construction-primary: #ff6b35;
  --color-production-primary: #4ecdc4;
  --font-main: "Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial, sans-serif;
  --font-headings: Superclarendon, "Bookman Old Style", "URW Bookman",
    "URW Bookman L", "Georgia Pro", Georgia, serif;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-dark) !important;
  color: var(--color-light);
  line-height: 1.6;
  overflow-x: hidden;
  /* Ensure body takes full screen */
  min-height: 100vh;
  position: relative;
  /* Background image is now applied to body.home specifically */
}

/* Mobile background for portrait mode */
@media (max-width: 768px) and (orientation: portrait) {
  body.home {
    background-image: url("../assets/images/mobile background.jpg") !important;
    background-size: cover !important;
    background-position: center top !important;
    background-attachment: scroll !important;
    background-repeat: no-repeat !important;
  }
}

/* Mobile landscape view - use desktop background */
@media (max-width: 1024px) and (orientation: landscape) {
  body.home {
    background-image: url("../assets/images/desktop background.jpg") !important;
    background-size: cover !important;
    background-position: center center !important;
    background-attachment: scroll !important;
    background-repeat: no-repeat !important;
  }
}

/* Safari-specific fixes for Mobile Landscape View */
@media (max-width: 1024px) and (orientation: landscape) {
  /* Ensure the body and html take up the full available screen space on Safari */
  html,
  body.home {
    height: 100% !important;
    width: 100% !important;
  }

  /* Ensure the Three.js canvas covers the full screen */
  .home-banner-threejs {
    height: 100% !important;
    width: 100% !important;
  }

  /* Correct the layout for the main content area */
  .home-main {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 2rem !important;
    /* Use padding to keep content from the edges */
    box-sizing: border-box !important;
    position: absolute;
    top: 0;
    left: 0;
  }

  .intro p {
    max-width: 90%;
    /* Prevent text from becoming too wide */
  }

  .main-nav {
    flex-direction: row;
    /* Ensure buttons are side-by-side */
    gap: 1rem;
  }
}

/* Additional safety constraints for content positioning */
body.home {
  overflow: hidden; /* Prevent scrolling on home page to keep content within ornamental frame */
  height: 100vh; /* Fixed height to prevent scrolling */
  position: relative; /* Back to relative positioning */
  width: 100%;
  overscroll-behavior: none; /* Prevent overscroll effects */
}

/* Ensure Three.js containers stay in background and scroll with content */
.home-banner-threejs,
.construction-banner-threejs,
.production-banner-threejs,
.contact-banner-threejs {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: -10 !important;
  pointer-events: none !important;
  /* Ensure proper coverage */
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-sizing: border-box !important;
}

/* Ensure all background overlays scroll naturally with content */
.is-overlay,
.is-overlay-bg,
.contact-bg {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-sizing: border-box !important;
}

/* Specific background positioning for different screen sizes */
@media (max-width: 768px) {
  .is-overlay-bg,
  .contact-bg {
    background-position: center top !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .is-overlay-bg,
  .contact-bg {
    background-position: center center !important;
  }
}

@media (min-width: 1025px) {
  .is-overlay-bg,
  .contact-bg {
    background-position: center center !important;
  }
}

/* CONSTRUCTION & PRODUCTION PAGE HERO SECTIONS */
/* Fix hero section positioning and spacing for construction and production pages */
.page-construction .is-section.min-height-100,
.page-production .is-section.min-height-100 {
  min-height: 100vh; /* Fallback for older browsers */
  min-height: 100svh; /* The definitive fix for Safari */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

.page-construction .is-section.min-height-100 .is-container,
.page-production .is-section.min-height-100 .is-container {
  max-width: clamp(400px, 75vw, 1000px) !important;
  margin: 0 auto !important;
  padding: clamp(60px, 12vh, 120px) clamp(30px, 8vw, 80px) !important;
  text-align: center !important;
  position: relative !important;
  z-index: 100 !important;
}

/* Logo sizing and positioning for construction and production pages */
.page-construction .is-section.min-height-100 img,
.page-production .is-section.min-height-100 img {
  max-height: clamp(220px, 22vh, 300px) !important;
  width: auto !important;
  max-width: 90% !important;
  margin: 0 auto clamp(20px, 4vh, 40px) auto !important;
  display: block !important;
}

/* Ensure logo containers are properly centered */
.page-construction .is-section.min-height-100 .column,
.page-production .is-section.min-height-100 .column,
.page-contact .is-section.min-height-100 .column {
  margin: 0 auto !important;
  text-align: center !important;
  width: 100% !important;
  display: block !important;
}

.page-construction .is-section.min-height-100 a,
.page-production .is-section.min-height-100 a,
.page-contact .is-section.min-height-100 a {
  display: inline-block !important;
  text-align: center !important;
}

/* Title sizing for construction and production pages */
.page-construction .is-section.min-height-100 h1,
.page-production .is-section.min-height-100 h1 {
  font-size: clamp(1.8rem, 6vw, 3.5rem) !important;
  line-height: 1.2 !important;
  margin: clamp(15px, 3vh, 30px) 0 !important;
  max-width: 90% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
  font-weight: 800; /* Corresponds to font-extrabold */
}

/* Subtitle/description sizing */
.page-construction .is-section.min-height-100 p,
.page-production .is-section.min-height-100 p {
  font-size: clamp(0.9rem, 2.5vw, 1.3rem) !important;
  line-height: 1.5 !important;
  margin: clamp(10px, 2vh, 20px) auto !important;
  max-width: clamp(280px, 65vw, 550px) !important;
  padding: 0 clamp(20px, 6vw, 60px) !important;
}

/* Button sizing and spacing */
.page-construction .is-section.min-height-100 a[role="button"],
.page-production .is-section.min-height-100 a[role="button"] {
  font-size: clamp(0.9rem, 2.2vw, 1.1rem) !important;
  padding: clamp(12px, 3vh, 18px) clamp(20px, 5vw, 35px) !important;
  margin-top: clamp(20px, 4vh, 35px) !important;
  display: inline-block !important;
}

/* MOBILE RESPONSIVE FIXES FOR CONSTRUCTION & PRODUCTION PAGES */
@media (max-width: 768px) {
  .page-construction .is-section.min-height-100 .is-container,
  .page-production .is-section.min-height-100 .is-container {
    padding: clamp(40px, 8vh, 80px) clamp(20px, 6vw, 60px) !important;
    max-width: 90% !important;
  }

  .page-construction .is-section.min-height-100 img,
  .page-production .is-section.min-height-100 img {
    max-height: clamp(220px, 26vh, 300px) !important;
    max-width: 90% !important;
    margin-bottom: clamp(15px, 3vh, 25px) !important;
  }

  .page-construction .is-section.min-height-100 h1,
  .page-production .is-section.min-height-100 h1 {
    font-size: clamp(1.4rem, 5vw, 2.5rem) !important;
    margin: clamp(10px, 2vh, 20px) 0 !important;
  }

  .page-construction .is-section.min-height-100 p,
  .page-production .is-section.min-height-100 p {
    font-size: clamp(0.8rem, 2.2vw, 1.1rem) !important;
    max-width: 80% !important;
    margin: clamp(8px, 1.5vh, 15px) auto !important;
    padding: 0 clamp(15px, 4vw, 40px) !important;
  }
}

@media (max-width: 480px) {
  .page-construction .is-section.min-height-100 .is-container,
  .page-production .is-section.min-height-100 .is-container {
    padding: clamp(30px, 6vh, 60px) clamp(15px, 4vw, 40px) !important;
    max-width: 95% !important;
  }

  .page-construction .is-section.min-height-100 img,
  .page-production .is-section.min-height-100 img {
    max-height: clamp(180px, 24vh, 270px) !important;
    max-width: 85% !important;
    margin-bottom: clamp(12px, 2.5vh, 20px) !important;
  }

  .page-construction .is-section.min-height-100 h1,
  .page-production .is-section.min-height-100 h1 {
    font-size: clamp(1.2rem, 4.5vw, 2rem) !important;
    margin: clamp(8px, 1.5vh, 15px) 0 !important;
    line-height: 1.1 !important;
  }

  .page-construction .is-section.min-height-100 p,
  .page-production .is-section.min-height-100 p {
    font-size: clamp(0.75rem, 2vw, 1rem) !important;
    max-width: 85% !important;
    margin: clamp(6px, 1vh, 12px) auto !important;
    line-height: 1.4 !important;
    padding: 0 clamp(12px, 3vw, 30px) !important;
  }

  .page-construction .is-section.min-height-100 a[role="button"],
  .page-production .is-section.min-height-100 a[role="button"] {
    font-size: clamp(0.8rem, 2vw, 1rem) !important;
    padding: clamp(10px, 2.5vh, 15px) clamp(15px, 4vw, 25px) !important;
    margin-top: clamp(15px, 3vh, 25px) !important;
  }
}

/* iPhone specific fixes */
@media (max-width: 430px) {
  .page-construction .is-section.min-height-100 .is-container,
  .page-production .is-section.min-height-100 .is-container {
    padding: clamp(25px, 5vh, 50px) clamp(12px, 3vw, 30px) !important;
  }

  .page-construction .is-section.min-height-100 img,
  .page-production .is-section.min-height-100 img {
    max-height: clamp(150px, 20vh, 240px) !important;
    max-width: 80% !important;
  }
}

/* Arrow down button positioning for construction and production pages */
.page-construction .is-arrow-down,
.page-production .is-arrow-down {
  position: absolute !important;
  bottom: clamp(20px, 4vh, 40px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 200 !important;
}

/* Ensure proper spacing for all content on construction and production pages */
.page-construction .is-section.min-height-100 .spacer,
.page-production .is-section.min-height-100 .spacer {
  height: clamp(10px, 2vh, 20px) !important;
}

/* CONTACT PAGE HERO SECTION */
/* Fix hero section positioning and spacing for contact page */
.page-contact .is-section.min-height-100 {
  min-height: 100vh; /* Fallback for older browsers */
  min-height: 100svh; /* The definitive fix for Safari */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.page-contact .is-section.min-height-100 .is-container {
  max-width: clamp(400px, 75vw, 1000px) !important;
  margin: 0 auto !important;
  padding: clamp(60px, 12vh, 120px) clamp(30px, 8vw, 80px) !important;
  text-align: center !important;
  position: relative !important;
  z-index: 100 !important;
}

/* Logo sizing and positioning for contact page */
.page-contact .is-section.min-height-100 img {
  max-height: 8rem; /* Set a larger, fixed rem size */
  width: auto;
  margin: 0 auto 1rem;
  display: block;
}

/* Title sizing for contact page */
.page-contact .is-section.min-height-100 h1 {
  font-size: clamp(1.8rem, 6vw, 3.5rem) !important;
  line-height: 1.2 !important;
  margin: clamp(15px, 3vh, 30px) 0 !important;
  max-width: 90% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
}

/* Subtitle/description sizing for contact page */
.page-contact .is-section.min-height-100 p {
  font-size: clamp(0.9rem, 2.5vw, 1.3rem) !important;
  line-height: 1.5 !important;
  margin: clamp(10px, 2vh, 20px) auto !important;
  max-width: clamp(280px, 65vw, 550px) !important;
  padding: 0 clamp(20px, 6vw, 60px) !important;
  text-align: center;
}

/* Button sizing and spacing for contact page */
.page-contact .is-section.min-height-100 a[role="button"] {
  font-size: clamp(0.9rem, 2.2vw, 1.1rem) !important;
  padding: clamp(12px, 3vh, 18px) clamp(20px, 5vw, 35px) !important;
  margin-top: clamp(20px, 4vh, 35px) !important;
  display: inline-block !important;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Arrow positioning for contact page */
.page-contact .is-arrow-down {
  position: absolute !important;
  bottom: clamp(20px, 4vh, 40px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 200 !important;
}

/* Spacer adjustments for contact page */
.page-contact .is-section.min-height-100 .spacer {
  height: clamp(10px, 2vh, 20px) !important;
}

/* MOBILE RESPONSIVE FIXES FOR CONTACT PAGE */
@media (max-width: 768px) {
  .page-contact .is-section.min-height-100 .is-container {
    padding: clamp(40px, 8vh, 80px) clamp(20px, 6vw, 60px) !important;
    max-width: 90% !important;
  }

  .page-contact .is-section.min-height-100 img {
    max-height: clamp(220px, 26vh, 300px) !important;
    max-width: 90% !important;
    margin-bottom: clamp(15px, 3vh, 25px) !important;
  }

  .page-contact .is-section.min-height-100 h1 {
    font-size: clamp(1.4rem, 5vw, 2.5rem) !important;
    margin: clamp(10px, 2vh, 20px) 0 !important;
  }

  .page-contact .is-section.min-height-100 p {
    font-size: clamp(0.8rem, 2.2vw, 1.1rem) !important;
    max-width: 80% !important;
    margin: clamp(8px, 1.5vh, 15px) auto !important;
    padding: 0 clamp(15px, 4vw, 40px) !important;
  }
}

@media (max-width: 480px) {
  .page-contact .is-section.min-height-100 .is-container {
    padding: clamp(30px, 6vh, 60px) clamp(15px, 4vw, 40px) !important;
    max-width: 95% !important;
  }

  .page-contact .is-section.min-height-100 img {
    max-height: clamp(180px, 24vh, 270px) !important;
    max-width: 85% !important;
    margin-bottom: clamp(12px, 2.5vh, 20px) !important;
  }

  .page-contact .is-section.min-height-100 h1 {
    font-size: clamp(1.2rem, 4.5vw, 2rem) !important;
    margin: clamp(8px, 1.5vh, 15px) 0 !important;
    line-height: 1.1 !important;
  }

  .page-contact .is-section.min-height-100 p {
    font-size: clamp(0.75rem, 2vw, 1rem) !important;
    max-width: 85% !important;
    margin: clamp(6px, 1vh, 12px) auto !important;
    line-height: 1.4 !important;
    padding: 0 clamp(12px, 3vw, 30px) !important;
  }

  .page-contact .is-section.min-height-100 a[role="button"] {
    font-size: clamp(0.8rem, 2vw, 1rem) !important;
    padding: clamp(10px, 2.5vh, 15px) clamp(15px, 4vw, 25px) !important;
    margin-top: clamp(15px, 3vh, 25px) !important;
  }
}

/* iPhone specific fixes for contact page */
@media (max-width: 430px) {
  .page-contact .is-section.min-height-100 .is-container {
    padding: clamp(25px, 5vh, 50px) clamp(12px, 3vw, 30px) !important;
  }

  .page-contact .is-section.min-height-100 img {
    max-height: clamp(150px, 20vh, 240px) !important;
    max-width: 80% !important;
  }
}

/* Ensure backgrounds work on different screen orientations */
/* Ensure portrait mode works correctly - Reset any landscape overrides */
@media screen and (max-width: 768px) and (orientation: portrait) {
  body {
    overflow-x: hidden !important;
    height: auto !important;
  }

  body.home {
    overflow: hidden !important;
    height: 100vh !important;
  }

  .main-header {
    position: relative !important;
    top: clamp(150px, 18vh, 220px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  .home-main {
    height: 100vh !important;
    position: relative !important;
  }

  /* Portrait centering fixes for construction, production & contact pages */
  .page-construction .is-section.min-height-100 h1,
  .page-production .is-section.min-height-100 h1,
  .page-contact .is-section.min-height-100 h1 {
    margin: clamp(15px, 3vh, 30px) auto !important; /* Center with auto margins */
    text-align: center !important; /* Ensure headlines are centered */
    width: 85% !important; /* Reduced width for better readability */
    max-width: clamp(320px, 70vw, 500px) !important; /* Constrain max width */
  }

  .page-construction .is-section.min-height-100 p,
  .page-production .is-section.min-height-100 p,
  .page-contact .is-section.min-height-100 p {
    margin: clamp(10px, 2vh, 20px) auto !important; /* Center with auto margins */
    width: 80% !important; /* Reduced width for better readability */
    max-width: clamp(280px, 65vw, 450px) !important; /* Constrain max width */
    text-align: center !important; /* Ensure paragraphs are centered */
  }
}

/* MOBILE LANDSCAPE SPECIFIC RULES FOR HERO SECTIONS */
@media screen and (max-width: 900px) and (orientation: landscape) {
  /* Hero section container adjustments for landscape */
  .page-construction .is-section.min-height-100.box-autofit,
  .page-production .is-section.min-height-100.box-autofit,
  .page-contact .is-section.min-height-100.box-autofit {
    min-height: 100vh !important;
    padding: 10px 0 !important;
  }

  /* Container padding for landscape */
  .page-construction .is-section.min-height-100.box-autofit .is-container,
  .page-production .is-section.min-height-100.box-autofit .is-container,
  .page-contact .is-section.min-height-100.box-autofit .is-container {
    padding: 15px 20px !important;
    max-width: 90% !important;
    margin: 0 auto !important;
  }

  /* Logo sizing for landscape - much larger and fixed size */
  .page-construction .is-section.min-height-100.box-autofit img,
  .page-production .is-section.min-height-100.box-autofit img,
  .page-contact .is-section.min-height-100.box-autofit img {
    height: 80px !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 auto 15px auto !important;
    display: block !important;
  }

  /* Title sizing for landscape */
  .page-construction .is-section.min-height-100.box-autofit h1,
  .page-production .is-section.min-height-100.box-autofit h1,
  .page-contact .is-section.min-height-100.box-autofit h1 {
    font-size: 1.8rem !important;
    line-height: 1.1 !important;
    margin: 8px 0 !important;
  }

  /* Paragraph sizing for landscape */
  .page-construction .is-section.min-height-100.box-autofit p,
  .page-production .is-section.min-height-100.box-autofit p,
  .page-contact .is-section.min-height-100.box-autofit p {
    font-size: 1.1rem !important;
    line-height: 1.4 !important;
    margin: 10px auto !important;
    max-width: 85% !important;
    color: white !important;
    text-align: center !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Specific targeting for hero paragraph with all its classes */
  .page-construction .is-section.min-height-100.box-autofit p.hero-paragraph,
  .page-production .is-section.min-height-100.box-autofit p.hero-paragraph,
  .page-contact .is-section.min-height-100.box-autofit p.hero-paragraph,
  .page-construction .is-section.min-height-100.box-autofit .hero-paragraph,
  .page-production .is-section.min-height-100.box-autofit .hero-paragraph,
  .page-contact .is-section.min-height-100.box-autofit .hero-paragraph {
    font-size: 1.1rem !important;
    line-height: 1.4 !important;
    margin: 10px auto !important;
    max-width: 85% !important;
    color: white !important;
    text-align: center !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 999 !important;
  }

  /* Override any v2 container sizing that might be interfering */
  .page-construction .is-section.min-height-100.box-autofit .is-container.v2 p,
  .page-production .is-section.min-height-100.box-autofit .is-container.v2 p,
  .page-contact .is-section.min-height-100.box-autofit .is-container.v2 p {
    font-size: 1.1rem !important;
    color: white !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* CRITICAL: Override animation system for hero paragraph in landscape */
  .page-construction
    .is-section.min-height-100.box-autofit
    .is-animated.is-fadeInUp,
  .page-production
    .is-section.min-height-100.box-autofit
    .is-animated.is-fadeInUp,
  .page-contact .is-section.min-height-100.box-autofit .is-animated.is-fadeInUp,
  .page-construction .is-section.min-height-100.box-autofit .is-animated,
  .page-production .is-section.min-height-100.box-autofit .is-animated,
  .page-contact .is-section.min-height-100.box-autofit .is-animated {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    display: block !important;
  }

  /* Force show hero paragraph regardless of animation state */
  .page-construction
    .is-section.min-height-100.box-autofit
    .column.is-animated
    p,
  .page-production .is-section.min-height-100.box-autofit .column.is-animated p,
  .page-contact .is-section.min-height-100.box-autofit .column.is-animated p {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    display: block !important;
    color: white !important;
    font-size: 1.1rem !important;
  }

  /* Button sizing for landscape */
  .page-construction .is-section.min-height-100.box-autofit a[role="button"],
  .page-production .is-section.min-height-100.box-autofit a[role="button"],
  .page-contact .is-section.min-height-100.box-autofit a[role="button"] {
    font-size: 0.9rem !important;
    padding: 10px 20px !important;
    margin-top: 12px !important;
    display: inline-block !important;
  }

  /* Remove all spacers in landscape to save vertical space */
  .page-construction .is-section.min-height-100.box-autofit .spacer,
  .page-production .is-section.min-height-100.box-autofit .spacer,
  .page-contact .is-section.min-height-100.box-autofit .spacer {
    height: 5px !important;
  }

  /* Override any width constraints that might be causing left-alignment */
  .page-construction .is-section.min-height-100 .is-content-800,
  .page-production .is-section.min-height-100 .is-content-800,
  .page-contact .is-section.min-height-100 .is-content-800 {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
  }

  /* Override md-w-660 class for complete Safari landscape fix */
  .page-construction .is-section.min-height-100 .md-w-660,
  .page-production .is-section.min-height-100 .md-w-660,
  .page-contact .is-section.min-height-100 .md-w-660 {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
  }
}

/* Hamburger Menu Styles */
.hamburger-menu {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.8);
  border: none;
  border-radius: 5px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger-menu:hover {
  background: rgba(0, 0, 0, 0.9);
}

.hamburger-icon {
  width: 25px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background-color: white;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Navigation Panel */
.nav-menu {
  position: fixed;
  top: 0;
  right: -320px; /* Slightly wider */
  width: 320px;
  height: 100vh;
  background: rgba(10, 10, 12, 0.9); /* Darker, less transparent */
  backdrop-filter: blur(15px);
  z-index: 999;
  transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  padding: 80px 20px 40px; /* Added more bottom padding */
  overflow-y: auto; /* Enable scrolling if needed */
}

.nav-menu.active {
  right: 0;
}

.nav-header h3 {
  color: white;
  margin-bottom: 25px;
  font-size: 1.2rem; /* Subtler size */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 20px;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px; /* Tighter gap, padding will handle spacing */
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 15px 20px;
  border-radius: 8px; /* Rounded corners for highlights */
  transition: all 0.25s ease-in-out;
  border-bottom: none; /* Remove underline */
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-links a.active {
  color: white;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
}

/* Page-specific active AND hover link colors */
.page-production .nav-links a[href="production.html"]:hover,
.page-production .nav-links a[href="production.html"].active {
  background: rgb(233, 2, 0);
  color: white;
}

.page-construction .nav-links a[href="construction.html"]:hover,
.page-construction .nav-links a[href="construction.html"].active {
  background: rgb(83, 98, 208);
  color: white;
}

/* Remove old page-specific rules */
.page-production .nav-links a[href="production.html"].active {
  border-bottom-color: transparent !important;
}
.page-construction .nav-links a[href="construction.html"].active {
  border-bottom-color: transparent !important;
}

/* Navigation Overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .hamburger-menu {
    top: 15px;
    right: 15px;
    padding: 8px;
  }

  .nav-menu {
    width: 280px;
    right: -280px;
    padding: 70px 25px 25px;
  }
}

/* Logo Header Styles */
.main-header {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
}

.main-header .logo-image {
  height: 90px;
  width: auto;
  transition: all 0.3s ease;
  display: block;
}

.main-header .logo-image:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .main-header {
    top: 10px;
    left: 10px;
  }

  .main-header .logo-image {
    height: 54px;
  }
}

/* Home Main Content */
.home-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 160px 20px 20px; /* Increased top padding for logo */
  position: relative;
  z-index: 10;
}

.intro {
  margin-bottom: 40px;
  max-width: 800px;
  background: none !important;
  backdrop-filter: none !important;
  border: none !important;
  padding: 0 !important;
  animation: none !important;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.intro h1 {
  margin-bottom: 20px;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  white-space: normal; /* Allow text to wrap */
  max-width: 90%; /* Constrain width to prevent overflow */
  font-size: clamp(
    1.8rem,
    6vw,
    3.5rem
  ); /* Responsive font size for better scaling */
  text-align: center;
  font-weight: 800; /* Corresponds to font-extrabold */
  margin-left: auto;
  margin-right: auto;
}

.intro p {
  color: white;
  font-size: 1.1rem;
  line-height: 1.6;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.main-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  position: relative;
  z-index: 15; /* Lower than logo */
}

@media (max-width: 768px) {
  .home-main {
    padding: 80px 15px 15px;
  }

  .main-nav {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  .intro {
    margin-bottom: 30px;
  }
}

/* Unify button styles for all screen sizes */
.main-nav .nav-button,
.main-nav .nav-button.production-button,
.main-nav .nav-button.construction-button {
  background: transparent !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 1.18rem;
  border: 2.5px solid #fff !important;
  border-radius: 32px !important;
  box-shadow: none !important;
  padding: 16px 38px;
  margin: 0 10px;
  transition: background 0.18s, box-shadow 0.18s, color 0.18s, border 0.18s,
    transform 0.18s;
  position: relative;
  overflow: hidden;
  outline: none;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.01em;
  animation: fadeInUp 1.2s cubic-bezier(0.23, 1.01, 0.32, 1) 0.5s both;
}
.main-nav .nav-button .circle {
  display: none;
}
.main-nav .nav-button:hover,
.main-nav .nav-button:focus {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px) scale(1.02);
}
.main-nav .nav-button.production-button:hover,
.main-nav .nav-button.production-button:focus {
  background: rgb(233, 2, 0) !important;
  color: #fff !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}
.main-nav .nav-button.construction-button:hover,
.main-nav .nav-button.construction-button:focus {
  background: rgb(83, 98, 208) !important;
  color: #fff !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}
.main-nav .nav-button,
.main-nav .nav-button .text {
  text-decoration: none !important;
}
@media (max-width: 600px) {
  .main-nav {
    gap: 14px;
  }
  .main-nav .nav-button,
  .main-nav .nav-button.production-button,
  .main-nav .nav-button.construction-button {
    font-size: 1rem;
    padding: 12px 18px;
  }
}

/* 4. Fade-in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 5. Responsive main-nav gap */
@media (max-width: 600px) {
  .main-nav {
    gap: 14px;
  }
  .main-nav .nav-button {
    font-size: 1rem;
    padding: 12px 18px;
  }
}

/* 6. Ensure overlay is above Three.js but below content */
.home-banner-threejs {
  z-index: 0 !important;
}
.home-bg-overlay {
  z-index: 11;
}
.home-main {
  z-index: 20;
}

/* Centered logo at top, above headline, always visible */
.main-header-centered {
  position: absolute;
  top: 100px;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 20;
}
.logo-image-centered {
  height: 130px;
  width: auto;
  max-width: 95vw;
  display: block;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.1));
}
@media (max-width: 600px) {
  .home-main {
    padding-top: 120px; /* Reduced padding to move content up further */
  }
  .main-header-centered {
    top: 80px; /* Moved logo down */
  }
  .logo-image-centered {
    height: 45px; /* Half of its previous size */
  }
  .intro h1 {
    font-size: 1.5rem; /* Smaller headline */
    margin-bottom: 10px;
    text-align: center;
  }
  .intro p {
    font-size: 0.85rem; /* Smaller paragraph */
    max-width: 65%; /* Constrain paragraph width further */
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  .main-nav {
    flex-direction: row; /* Buttons side-by-side */
    gap: 10px;
  }
  .main-nav .nav-button,
  .main-nav .nav-button.production-button,
  .main-nav .nav-button.construction-button {
    font-size: 0.7rem;
    padding: 6px 10px; /* Even smaller buttons */
  }
}

/* Mobile Landscape Specific Styles */
@media (max-height: 500px) and (orientation: landscape) {
  .home-main {
    padding-top: 80px; /* Adjust padding for landscape */
    justify-content: center; /* Re-center content vertically */
  }
  .main-header-centered {
    top: 20px; /* Move logo up */
  }
  .logo-image-centered {
    height: 40px; /* Make logo smaller */
  }
  .intro {
    margin-bottom: 20px; /* Reduce space below paragraph */
    max-width: 70%; /* Constrain the entire intro block for better text flow */
    text-align: center;
  }
  .intro h1 {
    font-size: 1.5rem; /* Smaller headline */
    margin-bottom: 10px;
  }
  .intro p {
    font-size: 0.85rem; /* Smaller paragraph */
  }
  .main-nav .nav-button {
    font-size: 0.7rem;
    padding: 6px 10px; /* Even smaller buttons */
  }
}

/* Responsive YouTube/Vimeo Video Wrapper */
.video-responsive {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 960px; /* Max width for the video */
  background: #000;
  border-radius: 12px;
  margin: 0 auto; /* Center the video container */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.video-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Center "Our Work" video on mobile */
@media (max-width: 768px) {
  #our-work-section .is-container {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Force video section to a higher stacking context */
.video-section-wrapper {
  display: none;
} /* Disable old rule */

/* New, Self-Contained "Our Work" Section Styles */
.our-work-section {
  position: relative;
  z-index: 100;
  background-color: rgb(4, 7, 7);
  padding: 80px 0;
}
.our-work-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}
.our-work-title {
  font-family: Superclarendon, "Bookman Old Style", "URW Bookman",
    "URW Bookman L", "Georgia Pro", Georgia, serif;
  font-size: 3.25rem; /* Reduced from 3.75rem */
  font-weight: 600; /* Matches font-semibold */
  color: white;
  text-align: center;
}
.our-work-description {
  font-family: "Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial, sans-serif;
  font-size: 1.125rem; /* Matches size-18 */
  color: rgba(255, 255, 255, 0.8);
  max-width: 800px;
  margin: 20px auto 40px auto;
  text-align: center;
  line-height: 1.6;
}

/* Force override for section alignment */
.is-wrapper .our-work-section {
  width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Mobile Landscape Specific Styles */
@media (max-height: 500px) and (orientation: landscape) {
  .home-main {
    padding-top: 80px; /* Adjust padding for landscape */
    justify-content: center; /* Re-center content vertically */
  }
  .main-header-centered {
    top: 20px; /* Move logo up */
  }
  .logo-image-centered {
    height: 40px; /* Make logo smaller */
  }
  .intro {
    margin-bottom: 20px; /* Reduce space below paragraph */
    max-width: 70%; /* Constrain the entire intro block for better text flow */
    text-align: center;
  }
  .intro h1 {
    font-size: 1.5rem; /* Smaller headline */
    margin-bottom: 10px;
  }
  .intro p {
    font-size: 0.85rem; /* Smaller paragraph */
  }
  .main-nav .nav-button {
    font-size: 0.7rem;
    padding: 6px 10px; /* Even smaller buttons */
  }
}
