/* ===== DESIGN TOKENS ===== */


h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font-family, 'Ysabeau', sans-serif);
}

:root {
  /* Colors */
  --govt-blue: #000000;
  --dark-blue: #113044;
  --accent-blue: #000000;
  --sage-blue: #adb5b6;
  --activated-blue: #000000;
  --gold: #c5a865;
  --text: #ffffff;
  --text-muted: #d1d5db;
  --scrollbar-track: #00080c;
  --scrollbar-thumb: #113044;
  --border-color: var(--dark-blue);
  
  /* Layout */
  --max-width: 1200px;
  --gutter: 20px;
  --card-gap: 30px;
  --card-radius: 16px;
  --border: 4px solid var(--border-color);
  
  /* Shadows */
  --card-shadow: 0 4px 12px rgba(0,0,0,0.25);
  --card-hover-shadow: 0 15px 35px rgba(0,0,0,0.3);
  
  /* Typography */
  --h1-size: 4.4rem;
  --h2-size: 2.75rem;
  --card-title-size: 1.54rem;
  --body-size: 1.1875rem;
  --lead-size: 1.5rem;
  
  /* Hero positioning */
  --hero-top: 130px;
  --hero-maxw: 640px;
  
  /* Card overlap - can be overridden per page */
  --cards-overlap: 88px;
}

@media (max-width: 768px) {
  :root {
    --hero-top: 80px;
  }
}


/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  scroll-behavior: smooth;
  line-height: 1;
}

body {
  font-family: var(--font-family, 'Ysabeau', sans-serif);
  color: var(--text);
  background-color: var(--govt-blue);
  line-height: 1;
}


/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { 
  width: 12px; 
}

::-webkit-scrollbar-track { 
  background: var(--scrollbar-track); 
  border-radius: 6px; 
}

::-webkit-scrollbar-thumb { 
  background: var(--scrollbar-thumb); 
  border-radius: 6px; 
  border: 2px solid var(--scrollbar-track); 
}

::-webkit-scrollbar-thumb:hover { 
  background: var(--scrollbar-thumb); 
  opacity: 0.8;
}

* { 
  scrollbar-width: thin; 
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); 
}


/* ===== LOGO (FIXED POSITION) ===== */
a.logo-fixed {
  text-decoration: none; /* Remove underline */
  color: inherit; /* Use parent color */
  outline: none; /* Remove focus outline */
}

.logo-fixed {
  position: fixed;
  top: 20px;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding-left: 40px;
  height: 64px;
  background: transparent;
  pointer-events: auto;
}

.logo-leaf {
  height: 32px;
  vertical-align: middle;
  margin-right: 2px;
  pointer-events: auto;
}

.logo-text h1 {
  font-family: 'Allura', cursive;
}

.logo-bold {
  font-weight: 700;
  color: #fff;
  font-size: 24px;
}

.logo-light {
  font-weight: 300;
  color: #eee;
  font-size: inherit;
  margin: 0;
  display: inline;
}

.logo-text h1.logo-light {
  display: inline;
  font-size: 24px;
}


/* ===== NEW IMAGE LOGO ===== */
.logo-signature {
  height: 80px; /* Adjust as needed */
  width: auto;
}


/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 8px 0;
  background: var(--navbar-bg, rgba(0, 0, 0, 0.4));
  transition: all 0.4s ease;
  height: 43px;
  min-height: 40px;
  box-sizing: border-box;
}

