/* Tabs Industries Block Styles */

.tabs-industries-block {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    overflow: hidden;
}

/* Top filter section */
.top-filter-section {
    display: flex;
    align-items: flex-start;
    gap: 48px;
    margin-bottom: 32px;
    flex-wrap: nowrap;
    padding: var(--wp--preset--spacing--60) 0;
    box-sizing: border-box;
}

.filter-heading {
    margin: 0;
    padding: 0;
    color: var(--wp--preset--color--contrast);
    white-space: nowrap;
}

.filter-heading .primary-text {
    color: var(--wp--preset--color--primary);
}

.top-filter-section .filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    justify-content: center;
}

.top-filter-section .filters .wp-block-button *{
    white-space: nowrap;
    word-break: keep-all;
    overflow: visible;
}

.top-filter-section .filters .wp-block-button {
    flex-shrink: 0;
    min-width: fit-content;
}

.tabs-industries-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: var(--wp--preset--spacing--60) 0;
}

/* Individual group section */
.group-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: stretch;
    min-height: 550px;
    margin-bottom: var(--wp--preset--spacing--80);
    opacity: 1;
    transform: translateY(0);
    /* Remove transition so filter hide/show is immediate */
    transition: none;
    overflow: hidden;
}

.group-section.filtered-hidden {
    opacity: 0;
    transform: translateY(-30px);
    margin-bottom: 0;
    min-height: 0;
    height: 0;
    padding: 0;
    pointer-events: none;
    overflow: hidden;
    width: 100%;
}

/* Left column - Outside content */
.outside-content-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.outside-content-item {
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.outside-content-item h2 {
    padding: 0;
    margin: 0 0 12px 0;
    color: var(--wp--preset--color--contrast);
}

.outside-content-item p {
    padding: 0;
    margin: 0 0 16px 0;
    color: var(--wp--preset--color--contrast);
    font-size: 0.9rem;
}

.outside-content-item .outside-benefits {
    color: var(--wp--preset--color--contrast);
}

/* Benefits section styling */
.benefits-heading {
    color: var(--wp--preset--color--primary);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0;
    margin: 0 0 16px 0;
}

/* Filter controls */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Right column - Tabs (inherit exact styles from original tabs block) */
.tabs-column {
    position: relative;
}

.tabs-group {
    display: none;
}

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

.tabs-group .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;
}

.tabs-group .tab[hidden] {
    display: none;
}

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

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

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

.tabs-group .tab:not(.active) {
    flex: 0 0 100px;
}

.tabs-group .tab:not(.active):hover {
    flex: 0 0 120px;
}

.tabs-group .tab.active {
    flex: 1;
    cursor: auto;
}

/* Tab outside icon (rotated on closed tabs) */
.tabs-group .tab .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;
}

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

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

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

.tabs-group .tab .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;
}

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

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

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

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

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

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

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

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

.tabs-group .tab .open-tab {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
}

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

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

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

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

/* Mobile styles */
.tabs-industries-mobile {
    display: none;
}

@media (max-width: 839px) {
    .tabs-industries-layout {
        display: none;
    }
    
    .group-section {
        grid-template-columns: 1fr;
        gap: 24px;
        align-items: flex-start;
    }
    
    .tabs-industries-mobile {
        display: block;
    }
    
    .mobile-group-section {
        margin-bottom: 20px;
    }
    
    .mobile-group-section[hidden] {
        display: none !important;
    }
    
    .mobile-outside-content {
        padding: var(--wp--preset--spacing--30);
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        margin-bottom: 16px;
        display: block;
        width: 100%;
        box-sizing: border-box;
        min-height: auto;
        overflow: visible;
    }

    .mobile-outside-content[hidden] {
        display: none !important;
    }

    .mobile-outside-content h3 {
        margin-bottom: 16px;
        color: var(--wp--preset--color--contrast);
        font-size: 1.5rem;
        line-height: 1.4;
    }
    
    .mobile-outside-content p {
        margin-bottom: 24px;
        color: var(--wp--preset--color--contrast);
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .mobile-outside-content .mobile-outside-benefits {
        color: var(--wp--preset--color--contrast);
        font-size: 1rem;
        line-height: 1.6;
        margin: 0;
        padding: 0;
    }
    
    /* Mobile filter controls */
    .mobile-tabs-controls {
        margin: 20px 0 0 0;
        text-align: center;
        padding: 20px var(--wp--preset--spacing--30);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-tabs-controls .filters {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .mobile-tabs-controls .filter-btn {
        border: 1px solid var(--wp--preset--color--primary);
        padding: 6px 12px;
        border-radius: 15px;
        background: transparent;
        color: var(--wp--preset--color--primary);
        cursor: pointer;
        font-size: 0.8rem;
        transition: all 0.3s ease;
    }
    
    .mobile-tabs-controls .filter-btn:hover,
    .mobile-tabs-controls .filter-btn.is-active {
        background: var(--wp--preset--color--primary);
        color: var(--wp--preset--color--contrast);
    }
    
    /* Mobile accordion styles */
    .mobile-accordion {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .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[hidden] {
        display: none;
    }
    
    .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 .mobile-tab-header {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px;
        cursor: pointer;
        z-index: 2;
    }
    
    .mobile-tab .mobile-tab-header-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mobile-tab .mobile-tab-icon {
        flex-shrink: 0;
        margin-bottom: 10px;
    }
    
    .mobile-tab .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;
    }
    
    .mobile-tab .toggle-tab {
        flex-shrink: 0;
        background: transparent;
        border: none;
        padding: 0;
        margin-left: 16px;
        cursor: pointer;
        transition: transform 0.4s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-tab.active .toggle-tab {
        transform: rotate(180deg);
    }
    
    .mobile-tab .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;
        padding: 0 20px 28px;
        opacity: 1;
    }
    
    .mobile-tab .mobile-tab-content p {
        color: #fff;
        margin-top: 0;
        margin-bottom: 24px;
        font-size: 16px;
        line-height: 1.5;
    }
    
    .mobile-tab .mobile-tab-content .wp-block-button {
        margin-bottom: 0;
    }
    
    /* Mobile top filter section */
    .top-filter-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
        margin-bottom: 24px;
        padding: 0 var(--wp--preset--spacing--30);
    }
    
    .filter-heading {
        font-size: 1.25rem;
    }
    
    .top-filter-section .filters {
        gap: 8px;
        justify-content: center;
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .top-filter-section .filter-btn {
        background: transparent;
        border: 1px solid white;
        color: white;
        white-space: nowrap;
        min-width: fit-content;
        flex-shrink: 0;
        word-break: keep-all;
        overflow: visible;
    }
    
    .top-filter-section .filter-btn .wp-block-button__link {
        white-space: nowrap;
        min-width: fit-content;
        flex-shrink: 0;
        word-break: keep-all;
        overflow: visible;
    }
}
