/**
 * Branches Block Styles
 * Background media with centered content and branch icon slider
 */

.dmn-branches {
    padding: var(--dmn-section-spacing, 60px) 0;
}

.branches-inner {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--dmn-image-radius, 12px);
}

/* Background Media Container */
.branches-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.branches-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Gallery Slider */
.branches-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.branches-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.branches-slide:first-child {
    opacity: 1;
}

.branches-slide.active {
    opacity: 1;
}

/* Video Background */
.branches-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.branches-video .bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 56.25vw;
    min-height: 100%;
    min-width: 177.78vh;
}

/* Overlay */
.branches-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
    z-index: 2;
}

/* Content */
.branches-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: var(--dmn-site-width, 1400px);
    padding: var(--dmn-container-padding, 30px);
}

.branches-content-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    color: #ffffff;
    padding: 50px 0px;
}

.branches-title {
    font-family: var(--dmn-h2-font, var(--dmn-font-heading));
    font-size: var(--dmn-h2-size, 3em);
    font-weight: var(--dmn-h2-weight, 700);
    color: #ffffff;
    line-height: 1.2;
    margin: 0 0 20px 0;
}

.branches-text {
    font-family: var(--dmn-text-font, inherit);
    font-size: var(--dmn-text-size, 18px);
    line-height: 1.6;
    color: #ffffff;
    margin-bottom: 50px;
}

.branches-text p {
    margin-bottom: 15px;
}

.branches-text p:last-child {
    margin-bottom: 0;
}

/* Branch Slider */
.branches-slider-wrapper {
    position: relative;
    padding: 50px;
}

.branches-items {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0;
}

.branches-items::-webkit-scrollbar {
    display: none;
}

.branch-item {
    flex: 0 0 auto;
    width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
}

.branch-icon {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--dmn-primary, #000);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.branch-icon:hover {
    transform: translateY(-2px);
}

.branch-icon img {
    width: 75px;
    height: 75px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    border-radius: 0px !important;
}

.branch-name {
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.2;
    text-shadow: none;
}

/* Navigation Buttons */
.branches-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--dmn-primary, #000);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ffffff;
    z-index: 10;
    border: none;
    padding: 0;
}

.branches-nav:hover {
    background: var(--dmn-primary, #000);
    transform: translateY(-50%) scale(1.1);
}

.branches-nav svg {
    width: 24px;
    height: 24px;
    color: #ffffff;
    stroke: #ffffff;
    fill: none;
}

.branches-prev {
    left: 0;
}

.branches-next {
    right: 0;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .dmn-branches {
        min-height: 400px;
        padding: 60px;
    }

    .branches-title {
        font-size: 2em;
    }

    .branches-text {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .branches-slider-wrapper {
        padding: 0 45px;
    }

    .branches-items {
        gap: 40px;
    }

    .branch-item {
        width: 110px;
    }

    .branch-icon {
        width: 100px;
        height: 100px;
        padding: 12px;
        gap: 6px;
    }

    .branch-icon img {
        width: 40px;
        height: 40px;
    }

    .branch-name {
        font-size: 12px;
    }
}

@media (max-width: 600px) {
    .dmn-branches {
        min-height: 350px;
        padding: 10px;
    }

    .branches-content {
        padding: 20px;
    }

    .branches-title {
        font-size: 1.75em;
        margin-bottom: 15px;
    }

    .branches-text {
        font-size: 15px;
        margin-bottom: 25px;
    }

    .branches-slider-wrapper {
        padding: 0 40px;
        margin-top: 30px;
    }

    .branches-items {
        gap: 0px;
        padding: 5px 0;
    }

    .branch-item {
        width: 85px;
        gap: 0;
    }

    .branch-icon {
        width: 75px;
        height: 75px;
        padding: 8px;
        gap: 4px;
    }

    .branch-icon img {
        width: 32px;
        height: 32px;
    }

    .branch-name {
        font-size: 11px;
        line-height: 1.3;
        margin-top: 6px;
    }

    .branches-nav {
        width: 35px;
        height: 35px;
    }

    .branches-nav svg {
        width: 20px;
        height: 20px;
    }
}

/* Wide & Full Alignment */
.alignwide .branches-content {
    max-width: var(--dmn-site-width, 1400px);
}

.alignfull {
    border-radius: 0;
}

.alignfull .branches-content {
    max-width: 100%;
}