
/* Import Work Sans Font */
@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400;500;600;700&display=swap');

/* Base Styles */
.branches-container {
    font-family: var(--primary-font);
    color: #333;
}

/* Hero Section - Modern */f
.branches-hero {
    background: #ffffff;
    padding: 64px 0;
    border-bottom: 1px solid #e5e7eb;
}

.branches-hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    font-family: var(--primary-font);
    color: #111827;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.branches-hero p {
    font-size: 1.125rem;
    margin-bottom: 0;
    font-family: var(--primary-font);
    color: #6b7280;
    line-height: 1.6;
}

/* Enhanced Responsive Design - Starting from Large Desktop */

@media (max-width: 1024px) {
    .countries-section {
        padding: 0 12px;
        gap: 32px;
    }
}



@media (max-width: 768px) {
    .branches-hero {
        padding: 48px 0;
    }
    
    .branches-hero h1 {
        font-size: 1.875rem;
        line-height: 1.2;
    }
    
    .branches-hero p {
        font-size: 1rem;
    }
    
    .branches-search {
        margin: -20px 15px 30px;
        padding: 2rem 1rem;
        border-radius: 12px;
    }
    
    .branches-search .form-control {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
    
    .branches-search .btn-primary {
        padding: 14px 16px;
    }
    
    .branches-search .btn-primary span {
        display: none !important;
    }
    
    .countries-section {
        padding: 0 12px;
        gap: 32px;
    }
    
    .country-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .country-name {
        font-size: 1.4rem;
    }
    
    .country-code {
        order: -1;
        margin-left: auto;
        font-size: 0.8rem;
    }
    
    .branch-card {
        padding: 14px;
        min-height: 180px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .branch-name {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }
    
    .branch-details {
        gap: 8px;
        flex-grow: 1;
    }
    
    .branch-detail {
        font-size: 0.8rem;
    }
    
    .branch-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 10px;
        justify-content: flex-start;
    }
    
    .branches-btn {
        justify-content: center;
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}

@media (max-width: 600px) {
    .countries-section {
        gap: 24px;
    }
    
    .branch-card {
        padding: 16px;
        min-height: auto;
    }
    
    .branch-name {
        font-size: 1.1rem;
    }
    
    .branch-detail {
        font-size: 0.9rem;
    }
    
    .branch-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .branches-btn {
        flex: 1;
        min-width: calc(50% - 4px);
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .branches-hero h1 {
        font-size: 1.5rem;
    }
    
    .branches-search {
        margin: -15px 10px 20px;
        padding: 1.5rem 0.75rem;
    }
    
    .branches-search .form-control {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
    
    .branches-search .btn-primary {
        padding: 12px 14px;
        min-width: 50px;
    }
    
    .countries-section {
        padding: 0 8px;
        gap: 20px;
    }
    
    .branch-card {
        padding: 14px;
    }
    
    .country-name {
        font-size: 1.25rem;
    }
    
    .branch-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: flex-start;
    }
    
    .branches-btn {
        font-size: 0.75rem;
        padding: 8px 12px;
        flex: none;
    }
}

/* Modern Branch Detail Page */
.branch-detail-container {
    min-height: 100vh;
    background: #ffffff;
}

.branch-detail-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 32px 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}
.branches-breadcrumb ol li a {
    color: var(--primary-color) !important;
}
.branches-breadcrumb ol li.active {
    color: var(--primary-color) !important;
}
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 0.875rem;
}

.breadcrumb-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
}

.breadcrumb-link:hover {
    color: var(--primary-color);
}

.breadcrumb-flag {
    width: 16px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
}

.breadcrumb-separator {
    color: #cbd5e1;
}

.breadcrumb-current {
    color: #1e293b;
    font-weight: 500;
}

.title-section {
    margin-bottom: 0;
}

.page-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    font-family: var(--primary-font);
    letter-spacing: -0.025em;
}

.page-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    margin: 0;
    font-family: var(--primary-font);
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 16px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    margin-bottom: 48px;
}

.info-card,
.actions-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    font-family: var(--primary-font);
}

.card-content {
    padding: 24px;
}