nav.scrolled {
  background: var(--navbar-bg-scrolled, rgba(0, 0, 0, 0.7));
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav-links {
  padding-top: 7px;
  padding-bottom: 6px;
  display: flex;
  list-style: none;
}

.nav-links.right-align {
  position: absolute;
  top: 0;
  right: 0;
  margin-top: 7px;
  margin-right: 12px;
  display: flex;
  gap: 0px;
  background: none;
  box-shadow: none;
  z-index: 100;
}

.nav-links li {
  margin-left: 10px;
}

.nav-links a {
  font-family: 'Ysabeau', sans-serif;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 22px;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-links a:hover,
.nav-links a:focus {
  background-color: var(--accent-blue);
  color: white;
  outline: none;
}

.nav-links a.active,
.site-footer .footer-col h4 a.active,
.site-footer .footer-col ul a.active {
  background-color: var(--activated-blue);
  color: white;
}


/* ===== HERO SECTIONS ===== */
.hero-wrapper {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
  z-index: 3;
  margin-bottom: -100vh;
}

.hero {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  background-image: url('../images/fallback-hero.jpg');
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.hero .hero-content,
.image-hero .hero-content,
.slideshow-hero .hero-content {
  position: absolute;
  top: var(--hero-top);
  left: max(var(--gutter), calc((100vw - var(--max-width)) / 2 + var(--gutter)));
  transform: none;
  text-align: left;
  color: var(--text);
  z-index: 10;
  max-width: var(--hero-maxw);
}

.hero .hero-content h1,
.image-hero .hero-content h1,
.slideshow-hero .hero-content h1 {
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.5px;
  font-size: clamp(2rem, 2.7vw + 0.7rem, 3rem);
  margin: 0 0 12px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,.8),
               0 4px 8px rgba(0,0,0,.6),
               0 6px 12px rgba(0,0,0,.4);
}

.hero .hero-content p,
.image-hero .hero-content p,
.slideshow-hero .hero-content p {
  font-size: clamp(0.9rem, 0.9vw + 0.6rem, 1.05rem);
  line-height: 1.45;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0,0,0,.9);
}


/* ===== GREETING CARD ===== */
.greeting-card {
  position: absolute;
  top: -160px; /* Extend UP into hero section by 160px */
  left: 22.76%; /* Match Section 1 text overlay position */
  width: 41.77%; /* Match Section 1 text overlay width */
  z-index: 100; /* Above hero slideshow, above Section 1 */
}

.greeting-card .card {
  background: var(--dark-blue);
  border-radius: var(--card-radius);
  border: var(--border);
  box-shadow: var(--card-shadow);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.greeting-card .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
}

.greeting-card .card-content {
  padding: 25px;
}

.greeting-card .card-content h3 {
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 15px 0;
  line-height: 1.3;
}

.greeting-card .card-content p {
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.8;
  font-size: 0.95rem;
}

.greeting-card .btn-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}


/* ===== SECOND SECTION ===== */
.second-section-wrapper {
  position: relative;
  width: 100vw;
  min-height: 104.17vw; /* 2000/1920 = 1.0417 */
  max-width: 1920px;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: -3px;
  margin-bottom: 0;
  padding: 0;
  overflow: hidden;
  display: block;
  z-index: 20;
}

