/* ========================================================
   --- FRONTLINE UNIFIED RESPONSIVE SYSTEM ---
======================================================== */

/* --- 1. Large Screens & Desktop Refinements (<= 1400px) --- */
@media (max-width: 1400px) {
  :root { 
    --container: 1140px; 
  }
  .display { 
    font-size: clamp(3rem, 6vw, 5.5rem); 
  }
}

/* --- 2. Desktop & Small Laptops (<= 1200px) --- */
@media (max-width: 1200px) {
  .hero-grid {
    gap: 3.5rem;
  }

  .contact-shell {
    gap: 2.5rem !important;
  }
}

/* --- 3. Tablets & Horizontal Mobile (<= 1024px) --- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
    padding-top: 8.5rem;
    padding-bottom: 3rem;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-inline: auto;
  }

  .hero-title-clean {
    align-items: center !important;
  }

  .hero-actions { 
    justify-content: center; 
  }

  .hero-proof-strip { 
    justify-content: center; 
  }

  /* شبكة المشاريع في التابلت */
  .stories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1.25rem !important;
  }

  .story-card, 
  .story-lg, 
  .story-wide {
    grid-column: span 1 !important;
    height: auto !important;
    aspect-ratio: 6 / 5 !important;
  }

  .story-wide { 
    grid-column: 1 / -1 !important; 
  }

  /* قسم التواصل: تحويله إلى عمود واحد مريح.
     نستخدم [dir] لنطابق خصوصية قواعد main.css التي تفرض row بـ !important. */
  [dir="rtl"] .contact-shell,
  [dir="ltr"] .contact-shell,
  .contact-shell {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 2.5rem !important;
    width: min(calc(100% - 2rem), 760px) !important;
    max-width: 100% !important;
    margin-inline: auto !important;
  }

  [dir="rtl"] .contact-info,
  [dir="ltr"] .contact-info,
  [dir="rtl"] .contact-shell .intake-form,
  [dir="ltr"] .contact-shell .intake-form,
  .contact-info,
  .contact-shell .intake-form {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    position: static !important;
    box-sizing: border-box !important;
  }

  .contact-info {
    text-align: center !important;
  }

  .contact-info .lead {
    margin-inline: auto !important;
    max-width: 34rem;
  }
}

