/* Accordion Section Styles */
.hp-accordion-section {
    position: relative;
    overflow: hidden;
}

.hp-accordion-heading {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    /* Removed top margin to fix spacing when label is missing */
    margin-bottom: 5rem;
    /* Larger bottom margin */
    max-width: 628px;
}

@media (max-width: 767px) {
    .hp-accordion-heading {
        margin-bottom: 0;
    }

    .hp-accordion-header {
        padding: 1.25rem 0;
        /* Smaller padding on mobile */
    }
}

.hp-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 992px) {
    .hp-accordion-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        align-items: start;
        /* Revert stretch, align start */
    }
}

/* Left Column: Accordion */
/* Left Column: Accordion */
.hp-accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Remove gap as requested */
}

.hp-accordion-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.hp-accordion-item:last-child {
    border-bottom: none;
}

/* Remove padding-bottom for the last active item's content */
.hp-accordion-item:last-child .hp-accordion-content {
    padding-bottom: 0;
}

.hp-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Ensures vertical centering */
    padding: 2rem 0;
    /* Increased padding as requested */
    cursor: pointer;
    transition: color 0.3s ease;
}

/* Heading H3 styled as H4 (smaller) */
.hp-accordion-header h3 {
    margin: 0;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    /* Responsive font size */
    /* Responsive font size */
    font-weight: 700;
    color: var(--ms-text-primary, #19262b);
    line-height: 1.4;
}

.hp-accordion-item.active .hp-accordion-header h3 {
    color: var(--ms-primary, #ffb900);
}

.hp-accordion-icon {
    width: 24px;
    height: 24px;
    position: relative;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.hp-accordion-icon::before,
.hp-accordion-icon::after {
    content: '';
    position: absolute;
    background-color: currentColor;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.hp-accordion-icon::before {
    width: 14px;
    height: 2px;
}

.hp-accordion-icon::after {
    width: 2px;
    height: 14px;
}

.hp-accordion-item.active .hp-accordion-icon {
    transform: rotate(45deg);
}



.hp-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease, padding-bottom 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 0;
    padding-bottom: 0;
}

.hp-accordion-item.active .hp-accordion-content {
    max-height: 1000px;
    /* Increased to accommodate mobile image */
    opacity: 1;
    padding-bottom: 2rem;
    /* Increased to 32px as requested */
}

@media (max-width: 767px) {
    .hp-accordion-item.active .hp-accordion-content {
        display: flex;
        flex-direction: column;
    }

    .hp-accordion-mobile-img {
        order: -1;
        margin-top: 0;
        margin-bottom: 1.5rem;
    }
}

margin-bottom: 1.5rem;
margin-top: -1rem;
/* Closer to title */
line-height: 1.6;
}

@media (max-width: 767px) {
    .hp-accordion-desc {
        margin-bottom: 0;
    }
}

/* Mobile Image Styles */
.hp-accordion-mobile-img {
    display: block;
    margin-bottom: 1.5rem;
    margin-top: 0;
    /* Removed space above image as requested */
    border-radius: 8px;
    overflow: hidden;
    min-height: 200px;
    /* Force minimum height so JS calc sees it */
    position: relative;
    background: #f0f0f0;
}

.hp-accordion-mobile-img img {
    width: 100%;
    height: auto;
    display: block;
}

@media (min-width: 992px) {
    .hp-accordion-mobile-img {
        display: none;
        /* Hide inline image on desktop */
    }
}

/* Right Column: Images (Desktop) */
.hp-accordion-images {
    position: relative;
    width: 100%;
    max-width: 512px;
    /* Max width as requested */
    margin-left: auto;
    /* Align to the right */
    aspect-ratio: 1 / 1;
    /* Square aspect ratio */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.hp-accordion-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Forced height as requested */
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.7s ease-in-out, transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
    transform: scale(1.05);
    z-index: 1;
}

.hp-accordion-img.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

@media (max-width: 991px) {
    .hp-accordion-col-right {
        display: none;
        /* Hide right column on mobile */
    }
}