/* ===== Design System ===== */
:root {
  /* Brand — Clinical Sky Blue */
  --brand-50:  #F4FAFD;
  --brand-100: #E5F4FA;
  --brand-200: #C5E7F5;
  --brand-300: #8DCFEA;
  --brand-400: #5BB5DC;
  --brand-500: #2E96C9;
  --brand-600: #1B7AAF;
  --brand-700: #156289;
  --brand-800: #0F4F74;
  --brand-900: #0A3D5C;

  /* Neutrals — Cool Slate */
  --neutral-50:  #F7FAFC;
  --neutral-100: #EEF4F8;
  --neutral-200: #D8E6EE;
  --neutral-300: #B8CDDB;
  --neutral-400: #8FA3B3;
  --neutral-500: #6B8294;
  --neutral-600: #4D6275;
  --neutral-700: #354A5C;
  --neutral-800: #1E3344;
  --neutral-900: #122636;

  /* Accent — Soft Teal (highlights only) */
  --accent: #3DB8BF;
  --accent-soft: #E6F7F8;

  /* Semantic Tokens */
  --primary:       var(--brand-600);
  --primary-dark:  var(--brand-700);
  --primary-light: var(--brand-500);
  --accent-light:  var(--brand-200);
  --blue:          var(--brand-900);
  --blue-light:    var(--brand-400);
  --white:         #FFFFFF;
  --off-white:     var(--brand-50);
  --gray-100:      var(--neutral-100);
  --gray-200:      var(--neutral-200);
  --gray-400:      var(--neutral-400);
  --gray-600:      var(--neutral-600);
  --gray-800:      var(--neutral-800);

  --shadow-sm: 0 2px 10px rgba(21, 98, 137, 0.07);
  --shadow-md: 0 8px 28px rgba(21, 98, 137, 0.11);
  --shadow-lg: 0 20px 50px rgba(10, 61, 92, 0.14);
  --shadow-brand: 0 4px 16px rgba(27, 122, 175, 0.22);

  --radius: 12px;
  --radius-lg: 20px;
  --header-h: 76px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-ar: 'Tajawal', sans-serif;
  --font-en: 'Poppins', sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ar);
  background: var(--off-white);
  color: var(--gray-800);
  line-height: 1.7;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}

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

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
  padding-inline: env(safe-area-inset-left, 0) env(safe-area-inset-right, 0);
}

.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  background: var(--brand-100);
  color: var(--brand-700);
  border: 1px solid var(--brand-200);
  padding: 0.35rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--brand-800);
  font-weight: 800;
  margin-bottom: 0.75rem;
  position: relative;
}

.section-header.visible .section-title::after {
  width: 56px;
}

.section-title::after {
  content: '';
  display: block;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-300));
  margin: 0.85rem auto 0;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.section-subtitle {
  color: var(--neutral-600);
  font-size: 1.05rem;
  max-width: 600px;
  margin-inline: auto;
  line-height: 1.8;
}

/* ===== Preloader ===== */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.preloader-logo {
  width: 72px;
  height: 72px;
  animation: preloaderPulse 1.5s ease-in-out infinite;
}

.preloader-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-700);
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.3s forwards;
}

@keyframes preloaderPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

.loader {
  width: 36px;
  height: 36px;
  border: 3px solid var(--brand-100);
  border-top-color: var(--brand-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: transform 0.4s ease, background var(--transition), box-shadow var(--transition), border-color var(--transition);
  padding-top: env(safe-area-inset-top, 0);
}

body.loaded .animate-header {
  animation: slideDown 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.header.scrolled {
  border-bottom-color: var(--brand-200);
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.97);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex-shrink: 1;
}

.logo img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.logo-name {
  font-weight: 800;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  color: var(--brand-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-title {
  font-size: 0.72rem;
  color: var(--neutral-500);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--neutral-700);
  position: relative;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-500);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand-600);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-btn {
  padding: 0.4rem 0.9rem;
  border: 1.5px solid var(--brand-300);
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--brand-700);
  transition: var(--transition);
}