.info-item {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon i {
    color: var(--primary-color);
    font-size: 1rem;
}

.info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    font-family: var(--primary-font);
}

.info-value {
    font-size: 1rem;
    color: #1e293b;
    font-weight: 400;
    font-family: var(--primary-font);
}

.info-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.15s ease;
}

.info-link:hover {
    color: var(--primary-hover-color);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--primary-font);
    transition: all 0.15s ease;
    cursor: pointer;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.primary-btn:hover {
    background: var(--primary-hover-color);
    border-color: var(--primary-hover-color);
    color: white;
}

.secondary-btn {
    background: white;
    color: #64748b;
    border-color: #e2e8f0;
}

.secondary-btn:hover {
    background: #f8fafc;
    color: #1e293b;
}

.success-btn {
    background: white;
    color: var(--success-color);
    border-color: var(--success-color);
}

.success-btn:hover {
    background: var(--success-color);
    color: white;
}

.info-btn {
    background: white;
    color: #3b82f6;
    border-color: #3b82f6;
}

.info-btn:hover {
    background: #3b82f6;
    color: white;
}

.map-section {
    margin-bottom: 48px;
}

.map-container {
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.map-container:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.map-header {
    margin-bottom: 24px;
}

.map-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
    font-family: var(--primary-font);
}

.map-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
    font-family: var(--primary-font);
}

.back-navigation {
    display: flex;
    gap: 16px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--primary-font);
    transition: color 0.15s ease;
}

.back-btn:hover {
    color: var(--primary-color);
}

/* Enhanced Responsive Design for Detail Page */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .header-content {
        padding: 0 12px;
    }
}

@media (max-width: 768px) {
    .branch-detail-header {
        padding: 24px 0;
    }
    
    .breadcrumb-nav {
        flex-wrap: wrap;
        font-size: 0.8rem;
    }
    
    .breadcrumb-flag {
        width: 14px;
        height: 10px;
    }
    
    .page-title {
        font-size: 1.875rem;
        line-height: 1.1;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 32px 12px;
    }
    
    .card-header {
        padding: 16px 20px;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .info-item {
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .info-icon {
        width: 36px;
        height: 36px;
    }
    
    .action-buttons {
        gap: 10px;
    }
    
    .action-btn {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
    
    .map-section {
        margin-bottom: 32px;
    }
    
    .map-container {
        height: 300px !important;
    }
    
    .back-navigation {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .breadcrumb-nav {
        font-size: 0.75rem;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .info-icon {
        width: 32px;
        height: 32px;
    }
    
    .action-btn {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    
    .map-container {
        height: 250px !important;
    }
}

/* Branches Search Section - Modern and Clean */
.branches-search {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin: -20px auto 30px;
    position: relative;
    z-index: 10;
    max-width: 900px;
}

.branches-search .input-group {
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    transition: all 0.2s ease;
}

.branches-search .input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 36, 125, 0.1);
    background: white;
}

.branches-search .form-control {
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    background: transparent;
    transition: all 0.2s ease;
    height: auto;
    border-radius: 50px;
    font-family: var(--primary-font);
}

.branches-search .form-control:focus {
    background: transparent;
    box-shadow: none;
    border: none;
    outline: none;
}

.branches-search .btn-primary {
    border: none;
    font-weight: 500;
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    margin: 4px;
    min-width: 40px;
    height: calc(100% - 8px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: var(--primary-font);
}

.branches-search .btn-primary:hover {
    background: var(--primary-hover-color);
    transform: none;
    box-shadow: none;
}

.branches-search .btn-outline-secondary {
    border-radius: 50px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #4b5563;
    transition: all 0.2s ease;
}

.branches-search .btn-outline-secondary:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #1f2937;
}

/* Icon Button for View All Countries */
.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    margin: 0 auto;
}

.btn-icon i {
    font-size: 1rem;
    line-height: 1;
}

.branches-search .btn-icon {
    width: 40px;
    height: 40px;
}

/* Search Section - Clean Design */
.search-section {
    background: white;
    padding: 40px 0;
}

.search-form {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 2rem;
    margin-top: -25px;
    position: relative;
    z-index: 3;
    border: 1px solid var(--border-light);
}

.search-input {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: var(--primary-font);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 36, 125, 0.15);
    outline: none;
}

.search-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-weight: 500;
    color: white;
    transition: background-color 0.3s ease;
    font-family: var(--primary-font);
}

.search-btn:hover {
    background: var(--primary-hover-color);
    color: white;
}

/* Country Filter */
.country-filter {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
    font-family: var(--primary-font);
}

.country-filter:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 36, 125, 0.15);
    outline: none;
}

