/* ============================================================
   الصفحات الداخلية: المشاريع، المقالات، النشرات، التواصل، 404
   ============================================================ */

/* ---------- هيرو داخلي موحد ---------- */
.page-hero {
  padding-top: 140px;
  padding-bottom: 50px;
  text-align: center;
  background:
    radial-gradient(53% 75% at 50% 24%, rgba(195, 222, 244, 0.32) 0%, rgba(250, 250, 250, 0) 100%),
    var(--c-bg);
}
.page-hero .section-tag { margin-bottom: 18px; }
.page-hero h1 { font-size: 52px; }
.page-hero .sub {
  margin-top: 16px;
  max-width: 560px;
  margin-inline: auto;
  color: var(--c-gray-2);
}
@media (max-width: 809px) {
  .page-hero h1 { font-size: 34px; }
}

/* ---------- شبكة المشاريع (صفحة المشاريع) ---------- */
.projects-page .projects__grid { padding-bottom: 40px; }

/* ---------- صفحة تفاصيل المشروع ---------- */
.project-hero {
  padding-top: 140px;
  padding-bottom: 40px;
  text-align: center;
  background:
    radial-gradient(53% 75% at 50% 24%, rgba(195, 222, 244, 0.32) 0%, rgba(250, 250, 250, 0) 100%),
    var(--c-bg);
}
.project-hero h1 {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 46px;
}
.project-hero h1 .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--c-navy);
  flex-shrink: 0;
}
.project-hero h1 .icon img { width: 26px; height: 26px; }
.project-hero .sub {
  margin-top: 16px;
  max-width: 620px;
  margin-inline: auto;
  color: var(--c-gray-2);
}
.project-gallery {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: 24px;
  direction: ltr;
}
.project-gallery img {
  width: 100%;
  height: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: var(--radius-card);
}
@media (max-width: 809px) {
  .project-hero h1 { font-size: 30px; }
  .project-gallery { grid-template-columns: 1fr; }
}

/* جسم تفاصيل المشروع: مقال + بطاقة جانبية */
.project-body {
  padding-block: 60px;
}
.project-body__inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: start;
}
.rich-text p {
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: -0.03em;
  color: var(--c-mid);
  margin-bottom: 22px;
}
.rich-text h2 {
  font-size: 26px;
  margin: 36px 0 16px;
}
.rich-text ul {
  list-style: disc;
  padding-inline-start: 22px;
  margin-bottom: 22px;
}
.rich-text ul li {
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: -0.03em;
  color: var(--c-mid);
  margin-bottom: 10px;
}
.rich-text b, .rich-text strong { color: var(--c-ink); }

.side-card {
  position: sticky;
  top: 100px;
  background: #e7f0f9;
  border-radius: var(--radius-card);
  padding: 32px 28px;
  text-align: center;
}
.side-card__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin-inline: auto;
  background: var(--c-white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.side-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.side-card h5 { margin-top: 16px; font-size: 22px; }
.side-card p { margin-top: 8px; color: var(--c-gray-2); font-size: 14.5px; }
.side-card .btn { margin-top: 20px; width: 100%; justify-content: center; background: var(--c-white); color: var(--c-ink); }
@media (max-width: 809px) {
  .project-body__inner { grid-template-columns: 1fr; }
  .side-card { position: static; }
}

/* ---------- الشهادات (مشتركة) ---------- */
/* الأنماط في home.css تُحمَّل مع كل صفحة تحتاجها */

/* ---------- صفحة المقالات ---------- */
.blog-featured {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 36px;
  align-items: center;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 40px;
  direction: ltr;
}
.blog-featured > * { direction: rtl; }
.blog-featured__media {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1.35;
}
.blog-featured__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.blog-featured:hover .blog-featured__media img { transform: scale(1.04); }
.blog-featured__text { padding-inline: 12px; }
.blog-featured__text h3 {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.35;
}
.blog-featured__text p {
  margin-top: 14px;
  color: var(--c-gray-2);
  font-size: 15.5px;
  line-height: 1.85;
}
.blog-featured__text .blog-card__meta { margin-top: 18px; }
@media (max-width: 809px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured__text h3 { font-size: 24px; }
}

/* ---------- صفحة المقال ---------- */
.article-hero {
  padding-top: 130px;
  padding-bottom: 30px;
  text-align: center;
  background:
    radial-gradient(53% 75% at 50% 24%, rgba(195, 222, 244, 0.3) 0%, rgba(250, 250, 250, 0) 100%),
    var(--c-bg);
}
.article-hero .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  margin-bottom: 24px;
  color: var(--c-ink);
}
.article-hero .back-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.article-hero h1 {
  max-width: 760px;
  margin-inline: auto;
  font-size: 42px;
}
.article-hero .date {
  margin-top: 18px;
  color: var(--c-gray);
  font-size: 15px;
}
.article-cover {
  margin-top: 40px;
}
.article-cover img {
  width: 100%;
  max-height: 620px;
  object-fit: cover;
  border-radius: var(--radius-card);
}
.article-body {
  padding-block: 50px 80px;
}
.article-body .rich-text {
  max-width: 760px;
  margin-inline: auto;
}
@media (max-width: 809px) {
  .article-hero h1 { font-size: 28px; }
}

