/**
 * LuxNest Branches Slider Styles
 */

/* Section Container */
.branches-section {
    position: relative;
    width: 100%;
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    overflow-x: hidden;
}

.branches-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden;
}

/* Section Header */
.branches-section .section-header {
    text-align: center;
    margin-bottom: 60px;
}

.branches-section .section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.branches-section .section-header p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Swiper Container */
.branches-swiper {
    position: relative;
    width: 100%;
    padding-bottom: 60px;
    overflow: hidden;
}

/* Swiper Slide */
.swiper-slide {
    height: auto;
}

/* Branch Card */
.branch-card {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    /* 4:3 aspect ratio */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.branch-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px);
}

/* Branch Image Background */
.branch-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.branch-card:hover .branch-image {
    transform: scale(1.1);
}

/* Gradient Overlay */
.branch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.2) 0%,
            rgba(0, 0, 0, 0.5) 60%,
            rgba(0, 0, 0, 0.75) 100%);
    transition: opacity 0.4s ease;
}

.branch-card:hover .branch-overlay {
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.3) 0%,
            rgba(0, 0, 0, 0.6) 60%,
            rgba(0, 0, 0, 0.85) 100%);
}

/* Branch Content */
.branch-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 28px;
    z-index: 10;
    color: #fff;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.branch-card:hover .branch-content {
    transform: translateY(-8px);
}

/* Branch Name */
.branch-name {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* Branch Description */
.branch-description {
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
    margin-bottom: 1rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Branch CTA */
.branch-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.branch-cta:hover {
    opacity: 1;
    gap: 12px;
}

.cta-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.branch-cta:hover .cta-arrow {
    transform: translateX(4px);
}

/* Swiper Navigation */
.branches-nav-prev,
.branches-nav-next {
    width: 56px;
    height: 56px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    color: #1a1a1a;
    z-index: 10;
}

.branches-nav-prev:hover,
.branches-nav-next:hover {
    background: #FF5B00;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(255, 91, 0, 0.3);
}

.branches-nav-prev::after,
.branches-nav-next::after {
    font-size: 22px;
    font-weight: 700;
}

.branches-nav-prev {
    left: 10px;
}

.branches-nav-next {
    right: 10px;
}

/* Swiper Pagination */
.branches-pagination {
    bottom: 0 !important;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.branches-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #ccc;
    opacity: 1;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.branches-pagination .swiper-pagination-bullet-active {
    background: #FF5B00;
    width: 32px;
    border-radius: 5px;
}

/* Responsive Styles */

/* Tablet: 2 columns */
@media (max-width: 1024px) {
    .branches-section {
        padding: 60px 0;
    }

    .branches-section .section-header {
        margin-bottom: 40px;
    }

    .branch-content {
        padding: 24px;
    }

    .branches-nav-prev {
        left: 10px;
    }

    .branches-nav-next {
        right: 10px;
    }
}

/* Mobile: 1 column */
@media (max-width: 768px) {
    .branches-section {
        padding: 50px 0;
    }

    .branches-section .section-header {
        margin-bottom: 30px;
    }

    .branch-card {
        padding-bottom: 75%;
        /* Maintain 4:3 ratio */
    }

    .branch-content {
        padding: 20px;
    }

    .branch-name {
        margin-bottom: 0.5rem;
    }

    .branch-description {
        margin-bottom: 0.75rem;
        font-size: 0.875rem;
    }

    /* Hide navigation arrows on mobile */
    .branches-nav-prev,
    .branches-nav-next {
        display: none;
    }

    .branches-swiper {
        padding-bottom: 50px;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .branches-section .container {
        padding: 0 16px;
    }

    .branch-content {
        padding: 16px;
    }
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {

    .branch-card,
    .branch-image,
    .branch-overlay,
    .branch-content,
    .branch-cta,
    .cta-arrow,
    .branches-nav-prev,
    .branches-nav-next {
        transition: none;
    }

    .branch-card:hover .branch-image {
        transform: none;
    }

    .branch-card:hover .branch-content {
        transform: none;
    }
}

/* Print styles */
@media print {

    .branches-nav-prev,
    .branches-nav-next,
    .branches-pagination {
        display: none;
    }
}