/* --- 4. Navigation & Grid Collapse (<= 991px) --- */
@media (max-width: 991px) {
  .site-nav { 
    display: none !important; 
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .capabilities-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

/* --- 5. Mobile Devices (<= 768px) --- */
@media (max-width: 768px) {
  .section { 
    padding: 3rem 0;
  }

  /* أزرار أصغر وأنظف على الجوال */
  .btn {
    min-height: 40px !important;
    padding: 0.55rem 1.05rem !important;
    font-size: 0.78rem !important;
  }

  .hero-actions { gap: 0.6rem !important; }

  .btn:hover { transform: none !important; }

  .container {
    width: min(calc(100% - 2rem), var(--container)) !important;
  }

  .hero-grid {
    padding-top: 7.5rem !important;
    padding-bottom: 2rem !important;
  }

  .display {
    font-size: clamp(2.4rem, 8.5vw, 3.2rem) !important;
  }

  .hero-title-clean {
    font-size: clamp(2.15rem, 8vw, 3.2rem) !important;
    line-height: 1.16 !important;
    gap: 0 !important;
  }

  /* ضبط سطور العنوان على الجوال: مساحة كافية لنزول الحروف العربية
     (الياء/الجيم) بلا قص، مع إلغاء الارتفاع المحجوز الزائد. */
  .title-line-static,
  .title-line-dynamic {
    min-height: 0 !important;
    padding-block: 0.06em 0.14em !important;
    font-size: clamp(1.95rem, 8vw, 2.75rem) !important;
    line-height: 1.42 !important;
    overflow: visible !important;
  }

  /* تحويل القصص إلى قائمة عمودية في الجوال بارتفاع أقرب للمربع */
  .stories-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* كروت القصص: شوية أصغر ومربعة أنظف — الشعار فقط بالوسط بلا تفاصيل */
  .stories-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.9rem !important;
  }

  .stories-grid .story-card,
  .stories-grid .story-card.story-lg,
  .stories-grid .story-card.story-wide,
  .archive-grid .story-card,
  .archive-grid .story-lg,
  .archive-grid .story-wide {
    grid-column: span 1 !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    min-height: 0 !important;
  }

  /* إخفاء كل تفاصيل الكرت (الوصف، العنوان، السنة، التصنيف) — يبقى الشعار فقط */
  .stories-grid .story-card h2,
  .stories-grid .story-card p,
  .stories-grid .story-card .archive-year,
  .stories-grid .story-pills-wrap,
  .archive-grid .story-card h2,
  .archive-grid .story-card p,
  .archive-grid .story-card .archive-year,
  .archive-grid .story-pills-wrap {
    display: none !important;
  }

  .stories-grid .story-content,
  .archive-grid .story-content {
    inset: 0 !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
  }

  .stories-grid .story-client-row,
  .archive-grid .story-client-row {
    min-height: 0 !important;
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
  }

  .stories-grid .story-client-logo,
  .archive-grid .story-client-logo {
    width: 4.5rem !important;
    height: 1.85rem !important;
    object-fit: contain !important;
    margin: 0 !important;
  }

  /* بطاقات الخدمات: كروت صغيرة مريحة في عمودين */
  .capabilities-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
  }

  .capability-card {
    min-height: 0 !important;
    padding: 1rem 0.9rem !important;
  }

  .capability-card h3 {
    font-size: 0.98rem !important;
    margin-bottom: 0.4rem !important;
  }

  .capability-card p {
    font-size: 0.72rem !important;
    line-height: 1.55 !important;
  }

  /* شعارات الشركاء: 8 في كل صف بأحجام صغيرة وفراغات متناسقة */
  .marquee-track {
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
    gap: 0.55rem 0.4rem !important;
    padding: 1.25rem 0 0.75rem !important;
  }

  .partner-logo {
    min-height: 1.85rem !important;
    padding: 0.15rem 0.2rem !important;
  }

  .partner-logo img {
    width: 100% !important;
    max-width: 100% !important;
    height: 1.4rem !important;
    object-fit: contain !important;
  }

  .partners-title {
    font-size: clamp(1.15rem, 4.5vw, 1.5rem) !important;
  }

  .partners-eyebrow {
    font-size: 0.62rem !important;
  }

  /* الفورم: حشو وخطوط أخفّ على الجوال */
  .contact-shell textarea {
    min-height: 120px !important;
  }

  .contact-shell .services-fieldset {
    margin-bottom: 1.1rem !important;
  }

  .contact-shell .service-tile .tile-content {
    padding: 0.75rem 0.9rem !important;
  }

  .contact-info h2 {
    font-size: clamp(1.5rem, 6.2vw, 2rem) !important;
    line-height: 1.3 !important;
  }

  /* ضبط الفورم للجوال بالكامل (مع [dir] لمطابقة خصوصية main.css).
     width بـ calc يخلي هوامش جانبية مثل باقي الـ container ولا يلزق بالحواف. */
  [dir="rtl"] .contact-shell,
  [dir="ltr"] .contact-shell,
  .contact-shell {
    flex-direction: column !important;
    align-items: stretch !important;
    width: min(calc(100% - 2rem), var(--container)) !important;
    max-width: 100% !important;
    margin-inline: auto !important;
    gap: 1.75rem !important;
  }

  [dir="rtl"] .contact-info,
  [dir="ltr"] .contact-info,
  [dir="rtl"] .contact-shell .intake-form,
  [dir="ltr"] .contact-shell .intake-form,
  .contact-info,
  .contact-shell .intake-form {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .contact-shell .intake-form {
    padding: 1.35rem !important;
    border-radius: 18px !important;
  }

  .contact-shell .services-fieldset {
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
  }

  .contact-shell .service-tile.tile-full {
    grid-column: span 1 !important;
  }

  .contact-shell .field-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .contact-shell .field-full {
    grid-column: span 1 !important;
  }

  .drawer-panel {
    width: 100%;
    padding: 1.5rem 1.15rem 2rem;
  }

  .drawer-close {
    width: 36px;
    height: 36px;
    margin-bottom: 1.25rem;
  }

  .drawer-client-logo {
    width: min(9rem, 70%);
    height: 3.5rem;
    margin: 0 auto 2rem !important;
  }

  .drawer-panel h2 {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
    margin: 0.5rem 0 0.75rem;
  }

  .drawer-media {
    margin: 1.25rem 0;
  }

  /* فوتر مصغّر ومرتب على الجوال */
  .site-footer { padding: 2rem 0 1.5rem !important; }

  .footer-shell {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.9rem;
  }

  .footer-logo {
    width: 7rem !important;
  }

  .footer-brand-block p {
    font-size: 0.75rem !important;
  }

  .footer-contact-block {
    font-size: 0.68rem !important;
    gap: 0.2rem !important;
    line-height: 1.5 !important;
  }

  .footer-social {
    gap: 0.7rem !important;
  }

  .footer-social a {
    width: 30px !important;
    height: 30px !important;
  }

  .footer-social svg {
    width: 14px !important;
    height: 14px !important;
  }

  .footer-copyright {
    font-size: 0.62rem !important;
    margin-top: 0.4rem !important;
  }

  /* عنوان الأقسام ووصفها أصغر */
  .section-kicker { font-size: 0.6rem !important; }

  .display.small-display {
    font-size: clamp(1.35rem, 5.5vw, 1.8rem) !important;
  }

  .prose p {
    font-size: 0.85rem !important;
    line-height: 1.75 !important;
  }

  .contact-info h2 {
    font-size: clamp(1.25rem, 5vw, 1.6rem) !important;
  }

  .careers-mini__title { font-size: 0.75rem !important; }

  .careers-mini__btn {
    padding: 0.45rem 0.85rem !important;
    font-size: 0.7rem !important;
  }

  /* --- صفحة القصص (الأرشيف) على الجوال --- */
  .archive-hero {
    min-height: auto !important;
    /* مساحة عليا كافية حتى لا يلتصق العنوان بالهيدر الثابت
       (الهيدر على الجوال يرتفع إلى ~91px مع الهوامش والحشو). */
    padding-top: 8.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  /* قاعدة .section { padding: 2.4rem 0 !important } التالية تُلغي
     حشوة .archive-hero لأنها اختصار (shorthand) يأتي بعدها في نفس
     الكتلة، لذا نعيد تأكيد الحشوة العليا للهيرو بعدها. */
  .section.archive-hero {
    padding-top: 8.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .archive-title {
    font-size: clamp(1.9rem, 8.5vw, 2.6rem) !important;
    line-height: 1.18 !important;
  }

  .archive-lead {
    margin-top: 1rem !important;
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
  }

  .archive-controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    margin-top: 1.5rem;
  }

  .archive-filters {
    margin-top: 0 !important;
    padding: 0.6rem 0.75rem !important;
  }

  .filter-pill {
    min-height: 38px;
    padding: 0.5rem 0.85rem;
    font-size: 0.72rem;
  }

  .hero-download-btn {
    justify-content: center;
    width: 100%;
  }

  .archive-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 1.1rem;
  }

  .archive-work {
    padding-top: 1rem !important;
  }
}

/* --- 6. Small Mobile Screens (<= 480px) --- */
@media (max-width: 480px) {
  .hero-actions {
    flex-direction: row;
    justify-content: center;
    gap: 0.55rem;
  }

  .hero-actions .btn {
    width: auto;
  }

  .contact-shell .submit-btn {
    width: 100% !important;
    min-height: 42px !important;
    font-size: 0.78rem !important;
  }

  .title-line-static,
  .title-line-dynamic {
    font-size: clamp(1.5rem, 7.5vw, 2rem) !important;
  }

  .hero-grid { padding-top: 6.5rem !important; }

  .hero-video { min-height: 0 !important; }

  .section-divider--brand::after {
    width: min(160px, 40vw);
  }
}
/* --- Smooth Entrance Animations --- */
/* يُخفى المحتوى فقط عندما يكون JavaScript فعّالاً (الصنف js يُضاف في
   <head>). بدون ذلك يبقى المحتوى ظاهراً بدل أن تصبح الصفحة سوداء فارغة
   إذا تعطّل السكربت أو حُجب. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.68s cubic-bezier(0.16, 1, 0.3, 1), transform 0.68s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.js [data-reveal].active {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal],
  .js .archive-next-card > :not(.archive-next-orbit) {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    transition-delay: 0ms !important;
  }
}


/* ========================================================
   --- MOBILE COMPACT LAYOUT OVERRIDES (<= 768px) ---
   هدف هذا القسم: نسخة جوال أخف وأصغر — عناصر ومساحات وأزرار
   أصغر، شعارات ٨ في الصف، كروت قصص مختصرة (اللوجو فقط)، وفوتر
   مضغوط. يوضع أخيراً ليتقدّم على القواعد السابقة.
   ======================================================== */
@media (max-width: 768px) {
  /* --- 1) مساحات عامة أضيق: أقل فراغات رأسية وأصفار أقرب للحواف --- */
  :root {
    --container: 100%;
  }

  .section {
    padding: 2.4rem 0 !important;
  }

  .container {
    width: min(calc(100% - 1.5rem), var(--container)) !important;
  }

  .section-divider {
    margin-block: 0.35rem !important;
  }

  /* أول فاصل (بين الهيرو والقسم التالي) يلتصق بأسفل الفيديو تماماً
     بلا أي فراغ: نلغي هوامش الفاصل وحاويته الرأسية. */
  .hero + .container .section-divider--brand {
    margin-block: 0 !important;
  }

  .section-head {
    gap: 0.4rem !important;
    margin-bottom: 1.1rem !important;
  }

  .section-head h2,
  .two-col h2,
  .contact-grid h2 {
    font-size: clamp(1.25rem, 6vw, 1.6rem) !important;
  }

  .small-display {
    font-size: clamp(1.35rem, 6.4vw, 1.8rem) !important;
    line-height: 1.22 !important;
  }

  .section-kicker,
  .eyebrow {
    margin: 0 0 0.5rem !important;
    font-size: 0.62rem !important;
    letter-spacing: 0.1em !important;
  }

  .prose {
    font-size: 0.86rem !important;
    line-height: 1.72 !important;
  }

  .about-single {
    gap: 0.6rem !important;
  }

  .about-single .prose p {
    margin: 0 0 0.7rem !important;
    line-height: 1.7 !important;
  }

  /* --- 2) الهيرو: الفيديو يملأ كامل القسم بلا فراغ علوي أو سفلي --- */
  .hero.section {
    padding: 0 !important;
  }

  .hero-grid {
    padding-top: 6.5rem !important;
    padding-bottom: 2rem !important;
    min-height: 62svh !important;
    gap: 1.5rem !important;
  }

  /* تثبيت طبقة الفيديو لتمتد من أعلى الهيرو إلى أسفله تماماً */
  .hero-stage {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100% !important;
    min-height: 100% !important;
    transform: translateX(-50%) !important;
    overflow: hidden !important;
  }

  .hero-video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 0.58 !important;
  }

  /* إزالة أي طبقات تدرج زائدة تقطع أسفل الفيديو أو تترك فراغاً قبل الفاصل */
  .hero-stage::after {
    display: none !important;
  }

  .title-line-static,
  .title-line-dynamic {
    font-size: clamp(1.55rem, 7.4vw, 2.05rem) !important;
    line-height: 1.34 !important;
  }

  /* --- 3) الأزرار: أصغر وأرشق --- */
  .btn {
    min-height: 38px !important;
    padding: 0.5rem 0.95rem !important;
    font-size: 0.76rem !important;
  }

  .hero-actions,
  .form-actions {
    gap: 0.5rem !important;
    margin-top: 1.25rem !important;
  }

  .archive-link {
    font-size: 0.74rem !important;
  }

  .archive-link-row {
    margin-top: 1.25rem !important;
  }

  /* --- 4) شعارات الشركاء: ٤ في كل صف بأحجام صغيرة متوازنة بصرياً --- */
  .marquee-section {
    padding: 1.6rem 0 !important;
    background: transparent !important;
    border-block: none !important;
  }

  .marquee-track {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.65rem 0.5rem !important;
    padding: 0.75rem 0 0.35rem !important;
  }

  .partner-logo {
    min-height: 2rem !important;
    padding: 0.15rem 0.2rem !important;
  }

  .partner-logo img {
    width: auto !important;
    max-width: 3.4rem !important;
    height: 1.25rem !important;
    object-fit: contain !important;
    transform: none !important;
    opacity: 0.75 !important;
  }

  .partners-heading {
    gap: 0.5rem !important;
    margin-bottom: 0.35rem !important;
  }

  .partners-title {
    font-size: clamp(1.15rem, 5.4vw, 1.5rem) !important;
  }

  /* --- 5) كروت الخدمات: شبكة عمودين مضغوطة ومساحات أقل --- */
  .capabilities-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.6rem !important;
  }

  .capability-card {
    min-height: 0 !important;
    padding: 0.95rem 0.85rem !important;
    border-radius: 14px !important;
  }

  .capability-card h3 {
    font-size: 1.02rem !important;
    margin-bottom: 0.4rem !important;
  }

  .capability-card p {
    font-size: 0.76rem !important;
    line-height: 1.55 !important;
  }

  /* --- 6) كروت القصص: كروت صغيرة مربعة، عمودان، اللوجو فقط في الوسط --- */
  .stories-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.7rem !important;
  }

  /* خلفية ثابتة للكرت أثناء تحميل الصورة: بدونه يبقى الكرت أسود تماماً
     على الشبكات البطيئة وتبدو القصص وكأنها غير موجودة. */
  .stories-grid .story-card,
  .stories-grid .story-card.story-lg,
  .stories-grid .story-card.story-wide,
  .archive-grid .story-card {
    background-color: #12262a !important;
  }

  /* على صفحات الأرشيف تظهر القصص متتابعة أثناء التمرير، والصورة
     المتأخرة كانت تُخفي الشعار خلفها. نُظهر اللوجو فوق كل شيء. */
  .archive-grid .story-client-row {
    position: relative !important;
    z-index: 4 !important;
  }

  .stories-grid .story-card,
  .stories-grid .story-card.story-lg,
  .stories-grid .story-card.story-wide {
    grid-column: span 1 !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    min-height: 0 !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
  }

  .stories-grid .story-content {
    position: absolute !important;
    inset: 0 !important;
    padding: 0 !important;
    display: flex !important;
    grid-template-rows: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 3 !important;
  }

  .stories-grid .story-client-row {
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .stories-grid .story-client-logo {
    width: 4.6rem !important;
    height: 2rem !important;
    max-width: 70% !important;
    max-height: 50% !important;
    padding: 0 !important;
    object-fit: contain !important;
    margin: 0 !important;
  }

  /* إخفاء تفاصيل الكرت (العنوان/الوصف/الشرائح/السنة) على الجوال */
  .stories-grid .story-card h2,
  .stories-grid .story-card p,
  .stories-grid .story-card .archive-year,
  .stories-grid .story-card .story-pills-wrap,
  .stories-grid .story-card .story-pill {
    display: none !important;
  }

  /* --- 7) نافذة تفاصيل القصة (Drawer) --- */
  .drawer-panel {
    width: 100% !important;
    padding: 1.1rem 1rem 1.4rem !important;
  }

  .drawer-close {
    width: 32px !important;
    height: 32px !important;
    margin-bottom: 0.85rem !important;
  }

  .drawer-kicker {
    margin-bottom: 0.5rem !important;
    font-size: 0.62rem !important;
  }

  .drawer-client-logo {
    width: min(7rem, 62%) !important;
    height: 2.5rem !important;
    margin: 0 auto 1rem !important;
  }

  .drawer-panel h2 {
    font-size: clamp(1.15rem, 5.8vw, 1.5rem) !important;
    margin: 0.35rem 0 0.5rem !important;
  }

  .drawer-taxonomy {
    font-size: 0.68rem !important;
  }

  .drawer-body {
    font-size: 0.82rem !important;
    line-height: 1.7 !important;
  }

  .drawer-media {
    margin: 0.9rem 0 !important;
    border-radius: 14px !important;
  }

  .drawer-pills {
    gap: 0.35rem !important;
    margin-top: 0.75rem !important;
  }

  .drawer-cta {
    width: 100% !important;
    margin-top: 1rem !important;
  }

  /* --- 8) قسم التواصل والفورم: ترتيب الجوال = الكيكر والعنوان،
     ثم الفورم، ثم بوكس التوظيف تحته.
     بوكس التوظيف داخل .contact-info، لذا نجعل .contact-info في الجوال
     display:contents ليصبح أبناؤه عناصر flex مباشرة في .contact-shell،
     ثم نرتبها بـ order. --- */
  .contact-shell {
    display: flex !important;
    flex-direction: column !important;
  }

  .contact-shell .contact-info {
    display: contents !important;
  }

  .contact-shell .contact-info .section-kicker {
    order: 1 !important;
    margin-bottom: 0.35rem !important;
  }

  .contact-shell .contact-info h2 {
    order: 2 !important;
    font-size: clamp(1.25rem, 5.8vw, 1.65rem) !important;
    margin: 0 0 0.9rem !important;
  }

  .contact-shell .intake-form {
    order: 3 !important;
  }

  /* بوكس التوظيف ينفصل بصرياً إلى آخر القسم تحت الفورم */
  .contact-shell .careers-mini {
    order: 4 !important;
    margin-top: 1.1rem !important;
    padding-top: 1rem !important;
    width: 100% !important;
    align-items: flex-start !important;
  }

  .careers-mini__title {
    font-size: 0.76rem !important;
  }

  .careers-mini__btn {
    padding: 0.45rem 0.85rem !important;
    font-size: 0.74rem !important;
  }

  .contact-shell .intake-form {
    padding: 0.95rem !important;
    border-radius: 16px !important;
  }

  .contact-shell .services-fieldset {
    gap: 0.5rem !important;
    margin-bottom: 1rem !important;
  }

  .contact-shell .services-fieldset legend {
    font-size: 0.76rem !important;
    margin-bottom: 0.5rem !important;
  }

  .contact-shell .service-tile {
    align-self: start !important;
    height: auto !important;
  }

  .contact-shell .service-tile .tile-content {
    padding: 0.65rem 0.85rem !important;
    border-radius: 10px !important;
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .contact-shell .tile-header {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .contact-shell .tile-header strong {
    font-size: 0.82rem !important;
    margin: 0 !important;
    text-align: center !important;
  }

  /* تمييز الخيار المختار بخلفية واضحة وحد ملون بدل الدائرة */
  .contact-shell .service-tile input:checked + .tile-content {
    background: rgba(19, 88, 97, 0.28) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 16px rgba(19, 88, 97, 0.35) !important;
  }

  /* إلغاء الامتداد الرأسي لبطاقات النوع داخل شبكة الـ fieldset */
  .contact-shell .services-fieldset {
    align-items: start !important;
  }

  .contact-shell .field-grid {
    gap: 0.65rem !important;
  }

  .contact-shell .field-group > span {
    font-size: 0.72rem !important;
    margin-bottom: 0.3rem !important;
  }

  .contact-shell input[type="text"],
  .contact-shell input[type="email"],
  .contact-shell textarea {
    padding: 0.6rem 0.75rem !important;
    font-size: 0.82rem !important;
  }

  .contact-shell textarea {
    min-height: 90px !important;
  }

  .contact-shell .submit-btn {
    width: 100% !important;
    min-height: 40px !important;
    height: 40px !important;
    font-size: 0.78rem !important;
  }

  /* تقليص الفراغ بعد زر الإرسال داخل الفورم */
  .contact-shell .intake-form .form-actions {
    margin-top: 1.1rem !important;
  }

  .contact-shell .intake-form .form-status:empty {
    display: none !important;
  }

  /* قسم التواصل: مساحة عليا كافية حتى لا يتداخل العنوان مع الهيدر الثابت */
  #contact.section {
    scroll-margin-top: 6rem !important;
  }

  /* تصغير شعار فرونتلاين في الهيدر للجوال */
  .brand-logo {
    height: 19px !important;
    max-height: 19px !important;
    max-width: 38vw !important;
  }

  .site-header.scrolled .brand-logo {
    height: 17px !important;
    max-height: 17px !important;
  }

  /* الهيدر مثبّت فوق المحتوى على الجوال. في صفحات السكرول الطويلة
     (الأرشيف) كانت الشعارات تمرّ تحته وتختفي. نُعطيه خلفية معتمة
     فقط عند التمرير، فيبقى شفافاً في أعلى الصفحة كما هو الآن. */
  .site-header.scrolled .nav-shell {
    background: rgba(8, 8, 8, 0.88) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    backdrop-filter: blur(14px) !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
    padding-inline: 0.85rem !important;
    padding-block: 0.35rem !important;
    border-radius: 14px !important;
  }

  /* --- 9) الفوتر: مضغوط مع زوايا وخطوط أصغر --- */
  .site-footer {
    padding: 1.5rem 0 0.85rem !important;
  }

  .footer-shell {
    gap: 0.85rem !important;
  }

  .footer-logo {
    width: 5rem !important;
  }

  .footer-brand-block p,
  .footer-contact-block span,
  .footer-shell p {
    font-size: 0.64rem !important;
    line-height: 1.45 !important;
  }

  .footer-contact-block a {
    font-size: 0.72rem !important;
  }

  .footer-social a {
    width: 1.8rem !important;
    height: 1.8rem !important;
  }

  .footer-social svg {
    width: 0.78rem !important;
    height: 0.78rem !important;
  }

  .footer-copyright {
    font-size: 0.6rem !important;
    padding-top: 0.7rem !important;
    text-align: center !important;
  }

  .footer-shell { align-items: center !important; text-align: center !important; }
  .footer-brand-block { align-items: center !important; text-align: center !important; }
  .footer-contact-block { align-items: center !important; text-align: center !important; }

  /* --- 10) صفحة الشكر --- */
  .success-shell {
    padding: 1.25rem !important;
    border-radius: 16px !important;
  }

  .success-shell .display {
    font-size: clamp(1.35rem, 6.4vw, 1.8rem) !important;
  }

  .success-shell .lead {
    font-size: 0.86rem !important;
    line-height: 1.7 !important;
  }
}

/* --- Extra-small screens (<= 480px): قليل من التصغير الإضافي --- */
@media (max-width: 480px) {
  .capability-card h3 {
    font-size: 0.95rem !important;
  }

  .capability-card p {
    font-size: 0.72rem !important;
  }

  .partner-logo img {
    height: 1.2rem !important;
  }

  .title-line-static,
  .title-line-dynamic {
    font-size: clamp(1.45rem, 7.8vw, 1.9rem) !important;
  }
}

/* Unified story cards across the home page and the full stories archive. */
@media (min-width: 1025px) {
  .stories-grid,
  .archive-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1.1rem !important;
  }

  .stories-grid .story-card,
  .stories-grid .story-card.story-lg,
  .stories-grid .story-card.story-wide,
  .archive-grid .story-card,
  .archive-grid .story-card.story-lg,
  .archive-grid .story-card.story-wide {
    grid-column: auto !important;
    width: 100% !important;
    height: clamp(19rem, 25vw, 26rem) !important;
    aspect-ratio: auto !important;
  }

  /* الصفحة الرئيسية: بطاقتان عريضتان وبطاقتان أضيق، مع صفين متوازنين. */
  #stories .stories-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  }

  #stories .stories-grid .story-card {
    grid-column: span 5 !important;
    height: clamp(22rem, 27vw, 28rem) !important;
  }

  #stories .stories-grid .story-card.story-lg {
    grid-column: span 7 !important;
  }

}

