/* ===== Matdhia brand palette (from app app_colors.dart) ===== */
:root {
  --primary: #00337F;
  --primary-dark: #012758;
  --primary-mid: #002762;
  --primary-light: #1A56B0;
  --primary-soft: #E8EEF8;
  --accent: #3B7DD8;
  --gold: #D4A437;
  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --divider: #E5E9F2;
  --text-dark: #0E1E3A;
  --text-body: #334155;
  --text-grey: #7A869A;
  --radius: 18px;
  --shadow-soft: 0 4px 16px rgba(1, 39, 88, 0.06);
  --shadow-med: 0 8px 24px rgba(1, 39, 88, 0.10);
  --maxw: 1160px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Tajawal', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.85;
  overflow-x: hidden;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

h1, h2, h3, h4 { color: var(--text-dark); line-height: 1.3; font-weight: 800; }

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

/* ===== Header ===== */
.site-header {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-soft); border-bottom-color: var(--divider); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 38px; height: 38px; border-radius: 10px; }
.brand-name { font-weight: 800; font-size: 1.35rem; color: var(--primary); }
.nav { display: flex; gap: 28px; }
.nav a { font-weight: 500; color: var(--text-body); position: relative; transition: color 0.2s; }
.nav a:hover { color: var(--primary); }
.nav a::after {
  content: ''; position: absolute; bottom: -4px; inset-inline-start: 0;
  width: 0; height: 2px; background: var(--gold); transition: width 0.25s;
}
.nav a:hover::after { width: 100%; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--primary); border-radius: 2px; transition: 0.3s; }

/* ===== Buttons ===== */
.btn {
  display: inline-block; padding: 13px 30px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; cursor: pointer; transition: all 0.25s; border: none;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(0, 51, 127, 0.28); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--primary); border: 2px solid var(--primary-soft); }
.btn-ghost:hover { border-color: var(--primary); background: var(--primary-soft); }
.btn-gold { background: var(--gold); color: #3a2c00; box-shadow: 0 6px 18px rgba(212, 164, 55, 0.35); }
.btn-gold:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* ===== Hero ===== */
.hero { position: relative; padding: 150px 0 90px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 80% 20%, rgba(59, 125, 216, 0.12), transparent 45%),
    linear-gradient(135deg, #00337F 0%, #002762 55%, #012758 100%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 15% 85%, rgba(212, 164, 55, 0.10), transparent 40%);
}
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 40px; }
.hero-text { color: #fff; }
.hero-badge {
  display: inline-block; background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22); color: #dbe5f5;
  padding: 6px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 500; margin-bottom: 22px;
}
.hero-text h1 { color: #fff; font-size: 2.9rem; margin-bottom: 18px; }
.hero-text h1 .hl { color: var(--gold); }
.hero-text p { color: #cdd8ec; font-size: 1.15rem; max-width: 520px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-actions .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.hero-actions .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.hero-stats { display: flex; gap: 40px; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 1.9rem; color: #fff; font-weight: 800; }
.stat span { color: #a9b8d4; font-size: 0.9rem; }

.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; height: 340px; }
.logo-badge {
  width: 200px; height: 200px; border-radius: 50px;
  background: linear-gradient(145deg, #ffffff, #eef3fb);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35); position: relative; z-index: 2;
  animation: float 5s ease-in-out infinite;
}
.logo-badge img { width: 120px; height: 120px; }
.phone-glow {
  position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 125, 216, 0.35), transparent 65%);
  filter: blur(20px);
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

/* ===== Sections ===== */
.section { padding: 90px 0; }
.section-alt { background: var(--surface); }
.section-head { text-align: center; margin-bottom: 54px; }
.eyebrow {
  display: inline-block; color: var(--primary); background: var(--primary-soft);
  padding: 5px 16px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; margin-bottom: 14px;
}
.section-head h2 { font-size: 2.2rem; }

/* About */
.about-lead { font-size: 1.2rem; text-align: center; max-width: 760px; margin: 0 auto 44px; color: var(--text-body); }
.about-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.mini-card {
  background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius);
  padding: 30px 26px; text-align: center; box-shadow: var(--shadow-soft); transition: transform 0.25s;
}
.section .mini-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-med); }
.mini-ico { font-size: 1.8rem; color: var(--gold); margin-bottom: 12px; }
.mini-card h4 { font-size: 1.2rem; margin-bottom: 8px; }
.mini-card p { color: var(--text-grey); }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature {
  background: var(--bg); border: 1px solid var(--divider); border-radius: var(--radius);
  padding: 32px 28px; transition: all 0.25s;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-med); border-color: var(--primary-soft); }
