/* Åstveit Bilde og tekst — only var(--e-global-…) for colors/fonts. */
.as-mtext{ position:relative; overflow:hidden; isolation:isolate; background-color:var(--e-global-color-surfacealt); padding-block:clamp(20px, 3vw, 40px) calc(var(--as-section-y) + var(--as-ftr-ridge)); }
.as-mtext.no-foot{ padding-bottom:var(--as-section-y); }
.as-mtext .as-mtext__inner{ max-width:calc(1500px + 2 * var(--as-side)); margin-inline:auto; }
.as-mtext .as-mtext__grid{ display:grid; gap:clamp(32px, 5vw, 84px); align-items:center; }
.as-mtext.has-img .as-mtext__grid{ grid-template-columns:minmax(0, 5fr) minmax(0, 6fr); }
.as-mtext.has-img.is-right .as-mtext__grid{ grid-template-columns:minmax(0, 6fr) minmax(0, 5fr); }
.as-mtext.is-right .as-mtext__media{ order:2; }

.as-mtext .as-mtext__media{ position:relative; margin:0; }
.as-mtext .as-mtext__media img{ width:100%; aspect-ratio:4 / 5; object-fit:cover; border-radius:46% 54% 40% 60% / 38% 42% 58% 62%; box-shadow:var(--as-shadow); }
.as-mtext .as-mtext__ring{ position:absolute; z-index:-1; inset:-18px -18px auto auto; width:78%; height:78%; border-radius:50%; border:2px solid var(--e-global-color-border); }
.as-mtext .as-mtext__media::after{ content:""; position:absolute; z-index:-1; width:62%; height:62%; left:-12%; bottom:-10%; border-radius:50%; background:radial-gradient(closest-side, var(--e-global-color-accent), transparent); }