@media (min-width: 769px) and (max-width: 1024px) {
  .stories-grid,
  .archive-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem !important;
  }

  .stories-grid .story-card,
  .stories-grid .story-card.story-lg,
  .stories-grid .story-card.story-wide,
  .archive-grid .story-card,
  .archive-grid .story-card.story-lg,
  .archive-grid .story-card.story-wide {
    grid-column: auto !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
  }

}

@media (max-width: 768px) {
  .site-header::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 9rem;
    background: linear-gradient(
      to bottom,
      rgba(5, 10, 11, 0.9) 0%,
      rgba(5, 10, 11, 0.72) 32%,
      rgba(5, 10, 11, 0.38) 67%,
      rgba(5, 10, 11, 0) 100%
    );
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
  }

  .site-header.scrolled::before {
    opacity: 1;
    z-index: 0;
  }

  .brand-icon {
    display: none !important;
  }

  .site-header.scrolled {
    top: 0 !important;
    padding: 0.65rem 0 0 !important;
    transform: none !important;
    -webkit-transform: none !important;
    will-change: auto !important;
  }

  .site-header.scrolled .nav-shell {
    position: relative !important;
    z-index: 1 !important;
    width: 100% !important;
    height: 2.5rem !important;
    min-height: 2.5rem !important;
    justify-content: center !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
  }

  .site-header.scrolled .site-nav,
  .site-header.scrolled .lang-switch {
    display: none !important;
  }

  .site-header.scrolled .brand {
    display: grid !important;
    width: 2rem !important;
    height: 2rem !important;
    place-items: center !important;
    overflow: hidden !important;
  }

  .site-header.scrolled .brand-logo {
    display: none !important;
  }

  .site-header.scrolled .brand-icon {
    display: block !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
  }

  .stories-grid,
  .archive-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.7rem !important;
  }

  .stories-grid .story-card,
  .stories-grid .story-card.story-lg,
  .stories-grid .story-card.story-wide,
  .archive-grid .story-card,
  .archive-grid .story-card.story-lg,
  .archive-grid .story-card.story-wide {
    grid-column: auto !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    min-height: 0 !important;
    border-radius: 14px !important;
  }

  .stories-grid .story-card h2,
  .stories-grid .story-card p,
  .stories-grid .story-card .story-pills-wrap,
  .stories-grid .story-card .story-pill,
  .stories-grid .story-card .archive-year,
  .archive-grid .story-card h2,
  .archive-grid .story-card p,
  .archive-grid .story-card .story-pills-wrap,
  .archive-grid .story-card .story-pill,
  .archive-grid .story-card .archive-year {
    display: none !important;
  }

  .stories-grid .story-content,
  .archive-grid .story-content {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem !important;
    z-index: 3 !important;
  }

  .stories-grid .story-client-row,
  .archive-grid .story-client-row {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    z-index: 4 !important;
  }

  .stories-grid .story-client-logo,
  .archive-grid .story-client-logo {
    width: min(70%, 6rem) !important;
    height: 2.5rem !important;
    max-width: 70% !important;
    max-height: 50% !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .stories-grid .story-client-fallback,
  .archive-grid .story-client-fallback {
    max-width: 90% !important;
    text-align: center !important;
  }
}

