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

:root {
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --bg-dark-section: #111111;
  --bg-page: #0a0a0a;
  --text: #111827;
  --text-muted: #9ca3af;
  --text-subtle: rgba(255, 255, 255, 0.4);
  --border: #f3f4f6;
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-input: #e5e7eb;
  --border-input-dark: rgba(255, 255, 255, 0.15);
  --btn-bg: #111827;
  --btn-text: #ffffff;
  --btn-hover: #374151;
  --primary: hsl(214.94, 97.7%, 34.12%);
  --navbar-height: 110px;
  --container-px: 1.5rem;
  --radius-full: 9999px;
  --transition: 0.3s ease;
  --font-sans: "Inter", sans-serif;
  --font-heading: "Aldrich", sans-serif;
}

.dark {
  --bg: #0a0a0a;
  --bg-alt: #111111;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.4);
  --border: rgba(255, 255, 255, 0.05);
  --border-input: rgba(255, 255, 255, 0.15);
  --btn-bg: #ffffff;
  --btn-text: #111827;
  --btn-hover: #f3f4f6;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

[dir="rtl"] {
  font-family: "Cairo", sans-serif;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6,
[dir="rtl"] .heading {
  font-family: "Cairo", sans-serif;
  letter-spacing: 0;
}

h1, h2, h3, h4, h5, h6, .heading {
  font-family: var(--font-heading);
  letter-spacing: -0.025em;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Utilities ── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.eyebrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.section-title {
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 3rem);
  line-height: 1.15;
  margin-bottom: 2rem;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.25rem;
  max-width: 32rem;
  line-height: 1.625;
}

.container {
  max-width: 64rem;
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.container-narrow {
  max-width: 42rem;
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

/* ── Buttons ── */
.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  transition: background var(--transition);
}

.btn-primary:hover:not(:disabled) {
  background: var(--btn-hover);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-ghost {
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.875rem 2rem;
  font-size: 0.875rem;
  transition: color var(--transition);
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-icon {
  font-size: 0.875rem;
  color: var(--text-muted);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-full);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), border-color var(--transition);
}

.btn-icon:hover {
  color: var(--text);
}

.btn-lang {
  font-size: 0.875rem;
  color: var(--text-muted);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.75rem;
  transition: color var(--transition);
}

.btn-lang:hover {
  color: var(--text);
}

.btn-nav-cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  background: #111827;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  transition: background var(--transition);
}

.dark .btn-nav-cta {
  color: #111827;
  background: #ffffff;
}

.btn-nav-cta:hover {
  background: #374151;
}

.dark .btn-nav-cta:hover {
  background: #f3f4f6;
}

/* ── Layout ── */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg);
  transition: all var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dark .navbar.scrolled {
  background: rgba(10, 10, 10, 0.95);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--container-px);
  height: var(--navbar-height);
}

.logo-btn {
  display: flex;
  align-items: center;
}

.logo-light { display: block; width: 11rem; }
.logo-dark { display: none; width: 11rem; }
.dark .logo-light { display: none; }
.dark .logo-dark { display: block; }

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

.nav-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-link:hover {
  color: var(--text);
}

.nav-mobile-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-mobile-controls .btn-icon {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.75rem;
}

.nav-mobile-controls .btn-lang {
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
}

.mobile-menu-btn {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.mobile-menu-btn:hover {
  color: var(--text);
}

.mobile-menu {
  display: none;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--container-px) 1.5rem;
  flex-direction: column;
  gap: 1rem;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu .nav-link {
  text-align: start;
  font-size: 1rem;
  padding: 0.25rem 0;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--container-px);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 56rem;
  padding-top: calc(var(--navbar-height) + 2rem);
  padding-bottom: 6rem;
}

.hero-eyebrow {
  margin-bottom: 2rem;
}

