/* ========================================================
   1. BULLETPROOF RESPONSIVE RESETS & SMOOTH SCROLL
   ======================================================== */
html {
  scroll-behavior: smooth !important;
}

*, *::before, *::after {
  box-sizing: border-box; 
  -webkit-tap-highlight-color: transparent !important; /* KILLS THE MOBILE TAP FLASH GLOBALLY */
}

/* CRITICAL: Body MUST be 'clip' for sticky to work globally! */
html, body {
  overflow-x: clip !important; 
  width: 100%;
  margin: 0;
  padding: 0;
}
/* ========================================================
   2. FLUID TYPOGRAPHY
   ======================================================== */
html { font-size: 16px; }

@media (max-width: 992px) {
  html { font-size: 14px; } 
}

@media (max-width: 768px) {
  html { font-size: 13px; }
  
  .hero-bg-text, .blueprint-bg-text, .transform-watermark {
    font-size: 25vw !important; 
    top: 5% !important;
    text-align: center !important;
    width: 100% !important;
    left: 0 !important;
    transform: none !important;
  }
}

/* ========================================================
   3. UNIVERSAL STICKY DASHBOARD (DESKTOP & MOBILE)
   ======================================================== */
.sub-nav {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 150px !important; /* Desktop Header Height */
  z-index: 990 !important;
  display: flex !important;
  flex-wrap: wrap !important; 
  justify-content: space-between !important; 
  padding: 15px 24px 20px 24px !important;
  gap: 15px !important;
  border-bottom: 1px solid rgba(197, 160, 101, 0.2) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

.sub-nav-hint {
  width: 100% !important; 
  justify-content: center !important; 
  align-items: center !important;
  gap: 10px !important; 
  border-right: none !important;
  margin-right: 0 !important;
  padding-right: 0 !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(197, 160, 101, 0.1) !important; 
  margin-bottom: 5px !important;
  font-size: 0.9rem !important; /* Desktop text size */
}

.sub-nav-hint svg {
  display: block !important; 
  width: 14px !important;
  height: 14px !important;
  transform: rotate(90deg) !important; 
  animation: none !important; 
}

.sub-nav a {
  flex: 1 !important; /* Forces perfect 33% width */
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  font-size: 0.85rem !important; /* Desktop text size */
  padding: 14px 10px !important;
  white-space: nowrap !important;
  margin: 0 !important;
}

/* ========================================================
   4. MOBILE-ONLY FIXES (GRIDS, BUTTONS, SPACING)
   ======================================================== */
@media (max-width: 992px) {
  
  /* --- Adjust Sticky Dashboard for Mobile --- */
  .sub-nav {
    top: 120px !important; /* Mobile Header Height */
    padding: 10px 15px 15px 15px !important;
    gap: 8px !important;
  }
  .sub-nav-hint {
    font-size: 0.8rem !important;
    padding-bottom: 8px !important;
    margin-bottom: 4px !important;
  }
  .sub-nav a {
    font-size: 0.65rem !important; /* Mobile text size */
    padding: 10px 4px !important;
  }

  /* --- Grid Resets --- */
  .hero-grid, .precision-grid, .transform-grid, .footer-grid, 
  .slider-grid, .case-study-card, .master-grid, .reveal-grid, .filmstrip-grid {
    grid-template-columns: 1fr !important; 
    gap: 40px !important;
  }
  
  .filmstrip-grid {
    gap: 25px !important;
  }

  /* --- Spacing & Alignment --- */
  .hero, .exhibit-section, .precision-section, .cinema-section {
    padding-top: 100px !important;
    padding-bottom: 60px !important;
    text-align: center !important; 
  }

  .precision-content, .hero-content, .b2b-teaser, .grand-finale {
    align-items: center !important;
    text-align: center !important;
  }
  
  .precision-content {
      border-left: none !important;
      padding-left: 0 !important;
  }
  .precision-content::before {
      display: none !important;
  }

  /* --- Clinic Page Text/Image Swap --- */
  .architect-grid {
    display: flex !important;
    flex-direction: column-reverse !important;
  }
  
  .slide-from-right, .slide-from-left {
    transform: translateY(40px) !important;
  }
  .slide-from-right.is-visible, .slide-from-left.is-visible {
     transform: translateY(0) !important;
  }

  /* --- Services Page Layout --- */
  .treatment-row .container,
  .treatment-row:nth-child(even) .container {
    display: flex !important;
    flex-direction: column !important; 
    gap: 30px !important;
    padding: 0 !important;
  }

  .treatment-row {
    padding: 60px 24px !important; 
  }

  .t-content {
    padding: 0 !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .t-number {
    font-size: 4.5rem !important;
    margin-bottom: -15px !important; 
  }
  
  .t-title {
    font-size: 2.4rem !important;
    line-height: 1.2 !important;
  }

  .treatment-features li {
    justify-content: center !important;
  }

  .t-actions {
    justify-content: center !important;
    flex-direction: column !important; 
    gap: 15px !important;
    width: 100% !important;
  }
  
  .t-actions a, .t-actions button {
      width: 100% !important; 
      padding: 14px 10px !important; 
      display: flex !important;
      justify-content: center !important;
      align-items: center !important;
      min-height: 52px !important; 
      font-size: 0.85rem !important;
      white-space: nowrap !important;
  }

  .t-image-wrapper {
    width: 100% !important;
    height: 350px !important; 
    min-height: unset !important;
    margin-top: 10px !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important; 
  }

  .t-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; 
  }
}
/* ========================================================
   5. KILL MOBILE TAP HIGHLIGHTS & OUTLINES (STICKY BAR)
   ======================================================== */
.sub-nav, 
.sub-nav *, 
.sub-nav-hint, 
.sub-nav a {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
  -webkit-touch-callout: none !important; /* Stops the popup menu on long-press */
  outline: none !important; /* Kills default browser focus rings */
}

.sub-nav a:focus, 
.sub-nav a:active,
.sub-nav-hint:focus, 
.sub-nav-hint:active {
  outline: none !important;
}
/* ========================================================
   6. GALLERY UPGRADES: FLOATING CAROUSEL & MOBILE GRIDS
   ======================================================== */

/* --- 1. Floating Carousel Controls (Desktop & Mobile) --- */
.carousel-wrapper {
  position: relative;
  width: 100%;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(18, 18, 18, 0.85) !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(197, 160, 101, 0.5) !important;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.carousel-btn.left-btn { left: 15px; }
.carousel-btn.right-btn { right: 15px; }

.carousel-btn svg {
  width: 16px;
  height: 16px;
  fill: #c5a065 !important; /* Gold arrow */
}

.carousel-btn:hover {
  background: linear-gradient(135deg, #a68a56 0%, #c5a065 100%) !important;
  border-color: transparent !important;
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn:hover svg { fill: white !important; }

/* The "Swipe to explore" hint text */
.scroll-hint {
  font-size: 0.85rem;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  display: block;
  margin-top: 15px;
}

/* --- 2. Mobile 2-Column Grid Fixes (Phones Only) --- */
@media (max-width: 768px) {
  /* Forces Masterclass and Hover Reveal into 2 side-by-side columns */
  .master-grid, .reveal-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  
  .carousel-btn {
    width: 40px;
    height: 40px;
  }
  .carousel-btn.left-btn { left: 5px; }
  .carousel-btn.right-btn { right: 5px; }
  
  /* Shrinks hover labels so they don't overlap in small columns */
  .hover-label {
    font-size: 0.6rem !important;
    padding: 6px 10px !important;
    bottom: 10px !important;
  }
}