.second-section {
  position: relative;
  width: 100%;
  min-height: 100%;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-image: url('../images/middle-bkgd.jpg');
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.content-container {
  max-width: 1400px;
  width: 100%;
  padding: 100px 40px;
  display: flex;
  flex-direction: column;
  gap: 120px;
}

.content-row {
  display: flex;
  align-items: center;
  gap: 80px;
  justify-content: center;
}

.content-row.reverse {
  flex-direction: row-reverse !important;
}

.content-text {
  width: 400px;
  color: var(--text);
}

.content-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 20px;
  color: var(--text);
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.content-text p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 16px;
  color: var(--text);
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.content-text p:last-child {
  margin-bottom: 0;
}

.content-image {
  width: 600px;
}

.content-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

@media (max-width: 1024px) {
  .content-container {
    padding: 40px 20px;
    gap: 60px;
  }
  
  .content-row {
    flex-direction: column;
    gap: 30px;
  }
  
  .content-row.reverse {
    flex-direction: column;
  }
  
  .content-text h2 {
    font-size: 1.3rem;
  }
  
  .content-text p {
    font-size: 0.9rem;
  }
}

@media (min-width: 1920px) {
  .second-section-wrapper {
    width: 1920px;
    height: 2000px;
    margin-left: -960px; /* Half of 1920px */
  }
}


/* ===== THIRD SECTION ===== */
.third-section-wrapper {
  position: relative;
  width: 100vw;
  height: 2197px !important;
  min-height: 2197px !important;
  max-height: 2197px !important;
  max-width: 1920px;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
  overflow: hidden;
  display: block;
  z-index: 20;
}

@media (max-width: 1919px) {
  .third-section-wrapper {
    height: calc(100vw * 2197 / 1920);
  }
}

.third-section {
  position: relative;
  width: 100%;
  height: 2197px !important;
  min-height: 2197px !important;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-image: url('../images/ChatGPetey-Home-bottom-bkgd-2197h.jpg');
  display: flex;
  align-items: flex-start;
  justify-content: center;
}





/* ===== VIDEO CONTROLS ===== */
.video-controls {
  position: absolute;
  right: 73px;
  bottom: 20px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
}

.video-controls button {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #000000;
  border: 2px solid #000000;
  border-radius: 10px;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
}

.video-controls button:hover,
.video-controls button:focus {
  background-color: var(--accent-blue);
  color: #fff;
  border: 2px solid #000000;
  outline: none;
}

.video-controls button svg {
  display: block;
  margin: 0 auto;
  stroke: #fff;
  width: 24px;
  height: 24px;
}


/* ===== IMAGE HERO ===== */
.image-hero-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
}

.image-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  background-image: url('../images/079-Enchanted-Forest.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}


/* ===== SLIDESHOW HERO ===== */
.fullscreen-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.slideshow-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000; /* Black background to catch transparency issues */
}

.sticky-container {
  position: relative;
  height: 200vh; /* Text section + spacer = 200vh of stick time */
  z-index: 5; /* Establish a stacking context for each section */
}

/* Explicit height for Section 2 to ensure 100vh spacer */
#s2-sticky-container {
  height: 290vh;
  border-top: 2px solid var(--gold);
}

#s3-sticky-container {
  height: 270vh;
  border-top: 2px solid var(--gold);
}

#s4-sticky-container {
  height: 280vh;
  border-top: 2px solid var(--gold);
}

/* Explicit height for Section 3 to ensure 100vh spacer */
.sticky-container[data-bg="s3"] {
  height: calc(200vh + 300px);
}

.hero-sticky-container {
  height: 250vh; /* Extra 50vh for text box that starts lower */
  position: relative;
}

.hero-sticky-container::after {
  content: '';
  position: absolute;
  top: 350vh;
  left: 0;
  width: 100%;
  height: 0;
  border-bottom: 2px solid var(--gold);
  z-index: 1000;
}

.s1-sticky-container {
  z-index: -1; /* Behind fixed background */
}

.sticky-slideshow {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
  z-index: 1;
  margin-bottom: -100vh; /* Let next element overlay it */
}

/* Controls inside sticky slideshow need high z-index */
.sticky-slideshow .slideshow-controls {
  z-index: 10;
  position: absolute;
}

.section-over-sticky {
  position: relative;
  width: 100%;
  height: 100vh;
  z-index: 4;
  pointer-events: none;
  background: none !important;
}

.section-over-sticky .text-overlay {
  pointer-events: auto;
}

.slideshow-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  border-radius: 0; /* Sharp edges - no rounded corners */
  transition: opacity 1.5s cubic-bezier(0.2, 0.8, 0.3, 1), 
              transform 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
  will-change: opacity, transform;
  z-index: 1;
}

.slideshow-image.active {
  opacity: 1;
  z-index: 2;
}

.slideshow-image.previous {
  opacity: 1; /* Keep it visible */
  z-index: 1; /* But underneath the new '.active' slide */
}

.slideshow-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 2px;
  pointer-events: auto;
}

/* Section 1 controls - now absolute, inside the slideshow container */
#s1-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 10; /* Consistent with other slideshows */
  pointer-events: auto !important;
}

/* Force hide controls for text box slideshows */
.hidden-controls,
#s1-controls.hidden-controls {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Hide s1 controls when using text box slideshow */
#s1-controls[style*="display: none"] {
  display: none !important;
}

