/* ========================================
   PAGE CUSTOM BLOCK - BASIC THEME
   Read more/collapse functionality
   ======================================== */

/* Removed .rowfull-margin - using .main-wrapper instead */

/* Note: .main-wrapper CSS handled by news-override.css */

/* Page location specific */
.block-content-full.page-location {
    margin-top: 80px;
    margin-bottom: 60px; /* Maintain spacing with sections below */
    /* margin-left: 76px;
    margin-right: 76px; */
}

@media screen and (max-width: 1440px) {
    .block-content-full.page-location {
        /* margin-left: 24px;
        margin-right: 24px; */
    }
}

@media screen and (max-width: 768px) {
    .block-content-full.page-location {
        margin-top: 40px;
        /* margin-left: 16px;
        margin-right: 16px; */
    }
}

/* Main content block */
.block-content-full {
    padding: 32px;
    position: relative;
    box-shadow: 0px 4px 6px -2px rgba(16, 24, 40, 0.03),
                0px 0px 16px -4px rgba(16, 24, 40, 0.08);
    margin-bottom: 60px;
    border-radius: 12px;
    background: #ffffff;
    /* Override page-block.css fixed height */
    height: auto !important;
    overflow: visible !important;
}

/* Box content body wrapper */
.block-content-full .box-content-body {
    position: relative;
    transition: max-height 0.5s ease-in-out;
}

/* Collapsed state - giới hạn chiều cao của content body */
.block-content-full.collapsed .box-content-body {
    max-height: 400px;
    overflow: hidden;
}

/* Gradient overlay khi collapsed - đè lên body */
.block-content-full.collapsed .box-content-body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0.5) 70%,
        #FFFFFF 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Expanded state - không giới hạn body */
.block-content-full.expanded .box-content-body {
    max-height: none;
    overflow: visible;
}

/* Mobile height adjustment */
@media screen and (max-width: 768px) {
    .block-content-full {
        padding: 24px;
    }

    .block-content-full.collapsed .box-content-body {
        max-height: 250px;
    }

    .block-content-full.collapsed .box-content-body::after {
        height: 150px;
    }
}

/* Content header */
.block-content-full .box-content-header {
    width: 100%;
    border-bottom: 1px solid #E7E7E7;
    padding-bottom: 32px;
    margin-bottom: 32px;
}

.block-content-full .box-content-header .title {
    color: #3D3D3D;
    font-weight: 600;
    font-size: 28px;
    line-height: 100%;
    text-align: left;
}

@media screen and (max-width: 768px) {
    .block-content-full .box-content-header .title {
        font-size: 20px;
    }
}

/* Content body */
.block-content-full .box-content-body {
    color: #3D3D3D;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
}

.block-content-full .box-content-body img {
    max-width: 100%;
    border-radius: 8px;
}

/* Lists styling */
.block-content-full ul {
    list-style: none;
    padding-left: 0;
}

.block-content-full ul li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    position: relative;
    padding-left: 14px;
}

.block-content-full ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: #4CAF50;
    border-radius: 50%;
    flex-shrink: 0;
}

.block-content-full ol {
    padding-left: 20px;
}

.block-content-full ol li {
    list-style: decimal;
    list-style-position: outside;
    margin-bottom: 8px;
}

/* Nút "Xem thêm" - nằm đè lên gradient */
.block-content-full .read-more-btn {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    height: 48px;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #D1D1D1;
    background: #fff;
    font-size: 16px;
    font-weight: 510;
    line-height: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2; /* Nằm trên gradient (z-index: 1) */
    display: none; /* Ẩn mặc định, JS sẽ hiện khi cần */
}

.block-content-full .read-more-btn:hover {
    background: #f5f5f5;
    border-color: #b0b0b0;
}

/* Khi collapsed - hiện nút */
.block-content-full.collapsed .read-more-btn {
    display: block;
}

/* Khi expanded - nút ở vị trí bình thường */
.block-content-full.expanded .read-more-btn {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    display: block;
    margin: 32px auto 0;
}
