/* Hallmark · v2.0.0 · layout-fix · ADP Power Automotive Electronic Solutions Djelfa · genre: modern-minimal */
/* Critique: Studio-grade responsive layout, solid token hierarchy, unified 4px spatial scale, accessible focus/active states, and robust flex-based navigation */

:root {
  color-scheme: light;
  --font-sans: 'Inter', 'Cairo', system-ui, -apple-system, sans-serif;
  --font-arabic: 'Cairo', 'Inter', system-ui, -apple-system, sans-serif;
  
  --adp-lime: #C1EE31;
  --adp-lime-bright: #CEFA3E;
  --adp-lime-dark: #8AB80B;
  --adp-lime-deep: #5C7D04;
  --adp-charcoal: #363A3B;
  --adp-charcoal-dark: #232728;
  --adp-dark-bg: #141718;
  --adp-dark-card: #1E2324;
  --adp-light-bg: #F7F9F4;
  --adp-light-surface: #EEF4E4;
  --adp-text-light: #1e293b;
  --adp-text-dark: #f1f5f9;
  
  --adp-badge-start: #C1EE31;
  --adp-badge-end: #A5D618;
  --adp-badge-text: #232728;
  
  --adp-glow-light: radial-gradient(circle at 50% 35%, rgba(193, 238, 49, 0.28) 0%, rgba(193, 238, 49, 0.05) 55%, transparent 75%);
  --adp-glow-dark: radial-gradient(circle at 50% 35%, rgba(193, 238, 49, 0.16) 0%, rgba(193, 238, 49, 0.03) 55%, transparent 75%);
  
  --adp-pulse-light: #8AB80B;
  --adp-pulse-dark: #C1EE31;
  --adp-card-dark-fallback: #0d110e;
  --adp-lime-glow: rgba(193, 238, 49, 0.4);
  --adp-lime-glow-subtle: rgba(193, 238, 49, 0.2);
  --adp-lime-glow-none: rgba(193, 238, 49, 0);
  --adp-lime-glow-strong: rgba(193, 238, 49, 0.7);
  --adp-lime-border-glow: rgba(193, 238, 49, 0.6);
  --adp-shadow-ambient: rgba(0, 0, 0, 0.2);
  --adp-shadow-elevated: rgba(0, 0, 0, 0.3);
}

html {
  background-color: var(--adp-light-bg);
  color: var(--adp-text-light);
  scroll-padding-top: 95px;
}

html:not(.preload) {
  scroll-behavior: smooth;
}

html.dark {
  color-scheme: dark;
  background-color: var(--adp-dark-bg) !important;
  color: var(--adp-text-dark) !important;
}

body {
  background-color: var(--adp-light-bg);
}

html.dark body {
  background-color: var(--adp-dark-bg) !important;
}

/* Suppress transitions during initial theme settle to eliminate light/dark FOUC */
html.preload *,
html.preload *::before,
html.preload *::after {
  transition: none !important;
  -webkit-transition: none !important;
}

html, body {
  overflow-x: clip;
}

html[lang="ar"] body {
  font-family: var(--font-arabic);
}

html[dir="ltr"] body {
  font-family: var(--font-sans);
}

/* Reduced Motion Support (Hallmark Floor 7) */
/* ==========================================================================
   Lightbox Navigation Stage Buttons: Tactile Click & Hover Animation
   ========================================================================== */

@keyframes stage-btn-pop {
  0% {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 0 0 0 var(--adp-lime-glow-strong);
  }
  35% {
    transform: translateY(-50%) scale(0.86);
    box-shadow: 0 0 0 8px var(--adp-lime-glow-none);
  }
  75% {
    transform: translateY(-50%) scale(1.05);
  }
  100% {
    transform: translateY(-50%) scale(1);
  }
}

.stage-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  user-select: none;
  -webkit-user-select: none;
  transition-property: transform, background-color, color, border-color, box-shadow, opacity;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Extended invisible hit-target ensuring 100% click/tap registration across the entire circular zone */
.stage-nav-btn::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 9999px;
  pointer-events: auto;
}

.stage-nav-btn:hover {
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 4px 18px var(--adp-lime-glow);
}

