.tabs-block {
    display: flex;
    min-height: 550px;
    overflow: hidden;
    gap: 24px;
}

.tab {
    display: flex;
    flex-direction: column;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transition: flex 0.5s ease;
    position: relative;
    border-radius: 8px;
    cursor: pointer;
}

.tab .overlay {
    position: absolute;
    inset: 0;
    transition: backdrop-filter 0.5s ease, background 0.5s ease;
}

.tab:not(.active) .overlay {
    backdrop-filter: blur(2px);
}

.tab.active .overlay {
    backdrop-filter: blur(0);
}

.tab:not(.active) {
    flex: 0 0 185px;
}

.tab:not(.active):hover{
    flex: 0 0 210px;
}

.tab.active {
    flex: 1;
    cursor: auto;
}

/* Tab outside icon (rotated on closed tabs) */
.tab-outside-icon {
    position: absolute;
    top: 125px;
    left: 50%;
    transform: translateX(-50%) rotate(-90deg);
    transform-origin: center;
    transition: transform 0.5s ease;
    z-index: 3;
}

.tab-outside-icon img {
    width: 200px;
    height: auto;
}

.tab:hover .tab-outside-icon {
    transform: translateX(-50%) rotate(-90deg);
}

.tab.active .tab-outside-icon {
    opacity: 0;
    visibility: hidden;
}

.tab-closed {
    z-index: 1;
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    height: 100%;
    color: white;
    text-align: center;
    padding: 48px 0;
    box-sizing: border-box;
}

.tab-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 40vw;
    max-width: 650px;
    height: 100%;
    opacity: 0;
    padding: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: white;
    transition: opacity 0.3s ease;
    box-sizing: border-box;
}

.tab-content .tab-content-icon {
    margin-bottom: 20px;
}

.tab-content .tab-content-icon img {
    width: 200px;
    height: auto;
}

.tab-content h3{
    position: relative;
    color: #fff;
    margin: 16px 0;
}

.tab-content p{
    margin-bottom: 32px;
    margin-left: 0;
}

.tab-content .wp-block-button{
    margin-left: 0;
}

.tab.active .tab-content {
    opacity: 1;
}

.tab.active .tab-closed {
    display: none;
}



button {
    background: none;
    border: none;
    cursor: pointer;
}

.tab-closed .open-tab {
    display: flex;
    cursor: pointer;
}

.tab-closed .open-tab * {
    transition: all 0.3s ease;
}

.tab-closed:hover .open-tab svg path {
    stroke: #fff;
}

.tab-closed .open-tab svg rect {
    fill: transparent;
}

.tab-closed:hover .open-tab svg rect {
    fill: #c59c9f;
}

/* Mobile Vertical Accordion */

.tabs-block-mobile {
    position: relative;
    display: none;
    overflow: hidden;
    border-radius: 8px;
}

@media (max-width: 992px) {
    .tabs-block {
        display: none;
    }
    .tabs-block-mobile {
        display: block;
    }
}

.mobile-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
}

.mobile-tab {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.mobile-tab .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    transition: background-color 0.4s ease;
}

.mobile-tab.active .overlay {
    background: rgba(0, 0, 0, 0);
}

.mobile-tab-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    cursor: pointer;
    z-index: 2;
}

.mobile-tab-header-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.mobile-tab-icon {
    flex-shrink: 0;
    margin-bottom: 10px;
}

.mobile-tab-icon img {
    width: 150px;
    height: auto;
    transition: transform 0.4s ease;
}

.mobile-tab h4 {
    flex-grow: 1;
    color: #fff;
    margin: 0;
    font-size: 19px;
}

.toggle-tab {
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 0;
    margin-left: 16px; /* Add margin for better spacing */
    cursor: pointer;
    transition: transform 0.4s ease;
    display: flex; /* Ensure proper SVG centering */
    align-items: center;
    justify-content: center;
}

.mobile-tab.active .toggle-tab {
    transform: rotate(180deg);
}

.mobile-tab-content {
    position: relative;
    max-height: 0;
    overflow: hidden;
    z-index: 2;
    padding: 0 20px;
    opacity: 0;
    transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.4s ease;
}

.mobile-tab.active .mobile-tab-content {
    max-height: 600px; /* Increased max height */
    padding: 0 20px 28px; /* Increased bottom padding */
    opacity: 1;
}

.mobile-tab-content p {
    color: #fff;
    margin-top: 0;
    margin-bottom: 24px; /* Increased margin */
    font-size: 16px; /* Slightly larger font */
    line-height: 1.5;
}

.mobile-tab-content .wp-block-button {
    margin-bottom: 0;
}