:root {
  --green-950: #08291f;
  --green-900: #0f3d2e;
  --green-700: #176b4a;
  --green-500: #2f8f62;
  --gold-500: #c99a3d;
  --orange-500: #e78325;
  --orange-600: #c96813;
  --ink: #12241f;
  --text: #203830;
  --muted: #60746c;
  --bg: #f5f7f3;
  --surface: #ffffff;
  --surface-soft: #edf4ef;
  --border: #dbe5df;
  --shadow-sm: 0 10px 24px rgba(15, 61, 46, .07);
  --shadow-md: 0 18px 44px rgba(15, 61, 46, .11);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --font-body: "Plus Jakarta Sans", "Noto Naskh Arabic", Arial, sans-serif;
  --font-heading: "Lora", "Noto Naskh Arabic", Georgia, serif;
  --font-arabic: "Amiri Quran", "Noto Naskh Arabic", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--orange-600); }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }

h1,
h2,
h3,
h4,
.section-title,
.brand-text strong {
  font-family: var(--font-heading);
  letter-spacing: 0;
}

.fa,
.fas,
.far,
.fab {
  display: inline-block;
  min-width: 1em;
  line-height: 1;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .96), rgba(250, 255, 248, .94)),
    rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(219, 229, 223, .78);
  backdrop-filter: blur(18px);
  transition: box-shadow .22s ease, border-color .22s ease, background-color .22s ease;
}

.site-header.scrolled {
  border-color: rgba(15, 61, 46, .1);
  box-shadow: 0 10px 28px rgba(15, 61, 46, .09);
}

.nav-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
  padding: 10px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--green-900);
  min-width: max-content;
  padding: 6px 8px 6px 6px;
  border-radius: var(--radius-md);
  transition: background-color .2s ease, transform .2s ease;
}

.brand:hover {
  color: var(--green-900);
  background: rgba(23, 107, 74, .06);
  transform: translateY(-1px);
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff, #f1f8f2);
  border: 1px solid rgba(15, 61, 46, .1);
  box-shadow: 0 12px 26px rgba(15, 61, 46, .1);
  padding: 5px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.brand-text strong {
  color: var(--green-950);
  font-size: 1.03rem;
}

.brand-text small {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 1;
}

.site-nav a,
.site-nav .nav-item > a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: .95rem;
  font-weight: 700;
  transition: background-color .2s ease, color .2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.site-nav .nav-item > a.active {
  color: var(--green-950);
  background: rgba(23, 107, 74, .09);
}

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

.site-nav .nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dropdown-toggle {
  display: none;
}

.dropdown-caret {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}

.has-dropdown.open > a .dropdown-caret {
  transform: translateY(2px) rotate(225deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 236px;
  display: grid;
  gap: 4px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  z-index: 120;
}

.nav-dropdown a {
  justify-content: flex-start;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  font-weight: 650;
}

.has-dropdown:hover .nav-dropdown,
.has-dropdown.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--green-700), var(--orange-500));
  box-shadow: 0 12px 24px rgba(201, 122, 38, .22);
}

.btn-primary:hover { color: #fff; box-shadow: 0 16px 30px rgba(201, 122, 38, .28); }

.btn-secondary {
  color: var(--green-950);
  background: #fff;
  border-color: rgba(255, 255, 255, .7);
}

.btn-secondary:hover { color: var(--green-950); background: #f8fbf8; }

.btn-outline {
  color: var(--green-900);
  background: transparent;
  border-color: rgba(23, 107, 74, .42);
}

.btn-outline:hover {
  color: var(--green-950);
  background: rgba(23, 107, 74, .08);
  border-color: rgba(23, 107, 74, .62);
}

.nav-cta {
  margin-left: 8px;
  min-height: 42px;
  padding: 10px 16px;
}

.site-main { min-height: 70vh; }

.section-title {
  margin: 0 auto 12px;
  max-width: 820px;
  color: var(--green-950);
  font-size: clamp(1.75rem, 2.8vw, 2.45rem);
  line-height: 1.14;
  text-align: center;
}

.section-title::after {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  margin: 16px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green-700), var(--gold-500), var(--orange-500));
}

.section-subtitle {
  max-width: 720px;
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: 1.02rem;
  text-align: center;
}

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.input, .textarea, .select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
}
.textarea { min-height: 140px; resize: vertical; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: 0;
  padding: 58px 0 24px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 0%, rgba(231, 131, 37, .22), transparent 26%),
    linear-gradient(135deg, #061f18 0%, #0f3d2e 58%, #174331 100%);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: .28;
  pointer-events: none;
}

.footer-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) minmax(170px, .7fr) minmax(170px, .7fr);
  gap: 34px;
}

.footer-brand h3,
.site-footer h4 {
  margin: 0 0 10px;
  color: #fff8ed;
}

.footer-brand h3 {
  font-size: 1.45rem;
}

.site-footer p,
.site-footer li,
.site-footer a {
  color: rgba(255, 255, 255, .8);
}

.site-footer a:hover { color: #ffd58e; }
.footer-contact-list,
.footer-links ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .12);
  transition: transform .18s ease, background-color .18s ease, color .18s ease;
}

.footer-social a:hover {
  color: #fff;
  background: rgba(231, 131, 37, .28);
  transform: translateY(-1px);
}

