/* ==========================================================================
   Overview Show More - CSS-Only Truncation
   
   The full description HTML is always in the DOM for SEO crawlers.
   A max-height constraint + gradient overlay acts as the visual truncation.
   A hidden checkbox + label toggles the expansion via CSS :checked selector.
   ========================================================================== */

/* Hide the checkbox visually */
.overview-toggle {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Wrapper that constrains the visible height */
.overview-content-wrapper {
    position: relative;
    max-height: 280px; /* Show approximately 2 paragraphs */
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradient fade overlay at bottom - acts as the visual "curtain" */
.overview-content-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* Show More label — subtle text link style */
.overview-show-more-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #16A085;
    background: none;
    border: none;
    border-bottom: 1px dashed rgba(22, 160, 133, 0.4);
    letter-spacing: 0.01em;
}

.overview-show-more-label:hover {
    color: #0A2647;
    border-bottom-color: rgba(10, 38, 71, 0.5);
}

.overview-show-more-label .overview-icon {
    transition: transform 0.3s ease;
    font-size: 0.625rem;
}

/* ---- EXPANDED STATE (checkbox checked) ---- */

/* Remove height constraint */
.overview-toggle:checked ~ .overview-content-wrapper {
    max-height: 20000px; /* Essentially unlimited */
}

/* Remove the gradient fade */
.overview-toggle:checked ~ .overview-content-wrapper::after {
    opacity: 0;
    height: 0;
}

/* Rotate the icon */
.overview-toggle:checked ~ .overview-show-more-label .overview-icon {
    transform: rotate(180deg);
}

/* Change text from "Show More" to "Show Less" */
.overview-show-more-text {
    display: inline; /* Default: shows "Show More" text */
}

.overview-toggle:checked ~ .overview-show-more-label .overview-show-more-text {
    font-size: 0;
    line-height: 0;
}

.overview-toggle:checked ~ .overview-show-more-label .overview-show-more-text::after {
    content: "Show Less";
    font-size: 0.9375rem;
    line-height: normal;
}

/* Muted color when expanded */
.overview-toggle:checked ~ .overview-show-more-label {
    color: #6B7280;
    border-bottom-color: rgba(107, 114, 128, 0.3);
}

.overview-toggle:checked ~ .overview-show-more-label:hover {
    color: #374151;
    border-bottom-color: rgba(55, 65, 81, 0.5);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .overview-content-wrapper {
        max-height: 220px; /* Slightly less on mobile */
    }
}
