/* Features Accordion Section */
.features-accordion {
    height: 90vh;
    margin: 40px;
    overflow: hidden;
    position: relative;
}

.accordion-container {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 10px;
    flex-direction: row; /* Explicit horizontal layout for desktop */
}

.accordion-panel {
    position: relative;
    width: calc((100% - 40% - 30px) / 3);
    height: 100%;
    transition: all 0.6s ease, background-position 0.6s ease;
    overflow: hidden;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 5px; /* Added border radius for desktop */
}

/* Default state - center of image */
.accordion-panel:not(.active):not(:hover) {
    background-position: center center;
}

/* Active or hovered state - show full width */
.accordion-panel.active,
.accordion-panel:hover {
    background-position: center center;
    background-size: cover;
}
.accordion-panel.active .panel-heading {
    font-size: 2.3rem;
    padding-bottom: 1.5rem;
}
.accordion-panel.active .panel-paragraph {
    color: white;
    padding-bottom: 1.5rem;


}
.accordion-panel.active {
    width: 40%; /* Reduced from 45% to 40% */
}

.accordion-panel:not(.active) {
    width: calc((100% - 40% - 30px) / 3); /* Updated calculation */
}

/* When any panel is hovered, set all non-hovered panels to equal width */
.accordion-container:hover .accordion-panel {
    width: calc((100% - 40% - 30px) / 3); /* Updated calculation */
}

/* Set the hovered panel to expanded width */
.accordion-container:hover .accordion-panel:hover {
    width: 40%; /* Reduced from 45% to 40% */
}

.accordion-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
    border-radius: 5px; /* Added border radius for desktop */

}

.panel-content {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 2rem;
    color: #ffffff;
    z-index: 2;
    text-align: center;
    padding-left: 3rem;
    padding-right: 3rem;
}

/* Panel content default state - hide everything except title */
.accordion-panel:not(.active) .panel-content p,
.accordion-panel:not(.active) .panel-content .btn-white {
    display: none !important;
}

/* Panel content active state - show everything */
.accordion-panel.active .panel-content p,
.accordion-panel.active .panel-content .btn-white {
    display: block !important;
}

/* Special override for buttons */
.accordion-panel.active .panel-content .btn-white {
    display: inline-block !important;
}

/* Remove font-size specifications for headings since we're using heading-xl class */
.accordion-panel .panel-content h3 {
    transition: all 0.6s ease;
}

/* Active/hover panels heading styles - keep transitions but remove font-size */
.accordion-panel.active .panel-content h3,
.accordion-panel:hover .panel-content h3 {
    transition: all 0.6s ease;
}

