/* Frontend: no JS means the entire article remains visible. */

/* Reserve the collapsed height before view.js executes (avoids a large layout shift).
   The early html class is added only by JavaScript. With JS disabled content is open. */
html.olertis-expandable-js .wp-block-olertis-expandable-content:not(.is-ready):not(.is-short) > .olertis-expandable__viewport {
    max-height: var(--olertis-preview-height, 280px);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 110px), transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 110px), transparent 100%);
}

@media (min-width: 768px) and (max-width: 1023px) {
    html.olertis-expandable-js .wp-block-olertis-expandable-content:not(.is-ready):not(.is-short) > .olertis-expandable__viewport {
        max-height: var(--olertis-preview-height-tablet, 280px);
    }
}

@media (max-width: 767px) {
    html.olertis-expandable-js .wp-block-olertis-expandable-content:not(.is-ready):not(.is-short) > .olertis-expandable__viewport {
        max-height: var(--olertis-preview-height-mobile, 330px);
    }
}

.wp-block-olertis-expandable-content .olertis-expandable__content {
    display: flow-root;
}

.wp-block-olertis-expandable-content .olertis-expandable__toggle {
    display: none;
    align-items: center;
    gap: .5em;
    padding: .2em 0 .35em;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: #166754;
    cursor: pointer;
    font: inherit;
    font-size: .97em;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
}

.wp-block-olertis-expandable-content .olertis-expandable__toggle::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 8px;
    flex: 0 0 14px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 19 11' fill='none'%3E%3Cpath d='M17.5 1.5L9.5 10.5L1.5 1.5' stroke='%23000' stroke-linecap='square' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 19 11' fill='none'%3E%3Cpath d='M17.5 1.5L9.5 10.5L1.5 1.5' stroke='%23000' stroke-linecap='square' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 250ms ease;
}

.wp-block-olertis-expandable-content.is-expanded > .olertis-expandable__actions .olertis-expandable__toggle::after {
    transform: rotate(180deg);
}

.wp-block-olertis-expandable-content .olertis-expandable__toggle:hover {
    color: #10513f;
}

.wp-block-olertis-expandable-content .olertis-expandable__toggle:focus-visible {
    outline: 2px solid #166754;
    outline-offset: 5px;
}

.wp-block-olertis-expandable-content.is-ready > .olertis-expandable__viewport {
    overflow: hidden;
    max-height: none;
    transition: height 550ms cubic-bezier(.22, 1, .36, 1);
}

.wp-block-olertis-expandable-content.is-ready:not(.is-expanded) > .olertis-expandable__viewport {
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 110px), transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 110px), transparent 100%);
}

.wp-block-olertis-expandable-content.is-ready > .olertis-expandable__actions {
    display: flex;
    justify-content: center;
    margin-block-start: 14px;
}

.wp-block-olertis-expandable-content.is-ready > .olertis-expandable__actions .olertis-expandable__toggle {
    display: inline-flex;
}

/* Gentle invitation to read; stops on interaction and for reduced-motion users. */
@keyframes olertis-expandable-cta-glimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: .55; }
}

.wp-block-olertis-expandable-content.is-ready > .olertis-expandable__actions .olertis-expandable__toggle:not(:hover):not(:focus-visible) {
    animation: olertis-expandable-cta-glimmer 2.0s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .wp-block-olertis-expandable-content.is-ready > .olertis-expandable__viewport {
        transition: none;
    }
    .wp-block-olertis-expandable-content .olertis-expandable__toggle::after {
        transition: none;
    }
    .wp-block-olertis-expandable-content.is-ready > .olertis-expandable__actions .olertis-expandable__toggle:not(:hover):not(:focus-visible) {
        animation: none;
    }
}

@media print {
    .wp-block-olertis-expandable-content.is-ready > .olertis-expandable__viewport {
        height: auto !important;
        overflow: visible;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .wp-block-olertis-expandable-content .olertis-expandable__actions {
        display: none !important;
    }
}

@media print {
    html.olertis-expandable-js .wp-block-olertis-expandable-content > .olertis-expandable__viewport {
        max-height: none !important;
    }
}


@media (max-width: 767px) {
    .wp-block-olertis-expandable-content.is-ready > .olertis-expandable__actions {
        padding-bottom: 30px !important;
    }
}