/* Branches Page Styles */

/* Hero Section */
.branches-hero {
    background: linear-gradient(135deg, #0d5a26 0%, #117331 25%, #1a8f42 50%, #117331 75%, #0d5a26 100%);
    padding: 50px 20px;
    text-align: center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.branches-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.branches-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: clamp(10px, 0.85vw, 12px);
    letter-spacing: 2.5px;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0.95;
    text-align: center;
}

.branches-hero h1 {
    font-size: clamp(32px, 3.5vw, 42px);
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    line-height: 1.2;
    color: #FFD700;
}

.hero-description {
    font-size: clamp(13px, 1vw, 15px);
    opacity: 0.95;
    line-height: 1.6;
    text-align: center;
    max-width: 550px;
    margin: 0 auto;
}

/* Map Section */
.map-section {
    background-color: #e8e8e8;
    padding: 0;
}

.map-container {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    filter: brightness(1.1) contrast(1.1);
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.15) 100%);
}

.map-badge {
    background: white;
    padding: 12px 25px;
    border-radius: 40px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid #FFD700;
    position: relative;
}

.map-badge::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 45px;
    border: 1.5px solid rgba(255, 215, 0, 0.3);
    pointer-events: none;
}

.map-badge .flag {
    font-size: 0;
    background: linear-gradient(135deg, #117331 0%, #0d5a26 100%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(17, 115, 49, 0.3);
}

.map-badge .flag svg {
    fill: white;
}

.map-badge .text {
    font-size: clamp(11px, 0.9vw, 13px);
    font-weight: 700;
    color: #1a1a1a;
}

.map-badge .locations {
    font-size: clamp(10px, 0.85vw, 12px);
    color: #666;
    font-weight: 500;
}

/* Branches Section */
.branches-section {
    background-color: white;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

/* Carousel Container */
.branches-carousel {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
}

.carousel-wrapper {
    overflow: hidden;
    position: relative;
}

.branches-grid {
    display: flex;
    gap: 30px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px 0;
    width: 100%;
    flex-wrap: nowrap;
}

/* Carousel Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 2px solid #117331;
    color: #117331;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-arrow:hover {
    background: #117331;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow.prev {
    left: 0;
}

.carousel-arrow.next {
    right: 0;
}

.carousel-arrow svg {
    width: 24px;
    height: 24px;
}

/* Branch Card */
.branch-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 30px 25px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    flex: 0 0 auto;
    min-width: calc(25% - 22.5px);
    max-width: calc(25% - 22.5px);
}

@media (max-width: 1439px) {
    .branch-card {
        min-width: calc(33.333% - 20px);
        max-width: calc(33.333% - 20px);
    }
}

@media (max-width: 1023px) {
    .branch-card {
        min-width: calc(50% - 15px);
        max-width: calc(50% - 15px);
    }
}

@media (max-width: 767px) {
    .branch-card {
        min-width: 100%;
        max-width: 100%;
    }
}

.branch-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
    border-color: #117331;
}

.branch-card.main-office {
    background: linear-gradient(135deg, #117331 0%, #0d5a26 100%);
    color: white;
    border: none;
}

.branch-card.main-office h4,
.branch-card.main-office .info-row {
    color: white;
}

.branch-card.main-office .icon {
    color: white;
}

.branch-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #FFD700;
    color: #117331;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
}

.branch-card h4 {
    font-size: clamp(18px, 1.5vw, 20px);
    color: #1a1a1a;
    margin-bottom: 20px;
    font-weight: 700;
    margin-top: 25px;
}

.branch-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: clamp(12px, 0.95vw, 13px);
    color: #555;
    line-height: 1.5;
}

.info-row .icon {
    flex-shrink: 0;
    color: #117331;
    margin-top: 2px;
}

.info-row span {
    flex: 1;
}

.btn-directions {
    width: 100%;
    padding: 12px;
    background: white;
    color: #117331;
    border: 2px solid #117331;
    border-radius: 25px;
    font-size: clamp(13px, 1vw, 14px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: block;
}

.btn-directions:hover {
    background: #117331;
    color: white;
}

.branch-card.main-office .btn-directions {
    background: white;
    color: #117331;
    border-color: white;
}

.branch-card.main-office .btn-directions:hover {
    background: #FFD700;
    color: #117331;
    border-color: #FFD700;
}

/* Responsive */
@media (min-width: 1920px) {
    /* 4K / Large Desktop */
    .branches-carousel {
        max-width: 1600px;
    }
}

@media (max-width: 1440px) {
    /* Standard Desktop */
    .branches-carousel {
        max-width: 1300px;
    }
}

@media (max-width: 1366px) {
    /* Laptop */
    .branches-carousel {
        max-width: 1200px;
    }
}

@media (max-width: 1024px) {
    /* Tablet Landscape */
    .branches-carousel {
        max-width: 900px;
        padding: 0 50px;
    }
    
    .carousel-arrow.prev {
        left: 0;
    }
    
    .carousel-arrow.next {
        right: 0;
    }
}

@media (max-width: 768px) {
    /* Tablet Portrait / Mobile Landscape */
    .branches-hero {
        padding: 40px 20px;
        min-height: 180px;
    }
    
    .map-container {
        height: 220px;
    }
    
    .branches-section {
        padding: 40px 15px;
    }
    
    .branches-carousel {
        max-width: 100%;
        padding: 0 45px;
    }
    
    .branch-card {
        padding: 25px 20px;
    }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
    }
    
    .carousel-arrow svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    /* Mobile Portrait */
    .branches-hero {
        padding: 35px 15px;
        min-height: 160px;
    }
    
    .map-container {
        height: 200px;
    }
    
    .branches-section {
        padding: 30px 10px;
    }
    
    .branches-carousel {
        padding: 0 40px;
    }
    
    .branch-card {
        padding: 20px 15px;
    }
    
    .carousel-arrow {
        width: 35px;
        height: 35px;
    }
    
    .carousel-arrow svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 375px) {
    /* Small Mobile */
    .carousel-arrow {
        width: 32px;
        height: 32px;
    }
}
