/* =========================================================
   ELHAFIDI.NET — Stylesheet
   Palette extracted from the brand logo:
   Dark olive-black / Orange / Gold / Cream
   ========================================================= */

:root {
  --bg: #1c1b15;
  --surface: #24231b;
  --surface-2: #2f2e23;
  --surface-3: #3a3929;
  --border: #45442f;

  --orange: #e55725;
  --orange-2: #c6461b;
  --gold: #eaa133;
  --gold-2: #f0c169;
  --cream: #f2e7c8;
  --cream-dim: #c9bfa0;
  --white: #ffffff;

  --gradient-brand: linear-gradient(135deg, var(--gold) 0%, var(--orange) 100%);
  --gradient-glow: radial-gradient(60% 60% at 50% 40%, rgba(234,161,51,0.35) 0%, rgba(229,87,37,0.18) 45%, rgba(28,27,21,0) 75%);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --shadow-card: 0 10px 30px rgba(0,0,0,0.35);
  --shadow-btn: 0 8px 20px rgba(229,87,37,0.35);

  --font-ar: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  --font-latin: 'Poppins', 'Segoe UI', Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-ar);
  line-height: 1.7;
  overflow-x: hidden;
}
body.lang-en, body.lang-fr {
  font-family: var(--font-latin);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 820px; }

/* =============== TYPOGRAPHY =============== */
h1, h2, h3, h4 {
  color: var(--white);
  margin: 0 0 16px;
  font-weight: 800;
  line-height: 1.3;
}
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.2; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; margin-bottom: 10px; }
p { color: var(--cream-dim); margin: 0 0 16px; }

.eyebrow {
  display: inline-block;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 12px;
  padding: 6px 16px;
  border: 1px solid rgba(234,161,51,0.4);
  border-radius: var(--radius-full);
  background: rgba(234,161,51,0.08);
}

.section-head {
  max-width: 700px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head p { font-size: 1.05rem; }

/* =============== BUTTONS =============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.98rem;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-brand);
  color: #201f15;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(229,87,37,0.45); }
.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost {
  background: rgba(234,161,51,0.1);
  color: var(--gold);
  padding: 12px 24px;
  font-size: 0.9rem;
}
.btn-ghost:hover { background: rgba(234,161,51,0.2); }
.btn-small { padding: 10px 22px; font-size: 0.88rem; }
.btn-block { width: 100%; white-space: normal; text-align: center; }
.icon-wa { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* =============== HEADER =============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(28,27,21,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brand-logo { width: 42px; height: 42px; border-radius: 50%; }
.brand-name {
  font-family: var(--font-latin);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--white);
  letter-spacing: 0.02em;
}
.brand-dot { color: var(--gold); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.main-nav a {
  color: var(--cream-dim);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;
}
.main-nav a:hover { color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  border: none;
  background: transparent;
  color: var(--cream-dim);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-latin);
  transition: all 0.2s ease;
}
.lang-btn.active {
  background: var(--gradient-brand);
  color: #201f15;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}
.burger span {
  width: 24px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* =============== HERO =============== */
.hero {
  position: relative;
  padding: 90px 0 60px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 700px;
  background: var(--gradient-glow);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
}
.hero-text .badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: rgba(234,161,51,0.12);
  border: 1px solid rgba(234,161,51,0.35);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 22px;
  letter-spacing: 0.03em;
}
.hero-subtitle { font-size: 1.08rem; max-width: 560px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin: 28px 0 22px; }
.hero-trust {
  font-size: 0.9rem;
  color: var(--cream-dim);
  max-width: 500px;
  border-inline-start: 3px solid var(--gold);
  padding-inline-start: 14px;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-logo {
  width: min(360px, 80%);
  filter: drop-shadow(0 20px 50px rgba(229,87,37,0.35));
  animation: float 5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-14px); }
}

.hero-stats {
  position: relative;
  z-index: 1;
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-latin);
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { font-size: 0.85rem; color: var(--cream-dim); }

/* =============== SECTIONS =============== */
.section { padding: 90px 0; }
.section-alt { background: var(--surface); }

.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-6px); border-color: var(--gold); }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 26px; height: 26px; fill: #201f15; }

.why-card { position: relative; }
.why-num {
  font-family: var(--font-latin);
  font-size: 2rem;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--gold);
  margin-bottom: 10px;
  opacity: 0.7;
}

/* =============== SERVICES =============== */
.services-list { display: flex; flex-direction: column; gap: 70px; }
.service-row {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 50px;
  align-items: center;
}
.service-row.reverse { direction: ltr; }
.service-row.reverse .service-text,
.service-row.reverse .service-visual { direction: inherit; }
[dir="rtl"] .service-row.reverse { direction: ltr; }
[dir="rtl"] .service-row.reverse .service-text { direction: rtl; text-align: right; }

.service-tag {
  display: inline-block;
  color: var(--orange);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  margin-bottom: 12px;
  font-family: var(--font-latin);
}
.service-points { margin: 20px 0 24px; display: flex; flex-direction: column; gap: 12px; }
.service-points li {
  position: relative;
  padding-inline-start: 28px;
  color: var(--cream);
  font-size: 0.96rem;
}
.service-points li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 7px;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--gradient-brand);
}

