/* ============================================================
   Study Details Page Styles
   Specific styles for focusgroup-details.html page
   ============================================================ */

/* Title Section */
.details-title-wrapper {
    padding: 0 12px;
    margin-top: 44px;
    margin-bottom: 24px;
}

.details-title-wrapper .heading-text {
    margin-bottom: 0;
}

/* Main Content Layout - 60/40 Split */
.details-content-wrapper {
    display: flex;
    flex-direction: row;
    gap: 32px;
    padding: 0 12px;
    margin-bottom: 40px;
}

.details-left-column {
    flex: 0 0 60%;
    max-width: 60%;
}

.details-right-column {
    flex: 0 0 calc(40% - 32px);
    max-width: calc(40% - 32px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Left Column - Image and Top Button */
.details-left-column .detail-register {
    width: 100%;
    margin-bottom: 16px;
}

.details-left-column .details-banner {
    margin-top: 0;
    display: flex;
}

.details-left-column .details-banner img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Right Column - Description */
.details-right-column .details-description {
    margin-top: 0;
    margin-bottom: 24px;
}

.details-right-column .details-description .item__heading {
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
    color: #4B465C;
}

.details-right-column .description-content {
    font-size: 16px;
    line-height: 1.6;
    color: #4B465C;
}

/* Description Truncation */
.details-right-column .description-content.truncated {
    max-height: 330px;
    overflow: hidden;
    position: relative;
}

@media (min-width: 768px) and (max-width: 992px) {
    .details-right-column .description-content.truncated {
        max-height: 6.5rem;
    }
}

@media (min-width: 992px) and (max-width: 1200px) {
    .details-right-column .description-content.truncated {
        max-height: 12rem;
    }
}

@media (min-width: 1200px) and (max-width: 1499px) {
    .details-right-column .description-content.truncated {
        max-height: 15rem;
    }
}

@media (min-width: 768px) and (max-width: 1200px) {
    .details-title-wrapper .heading-text {
        font-size: 32px;
    }
}

@media (min-width: 1200px) and (max-width: 1440px) {
    .details-title-wrapper .heading-text {
        font-size: 36px;
    }
}

.details-right-column .description-content.truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, #fff);
}

.details-right-column .description-content p {
    margin-bottom: 12px;
}

.details-right-column .description-content ol,
.details-right-column .description-content ul {
    margin-bottom: 12px;
    padding-left: 24px;
}

.details-right-column .description-content li {
    margin-bottom: 8px;
}

/* See More Link */
.see-more-link {
    display: none;
    color: #13b5f7;
    font-weight: 600;
    text-decoration: none;
    margin-top: 12px;
}

.see-more-link:hover {
    text-decoration: underline;
}

/* Bottom Register Button */
.details-register-bottom {
    margin-top: auto;
}

.details-register-bottom .detail-register {
    width: 100%;
}

/* Ad Section */
.details-ad-section {
    padding: 0 12px;
    margin-bottom: 40px;
}

/* Other Focus Groups Section */
.other-focus-groups-section {
    padding: 0 12px;
}

.other-focus-groups-grid .studies {
    max-width: 100%;
}

.view-all-wrapper {
    text-align: center;
    margin-top: 32px;
    margin-bottom: 40px;
}

/* Description Modal */
.description-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 101;
}

.description-modal-overlay.overlay_active {
    display: block;
}

.description-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 102;
}

.description-modal.modal_active {
    display: block;
}

.modal-description-content p {
    margin-bottom: 16px;
}

.modal-description-content ol,
.modal-description-content ul {
    margin-bottom: 16px;
    padding-left: 24px;
}

.modal-description-content li {
    margin-bottom: 8px;
}

.description-modal .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.description-modal .modal-close:hover {
    color: #333;
}

.description-modal .item__heading {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
    color: #4B465C;
}

.modal-description-content {
    font-size: 16px;
    line-height: 1.7;
    color: #4B465C;
}

.modal-description-content p {
    margin-bottom: 16px;
}

/* Responsive Layout - Tablet */
@media only screen and (max-width: 991px) {
    .details-left-column {
        flex: 0 0 55%;
        max-width: 55%;
    }

    .details-right-column {
        flex: 0 0 calc(45% - 32px);
        max-width: calc(45% - 32px);
    }
}

/* Responsive Layout - Mobile */
@media only screen and (max-width: 767px) {
    .details-content-wrapper {
        flex-direction: column;
        gap: 24px;
    }

    .details-left-column {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .details-right-column {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .details-title-wrapper .heading-text {
        font-size: 28px;
    }

    .description-modal {
        padding: 24px;
        max-height: 90vh;
    }

    .description-modal .modal-close {
        top: 12px;
        right: 12px;
    }
}

/* Other Focus Groups Grid - 4 Column Layout */
.other-focus-groups-grid .studies {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    justify-content: center;
}

.other-focus-groups-grid .studies > div {
    display: flex;
    justify-content: center;
}

.other-focus-groups-grid .studies .study-pannel {
    width: 100%;
    max-width: 340px;
}

@media only screen and (max-width: 1400px) {
    .other-focus-groups-grid .studies {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media only screen and (max-width: 1024px) {
    .other-focus-groups-grid .studies {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media only screen and (max-width: 600px) {
    .other-focus-groups-grid .studies {
        grid-template-columns: 1fr;
    }
}