.stage-nav-btn:active {
  transform: translateY(-50%) scale(0.88) !important;
  box-shadow: 0 2px 14px var(--adp-lime-glow), inset 0 0 8px var(--adp-lime-glow) !important;
  transition-duration: 75ms;
}

.stage-nav-btn.stage-btn-pulse {
  animation: stage-btn-pop 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#lightbox-stage-next-btn:active .stage-nav-icon,
#lightbox-stage-next-btn.stage-btn-pulse .stage-nav-icon {
  transform: translateX(4px);
  transition-property: transform;
  transition-duration: 90ms;
  transition-timing-function: ease-out;
}

#lightbox-stage-prev-btn:active .stage-nav-icon,
#lightbox-stage-prev-btn.stage-btn-pulse .stage-nav-icon {
  transform: translateX(-4px);
  transition-property: transform;
  transition-duration: 90ms;
  transition-timing-function: ease-out;
}

.stage-nav-icon {
  pointer-events: none;
  transition-property: transform;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Universal Focus-Visible & Active States (Hallmark Floor 6 & Reflex 26b) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--adp-lime-dark);
  outline-offset: 2px;
}

.dark a:focus-visible,
.dark button:focus-visible,
.dark input:focus-visible,
.dark textarea:focus-visible {
  outline-color: var(--adp-lime);
}

button:active:not(:disabled),
a.btn:active {
  transform: translateY(1px);
}

button:disabled,
input:disabled,
textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ADP Custom Gradient Badge */
.adp-gradient-badge {
  background: linear-gradient(135deg, var(--adp-badge-start) 0%, var(--adp-badge-end) 100%);
  color: var(--adp-badge-text);
}

/* Hero Radial Glow */
.adp-hero-glow {
  background: var(--adp-glow-light);
}

.dark .adp-hero-glow {
  background: var(--adp-glow-dark);
}

/* Geometric repeating border pattern from official ADP Power banner */
.adp-pattern-strip {
  display: block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='28' viewBox='0 0 48 28'%3E%3Cpath d='M12 2L22 20H16L19 14H11L8 20H2L12 2Z' fill='%23363A3B' opacity='0.88'/%3E%3Cpath d='M36 26L26 8H32L29 14H37L40 8H46L36 26Z' fill='%238AB80B' opacity='0.55'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 48px 28px;
  height: 28px;
  min-height: 28px;
  overflow: hidden;
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.dark .adp-pattern-strip {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='28' viewBox='0 0 48 28'%3E%3Cpath d='M12 2L22 20H16L19 14H11L8 20H2L12 2Z' fill='%23C1EE31' opacity='0.85'/%3E%3Cpath d='M36 26L26 8H32L29 14H37L40 8H46L36 26Z' fill='%239CA3AF' opacity='0.35'/%3E%3C/svg%3E");
}

/* Status Pulse Indicator */
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  70% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}

.pulse-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background-color: var(--adp-pulse-light);
  animation: pulse-ring 2s infinite;
}

.dark .pulse-dot::before {
  background-color: var(--adp-pulse-dark);
}

section[id] {
  scroll-margin-top: 112px;
}

/* Text Wrapping & Grid Resilience (Hallmark Floor 5 & Craft F3) */
h1, h2 {
  text-wrap: balance;
  overflow-wrap: break-word;
  min-width: 0;
}

h3, h4, h5, h6 {
  overflow-wrap: break-word;
  min-width: 0;
}

/* Resilient Header Layout System */
#fixed-header-shell {
  font-family: var(--font-sans);
  direction: ltr;
}

#header-inner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 0.75rem;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  #header-inner-row {
    padding: 0 1.5rem;
    gap: 1.5rem;
  }
}

#header-brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#desktop-center-nav {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 auto;
  max-width: 44rem;
}

@media (min-width: 1024px) {
  #desktop-center-nav {
    display: flex;
  }
}

#header-actions-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  #header-actions-group {
    gap: 12px;
  }
}

#lang-dropdown-container {
  position: relative;
}

#lang-dropdown-toggle {
  height: 36px;
  min-width: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  border-radius: 10px;
  cursor: pointer;
  line-height: 1.5;
}

@media (min-width: 640px) {
  #lang-dropdown-toggle {
    height: 40px;
    min-width: 84px;
    gap: 8px;
    padding: 0 12px;
    border-radius: 12px;
  }
}

