/* ====================================================================
   Desktop experience (>=1024px): a long-scroll editorial profile.
   Hidden by default (mobile/tablet keep the existing swipeable frame
   deck from styles.css); only activates at the 1024px breakpoint,
   where it replaces the mobile .stage entirely.
   ==================================================================== */

.desktop {
  display: none;
}

.d-float-footer {
  display: none;
}

.lang-toggle-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .stage {
    display: none;
  }

  .desktop {
    display: block;
    background: var(--cream);
  }

  /* Desktop instance of the language toggle: fixed to the page (not
     scoped to a frame, since desktop is one long scroll), top-right,
     above the progress bar's z-index (which doesn't even render on
     desktop, but matching the stated requirement regardless). */
  .lang-toggle-desktop {
    display: flex;
    align-items: center;
    gap: 6px;
    position: fixed;
    top: 24px;
    right: 32px;
    z-index: 100;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    background: rgba(250, 247, 242, 0.85);
    padding: 6px 14px;
    border-radius: 999px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }

  .lang-toggle-desktop a {
    color: var(--navy);
    text-decoration: none;
  }

  .lang-toggle-desktop a:hover {
    text-decoration: underline;
  }

  .lang-toggle-desktop .lang-current {
    color: var(--navy);
    opacity: 0.45;
  }

  .lang-toggle-desktop .lang-sep {
    color: var(--navy);
    opacity: 0.3;
  }

  .desktop p,
  .desktop li {
    text-wrap: pretty;
  }

  .d-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 64px;
  }

  /* ---------- Hero ---------- */
  .d-hero {
    display: flex;
    min-height: 100vh;
    background: var(--cream);
  }

  .d-hero-left {
    width: 50%;
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5vw;
  }

  .d-hero-name {
    font-family: var(--serif);
    font-weight: 700;
    color: var(--navy);
    font-size: clamp(64px, 6vw, 96px);
    line-height: 0.98;
    letter-spacing: -0.02em;
    margin: 0;
    opacity: 0;
    animation: dHeroName 900ms ease-out 100ms forwards;
  }

  .d-hero-subtitle {
    font-family: var(--sans);
    font-size: 18px;
    line-height: 1.6;
    color: var(--charcoal);
    margin: 28px 0 0;
    max-width: 420px;
  }

  .d-hero-logos {
    display: flex;
    align-items: center;
    gap: 32px;
    margin: 44px 0 0;
  }

  .d-hero-logos img {
    height: 40px;
    width: auto;
    object-fit: contain;
  }

  .d-hero-right {
    width: 50%;
    flex: 0 0 50%;
    position: relative;
    overflow: hidden;
  }

  .d-hero-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    opacity: 0;
    animation: dHeroPhoto 800ms ease-out forwards;
  }

  @keyframes dHeroName {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes dHeroPhoto {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* ---------- Shared section scaffolding ---------- */
  .d-section {
    padding: 100px 0;
  }

  .d-section--white { background: #ffffff; }
  .d-section--cream { background: var(--cream); }

  .d-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
  }

  .d-section-title {
    font-family: var(--serif);
    font-weight: 700;
    color: var(--navy);
    font-size: clamp(40px, 4vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin: 0;
  }

  .d-section-logo {
    height: 120px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
  }

  .d-rule {
    width: 80px;
    height: 2px;
    background: var(--navy);
    margin: 32px 0 0;
  }

  .d-meta {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--charcoal);
    margin: 24px 0 0;
  }

  /* ---------- Numbers-as-pills ----------
     A CSS grid, not a fixed-width column, so the pill column auto-sizes
     to the widest pill actually in THIS section (e.g. "3.1 months" vs
     "80%"): grid's default `justify-items: stretch` then stretches
     every pill in the section to that same shared width, which is what
     makes them align as one clean navy column with the text starting
     at a consistent x-position. .d-pill-row is `display: contents` so
     its pill + text land directly in the parent grid's two columns. */
  .d-numbers {
    margin: 48px 0 0;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 20px;
    row-gap: 20px;
    align-items: center;
  }

  .d-pill-row {
    display: contents;
  }

  .d-pill {
    grid-column: 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 120px;
    box-sizing: border-box;
    background: var(--navy);
    color: var(--cream);
    font-family: var(--serif);
    font-weight: 700;
    font-size: 24px;
    padding: 10px 20px;
    border-radius: 999px;
    white-space: nowrap;
    font-variant-numeric: lining-nums;
  }

  .d-number-text {
    grid-column: 2;
    font-size: 16px;
    line-height: 1.5;
    color: var(--charcoal);
  }

  .d-number-sub {
    color: var(--charcoal-dim);
    font-size: 0.82em;
  }

  .d-closing {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 500;
    color: var(--navy);
    font-size: 18px;
    line-height: 1.5;
    margin: 48px 0 0;
  }

  .d-closing strong { font-weight: 700; }

  /* ---------- Section 5: Fluent Across ---------- */
  .d-fluent-grid {
    margin: 80px 0 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .d-fluent-col {
    padding: 0 48px;
    border-left: 1px solid rgba(21, 40, 75, 0.2);
  }

  .d-fluent-col:first-child {
    border-left: none;
    padding-left: 0;
  }

  .d-fluent-col:last-child {
    padding-right: 0;
  }

  .d-fluent-head {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 32px;
    margin: 0 0 20px;
    line-height: 1.1;
  }

  .d-fluent-body {
    font-size: 16px;
    line-height: 1.7;
    color: var(--charcoal);
    margin: 0;
  }

  /* ---------- Mandate blocks (sections 6 and 9) ---------- */
  .d-mandates-grid {
    margin: 80px 0 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
  }

  /* Standalone primary CTA below the mandates grid. inline-flex with
     a fixed width (not full-width, not centered) so it sits at the
     container's natural inline-start edge: left under English, right
     under Arabic (whole page is direction: rtl there), with no
     separate RTL rule needed, same as .d-cta-book-call's icon-before-
     text DOM order mirroring to icon-on-the-right automatically. */
  .d-cta-book-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 320px;
    height: 56px;
    margin-top: 64px;
    background: var(--navy);
    color: var(--cream);
    font-family: var(--sans);
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(21, 40, 75, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .d-cta-book-call svg {
    flex-shrink: 0;
  }

  .d-cta-book-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(21, 40, 75, 0.32);
  }

  .d-mandate-num {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 24px;
    letter-spacing: 0.1em;
  }

  .d-mandate-title {
    font-family: var(--serif);
    font-weight: 700;
    color: var(--navy);
    font-size: 24px;
    line-height: 1.2;
    margin: 16px 0 12px;
  }

  .d-mandate-desc {
    font-size: 16px;
    line-height: 1.6;
    color: var(--charcoal);
    margin: 0;
  }

  .d-mandate-desc strong { color: var(--navy); font-weight: 700; }

  /* ---------- Section 7: The Arc ---------- */
  .d-arc {
    margin: 100px 0 0;
    position: relative;
  }

  .d-arc-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 7px;
    height: 2px;
    background: var(--navy);
  }

  .d-arc-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    position: relative;
  }

  .d-arc-item {
    position: relative;
    max-width: 220px;
    padding-top: 36px;
  }

  .d-arc-dot {
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--navy);
    border: 3px solid #ffffff;
  }

  .d-arc-years {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 16px;
    color: var(--navy);
    margin: 0 0 8px;
  }

  .d-arc-desc {
    font-size: 16px;
    line-height: 1.5;
    color: var(--charcoal);
  }

  .d-arc-desc strong { color: var(--navy); font-weight: 700; }

  .d-arc-closing {
    text-align: center;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 500;
    color: var(--navy);
    font-size: 24px;
    margin: 80px 0 0;
  }

  /* ---------- Section 8: Credentials ---------- */
  .d-cred-row {
    margin: 80px 0 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 48px;
  }

  .d-cred-logo-wrap {
    height: 80px;
    display: flex;
    align-items: flex-start;
  }

  .d-cred-logo-wrap img {
    height: 80px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
  }

  .d-cred-degree {
    font-size: 14px;
    font-weight: 500;
    color: var(--navy);
    line-height: 1.3;
    margin: 20px 0 4px;
  }

  .d-cred-program {
    font-size: 14px;
    line-height: 1.4;
    color: var(--charcoal);
    margin: 0;
  }

  /* ---------- Section 9: Let's Work Together ---------- */
  .d-work-tagline {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 500;
    color: var(--navy);
    font-size: 28px;
    margin: 20px 0 0;
  }

  /* ---------- Floating contact bar ----------
     Persistent across the whole scroll (fixed, not part of any
     section), replacing Section 9's old inline contact row. */
  .d-float-footer {
    display: flex;
    align-items: center;
    gap: 32px;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: var(--navy);
    border-radius: 999px;
    padding: 14px 32px;
    box-shadow: 0 8px 24px rgba(21, 40, 75, 0.2);
  }

  .d-float-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cream);
    text-decoration: none;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }

  .d-float-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--cream);
  }

  .d-float-item:hover span {
    text-decoration: underline;
  }
}

/* Narrower desktop widths (1024-1279px): trim container padding so the
   header rows (title + 120px-tall institution logo) don't crowd. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .d-container { padding: 0 40px; }
  .d-hero-left { padding: 0 40px; }
}