#s1-controls button {
  pointer-events: auto !important;
  cursor: pointer;
}

#s1-controls button svg {
  pointer-events: none; /* Let clicks pass through SVG to button */
}

/* Section 2, 3 & 4 controls - fixed position to escape stacking context */
#s3-controls, #s4-controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  pointer-events: auto !important;
}

#s2-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 10;
}

#s2-controls button, #s3-controls button, #s4-controls button {
  pointer-events: auto !important;
  cursor: pointer;
}

#s2-controls button svg, #s3-controls button svg, #s4-controls button svg {
  pointer-events: none; /* Let clicks pass through SVG to button */
}

.slideshow-controls button {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #000000;
  border: 2px solid #000000;
  border-radius: 10px;
  box-sizing: border-box;
  margin: 0 1px;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
}

.slideshow-controls button:hover,
.slideshow-controls button:focus {
  background-color: var(--accent-blue);
  color: #fff;
  border: 2px solid #000000;
  outline: none;
}

.slideshow-controls button svg {
  display: block;
  margin: 0 auto;
  stroke: #fff;
  width: 24px;
  height: 24px;
}

.icon-play-slide {
  display: none;
}

.icon-pause-slide {
  display: block;
}


/* ===== CARDS SECTION ===== */
.cards-section {
  position: relative;
  padding: 20px 0 0 0;
  background-color: var(--govt-blue);
  z-index: 2;
}

.cards-section-2 {
  position: relative;
  margin: 30px 0 0 0;
  padding: 20px 0 0 0;
  background-color: var(--govt-blue);
  z-index: 2;
}

.cards-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter) 40px var(--gutter);
  width: 100%;
  position: relative;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--card-gap);
  margin-top: calc(-1 * var(--cards-overlap));
  margin-bottom: 40px;
}

.card {
  background: var(--dark-blue);
  border-radius: var(--card-radius);
  overflow: hidden;
  border: var(--border);
  transition: 
    transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1),
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 4;
  box-shadow: var(--card-shadow);
  min-width: 0;
  will-change: transform;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-hover-shadow);
}