/* Modern Branches Layout */
.countries-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}



.country-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.country-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.country-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}

.country-flag {
    width: 40px;
    height: auto !important;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.country-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    font-family: var(--primary-font);
    letter-spacing: -0.02em;
}

.country-code {
    background: #f1f5f9;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--primary-font);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Branch Grid - Branches side by side (2 columns) */
.branch-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
}

/* Branch Grid Responsive */
@media (max-width: 768px) {
    .branch-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (max-width: 480px) {
    .branch-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Branch Cards */
.branch-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateY(10px);
}

.branch-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.branch-card.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #cbd5e1;
}

/* Branch Name */
.branch-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px 0;
    font-family: var(--primary-font);
    display: flex;
    align-items: center;
    gap: 8px;
}

.branch-name i {
    color: var(--primary-color);
    font-size: 1rem;
}

/* Branch Details */
.branch-details {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.branch-detail {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    color: #64748b;
    font-family: var(--primary-font);
    line-height: 1.5;
}

.branch-detail i {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.contact-info {
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.875rem;
    color: #6b7280;
    font-family: var(--primary-font);
    transition: color 0.15s ease-in-out;
}

.contact-item:hover {
    color: var(--primary-color);
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item i {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    color: #9ca3af;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-item:hover i {
    color: var(--primary-color);
}

.contact-item strong {
    color: #374151;
    font-weight: 500;
}

/* Branch Actions */
.branch-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

/* Icon Only Buttons - Simple and Clean */
.branches-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    font-size: 0;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 50%;
    border: 1px solid;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    position: relative;
    line-height: 1;
    vertical-align: middle;
}

.branches-btn i {
    font-size: 0.75rem;
    line-height: 1;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", "FontAwesome", sans-serif;
    font-weight: 900;
}

/* Hide button text, show only icons */
.branches-btn .d-none,
.branches-btn .d-sm-inline,
.branches-btn span:not(.sr-only) {
    display: none !important;
}

/* Tooltip for icon buttons */
.branches-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.branches-btn[data-bs-toggle="tooltip"]:hover::after {
    content: attr(data-bs-original-title);
}

/* Button Variants */
.btn-outline-primary {
    background: #ffffff;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: none;
    box-shadow: none;
}

.btn-outline-success {
    background: #ffffff;
    color: var(--success-color);
    border-color: var(--success-color);
}

.btn-outline-success:hover {
    background: var(--success-color);
    color: #ffffff;
    transform: none;
    box-shadow: none;
}

.btn-outline-info {
    background: #ffffff;
    color: #3b82f6;
    border-color: #3b82f6;
}

.btn-outline-info:hover {
    background: #3b82f6;
    color: #ffffff;
    transform: none;
    box-shadow: none;
}

/* Map Styles */
.map-container {
    margin-top: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#map-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#map-modal .modal-dialog {
    max-width: 800px;
    width: 90%;
}

#map-modal .modal-content {
    border-radius: 15px;
    overflow: hidden;
}

#map-modal .modal-header {
    background: #667eea;
    color: white;
    border-bottom: none;
}

#map-modal .btn-close {
    color: white;
    opacity: 1;
}

