/**
 * Urban Industry Segments Plugin
 *
 * @package   urban-industry-segments
 * @author    Terry Hale <tech@mizagorn.com>
 * @copyright 2025 Terry Hale
 * @license   GPL-2.0+
 **/


.industry_scroll_container {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    position: relative;
}

.fener_industry_segments_section {
    display: none;
    flex-flow: row wrap;
    justify-content: space-between;
    border-radius: var(--border-radius-large);
    background-color: #000;
    padding: var(--padding);
    height: 80vh;
    min-height: 600px;
    background-size: cover;
    background-position: center center;
    transition: background-image .35s ease;
}
@media (max-width: 1200px) {
    .fener_industry_segments_section {
        justify-content: space-around;
    }
    .segments_intro_block {
        margin-top: calc(var(--grid-gap) * -2.5);
    }
}
.fener_industry_segments_section.is-active {
    display: flex;
}
.fener_industry_segments_section .segment_headline_wrapper {
    max-width: 950px;
}
.segments_headline_block {
    padding: var(--grid-gap);
    background-color: rgba(0, 0, 0, .2);
    border-radius: var(--border-radius-small);
}
.segments_headline_block p,
.segments_headline_block h2 {
    font-family: var(--body-font-family);
    font-weight: 600;
    font-size: 28px;
    color: var(--static-urban-white);
    padding-bottom: 0;
    /* text-shadow: 0px 0px 5px rgba(0,0,0,.75); */
}

.segments_headline_block p.segments_headline_subtext {
    font-weight: 400;
}
.segments_headline_block h2 {
    font-size: 90px;
    font-weight: 700;
    padding-top: var(--inner-grid-gap);
    line-height: 85px;
}

.segments_intro_block {
    order: 2;
    width: 570px;
    height: fit-content;
    background-color: #fff;
    padding: 20px;
    border-radius: var(--border-radius-small);
}
p.segments_intro_text {
    font-size: 20px;
    color: var(--static-urban-black);
}

.industry_scroll_container {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    position: relative;
}

.segments_nav_row {
    display: flex;
    flex-flow: row wrap;
    gap: 20px;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 10;
}

.segments_nav_row_buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    width: 100%;
}

.segments_industry_block {
    white-space: nowrap;
    cursor: pointer;
}

.segments_industry_block.selected,
.segments_industry_block.selected a {
    cursor: default;
}

.segments_industry_block smallbutton a {
    background-color: rgba(0, 0, 0, 0);
    color: #fff;
    border: 1px solid #fff;
    padding: 3px 10px;
    font-weight: 400;
    font-size: 16px;
    line-height: 19px;
    text-align: center;
    vertical-align: middle;
    text-transform: uppercase;
}

.segments_industry_block.selected smallbutton a {
    background-color: #FFF;
    color: #000;
}

.segments_industry_block:not(.selected):hover smallbutton a {
    box-shadow: 0px 2px 5px 1px rgba(0,0,0,.25);
}

.segments_industry_block.selected:hover smallbutton a {
    box-shadow: none !important;
}

#segments_nav_row_buttons smallbutton {
    display: block;
    width: auto;
    margin: 0px;
    text-align: center;
}

@media (max-width: 1200px) {
    .segments_headline_block h2 {
        font-size: 60px;
        line-height: 65px;
    }
    .segments_intro_block p {
        font-size: 18px;
    }
}
@media (max-width: 650px) {
    .fener_industry_segments_section {
        padding: 0;
    }
    .segment_headline_wrapper {
        margin-top: var(--inner-grid-gap);
    }
    .segments_headline_block {
        padding: var(--inner-grid-gap);
        margin: 0 var(--inner-grid-gap);
    }
    .segments_headline_block p.segments_headline_text,
    .segments_headline_block p.segments_headline_subtext {
        display: none;
    }
    .segments_intro_block {
        padding: 10px;
        margin: 0 var(--inner-grid-gap);
    }
    .segments_headline_block h2 {
        font-size: 40px;
        line-height: 45px;
        text-align: center;
    }
    .segments_intro_block p {
        font-size: 14px;
    }
    .segments_industry_block smallbutton a {
        font-size: 14px;
        line-height: 20px;
    }
    .fener_industry_segments_section {
        padding: 0;
    }
    .segment_headline_wrapper {
        margin-top: var(--inner-grid-gap);
    }
    .segments_headline_block {
        padding: var(--inner-grid-gap);
        margin: 0 var(--inner-grid-gap);
    }
    .segments_headline_block p.segments_headline_text,
    .segments_headline_block p.segments_headline_subtext {
        display: none;
    }
    .segments_intro_block {
        padding: 10px;
        margin: 0 var(--inner-grid-gap);
    }
    .segments_headline_block h2 {
        font-size: 28px;
        line-height: 32px;
        text-align: center;
        padding: 0;
    }
    .segments_intro_block p {
        font-size: 14px;
    }
    .segments_industry_block smallbutton a {
        font-size: 12px;
    }
    
    /* Horizontal scrollable buttons */
    .segments_nav_row {
        bottom: 10px;
        left: 10px;
        right: 10px;
        gap: 0;
        padding: 0 40px; /* Space for chevron buttons */
    }
    
    .segments_nav_row_buttons {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: smooth;
        gap: 10px;
        padding: 10px 0;
        /* Hide scrollbar */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .segments_nav_row_buttons::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    .segments_industry_block {
        flex-shrink: 0; /* Prevent buttons from shrinking */
    }
    
    /* Chevron navigation buttons */
    .segments_nav_row::before,
    .segments_nav_row::after {
        content: '';
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 30px;
        background-color: var(--static-urban-white);
        border-radius: var(--button-border-radius);
        cursor: pointer;
        z-index: 20;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.2s;
    }

    .segments_nav_row::before {
        left: 5px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='black' viewBox='0 0 16 16'%3E%3Cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 16px 16px;
    }

    .segments_nav_row::after {
        right: 5px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='black' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 16px 16px;
    }   
}