/* ===== CARD HEADER ===== */
.card-header {
  background-color: rgba(17, 48, 68, 1);
  border-radius: var(--card-radius);
  overflow: hidden;
  border: var(--border);
  padding: 5px 20px;
  text-align: center;
  transition: 
    background-color 0.4s cubic-bezier(0.2, 0.8, 0.3, 1),
    color 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.card:hover .card-header {
  background-color: var(--accent-blue);
  color: white;
}

.card-header h3 {
  color: var(--text);
  font-size: var(--card-title-size);
  font-weight: 400;
  margin: 0;
  line-height: 1.4;
  transition: color 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.card:hover .card-header h3 {
  color: white;
}


/* ===== CARD IMAGE ===== */
.card-image {
  height: 160px;
  overflow: hidden;
  border-radius: var(--card-radius);
  border: var(--border);
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
  display: block;
}

.card:hover .card-image img,
.card:hover .card-image .slideshow-image.active {
  transform: scale(1.05);
}


/* ===== CARD CONTENT ===== */
.card-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card p {
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.8;
  flex: 1;
}


/* ===== BUTTON SYSTEM ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: var(--dark-blue);
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: none;
  text-align: center;
  margin-top: 10px;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--accent-blue);
  color: white;
  transform: translateY(-3px);
}

.btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s ease;
}

.btn.car svg {
  fill: currentColor;
  stroke: none;
}

.btn.backpack svg {
  fill: none;
  stroke-width: 1.0;
}

.btn:hover svg {
  stroke: white;
}

.btn.car:hover svg {
  fill: white;
}

.btn-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}


/* ===== TEXT SECTION ===== */
.text-section {
  position: relative;
  padding: 0 0 0 0;
  background-color: var(--govt-blue);
  z-index: 2;
}

.text-box {
  box-shadow: var(--card-shadow);
  background-color: var(--scrollbar-track);
  border: 8px solid var(--dark-blue);
  margin-top: -80px;
  border-radius: var(--card-radius);
  padding: 25px;
  color: var(--text-muted);
  font-size: var(--body-size);
  line-height: 1.8;
  width: 100%;
  max-width: none;
  margin: 0;
}

.text-box p {
  margin: 0;
}


/* ===== FOOTER ===== */
.site-footer {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 0px 20px 20px;
  margin-top: 0;
  position: relative;
  z-index: 100;
  border-top: 2px solid var(--gold);
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0.005%;
  width: 99.99%;
  top: 53px;
  height: 0;
  border-bottom: 2px solid var(--gold);
  z-index: 1;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  padding-top: 20px;
  z-index: 2;
}

.footer-col {
  text-align: center;
}

.footer-col h4 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
}

.footer-col h4 a {
  color: #fff;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-block;
}

.footer-col h4 a:hover,
.footer-col h4 a:focus {
  background: var(--accent-blue);
  color: #fff;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin: 6px 0;
}

.footer-col ul li a {
  font-family: 'Ysabeau', sans-serif;
  color: #fff;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-block;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.footer-col ul li a:hover,
.footer-col ul li a:focus {
  background: var(--accent-blue);
  color: #fff;
}

.footer-bottom {
  text-align: center;
  font-size: 0.875rem;
  margin-top: 30px;
  margin-bottom: 10px;
}


/* ===== WALLPAPER DETAIL PAGE ===== */
.cards-grid-wallpaper {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--card-gap);
  margin-top: calc(-1 * var(--cards-overlap));
  margin-bottom: 40px;
}

.card-left {
  grid-column: 1 / 2;
}

.card-right {
  grid-column: 2 / 3;
}

.cards-grid-wallpaper .card-image {
  height: auto;
}

.cards-grid-wallpaper .card-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Disable card navigation for wallpaper detail pages */
.cards-grid-wallpaper .card {
  pointer-events: none;
  cursor: default;
}

/* Re-enable pointer events for form elements */
.card-form .enquiry-form,
.card-form .enquiry-form * {
  pointer-events: auto;
}

.card-form .enquiry-form button {
  cursor: pointer;
}

/* Prevent card-right header from changing on hover */
.card-right.card-form:hover .card-header,
.card-right.card-form .card-header:hover {
  background-color: rgba(10, 37, 0, 0.6);
  color: var(--text);
}

.card-right.card-form:hover .card-header h3,
.card-right.card-form .card-header:hover h3 {
  color: var(--text);
}

/* Enquiry form styles */
.enquiry-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 0.5rem;
}

.enquiry-form label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  letter-spacing: 0.5px;
  display: block;
}

.enquiry-form input,
.enquiry-form textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--scrollbar-track);
  color: var(--text);
  resize: none;
  box-sizing: border-box;
  transition: border 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(26, 46, 26, 0.08);
}

.enquiry-form input:focus,
.enquiry-form textarea:focus {
  border-color: var(--accent-blue);
  outline: none;
  box-shadow: 0 0 0 2px var(--sage-blue);
}

.enquiry-form button {
  background: var(--dark-blue);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 2rem;
  box-shadow: 0 2px 8px rgba(26, 46, 26, 0.12);
  margin-top: 0.5rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.enquiry-form button:hover,
.enquiry-form button:focus {
  background: var(--accent-blue);
  box-shadow: none;
  outline: none;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .cards-grid-wallpaper {
    grid-template-columns: 1fr;
  }
  
  .card-left,
  .card-right {
    grid-column: 1 / 2;
  }
}

@media (max-width: 768px) {
  .hero-content h1 { 
    font-size: 2.5rem; 
  }
  
  .hero-content p { 
    font-size: 1.2rem; 
  }
  
  .cards-grid { 
    gap: 20px; 
  }
  
  .card-header { 
    padding: 12px 15px; 
  }
  
  .card-header h3 { 
    font-size: 1.2rem; 
  }
  
  .nav-container,
  .cards-container,
  .footer-content {
    padding: 0 15px;
  }
  
  .nav-links a { 
    padding: 6px 10px; 
    margin: 0 5px; 
  }
  
  .btn-container { 
    justify-content: center; 
  }
  
  .image-hero {
    background-attachment: scroll;
  }
  
  .footer-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
}


/* ===== FULL-SCREEN SECTIONS WITH TEXT OVERLAYS ===== */
.fullscreen-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

/* Fixed slideshow container - stays in place while sections scroll over it */
.fixed-slideshow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  background: #000;
  pointer-events: none;
}

