/* ============================================================
   موقع د. سلمان الثبيتي — كود خاص مستقل بالكامل
   إعادة بناء مطابقة لتصميم الموقع الأصلي (بدون أي اعتماديات)
   ============================================================ */

/* ---------- الخطوط ---------- */
@font-face {
  font-family: 'Thmanyah Serif';
  src: url('../fonts/thmanyah-light.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Serif';
  src: url('../fonts/thmanyah-regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Serif';
  src: url('../fonts/thmanyah-medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Serif';
  src: url('../fonts/thmanyah-bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Serif';
  src: url('../fonts/thmanyah-black.woff2') format('woff2');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* ---------- المتغيرات ---------- */
:root {
  --c-ink: #0d0d0d;          /* العناوين والنصوص الأساسية */
  --c-navy: #1a2f42;         /* الأزرار الداكنة */
  --c-navy-2: #1d2939;
  --c-gray: #787878;         /* نص ثانوي */
  --c-gray-2: #5e5e5e;
  --c-line: #e8e8e8;         /* خطوط فاصلة */
  --c-bg: #fafafa;           /* خلفية الصفحة */
  --c-white: #ffffff;
  --c-gold: #e3ad30;         /* اللمسة الذهبية */
  --c-tag: #efefef;          /* خلفية التاغات */
  --c-cta: #c1d7ed;          /* صندوق الدعوة الأزرق الفاتح */
  --c-dark-1: #121212;
  --c-mid: #333333;

  --font-main: 'Thmanyah Serif', serif;

  --radius-card: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --container: 1200px;
  --pad-x: 64px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.6s;
}

/* ---------- الأساسيات ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--c-bg);
  color: var(--c-ink);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- التايبوغرافي (مطابق للأصل) ---------- */
h1, .h1 {
  font-weight: 700;
  font-size: 50px;
  line-height: 1.3;
  letter-spacing: -0.045em;
  color: var(--c-ink);
}
h2, .h2 {
  font-weight: 500;
  font-size: 35px;
  line-height: 1.25;
  letter-spacing: -0.04em;
  color: var(--c-ink);
}
h5, .h5 {
  font-weight: 500;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.035em;
  color: var(--c-ink);
}
.text-lg {
  font-size: 19px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.035em;
}
.text-body {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: -0.035em;
}
.text-sm {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.035em;
  color: var(--c-gray);
}
.text-tag {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--c-gray);
}

@media (max-width: 1199px) and (min-width: 810px) {
  h1, .h1 { font-size: 42px; }
  h2, .h2 { font-size: 38px; }
  h5, .h5 { font-size: 25px; }
  .text-body { font-size: 17px; }
}
@media (max-width: 809px) {
  h1, .h1 { font-size: 34px; }
  h2, .h2 { font-size: 30px; }
  h5, .h5 { font-size: 24px; }
  .text-lg { font-size: 17px; }
  .text-body { font-size: 16px; }
}

/* ---------- الحاويات ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
@media (max-width: 1199px) { :root { --pad-x: 40px; } }
@media (max-width: 809px)  { :root { --pad-x: 20px; } }

.section { padding-block: 90px; }
@media (max-width: 809px) { .section { padding-block: 60px; } }

/* تاغ القسم (حبة صغيرة فوق العنوان) */
.section-tag {
  display: inline-block;
  background: var(--c-tag);
  color: var(--c-gray-2);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.03em;
  padding: 8px 14px;
  border-radius: 999px;
}

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.03em;
  transition: transform 0.3s var(--ease-out), background-color 0.3s, color 0.3s, box-shadow 0.3s;
  will-change: transform;
}
.btn:hover { transform: scale(1.04); }
.btn:active { transform: scale(0.97); }

.btn--dark {
  background: var(--c-navy);
  color: var(--c-white);
  box-shadow: 0 1px 2px rgba(13, 13, 13, 0.18);
}
.btn--dark:hover { background: #234059; }

.btn--light {
  background: var(--c-white);
  color: var(--c-ink);
  box-shadow: 0 1px 3px rgba(13, 13, 13, 0.1);
}

.btn--ghost {
  background: transparent;
  color: var(--c-ink);
  padding-inline: 8px;
}

.btn .arrow { transition: transform 0.3s var(--ease-out); }
.btn:hover .arrow { transform: translateX(-4px); }

/* سهم داخل دائرة */
.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--c-white);
  color: var(--c-ink);
  transition: transform 0.35s var(--ease-out), background-color 0.3s, color 0.3s;
}

/* ---------- شريط التنقل ---------- */
.navbar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  transition: background-color 0.35s, backdrop-filter 0.35s, box-shadow 0.35s;
}
.navbar.is-scrolled {
  background: rgba(250, 250, 250, 0.82);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  box-shadow: 0 1px 0 rgba(13, 13, 13, 0.05);
}
.navbar__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 16px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.navbar__logo img { width: 132px; height: auto; }
.navbar__menu {
  display: flex;
  align-items: center;
  gap: 28px;
  /* الروابط تجاور زر الحجز في الجهة اليسرى — مثل الأصل */
  margin-inline-start: auto;
  margin-inline-end: 18px;
}
.navbar__link {
  position: relative;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--c-ink);
  overflow: hidden;
  display: inline-block;
}
/* مساحة كافية للحروف العربية النازلة حتى لا تُقص */
.navbar__link .label {
  line-height: 1.9;
  padding-bottom: 2px;
}
/* تأثير تبديل النص عند التحويم (نفس حركة فريمر) */
.navbar__link .label {
  display: block;
  transition: transform 0.4s var(--ease-out);
}
.navbar__link .label--ghost {
  position: absolute;
  inset-inline-start: 0;
  top: 100%;
}
.navbar__link:hover .label { transform: translateY(-100%); }

