/*
 * Ibtikar Tech — transitional cross-page UX refinements.
 *
 * Canonical component behavior now lives in components.css.
 * Foundation geometry/focus/typography live in tokens.css + base.css;
 * the global header, navigation drawer, mega menu and footer live exclusively
 * in ibtikar-shell.css. Keep only layout/readability refinements here until
 * each rule is absorbed by its page family or canonical component owner.
 */

/* ---------- Shared layout rhythm ---------- */
.ibtx-container {
  width: min(calc(100% - (var(--ibt-gutter) * 2)), var(--ibt-container));
  margin-inline: auto;
}

:where(.section-heading, .platform-heading, .service-detail-heading, .svc-heading, .heading) {
  max-width: 760px;
}

:where(.section-heading, .platform-heading, .service-detail-heading, .svc-heading, .heading) > p {
  max-width: 64ch;
}

/* ---------- Homepage and approved-source readability ---------- */
body.source-home .hero__content > p,
body.source-services .hero-copy > p,
body.approved-source-page .platform-heading > p {
  line-height: 1.9;
}

body.source-home .hero__actions,
body.source-services .hero-actions {
  gap: 10px;
}

body.source-services .goal-grid {
  gap: clamp(12px, 1.6vw, 18px);
}

body.source-services .goal {
  padding: clamp(20px, 2.2vw, 26px);
}

body.source-services .goal-icon {
  border-radius: 12px !important;
}

/* ---------- Strategy/editorial readability floor ----------
 * The legacy strategy layer intentionally uses compact metadata, but several
 * labels fell below a comfortable Arabic reading size. Keep the visual density
 * while preventing 8–11px copy from becoming the primary information carrier.
 */
.strategy-kicker,
.strategy-outcome-rail b,
.strategy-stage-card i,
.strategy-knowledge-grid b,
.strategy-service-card small {
  font-size: 11px;
  line-height: 1.45;
}

.strategy-outcome-rail small,
.strategy-platform-stack small,
.strategy-chip-row :is(a, span),
.strategy-knowledge-grid span,
.strategy-filterbar button,
.strategy-service-card a {
  font-size: 12px;
  line-height: 1.55;
}

.strategy-stage-card p,
.strategy-cinema-context p,
.strategy-product-context p,
.strategy-evidence-bar p,
.strategy-continuity p,
.strategy-scope-note p,
.strategy-service-card p {
  font-size: 13px;
  line-height: 1.82;
}

.strategy-platform-copy p,
.strategy-salla-copy p,
.strategy-decision__main p {
  font-size: 15px;
  line-height: 1.9;
}

.strategy-filterbar button {
  min-height: var(--ibt-target-min, 44px);
}

.strategy-filterbar input {
  min-height: 48px;
}

html[dir="rtl"] :is(
  .strategy-compact-head h2,
  .strategy-head h2,
  .strategy-platform-copy h2,
  .strategy-salla-copy h2,
  .strategy-decision__main h2
) {
  letter-spacing: 0;
}

/* ---------- Inner pages ---------- */
.inner-page:not(.approved-source-page) .platform-hero h1 {
  max-width: 800px;
}

.inner-page:not(.approved-source-page) .platform-heading p,
.service-detail-page .service-detail-heading p {
  max-width: 65ch;
}

.category-hub #capabilities .route-card {
  box-shadow: 0 12px 36px rgba(0, 0, 0, .07) !important;
}

.category-hub #capabilities .route-card:hover {
  box-shadow: 0 18px 46px rgba(0, 0, 0, .1) !important;
}

/* ---------- Mobile content corrections ---------- */
@media (max-width: 760px) {
  body.source-home .hero__content > p,
  body.source-services .hero-copy > p {
    font-size: 16px !important;
    line-height: 1.85 !important;
  }

  .strategy-stage-card p,
  .strategy-cinema-context p,
  .strategy-product-context p,
  .strategy-evidence-bar p,
  .strategy-continuity p,
  .strategy-scope-note p,
  .strategy-service-card p {
    font-size: 13.5px;
  }
}