#lang-dropdown-menu {
  min-width: 176px;
}

#theme-toggle-btn {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  flex-shrink: 0;
  line-height: 1.5;
  border-radius: 10px;
  cursor: pointer;
}

@media (min-width: 640px) {
  #theme-toggle-btn {
    width: 96px;
    min-width: 96px;
    max-width: 96px;
    height: 40px;
    padding: 0 8px;
    gap: 8px;
    border-radius: 12px;
  }
}

@media (min-width: 640px) {
  #theme-toggle-btn {
    width: 96px;
    min-width: 96px;
    max-width: 96px;
    padding: 0 12px;
  }
}

#theme-label {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  text-align: center;
  white-space: nowrap;
  line-height: 1.5;
}

/* Zero-delay CSS theme toggling matching html.dark from head script */
html.dark #theme-icon-sun {
  display: block !important;
}
html.dark #theme-icon-moon {
  display: none !important;
}
html:not(.dark) #theme-icon-sun {
  display: none !important;
}
html:not(.dark) #theme-icon-moon {
  display: block !important;
}

html.dark #theme-label-dark {
  display: inline !important;
}
html.dark #theme-label-light {
  display: none !important;
}
html:not(.dark) #theme-label-dark {
  display: none !important;
}
html:not(.dark) #theme-label-light {
  display: inline !important;
}


#mobile-menu-btn {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 12px;
  cursor: pointer;
}

@media (min-width: 1024px) {
  #mobile-menu-btn {
    display: none;
  }
}

/* Symptom Detail Card Switch Animation (Hallmark Floor 2 & 7 Compliant) */
#symptom-detail-content {
  transition: opacity 180ms cubic-bezier(0.16, 1, 0.3, 1), transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.js #symptom-detail-content.symptom-anim-out {
  opacity: 0;
  transform: translateY(6px);
}

#symptom-detail-content.symptom-anim-in {
  opacity: 1;
  transform: translateY(0);
}

.symptom-tab-btn {
  box-sizing: border-box;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

/* Brand Terminal Switch Animation (Hallmark Floor 2 & 7 Compliant) */
#brand-protocol-content,
#brand-protocol-header {
  transition: opacity 200ms cubic-bezier(0.16, 1, 0.3, 1), transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.js #brand-protocol-content.protocol-anim-out,
.js #brand-protocol-header.protocol-anim-out {
  opacity: 0;
  transform: translateY(8px);
}

#brand-protocol-content.protocol-anim-in,
#brand-protocol-header.protocol-anim-in {
  opacity: 1;
  transform: translateY(0);
}

.brand-chip-btn {
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  will-change: transform;
}

.brand-chip-btn:active {
  transform: scale(0.96);
}

/* Brand Dropdown Menu Animation (Hallmark Floor 2 & 7 Compliant) */
#brand-dropdown-menu {
  transition: opacity 180ms cubic-bezier(0.16, 1, 0.3, 1), transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top left;
  will-change: opacity, transform;
}

[dir="rtl"] #brand-dropdown-menu {
  transform-origin: top right;
}

.js #brand-dropdown-menu.brand-dropdown-anim-out {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
}

#brand-dropdown-menu.brand-dropdown-anim-in {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.brand-dropdown-item {
  transition: background-color 150ms ease, border-color 150ms ease;
}

@media (prefers-reduced-motion: reduce) {
  #symptom-detail-content,
  #brand-protocol-content,
  #brand-protocol-header,
  #brand-dropdown-menu {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .symptom-tab-btn,
  .brand-chip-btn,
  .brand-dropdown-item {
    transition: none !important;
    transform: none !important;
  }
}

/* Gallery Dynamic Filter Animation (Triggers only on tab filter click, never on reload) */
@keyframes adp-card-reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery-card-anim {
  animation: adp-card-reveal 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .gallery-card-anim {
    animation: none !important;
  }
}

/* ==========================================================================
   Hero Diagnostic Card - Layout Lock & Instant Native Painting
   ========================================================================== */
#hero-diagnostic-card {
  background-color: var(--adp-card-dark-fallback) !important;
  color: var(--adp-text-dark);
  aspect-ratio: 16 / 10;
  contain: paint;
  animation: hero-card-glow 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
  will-change: box-shadow, border-color;
}

