/* ============================================================================
   RESET & BASE STYLES
   ============================================================================
   Global resets, base typography, and fundamental layout styles
   ============================================================================ */

/* Box-sizing reset: Ensures padding and borders are included in element width */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Smooth scrolling for anchor links and scroll behavior */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}

/* Enhanced smooth scroll: Respects user's motion preferences */
/* Only applies smooth scrolling if user hasn't disabled animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  
  * {
    scroll-behavior: inherit;
  }
}

/* ============================================================================
   CUSTOM SCROLLBAR STYLING
   ============================================================================
   Styles the browser scrollbar with golden theme colors
   ============================================================================ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(200, 170, 120, 0.4), rgba(200, 170, 120, 0.2));
  border-radius: 5px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(200, 170, 120, 0.6), rgba(200, 170, 120, 0.4));
  background-clip: padding-box;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 170, 120, 0.3) rgba(0, 0, 0, 0.2);
}

/* ============================================================================
   CSS VARIABLES - BRANCH COLORS
   ============================================================================
   Branch-specific accent colors for theming
   ============================================================================ */
:root {
  --color-soft: #4A9EFF;
  --color-arch: #E8E8E8;   /* Architecture: black/white logo – white accent */
  --color-woods: #8B5A2B;  /* Woods: dark wood grain – warm brown */
  --color-stones: #C8BEAE; /* Stones: light stone/beige – sandy accent */
  --color-gold: rgba(200, 170, 120, 1);
  --color-gold-light: rgba(200, 170, 120, 0.8);
  --color-gold-medium: rgba(200, 170, 120, 0.5);
  --color-gold-dark: rgba(200, 170, 120, 0.3);
}

/* Base body styles: Dark theme with custom font */
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0c0c0c;
  color: #f0f0f0;
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
}

/* ============================================================================
   SKIP LINK (ACCESSIBILITY)
   ============================================================================
   Hidden skip-to-content link that appears on keyboard focus
   ============================================================================ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 10000;
  padding: 0.75rem 1.5rem;
  background: var(--color-gold);
  color: #0c0c0c;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 4px 0;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-gold-light);
  outline-offset: 2px;
}

/* ============================================================================
   PAGE BACKGROUND DECORATIVE ELEMENTS
   ============================================================================
   Golden accent lines and noise texture overlay for visual depth
   ============================================================================ */
.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Golden accent lines */
.page-bg-line {
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(200, 170, 120, 0.12), transparent);
  height: 1px;
  width: 40%;
  opacity: 0.8;
}

.page-bg-line-2 {
  bottom: 28%;
  right: 0;
  width: 35%;
  background: linear-gradient(90deg, transparent, rgba(200, 170, 120, 0.08), transparent);
  transform: rotate(1.5deg);
}

/* Subtle noise texture */
.page-bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================================
   SCROLL PROGRESS BAR
   ============================================================================
   Animated progress bar at top showing scroll position
   ============================================================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, 
    rgba(200, 170, 120, 0.8) 0%, 
    rgba(200, 170, 120, 1) 50%,
    rgba(200, 170, 120, 0.8) 100%);
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(200, 170, 120, 0.5);
}

/* Content above background */
.hero,
main,
footer {
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================================
   HERO SECTION
   ============================================================================
   Main landing area with logo, welcome text, and animated background effects
   ============================================================================ */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6rem) 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  overflow: hidden;
}

/* Hero Background: Container for animated particles and glow effects */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  contain: layout paint;
}

/* Floating Particles: Animated circular elements that float in the background */
/* Animation is handled by JavaScript for parallax compatibility */
.hero-particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(200, 170, 120, 0.1);
  filter: blur(1px);
  will-change: transform; /* Optimizes animation performance */
}

.hero-particle-1 {
  width: 120px;
  height: 120px;
  top: 15%;
  left: 10%;
  background: radial-gradient(circle, rgba(200, 170, 120, 0.15), transparent);
}

.hero-particle-2 {
  width: 80px;
  height: 80px;
  top: 60%;
  right: 15%;
  background: radial-gradient(circle, rgba(200, 170, 120, 0.12), transparent);
}

.hero-particle-3 {
  width: 60px;
  height: 60px;
  bottom: 20%;
  left: 20%;
  background: radial-gradient(circle, rgba(200, 170, 120, 0.1), transparent);
}

.hero-particle-4 {
  width: 100px;
  height: 100px;
  top: 30%;
  right: 25%;
  background: radial-gradient(circle, rgba(200, 170, 120, 0.08), transparent);
}

/* Glowing Orbs: Large pulsing light effects for ambient atmosphere */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  animation: pulse-glow 8s infinite ease-in-out;
}

.hero-glow-1 {
  width: 300px;
  height: 300px;
  background: rgba(200, 170, 120, 0.08);
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.hero-glow-2 {
  width: 250px;
  height: 250px;
  background: rgba(200, 170, 120, 0.06);
  bottom: 15%;
  right: 8%;
  animation-delay: -4s;
}

/* Animation: Pulsing glow effect for ambient lighting */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.2);
  }
}

/* Hero Inner Container: Centers and contains logo and welcome content */
.hero-inner {
  position: relative;
  width: 100%;
  max-width: 560px;
  text-align: center;
  z-index: 1;
}


/* Logo Wrapper: Container for logo and its glow effect */
.hero-logo-wrapper {
  position: relative;
  display: inline-block;
}