.fixed-slideshow-container .text-overlay {
  z-index: 3;
  pointer-events: auto;
}

/* Ensure sections can still appear above the slideshow - REMOVED z-index rule causing Section 1 to hide */

.fixed-slideshow-container .slideshow-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1000ms ease-in-out;
  z-index: 1;
}

.fixed-slideshow-container .slideshow-image.active {
  /* Opacity controlled by inline styles - don't set here */
  z-index: 2; /* Active slide on top during fade */
}

/* Sections that scroll over fixed background */
.section-over-fixed {
  position: relative;
  height: 200vh;
  background: none !important;
  background-attachment: scroll !important;
  pointer-events: none; /* Don't block clicks to slideshow controls */
  z-index: 2;
}

.section-over-fixed[data-bg="s1"] {
    height: calc(220vh + 140px);
}

/* Compensate for hero's negative margin - push Section 1 content down */
.fixed-slideshow-container + .section-over-fixed {
  margin-top: calc(250vh + 200px);
}

/* Re-enable pointer events for text content so it's selectable */
.section-over-fixed .text-overlay {
  pointer-events: auto;
}

/* Re-enable pointer events for text content so it's selectable */
.section-over-fixed .text-overlay {
  pointer-events: auto;
}

/* No overlay for spacer sections - show full image */
.fullscreen-section.spacer::before {
  display: none;
}

/* Override overflow for sections inside sticky containers */
.sticky-container .fullscreen-section {
  overflow: visible;
}

/* ADDED: Override overflow for the section containing the s1 text box */
.section-over-fixed[data-bg="s1"] {
    overflow: visible;
}

/* Spacer positioned below text */
.sticky-container .fullscreen-section.spacer {
  position: absolute;
  top: 100vh;
  left: 0;
  width: 100%;
  pointer-events: none; /* Don't block controls */
}

/* Spacer for section-over-fixed */
.section-over-fixed.spacer {
  height: 100vh;
  position: relative;
}

/* Text overlay panel - SHARED STYLING ONLY (color, background, padding) */
.text-overlay {
  position: relative;
  z-index: 2;
  padding-top: 20px;
  padding-right: 4rem;
  padding-bottom: 4rem;
  padding-left: 4rem;
  background: rgba(0, 0, 0, 0.7);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  border-radius: 8px;
  border: 2px solid var(--gold);
}

/* Section-specific positioning - completely independent */
.text-hero {
  position: absolute !important;
  left: 22.76% !important;
  top: calc(100vh - 70px) !important;
  bottom: auto !important;
  transform: none !important;
  width: 41.77% !important;
  max-width: none !important;
  margin: 0 !important;
  z-index: 10;
}

/* Contact page hero - starts on screen instead of below */
.text-contact-hero {
  position: absolute !important;
  left: 22.76% !important;
  top: 35vh !important; /* Adjustable - brings it on screen, configured from admin */
  bottom: auto !important;
  transform: none !important;
  width: 41.77% !important; /* Adjustable from admin */
  max-width: none !important;
  margin: 0 !important;
  z-index: 10;
}

/* Voice input styling */
.voice-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.voice-input-wrapper input,
.voice-input-wrapper textarea {
  flex: 1;
  padding-left: 50px; /* Make room for the button */
}