.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-top: 18px;
  margin-top: 34px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .68);
  font-size: .94rem;
}

.floating-whatsapp {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 240;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 16px 10px 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  color: #fff;
  font-size: .95rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #17b757, #087f43);
  box-shadow: 0 16px 36px rgba(8, 127, 67, .34), 0 0 0 7px rgba(23, 183, 87, .12);
  transform: translateZ(0);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.floating-whatsapp::before {
  content: "";
  position: absolute;
  inset: -45% auto -45% -70%;
  width: 58%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .46), transparent);
  transform: skewX(-18deg);
  animation: whatsapp-shine 3.2s ease-in-out infinite;
}

.floating-whatsapp::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(34, 197, 94, .42);
  border-radius: inherit;
  animation: whatsapp-pulse 2.4s ease-out infinite;
  pointer-events: none;
}

.floating-whatsapp:hover {
  color: #fff;
  filter: brightness(1.04);
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(8, 127, 67, .42), 0 0 0 8px rgba(23, 183, 87, .14);
}

.floating-whatsapp__icon,
.floating-whatsapp__text {
  position: relative;
  z-index: 1;
}

.floating-whatsapp__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
}

.floating-whatsapp__icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

@keyframes whatsapp-shine {
  0%, 44% { left: -70%; }
  70%, 100% { left: 125%; }
}

@keyframes whatsapp-pulse {
  0% { opacity: .7; transform: scale(.9); }
  100% { opacity: 0; transform: scale(1.18); }
}

@media (prefers-reduced-motion: reduce) {
  .floating-whatsapp::before,
  .floating-whatsapp::after {
    animation: none;
  }
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--green-950);
  transition: transform .22s ease, opacity .22s ease;
}

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

@media (max-width: 1020px) {
  .nav-wrap { gap: 14px; }
  .site-nav a,
  .site-nav .nav-item > a { padding-inline: 8px; font-size: .9rem; }
}

@media (max-width: 820px) {
  .container { width: min(100% - 24px, 1180px); }
  .nav-wrap { min-height: 68px; }
  .brand-logo { width: 44px; height: 44px; }
  .menu-toggle {
    display: block;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 130;
  }
  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: min(340px, 92vw);
    max-height: calc(100vh - 86px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .98);
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .22s ease, transform .22s ease;
  }
  .site-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .site-nav .nav-item,
  .site-nav a,
  .site-nav .nav-item > a {
    width: 100%;
    justify-content: flex-start;
  }
  .site-nav .nav-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-areas:
      "dropdown-link dropdown-toggle"
      "dropdown-panel dropdown-panel";
    align-items: stretch;
    gap: 6px;
    padding: 0;
    border-radius: var(--radius-sm);
  }
  .site-nav .nav-item > a {
    grid-area: dropdown-link;
    min-width: 0;
  }
  .site-nav .nav-item > a .dropdown-caret {
    display: none;
  }
  .dropdown-toggle {
    grid-area: dropdown-toggle;
    align-self: start;
    display: inline-grid;
    place-items: center;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid rgba(23, 107, 74, .16);
    border-radius: var(--radius-sm);
    color: var(--green-950);
    background: rgba(23, 107, 74, .07);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, transform .18s ease;
  }
  .dropdown-toggle:hover {
    background: rgba(23, 107, 74, .11);
    border-color: rgba(23, 107, 74, .26);
  }
  .dropdown-toggle .dropdown-caret {
    margin: 0;
  }
  .has-dropdown.open .dropdown-toggle .dropdown-caret {
    transform: translateY(2px) rotate(225deg);
  }
  .nav-dropdown {
    grid-area: dropdown-panel;
    position: static;
    display: grid;
    min-width: 0;
    width: 100%;
    max-height: 0;
    margin-top: 0;
    padding: 0 8px;
    overflow: hidden;
    gap: 3px;
    border: 0;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(237, 244, 239, .95), rgba(255, 255, 255, .98));
    box-shadow: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: max-height .26s ease, padding .26s ease, margin .26s ease, border-color .26s ease;
  }
  .has-dropdown.open .nav-dropdown {
    max-height: min(320px, 48vh);
    margin-top: 2px;
    padding: 8px;
    border: 1px solid rgba(23, 107, 74, .12);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav-dropdown a {
    min-height: 42px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--green-900);
    background: transparent;
  }
  .nav-dropdown a:hover,
  .nav-dropdown a:focus-visible {
    color: var(--green-950);
    background: rgba(255, 255, 255, .82);
  }
  .nav-cta { margin-left: 0; justify-content: center; }
  .footer-wrap { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .brand-text strong { font-size: .96rem; }
  .brand-text small { font-size: .66rem; }
  .section-subtitle { margin-bottom: 28px; }
  .btn { width: 100%; }
  .floating-whatsapp {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    min-height: 46px;
    padding: 8px;
    gap: 0;
    box-shadow: 0 12px 28px rgba(8, 127, 67, .34), 0 0 0 5px rgba(23, 183, 87, .12);
  }
  .floating-whatsapp__icon {
    width: 30px;
    height: 30px;
  }
  .floating-whatsapp__icon img {
    width: 22px;
    height: 22px;
  }
  .floating-whatsapp__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}
