.uffizio-expanding-panels-container {
    display: grid;
    gap: 40px;
    grid-template-columns: 940px 350px;
    align-items: flex-start;
    /* background: #000814; */
    /* padding: 80px 60px; */
    /* border-radius: 30px; */
    overflow: hidden;
    justify-content: space-between;
    color: #ffffff;

    font-family: 'Inter', sans-serif;
}

/* Left side panels */
.uffizio-expanding-panels-left {
    display: flex;
    gap: 20px;
    flex: 1.6;
    height: 590px;
}

.uffizio-expanding-panel-item {
    position: relative;
    flex: 1;
    height: 100%;
    /* Explicitly set height */
    overflow: hidden;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.02);
    min-width: 150px;
    /* Prevent flex shrink issues */
}

.uffizio-expanding-panel-item.active {
    flex: 6;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 2px #0056b3;
    border-color: #007bff;
}

/* Image styling */
.uffizio-expanding-panel-img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
    /* Increased base opacity for mobile visibility */
    transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
    filter: grayscale(80%);
    /* Reduced grayscale for better initial visibility */
    pointer-events: none;
}

.uffizio-expanding-panel-item.active .uffizio-expanding-panel-img {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

.uffizio-expanding-panel-img img {
    width: 100%;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

/* Vertical Label */
.uffizio-expanding-panel-label {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-size: 24px;
    font-family: "Antonio", serif;
    font-weight: 600;
    /* transition: all 0.1s ease; */

}

.uffizio-expanding-panel-item:not(.active) .uffizio-expanding-panel-label {
    writing-mode: vertical-lr;
    transform: translateX(-50%) rotate(180deg);
}

.uffizio-expanding-panel-item.active .uffizio-expanding-panel-label {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
}

.uffizio-expanding-panel-label span {
    font-size: 1.5rem;
    font-weight: 600;
    /* text-transform: uppercase; */
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    font-family: "Antonio", serif;
    color: white;
    font-weight: 600;

}

/* Right side content */
.uffizio-expanding-panels-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 40px;
}

.uffizio-expanding-content-item {
    display: none;
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.uffizio-expanding-content-item.active {
    display: block;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.uffizio-expanding-right-title {
    font-size: 56px;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 50px;
    text-transform: none;
    /* background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%); */
    /* -webkit-background-clip: text; */
    /* background-clip: text; */
    /* -webkit-text-fill-color: transparent; */
    font-family: "Antonio", serif;
    color: white;
    font-weight: 600;
    margin-bottom: 50px !important;
    font-size: 26px;
}

.uffizio-expanding-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.uffizio-expanding-feature-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    transition: all 0.4s ease;
    text-decoration: none;
    /* In case it's an <a> tag */
    cursor: pointer;
}

.uffizio-expanding-feature-item:hover,
.uffizio-expanding-feature-item.active-feature {
    background: rgba(0, 123, 255, 0.08);
    border-color: rgba(0, 123, 255, 0.3);
    /* transform: translateX(15px); */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    color: white;
}

.uffizio-expanding-feature-icon {
    /* width: 40px; */
    /* height: 40px; */
    /* flex-shrink: 0; */
    /* display: flex; */
    /* align-items: center; */
    /* justify-content: center; */
    /* background: rgba(0, 123, 255, 0.1); */
    /* border-radius: 12px; */
}

.uffizio-expanding-feature-icon img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    /* filter: brightness(0) invert(1); */
}

.uffizio-expanding-feature-text {
    font-size: 18px;
    font-weight: 600;
    color: #CCCFD3;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.5px;
}

.active-feature .uffizio-expanding-feature-text {
    color: white;
}

/* Mobile Image - Hidden on Desktop */
.uffizio-expanding-mobile-image {
    display: none;
    width: 100%;
    margin-bottom: 30px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.uffizio-expanding-mobile-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Responsive */
@media (max-width: 1200px) {
    .uffizio-expanding-panels-container {
        padding: 60px 40px;
    }

    .uffizio-expanding-right-title {
        font-size: 48px;
    }
}

@media (max-width: 1024px) {
    .uffizio-expanding-panels-container {
        flex-direction: column;
        align-items: stretch;
        padding: 40px 30px;
    }

    .uffizio-expanding-panels-left {
        width: 100%;
        height: 550px;
        /* Slightly taller for better visibility */
    }

    .uffizio-expanding-panels-right {
        width: 100%;
        padding-left: 0;
        margin-top: 40px;
        text-align: left;
    }

    .uffizio-expanding-right-title {
        font-size: 42px;
        margin-bottom: 30px;
    }

    .uffizio-expanding-feature-text {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .uffizio-expanding-panels-container {
        display: block !important;
        /* Stack columns vertically */
        padding: 25px 15px;
        background: #000814;
    }

    .uffizio-expanding-panels-left {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        height: auto !important;
        background: #000a1a !important;
        border: 1.5px solid #002d5c !important;
        border-radius: 14px !important;
        padding: 6px !important;
        gap: 6px !important;
        margin-bottom: 30px !important;
        overflow: hidden !important;
    }

    .uffizio-expanding-panel-item {
        flex: 1 !important;
        height: 48px !important;
        border: none !important;
        background: transparent !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        position: relative !important;
        transform: none !important;
        box-shadow: none !important;
    }

    .uffizio-expanding-panel-item.active {
        background: #0066ff !important;
        box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3) !important;
    }

    /* Force hide the desktop images inside panels on mobile */
    .uffizio-expanding-panel-img {
        display: none !important;
    }

    /* Force labels to show horizontally inside the tabs */
    .uffizio-expanding-panel-item .uffizio-expanding-panel-label {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        transform: none !important;
        writing-mode: horizontal-tb !important;
        width: 100% !important;
        height: 100% !important;
        align-items: center !important;
        justify-content: center !important;
        background: none !important;
    }

    .uffizio-expanding-panel-label span {
        display: block !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        text-transform: none !important;
        color: #ffffff !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important;
        text-shadow: none !important;
    }

    .uffizio-expanding-panels-right {
        width: 100% !important;
        padding-left: 0 !important;
    }

    .uffizio-expanding-mobile-image {
        display: block !important;
        margin-bottom: 25px !important;
    }

    .uffizio-expanding-right-title {
        font-size: 26px !important;
        text-align: center !important;
        margin-bottom: 25px !important;
    }

    .uffizio-expanding-feature-item {
        padding: 20px;
        gap: 15px;
        transform: none !important;
        /* Disable slide animation on mobile hover for stability */
    }

    .uffizio-expanding-feature-text {
        font-size: 16px;
    }

    .uffizio-expanding-feature-icon {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .uffizio-expanding-panels-left {
        gap: 4px;
        padding: 4px;
    }

    .uffizio-expanding-panel-item.active {
        flex: 4;
        /* Less extreme flex on very small screens */
    }

    .uffizio-expanding-panel-label span {
        font-size: 12px;
    }

    .uffizio-expanding-right-title {
        font-size: 24px;
    }

    .uffizio-expanding-feature-text {
        font-size: 16px;
    }

    .uffizio-expanding-feature-item {
        padding: 15px;
    }

    .uffizio-expanding-panel-label {
        bottom: 20px;
    }
}