/* mod_mlarticles — article display, 6 styles. Uses NovaFlex tokens with fallbacks. */
.mla{--mla-cols:3;--mla-gap:20px;--mla-ratio:16/9;}
.mla *{box-sizing:border-box;}
.mla img{display:block;width:100%;height:auto;}
.mla a{text-decoration:none;color:inherit;}

/* shared atoms */
.mla-media{display:block;overflow:hidden;border-radius:var(--nf-radius,12px);}
.mla-media img{aspect-ratio:var(--mla-ratio,16/9);object-fit:cover;transition:transform .4s ease;}
.mla-media:hover img{transform:scale(1.04);}
.mla-cat{display:inline-block;font-size:.72rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--nf-primary,#2f8f3f);margin-bottom:.15rem;}
.mla-title{font-family:var(--nf-font-heading,inherit);font-weight:700;font-size:1.12rem;line-height:1.3;margin:.15rem 0 0;color:var(--nf-text,#16313f);}
.mla-title a:hover{color:var(--nf-primary,#2f8f3f);}
/* Site template heading rules (.nf-main h2/h3) inject large top/bottom margins
   on the title tag; pin it tight regardless of which heading tag is chosen. */
.mla .mla-title{margin:0 0 .35rem !important;}
.mla-meta{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem;color:var(--nf-muted,#5f7280);font-size:.82rem;margin-top:.4rem;}
.mla-meta-sep{opacity:.5;}
.mla-intro{color:var(--nf-muted,#5f7280);font-size:.92rem;line-height:1.55;margin:.5rem 0 0;}
.mla-more{display:inline-flex;align-items:center;gap:.35rem;margin-top:.7rem;font-weight:600;font-size:.85rem;color:var(--nf-primary,#2f8f3f);}
.mla-more svg{width:15px;height:15px;transition:transform .15s;}
.mla-more:hover svg{transform:translateX(3px);}

/* ---- Cards (grid) ---- */
.mla-grid{display:grid;grid-template-columns:repeat(var(--mla-cols,3),minmax(0,1fr));gap:var(--mla-gap,20px);}
.mla-card{display:flex;flex-direction:column;background:var(--nf-bg,#fff);border:1px solid var(--nf-border,#e7edf0);border-radius:var(--nf-radius,12px);overflow:hidden;transition:transform .18s,box-shadow .18s;}
.mla-card:hover{transform:translateY(-4px);box-shadow:var(--nf-shadow-lg,0 12px 34px rgba(15,43,62,.10));}
.mla-card .mla-media{border-radius:0;}
.mla-card-body{padding:1rem 1.1rem 1.2rem;display:flex;flex-direction:column;}

/* ---- List (media left) ---- */
.mla-listing{display:flex;flex-direction:column;}
.mla-listing .mla-row{padding:22px 0;border-bottom:1px dotted var(--nf-border,#cbd5dd);}
.mla-listing .mla-row:first-child{padding-top:0;}
.mla-listing .mla-row:last-child{padding-bottom:0;border-bottom:0;}
.mla-row{display:grid;grid-template-columns:minmax(0,260px) 1fr;gap:1.2rem;align-items:start;}
.mla-row-body{display:flex;flex-direction:column;}
@media(max-width:560px){.mla-row{grid-template-columns:1fr;}}

/* ---- Magazine (lead + side) ---- */
.mla-mag{display:grid;grid-template-columns:var(--mla-mag-cols,1fr 1fr);gap:var(--mla-gap,20px);align-items:start;}
.mla-mag-media img{aspect-ratio:16/10;}
.mla-mag-body{padding-top:.8rem;display:flex;flex-direction:column;}
.mla-mag-lead .mla-title{font-size:clamp(1.3rem,2.5vw,1.7rem);}
.mla-mag-side{display:flex;flex-direction:column;gap:1rem;}
.mla-mini{display:grid;grid-template-columns:120px 1fr;gap:.95rem;align-items:center;}
.mla-mini-media img{aspect-ratio:1/1;}
.mla-mini .mla-title{font-size:.98rem;margin:0 !important;}
@media(max-width:780px){.mla-mag{grid-template-columns:1fr;}}

/* ---- Carousel ---- */
.mla-carousel{position:relative;}
.mla-track{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - (var(--mla-cols) - 1) * var(--mla-gap)) / var(--mla-cols));gap:var(--mla-gap,20px);overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;padding-bottom:.4rem;scrollbar-width:thin;}
.mla-slide{scroll-snap-align:start;}
.mla-car-arrow{position:absolute;top:38%;transform:translateY(-50%);z-index:3;width:42px;height:42px;border-radius:50%;border:1px solid var(--nf-border,#e7edf0);background:var(--nf-bg,#fff);color:var(--nf-text,#16313f);cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--nf-shadow-lg,0 12px 34px rgba(15,43,62,.10));}
.mla-car-arrow svg{width:20px;height:20px;}
.mla-car-prev{left:-8px;}
.mla-car-next{right:-8px;}
.mla-car-arrow[disabled]{opacity:.3;cursor:default;}
.mla-car-dots{display:flex;justify-content:center;gap:.4rem;margin-top:.8rem;}
.mla-car-dots button{width:9px;height:9px;border-radius:50%;border:0;background:var(--nf-border,#cbd5dd);cursor:pointer;padding:0;}
.mla-car-dots button.is-active{background:var(--nf-primary,#2f8f3f);}
.mla-track::-webkit-scrollbar{height:6px;}
.mla-track::-webkit-scrollbar-thumb{background:var(--nf-border,#cbd5dd);border-radius:6px;}
@media(max-width:780px){.mla-track{grid-auto-columns:82%;}.mla-car-arrow{display:none;}}

/* ---- Overlay ---- */
.mla-grid--overlay{grid-template-columns:repeat(var(--mla-cols,3),minmax(0,1fr));}
.mla-ov{position:relative;display:flex;align-items:flex-end;min-height:260px;border-radius:var(--nf-radius,12px);overflow:hidden;background-size:cover;background-position:center;background-color:#1a2b36;color:#fff;transition:transform .18s;}
.mla-ov:hover{transform:translateY(-3px);}
.mla-ov-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(11,30,43,0) 30%,rgba(11,30,43,.85) 100%);}
.mla-ov-inner{position:relative;z-index:2;padding:1.1rem;display:flex;flex-direction:column;}
.mla-ov .mla-title{color:#fff;font-size:1.15rem;}
.mla-ov .mla-cat{color:#fff;opacity:.92;}
.mla-ov .mla-meta{color:rgba(255,255,255,.82);}

/* ---- Compact ---- */
.mla-compact{list-style:none;margin:0;padding:0;border-top:1px solid var(--nf-border,#e7edf0);}
.mla-cx{border-bottom:1px solid var(--nf-border,#e7edf0);}
.mla-cx-link{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;padding:.7rem .2rem;transition:background .15s;}
.mla-cx-link:hover{background:var(--nf-surface,#f4f6f8);}
.mla-cx-title{font-family:var(--nf-font-heading,inherit);font-weight:600;font-size:.98rem;color:var(--nf-text,#16313f);line-height:1.35;}
.mla-cx-link:hover .mla-cx-title{color:var(--nf-primary,#2f8f3f);}
.mla-cx-date{flex:0 0 auto;color:var(--nf-muted,#5f7280);font-size:.8rem;white-space:nowrap;}

/* ---- Grid responsiveness ---- */
@media(max-width:980px){.mla-grid,.mla-grid--overlay{grid-template-columns:repeat(var(--mla-cols-m,2),minmax(0,1fr));gap:var(--mla-gap-m,var(--mla-gap,20px));}}

@media (prefers-reduced-motion:reduce){
	.mla-media img,.mla-card,.mla-ov,.mla-notice,.mla-more svg{transition:none;}
	.mla-track{scroll-behavior:auto;}
}

/* ---- Read more as button: inherits the active template button (.nf-btn-primary)
       so it matches the site's other buttons (e.g. header CTA). mla-btn = layout only. ---- */
.mla-btn{display:inline-flex;align-items:center;gap:.45rem;align-self:flex-start;margin-top:.85rem;text-decoration:none}
.mla-btn svg{width:15px;height:15px;transition:transform .15s}
.mla-btn:hover svg{transform:translateX(3px)}

/* ---- Module footer link/button (e.g. "Older news") ---- */
.mla-footer{display:flex;justify-content:center;margin-top:1.4rem}
.mla-footer .mla-foot{align-self:auto;margin-top:0}
.mla-footer .mla-more.mla-foot{margin-top:0}

/* Keep button text on one line + consistent arrow (read-more + footer) */
.mla-btn,.mla-cta{white-space:nowrap}
.mla-cta{display:inline-flex;align-items:center;gap:.45rem;text-decoration:none}
.mla-btn svg,.mla-cta svg{flex:0 0 auto;width:15px;height:15px;transition:transform .15s}
.mla-btn:hover svg,.mla-cta:hover svg{transform:translateX(3px)}
.mla-footer .mla-cta{align-self:auto;margin-top:0}

/* ---- Section header (above the items) ---- */
.mla-header{display:flex;align-items:flex-end;justify-content:space-between;gap:.8rem 1.4rem;flex-wrap:wrap;margin:0 0 1.4rem;}
.mla-header__main{min-width:0;}
.mla-header__kicker{display:block;font-size:.72rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--nf-primary,#2f8f3f);margin-bottom:.25rem;}
.mla-header__title{font-family:var(--nf-font-heading,inherit);font-weight:800;font-size:clamp(1.25rem,2.6vw,1.75rem);line-height:1.2;margin:0;color:var(--nf-heading,#15396b);}
.mla-header__sub{margin:.4rem 0 0;color:var(--nf-muted,#5f7280);font-size:.95rem;line-height:1.5;max-width:60ch;}
.mla-header__link{display:inline-flex;align-items:center;gap:.4rem;flex:0 0 auto;font-weight:600;font-size:.9rem;color:var(--nf-primary,#2f8f3f);white-space:nowrap;}
.mla-header__link svg{width:16px;height:16px;transition:transform .15s;}
.mla-header__link:hover svg{transform:translateX(3px);}
.mla-header.has-rule:not(.mla-header--band){border-bottom:1px solid var(--nf-border,#e7edf0);padding-bottom:.9rem;}
.mla-header--underline .mla-header__title::after,.mla-header--centered .mla-header__title::after{content:"";display:block;width:52px;height:3px;border-radius:3px;background:var(--nf-primary,#2f8f3f);margin-top:.55rem;}
.mla-header--accent .mla-header__main{border-left:4px solid var(--nf-primary,#2f8f3f);padding-left:.9rem;}
.mla-header--centered{flex-direction:column;align-items:center;text-align:center;}
.mla-header--centered .mla-header__sub{margin-left:auto;margin-right:auto;}
.mla-header--centered .mla-header__title::after{margin-left:auto;margin-right:auto;}
.mla-header--band{background:var(--nf-surface,#f4f6f8);border:1px solid var(--nf-border,#e7edf0);border-left:4px solid var(--nf-primary,#2f8f3f);border-radius:var(--nf-radius,12px);padding:.95rem 1.2rem;align-items:center;}
@media(max-width:560px){.mla-header__link{font-size:.85rem;}}

/* Notice grid — image-less cards for tenders & announcements */
.mla-notice{display:flex;flex-direction:column;height:100%;background:var(--nf-bg,#fff);border:1px solid var(--nf-border,#e7edf0);border-radius:var(--nf-radius,12px);padding:1.1rem 1.15rem 1.2rem;transition:transform .18s,box-shadow .18s,border-color .18s;}
.mla-notice:hover{transform:translateY(-4px);border-color:var(--nf-primary,#2f8f3f);box-shadow:var(--nf-shadow-lg,0 12px 34px rgba(15,43,62,.10));}
.mla-notice__head{display:flex;align-items:center;gap:.55rem;margin-bottom:.55rem;}
.mla-notice__icon{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:9px;background:color-mix(in srgb,var(--nf-primary,#2f8f3f) 12%,transparent);color:var(--nf-primary,#2f8f3f);}
.mla-notice__icon svg{width:18px;height:18px;}
.mla-notice__head .mla-cat{margin:0;}
.mla-notice__head .mla-meta{margin:0 0 0 auto;}
.mla--notice .mla-title{color:var(--nf-heading,#15396b);}
.mla--notice .mla-intro{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}
.mla--notice .mla-more{margin-top:auto;padding-top:.7rem;}

/* Magazine: overlay lead (title over image) */
.mla-mag--overlay{align-items:stretch;}
.mla-mag-lead--overlay{position:relative;display:block;height:100%;min-height:260px;border-radius:var(--nf-radius,12px);overflow:hidden;background:var(--nf-heading,#15396b);text-decoration:none;}
.mla-mag-leadimg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.mla-mag-lead--overlay::after{content:"";position:absolute;inset:0;background:linear-gradient(to top,rgba(12,24,48,.94) 0%,rgba(12,24,48,.82) 16%,rgba(12,24,48,.5) 42%,rgba(12,24,48,.16) 68%,transparent 90%);}
.mla-mag-cap{position:absolute;left:0;right:0;bottom:0;z-index:2;padding:1.15rem 1.2rem 1.25rem;}
.mla-mag-lead--overlay .mla-cat{display:inline-block;margin:0 0 .4rem;color:#fff;background:rgba(255,255,255,.2);padding:.12rem .6rem;border-radius:999px;}
.mla-mag-lead--overlay .mla-meta{color:rgba(255,255,255,.82);margin:.1rem 0 .45rem;}.mla-mag-lead--overlay .mla-title{color:#fff;font-size:clamp(1.2rem,2.3vw,1.65rem);margin:0 0 .35rem !important;}
.mla-mag-lead--overlay .mla-intro{margin:0;color:rgba(255,255,255,.92);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