/* Story viewer: the project photo covers the complete box on every screen. */
.drawer-client-logo[hidden] { display: none !important; }

.stories-grid .story-card { position: relative; overflow: hidden; }
.stories-grid .story-image {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center !important;
}

.case-drawer {
  justify-content: center !important;
  align-items: center !important;
  padding: 2rem !important;
}

.drawer-panel {
  position: relative;
  width: min(100%, 1000px) !important;
  height: min(82svh, 760px) !important;
  max-height: calc(100svh - 4rem) !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 24px;
  background: #080b0c !important;
  transform: translateY(1rem) scale(0.98) !important;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.case-drawer.open .drawer-panel { transform: translateY(0) scale(1) !important; }

.drawer-media {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: inherit !important;
  background: #080b0c;
}

.drawer-media > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100% !important;
  max-width: none;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center !important;
  filter: brightness(0.58) saturate(0.86) contrast(1.05);
}

.drawer-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.38) 42%, rgba(0, 0, 0, 0.86));
  pointer-events: none;
}

.drawer-cover-copy {
  position: absolute;
  inset-inline: clamp(1.25rem, 6vw, 4.5rem);
  top: 50%;
  bottom: auto;
  z-index: 1;
  display: flex;
  max-height: calc(100% - 7rem);
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  overflow-y: auto;
  padding: 0.75rem;
  color: #fff;
  text-align: center;
  transform: translateY(-50%);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.drawer-cover-copy .drawer-client-logo {
  display: block;
  flex: 0 0 auto;
  width: min(10rem, 60%);
  height: 4rem !important;
  max-width: 100%;
  max-height: none !important;
  margin: 0 !important;
  padding: 0.25rem;
  object-fit: contain !important;
  object-position: center;
  filter: brightness(0) invert(1);
}

.drawer-cover-copy h2 {
  max-width: 48rem;
  margin: 0 !important;
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 3.2rem) !important;
  line-height: 1.18 !important;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

.drawer-cover-copy .drawer-kicker { display: none; }
.drawer-cover-copy .drawer-taxonomy { margin: 0; color: #9de4e8; text-align: center; }
.drawer-cover-copy .drawer-body {
  width: min(100%, 46rem);
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}
.drawer-cover-copy .drawer-pills { justify-content: center; margin-top: 0.25rem; }
.drawer-cover-copy .drawer-contact-link { margin: 0.35rem auto 0; color: #fff; }

.drawer-close {
  position: absolute !important;
  top: 1rem;
  inset-inline-end: 1rem;
  z-index: 3;
  margin: 0 !important;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}

@media (max-width: 768px) {
  .case-drawer { padding: 0 !important; }

  .drawer-close,
  .drawer-close:hover,
  .drawer-close:focus-visible,
  .drawer-close:active {
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }

  .drawer-panel {
    width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border: 0 !important;
    border-radius: 0 !important;
    overscroll-behavior: contain;
  }

  .drawer-cover-copy {
    inset-inline: 0.75rem;
    top: 50%;
    bottom: auto;
    max-height: calc(100% - max(5.5rem, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 3.5rem));
    gap: 0.5rem;
    padding: 0.35rem;
    transform: translateY(-50%);
  }

  .drawer-cover-copy .drawer-client-logo {
    width: min(6.5rem, 58%);
    height: 2.6rem !important;
    object-fit: contain !important;
  }

  .drawer-cover-copy h2 {
    max-width: 22rem;
    font-size: clamp(1.15rem, 5.2vw, 1.65rem) !important;
    line-height: 1.22 !important;
  }

  .drawer-cover-copy .drawer-taxonomy {
    font-size: 0.7rem !important;
    line-height: 1.4;
  }

  .drawer-cover-copy .drawer-body {
    max-width: 28rem;
    font-size: 0.78rem !important;
    line-height: 1.55 !important;
  }

  .drawer-cover-copy .drawer-pills {
    gap: 0.35rem;
  }

  .drawer-cover-copy .drawer-pills span {
    padding: 0.35rem 0.55rem;
    font-size: 0.65rem;
  }

  .drawer-cover-copy .drawer-contact-link {
    min-width: 7.25rem;
    min-height: 2.25rem;
    margin-top: 0.25rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.74rem;
  }

  .drawer-close { top: max(0.75rem, env(safe-area-inset-top)); inset-inline-end: 0.75rem; }
}

/* Homepage type scale: modestly larger labels and About copy on mobile. */
@media (max-width: 768px) {
  #about .section-kicker,
  #capabilities .section-kicker,
  #stories .section-kicker,
  #contact .section-kicker,
  .partners-eyebrow {
    font-size: 0.96rem !important;
  }

  #contact .contact-info h2 {
    font-size: clamp(1.95rem, 7vw, 2.55rem) !important;
  }

  #stories .section-head h2 {
    font-size: clamp(1.65rem, 5.8vw, 2.2rem) !important;
  }

  .partners-title {
    font-size: clamp(0.95rem, 3.7vw, 1.1rem) !important;
  }

  .partners-eyebrow {
    font-size: 1.2rem !important;
  }

  #about .prose {
    font-size: 0.92rem !important;
    line-height: 1.75 !important;
  }

  #capabilities .capability-card h3 {
    font-size: 1.3rem !important;
  }

  #capabilities .capability-card p {
    font-size: 0.72rem !important;
  }
}