/* ---------- النشرات العلمية ---------- */
.pubs-logos {
  position: relative;
  overflow: hidden;
  max-width: 760px;
  margin-inline: auto;
  margin-top: 36px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.pubs-logos__track {
  display: flex;
  align-items: center;
  gap: 70px;
  width: max-content;
  animation: pubs-marquee 22s linear infinite;
}
.pubs-logos:hover .pubs-logos__track { animation-play-state: paused; }
.pubs-logos img {
  height: 26px;
  width: auto;
  opacity: 0.85;
}
@keyframes pubs-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-100% / 3)); }
}
.pubs-grid {
  padding-block: 50px 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  direction: ltr;
}
.pub-card {
  display: block;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 6px 18px -8px rgba(26, 47, 66, 0.08);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
}
.pub-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px -12px rgba(26, 47, 66, 0.18);
}
.pub-card img { width: 100%; display: block; }
@media (max-width: 1199px) { .pubs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 809px)  { .pubs-grid { grid-template-columns: 1fr; } }

/* ---------- صفحة الملف الشخصي (النشرة العلمية) ---------- */
.profile-hero {
  padding-top: 140px;
  padding-bottom: 30px;
  text-align: center;
  background:
    radial-gradient(53% 75% at 50% 24%, rgba(195, 222, 244, 0.32) 0%, rgba(250, 250, 250, 0) 100%),
    var(--c-bg);
}
.profile-hero h1 { font-size: 52px; }
.profile-hero .sub { margin-top: 14px; color: var(--c-gray-2); max-width: 480px; margin-inline: auto; font-family: serif; }
.profile-hero .socials {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 10px;
  direction: ltr;
}
.profile-hero .socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--c-navy);
  transition: transform 0.3s;
}
.profile-hero .socials a:hover { transform: scale(1.1); }
.profile-hero .socials img { width: 16px; height: 16px; object-fit: contain; }

