/**
 * Two Column Section Styles
 * 
 * @package Ascend Health
 */

/* Two Column Section */
.ascend-two-column-section {
    padding: 40px 0;
    position: relative;
    z-index: 11;
}

.two-column-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    background-color: var(--Color-Palette-White);
}

.two-column-container .column {
    flex: 1 1 calc(50% - 20px);
    min-width: 300px;
}

/* Image column styles */
.image-column {
    position: relative;
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.main-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Top overlay styles */
.top-overlay {
    position: absolute;
    top: -50px;
    left: 30px;
    width: 45%;
    background: var(--Color-Palette-Copper, #6F3A20);
    padding: 20px;
    color: var(--Color-Palette-White);
    z-index: 2;
}

.top-overlay-subheading {
    font-family: var(--body-font);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.top-overlay-heading {
    font-family: var(--heading-font);
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--Color-Palette-White);
}

.top-overlay-content {
    font-family: var(--body-font);
    font-size: 16px;
    line-height: 1.4;
}

/* Bottom overlay styles */
.bottom-overlay {
    position: absolute;
    bottom: 20px;
    left: 30px;
    max-width: 60%;
    z-index: 2;
    color: var(--Color-Palette-White);
}

.overlay-title {
    font-family: var(--heading-font);
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--Color-Palette-White);
}

.two-column-container .overlay-subtitle {
    font-family: var(--body-font);
    font-size: 16px;
    margin-bottom: 15px;
    width: 75%;
}

.overlay-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--Color-Palette-White);
    color: var(--Color-Palette-Copper);
    border: 1px solid var(--Color-Palette-Copper);
    font-family: var(--body-font);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 24px;
    border: none;
    text-decoration: none;
    transition: all 0.3s ease;
}

.overlay-button:hover {
    background-color: var(--Color-Palette-Copper);
    color: var(--Color-Palette-White);
    border-color: var(--Color-Palette-White);
}

/* Content column styles */
.content-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.content-title {
    font-family: var(--heading-font);
    font-size: 42px;
    color: var(--Color-Palette-Copper);
    margin-bottom: 0px;
    line-height: normal;
}

.content-text {
    font-family: var(--body-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--Color-Palette-Dark-Chocolate);
}

.content-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.list-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.two-column-container .list-item-icon {
    flex-shrink: 0;
    margin-top: 14px;
}

.list-item-title {
    font-family: var(--body-font) !important;
    font-size: 16px;
    font-style: normal;
    font-weight: bold !important;
    line-height: normal;
    letter-spacing: 0.48px;
    color: var(--Color-Palette-Dark-Chocolate, #2E2E24);
    margin-bottom: 0;
}

.list-item-text {
    font-family: var(--body-font);
    font-weight: 400;
    font-size: 16px;
    line-height: normal;
    letter-spacing: 0.48px;
    color: var(--Color-Palette-Dark-Chocolate, #2E2E24);
    margin-bottom: 0;
}

.list-item-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

/* Accordion styles for mobile */
.accordion-icon {
    display: none;
    margin-left: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.accordion-header {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Column order classes */
.column-first {
    order: 1;
}

.column-second {
    order: 2;
}

/* Responsive adjustments */
@media (max-width: 920px) {
    .ascend-two-column-section {
        padding: 20px 0;
    }
    .list-item-content {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .two-column-container {
        flex-direction: column;
        gap: 0px;
    }
    
    .two-column-container .column {
        flex: 1 1 100%;
    }
    .top-overlay, .bottom-overlay {
        position: relative;
        width: 100%;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        height: auto;
        max-width: 100%;
        padding: 15px;
        background: var(--Color-Palette-Copper, #6F3A20);
        color: var(--Color-Palette-White);
    }
    
    /* Force mobile order regardless of desktop settings */
    .image-column {
        order: 1 !important;
    }
    
    .content-column {
        order: 2 !important;
    }
    
    .overlay-title {
        font-size: 30px;
    }
    
    .top-overlay-heading {
        font-size: 22px;
    }
    
    .overlay-title {
        font-size: 26px;
    }
    
    .content-title {
        font-size: 28px;
    }

    /* Accordion functionality for mobile */
    .accordion-icon {
        display: block;
    }

    .list-item-content {
        width: 100%;
    }

    .accordion-header {
        width: 100%;
    }

    .list-item-text {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        opacity: 0;
        visibility: hidden;
    }

    .list-item.active .list-item-text {
        max-height: 200px !important;
        opacity: 1 !important;
        margin-top: 10px;
        visibility: visible;
        display: block !important;
    }

    .list-item.active .accordion-icon {
        transform: rotate(180deg);
    }
    .list-item-icon {
        margin-top: 12px;
    }
    .list-item {
        align-items: stretch;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 15px;
    }
}
