/*
 * Infrastructure & transport page (Infrastructure module). Loaded after
 * ms.css, whose heading, card, note, table, workflow, standards, project and
 * link styles it reuses. Logical properties only (RTL for ar and he).
 * Button labels never wrap; tag strips stay on one row and swipe on phones.
 */

/* Hero: subtle structural grid overlay, still when reduced motion is asked for */
.lp-hero.has-image::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(to left, rgba(0, 0, 0, .9), transparent 70%);
  -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, .9), transparent 70%);
  animation: if-grid 28s linear infinite;
}
[dir="rtl"] .lp-hero.has-image::after { mask-image: linear-gradient(to right, rgba(0, 0, 0, .9), transparent 70%); -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, .9), transparent 70%); }
.lp-hero-in { position: relative; z-index: 2; }
@keyframes if-grid { from { background-position: 0 0, 0 0; } to { background-position: 96px 0, 0 96px; } }

/* Infrastructure solution cards */
.if-sol-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; align-items: start; }
.if-sol { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--steel-200); border-block-start: 3px solid var(--navy-900); }
.if-sol:hover { border-block-start-color: var(--red); }
.if-sol-img { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--steel-100); }
.if-sol-img img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform .5s ease; }
.if-sol:hover .if-sol-img img { transform: scale(1.03); }
.if-sol-img figcaption { position: absolute; inset-inline: 0; inset-block-end: 0; padding: 18px 12px 6px; background: linear-gradient(transparent, rgba(10, 22, 40, .85)); color: var(--white); font-family: var(--f-mono); font-size: 10.5px; line-height: 1.4; letter-spacing: .5px; }
.if-sol-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 16px; }
.if-sol-top { display: flex; gap: 10px; align-items: baseline; }
.if-sol-no { flex: none; font-family: var(--f-mono); font-size: 13px; font-weight: 600; color: var(--red); }
.if-sol-top h3 { font-size: 18px; line-height: 1.3; margin: 0; }
.if-sol-body > p { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); margin: 0; }
.if-sol-h, .if-sol-more h4 { margin: 6px 0 0; font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: 1.3px; text-transform: uppercase; color: var(--navy-900); }
.if-sol-more h4 { margin: 14px 0 8px; }
.if-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.if-tags li { padding: 3px 8px; background: var(--steel-50); border: 1px solid var(--steel-200); font-size: 12.5px; line-height: 1.4; color: var(--navy-900); }
.if-sol-more { border-block-start: 1px solid var(--steel-200); padding-block-start: 6px; }
.if-sol-more summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-block-size: 44px; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--red); list-style: none; }
.if-sol-more summary::-webkit-details-marker { display: none; }
.if-sol-more summary::after { content: "+"; flex: none; font-family: var(--f-mono); font-size: 20px; line-height: 1; }
.if-sol-more[open] summary::after { content: "−"; }
.if-caps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.if-caps li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.if-caps .ico { flex: none; inline-size: 16px; block-size: 16px; margin-block-start: 3px; color: var(--red); }
.if-scope-note { display: flex; gap: 8px; margin: 14px 0 4px; padding: 10px 12px; background: var(--steel-50); border-inline-start: 3px solid var(--navy-900); font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.if-scope-note .ico { flex: none; inline-size: 16px; block-size: 16px; margin-block-start: 2px; color: var(--navy-900); }
.if-links { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.if-links .textlink { display: inline-flex; align-items: center; gap: 4px; min-block-size: 32px; font-size: 14px; }
.if-sol-cta { margin: 6px 0 0; }
.if-sol-cta .btn { white-space: nowrap; max-inline-size: 100%; }

/* Knowledge centre */
.if-topics { margin-block-end: 24px; }
.if-topics .lp-h3 { margin: 0 0 10px; font-size: 15px; }
.if-tags-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.if-tags-row::-webkit-scrollbar { display: none; }
.if-tags-row li { flex: none; white-space: nowrap; }
.if-art-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.if-art a { display: flex; flex-direction: column; block-size: 100%; background: var(--white); border: 1px solid var(--steel-200); color: inherit; text-decoration: none; }
.if-art a:hover { border-color: var(--navy-900); }
.if-art a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.if-art-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--steel-100); }
.if-art-img img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.if-art-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 16px 18px 18px; }
.if-art-topic { font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--red); }
.if-art-title { font-size: 17px; line-height: 1.35; color: var(--navy-900); }
.if-art-sum { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.if-art-more { margin-block-start: auto; padding-block-start: 6px; font-size: 14px; font-weight: 700; color: var(--red); white-space: nowrap; }
.if-empty { margin: 0; padding: 18px 20px; background: var(--steel-50); border: 1px solid var(--steel-200); color: var(--ink-2); }

/* Spacing between text and the buttons that follow it */
.if-sec .if-ctas, .if-sec .ms-note + .if-ctas { margin-block-start: 28px; }
.if-sec .lp-head + .if-ctas { margin-block-start: 20px; }
.if-sec .btn { white-space: nowrap; }

@media (max-width: 1199px) {
  .if-sol-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1099px) {
  .if-art-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  .if-sol-grid, .if-art-grid { grid-template-columns: minmax(0, 1fr); }
  .if-tags-row { margin-inline: calc(-1 * var(--gutter, 16px)); padding-inline: var(--gutter, 16px); }
}
@media (prefers-reduced-motion: reduce) {
  .lp-hero.has-image::after { animation: none; }
  .if-sol-img img { transition: none; }
  .if-sol:hover .if-sol-img img { transform: none; }
}
