/* Navigation, language direction and service-page layout corrections */
.services-menu { position: relative; }
.services-menu summary { align-items: center; color: #303234; cursor: pointer; display: flex; font-size: 14px; font-weight: 700; gap: 6px; list-style: none; }
.services-menu summary::-webkit-details-marker { display: none; }
.services-menu summary span { font-size: 17px; line-height: 1; transition: transform .2s; }
.services-menu[open] summary span { transform: rotate(180deg); }
.services-dropdown { background: #fff; border: 1px solid #ececea; box-shadow: 0 12px 24px rgba(0,0,0,.12); display: flex; flex-direction: column; left: -18px; min-width: 220px; padding: 8px 0; position: absolute; top: 31px; z-index: 40; }
.services-dropdown a { padding: 10px 18px; white-space: nowrap; }
.services-dropdown a:hover { background: #f7f7f5; color: var(--red); }

html[dir="rtl"] body { direction: rtl; }
.fa { direction: rtl; text-align: right; }
.fa h1, .fa h2, .fa h3 { letter-spacing: 0; }
.fa .hero-content { margin-left: auto; margin-right: 0; text-align: right; }
.fa .hero-content > p:not(.eyebrow) { margin-right: 0; margin-left: auto; }
.fa .hero-bottom { direction: rtl; }
.fa .header, .fa .footer-top, .fa .footer-bottom { flex-direction: row; }
.fa .services-dropdown { left: auto; right: -18px; }
.fa .feature, .fa .detail-hero { direction: ltr; }
.fa .detail-copy, .fa .feature-copy { direction: rtl; grid-column: 2; text-align: right; }
.fa .detail-image, .fa .feature-image { grid-column: 1; }
.footer-top .brand { filter: none; background: #fff; height: 78px; padding: 5px 8px; }
.footer-top .brand img { height: 68px; width: 132px; object-fit: contain; }

/* Service cards: every service has a locally bundled image, so they work both
   offline from index.html and after a Cloudflare upload. */
.service-card { overflow: hidden; padding: 0; }
.service-card-image { background: center / cover no-repeat; height: 152px; width: 100%; }
.service-card-copy { display: flex; flex: 1; flex-direction: column; padding: 21px 23px 22px; }
.service-card-copy h3 { margin-top: 20px; }
.service-card-copy > b:last-child { margin-top: 12px; }

/* Prevent invisible copy on light sections in either language. */
.intro, .services, .detail-hero, .detail-body, .quote { color: var(--ink); }
.intro h2, .services h2, .detail-copy h1, .detail-body h2, .quote h1 { color: var(--ink); }
.intro .section-kicker, .services .section-kicker, .detail-body .section-kicker, .quote .section-kicker { color: var(--red); }

@media (max-width: 760px) {
  .nav.open .services-menu { border-bottom: 1px solid #eee; }
  .nav.open .services-menu summary { padding: 13px 1px; }
  .nav.open .services-dropdown { border: 0; box-shadow: none; display: none; min-width: 0; padding: 0 12px; position: static; }
  .nav.open .services-menu[open] .services-dropdown { display: flex; }
  .nav.open .services-dropdown a { border-bottom: 0; padding: 10px 0; }
  .fa .feature .feature-image, .fa .detail-hero .detail-image, .fa .feature .feature-copy, .fa .detail-hero .detail-copy { grid-column: 1; }
}

/* Compact desktop typography: service-page image remains beside its text. */
@media (min-width: 761px) {
  body { font-size: 15px; }
  .hero { min-height: 520px; height: min(640px, calc(100vh - 82px)); }
  .hero-content { max-width: 650px; padding-top: clamp(88px, 12vh, 122px); }
  .hero h1 { font-size: clamp(40px, 4.9vw, 66px); line-height: 1.02; }
  .hero-content > p:not(.eyebrow), .detail-copy > p:not(.eyebrow) { font-size: 15px; }
  .intro { padding: 90px 0; }
  .intro h2, .section-head h2 { font-size: clamp(34px, 3.8vw, 56px); }
  .intro > div > p { font-size: 16px; }
  .services { padding-bottom: 90px; }
  .service-card { min-height: 280px; padding: 23px; }
  .service-card { min-height: 355px; padding: 0; }
  .service-card-image { height: 145px; }
  .service-card-copy { padding: 19px 21px 20px; }
  .service-card h3 { font-size: 24px; }
  .service-card p { font-size: 13px; }
  .feature { min-height: 470px; }
  .feature-copy { padding: clamp(42px, 6vw, 76px); }
  .feature-copy h2 { font-size: clamp(32px, 3.7vw, 52px); }
  .detail-hero { grid-template-columns: 1.04fr .96fr; min-height: 500px; }
  .detail-copy { padding: clamp(52px, 6.5vw, 86px); }
  .detail-copy h1 { font-size: clamp(36px, 3.9vw, 58px); line-height: 1.06; }
  .detail-image { min-height: 500px; }
  .detail-body { padding: 90px 0; gap: 70px; }
  .detail-body h2 { font-size: clamp(33px, 3.4vw, 50px); }
  .detail-body p { font-size: 15px; }
  .quote { padding: 90px 0; gap: 70px; }
}

/* Persian desktop/tablet detail pages: one fixed row, image left and copy right.
   These explicit placements override the older RTL `order` rules above. */
@media (min-width: 701px) {
  .fa .detail-hero,
  .fa .feature {
    direction: ltr;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "image copy";
    align-items: stretch;
  }

  .fa .detail-hero .detail-image,
  .fa .feature .feature-image {
    grid-area: image;
    grid-column: 1;
    grid-row: 1;
    order: 0;
    min-width: 0;
    min-height: 500px;
  }

  .fa .detail-hero .detail-copy,
  .fa .feature .feature-copy {
    grid-area: copy;
    grid-column: 2;
    grid-row: 1;
    order: 0;
    min-width: 0;
    direction: rtl;
    text-align: right;
  }
}

@media (max-width: 700px) {
  .fa .detail-hero,
  .fa .feature { grid-template-columns: 1fr; grid-template-areas: none; }
  .fa .detail-hero .detail-copy,
  .fa .feature .feature-copy,
  .fa .detail-hero .detail-image,
  .fa .feature .feature-image { grid-area: auto; grid-column: 1; grid-row: auto; }
}