/* Logo Glow: Animated radial gradient behind the logo */
.hero-logo-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center, rgba(200, 170, 120, 0.2), transparent 70%);
  filter: blur(30px);
  opacity: 0;
  animation: logo-glow-pulse 3s ease-in-out infinite;
  z-index: -1;
}

/* Animation: Logo glow pulsing effect */
@keyframes logo-glow-pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.95);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

/* Hero Logo: Main ASAS Holding logo with entrance animation */
/* Starts invisible and animates in when .hero-visible class is added */
.hero-logo {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
  opacity: 0;
  transform: scale(0.85) translateY(20px);
  filter: drop-shadow(0 0 30px rgba(200, 170, 120, 0));
  transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 1s ease-out 0.3s;
}

/* Logo visible state: Applied via JavaScript when page loads */
.hero.hero-visible .hero-logo {
  opacity: 1;
  transform: scale(1) translateY(0);
  filter: drop-shadow(0 0 40px rgba(200, 170, 120, 0.3)) drop-shadow(0 0 80px rgba(200, 170, 120, 0.15));
}

/* Hero Welcome Heading: Gradient text with entrance animation */
.hero-welcome-heading {
  margin-top: 2rem;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, rgba(200, 170, 120, 1) 50%, rgba(200, 170, 120, 0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(200, 170, 120, 0.3)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s ease-out 0.7s, transform 0.8s ease-out 0.7s;
  line-height: 1.3;
}

.hero.hero-visible .hero-welcome-heading {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Welcome Text: Descriptive paragraph below the heading */
.hero-welcome-text {
  margin-top: 1rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s ease-out 0.8s, transform 0.8s ease-out 0.8s;
}

.hero.hero-visible .hero-welcome-text {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================================
   HERO SCROLL BUTTON
   ============================================================================
   Button that smoothly scrolls to the branches section
   ============================================================================ */
.hero-scroll-btn {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: rgba(200, 170, 120, 0.1);
  border: 1px solid rgba(200, 170, 120, 0.3);
  border-radius: 50px;
  color: rgba(200, 170, 120, 0.9);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.8s ease-out 0.6s, transform 0.8s ease-out 0.6s,
    background 0.3s ease, border-color 0.3s ease, color 0.3s ease,
    box-shadow 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 2;
}

.hero.hero-visible .hero-scroll-btn {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hero-scroll-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200, 170, 120, 0.2), rgba(200, 170, 120, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.hero-scroll-btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50px;
  background: linear-gradient(135deg, rgba(200, 170, 120, 0.4), rgba(200, 170, 120, 0.2));
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.3s ease;
  z-index: -2;
}

.hero-scroll-btn:hover {
  background: rgba(200, 170, 120, 0.15);
  border-color: rgba(200, 170, 120, 0.5);
  color: rgba(200, 170, 120, 1);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 170, 120, 0.2),
    0 0 0 1px rgba(200, 170, 120, 0.1);
}

.hero-scroll-btn:hover::before {
  opacity: 1;
}

.hero-scroll-btn:hover::after {
  opacity: 0.6;
}

.hero-scroll-btn:active {
  transform: translateX(-50%) translateY(0);
}

.hero-scroll-btn-text {
  position: relative;
  z-index: 1;
}

.hero-scroll-btn-icon {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
  animation: bounce-down 2s ease-in-out infinite;
}

.hero-scroll-btn:hover .hero-scroll-btn-icon {
  transform: translateY(4px);
  animation: none;
}

.hero-scroll-btn:active {
  transform: translateX(-50%) translateY(0) scale(0.95);
}

.hero-scroll-btn:active .hero-scroll-btn-icon {
  transform: translateY(2px);
}

/* Keyboard focus outlines for key interactive elements */
.hero-scroll-btn:focus-visible,
.branch-card-link:focus-visible {
  outline: 2px solid rgba(200, 170, 120, 0.9);
  outline-offset: 3px;
}

@keyframes bounce-down {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* ============================================================================
   WELCOME SECTION
   ============================================================================
   Transitional section between hero and branches (currently minimal content)
   ============================================================================ */
.welcome {
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  overflow: hidden;
}

.welcome.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Welcome background elements */
.welcome-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  contain: layout paint;
}

.welcome-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 170, 120, 0.12), transparent);
  filter: blur(2px);
  animation: welcome-float 15s infinite ease-in-out;
  will-change: transform;
}

.welcome-particle-1 {
  width: 80px;
  height: 80px;
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.welcome-particle-2 {
  width: 60px;
  height: 60px;
  bottom: 15%;
  right: 8%;
  animation-delay: -7s;
}

@keyframes welcome-float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(25px, -30px) scale(1.1);
    opacity: 0.8;
  }
}

.welcome-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(200, 170, 120, 0.06), transparent);
  filter: blur(40px);
  animation: welcome-glow-pulse 6s infinite ease-in-out;
}

@keyframes welcome-glow-pulse {
  0%, 100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(0.9);
  }
  50% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.1);
  }
}


.welcome-heading {
  position: relative;
  z-index: 1;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, rgba(200, 170, 120, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(200, 170, 120, 0.2));
  transition: filter 0.3s ease;
}

.welcome.visible .welcome-heading {
  animation: heading-glow 2s ease-out 0.5s both;
}