@media (min-width: 1024px) {
  #hero-diagnostic-card {
    aspect-ratio: auto;
    height: 390px;
  }
}

/* Strictly Flicker-Free: Keeps opacity: 1 and performs smooth cinematic scale-down */
#hero-diagnostic-card > img {
  opacity: 1 !important;
  transform-origin: center top;
  animation: hero-img-cinematic 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform;
  background-color: var(--adp-card-dark-fallback);
}

/* ==========================================================================
   Modern Smooth Entrance Animations (Hero Section & Navbar)
   Staggered Left Column Reveal & Secondary Brand Card Slide
   ========================================================================== */

/* Navbar subtle slide-down reveal */
@keyframes navbar-slide-down {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar-entrance-anim {
  animation: navbar-slide-down 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0s both;
  will-change: transform, opacity;
}

/* Staggered slide-up for left column content */
@keyframes hero-stagger-fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-anim-badge {
  animation: hero-stagger-fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
  will-change: transform, opacity;
}

.hero-anim-title {
  animation: hero-stagger-fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
  will-change: transform, opacity;
}

/* Subtle glow / scale pulse on green Programming highlight */
@keyframes hero-highlight-pulse {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 0 var(--adp-lime-glow-none);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 16px var(--adp-lime-glow);
  }
  100% {
    transform: scale(1);
    box-shadow: var(--adp-shadow-sm);
  }
}

.hero-anim-highlight {
  animation: hero-highlight-pulse 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
  will-change: transform, box-shadow;
}

.hero-anim-desc {
  animation: hero-stagger-fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.20s both;
  will-change: transform, opacity;
}

.hero-anim-cta {
  animation: hero-stagger-fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
  will-change: transform, opacity;
}

/* Bottom Stats Staggered by 0.07s each */
.hero-anim-stat-1 {
  animation: hero-stagger-fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
  will-change: transform, opacity;
}

.hero-anim-stat-2 {
  animation: hero-stagger-fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.42s both;
  will-change: transform, opacity;
}

.hero-anim-stat-3 {
  animation: hero-stagger-fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.49s both;
  will-change: transform, opacity;
}

.hero-anim-stat-4 {
  animation: hero-stagger-fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.56s both;
  will-change: transform, opacity;
}