.lang-btn:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: var(--white);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  min-height: 44px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-600);
  color: var(--white);
  box-shadow: var(--shadow-brand);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

.btn-primary:hover {
  background: var(--brand-700);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(21, 98, 137, 0.3);
}

.btn-outline {
  border: 2px solid rgba(255, 255, 255, 0.75);
  color: var(--white);
  background: transparent;
}

.btn-outline:hover {
  background: var(--white);
  color: var(--brand-700);
  border-color: var(--white);
}

.btn-accent {
  background: var(--white);
  color: var(--brand-700);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.btn-accent:hover {
  background: var(--brand-50);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1001;
}

/* Mobile nav overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 61, 92, 0.45);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--brand-700);
  border-radius: 3px;
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: var(--header-h);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(155deg,
      rgba(10, 61, 92, 0.95) 0%,
      rgba(15, 79, 116, 0.90) 40%,
      rgba(27, 122, 175, 0.85) 100%),
    url('../assets/images/hero-dentist.png') center/cover no-repeat;
  z-index: -2;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Hero floating shapes */
.hero-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.shape-1 {
  width: 320px;
  height: 320px;
  top: 10%;
  right: 5%;
  animation: floatShape 8s ease-in-out infinite;
}

.shape-2 {
  width: 180px;
  height: 180px;
  bottom: 15%;
  left: 8%;
  animation: floatShape 6s ease-in-out infinite reverse;
}

.shape-3 {
  width: 100px;
  height: 100px;
  top: 40%;
  left: 45%;
  animation: floatShape 5s ease-in-out infinite 1s;
}

@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(15px, -20px) scale(1.05); }
  66% { transform: translate(-10px, 15px) scale(0.95); }
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: fadeInUp 0.8s ease 1.2s forwards;
  z-index: 2;
}

.scroll-mouse {
  width: 26px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  position: relative;
}

.scroll-mouse::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  animation: scrollWheel 1.8s ease-in-out infinite;
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(14px); }
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding-block: 4rem;
}

.hero-content { color: var(--white); }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.95);
  animation: fadeInUp 0.8s ease;
}

.hero-badge .pulse {
  width: 8px;
  height: 8px;
  background: #5EEAD4;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(94, 234, 212, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease 0.1s both;
}

.hero h1 span {
  color: var(--brand-200);
  font-weight: 800;
}

.hero-desc {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 2rem;
  max-width: 520px;
  line-height: 1.85;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-image {
  position: relative;
  animation: fadeInRight 1s ease 0.3s both;
  will-change: transform;
}

.hero-image img {
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(10, 61, 92, 0.35);
  border: 3px solid rgba(255, 255, 255, 0.25);
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  animation: heroFloat 5s ease-in-out 1.4s infinite;
}

.hero-image::before {
  content: '';
  position: absolute;
  inset: -10px;
  border: 2px solid rgba(141, 207, 234, 0.35);
  border-radius: calc(var(--radius-lg) + 8px);
  z-index: -1;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

body[dir="ltr"] .hero-image { animation-name: fadeInLeft; }

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== About ===== */
.about {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.about-content h3 {
  font-size: 1.8rem;
  color: var(--brand-800);
  margin-bottom: 1rem;
  font-weight: 800;
}

.about-content p {
  color: var(--neutral-600);
  margin-bottom: 1.25rem;
  line-height: 1.85;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius);
  transition: var(--transition);
}

.feature-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: var(--brand-200);
}

.feature-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--brand-600);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.2rem;
}

.feature-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--neutral-800);
  margin-bottom: 0.15rem;
}

.feature-text p {
  font-size: 0.82rem;
  color: var(--neutral-500);
  margin: 0;
}