.profile-card {
  margin-top: 50px;
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  align-items: start;
  text-align: start;
  box-shadow: 0 16px 40px -20px rgba(26, 47, 66, 0.12);
}
.profile-card__media {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(180deg, #dff0f7 0%, #cfe6f2 100%);
}
.profile-card__media img { width: 100%; }
.profile-card__info h4 {
  font-size: 26px;
  font-weight: 500;
  font-family: serif;
}
.profile-card__info > p {
  margin-top: 14px;
  color: var(--c-gray-2);
  font-size: 16px;
  line-height: 1.8;
  font-family: serif;
}
.profile-rows { margin-top: 22px; }
.profile-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--c-line);
  font-family: serif;
  font-size: 16px;
}
.profile-row span:last-child { color: var(--c-gray-2); }
.profile-banner {
  margin-top: 24px;
  background: var(--c-navy);
  border-radius: var(--radius-md);
  color: var(--c-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-family: serif;
  font-size: 17px;
}
.profile-banner img {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
@media (max-width: 809px) {
  .profile-hero h1 { font-size: 36px; }
  .profile-card { grid-template-columns: 1fr; }
}

/* ---------- صفحة التواصل ---------- */
.contact-card {
  max-width: 620px;
  margin: 40px auto 0;
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 40px 36px;
  box-shadow: 0 16px 40px -22px rgba(26, 47, 66, 0.14);
  text-align: start;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.form-field { display: flex; flex-direction: column; gap: 10px; }
.form-field--full { grid-column: 1 / -1; }
.form-field label {
  font-size: 15px;
  font-weight: 500;
  color: var(--c-ink);
}
.form-field input,
.form-field textarea {
  font-family: inherit;
  font-size: 15px;
  border: none;
  border-bottom: 1px solid var(--c-line);
  background: transparent;
  padding: 8px 2px;
  color: var(--c-ink);
  transition: border-color 0.3s;
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-bottom-color: var(--c-navy);
}
.form-field ::placeholder { color: #b5b5b5; }
.contact-card .btn-submit {
  margin-top: 30px;
  width: 100%;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  padding: 15px;
  border-radius: 999px;
  background: var(--c-navy);
  color: var(--c-white);
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.3s, transform 0.3s;
}
.contact-card .btn-submit:hover { background: #234059; transform: scale(1.01); }
.contact-card .note {
  margin-top: 16px;
  text-align: center;
  color: var(--c-gray-2);
  font-size: 14.5px;
}
.contact-info {
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
.contact-info a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--c-ink);
  font-size: 16px;
}
.contact-info .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--c-navy);
  color: var(--c-white);
}
.contact-info .icon svg { width: 15px; height: 15px; }
@media (max-width: 809px) {
  .form-grid { grid-template-columns: 1fr; }
  .contact-card { padding: 28px 20px; }
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.notfound .num {
  font-size: 64px;
  font-weight: 700;
  color: var(--c-navy);
  font-family: serif;
}
.notfound h1 { font-size: 44px; font-family: serif; font-weight: 500; margin-top: 8px; }
.notfound p { margin-top: 16px; color: var(--c-gray-2); font-family: serif; max-width: 400px; margin-inline: auto; }
.notfound .btn { margin-top: 28px; }

/* ---------- حجز موعد (صفحة التواصل) ---------- */
.booking-card {
  max-width: 620px;
  margin: 26px auto 0;
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 36px;
  box-shadow: 0 16px 40px -22px rgba(26, 47, 66, 0.14);
  text-align: start;
}
.booking-card h3,
.contact-card h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-align: center;
}
.booking-card .b-sub,
.contact-card .b-sub {
  text-align: center;
  color: var(--c-gray-2);
  font-size: 14px;
  margin-top: 8px;
}
.contact-card form { margin-top: 26px; }
.booking-card { margin-top: 40px; }
.contact-card { margin-top: 26px; }
.b-step-label {
  font-size: 15px;
  font-weight: 500;
  margin: 24px 0 12px;
}
.day-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.day-chip {
  flex-shrink: 0;
  min-width: 78px;
  border: 1px solid var(--c-line);
  border-radius: 14px;
  padding: 11px 10px;
  text-align: center;
  cursor: pointer;
  background: var(--c-white);
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.day-chip:hover { border-color: var(--c-navy); transform: translateY(-2px); }
.day-chip.active { background: var(--c-navy); border-color: var(--c-navy); color: #fff; }
.day-chip .dw { font-size: 13px; font-weight: 500; display: block; }
.day-chip .dn { font-size: 19px; font-weight: 700; display: block; margin-top: 2px; }
.day-chip .dm { font-size: 11.5px; opacity: 0.7; display: block; }
.time-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.time-chip {
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 14.5px;
  cursor: pointer;
  background: var(--c-white);
  transition: border-color 0.25s, background 0.25s;
  direction: ltr;
}
.time-chip:hover { border-color: var(--c-navy); }
.time-chip.active { background: var(--c-navy); border-color: var(--c-navy); color: #fff; }
.time-chip.taken {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
  pointer-events: none;
}
.b-empty { color: var(--c-gray); font-size: 14px; padding: 8px 2px; }
.booking-success {
  text-align: center;
  padding: 30px 10px;
}
.booking-success .check {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #e8f6ee;
  color: #1c8a4e;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
