/* Accessible controls, retaining the existing theme layout. */
.meliorem-keyboard-control:focus-visible,
.meliorem-dialog-close:focus-visible,
.popup_catalog input:focus-visible,
.popup_catalog textarea:focus-visible,
.popup_catalog button:focus-visible,
.popup_catalog a:focus-visible {
    outline: 2px solid #007a9f;
    outline-offset: 4px;
}
.wpcf7 .wpcf7-acceptance input[type="checkbox"] {
    display: inline-block !important;
    position: static;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin: 1px 0 0;
    padding: 0;
    opacity: 1;
    vertical-align: top;
    accent-color: #1b1b1b;
    cursor: pointer;
    clip-path: none;
}
.wpcf7 .wpcf7-acceptance label {
    position: relative;
    display: inline-flex !important;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}
.wpcf7 .wpcf7-acceptance .wpcf7-list-item-label,
.wpcf7 .wpcf7-acceptance .wpcf7-list-item-label > span {
    display: block;
    position: static;
    margin: 0;
    padding: 0;
}
.wpcf7 .wpcf7-acceptance .wpcf7-list-item-label::before,
.wpcf7 .wpcf7-acceptance .wpcf7-list-item-label::after,
.wpcf7 .wpcf7-acceptance .wpcf7-list-item-label > span::before,
.wpcf7 .wpcf7-acceptance .wpcf7-list-item-label > span::after {
    content: none !important;
    display: none !important;
}
.wpcf7 .wpcf7-acceptance label:focus-within {
    outline: 2px solid #007a9f;
    outline-offset: 5px;
}
.popup_catalog.popup.open,
.sent.popup.open { z-index: 100002; }
.popup_catalog > .flex > .box,
.sent.popup > .flex > .box {
    position: relative;
    padding-top: 64px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
}
.meliorem-dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #aaa;
    border-radius: 50%;
    background: #fff;
    color: #222;
    font: 30px/1 Arial, sans-serif;
    cursor: pointer;
    z-index: 2;
}
.popup > .flex > .box > button.meliorem-dialog-close,
.popup_catalog > .flex > .box > button.meliorem-dialog-close,
.sent.popup > .flex > .box > button.meliorem-dialog-close {
    top: 16px !important;
    right: 16px !important;
    transform: none !important;
    margin: 0 !important;
}
.f-v__title,
h2.subtitle-section:not(:where(.director__subtitle, .faq__subtitle)) { margin-block: 0; }
.projects__card-subtitle p { text-transform: none; }

main > .about {
    padding-top: 80px;
}

/* Restore production FAQ alignment and director background proportions. */
.faq__content {
    align-items: end;
}
.director__block-foto img:nth-child(2) {
    height: auto;
}

/* Keep field labels accessible without duplicating the visible placeholders.
   The body prefix outranks the later wp-custom-css label rules. */
body .wpcf7-form .melio-field-label__text,
body .box .wpcf7-form .melio-field-label__text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* Restore the ordinary form's inline wrappers; popup flex wrappers stay unchanged. */
body .section-form .wpcf7-form .melio-field-label,
body .section-form .wpcf7-form .melio-field-label .wpcf7-form-control-wrap {
    display: inline;
}

/* Equal-height review cards with an accessible text disclosure. */
.reviews__items .slick-track {
    display: flex;
}
.reviews__items .reviews__item {
    height: auto;
}
.reviews__card {
    height: 100%;
}
.reviews__card-text {
    flex: 1 1 auto;
}
.reviews__card-content.is-collapsed {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.reviews__card.is-expanded .reviews__card-content {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    -webkit-box-orient: initial !important;
    -webkit-line-clamp: initial !important;
}
.reviews__card-toggle {
    display: inline-block;
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8e8e8e;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.reviews__card-toggle:hover,
.reviews__card-toggle:focus-visible {
    color: #9a7d57;
}

/* Keep galleries above the cookie notice and the WordPress admin bar. */
.fancybox__container {
    z-index: 100001;
}