/* ===== Services ===== */
.services {
  background: var(--neutral-50);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-200);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-500);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-200);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.25rem;
  background: var(--brand-100);
  border: 1px solid var(--brand-200);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-card.visible .service-icon {
  animation: iconPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes iconPop {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.service-card:hover .service-icon {
  transform: scale(1.08) rotate(-3deg);
}

.service-card h3 {
  font-size: 1.15rem;
  color: var(--brand-800);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--neutral-600);
  line-height: 1.65;
}

/* ===== Gallery ===== */
.gallery {
  background: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 61, 92, 0.82), transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover .overlay {
  opacity: 1;
}

.gallery-item .overlay span {
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
}

.gallery-item.featured {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 2rem;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox.active img {
  animation: lightboxZoom 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes lightboxZoom {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

body[dir="rtl"] .lightbox-close {
  right: auto;
  left: 1.5rem;
}

.lightbox-close:hover {
  background: var(--brand-600);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-nav:hover { background: var(--brand-600); }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

body[dir="rtl"] .lightbox-prev { left: auto; right: 1.5rem; }
body[dir="rtl"] .lightbox-next { right: auto; left: 1.5rem; }

/* ===== Contact ===== */
.contact {
  background: linear-gradient(160deg, var(--brand-800) 0%, var(--brand-700) 50%, var(--brand-600) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(141, 207, 234, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  top: -150px;
  right: -150px;
}

.contact::after {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(61, 184, 191, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -100px;
  left: -80px;
}

.contact .section-tag {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.25);
}

.contact .section-title { color: var(--white); }
.contact .section-subtitle { color: rgba(255, 255, 255, 0.8); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.5rem;
  border-radius: var(--radius);
  transition: var(--transition);
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateX(-5px);
}

body[dir="ltr"] .contact-card:hover {
  transform: translateX(5px);
}

.contact-card-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  background: var(--brand-500);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--white);
}

.contact-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.contact-card p,
.contact-card a {
  font-size: 0.95rem;
  opacity: 0.9;
}

.contact-card a:hover {
  color: var(--brand-200);
}

.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  color: var(--neutral-800);
  box-shadow: 0 20px 50px rgba(10, 61, 92, 0.2);
  position: relative;
  z-index: 1;
}

.contact-form h3 {
  font-size: 1.4rem;
  color: var(--brand-800);
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--neutral-600);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--neutral-50);
  color: var(--neutral-800);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--brand-400);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(46, 150, 201, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-success {
  display: none;
  background: var(--accent-soft);
  color: #1A6B6F;
  padding: 1rem;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
  margin-top: 1rem;
  border: 1px solid rgba(61, 184, 191, 0.25);
}

.form-success.show {
  display: block;
  animation: slideInSuccess 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes slideInSuccess {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Footer ===== */
.footer {
  background: linear-gradient(180deg, var(--brand-900) 0%, #071E2E 100%);
  color: rgba(255, 255, 255, 0.75);
  padding: 3rem 0 calc(1.5rem + env(safe-area-inset-bottom, 0));
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer .logo-name { color: var(--white); }
.footer .logo-title { color: rgba(255, 255, 255, 0.6); }

.footer-desc {
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 360px;
}

.footer h4 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--brand-300); }

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.social-links a {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--brand-600);
  border-color: var(--brand-500);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

/* ===== WhatsApp Float ===== */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 999;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.8rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: var(--transition);
  animation: bounce 2s infinite;
}

body[dir="ltr"] .whatsapp-float {
  left: auto;
  right: 2rem;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ===== Scroll Reveal & Animations ===== */
.reveal {
  opacity: 0;
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0s);
}

.reveal.visible {
  opacity: 1;
  transform: translate(0, 0) scale(1) !important;
}

.reveal:not(.reveal-left):not(.reveal-right):not(.reveal-scale) {
  transform: translateY(40px);
}

.reveal-left {
  transform: translateX(-50px);
}

.reveal-right {
  transform: translateX(50px);
}

.reveal-scale {
  transform: scale(0.88);
}

body[dir="ltr"] .reveal-left  { transform: translateX(50px); }
body[dir="ltr"] .reveal-right { transform: translateX(-50px); }

.stagger-group .reveal:nth-child(1) { --delay: 0s; }
.stagger-group .reveal:nth-child(2) { --delay: 0.1s; }
.stagger-group .reveal:nth-child(3) { --delay: 0.2s; }
.stagger-group .reveal:nth-child(4) { --delay: 0.3s; }
.stagger-group .reveal:nth-child(5) { --delay: 0.4s; }
.stagger-group .reveal:nth-child(6) { --delay: 0.5s; }

/* Nested stagger (contact cards inside stagger-group) */
.stagger-group .contact-card.reveal:nth-child(1) { --delay: 0.05s; }
.stagger-group .contact-card.reveal:nth-child(2) { --delay: 0.15s; }
.stagger-group .contact-card.reveal:nth-child(3) { --delay: 0.25s; }
.stagger-group .contact-card.reveal:nth-child(4) { --delay: 0.35s; }

.feature-item.reveal:nth-child(1) { --delay: 0.05s; }
.feature-item.reveal:nth-child(2) { --delay: 0.15s; }
.feature-item.reveal:nth-child(3) { --delay: 0.25s; }
.feature-item.reveal:nth-child(4) { --delay: 0.35s; }

/* Nav mobile stagger */
.nav.open .nav-links li {
  animation: navSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
}

.nav.open .nav-links li:nth-child(1) { animation-delay: 0.05s; }
.nav.open .nav-links li:nth-child(2) { animation-delay: 0.1s; }
.nav.open .nav-links li:nth-child(3) { animation-delay: 0.15s; }
.nav.open .nav-links li:nth-child(4) { animation-delay: 0.2s; }
.nav.open .nav-links li:nth-child(5) { animation-delay: 0.25s; }

@keyframes navSlideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

  .reveal {
    opacity: 1;
    transform: none !important;
  }

  .hero-image img { animation: none; }
  .hero-shapes { display: none; }
  .scroll-indicator { display: none; }
}

/* ===== Responsive ===== */

/* Large screens */
@media (min-width: 1400px) {
  .container { width: min(1200px, 88%); }
  .hero .container { gap: 4rem; }
}

/* Laptops */
@media (max-width: 1200px) {
  .nav { gap: 1.25rem; }
  .nav-links { gap: 1.1rem; }
  .nav-links a { font-size: 0.88rem; }
  .hero .container { gap: 2rem; padding-block: 3rem; }
  .about-grid { gap: 3rem; }
  .contact-grid { gap: 2rem; }
  .contact-form { padding: 2rem; }
}

/* Tablets — hamburger menu */
@media (max-width: 992px) {
  :root { --header-h: 70px; }

  .menu-toggle { display: flex; }

  .nav {
    position: fixed;
    top: var(--header-h);
    inset-inline-end: 0;
    width: min(340px, 88vw);
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    background: var(--white);
    flex-direction: column;
    justify-content: flex-start;
    padding: 1.5rem 1.5rem 2rem;
    gap: 1.25rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    opacity: 1;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.35s ease;
    overflow-y: auto;
    z-index: 999;
    -webkit-overflow-scrolling: touch;
  }

  body[dir="ltr"] .nav {
    inset-inline-end: auto;
    inset-inline-start: 0;
    transform: translateX(-100%);
  }

  .nav.open {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 0.9rem 1rem;
    font-size: 1.05rem;
    text-align: center;
    border-radius: var(--radius);
    min-height: 44px;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: var(--brand-50);
  }

  .nav-links a::after { display: none; }

  .header-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .header-actions .btn-primary {
    width: 100%;
    display: inline-flex;
  }

  .lang-btn {
    width: 100%;
    padding: 0.75rem;
    min-height: 44px;
  }

  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    padding-block: 2.5rem;
  }

  .hero-desc { margin-inline: auto; max-width: 100%; }
  .hero-buttons { justify-content: center; }
  .hero-image {
    order: -1;
    max-width: min(420px, 100%);
    margin-inline: auto;
  }

  .hero-image img { max-height: 380px; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-image img { aspect-ratio: 16/10; max-height: 400px; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-item.featured { grid-column: span 2; grid-row: span 1; }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root { --header-h: 64px; }

  .section { padding: 3.5rem 0; }
  .section-header { margin-bottom: 2.5rem; }
  .section-subtitle { font-size: 0.95rem; padding-inline: 0.5rem; }

  .logo img { width: 42px; height: 42px; }

  .hero h1 { font-size: clamp(1.75rem, 7vw, 2.5rem); }
  .hero-desc { font-size: 1rem; }
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
  }
  .hero-buttons .btn { width: 100%; }

  .hero-image::before { display: none; }
  .scroll-indicator { display: none; }
  .hero-shapes .shape-1 { width: 200px; height: 200px; }

  .about-content h3 { font-size: 1.45rem; }
  .about-features { grid-template-columns: 1fr; }

  .services-grid { grid-template-columns: 1fr; }
  .service-card { padding: 1.5rem 1.25rem; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .gallery-item.featured { grid-column: span 2; }

  .contact-form { padding: 1.75rem 1.25rem; }
  .contact-card { padding: 1.15rem; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 0.5rem; }

  .lightbox { padding: 1rem; }
  .lightbox-close { top: 1rem; right: 1rem; width: 44px; height: 44px; }
  body[dir="rtl"] .lightbox-close { right: auto; left: 1rem; }
  .lightbox-nav { width: 44px; height: 44px; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  body[dir="rtl"] .lightbox-prev { left: auto; right: 0.5rem; }
  body[dir="rtl"] .lightbox-next { right: auto; left: 0.5rem; }

  .whatsapp-float {
    width: 54px;
    height: 54px;
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0));
    left: calc(1.25rem + env(safe-area-inset-left, 0));
    font-size: 1.6rem;
  }

  body[dir="ltr"] .whatsapp-float {
    left: auto;
    right: calc(1.25rem + env(safe-area-inset-right, 0));
  }
}

/* Small phones */
@media (max-width: 576px) {
  .container { width: 94%; }

  .logo-title { display: none; }

  .hero .container { padding-block: 2rem; }
  .hero-badge { font-size: 0.8rem; padding: 0.4rem 1rem; }
  .hero-image img { max-height: 280px; border-width: 2px; }

  .section { padding: 3rem 0; }
  .section-tag { font-size: 0.78rem; }

  .feature-item { padding: 0.85rem; }
  .feature-icon { width: 40px; height: 40px; min-width: 40px; font-size: 1rem; }

  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item.featured { grid-column: span 1; }

  .contact-card {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .contact-card:hover { transform: none; }

  .btn { padding: 0.75rem 1.25rem; font-size: 0.9rem; }
  .preloader-text { font-size: 0.85rem; text-align: center; max-width: 90vw; }
}

/* Very small screens */
@media (max-width: 380px) {
  .logo-name { font-size: 0.8rem; max-width: 140px; }
  .hero h1 { font-size: 1.6rem; }
  .hero-buttons { max-width: 100%; }
  .footer-desc { font-size: 0.85rem; }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-block: 1.5rem;
  }

  .hero .container {
    grid-template-columns: 1fr 1fr;
    text-align: start;
    gap: 1.5rem;
    padding-block: 1rem;
  }

  body[dir="ltr"] .hero .container { text-align: left; }

  .hero-image { order: 0; max-width: 280px; }
  .hero-image img { max-height: 220px; }
  .hero-buttons { flex-direction: row; flex-wrap: wrap; max-width: none; }
  .hero-buttons .btn { width: auto; }
  .scroll-indicator { display: none; }
}

/* Touch devices — disable hover lift on cards */
@media (hover: none) and (pointer: coarse) {
  .service-card:hover { transform: none; }
  .feature-item:hover { transform: none; }
  .gallery-item:hover img { transform: none; }
  .gallery-item .overlay { opacity: 1; }
}
