/* Opt-in homepage presentation. Selection, publication and access remain with Joomla and module owners. */
body.mtn-site--home { background: #f7f4eb; }
.mtn-home { --mtn-home-section-gap: clamp(48px, 6.5vw, 88px); padding-block-end: clamp(48px, 6vw, 88px); }
.mtn-home__sections { display: grid; gap: var(--mtn-home-section-gap); padding-block-start: clamp(40px, 5vw, 64px); }
.mtn-home__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.mtn-home__pair--single { grid-template-columns: minmax(0, 1fr); }
/* Every position can contain several modules, independent of their content type. */
.mtn-home__slot { display: grid; gap: var(--mtn-home-section-gap); align-content: start; min-width: 0; container-type: inline-size; }
.mtn-home__module { display: flow-root; min-width: 0; }
.mtn-home__module > :first-child { margin-block-start: 0; }
.mtn-home__module > :last-child { margin-block-end: 0; }
.mtn-site--home #mtn-main .mtn-home__heading { margin: 0 0 28px; color: #205d51; font-size: clamp(1.4rem, 2.3vw, 1.8rem); line-height: 1.3; font-weight: 600; }
.mtn-home__impulse { min-width: 0; }
@media (max-width: 800px) {
  .mtn-home__pair { grid-template-columns: minmax(0, 1fr); row-gap: var(--mtn-home-section-gap); }
}

/* Native Joomla featured output only; no selectors reach the adjacent owner modules. */
.mtn-home__articles .blog-items { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; margin:0 0 24px; }
.mtn-home__articles .blog-item { display:flex; flex-direction:column; min-width:0; border:1px solid #e0e6df; border-radius:12px; overflow:hidden; background:#fff; }
.mtn-home__articles .item-image { float:none; margin:0; }
.mtn-home__articles .item-image img { display:block; width:100%; aspect-ratio:16/9; object-fit:cover; }
.mtn-home__articles .item-content { display:flex; flex-direction:column; flex:1; min-width:0; padding:24px; }
.mtn-home__articles .page-header h2, .mtn-home__articles .item-title { margin:0 0 16px; font-size:1.375rem; line-height:1.35; overflow-wrap:anywhere; }
.mtn-home__articles .page-header a, .mtn-home__articles .item-title a { color:inherit; text-decoration:none; }
.mtn-home__articles .article-info { margin:0 0 20px; font-size:.8125rem; color:#686758; }
.mtn-home__articles .article-info dd { margin:0 0 4px; }
.mtn-home__articles .article-info-term { display:none; }
.mtn-home__articles .readmore { margin-top:auto; padding-top:20px; }
.mtn-home__articles .readmore a { display:inline-flex; align-items:center; min-height:44px; padding:10px 16px; border:1px solid #205d51; border-radius:8px; color:#205d51; text-decoration:none; }
.mtn-home__articles .readmore a:hover { background:#205d51; color:#fff; }
.mtn-home__articles a:focus-visible { outline:2px solid #80620b; outline-offset:4px; }
.mtn-home__articles .items-more { margin-top:24px; }
@media(max-width:1000px) { .mtn-home__articles .blog-items { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:680px) { .mtn-home__articles .blog-items { grid-template-columns:minmax(0,1fr); } }

.mtn-home__articles .readmore .icon-chevron-right { display:none; }

/* Homepage presentation only. Native article data, links and owner layouts stay authoritative. */
body.mtn-site--home #mtn-main { padding-block-start: 0; }
.mtn-home .mod-articles-items { display: grid; gap: 24px; padding: 0; margin: 0; list-style: none; }
.mtn-home .mod-articles-items > li { min-width: 0; margin: 0; padding: 0; }
.mtn-home .mod-articles-item { overflow: hidden; border: 1px solid var(--mtn-border, #dce5de); border-radius: 12px; background: #fff; }
.mtn-home .mod-articles-item-content { display: flex; flex-direction: column; min-width: 0; padding: 24px; }
.mtn-home .mod-articles-title { margin: 0 0 16px; font-size: 1.375rem; line-height: 1.35; overflow-wrap: anywhere; }
.mtn-home .mod-articles-title a { color: var(--mtn-green, #205d51); text-decoration: none; }
.mtn-home .mod-articles-image { float: none; margin: 0 -24px 24px; }
.mtn-home .mod-articles-image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.mtn-home .mod-articles-item-content > p:not(.readmore) { max-width: 65ch; margin: 0 0 16px; }
.mtn-home .mod-articles-item-content > p:has(+ p):not(.readmore) { margin-block-end: 12px; }
.mtn-home .mod-articles-item-content > .readmore { margin: auto 0 0; padding-block-start: 8px; }
.mtn-home .mod-articles-item-content > .readmore a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--mtn-green, #205d51); border-radius: 8px; color: var(--mtn-green, #205d51); text-decoration: none; }
.mtn-home .mod-articles-item-content > .readmore a:hover { background: var(--mtn-green, #205d51); color: #fff; }
.mtn-home .mod-articles-item-content > .readmore .icon-chevron-right { display: none; }
.mtn-home .mod-articles-item a:focus-visible { outline: 2px solid var(--mtn-green, #205d51); outline-offset: 4px; }
.mtn-home__slot--home-bottom .mod-articles-item-content { display: grid; grid-template-columns: minmax(200px, 34%) minmax(0, 1fr); column-gap: 28px; align-content: center; }
.mtn-home__slot--home-bottom .mod-articles-image { grid-column: 1; grid-row: 1 / span 4; margin: -24px 0 -24px -24px; align-self: stretch; }
.mtn-home__slot--home-bottom .mod-articles-image a { display: block; height: 100%; }
.mtn-home__slot--home-bottom .mod-articles-image img { height: 100%; min-height: 240px; }
.mtn-home__slot--home-bottom .mod-articles-title,
.mtn-home__slot--home-bottom .mod-articles-item-content > p { grid-column: 2; }
.mtn-home .mtev-module--liste .mtev-card { grid-template-columns: minmax(220px, 32%) minmax(0, 1fr); align-items: stretch; height: auto; }
.mtn-home .mtev-module--liste .mtev-card__cover { aspect-ratio: auto; min-height: 220px; height: 100%; }
.mtn-home .mtev-module--liste .mtev-card__cover img { display: block; height: 100%; }
.mtn-home .mtev-card__body { gap: 16px; padding: 24px; min-width: 0; }
.mtn-home .mtev-card__meta { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; }
.mtn-home .mtev-card__meta-date { font-size: clamp(1.125rem, 2vw, 1.5rem); line-height: 1.35; letter-spacing: 0; color: var(--mtn-green, #205d51); }
.mtn-home .mtev-card h3 { margin: 0; font-size: 1.375rem; line-height: 1.35; }
.mtn-home .mtev-card__teaser { display: none; }
.mtn-home .mtev-card__footer { margin: 0; align-items: center; flex-wrap: wrap; }
.mtn-home .mtev-card__access { font-size: .9375rem; }
.mtn-home .mtev-card__footer > a { min-height: 44px; padding: 8px 0; }
.mtn-home .mt-pwa-install-help--compact { max-width: none; margin-inline: 0; width: 100%; grid-template-columns: 64px minmax(0, 1fr); gap: 24px; padding: 24px; border-radius: 12px; align-items: center; }
.mtn-home .mt-pwa-install-help--compact .mt-pwa-install-help__mark { width: 64px; color: var(--mtn-green, #205d51); line-height: 0; }
.mtn-home .mt-pwa-install-help--compact .mt-pwa-install-help__mark svg { display: block; width: 100%; height: auto; }
.mtn-home .mt-pwa-install-help--compact h2 { font-size: 1.25rem; line-height: 1.35; }
.mtn-home .mt-pwa-install-help--compact p { max-width: 65ch; margin-block-end: 12px; font-size: .9375rem; }
.mtn-home .mt-pwa-install-help--compact details { margin-block-start: 12px; }
.mtn-home .mt-pwa-install-help--compact summary { min-height: 44px; padding-block: 10px; font-size: .9375rem; }
@media (max-width: 680px) {
  .mtn-home__slot--home-bottom .mod-articles-item-content { display: flex; }
  .mtn-home__slot--home-bottom .mod-articles-image { margin: 0 -24px 24px; align-self: auto; }
  .mtn-home__slot--home-bottom .mod-articles-image img { min-height: 0; height: auto; }
  .mtn-home .mtev-module--liste .mtev-card { grid-template-columns: 1fr; }
  .mtn-home .mtev-module--liste .mtev-card__cover { aspect-ratio: 16 / 9; min-height: 0; height: auto; }
  .mtn-home .mtev-card__footer { flex-direction: row; justify-content: space-between; }
  .mtn-home .mt-pwa-install-help--compact { grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 20px 16px; }
  .mtn-home .mt-pwa-install-help--compact .mt-pwa-install-help__mark { width: 44px; }
}
/* A native article module in the paired row gets its own clear section heading. */
@supports selector(:has(*)) {
  .mtn-home__pair .moduletable:has(> .mod-articles-items) { padding: 24px; border: 1px solid var(--mtn-border, #dce5de); border-radius: 12px; background: #fff; }
  .mtn-home__pair .moduletable > .mod-articles-items .mod-articles-item { border: 0; border-radius: 0; overflow: visible; }
  .mtn-home__pair .moduletable > .mod-articles-items .mod-articles-item-content { padding: 0; }
  .mtn-home__pair .moduletable > .mod-articles-items .mod-articles-image { margin-inline: 0; }
}
.mtn-site--home #mtn-main .mtn-home__pair .moduletable > .mtn-home__heading { margin: 0 0 20px; font-size: 1.5rem; line-height: 1.3; }
.mtn-home .mtm-module__header h2,
.mtn-home .mtp-module__header h2,
.mtn-home .mtev-module__header h2 { font-size: 1.5rem; line-height: 1.3; }
/* Separate content rows are explicitly selected in the template style. */
.mtn-home__pair--rows { grid-template-columns: minmax(0, 1fr); gap: var(--mtn-home-section-gap); }
.mtn-home__pair--rows .moduletable:has(> .mod-articles-items) { padding: 0; border: 0; background: transparent; }
.mtn-home__pair--rows .moduletable > .mod-articles-items .mod-articles-item { border: 1px solid var(--mtn-border, #dce5de); border-radius: 12px; overflow: hidden; }
.mtn-home__pair--rows .moduletable > .mod-articles-items .mod-articles-item-content { padding: 24px; }
.mtn-home__pair--rows .moduletable > .mod-articles-items .mod-articles-image { margin: -24px -24px 24px; }
.mtn-home .mtn-home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.mtn-home .mtn-home-cards > li { max-width: 580px; width: 100%; }
.mtn-home .mtn-home-cards .mod-articles-image { margin-block-start: -24px; }
.mtn-home .mtn-home-cards .mod-articles-item-content { display: flex; }
.mtn-home .mtn-home-cards .mod-articles-image { grid-column: auto; grid-row: auto; align-self: auto; margin: -24px -24px 24px; }
.mtn-home .mtn-home-cards .mod-articles-image img { min-height: 0; height: auto; aspect-ratio: 16 / 9; }
/* ID specificity intentionally wins over the content-aware module styles. */
body.mtn-site--home #mtn-main .mtn-home__heading,
body.mtn-site--home #mtn-main .moduletable > h2,
body.mtn-site--home #mtn-main :is(.mtm-module__header, .mtp-module__header, .mtev-module__header, .mti-module__header) h2 {
  font-size: 1.5rem; font-weight: 600; line-height: 1.3; color: var(--mtn-green, #205d51); margin: 0;
}
body.mtn-site--home #mtn-main .mtn-home__heading,
body.mtn-site--home #mtn-main .moduletable > h2 { margin-block-end: 24px; }
body.mtn-site--home #mtn-main :is(.mtm-module__header, .mtp-module__header, .mtev-module__header, .mti-module__header) { margin-block-end: 24px; }
body.mtn-site--home #mtn-main .mtn-home__impulse .mti-module .mt-impulse .mt-impulse__title { margin-block-end: 16px; font-size: clamp(1.375rem, 2.4vw, 1.75rem); line-height: 1.3; }
/* One outer surface per content card. Module headings sit outside it. */
body.mtn-site--home #mtn-main .mtm-module--homepage .mtm-module__shell,
body.mtn-site--home #mtn-main .mti-module__shell { padding: 0; border: 0; background: transparent; box-shadow: none; }
.mtn-home .mtm-module--homepage .mtm-module-card { height: auto; box-shadow: none; }
.mtn-home .mtm-module--homepage .mtm-module-card__body { min-height: 0; padding: 24px; gap: 12px; }
.mtn-home .mtm-module--homepage .mtm-module-card h3 { margin: 0; font-size: 1.375rem; line-height: 1.35; overflow-wrap: anywhere; }
.mtn-home .mtm-module--homepage .mtm-module-card__subtitle { margin: 0; }
.mtn-home .mtm-module--homepage .mtm-module-card__footer { flex-wrap: wrap; gap: 16px; }
.mtn-home .mtm-module--homepage .mtm-module__all,
.mtn-home .mtm-module--homepage .mtm-module-card__action { display: inline-flex; min-height: 44px; padding: 10px 16px; border: 1px solid var(--mtn-green, #205d51); border-radius: 8px; color: var(--mtn-green, #205d51); text-decoration: none; align-items: center; font-size: .9375rem; font-weight: 600; }
.mtn-home .mtm-module--homepage .mtm-module__all > span { display: none; }
.mtn-home .mtm-module--homepage .mtm-module__all:hover,
.mtn-home .mtm-module--homepage .mtm-module-card:hover .mtm-module-card__action,
.mtn-home .mtm-module--homepage .mtm-module-card:focus-within .mtm-module-card__action { background: var(--mtn-green, #205d51); color: #fff; }
.mtn-home .mtm-module--homepage .mtm-module__header { gap: 16px; align-items: center; flex-wrap: wrap; }
@media (min-width: 801px) {
  .mtn-home__pair--rows .mtm-module--homepage .mtm-module__items > .mtm-module__item:only-child { grid-column: 1 / -1; }
  .mtn-home__pair--rows .mtm-module--homepage .mtm-module__item:only-child .mtm-module-card { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); }
  .mtn-home__pair--rows .mtm-module--homepage .mtm-module__item:only-child .mtm-module-card__cover { aspect-ratio: 16 / 10; min-height: 240px; height: 100%; }
}
@media (max-width: 800px) {
  .mtn-home .mtm-module--homepage .mtm-module-card { display: block; }
  .mtn-home .mtm-module--homepage .mtm-module-card__cover { aspect-ratio: 16 / 9; min-height: 0; }
}

@media (max-width: 680px) { .mtn-home .mtn-home-cards { grid-template-columns: minmax(0, 1fr); } }

/* Short, image-free impulses follow their content rather than a hero minimum height. */
body.mtn-site--home #mtn-main .mtn-home__impulse .mti-module .mt-impulse--feature:not(.mt-impulse--has-image) { min-height: 0; height: auto; }
body.mtn-site--home #mtn-main .mtn-home__impulse .mti-module .mt-impulse--feature:not(.mt-impulse--has-image) .mt-impulse__content { padding: 24px; height: auto; min-height: 0; }
@media (max-width: 800px) {
  body.mtn-site--home #mtn-main .mtm-module--homepage .mtm-module__header { align-items: flex-start; text-align: start; }
  body.mtn-site--home #mtn-main .mtm-module--homepage .mtm-module__heading { text-align: start; }
}

/* Homepage card typography: one role scale across existing owner renderers. */
.mtn-home {
  --mtn-home-card-title-size: 1.375rem;
  --mtn-home-card-body-size: 1rem;
  --mtn-home-card-meta-size: .875rem;
  --mtn-home-card-action-size: .9375rem;
}
body.mtn-site--home #mtn-main :is(
  .mtn-home__articles .page-header h2,
  .mtn-home__articles .item-title,
  .mod-articles-title,
  .mtp-card h3,
  .mtm-module-card h3,
  .mtev-card h3
) {
  font-family: var(--mtn-font, inherit);
  font-size: var(--mtn-home-card-title-size);
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
body.mtn-site--home #mtn-main :is(.mtp-card__meta, .mtm-module-card__meta, .mtev-card__meta) {
  font-size: var(--mtn-home-card-meta-size);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .04em;
}
/* Keep the separately accepted prominent event date weight. */
body.mtn-site--home #mtn-main .mtev-card__meta-date { font-weight: 800; }
body.mtn-site--home #mtn-main :is(.mtp-card__date, .mtm-module-card__access, .mtev-card__access) {
  font-size: var(--mtn-home-card-meta-size);
  font-weight: 600;
  line-height: 1.5;
}
body.mtn-site--home #mtn-main :is(
  .mtp-card__description,
  .mtm-module-card__subtitle,
  .mtm-module-card__summary,
  .mod-articles-item-content > p:not(.readmore),
  .mtn-home__articles .item-content > p:not(.readmore)
) {
  font-size: var(--mtn-home-card-body-size);
  font-weight: 400;
  line-height: 1.65;
  max-inline-size: 65ch;
  overflow-wrap: anywhere;
}
body.mtn-site--home #mtn-main :is(
  .mtp-card__cta,
  .mtm-module-card__action,
  .mtev-card__footer > a,
  .mod-articles-item-content > .readmore a,
  .mtn-home__articles .readmore a
) {
  font-size: var(--mtn-home-card-action-size);
  font-weight: 600;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}