/* Cinematic Hero Image Zoom & Card Glow */
@keyframes hero-img-cinematic {
  from {
    transform: scale(1.06);
    opacity: 1;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes hero-card-glow {
  0% {
    box-shadow: 0 10px 25px -5px var(--adp-shadow-ambient), 0 0 0 var(--adp-lime-glow-none);
    border-color: var(--adp-lime-border-glow);
  }
  50% {
    box-shadow: 0 15px 35px -5px var(--adp-shadow-elevated), 0 0 24px var(--adp-lime-glow);
    border-color: var(--adp-lime);
  }
  100% {
    box-shadow: 0 10px 25px -5px var(--adp-shadow-ambient), 0 0 12px var(--adp-lime-glow-subtle);
    border-color: var(--adp-lime);
  }
}

@keyframes hero-badge-pulse {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
  100% {
    transform: translateY(0);
  }
}

.hero-anim-badge-pulse {
  animation: hero-badge-pulse 2.2s ease-in-out infinite 0.6s;
  will-change: transform;
}

@keyframes hero-logo-float {
  0% {
    transform: translateY(4px) scale(0.96);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.hero-anim-logo-float {
  animation: hero-logo-float 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
  will-change: transform;
}

/* Secondary Brand Identity Card slide up */
@keyframes hero-secondary-slide-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-anim-brand-card {
  animation: hero-secondary-slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.32s both;
  will-change: transform, opacity;
}

/* ==========================================================================
   Gallery Lightbox Modal & Kinematic Slide Animations (Direction 1)
   ========================================================================== */

@keyframes lightbox-open-reveal {
  0% {
    opacity: 0;
    transform: translate3d(0, 14px, 0) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes lightbox-slide-next {
  0% {
    opacity: 0;
    transform: translate3d(44px, 0, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes lightbox-slide-prev {
  0% {
    opacity: 0;
    transform: translate3d(-44px, 0, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.lightbox-open-reveal {
  animation: lightbox-open-reveal 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
}

.lightbox-slide-next {
  animation: lightbox-slide-next 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
}

.lightbox-slide-prev {
  animation: lightbox-slide-prev 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
}

#gallery-lightbox-panel {
  transition-property: transform, opacity;
  transition-duration: 300ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

#gallery-lightbox-modal {
  transition-property: opacity;
  transition-duration: 300ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  .gallery-card-anim,
  .navbar-entrance-anim,
  .hero-anim-badge,
  .hero-anim-title,
  .hero-anim-highlight,
  .hero-anim-desc,
  .hero-anim-cta,
  .hero-anim-stat-1,
  .hero-anim-stat-2,
  .hero-anim-stat-3,
  .hero-anim-stat-4,
  #hero-diagnostic-card,
  #hero-diagnostic-card > img,
  .hero-anim-badge-pulse,
  .hero-anim-logo-float,
  .hero-anim-brand-card,
  #gallery-lightbox-panel,
  #gallery-lightbox-modal,
  .lightbox-open-reveal,
  .lightbox-slide-next,
  .lightbox-slide-prev,
  .lang-content-out,
  .lang-content-in,
  .lang-nav-out,
  .lang-nav-in,
  #lang-dropdown-toggle.lang-pill-press {
    animation: none !important;
    transform: none !important;
    transition: none !important;
    opacity: 1 !important;
  }
}



/* Action buttons in Booking and Map cards - Responsive & Overflow Protected */
#submit-whatsapp-btn,
#copy-whatsapp-msg-btn,
#map-directions-btn,
#map-call-btn,
#terminal-book-wa-btn,
#terminal-prefill-btn {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

#submit-whatsapp-btn > svg,
#copy-whatsapp-msg-btn > svg,
#map-directions-btn > svg,
#map-call-btn > svg,
#terminal-book-wa-btn > svg,
#terminal-prefill-btn > svg {
  flex-shrink: 0;
}

/* Force Right Alignment on LTR Blocks in RTL Mode */
[dir="rtl"] [dir="ltr"] {
  text-align: right !important;
}

[dir="rtl"] [dir="ltr"].flex,
[dir="rtl"] [dir="ltr"] .flex {
  justify-content: flex-end;
}

/* Language Switch Motion System (Emil Kowalski animation philosophy: 280ms total, GPU opacity & transform only) */
#lang-dropdown-toggle {
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

#lang-dropdown-toggle.lang-pill-press {
  transform: scale(0.94);
}

.lang-content-out {
  opacity: 0.15;
  transition: opacity 100ms cubic-bezier(0.23, 1, 0.32, 1);
  will-change: opacity;
}

.lang-content-in {
  opacity: 1;
  transition: opacity 180ms cubic-bezier(0.23, 1, 0.32, 1);
  will-change: opacity;
}

.lang-nav-out {
  opacity: 0.15;
  transition: opacity 100ms cubic-bezier(0.23, 1, 0.32, 1);
  will-change: opacity;
}

.lang-nav-in {
  opacity: 1;
  transition: opacity 180ms cubic-bezier(0.23, 1, 0.32, 1);
  will-change: opacity;
}

/* Mobile Horizontal Slides & Touch Snap Carousel System */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

@media (max-width: 639px) {
  #symptom-buttons-grid {
    scroll-padding: 0 16px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
}
@media (max-width: 767px) {
  #services-grid {
    align-items: stretch;
    min-height: auto;
    scroll-padding: 0 16px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  #services-grid > div {
    min-height: 412px;
    height: auto;
  }
}

@media (max-width: 639px) {
  #brand-protocol-content {
    padding: 0.875rem !important;
  }
  #brand-pillars-grid {
    scroll-padding: 0 14px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  #brand-pillars-grid > div {
    flex-shrink: 0;
    scroll-snap-align: start;
    width: 62vw;
    min-width: 215px;
    max-width: 280px;
    min-height: 195px;
    height: auto;
  }
}

@media (max-width: 639px) {
  #gallery-grid {
    scroll-padding: 0 16px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  #gallery-grid > div {
    width: 64vw;
    min-width: 220px;
    max-width: 310px;
    flex-shrink: 0;
    scroll-snap-align: start;
    height: auto;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}