.navbar__burger { display: none; }

@media (max-width: 809px) {
  .navbar__menu {
    position: fixed;
    inset: 0;
    top: 64px;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px var(--pad-x);
    gap: 18px;
    background: var(--c-bg);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.45s var(--ease-out), opacity 0.3s;
  }
  .navbar.menu-open .navbar__menu {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .navbar__burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
  }
  .navbar__burger span {
    width: 22px; height: 2px;
    background: var(--c-ink);
    transition: transform 0.3s, opacity 0.3s;
  }
  .navbar.menu-open .navbar__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .navbar.menu-open .navbar__burger span:nth-child(2) { opacity: 0; }
  .navbar.menu-open .navbar__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- أنيميشن الظهور عند التمرير ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
/* عند تفعيل GSAP: عطّل أنيميشن CSS الأساسي تماماً (GSAP يتولى الحركة) */
.gsap-on .reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* ---------- فقاعات الخلفية المتحركة ---------- */
.has-blobs {
  position: relative;
  overflow: hidden;
}
.has-blobs > .container,
.has-blobs > .cta__content {
  position: relative;
  z-index: 1;
}
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

/* ---------- صندوق الدعوة (CTA) ---------- */
.cta {
  margin-block: 40px;
}
.cta__box {
  position: relative;
  background: var(--c-cta);
  border-radius: var(--radius-card);
  padding: 110px 40px;
  text-align: center;
  overflow: hidden;
}
.cta__box::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../images/bg-dots.svg');
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  pointer-events: none;
}
.cta__content { position: relative; z-index: 1; max-width: 560px; margin-inline: auto; }
.cta__content h2 { font-size: 44px; font-weight: 700; letter-spacing: -0.045em; color: var(--c-navy-2); }
.cta__content p { margin-top: 18px; color: var(--c-mid); }
.cta__actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
@media (max-width: 809px) {
  .cta__box { padding: 70px 24px; }
  .cta__content h2 { font-size: 32px; }
}

/* ---------- الفوتر ---------- */
.footer {
  padding: 70px 0 50px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}
.footer__brand img { width: 132px; }
.footer__brand p { margin-top: 16px; color: var(--c-gray-2); font-size: 16px; font-weight: 500; letter-spacing: -0.03em; }
.footer__socials {
  direction: ltr;
  justify-content: flex-end;
  margin-top: 20px;
  display: flex;
  gap: 10px;
}
.footer__socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--c-navy);
  transition: transform 0.3s var(--ease-out), background-color 0.3s;
}
.footer__socials a:hover { transform: scale(1.1); background: #234059; }
.footer__socials img { width: 16px; height: 16px; object-fit: contain; }

.footer__col h6 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}
.footer__col ul li { margin-bottom: 12px; }
.footer__col ul a {
  color: var(--c-gray-2);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.03em;
  transition: color 0.25s;
}
.footer__col ul a:hover { color: var(--c-ink); }

.footer__contact li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--c-gray-2);
  font-size: 16px;
}
.footer__contact .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--c-navy);
  color: var(--c-white);
  flex-shrink: 0;
}
.footer__contact .icon svg { width: 14px; height: 14px; }

@media (max-width: 809px) {
  .footer__inner { grid-template-columns: 1fr; gap: 36px; }
}