.as-mtext .as-mtext__card{ background:var(--e-global-color-surface); border:1px solid var(--e-global-color-border); border-radius:var(--as-radius-lg); padding:clamp(28px, 4.5vw, 60px); box-shadow:var(--as-shadow); }
.as-section.as-mtext .as-mtext__title{ margin:0; color:var(--e-global-color-text); }
.as-mtext .as-mtext__line{ display:block; width:96px; height:3px; margin:22px 0 26px; border-radius:3px; background:linear-gradient(90deg, var(--e-global-color-primary), var(--e-global-color-accent)); }
.as-section.as-mtext .as-mtext__body{ font-size:clamp(1.0625rem, 1rem + .2vw, 1.15rem); line-height:1.8; color:var(--e-global-color-text); }
.as-section.as-mtext .as-mtext__body p{ margin:0 0 1.1em; max-width:68ch; }
.as-section.as-mtext .as-mtext__body p:last-child{ margin-bottom:0; }
.as-section.as-mtext .as-mtext__body h3{ margin:1.6em 0 .6em; font-family:var(--e-global-typography-h4-font-family); font-size:var(--e-global-typography-h4-font-size); font-weight:var(--e-global-typography-h4-font-weight); line-height:var(--e-global-typography-h4-line-height); color:var(--e-global-color-text); }
.as-section.as-mtext .as-mtext__body a{
  position:relative; display:inline-flex; align-items:center; gap:14px; margin-top:6px; padding:14px 18px 14px 20px; border-radius:16px;
  background:linear-gradient(135deg, var(--e-global-color-accent), var(--e-global-color-hover)); border:1px solid var(--e-global-color-border);
  color:var(--e-global-color-text); font-weight:700; text-decoration:none; transition:border-color .2s, box-shadow .2s, background .2s;
}
.as-section.as-mtext .as-mtext__body a::after{ content:""; flex:none; width:32px; height:32px; border-radius:50%;
  background:var(--e-global-color-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E") center/16px no-repeat; transition:transform .2s; }
.as-section.as-mtext .as-mtext__body a:hover{ border-color:var(--e-global-color-primary); box-shadow:var(--as-shadow); background:var(--e-global-color-surface); color:var(--e-global-color-text); }
.as-section.as-mtext .as-mtext__body a:hover::after{ transform:translate(2px,-2px); }
@media (max-width:1024px){ .as-mtext.has-img .as-mtext__grid, .as-mtext.has-img.is-right .as-mtext__grid{ grid-template-columns:1fr; } .as-mtext.is-right .as-mtext__media{ order:0; } .as-mtext .as-mtext__media{ max-width:520px; } .as-mtext .as-mtext__media img{ aspect-ratio:4 / 3; } }
@media (max-width:640px){ .as-mtext .as-mtext__card{ padding:26px 22px; border-radius:var(--as-radius); } }
@media (prefers-reduced-motion: reduce){ .as-mtext a, .as-mtext a::after{ transition:none; } }
/* Rounded box image (lower, landscape) */
.as-mtext.is-rounded .as-mtext__grid{ align-items:stretch; }
.as-mtext.is-rounded.has-img .as-mtext__grid{ grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); }
.as-mtext.is-rounded .as-mtext__media img{ aspect-ratio:auto; height:100%; min-height:320px; max-height:460px; border-radius:var(--as-radius-lg); }
.as-mtext.is-rounded .as-mtext__ring{ display:none; }
.as-mtext.is-rounded .as-mtext__media::after{ width:40%; height:60%; left:-6%; bottom:-8%; }
.as-mtext.is-rounded .as-mtext__card{ display:flex; flex-direction:column; justify-content:center; }
@media (max-width:1024px){ .as-mtext.is-rounded.has-img .as-mtext__grid{ grid-template-columns:1fr; } .as-mtext.is-rounded .as-mtext__media{ max-width:none; } .as-mtext.is-rounded .as-mtext__media img{ height:auto; min-height:0; aspect-ratio:16 / 10; } }

/* Link rows: every link-only paragraph = one full-width row, same height, one line, full text (opt-in via CSS class as-mtext-linkrows — Forskning og utvikling "deltar i").
   Font shrinks only as much as needed so the longest link (~33em) fits on one line; phones wrap instead of cutting text. */
@media (min-width:1280px){ .as-mtext-linkrows .as-mtext.is-rounded.has-img .as-mtext__grid{ grid-template-columns:minmax(0, 2fr) minmax(0, 1fr); } }
@media (min-width:1025px) and (max-width:1279px){
  .as-mtext-linkrows .as-mtext.is-rounded.has-img .as-mtext__grid{ grid-template-columns:1fr; }
  .as-mtext-linkrows .as-mtext.is-right .as-mtext__media{ order:0; }
  .as-mtext-linkrows .as-mtext.is-rounded .as-mtext__media img{ height:auto; min-height:0; aspect-ratio:16 / 10; }
}
.as-mtext-linkrows .as-section.as-mtext .as-mtext__body{ container-type:inline-size; }
.as-mtext-linkrows .as-section.as-mtext .as-mtext__body p:has(> a:only-child){ max-width:none; margin-bottom:12px; }
.as-mtext-linkrows .as-section.as-mtext .as-mtext__body p:has(> a:only-child) > a{
  display:inline-flex; align-items:center; width:auto; max-width:100%; box-sizing:border-box; height:64px; margin-top:0; padding:0 66px 0 22px;
  font-size:clamp(15px, calc((100cqi - 90px) / 33), 1.15rem); line-height:1.2; white-space:nowrap;
}
.as-mtext-linkrows .as-section.as-mtext .as-mtext__body p:has(> a:only-child) > a::after{ position:absolute; right:16px; top:50%; transform:translateY(-50%); }
.as-mtext-linkrows .as-section.as-mtext .as-mtext__body p:has(> a:only-child) > a:hover::after{ transform:translate(2px, calc(-50% - 2px)); }
.as-mtext-linkrows .as-section.as-mtext .as-mtext__body h3{ margin-top:1.4em; }
@media (max-width:767px){
  .as-mtext-linkrows .as-section.as-mtext .as-mtext__body p:has(> a:only-child) > a{ height:auto; min-height:64px; padding-block:12px; white-space:normal; font-size:1.0625rem; }
}