/* ==========================================================================
   مختبر المتقدمة الطبي — Advanced Medical Lab
   Design tokens: white surfaces, medical blue + green accents.
   Arabic type: Tajawal — English type: Inter
   ========================================================================== */

:root {
  --blue: #0B5FA5;
  --blue-dark: #073B68;
  --green: #16A673;
  --green-dark: #0D7A54;
  --white: #FFFFFF;
  --bg-soft: #F3F9F8;
  --bg-soft-2: #EFF5FB;
  --text: #16262A;
  --text-muted: #56696D;
  --border: #E2EBE9;
  --shadow: 0 8px 24px rgba(11, 59, 104, 0.08);
  --radius: 10px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body.lang-ar {
  font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  direction: rtl;
  text-align: right;
}

body.lang-en {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  direction: ltr;
  text-align: left;
}

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

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

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

h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 14px; font-weight: 700; }
p { margin: 0 0 16px; color: var(--text-muted); }

.eyebrow-free-heading { font-size: clamp(28px, 4vw, 42px); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(90deg, var(--blue), var(--green));
  color: var(--white);
  box-shadow: 0 10px 20px rgba(11,95,165,.22);
}
.btn-outline {
  background: transparent;
  border-color: var(--blue);
  color: var(--blue);
}
.btn-outline:hover { background: var(--bg-soft-2); }

/* ---------- Header / Navbar ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 18px;
}
.brand-name {
  font-weight: 800;
  font-size: 17px;
  color: var(--blue-dark);
}
.brand-name span { color: var(--green-dark); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav-links a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--blue-dark);
}
.nav-links a:hover { background: var(--bg-soft); color: var(--green-dark); }
.nav-links a.active { color: var(--green-dark); background: var(--bg-soft); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--blue-dark);
  cursor: pointer;
}

.lang-switch {
  border: 1.5px solid var(--blue);
  color: var(--blue);
  border-radius: 999px;
  padding: 7px 16px;
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
}
.lang-switch:hover { background: var(--bg-soft-2); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 10px 24px 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .navbar { position: relative; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 56px;
  background:
    radial-gradient(1100px 420px at 15% -10%, rgba(11,95,165,.07), transparent 60%),
    radial-gradient(900px 380px at 100% 0%, rgba(22,166,115,.08), transparent 55%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-eyebrow-line {
  display: inline-block;
  width: 46px;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--green));
  border-radius: 4px;
  margin-bottom: 16px;
}
.hero h1 { font-size: clamp(30px, 4.4vw, 46px); color: var(--blue-dark); }
.hero h1 em { font-style: normal; color: var(--green-dark); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }

.video-frame {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  aspect-ratio: 16/9;
  background: var(--bg-soft);
}
.video-frame iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { color: var(--blue-dark); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.card-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--green));
  margin-bottom: 16px;
}
.card h3 { font-size: 18px; color: var(--blue-dark); margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: 14.5px; }

.section-footer-action { margin-top: 30px; text-align: center; }

/* ---------- Offers ---------- */
.offer-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--white);
  position: relative;
  overflow: hidden;
}
.offer-badge {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  background: var(--green);
  color: var(--white);
  font-size: 12.5px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
}
.offer-price { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 16px; }
.price-old { text-decoration: line-through; color: var(--text-muted); font-size: 15px; }
.price-new { color: var(--green-dark); font-weight: 800; font-size: 22px; }
.offer-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.offer-actions .btn { padding: 10px 18px; font-size: 13.5px; }

/* ---------- Testimonials ---------- */
.testimonial-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--white);
}
.testimonial-quote { font-size: 15px; color: var(--text); }
.testimonial-author { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.testimonial-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: var(--white); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.testimonial-name { font-weight: 700; color: var(--blue-dark); font-size: 14.5px; }

/* ---------- Team ---------- */
.team-card { text-align: center; }
.team-avatar {
  width: 74px; height: 74px; margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--bg-soft-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-dark); font-weight: 800; font-size: 20px;
  border: 2px solid var(--border);
}
.team-name { font-weight: 700; color: var(--blue-dark); margin-bottom: 2px; }
.team-role { font-size: 13.5px; color: var(--green-dark); font-weight: 600; margin-bottom: 0; }