@media (max-width: 768px) {
  #about .section-kicker,
  #capabilities .section-kicker,
  #stories .section-kicker,
  #contact .section-kicker,
  .marquee-section .partners-eyebrow {
    font-size: 1.08rem !important;
    font-weight: 800 !important;
  }

  #about .prose,
  #about .prose p,
  #stories .section-head h2,
  #contact .contact-info h2,
  .marquee-section .partners-title {
    font-size: 0.9rem !important;
    line-height: 1.7 !important;
  }

  #capabilities .capability-card h3 {
    font-size: 1.16rem !important;
  }

  #capabilities .capability-card p {
    font-size: 0.7rem !important;
    line-height: 1.6 !important;
  }

  .stories-grid .story-card h2 {
    font-size: clamp(1.35rem, 5vw, 1.65rem) !important;
  }

  .stories-grid .story-card p:not(.archive-year) {
    font-size: 0.66rem !important;
  }
}

/* Compact copy on the homepage cards; keep the full case story in the viewer. */
.stories-grid .story-card h2 {
  font-size: clamp(1.05rem, 1.55vw, 1.35rem) !important;
  line-height: 1.35 !important;
}

.stories-grid .story-card p:not(.archive-year) {
  font-size: 0.64rem !important;
  line-height: 1.55 !important;
}

