/* --- FEATURE 1: READ MORE --- */
.read-more-wrapper {
    position: relative;
    width: 100%;
}

.read-more-content {
    overflow: hidden;
    transition: max-height 0.4s ease-out, -webkit-mask-image 0.4s ease-out, mask-image 0.4s ease-out;
}

.read-more-trigger {
    display: none;
    background: none;
    border: none;
    color: var(--rm-color, #565656);
    cursor: pointer;
    padding: 12px 0 0 0;
    font-weight: 600;
    font-size: var(--rm-font-size, 16px);
    font-style: var(--rm-font-style, normal);
    text-decoration: var(--rm-text-decoration, none);
    width: 100%;
    text-align: var(--rm-align, left);
    transition: color 0.2s ease, opacity 0.2s ease;
}

.read-more-wrapper .read-more-trigger:hover,
.read-more-wrapper .read-more-trigger:focus,
.read-more-wrapper .read-more-trigger:active {
    background: transparent !important;
    text-decoration: var(--rm-text-decoration, none) !important;
    color: var(--rm-color, #565656) !important;
    opacity: 0.7 !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

@media (min-width: 769px) {
    .read-more-wrapper.has-rm-desktop.needs-truncation:not(.is-expanded) .read-more-content {
        max-height: var(--rm-max-height-desktop, 150px);
        mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    }

    .read-more-wrapper.has-rm-desktop.needs-truncation.is-expanded .read-more-content {
        max-height: var(--rm-expanded-height, 2000px);
        mask-image: none;
        -webkit-mask-image: none;
    }

    .read-more-wrapper.has-rm-desktop.needs-truncation .read-more-trigger {
        display: inline-block;
    }
}

@media (max-width: 768px) {
    .read-more-wrapper.has-rm-mobile.needs-truncation:not(.is-expanded) .read-more-content {
        max-height: var(--rm-max-height-mobile, 100px);
        mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    }

    .read-more-wrapper.has-rm-mobile.needs-truncation.is-expanded .read-more-content {
        max-height: var(--rm-expanded-height, 2000px);
        mask-image: none;
        -webkit-mask-image: none;
    }

    .read-more-wrapper.has-rm-mobile.needs-truncation .read-more-trigger {
        display: inline-block;
    }
}

/* --- FEATURE 2: ACCORDION SMOOTH SCROLL --- */
details.has-smooth-scroll summary {
    cursor: pointer;
}

/* --- FEATURE 3: SHORTCODE ACCORDION --- */
.gbe-shortcode-accordion {
    margin-bottom: 1.5em;
}

.gbe-shortcode-accordion summary {
    cursor: pointer;
    font-weight: 600;
}

.gbe-shortcode-accordion .gbe-accordion-content {
    padding-top: 1em;
}

/* Style: Bordered */
.gbe-shortcode-accordion.style-border {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 1em;
}

.gbe-shortcode-accordion.style-border summary {
    margin: -1em;
    padding: 1em;
    background-color: #f7f7f7;
    border-radius: 4px 4px 0 0;
}

.gbe-shortcode-accordion.style-border[open] summary {
    border-bottom: 1px solid #ccc;
    margin-bottom: 1em;
}

/* Style: Minimal */
.gbe-shortcode-accordion.style-minimal summary {
    color: #0073aa;
}

.gbe-shortcode-accordion.style-minimal summary:hover {
    text-decoration: underline;
}
