/* Constructor 1.3: scoped corrections; no overrides of the site's global .row/img/header. */
.constructor-field-image:not(.h-100) { max-width: 100%; height: auto; }
.constructor-gallery-content { max-width: 100%; min-width: 0; }
.cfgallery .gallery-item { min-width: 0; }
.cfgallery .img-cfgallery { max-width: 100%; }
.cfgallery .gallery-item img { max-width: 100%; height: auto; }
.constructor-accordion-toggle { display: flex; align-items: center; gap: .75rem; width: 100%; font-family: inherit; text-align: inherit; }
.constructor-accordion-toggle .title { min-width: 0; }
.constructor-accordion-toggle .accicon { flex: none; margin-left: auto; }
.constructor-accordion-toggle .accicon > span { display: inline-block; }
.constructor-accordion-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.constructor_forms:empty { display: none; }
@supports (-webkit-touch-callout: none) {
    .constructor.constructor-parallax { background-attachment: scroll !important; }
    .cfgallery .gallery-item .img-fluid { height: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
    .constructor.constructor-parallax { background-attachment: scroll !important; }
    .constructor .marquee_block, .constructor .marquee_clone { animation: none !important; transition: none !important; }
}

/* Private Constructor form renderer: never styles other CMS forms. */
.constructor-form--hide-labels label { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.constructor-form--hide-labels .field:not(:first-child) { margin-top:30px!important; }
.constructor-form--rounded .form-control { border-radius:50rem!important; }

/* Horizontal Constructor forms: a preset, not a free-form page builder.
   Scoped to this renderer; tabbed/AJAX forms continue using their native layout. */
@media (min-width: 992px) {
    .constructor-form--horizontal {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 1rem;
        align-items: end;
    }
    .constructor-form--horizontal > .form-tabs { min-width: 0; }
    .constructor-form--horizontal > .form-tabs > .tab > fieldset {
        display: flex;
        flex-wrap: wrap;
        align-items: end;
        gap: .75rem;
        min-width: 0;
    }
    .constructor-form--horizontal > .form-tabs > .tab > fieldset > .field,
    .constructor-form--horizontal > .form-tabs > .tab > fieldset > [id^="f_"] {
        flex: 1 1 170px;
        width: auto !important;
        min-width: 0;
        margin-top: 0 !important;
    }
    .constructor-form--horizontal > .buttons {
        margin: 0 !important;
        align-self: end;
    }
    .constructor-form--horizontal > .buttons .button-submit {
        width: auto !important;
        min-width: 145px;
        margin: 0 !important;
    }
}
@media (max-width: 991.98px) {
    .constructor-form--horizontal > .buttons { width: 100%; }
}

/* Scoped controls for galleries nested in Adaptive and Mainblock. */
.constructor-gallery-toolbar { display: flex; justify-content: flex-end; gap: .5rem; margin-bottom: .625rem; }
.constructor-gallery-control {
    border: 1px solid currentColor; border-radius: .35rem;
    background: transparent; color: inherit; min-width: 2.4rem; min-height: 2.4rem;
    font: inherit; cursor: pointer; display: inline-flex;
    align-items: center; justify-content: center;
}
.constructor-gallery-control:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Opt-in button glint. Isolated to Constructor buttons; no theme overrides. */
.constructor-btn-shine { position: relative; overflow: hidden; isolation: isolate; }
.constructor-btn-shine::after {
    content: ""; pointer-events: none; position: absolute; inset: 0;
    width: 35%; height: 100%; top: 0; left: -55%;
    background: linear-gradient(95deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-25deg) translateX(0);
    animation: constructor-btn-glint 5s ease-in-out infinite;
}
@keyframes constructor-btn-glint {
    0%, 18% { transform: skewX(-25deg) translateX(0); }
    40%, 100% { transform: skewX(-25deg) translateX(470%); }
}
@media (prefers-reduced-motion: reduce) {
    .constructor-btn-shine::after { animation: none; opacity: 0; }
}

/* Mainblock opt-in background slider. No impact on existing backgrounds. */
.constructor.main_block .constructor-hero-background {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.constructor.main_block .constructor-hero-slide {
    position: absolute; inset: 0; opacity: 0;
    background-position: center; background-size: cover; background-repeat: no-repeat;
    transform: scale(1); transition: opacity 1.1s ease-in-out;
}
.constructor.main_block .constructor-hero-slide.is-active { opacity: 1; }
.constructor.main_block .constructor-hero-slide.is-zooming {
    animation: constructor-hero-zoom var(--constructor-hero-interval, 8000ms) linear both;
}
.constructor.main_block .constructor-hero-overlay {
    position: absolute; inset: 0; pointer-events: none;
}
@keyframes constructor-hero-zoom {
    from { transform: scale(1); }
    to { transform: scale(1.12); }
}
@media (max-width: 767.98px), (prefers-reduced-motion: reduce) {
    .constructor.main_block .constructor-hero-slide { animation: none !important; transition: none !important; transform: none !important; }
}

/* Opt-in larger button typography. No fixed height/width or global .btn override. */
.btn.constructor-button-xl { font-size: 1.375rem; }
.btn.constructor-button-max { font-size: 1.5rem; }