/* Case viewer: image-led cover followed by a readable, direction-aware story. */
.drawer-panel {
  display: flex !important;
  flex-direction: column !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

.drawer-media {
  position: relative !important;
  inset: auto !important;
  flex: 0 0 clamp(18rem, 42vh, 25rem);
  height: clamp(18rem, 42vh, 25rem) !important;
  min-height: 0 !important;
  border-radius: 0 !important;
}

.drawer-story-content {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 7vw, 5.5rem) 2.5rem;
  color: #e6e8e8;
  background: #080b0c;
  direction: inherit;
  text-align: start;
}

.drawer-story-sections {
  display: grid;
  gap: clamp(1.1rem, 2.5vw, 1.75rem);
  max-width: 48rem;
  margin-inline: auto;
}

.drawer-story-section h3 {
  margin: 0 0 0.4rem;
  color: #9de4e8;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
}

.drawer-story-section p {
  margin: 0;
  color: rgba(230, 232, 232, 0.84);
  font-size: 0.98rem;
  line-height: 1.9;
  text-align: start;
}

.drawer-story-content .drawer-pills {
  justify-content: flex-start;
  max-width: 48rem;
  margin: 1.5rem auto 0;
}

.drawer-story-content .drawer-contact-link {
  display: flex;
  width: fit-content;
  margin: 1.5rem auto 0;
}