.service-visual {
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.service-visual::before {
  content: attr(data-num);
  position: absolute;
  top: 16px;
  inset-inline-start: 20px;
  font-family: var(--font-latin);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--gold);
  opacity: 0.7;
  z-index: 3;
  padding: 5px 9px;
  border: 1px solid rgba(234,161,51,0.3);
  border-radius: var(--radius-full);
  background: rgba(28,27,21,0.78);
  backdrop-filter: blur(8px);
}
.service-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(28,27,21,0.2), transparent 48%);
  pointer-events: none;
}
.service-image {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.service-visual:hover .service-image { transform: scale(1.025); }
.service-visual svg {
  width: 34%;
  height: 34%;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.2;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 6px 20px rgba(234,161,51,0.4));
}
.service-visual svg path { fill: var(--gold); stroke: none; }

/* =============== PROCESS =============== */
.process-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  position: relative;
}
.process-step {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  position: relative;
}
.process-index {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #201f15;
  font-family: var(--font-latin);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 0.95rem;
}

/* =============== FAQ =============== */
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--white);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 700;
  text-align: start;
  font-family: inherit;
}
.faq-icon {
  flex: none;
  color: var(--gold);
  font-size: 1.3rem;
  font-weight: 400;
  transition: transform 0.25s ease;
  margin-inline-start: 16px;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-a p { padding: 0 26px 22px; margin: 0; }
.faq-item.open .faq-a { max-height: 300px; }

/* =============== CONTACT =============== */
.section-contact { background: var(--surface); }
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 40px;
  align-items: start;
  min-width: 0;
}
.contact-form {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  max-width: 100%;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; min-width: 0; }
label { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; color: var(--cream); font-weight: 600; min-width: 0; }
label.full { grid-column: 1 / -1; }
input, select, textarea {
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--cream);
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
textarea { resize: vertical; min-height: 100px; }
select {
  cursor: pointer;
  text-overflow: ellipsis;
}

.contact-info {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
}
.contact-logo { width: 90px; margin: 0 auto 20px; }
.contact-info ul { display: flex; flex-direction: column; gap: 22px; margin-top: 24px; }
.contact-info li { display: flex; flex-direction: column; gap: 4px; }
.contact-info strong { color: var(--gold); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.contact-info a { color: var(--white); font-weight: 700; font-size: 1.05rem; }
.contact-info a:hover { color: var(--gold); }

/* =============== FOOTER =============== */
.site-footer { background: var(--surface); border-top: 1px solid rgba(255,255,255,0.06); padding-top: 60px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.footer-logo { width: 46px; height: 46px; border-radius: 50%; }
.footer-brand p { font-size: 0.9rem; max-width: 320px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { color: var(--gold); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.footer-col a { color: var(--cream-dim); font-size: 0.92rem; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 20px 0;
  text-align: center;
  color: var(--cream-dim);
  font-size: 0.85rem;
}

/* =============== WHATSAPP FLOAT =============== */
.whatsapp-float {
  position: fixed;
  bottom: 26px;
  inset-inline-end: 26px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(229,87,37,0.45);
  z-index: 200;
  animation: pulse 2.4s ease-in-out infinite;
}
.whatsapp-float svg { width: 30px; height: 30px; fill: #201f15; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(229,87,37,0.45); }
  50% { box-shadow: 0 10px 40px rgba(234,161,51,0.65); }
}

/* =============== RESPONSIVE =============== */
@media (max-width: 980px) {
  .main-nav { display: none; }
  .burger { display: flex; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-text { order: 2; }
  .hero-visual { order: 1; }
  .hero-ctas, .hero-trust { margin-inline: auto; }
  .hero-ctas { justify-content: center; }
  .hero-trust { border-inline-start: none; border-top: 3px solid var(--gold); padding-top: 14px; padding-inline-start: 0; }
  .hero-stats { grid-template-columns: 1fr; gap: 30px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .process-list { grid-template-columns: repeat(2, 1fr); }
  .service-row, .service-row.reverse { grid-template-columns: 1fr; direction: inherit !important; text-align: inherit !important; }
  .service-visual { order: -1; width: 100%; max-width: 520px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; align-items: center; text-align: center; }
  .footer-brand p { margin-inline: auto; }
}

@media (max-width: 640px) {
  .header-inner { padding-top: 10px; padding-bottom: 10px; }
  .brand-name { font-size: 1rem; }
  .btn-small { display: none; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .process-list { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-col { align-items: center; }
  .whatsapp-float { width: 52px; height: 52px; bottom: 18px; inset-inline-end: 18px; }
  .hero { padding-top: 70px; }
  .section { padding: 60px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo,
  .whatsapp-float { animation: none; }
  .service-image { transition: none; }
}

/* Mobile nav open state */
.main-nav.open {
  display: flex;
  position: absolute;
  top: 100%;
  inset-inline: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: 24px;
  gap: 18px;
  z-index: 150;
}
.burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================== PRODUCT: MONEY TRACKING ===================== */
.product-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.product-price {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.product-price-amount {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.product-price-label { color: var(--cream-dim); }