.feature-ico {
  width: 58px; height: 58px; border-radius: 16px; background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 18px;
}
.feature h4 { font-size: 1.25rem; margin-bottom: 8px; }
.feature p { color: var(--text-grey); }

/* Categories */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.cat-card {
  border-radius: var(--radius); padding: 30px 24px; color: #fff;
  position: relative; overflow: hidden; min-height: 210px; transition: transform 0.25s;
}
.cat-card:hover { transform: translateY(-8px); }
.cat-ico { font-size: 2.2rem; margin-bottom: 16px; }
.cat-card h4 { color: #fff; font-size: 1.3rem; margin-bottom: 8px; }
.cat-card p { color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; }
.cat-blue { background: linear-gradient(145deg, #00337F, #012758); }
.cat-purple { background: linear-gradient(145deg, #5b3fd6, #3a2695); }
.cat-red { background: linear-gradient(145deg, #e0574a, #b8342a); }
.cat-gold { background: linear-gradient(145deg, #d4a437, #a97e1e); }

/* Steps */
.steps { display: flex; align-items: flex-start; justify-content: center; gap: 8px; flex-wrap: wrap; }
.step { flex: 1; min-width: 190px; max-width: 240px; text-align: center; }
.step-num {
  width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 18px;
  background: linear-gradient(145deg, #00337F, #002762); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 51, 127, 0.3);
}
.step h4 { font-size: 1.2rem; margin-bottom: 8px; }
.step p { color: var(--text-grey); font-size: 0.95rem; }
.step-line { flex: 0 0 40px; height: 2px; background: var(--divider); margin-top: 30px; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, #012758, #00337F); padding: 60px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-text h3 { color: #fff; font-size: 1.9rem; margin-bottom: 6px; }
.cta-text p { color: #cdd8ec; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.contact-card {
  background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius);
  padding: 34px 26px; text-align: center; box-shadow: var(--shadow-soft);
}
.contact-ico {
  width: 60px; height: 60px; border-radius: 16px; background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin: 0 auto 16px;
}
.contact-card h4 { margin-bottom: 8px; }
.contact-card a, .contact-card p { color: var(--primary); font-weight: 500; }
.contact-card p { color: var(--text-grey); font-weight: 400; }

/* Footer */
.site-footer { background: #071733; color: #cdd8ec; padding: 50px 0 26px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo { width: 46px; height: 46px; border-radius: 12px; }
.footer-brand strong { display: block; color: #fff; font-size: 1.15rem; }
.footer-brand span { font-size: 0.9rem; color: #9fb0cf; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: #cdd8ec; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { color: #6f83a8; font-size: 0.9rem; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 22px; width: 100%; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-text p { margin-inline: auto; }
  .hero-actions, .hero-stats { justify-content: center; }
  .hero-visual { height: 260px; margin-top: 20px; }
  .about-cards, .features-grid, .cat-grid, .contact-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; position: absolute; top: 72px; inset-inline: 0;
    background: #fff; padding: 18px 22px; gap: 16px; box-shadow: var(--shadow-med);
  }
  .nav-toggle { display: flex; }
  .step-line { display: none; }
}
@media (max-width: 560px) {
  .hero-text h1 { font-size: 2.1rem; }
  .section-head h2 { font-size: 1.7rem; }
  .about-cards, .features-grid, .cat-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .cta-inner { flex-direction: column; text-align: center; }
}