/* Refined case story presentation. */
.stories-grid .story-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1.1rem 2.8rem rgba(0, 0, 0, 0.2);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.stories-grid .story-card:hover,
.stories-grid .story-card:focus-visible {
  border-color: rgba(157, 228, 232, 0.55);
  box-shadow: 0 1.4rem 3.4rem rgba(0, 0, 0, 0.34), 0 0 1.4rem rgba(46, 143, 151, 0.12);
}

.stories-grid .story-card:focus-visible {
  outline: 2px solid #9de4e8;
  outline-offset: 4px;
}

.stories-grid .story-overlay {
  background:
    linear-gradient(180deg, rgba(3, 8, 9, 0.28), transparent 32%),
    linear-gradient(0deg, rgba(3, 8, 9, 0.97), rgba(3, 8, 9, 0.76) 27%, rgba(3, 8, 9, 0.13) 72%);
}

.stories-grid .story-card .story-pill {
  border-color: rgba(157, 228, 232, 0.2);
  color: rgba(239, 252, 252, 0.88);
  background: rgba(5, 15, 16, 0.58);
}

.drawer-media > img { filter: brightness(0.52) saturate(0.86) contrast(1.08); }

.drawer-cover-shade {
  background: linear-gradient(180deg, rgba(2, 6, 7, 0.28), rgba(2, 6, 7, 0.1) 35%, rgba(2, 6, 7, 0.9));
}