/* Loading States */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.spinner-border {
    color: #667eea;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-results i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.no-results h3 {
    color: #999;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-form {
        margin-top: -30px;
        padding: 1.5rem;
    }
    
    .country-header {
        flex-direction: row;
        align-items: flex-start;
        text-align: center;
    }
    
    .country-flag {
        margin-bottom: 1rem;
        margin-right: 0;
    }
    
    .country-name {
        font-size: 1.5rem;
    }
    
    .branch-card-body {
        padding: 1.5rem 1rem;
    }
    
    .branch-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: flex-start;
    }
    
    .btn-branch {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .branches-hero {
        padding: 60px 0;
    }
    
    .branches-hero h1 {
        font-size: 2rem;
    }
    
    .search-section {
        padding: 40px 0;
    }
    
    .branches-grid {
        padding: 60px 0;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Lazy Loading */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

img.lazy.loaded {
    opacity: 1;
}

/* Print Styles */
@media print {
    .branches-hero {
        background: #f8f9fa !important;
        color: #333 !important;
    }
    
    .search-section,
    .branch-actions {
        display: none !important;
    }
    
    .branch-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Branches Map Section */
.branches-map-section {
    margin-bottom: 3rem;
}
.branches-map-section h2 {
    color: var(--primary-color);
}
.branches-map-container {
    position: relative;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: #e9ecef;
}

#branches-map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.branches-map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.05) 100%);
    pointer-events: none;
    z-index: 2;
}

.map-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.map-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.map-control-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.map-control-btn:active {
    transform: translateY(0);
}

/* Custom Map Marker Styles for Leaflet */
.custom-div-icon {
    background: none !important;
    border: none !important;
}

.custom-marker {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.marker-icon {
    width: 28px;
    height: 28px;
    background-color: var(--primary-color);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: relative;
    border: 2px solid white;
}

.marker-text {
    color: white;
    font-size: 10px;
    font-weight: bold;
    transform: rotate(45deg);
    text-align: center;
    line-height: 1;
}

.marker-pulse {
    background: rgba(var(--primary-color-rgb), 0.2);
    border-radius: 50%;
    height: 14px;
    width: 14px;
    position: absolute;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.1);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Leaflet Popup Overrides */
.leaflet-popup-content-wrapper {
    border-radius: 10px !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-popup-content {
    margin: 15px !important;
    font-family: var(--primary-font), sans-serif !important;
}

.leaflet-popup-tip {
    background: white !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
}

.branch-popup .leaflet-popup-close-button {
    color: var(--primary-color) !important;
    font-size: 18px !important;
    padding: 4px 8px !important;
}

.branch-info-popup {
    font-family: var(--primary-font), sans-serif;
}

.branch-info-popup .popup-header h4 {
    color: var(--primary-color) !important;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.branch-info-popup .popup-content {
    line-height: 1.5;
}

.branch-info-popup .popup-actions a {
    background: var(--primary-color) !important;
    color: white !important;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.branch-info-popup .popup-actions a:hover {
    background: var(--primary-hover-color) !important;
    transform: translateY(-1px);
}

/* Responsive adjustments for buttons and map */
@media (max-width: 768px) {
    .branches-map-container {
        height: 350px;
        margin-bottom: 20px;
    }
    
    .map-controls {
        bottom: 15px;
        right: 15px;
        gap: 8px;
    }
    
    .map-control-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .branch-actions {
        gap: 0.5rem;
        justify-content: center;
    }
    
    .branch-actions  {
        display: flex;
        align-items: center;
        gap: 8px;   
        flex-wrap: nowrap;
    }
    
    .branch-actions i {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .branches-map-container {
        height: 300px;
        border-radius: 10px;
    }
    
    .map-control-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Nearest Branch Button Styles - Simple & Clean */
.nearest-branch-section {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
}

.nearest-branch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

.nearest-branch-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.nearest-branch-btn:hover::before {
    left: 100%;
}

.nearest-branch-btn:hover {
    background: var(--primary-hover-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    color: white;
}

.nearest-branch-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nearest-branch-btn:disabled {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(160, 174, 192, 0.3);
}

.nearest-branch-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.nearest-branch-btn:hover i {
    transform: scale(1.1);
}



/* Responsive adjustments */
@media (max-width: 768px) {
    .nearest-branch-section {
        margin: 1.5rem 0;
        padding: 0.75rem;
    }
    
    .nearest-branch-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .nearest-branch-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
}