/* CMS infoblock and photo widget are independently editable and positioned by the layout. */
.ilmarimed-theme .ilm-home-overview-text { display:flex; flex-direction:column; align-items:flex-start; gap:24px; height:100%; color:var(--ilm-brown); }
.ilmarimed-theme .ilm-home-overview-text__eyebrow { font-size:14px; line-height:20px; }
.ilmarimed-theme .ilm-home-overview-text__title { margin:0; font-size:38px; line-height:42px; font-weight:600; }
.ilmarimed-theme .ilm-home-overview-text__body { max-width:620px; font-size:16px; line-height:22px; color:var(--ilm-ink); }
.ilmarimed-theme .ilm-home-overview-text__body p { margin:0 0 18px; }
.ilmarimed-theme .ilm-home-overview-text__body p:last-child { margin-bottom:0; }
.ilmarimed-theme .ilm-home-overview-text .btn { margin-top:auto; }
.ilmarimed-theme .ilm-home-overview-text__image { width:100%; margin:0; }
.ilmarimed-theme .ilm-home-overview-text__image img { display:block; width:100%; height:auto; max-width:100%; border-radius:20px; }
.ilmarimed-theme .ilm-home-overview-text__image figcaption, .ilmarimed-theme .ilm-home-overview-text__caption { margin-top:10px; font-size:14px; }
/* Optional display choice: leave the CMS image untouched, omit it from this layout. */
.ilmarimed-theme .ilm-overview-copy--without-image .ilm-home-overview-text__image,
.ilmarimed-theme .ilm-overview-copy--without-image .ilm-home-overview-text__caption { display:none; }
.ilmarimed-theme .ilm-overview-copy .edit_wlinks { top:4px; right:16px; bottom:auto; left:auto; transform:none; }
.ilmarimed-theme .ilm-home-overview-gallery { min-width:0; }
.ilmarimed-theme .ilm-home-overview-gallery__slider { position:relative; overflow:hidden; border-radius:20px; }
.ilmarimed-theme .ilm-home-overview-gallery__slider .widget-photos-slider__item { display:block; position:relative; width:100%; padding:0; }
.ilmarimed-theme .ilm-home-overview-gallery__slider .widget-photos-slider__image { width:100%; height:auto; padding:0; aspect-ratio:650 / 615; overflow:hidden; }
.ilmarimed-theme .ilm-home-overview-gallery__slider .widget-photos-slider__image > img { display:block; position:static; transform:none; width:100%; height:100%; object-fit:cover; }
.ilmarimed-theme .ilm-home-overview-gallery__slider .slick-dots { position:absolute; left:0; right:0; bottom:14px; display:flex !important; justify-content:center; align-items:center; gap:7px; margin:0; padding:0; list-style:none; }
.ilmarimed-theme .ilm-home-overview-gallery__slider .slick-dots li { margin:0; padding:0; }
.ilmarimed-theme .ilm-home-overview-gallery__slider .slick-dots button { display:block; width:9px; height:9px; padding:0; overflow:hidden; border:0; border-radius:50%; background:#fff; color:transparent; font-size:0; }
.ilmarimed-theme .ilm-home-overview-gallery__slider .slick-dots button::before,
.ilmarimed-theme .ilm-home-overview-gallery__slider .slick-dots button::after { content:none !important; display:none !important; }
.ilmarimed-theme .ilm-home-overview-gallery__slider .slick-dots .slick-active button { background:var(--ilm-brown); }
/* Pair the two existing widgets only when both marker classes are configured.
   Other home widgets remain full-width in the existing flex ordering. */
.ilmarimed-theme:has(.widget-main-slider) main > div > .ilm-overview-copy,
.ilmarimed-theme:has(.widget-main-slider) main > div > .ilm-overview-gallery-widget { order:25; min-width:0; }
@media(min-width:768px) {
 .ilmarimed-theme:has(.widget-main-slider) #page-wrapper > main > div:has(> .ilm-overview-copy):has(> .ilm-overview-gallery-widget) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
 .ilmarimed-theme:has(.widget-main-slider) main > div:has(> .ilm-overview-copy):has(> .ilm-overview-gallery-widget) > .ilm-widget-services { padding-bottom:30px !important; }
 .ilmarimed-theme:has(.widget-main-slider) main > div:has(> .ilm-overview-copy):has(> .ilm-overview-gallery-widget) > * { grid-column:1 / -1; min-width:0; }
 .ilmarimed-theme:has(.widget-main-slider) main > div:has(> .ilm-overview-copy):has(> .ilm-overview-gallery-widget) > .ilm-overview-copy { grid-column:1; padding-top:60px !important; padding-bottom:60px !important; }
 .ilmarimed-theme:has(.widget-main-slider) main > div:has(> .ilm-overview-copy):has(> .ilm-overview-gallery-widget) > .ilm-overview-gallery-widget { grid-column:2; padding-top:60px !important; padding-bottom:60px !important; }
 .ilmarimed-theme .ilm-overview-copy > .widget__wrap.container { width:100%; max-width:720px; margin-left:auto; margin-right:0; padding-left:60px; padding-right:10px; }
 .ilmarimed-theme .ilm-overview-gallery-widget > .widget__wrap.container { width:100%; max-width:720px; margin-left:0; margin-right:auto; padding-left:10px; padding-right:60px; }
}
@media(max-width:767.98px) {
 .ilmarimed-theme .ilm-home-overview-text { gap:18px; }
 .ilmarimed-theme .ilm-home-overview-text__title { font-size:28px; line-height:33px; }
 .ilmarimed-theme .ilm-home-overview-gallery__slider .widget-photos-slider__image { aspect-ratio:1 / 1; }
 .ilmarimed-theme:has(.widget-main-slider) main .widget.ilm-overview-copy { padding-bottom:15px !important; }
 .ilmarimed-theme:has(.widget-main-slider) main .widget.ilm-overview-gallery-widget { padding-top:15px !important; }
}