@keyframes heading-glow {
  0% {
    filter: drop-shadow(0 0 20px rgba(200, 170, 120, 0));
  }
  100% {
    filter: drop-shadow(0 0 20px rgba(200, 170, 120, 0.2));
  }
}

.welcome-text {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.welcome.visible .welcome-text {
  animation: text-fade-in 1s ease-out 0.8s both;
}

@keyframes text-fade-in {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Branch grid ===== */
.branches {
  position: relative;
  padding: 2rem 1.5rem 6rem;
  overflow: visible;
}

.branches::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 170, 120, 0.25), transparent);
  z-index: 1;
}

/* Branches background elements */
.branches-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  contain: layout paint;
}

.branches-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 170, 120, 0.1), transparent);
  filter: blur(2px);
  animation: branches-float 18s infinite ease-in-out;
  will-change: transform;
}

.branches-particle-1 {
  width: 100px;
  height: 100px;
  top: 5%;
  right: 10%;
  animation-delay: 0s;
}

.branches-particle-2 {
  width: 70px;
  height: 70px;
  bottom: 10%;
  left: 5%;
  animation-delay: -9s;
}

@keyframes branches-float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }
  33% {
    transform: translate(-20px, 25px) scale(1.05);
    opacity: 0.6;
  }
  66% {
    transform: translate(30px, -20px) scale(0.95);
    opacity: 0.5;
  }
}

.branches-glow {
  position: absolute;
  top: 30%;
  right: 15%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(200, 170, 120, 0.05), transparent);
  filter: blur(50px);
  animation: branches-glow-pulse 7s infinite ease-in-out;
}

@keyframes branches-glow-pulse {
  0%, 100% {
    opacity: 0.2;
    transform: scale(0.85);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.15);
  }
}

/* Branches Grid: 2-column responsive grid for branch cards */
.branches-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 1rem;
  position: relative;
  z-index: 1;
}