.voice-btn {
  position: absolute;
  left: 8px;
  top: 8px; /* Position at top instead of center */
  transform: none; /* Remove vertical centering */
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  z-index: 10;
}

.voice-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #DAA520;
}

.voice-btn.listening {
  background: #c82333;
  border-radius: 50%;
  color: #fff;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.text-s1 {
    position: absolute;
    top: calc(200vh - 70px);
    left: 22.76%;
    width: 41.77%;
    z-index: 3;
    color: white;
}
.text-s1.is-pinned {
  position: fixed;
  top: calc(100vh - 70px);
  left: 22.76%;
  transform: none;
}

.text-s2 {
  position: absolute !important;
  left: auto !important; /* Remove the fixed left positioning */
  right: 0 !important; /* Align to the right edge */
  top: calc(100vh - 70px) !important;
  transform: none !important;
  width: 31.25% !important; /* Set width to 600px equivalent */
  max-width: none !important;
  margin: 0 !important;
  border-right: none;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.text-s3 {
  position: absolute !important;
  left: 22.76% !important;
  top: calc(100vh - 70px) !important;
  transform: none !important;
  width: 41.77% !important;
  max-width: none !important;
  margin: 0 !important;
}

.text-s4 {
  position: absolute !important;
  left: 0% !important;
  top: calc(100vh - 70px) !important;
  transform: none !important;
  width: 35.99% !important;
  max-width: none !important;
  margin: 0 !important;
  border-left: none;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Text overlay content styling */
.text-overlay h2 {
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
  line-height: 1.3;
}

.text-overlay p {
  font-size: var(--body-size);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.text-overlay p:last-child {
  margin-bottom: 0;
}

/* Text box navigation links */
.text-box-nav {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.text-box-nav a {
  font-family: 'Ysabeau', sans-serif;
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 18px;
  border: 2px solid var(--gold);
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  background: transparent;
}

.text-box-nav a:hover,
.text-box-nav a:focus {
  background-color: var(--gold);
  color: black;
  outline: none;
}

.text-box-nav a.active {
  background-color: var(--gold);
  color: black;
}

/* Section 1 slide navigation links - override browser defaults */
.s1-slide-link,
.s1-slide-link:link,
.s1-slide-link:visited {
  font-family: 'Ysabeau', sans-serif !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  color: #c5a865 !important;
}

/* Active/inactive states handled by inline styles in JS, but ensure no browser overrides */
.s1-slide-link:active {
  color: inherit !important;
}

.text-overlay .s1-slide-link,
.text-overlay .s1-slide-link:link,
.text-overlay .s1-slide-link:visited {
  color: inherit !important;
}

/* CTA link styling */
.cta-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent-blue);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  border: 2px solid var(--gold);
  transition: background 0.3s ease, transform 0.2s ease;
}

.cta-link:hover {
  background: var(--activated-blue);
  transform: translateY(-2px);
}

/* Submit button styling - consistent with CTA links */
.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn-submit:hover {
  background: var(--btn-hover-bg);
  color: var(--btn-hover-text);
  transform: translateY(-2px);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .fullscreen-section {
    height: auto;
    min-height: 100vh;
    padding: 4rem 0;
    background-attachment: scroll !important; /* Override inline styles on mobile */
  }
  
  .text-overlay {
    max-width: 90%;
    padding: 2rem;
    margin: 2rem auto;
  }
  
  .text-overlay.left,
  .text-overlay.right {
    margin-left: auto;
    margin-right: auto;
  }
  
  .text-overlay h2 {
    font-size: 2rem;
  }
  
  .text-overlay p {
    font-size: 1rem;
  }
}


/* ===== PARALLAX SLIDESHOW BACKGROUNDS ===== */
.parallax-slideshow-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.parallax-slideshow-wrapper.active {
  opacity: 1;
  visibility: visible;
}

.parallax-slideshow-wrapper .slideshow-hero {
  width: 100%;
  height: 100vh;
}

.section-over-parallax-bg {
  background: none !important;
  background-image: none !important;
}


/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .hero video {
    display: none;
  }
}