.hero-title {
  font-weight: 700;
  font-size: clamp(3.75rem, 10vw, 6rem);
  line-height: 1.05;
  margin-bottom: 2rem;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.25rem;
  max-width: 32rem;
  margin-bottom: 3rem;
  line-height: 1.625;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ── Stats Bar ── */
.stats-bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.stats-bar-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 3.5rem var(--container-px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.stat-value {
  font-weight: 700;
  font-size: 2.25rem;
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.stat-card {
  border: 1px solid var(--border-input);
  border-radius: 0.75rem;
  padding: 2rem;
}

.dark .stat-card {
  border-color: rgba(255, 255, 255, 0.1);
}

/* ── About ── */
.about {
  background: var(--bg);
  padding: 7rem var(--container-px);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 5rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  line-height: 1.625;
  margin-bottom: 1.25rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* ── Services ── */
.services {
  background: var(--bg-alt);
  padding: 7rem var(--container-px);
  border-bottom: 1px solid var(--border);
}

.services-inner {
  max-width: 64rem;
  margin: 0 auto;
}

.services-header {
  margin-bottom: 3.5rem;
}

.services-list {
  border-top: 1px solid var(--border-input);
}

.dark .services-list {
  border-color: rgba(255, 255, 255, 0.1);
}

.service-item {
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-input);
  cursor: default;
}

.dark .service-item {
  border-color: rgba(255, 255, 255, 0.1);
}

.service-title {
  font-weight: 600;
  font-size: 1.5rem;
  color: rgba(31, 41, 55, 1);
  transition: all var(--transition);
}

.dark .service-title {
  color: rgba(255, 255, 255, 0.9);
}

.service-item:hover .service-title {
  background: linear-gradient(135deg, var(--primary), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.service-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ── Contact ── */
.contact {
  background: var(--bg);
  padding: 7rem var(--container-px);
}

.contact-header {
  margin-bottom: 3rem;
}

.contact-header .section-sub {
  font-size: 1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-input);
  padding-bottom: 0.75rem;
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color var(--transition);
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #d1d5db;
}

.dark .form-input::placeholder,
.dark .form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #6b7280;
}

.dark .form-input:focus,
.dark .form-select:focus,
.dark .form-textarea:focus {
  border-color: rgba(255, 255, 255, 0.5);
}

.form-select {
  appearance: none;
  background-color: var(--bg);
  cursor: pointer;
}

.form-textarea {
  resize: none;
  min-height: 6rem;
}

.form-error {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* ── Footer ── */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3rem var(--container-px);
}

.footer-top {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
}

.footer-logo {
  width: 9rem;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links a,
.footer-links button {
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--text);
}

.footer-bottom {
  max-width: 64rem;
  margin: 2.5rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.footer-copyright {
  font-size: 0.75rem;
  color: #d1d5db;
}

.dark .footer-copyright {
  color: rgba(255, 255, 255, 0.2);
}

/* ── WhatsApp ── */
.whatsapp-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: #22c55e;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(34, 197, 94, 0.3);
  transition: background var(--transition), transform var(--transition);
  animation: whatsapp-enter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1s both;
}

.whatsapp-btn:hover {
  background: #16a34a;
  transform: scale(1.1);
}

.whatsapp-btn:active {
  transform: scale(0.95);
}

.whatsapp-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

[dir="rtl"] .toast-container {
  right: auto;
  left: 1.5rem;
}

.toast {
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  min-width: 280px;
  pointer-events: auto;
  animation: toast-in 0.3s ease;
}

.dark .toast {
  background: #1f2937;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
}

.toast.destructive {
  border-color: #fecaca;
  background: #fef2f2;
}

.dark .toast.destructive {
  background: #450a0a;
  border-color: #7f1d1d;
}

.toast-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.toast-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.toast.leaving {
  animation: toast-out 0.3s ease forwards;
}

/* ── Animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fade-in 0.45s ease forwards;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes whatsapp-enter {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ── Responsive ── */
@media (min-width: 768px) {
  :root {
    --container-px: 4rem;
  }

  .nav-desktop {
    display: flex;
  }

  .nav-mobile-controls {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .service-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .service-desc {
    max-width: 24rem;
    text-align: end;
  }

  [dir="rtl"] .service-desc {
    text-align: start;
  }

  .footer-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  :root {
    --container-px: 6rem;
  }

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

@media (max-width: 480px) {
  .stats-bar-inner,
  .about-stats {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