/* Subtle geometric pattern background for branches section */
.branches-grid::before {
  content: '';
  position: absolute;
  inset: -2rem;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(200, 170, 120, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(200, 170, 120, 0.015) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ============================================================================
   BRANCH CARD STYLING
   ============================================================================
   Individual company card with hover effects, social icons, and animations
   ============================================================================ */
.branch-card {
  /* Overlap of .branch-card-desc over the image (e.g. 24px = desc sits 24px over image) */
  --branch-card-desc-overlap: 48px;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 0;
  margin-top: 1rem;
  background: linear-gradient(145deg, rgba(32, 32, 32, 0.95) 0%, rgba(18, 18, 18, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  min-height: 280px;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: opacity 0.5s ease-out,
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.35s ease,
    border-color 0.3s ease,
    filter 0.3s ease;
  overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

/* Branch-specific gradient overlays */
.branch-card[data-branch="soft"] {
  background: linear-gradient(145deg, 
    rgba(32, 32, 32, 0.95) 0%, 
    rgba(18, 18, 32, 0.98) 50%,
    rgba(18, 18, 18, 0.98) 100%);
}

.branch-card[data-branch="soft"] .branch-card-inner-glow {
  background: radial-gradient(circle at center, 
    rgba(74, 158, 255, 0.08) 0%, 
    rgba(74, 158, 255, 0.03) 40%,
    transparent 70%);
}

.branch-card[data-branch="arch"] {
  background: linear-gradient(145deg, 
    rgba(24, 24, 24, 0.98) 0%, 
    rgba(14, 14, 14, 0.98) 50%,
    rgba(8, 8, 8, 0.98) 100%);
}

.branch-card[data-branch="arch"] .branch-card-inner-glow {
  background: radial-gradient(circle at center, 
    rgba(255, 255, 255, 0.06) 0%, 
    rgba(255, 255, 255, 0.02) 40%,
    transparent 70%);
}

.branch-card[data-branch="woods"] {
  background: linear-gradient(145deg, 
    rgba(40, 30, 24, 0.98) 0%, 
    rgba(55, 38, 28, 0.98) 50%,
    rgba(28, 20, 14, 0.98) 100%);
}

.branch-card[data-branch="woods"] .branch-card-inner-glow {
  background: radial-gradient(circle at center, 
    rgba(139, 90, 43, 0.12) 0%, 
    rgba(139, 90, 43, 0.04) 40%,
    transparent 70%);
}

.branch-card[data-branch="stones"] {
  background: linear-gradient(145deg, 
    rgba(52, 48, 44, 0.98) 0%, 
    rgba(72, 66, 58, 0.98) 50%,
    rgba(44, 40, 36, 0.98) 100%);
}

.branch-card[data-branch="stones"] .branch-card-inner-glow {
  background: radial-gradient(circle at center, 
    rgba(200, 190, 174, 0.1) 0%, 
    rgba(200, 190, 174, 0.03) 40%,
    transparent 70%);
}

/* Card Internal Glow: Subtle radial gradient that appears on hover */
.branch-card-inner-glow {
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  bottom: 1px;
  border-radius: 19px;
  background: radial-gradient(circle at center, rgba(200, 170, 120, 0.05), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.branch-card:hover .branch-card-inner-glow {
  opacity: 1;
  animation: card-glow-sweep 2s ease-in-out infinite;
}

/* Ripple effect on card click */
.branch-card-link::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
  width: 0;
  height: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  z-index: 1;
  transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
}

.branch-card-link:active::before {
  width: 400px;
  height: 400px;
  opacity: 1;
  transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
}

@keyframes card-glow-sweep {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(5%, 5%) scale(1.05);
  }
}

/* Corner accent glow */
/* Corner Glow: Decorative accent in top-right corner on hover */
.branch-card .corner-glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at top right, rgba(200, 170, 120, 0.12), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

/* Branch-specific corner glows */
.branch-card[data-branch="soft"] .corner-glow {
  background: radial-gradient(circle at top right, rgba(74, 158, 255, 0.2), transparent 70%);
}

.branch-card[data-branch="arch"] .corner-glow {
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.15), transparent 70%);
}

.branch-card[data-branch="woods"] .corner-glow {
  background: radial-gradient(circle at top right, rgba(139, 90, 43, 0.25), transparent 70%);
}

.branch-card[data-branch="stones"] .corner-glow {
  background: radial-gradient(circle at top right, rgba(200, 190, 174, 0.2), transparent 70%);
}

.branch-card:hover .corner-glow {
  opacity: 1;
  animation: corner-pulse 2s ease-in-out infinite;
}

@keyframes corner-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Shine sweep on hover */
/* Shine Sweep Effect: Animated gradient that sweeps across card on hover */
.branch-card::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 19px;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 60%,
    transparent 100%
  );
  opacity: 0;
  transform: translateX(-100%);
  transition: opacity 0.5s ease, transform 0.6s ease;
  pointer-events: none;
  z-index: 1;
}

.branch-card:hover::before {
  opacity: 1;
  transform: translateX(100%);
}

/* Animated gradient border effect using ::after */
.branch-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  background: linear-gradient(135deg, 
    rgba(200, 170, 120, 0.2) 0%,
    transparent 30%,
    transparent 70%,
    rgba(200, 170, 120, 0.2) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: -1;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  padding: 1px;
}

.branch-card:hover::after {
  opacity: 1;
  animation: border-rotate 4s linear infinite;
}

@keyframes border-rotate {
  0% {
    background: linear-gradient(135deg, 
      rgba(200, 170, 120, 0.3) 0%,
      transparent 30%,
      transparent 70%,
      rgba(200, 170, 120, 0.3) 100%);
  }
  25% {
    background: linear-gradient(225deg, 
      rgba(200, 170, 120, 0.3) 0%,
      transparent 30%,
      transparent 70%,
      rgba(200, 170, 120, 0.3) 100%);
  }
  50% {
    background: linear-gradient(315deg, 
      rgba(200, 170, 120, 0.3) 0%,
      transparent 30%,
      transparent 70%,
      rgba(200, 170, 120, 0.3) 100%);
  }
  75% {
    background: linear-gradient(45deg, 
      rgba(200, 170, 120, 0.3) 0%,
      transparent 30%,
      transparent 70%,
      rgba(200, 170, 120, 0.3) 100%);
  }
  100% {
    background: linear-gradient(135deg, 
      rgba(200, 170, 120, 0.3) 0%,
      transparent 30%,
      transparent 70%,
      rgba(200, 170, 120, 0.3) 100%);
  }
}

.branch-card.entrance-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.branch-card:hover {
  transform: translateY(-8px) scale(1.02) rotate(0.5deg);
  box-shadow: 
    0 20px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 40px rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(200, 170, 120, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Branch-specific border colors on hover */
.branch-card[data-branch="soft"]:hover {
  border-color: rgba(74, 158, 255, 0.3);
  box-shadow: 
    0 20px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 40px rgba(74, 158, 255, 0.15),
    0 0 0 1px rgba(74, 158, 255, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.branch-card[data-branch="arch"]:hover {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 
    0 20px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 40px rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.branch-card[data-branch="woods"]:hover {
  border-color: rgba(139, 90, 43, 0.4);
  box-shadow: 
    0 20px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 40px rgba(139, 90, 43, 0.2),
    0 0 0 1px rgba(139, 90, 43, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.branch-card[data-branch="stones"]:hover {
  border-color: rgba(200, 190, 174, 0.35);
  box-shadow: 
    0 20px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 40px rgba(200, 190, 174, 0.15),
    0 0 0 1px rgba(200, 190, 174, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.branch-card:active {
  transform: translateY(-4px) scale(1.01) rotate(0.3deg);
  transition-duration: 0.1s;
}

.branch-card:focus {
  outline: none;
}

.branch-card:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.branch-card-image-wrap {
  position: relative;
  z-index: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 240px;
}

/* Skeleton loader for images during load */
.branch-card-image-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  opacity: 0;
  z-index: -1;
  pointer-events: none;
}

.branch-card-image[src=""] ~ .branch-card-image-wrap::before,
.branch-card-image:not([src]) ~ .branch-card-image-wrap::before {
  opacity: 1;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.branch-card-image {
  max-height: 240px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  filter: brightness(1) drop-shadow(0 0 20px rgba(255, 255, 255, 0));
  transition: filter 0.35s ease, transform 0.35s ease, opacity 0.6s ease-out;
  opacity: 0;
  animation: image-fade-in 0.6s ease-out forwards;
}

@keyframes image-fade-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.branch-card:hover .branch-card-image {
  filter: brightness(1.08) drop-shadow(0 0 24px rgba(255, 255, 255, 0.15)) drop-shadow(0 0 40px rgba(200, 170, 120, 0.2));
  transform: scale(1.03);
}

/* Overlap: pull desc over the image; control via --branch-card-desc-overlap on .branch-card */
.branch-card-desc {
  position: relative;
  z-index: 2;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  margin-top: calc(-1 * var(--branch-card-desc-overlap));
  transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.branch-card:hover .branch-card-desc {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 0 12px rgba(200, 170, 120, 0.2), 0 1px 2px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

/* ============================================================================
   SOCIAL MEDIA WIDGET
   ============================================================================
   Vertical strip of social icons on the left side of each card
   Shown on click (not hover) – same behavior for desktop and mobile
   ============================================================================ */
.branch-card-social {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

/* Social icons visible only when card has been clicked (class added by JS) */
.branch-card.social-visible .branch-card-social {
  opacity: 1;
  transform: translateX(0);
  border-right-color: rgba(255, 255, 255, 0.12);
  pointer-events: auto;
}

  /* Card content area: click shows social (no navigation); styled like a button */
.branch-card-link {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  padding-bottom: calc(2rem + var(--branch-card-desc-overlap));
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  z-index: 2;
  touch-action: manipulation;
}

/* Mobile: override card/link layout so content flows normally */
@media (max-width: 767px) {
  .branch-card-link {
    position: relative;
    inset: auto;
    padding: 1.5rem 1.25rem 1rem; /* Reduced top/bottom to fit all content */
    padding-bottom: calc(1rem + var(--branch-card-desc-overlap));
    align-items: center;
    justify-content: flex-start; /* Start from top to fit everything */
  }
}

.branch-social-icon {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  transition: color 0.25s ease, background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  pointer-events: auto;
  cursor: pointer;
}

.branch-social-icon:hover {
  color: rgba(200, 170, 120, 0.9);
  background: rgba(200, 170, 120, 0.12);
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 0 12px rgba(200, 170, 120, 0.3);
  animation: icon-pulse 0.6s ease-out;
}

@keyframes icon-pulse {
  0%, 100% {
    transform: scale(1.15) rotate(5deg);
  }
  50% {
    transform: scale(1.25) rotate(5deg);
  }
}

/* Branch-specific social icon hover colors */
.branch-card[data-branch="soft"] .branch-social-icon:hover {
  color: rgba(74, 158, 255, 0.9);
  background: rgba(74, 158, 255, 0.15);
  box-shadow: 0 0 12px rgba(74, 158, 255, 0.3);
}

.branch-card[data-branch="arch"] .branch-social-icon:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.branch-card[data-branch="woods"] .branch-social-icon:hover {
  color: rgba(220, 180, 120, 0.95);
  background: rgba(139, 90, 43, 0.25);
  box-shadow: 0 0 12px rgba(139, 90, 43, 0.4);
}

.branch-card[data-branch="stones"] .branch-social-icon:hover {
  color: rgba(230, 220, 200, 0.95);
  background: rgba(200, 190, 174, 0.2);
  box-shadow: 0 0 12px rgba(200, 190, 174, 0.35);
}

.branch-social-icon:focus {
  outline: none;
}

.branch-social-icon:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.branch-social-icon svg {
  flex-shrink: 0;
}

/* ============================================================================
   FOOTER ENHANCEMENTS
   ============================================================================
   Enhanced footer with visual effects and animations
   ============================================================================ */
.footer {
  position: relative;
  padding: 4rem 1.5rem 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 3rem;
  overflow: hidden;
  background: linear-gradient(180deg, transparent 0%, rgba(200, 170, 120, 0.02) 100%);
}

/* Animated top border line */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(200, 170, 120, 0.4) 20%,
    rgba(200, 170, 120, 0.6) 50%,
    rgba(200, 170, 120, 0.4) 80%,
    transparent 100%);
  animation: footer-line-expand 1.5s ease-out 0.5s forwards;
}

@keyframes footer-line-expand {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 200px;
    opacity: 1;
  }
}

/* Footer background particles */
.footer::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 30% 50%, rgba(200, 170, 120, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 70% 50%, rgba(200, 170, 120, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.footer-content {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.footer-copyright {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.03em;
  transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease;
  position: relative;
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  white-space: nowrap;
}

.footer-copyright:hover {
  color: rgba(200, 170, 120, 0.9);
  text-shadow: 
    0 0 12px rgba(200, 170, 120, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.footer-copyright::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 1px;
  background: rgba(200, 170, 120, 0.4);
  margin-right: 8px;
  vertical-align: middle;
  transition: width 0.3s ease, background 0.3s ease;
}

.footer-copyright:hover::before {
  width: 20px;
  background: rgba(200, 170, 120, 0.6);
}

.footer-copyright::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 1px;
  background: rgba(200, 170, 120, 0.4);
  margin-left: 8px;
  vertical-align: middle;
  transition: width 0.3s ease, background 0.3s ease;
}

.footer-copyright:hover::after {
  width: 20px;
  background: rgba(200, 170, 120, 0.6);
}

/* ============================================================================
   RESPONSIVE STYLES
   ============================================================================
   Mobile-first responsive design for phones and tablets
   ============================================================================ */
@media (max-width: 767px) {
  /* Prevent horizontal scroll on mobile */
  body {
    overflow-x: hidden;
  }

  /* Hero section mobile optimizations */
  .hero {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    padding: calc(2rem + env(safe-area-inset-top)) 1rem calc(6rem + env(safe-area-inset-bottom));
  }

  .hero-inner {
    max-width: 100%;
    padding: 0;
  }

  .hero-logo {
    max-width: 240px;
  }

  .hero-welcome-heading {
    font-size: clamp(1.125rem, 5vw, 1.375rem);
    margin-top: 1.5rem;
    padding: 0 1rem;
  }

  .hero-welcome-text {
    font-size: 0.875rem;
    line-height: 1.65;
    margin-top: 0.875rem;
    padding: 0 1rem;
    max-width: 100%;
  }

  .hero-scroll-btn {
    bottom: 1.5rem;
    padding: 0.75rem 1.75rem;
    font-size: 0.875rem;
    min-width: 140px;
  }

  .hero-scroll-btn-icon {
    width: 18px;
    height: 18px;
  }

  /* Welcome section mobile */
  .welcome {
    padding: 2rem 1rem;
  }

  .welcome-heading {
    font-size: clamp(1.125rem, 4vw, 1.375rem);
  }

  /* Branches section mobile */
  .branches {
    padding: 1.5rem 1rem calc(4rem + env(safe-area-inset-bottom));
  }

  .branches-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 100%;
    padding-top: 0.5rem;
  }

  .branch-card {
    --branch-card-desc-overlap: 28px; /* Less overlap on mobile */
    min-height: 280px;
    margin-top: 0;
    padding: 0;
    border-radius: 16px;
    flex-direction: column-reverse; /* Content (link) on top, social icons at bottom – DOM order is social then link */
  }

  /* Social icons mobile - below description; still hidden until card is clicked */
  .branch-card-social {
    flex-direction: row; /* Horizontal layout on mobile */
    padding: 0.75rem 0 0;
    gap: 0.75rem;
    border: none; /* No border, integrated with content */
    width: 100%;
    justify-content: center;
    margin-top: 0.75rem; /* Spacing from description */
    transform: none;
    /* opacity/pointer-events controlled by .social-visible below */
  }

  .branch-card.social-visible .branch-card-social {
    opacity: 1;
    pointer-events: auto;
  }

  /* Description visible on mobile - above icons */
  .branch-card-desc {
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-bottom: 0;
    text-align: center;
    padding: 0 0.5rem; /* Small horizontal padding for text wrapping */
  }

  .branch-card-image-wrap {
    min-height: 180px; /* Increased to accommodate larger logos */

  }

  .branch-card-image {
    max-height: 180px; /* Increased for better visibility */
  }

  .branch-social-icon {
    width: 36px;
    height: 36px;
    padding: 8px;
  }

  .branch-social-icon svg {
    width: 18px;
    height: 18px;
  }

  /* Mobile only: stronger, flashy static look for social icons (rest state) */
  .branch-social-icon {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.14);
    box-shadow:
      0 0 16px rgba(200, 170, 120, 0.25),
      0 2px 8px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
    animation: mobile-icon-glow 2.5s ease-in-out infinite;
  }

  @keyframes mobile-icon-glow {
    0%, 100% {
      box-shadow:
        0 0 16px rgba(200, 170, 120, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    50% {
      box-shadow:
        0 0 24px rgba(200, 170, 120, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
  }

  .branch-card[data-branch="soft"] .branch-social-icon {
    box-shadow:
      0 0 18px rgba(74, 158, 255, 0.35),
      0 2px 8px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(74, 158, 255, 0.35);
    background: rgba(74, 158, 255, 0.12);
    animation: mobile-icon-glow-soft 2.5s ease-in-out infinite;
  }

  @keyframes mobile-icon-glow-soft {
    0%, 100% {
      box-shadow:
        0 0 18px rgba(74, 158, 255, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    50% {
      box-shadow:
        0 0 28px rgba(74, 158, 255, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
  }

  .branch-card[data-branch="arch"] .branch-social-icon {
    box-shadow:
      0 0 18px rgba(255, 255, 255, 0.25),
      0 2px 8px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
    animation: mobile-icon-glow-arch 2.5s ease-in-out infinite;
  }

  @keyframes mobile-icon-glow-arch {
    0%, 100% {
      box-shadow:
        0 0 18px rgba(255, 255, 255, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    50% {
      box-shadow:
        0 0 28px rgba(255, 255, 255, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
  }

  .branch-card[data-branch="woods"] .branch-social-icon {
    box-shadow:
      0 0 18px rgba(139, 90, 43, 0.4),
      0 2px 8px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(139, 90, 43, 0.45);
    background: rgba(139, 90, 43, 0.18);
    animation: mobile-icon-glow-woods 2.5s ease-in-out infinite;
  }

  @keyframes mobile-icon-glow-woods {
    0%, 100% {
      box-shadow:
        0 0 18px rgba(139, 90, 43, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    50% {
      box-shadow:
        0 0 28px rgba(139, 90, 43, 0.55),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
  }

  .branch-card[data-branch="stones"] .branch-social-icon {
    box-shadow:
      0 0 18px rgba(200, 190, 174, 0.35),
      0 2px 8px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(200, 190, 174, 0.4);
    background: rgba(200, 190, 174, 0.15);
    animation: mobile-icon-glow-stones 2.5s ease-in-out infinite;
  }

  @keyframes mobile-icon-glow-stones {
    0%, 100% {
      box-shadow:
        0 0 18px rgba(200, 190, 174, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    50% {
      box-shadow:
        0 0 28px rgba(200, 190, 174, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
  }

  /* Footer mobile */
  .footer {
    padding: 2rem 1rem calc(2rem + env(safe-area-inset-bottom));
  }

  .footer-copyright {
    font-size: 0.8125rem;
  }

  /* Better touch targets: remove 300ms delay and ensure taps register */
  .branch-card-link,
  .branch-social-icon,
  .hero-scroll-btn {
    -webkit-tap-highlight-color: rgba(200, 170, 120, 0.2);
    tap-highlight-color: rgba(200, 170, 120, 0.2);
    touch-action: manipulation;
  }

  .branch-card {
    touch-action: manipulation;
  }

  /* Smooth scrolling on mobile */
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  /* ========== Phone-only: flashy tap effects (desktop unchanged) ========== */
  /* Card "flash" when user taps the main card area */
  .branch-card:has(.branch-card-link:active) {
    transform: translateY(-8px) scale(1.03) rotate(0.5deg);
    box-shadow:
      0 24px 56px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(255, 255, 255, 0.2),
      0 0 48px rgba(255, 255, 255, 0.15),
      0 0 0 1px rgba(200, 170, 120, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      inset 0 -1px 0 rgba(0, 0, 0, 0.4);
    transition-duration: 0.08s;
  }

  .branch-card:has(.branch-card-link:active) .branch-card-inner-glow {
    opacity: 1;
  }

  .branch-card:has(.branch-card-link:active) .corner-glow {
    opacity: 1;
  }

  /* Stronger ripple on card tap (phone) */
  .branch-card-link:active::before {
    width: 480px;
    height: 480px;
    opacity: 0.35;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 65%);
  }

  /* Social icons: big "pop" on tap (phone) – no hover on touch, so :active is the feedback */
  .branch-social-icon:active {
    transform: scale(1.35);
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.4);
    transition-duration: 0.08s;
  }

  .branch-card[data-branch="soft"] .branch-social-icon:active {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(74, 158, 255, 0.35);
    box-shadow: 0 0 24px rgba(74, 158, 255, 0.6);
  }

  .branch-card[data-branch="arch"] .branch-social-icon:active {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.5);
  }

  .branch-card[data-branch="woods"] .branch-social-icon:active {
    background: rgba(139, 90, 43, 0.45);
    box-shadow: 0 0 24px rgba(139, 90, 43, 0.6);
  }

  .branch-card[data-branch="stones"] .branch-social-icon:active {
    background: rgba(200, 190, 174, 0.4);
    box-shadow: 0 0 24px rgba(200, 190, 174, 0.5);
  }

  /* Slight card glow when tapping a social icon */
  .branch-card:has(.branch-social-icon:active) .branch-card-inner-glow {
    opacity: 0.9;
  }

  .branch-card:has(.branch-social-icon:active) .corner-glow {
    opacity: 0.9;
  }

  /* Fallback when tapping card background (e.g. padding) */
  .branch-card:active {
    transform: translateY(-6px) scale(1.02);
    transition-duration: 0.08s;
  }

  /* Improve button press feedback */
  .hero-scroll-btn:active {
    transform: translateX(-50%) translateY(0) scale(0.98);
  }
}

/* Extra small devices - Layout only (all effects kept for QR / mobile) */
@media (max-width: 480px) {
  .hero {
    padding: calc(1.5rem + env(safe-area-inset-top)) 0.75rem calc(5rem + env(safe-area-inset-bottom));
  }

  .hero-logo {
    max-width: 200px;
  }

  .hero-welcome-heading {
    font-size: 1rem;
    margin-top: 1.25rem;
  }

  .hero-welcome-text {
    font-size: 0.8125rem;
    margin-top: 0.75rem;
  }

  .hero-scroll-btn {
    bottom: 1.25rem;
    padding: 0.625rem 1.5rem;
    font-size: 0.8125rem;
    min-width: 120px;
  }

  .branch-card {
    min-height: 260px;
    padding: 1.5rem 1rem;
  }

  .branch-card-image {
    max-height: 180px;
  }

  .branches {
    padding: 1rem 0.75rem 3rem;
  }

  .branches-grid {
    gap: 1.25rem;
  }
}

/* Landscape mobile optimization */
@media (max-width: 767px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 1.5rem 1rem 4rem;
  }

  .hero-logo {
    max-width: 180px;
  }

  .hero-welcome-heading {
    margin-top: 1rem;
  }

  .hero-welcome-text {
    margin-top: 0.5rem;
  }

  .hero-scroll-btn {
    bottom: 1rem;
  }
}

/* ============================================================================
   RTL LAYOUT (Arabic page: html[dir="rtl"])
   ============================================================================
   Mirror layout and directional effects for right-to-left reading
   ============================================================================ */
html[dir="rtl"] body {
  font-family: 'Noto Sans Arabic', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* RTL mobile: center entire page content so nothing is pushed to the right */
@media (max-width: 767px) {
  html[dir="rtl"] main {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    overflow-x: hidden;
  }

  html[dir="rtl"] .hero {
    width: 100%;
    box-sizing: border-box;
  }

  html[dir="rtl"] .hero-inner {
    margin-inline: auto;
    width: 100%;
    max-width: 100%;
  }

  html[dir="rtl"] .welcome {
    width: 100%;
    box-sizing: border-box;
  }

  html[dir="rtl"] .branches {
    width: 100%;
    box-sizing: border-box;
    padding-inline: 1rem;
  }

  html[dir="rtl"] .branches-grid {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    padding-inline: 0;
    box-sizing: border-box;
  }

  html[dir="rtl"] .branch-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  html[dir="rtl"] .footer {
    width: 100%;
    box-sizing: border-box;
  }
}

/* Card: social strip on the right; content on the left (mirror of English) */
html[dir="rtl"] .branch-card {
  flex-direction: row-reverse;
}

/* RTL card content: use LTR for layout so card looks like English (image, title, desc centered) */
html[dir="rtl"] .branch-card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  direction: ltr; /* Layout like English; Arabic text still flows RTL via inherit on children */
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Arabic text inside card keeps RTL for proper reading */
html[dir="rtl"] .branch-card-desc {
  direction: rtl;
  unicode-bidi: embed;
}

html[dir="rtl"] .branch-card-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: visible;
}

html[dir="rtl"] .branch-card-desc {
  display: block;
  visibility: visible;
  text-align: center;
  width: 100%;
}

/* Social strip: border and slide from right; ensure visible and not clipped */
html[dir="rtl"] .branch-card-social {
  border-right: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateX(12px);
  z-index: 3;
}

/* RTL: social visible on click (same as LTR) */
html[dir="rtl"] .branch-card.social-visible .branch-card-social {
  transform: translateX(0);
  border-right-color: transparent;
  border-left-color: rgba(255, 255, 255, 0.12);
}

/* Mobile RTL: same layout as LTR mobile – content on top, social at bottom; centered */
@media (max-width: 767px) {
  html[dir="rtl"] .branch-card {
    flex-direction: column-reverse;
  }

  html[dir="rtl"] .branch-card-link {
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    direction: ltr;
    width: 100%;
  }

  html[dir="rtl"] .branch-card-image-wrap {
    justify-content: center;
    margin-inline: auto;
    max-width: 100%;
  }

  html[dir="rtl"] .branch-card-desc {
    text-align: center;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    padding: 0 0.5rem;
  }

  html[dir="rtl"] .branch-card-social {
    flex-direction: row;
    border: none;
    transform: none;
  }

  html[dir="rtl"] .branch-card.social-visible .branch-card-social {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Corner glow: top-left in RTL, gradient from top-left corner */
html[dir="rtl"] .branch-card .corner-glow {
  right: auto;
  left: 0;
  background: radial-gradient(circle at top left, rgba(200, 170, 120, 0.12), transparent 70%);
}

html[dir="rtl"] .branch-card[data-branch="soft"] .corner-glow {
  background: radial-gradient(circle at top left, rgba(74, 158, 255, 0.2), transparent 70%);
}

html[dir="rtl"] .branch-card[data-branch="arch"] .corner-glow {
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.15), transparent 70%);
}

html[dir="rtl"] .branch-card[data-branch="woods"] .corner-glow {
  background: radial-gradient(circle at top left, rgba(139, 90, 43, 0.25), transparent 70%);
}

html[dir="rtl"] .branch-card[data-branch="stones"] .corner-glow {
  background: radial-gradient(circle at top left, rgba(200, 190, 174, 0.2), transparent 70%);
}

/* Shine sweep: right to left */
html[dir="rtl"] .branch-card::before {
  transform: translateX(100%);
}

html[dir="rtl"] .branch-card:hover::before {
  transform: translateX(-100%);
}

/* Footer copyright decorative lines: swap margins */
html[dir="rtl"] .footer-copyright::before {
  margin-right: 0;
  margin-left: 8px;
}

html[dir="rtl"] .footer-copyright::after {
  margin-left: 0;
  margin-right: 8px;
}

/* Scroll progress bar: grow from right */
html[dir="rtl"] .scroll-progress {
  left: auto;
  right: 0;
}

/* Page background lines: mirror position */
html[dir="rtl"] .page-bg-line-2 {
  right: auto;
  left: 0;
  background: linear-gradient(270deg, transparent, rgba(200, 170, 120, 0.08), transparent);
}

/* Hero particles: mirror left/right positions */
html[dir="rtl"] .hero-particle-1 {
  left: auto;
  right: 10%;
}

html[dir="rtl"] .hero-particle-2 {
  right: auto;
  left: 15%;
}

html[dir="rtl"] .hero-particle-3 {
  left: auto;
  right: 20%;
}

html[dir="rtl"] .hero-particle-4 {
  right: auto;
  left: 25%;
}

/* Welcome section particles */
html[dir="rtl"] .welcome-particle-1 {
  left: auto;
  right: 5%;
}

html[dir="rtl"] .welcome-particle-2 {
  right: auto;
  left: 8%;
}

/* Branches section particles */
html[dir="rtl"] .branches-particle-1 {
  right: auto;
  left: 10%;
}

html[dir="rtl"] .branches-particle-2 {
  left: auto;
  right: 5%;
}

@media (max-width: 768px) {
  .whatsapp {
      display: inline;
      position: fixed;
      left: 15px;
      bottom: 15px;
      z-index: 99;
  }
}

@media (min-width: 768px) {
  .whatsapp {
      display: inline;
      position: fixed;
      left: 30px;
      bottom: 30px;
      z-index: 99;
  }
}
