* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.elementor-widget-ha-accordion .accordion-container {
    width: 100%; /* Use full width instead of fixed 1050px */
    max-width: 1050px; /* Maintain max width for larger screens */
    height: auto; /* Allow height to adapt */
    min-height: 400px; /* Minimum height for content */
    margin: 20px auto; /* Reduced margin for mobile */
    display: flex;
    flex-direction: row; /* Default row layout */
    overflow: hidden;
}

.elementor-widget-ha-accordion .accordion-item {
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: flex 0.3s ease-in-out;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.elementor-widget-ha-accordion .accordion-item.active {
    flex: 3;
}

.elementor-widget-ha-accordion .accordion-header::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90%;
    background: linear-gradient(to top, rgba(0, 0, 0, 1.9), rgba(0, 0, 0, 0));
    z-index: 1;
    pointer-events: none;
}

.elementor-widget-ha-accordion .accordion-header {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
    z-index: 2;
}

.elementor-widget-ha-accordion .accordion-header span {
    color: white;
    font-size: 18px; /* Base font size */
    font-weight: bold;
    position: relative;
    z-index: 3;
    text-align: center;
}

.elementor-widget-ha-accordion .accordion-item:hover::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(180, 67, 75, 0.8);
    z-index: 1;
    transition: background 0.3s ease-in-out;
}

.elementor-widget-ha-accordion .plus-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px; /* Reduced size for mobile */
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: transform 0.3s ease-in-out;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

.elementor-widget-ha-accordion .plus-button::before {
    content: "+";
    font-size: 22px; /* Adjusted for smaller button */
    color: #333;
}

.elementor-widget-ha-accordion .accordion-item:hover .plus-button {
    display: flex;
    transform: translate(-50%, -50%) scale(1.1);
}

.elementor-widget-ha-accordion .accordion-item.active .plus-button {
    display: none;
}

.elementor-widget-ha-accordion .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 25px; /* Smaller for mobile */
    height: 25px;
    background-color: #000;
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
}

.elementor-widget-ha-accordion .accordion-item.active .close-button {
    display: flex;
}

.elementor-widget-ha-accordion .accordion-content {
    height: 100%;
    padding: 10px; /* Reduced padding for mobile */
    background-color: #363c46;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    color: white;
    font-size: 1.1em; /* Slightly smaller font size */
    font-style: italic;
}

.elementor-widget-ha-accordion .accordion-item.active .accordion-content {
    opacity: 1;
}

.elementor-widget-ha-accordion .accordion-header small {
    font-size: 12px; /* Adjusted for mobile */
    font-weight: normal;
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-top: 5px;
}

/* Media Query for Tablets (max-width: 768px) */
@media (max-width: 768px) {
    .elementor-widget-ha-accordion .accordion-container {
        flex-direction: column; /* Stack items vertically */
        min-height: 300px; /* Adjust height for smaller screens */
        margin: 15px auto;
    }

    .elementor-widget-ha-accordion .accordion-item {
        flex: none; /* Remove flex growth */
        width: 100%; /* Full width for each item */
        height: 200px; /* Fixed height for collapsed state */
        min-height: 150px; /* Minimum height */
    }

    .elementor-widget-ha-accordion .accordion-item.active {
        flex: none;
        height: auto; /* Allow height to expand */
        min-height: 300px; /* Expanded state height */
    }

    .elementor-widget-ha-accordion .accordion-header span {
        font-size: 16px; /* Smaller font for tablets */
    }

    .elementor-widget-ha-accordion .accordion-content {
        font-size: 1em; /* Adjust font size */
        padding: 8px;
    }

    .elementor-widget-ha-accordion .accordion-header small {
        font-size: 11px;
    }

    .elementor-widget-ha-accordion .plus-button {
        width: 35px;
        height: 35px;
    }

    .elementor-widget-ha-accordion .plus-button::before {
        font-size: 20px;
    }

    .elementor-widget-ha-accordion .close-button {
        width: 22px;
        height: 22px;
    }
}

/* Media Query for Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .elementor-widget-ha-accordion .accordion-container {
        margin: 10px auto;
        min-height: 250px;
    }

    .elementor-widget-ha-accordion .accordion-item {
        height: 150px; /* Smaller height for collapsed state */
        min-height: 120px;
    }

    .elementor-widget-ha-accordion .accordion-item.active {
        min-height: 250px; /* Smaller expanded height */
    }

    .elementor-widget-ha-accordion .accordion-header span {
        font-size: 14px; /* Smaller font for mobile */
    }

    .elementor-widget-ha-accordion .accordion-content {
        font-size: 0.9em;
        padding: 6px;
    }

    .elementor-widget-ha-accordion .accordion-header small {
        font-size: 10px;
    }

    .elementor-widget-ha-accordion .plus-button {
        width: 30px;
        height: 30px;
    }

    .elementor-widget-ha-accordion .plus-button::before {
        font-size: 18px;
    }

    .elementor-widget-ha-accordion .close-button {
        width: 20px;
        height: 20px;
    }
}