.drawer-cover-copy {
  inset-inline: clamp(1.5rem, 9vw, 7rem);
  gap: 0.7rem;
  max-height: none !important;
  overflow: visible !important;
  scrollbar-width: none;
}

.drawer-cover-copy .drawer-client-logo {
  width: min(8.5rem, 46%);
  height: 3.1rem !important;
  margin-bottom: 0.25rem !important;
  opacity: 0.94;
}

.drawer-cover-copy h2 {
  max-width: 42rem;
  font-size: clamp(1.7rem, 3.2vw, 2.55rem) !important;
  line-height: 1.3 !important;
}

.drawer-cover-copy .drawer-taxonomy {
  padding: 0.42rem 0.8rem;
  border: 1px solid rgba(157, 228, 232, 0.24);
  border-radius: 999px;
  background: rgba(3, 11, 12, 0.45);
  font-size: 0.76rem;
  backdrop-filter: blur(8px);
}

.drawer-story-content {
  border-top: 1px solid rgba(157, 228, 232, 0.16);
  background: radial-gradient(ellipse at 50% 0%, rgba(23, 77, 81, 0.16), transparent 55%), #080b0c;
}

.drawer-story-sections { counter-reset: story-section; }

.drawer-story-section {
  position: relative;
  padding-inline-start: 1rem;
  border-inline-start: 1px solid rgba(157, 228, 232, 0.28);
  counter-increment: story-section;
}

.drawer-story-section h3 {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  color: #b8f0f1;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.drawer-story-section h3::before {
  content: "0" counter(story-section);
  flex: 0 0 auto;
  color: #5eaeb4;
  font: 600 0.62rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
}

.drawer-story-section p {
  max-width: 43rem;
  color: rgba(230, 238, 238, 0.82);
  font-size: 0.94rem;
  line-height: 2;
}

.drawer-story-content .drawer-pills { gap: 0.55rem; }

.drawer-story-content .drawer-pills span {
  padding: 0.42rem 0.72rem;
  border-color: rgba(157, 228, 232, 0.2);
  color: #c6dada;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.68rem;
}

.drawer-story-content .drawer-contact-link {
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border: 1px solid rgba(157, 228, 232, 0.45);
  border-radius: 999px;
  color: #f4ffff;
  background: linear-gradient(135deg, #17666d, #10464b);
  box-shadow: 0 0.6rem 1.6rem rgba(0, 0, 0, 0.2);
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.drawer-story-content .drawer-contact-link:hover,
.drawer-story-content .drawer-contact-link:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.12);
}

@media (max-width: 768px) {
  .stories-grid .story-card h2 {
    font-size: clamp(0.95rem, 4vw, 1.15rem) !important;
    line-height: 1.35 !important;
  }

  .stories-grid .story-card p:not(.archive-year) {
    font-size: 0.6rem !important;
    line-height: 1.5 !important;
  }

  .drawer-panel {
    height: 100dvh !important;
    max-height: 100dvh !important;
  }

  .drawer-media {
    flex-basis: 44dvh;
    height: 44dvh !important;
    min-height: 18rem !important;
    max-height: 56dvh;
  }

  .drawer-cover-copy {
    inset-inline: 1rem;
    gap: 0.55rem;
    max-height: none !important;
    overflow: visible !important;
  }

  .drawer-cover-copy .drawer-client-logo {
    width: min(7rem, 48%);
    height: 2.5rem !important;
  }

  .drawer-cover-copy h2 {
    font-size: clamp(1.2rem, 5vw, 1.65rem) !important;
  }

  .drawer-cover-copy .drawer-taxonomy {
    max-width: 90%;
    padding: 0.35rem 0.65rem;
    font-size: 0.65rem !important;
  }

  .drawer-story-content {
    padding: 1.5rem 1.25rem calc(2rem + env(safe-area-inset-bottom));
  }

  .drawer-story-sections { gap: 1.15rem; }

  .drawer-story-section h3 { font-size: 0.82rem; }

  .drawer-story-section { padding-inline-start: 0.75rem; }

  .drawer-story-section p {
    font-size: 0.86rem;
    line-height: 1.8;
  }

  .drawer-story-content .drawer-pills span { font-size: 0.62rem; }

  .drawer-story-content .drawer-contact-link {
    min-height: 2.65rem;
    margin-top: 1.25rem;
    font-size: 0.78rem;
  }
}

/* Keep the Arabic homepage hero on two balanced, single-line rows. */
.locale-ar .hero-title-clean .title-line-static,
.locale-ar .hero-title-clean .title-line-dynamic {
  width: max-content;
  max-width: 100%;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
}

@media (min-width: 769px) {
  .locale-ar .hero-title-clean .title-line-static,
  .locale-ar .hero-title-clean .title-line-dynamic {
    font-size: clamp(2.5rem, 4vw, 3.5rem) !important;
    letter-spacing: 0 !important;
  }
}

@media (max-width: 768px) {
  .locale-ar .hero-title-clean .title-line-static,
  .locale-ar .hero-title-clean .title-line-dynamic {
    font-size: clamp(1.15rem, 5.8vw, 2.75rem) !important;
    letter-spacing: 0 !important;
  }
}