/* ---------- Branches ---------- */
.branch-card { display: flex; flex-direction: column; gap: 10px; }
.branch-meta { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.branch-meta i { color: var(--green-dark); width: 18px; margin-top: 3px; }
.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/9;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--blue-dark); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text);
  background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 3px solid rgba(22,166,115,.25);
  border-color: var(--green);
}
.form-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg-soft);
  font-size: 13.5px;
  color: var(--text-muted);
}
.form-success {
  padding: 14px 16px;
  border-radius: 8px;
  background: #E7F7EF;
  border: 1px solid var(--green);
  color: var(--green-dark);
  font-weight: 700;
  margin-bottom: 18px;
}

.contact-info-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.contact-info-icon {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  background: var(--bg-soft-2); color: var(--blue);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.contact-info-item h4 { margin-bottom: 3px; font-size: 15px; color: var(--blue-dark); }
.contact-info-item p { margin-bottom: 0; font-size: 14px; }

.social-row { display: flex; gap: 10px; margin-top: 18px; }
.social-row a {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: background .15s ease, color .15s ease;
}
.social-row a:hover { background: var(--blue); color: var(--white); }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-weight: 700; color: var(--blue-dark); font-size: 15.5px;
}
.faq-q .plus { font-size: 20px; color: var(--green); transition: transform .2s ease; flex-shrink: 0; margin-inline-start: 16px; }
.faq-item.open .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; font-size: 14.5px; }
.faq-item.open .faq-a { max-height: 220px; margin-top: 10px; }

/* ---------- Referral ---------- */
.referral-hero {
  background: linear-gradient(120deg, var(--blue-dark), var(--blue) 55%, var(--green-dark));
  color: var(--white);
  border-radius: 18px;
  padding: 44px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: center;
}
.referral-hero h2, .referral-hero p { color: var(--white); }
.referral-hero p { opacity: .92; }
@media (max-width: 800px) { .referral-hero { grid-template-columns: 1fr; padding: 30px; } }
.referral-steps { display: flex; flex-direction: column; gap: 14px; }
.referral-step { display: flex; gap: 14px; align-items: flex-start; }
.referral-step .num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-soft-2); color: var(--blue-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; flex-shrink: 0; font-size: 14px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 50px 0 24px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  margin-bottom: 30px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: var(--blue-dark); font-size: 15px; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 14px; color: var(--text-muted); }
.footer-links a:hover { color: var(--green-dark); }
.footer-brand p { font-size: 14px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ---------- عداد الزوار العام ---------- */
.visitor-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(11, 95, 165, .08);
  border: 1px solid rgba(11, 95, 165, .18);
  color: var(--blue-dark);
  border-radius: 99px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 700;
}

/* ---------- Floating action buttons ---------- */
.fab-stack {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 60;
}
.fab {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 22px;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  transition: transform .15s ease;
}
.fab:hover { transform: translateY(-3px) scale(1.04); }
.fab-whatsapp { background: #25D366; }
.fab-pdf { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); font-size: 20px; }
.fab-top {
  background: var(--white);
  color: var(--blue);
  border: 1.5px solid var(--blue);
  display: none;
}
.fab-top.show { display: flex; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge-strip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-soft); color: var(--green-dark);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  margin-bottom: 14px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}


/* ---------- Google review button ---------- */
.google-review { margin-top: 34px; }
.btn-google i { margin-inline-end: 8px; }

/* ---------- Hidden admin link (invisible until hover/focus) ---------- */
.footer-bottom { position: relative; }
.admin-hidden-link {
  position: absolute; inset-inline-end: 6px; bottom: 6px;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  color: inherit; opacity: 0; font-size: 12px; transition: opacity .2s;
}
.admin-hidden-link:hover, .admin-hidden-link:focus { opacity: .5; }
