 /* Ensure header overlays on top of the full-screen container */
  .site-header {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
  }

  /* Apply dynamic nav color to header top info so it's readable on dark/light slides */
  .optech-header-info ul li,
  .optech-header-info ul li a,
  .optech-header-info ul li i {
    color: var(--nav-color, #fff) !important;
    transition: color 0.3s ease;
  }

  /* Apply dynamic nav color to mobile menu hamburger */
  .mobile-menu-trigger span,
  .mobile-menu-trigger span::before,
  .mobile-menu-trigger span::after {
    /*background-color: var(--nav-color, #fff) !important;*/
    transition: background-color 0.3s ease;
  }

  /* Lock native body scrolling for the snap effect */
  body, html {
    overflow: hidden;
    margin: 0;
    padding: 0;
    height: 100vh;
    height: 100dvh;
  }

  .horizontal-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background-color: #ffffff; /* White backdrop to prevent text contrast issues */
  }

  .sticky-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
  }

  #scrollWrap {
    display: flex;
    flex-wrap: nowrap;
    height: 100vh;
    height: 100dvh;
    width: max-content;
    /* Smooth cubic-bezier transition for the "flip/slide" effect */
    transition: transform 0.9s cubic-bezier(0.645, 0.045, 0.355, 1);
    will-change: transform;
  }

  .h-section {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    flex-shrink: 0;
    overflow-y: auto; /* Allow internal scrolling if content is too big */
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Adding a subtle scale effect for the active/inactive state, keeping full opacity */
    transition: transform 0.9s cubic-bezier(0.645, 0.045, 0.355, 1);
    transform: scale(0.95);
  }

  /* The active section is full size */
  .h-section.active-slide {
    transform: scale(1);
  }

  /* Ensure original sections take full height inside h-section if needed */
  .h-section > .section,
  .h-section > .optech-hero-section {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
  }

  /* --- Scroll Indicator Animation --- */
  .scroll-indicator {
    position: absolute;
    bottom: 4vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    opacity: 0.8;
    animation: bounce 2s infinite;
    z-index: 10;
  }
  .scroll-indicator span {
    font-size: 0.85rem;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  .scroll-indicator .mouse {
    width: 22px;
    height: 34px;
    border: 2px solid #fff;
    border-radius: 12px;
    position: relative;
  }
  .scroll-indicator .wheel {
    width: 4px;
    height: 6px;
    background: #fff;
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite;
  }
  @keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -10px); }
    60% { transform: translate(-50%, -5px); }
  }
  @keyframes scrollWheel {
    0% { top: 6px; opacity: 1; }
    100% { top: 16px; opacity: 0; }
  }

  /* --- Element Zoom In Animations --- */
  /* Hidden and scaled down state initially */
  .h-section .zoom-element {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Spring-like easing */
  }

  /* Animate in when parent slide is active.
     Delay allows the slide to snap into place before elements zoom in. */
  .h-section.active-slide .zoom-element {
    opacity: 1;
    transform: scale(1) translateY(0);
    transition-delay: 0.5s;
  }

  /* Optional staggers for multiple elements on a slide */
  .h-section.active-slide .zoom-element.delay-1 { transition-delay: 0.7s; }
  .h-section.active-slide .zoom-element.delay-2 { transition-delay: 0.9s; }
  .h-section.active-slide .zoom-element.delay-3 { transition-delay: 1.1s; }

  /* Responsive font sizing and padding to ensure content fits screen height */
  .h-section h1 { font-size: clamp(1.5rem, 4vh + 1vw, 3.5rem) !important; line-height: 1.2 !important; margin-bottom: 2vh !important; }
  .h-section h2 { font-size: clamp(1.2rem, 3vh + 1vw, 2.5rem) !important; margin-bottom: 2vh !important; line-height: 1.2 !important; }
  .h-section h5 { font-size: clamp(1rem, 2vh + 0.5vw, 1.5rem) !important; margin-bottom: 1vh !important; line-height: 1.2 !important; }
  .h-section p { font-size: clamp(0.85rem, 1.5vh + 0.5vw, 1.1rem) !important; margin-bottom: 2vh !important; line-height: 1.5 !important; }

  /* Default image constraint */
  .h-section img { max-height: 40vh; width: auto; object-fit: contain; }

  /* Enlarge first screen right side image to match left content height */
  .optech-hero-section .row {
    align-items: stretch; /* Stretch columns to same height */
  }
  .optech-hero-thumb {
    height: 100%;
    display: flex;
    align-items: center;
  }
  .optech-hero-thumb img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    max-height: 65vh !important; /* Allow it to be taller than 40vh */
    border-radius: 20px; /* Keep rounded corners if any */
  }

  /* Compact paddings and margins for inner elements */
  .h-section .optech-section-padding,
  .h-section .extra-padding-tb,
  .h-section .large-padding-tb,
  .h-section .optech-hero-section {
    padding-top: max(3vh, 10px) !important;
    padding-bottom: max(10vh, 40px) !important; /* Larger gap at the bottom */
    min-height: 0 !important;
  }

  .optech-iconbox-wrap2 { padding: max(2vh, 10px) !important; margin-bottom: max(2vh, 10px) !important; }
  .optech-t-box { padding: max(2vh, 15px) !important; margin-bottom: 0 !important; }
  .optech-hero-content { margin-top: 0 !important; }

  /* Make buttons scale appropriately */
  .h-section .optech-default-btn {
    padding: max(1vh, 8px) max(2vw, 15px) !important;
    font-size: clamp(0.8rem, 1.2vh + 0.5vw, 1rem) !important;
  }

  /* Fix divider sizing */
  .optech-divider { margin: max(2vh, 10px) 0 !important; }

  /* --- Slide Counter --- */
  .slide-counter {
    position: absolute;
    bottom: 5vh;
    right: 5vw;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--nav-color, #fff);
    z-index: 9999;
    letter-spacing: 2px;
    transition: color 0.3s ease;
  }

    /* --- Mobile Specific Fixes - Standard Vertical Scrolling --- */
    @media (max-width: 991px) {
      html, body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
        position: relative !important;
      }
      
      .horizontal-container, 
      .sticky-wrapper, 
      #scrollWrap {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        transform: none !important;
        overflow: visible !important;
      }

      .h-section {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
      }

      .slide-counter,
      .scroll-indicator {
        display: none !important;
      }

      .h-section > .optech-hero-section {
        padding-top: 90px !important; /* Reduced from 110px */
      }
      .h-section > .section {
        padding-top: 20px !important; /* Tightened from 40px */
      }
      .h-section > .section,
      .h-section > .optech-hero-section {
        height: auto !important;
        min-height: auto !important; 
        padding-bottom: 10px !important; /* Even tighter bottom */
        display: block !important;
        position: relative !important;
      }

      /* Section 4 mobile refinements */
      .optech-iconbox-wrap2 {
        margin-bottom: 15px !important;
      }

      /* Add consistent spacing between stacked sections */
      .h-section {
        border-bottom: 1px solid rgba(0,0,0,0.03); 
        margin-bottom: 0 !important;
      }

      .h-section .container {
        margin-top: 10px !important; /* Tightened from 20px */
        position: relative !important;
        z-index: 10 !important; 
      }

      /* Allow animations on mobile by removing the !important force */
      .h-section .zoom-element {
        transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      }

      /* Ensure content is visible if JS fails, but allow animation trigger */
      .h-section.active-slide .zoom-element {
        opacity: 1 !important;
        visibility: visible !important;
        transform: scale(1) translateY(0) !important;
      }

      /* Disable AOS force to allow natural triggers */
      [data-aos] {
        /* opacity: 1 !important; */
        /* transform: none !important; */
      }

      .optech-hero-thumb img, 
      .h-section img {
        max-height: none !important;
        height: auto !important;
        width: 100% !important;
      }
    }
