/* Featured Residences Page Styles */

@media (min-width: 1400px) {
    .container {
        max-width: 1820px;
    }
}

/* Wider carousel caption to prevent text wrapping */
.carousel-caption {
    width: 90% !important;
    max-width: 1300px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

@media (max-width: 768px) {
    .carousel-caption {
        width: 95% !important;
        max-width: none !important;
    }
}

/* Featured Residences Section Background */
.featured-residences-section {
    background-color: #eeedd9;
}

/* Expandable Panel Section Background */
.expandable-panel-section {
    background-color: #eeedd9;
    position: relative;
    z-index: 2;
}

    /* Ensure a persistent bottom border above overlapping sections */
    .expandable-panel-section .container {
        position: relative;
    }

        .expandable-panel-section .container::after {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 1px;
            background-color: #ddd;
            z-index: 3;
        }


/* Panel Table Header */
.panel-table-header {
    padding: 10px;
    background-color: #eeedd9;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #ddd;
}

/* Expandable Panel Styling */
.expandable-panel {
    border-bottom: 1px solid #ddd;
    background-color: #eeedd9;
}

    .expandable-panel:first-child {
        border-radius: 0;
    }

    .expandable-panel:last-child {
        border-bottom: none;
        border-radius: 0 0 8px 8px;
    }

.panel-header {
    padding: 10px;
    cursor: pointer;
}

.panel-column-header {
    color: #631203;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.panel-content {
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.panel-arrow {
    color: #631203;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.panel-header[aria-expanded="true"] .panel-arrow {
    transform: rotate(180deg);
}

.panel-body {
    padding: 15px;
    background-color: #eeedd9;
    border-top: 1px solid #eee;
}

.expandable-panel:last-child .panel-body {
    border-bottom: 1px solid #ddd;
}

    .panel-body .row {
        align-items: flex-start;
    }

    .panel-body .col-md-6:last-child {
        margin-top: -10px;
    }

/* Panel Body Styling */
.unit-title {
    color: #631203;
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-align: center;
}

.unit-description {
    color: black;
    margin-bottom: 20px;
    text-align: center;
}

.unit-btn {
    background-color: white;
    color: black;
    border: 1px solid #ab650d;
    padding: 8px 16px;
    text-decoration: none;
    margin-bottom: 10px;
    display: block;
    transition: all 0.3s ease;
    text-align: center;
    text-transform: uppercase;
}

    .unit-btn:hover {
        background-color: #ab650d;
        color: #ffffff;
        text-decoration: none;
    }

/* Floor Plan Slider */
.floor-plan-slider {
    position: relative;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-image-container {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.floor-plan-slider img {
    height: auto;
    display: none;
}

    .floor-plan-slider img.active {
        display: block;
    }

.slider-controls {
    background-color: white;
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    padding-left: 10px;
    padding-top: 8px;
}

    .slider-controls:hover {
        background-color: #f8f9fa;
    }

.floor-labels {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 70%;
}

.floor-label {
    background: none;
    border: none;
    text-transform: uppercase;
    font-weight: bold;
    padding: 5px 10px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

    .floor-label.active {
        color: #631203;
    }

/* Mobile panel body fixes - only apply on mobile */
@media (max-width: 767.98px) {
    .panel-body .row {
        display: block;
    }

    .panel-body .col-md-6 {
        width: 100%;
        margin-bottom: 20px;
    }

        .panel-body .col-md-6:last-child {
            margin-top: 0;
        }

    .floor-plan-slider {
        flex-direction: row !important;
        align-items: center;
        gap: 15px;
    }

        .floor-plan-slider > div:not(.slider-controls) {
            flex: 1;
            order: 2;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

    .slider-controls {
        flex-shrink: 0;
    }

    .slider-prev {
        order: 1;
    }

    .slider-next {
        order: 3;
    }

    .unit-btn {
        width: 45%;
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    /* Hide panel header on mobile */
    .panel-table-header {
        display: none;
    }

    /* Mobile panel styling */
    .panel-header .row {
        display: block;
        text-align: center;
    }

    .panel-header .col-1,
    .panel-header .col-2,
    .panel-header .col-3 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        text-align: center;
        margin-bottom: 8px;
        padding: 0px 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    /* Style panel content like unit title and description on mobile */
    .panel-header .panel-content {
        color: #631203 !important;
        font-weight: 600 !important;
        font-size: 1.1rem !important;
        text-align: center !important;
        width: 100%;
    }

    /* Add line between panel rows on mobile */
    .expandable-panel {
        border-bottom: 2px solid #ddd;
        margin-bottom: 8px;
    }

        .expandable-panel:last-child {
            border-bottom: none;
            margin-bottom: 0;
        }

    

    /* Adjust arrow position on mobile */
    .panel-header .col-3 .panel-content,
    .panel-header .col-2 .panel-content {
        /*display: flex !important;*/
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center;
    }

    .panel-arrow {
        position: absolute !important;
        right: 15px;
/*        top: 50%;*/
        transform: translateY(-50%);
/*        margin: 0 !important;*/
        margin-bottom: 110px;
    }

    .panel-header[aria-expanded="true"] .panel-arrow {
        transform: translateY(-50%);
    }

    /* Mobile panel body styling */
    .panel-body {
        text-align: center;
        padding: 20px 15px;
    }

        .panel-body .row {
            display: flex;
            flex-direction: column;
        }

        .panel-body .col-md-3 {
            width: 100%;
            margin-bottom: 20px;
            order: 2;
        }

        .panel-body .col-md-8 {
            width: 100%;
            margin-bottom: 20px;
            order: 1;
        }

    /* Hide unit title and description on mobile */
    .unit-title,
    .unit-description {
        display: none;
    }

    .unit-btn {
        width: 80%;
        max-width: 250px;
        margin: 0 auto 15px auto;
        display: block;
    }

    /* Mobile slider layout - arrows on sides */
    .floor-plan-slider {
        flex-direction: row !important;
        align-items: center;
        gap: 15px;
    }

    .slider-image-container {
        flex: 1;
        order: 2;
    }

    .slider-prev {
        order: 1;
    }

    .slider-next {
        order: 3;
    }

    /* Make images responsive on mobile */
    .floor-plan-slider img {
        width: 100% !important;
        /*max-width: 280px !important;*/
    }

    .floor-labels {
        width: 100% !important;
        max-width: 280px !important;
    }

    /* Adjust slider controls for mobile */
    .slider-controls {
        width: 35px;
        height: 35px;
        flex-shrink: 0;
    }
}