.panel-content h3 {
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.panel-content p {
    line-height: 1.4;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Make sure buttons always display properly in active panels */
.accordion-panel.active .panel-content .btn-white {
    display: inline-block !important;
    width: auto !important;
    text-align: center;
}

/* Modify media queries to remove font-size specifications for headings */
@media (max-width: 1400px) {
    .features-accordion {
        margin: 30px;
    }
}

@media (max-width: 1200px) {
    .features-accordion {
        margin: 25px;
    }
}

@media (max-width: 991px) {
    .features-accordion {
        margin: 20px;
        height: 80vh;
    }

    .accordion-panel {
        width: calc((100% - 55% - 30px) / 3); /* Reduced from 60% to 55% */
    }
    
    .accordion-panel.active {
        width: 55%; /* Reduced from 60% to 55% */
    }
    
    .accordion-panel:not(.active) {
        width: calc((100% - 55% - 30px) / 3); /* Updated calculation */
    }
    
    .accordion-container:hover .accordion-panel {
        width: calc((100% - 55% - 30px) / 3); /* Updated calculation */
    }
    
    .accordion-container:hover .accordion-panel:hover {
        width: 55%; /* Reduced from 60% to 55% */
    }
    
    .panel-content {
        padding: 1.5rem;
    }
}

/* Mobile Layout - Switch to vertical accordion */
@media (max-width: 1000px) {
    .features-accordion {
        margin: 10px;
        height: auto;
    }

    .accordion-container {
        flex-direction: column;
        height: auto;
        gap: 5px;
    }

    .accordion-panel {
        width: 100% !important; /* Force full width for all panels */
        height: 150px; /* Fixed collapsed height */
        transition: height 0.4s ease !important; /* Override other transitions */
        border-radius: 0; /* Remove border radius on mobile */
    }
    
    .accordion-panel.active {
        width: 100% !important;
        height: 330px !important; /* Fixed expanded height */
    }
    
    .accordion-panel:not(.active) {
        width: 100% !important;
        height: 150px !important; /* Fixed collapsed height */
    }
    
    /* Force proper behavior for mobile */
    .accordion-container:hover .accordion-panel,
    .accordion-container:hover .accordion-panel:hover {
        width: 100% !important;
    }

    .accordion-container:hover .accordion-panel:hover:not(.active) {
        height: 150px !important; /* Prevent hover from changing height on mobile */
    }
    
    .accordion-container:hover .accordion-panel.active {
        height: 330px !important; /* Keep active panel expanded */
    }

    .panel-content {
        padding: 1.2rem;
    }
    
    /* Ensure headings are visible in collapsed state but properly sized in active state */
    .accordion-panel:not(.active) .panel-heading {
        font-size: 1.3rem !important;
    }
    
    .accordion-panel.active .panel-heading {
        font-size: 1.8rem !important;
    }

}

@media (max-width: 576px) {
    .features-accordion {
        margin: 5px;
    }

    .accordion-panel {
        height: 150px !important; /* Smaller collapsed height */
        transition: height 0.3s ease !important;
    }

    .accordion-panel.active {
        height: 300px !important; /* Smaller expanded height */
    }

    .accordion-panel:not(.active) {
        height: 150px !important;
    }
    
    .accordion-container:hover .accordion-panel:hover:not(.active) {
        height: 150px !important;
    }
    
    .accordion-container:hover .accordion-panel.active {
        height: 300px !important;
    }

    .panel-content {
        padding: 1rem;
    }
    
    /* Adjust heading sizes for smaller screens */
    .accordion-panel:not(.active) .panel-heading {
        font-size: 1.1rem !important;
    }
    
    .accordion-panel.active .panel-heading {
        font-size: 1.5rem !important;
    }
    .accordion-panel.active .panel-heading {
        padding-bottom: 1rem;
    }
    .accordion-panel.active .panel-paragraph {
        padding-bottom: 1rem;
    
    
    }
}

@media (max-width: 480px) {
    .accordion-panel {
        height: 80px !important; /* Even smaller collapsed height */
        transition: height 0.2s ease !important;
    }

    .accordion-panel.active {
        height: 220px !important; /* Even smaller expanded height */
    }

    .accordion-panel:not(.active) {
        height: 80px !important;
    }
    
    .accordion-container:hover .accordion-panel:hover:not(.active) {
        height: 80px !important;
    }
    
    .accordion-container:hover .accordion-panel.active {
        height: 220px !important;
    }
    
    /* Adjust heading sizes for smallest screens */
    .accordion-panel:not(.active) .panel-heading {
        font-size: 1rem !important;
    }
    
    .accordion-panel.active .panel-heading {
        font-size: 1.3rem !important;
    }
    .accordion-panel.active .panel-heading {
        padding-bottom: 0.8rem;
    }
    .accordion-panel.active .panel-paragraph {
        padding-bottom: 0.8rem;
    
    
    }
}

/* Button styles for accordion section */
.accordion-panel:not(.active) .btn-white {
    display: none !important;
}

.accordion-panel.active .btn-white {
    display: inline-block !important;
}

.accordion-panel.active .panel-content h3 {
    margin-bottom: 0.5rem;
}

.accordion-panel.active .panel-content p {
    margin-bottom: 1.5rem;
} 