/* Maps Section Styles */
.maps-section {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.maps-section::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(102, 187, 106, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.maps-section .row.align-items-start {
    align-items: stretch !important;
}

/* Ensure equal height for both columns */
.map-container-wrapper,
.license-card-wrapper {
    display: flex;
    height: 100%;
}

#map {
    height: 100%;
    min-height: 550px;
    width: 100%;
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#map:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
}

.leaflet-control-attribution {
    font-size: 15px;
    opacity: 0.5;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 8px !important;
    padding: 4px 8px !important;
}

/* Custom marker popup styling */
.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-popup-content {
    margin: 16px !important;
    font-family: inherit !important;
}

.license-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    height: 100%;
    position: relative;
    overflow: hidden;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.license-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
}

.license-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
}

.license-card .card-header {
    background: linear-gradient(135deg, rgba(102, 187, 106, 0.08) 0%, rgba(27, 94, 32, 0.05) 100%);
    border-bottom: 1px solid rgba(102, 187, 106, 0.2);
    border-radius: 0 !important;
    padding: 1.5rem 1.25rem;
}

.license-card .card-header h5 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.9rem;
    margin-bottom: 0;
    letter-spacing: -0.3px;
}

.license-card .card-body {
    padding: 2rem 1.5rem;
}

.license-stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, rgba(102, 187, 106, 0.05) 0%, rgba(27, 94, 32, 0.02) 100%);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.license-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.license-stat-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 30px rgba(27, 94, 32, 0.15);
    border-color: var(--accent-color);
}

.license-stat-card:hover::before {
    opacity: 0.05;
}

.card-info {
    position: relative;
    z-index: 1;
}

.card-info h5 {
    font-size: 3.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.license-stat-card:hover .card-info h5 {
    transform: scale(1.1);
}

.card-info .license-type {
    font-weight: 700;
    font-size: 1.45rem;
    color: var(--text-dark);
    display: block;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.card-info small {
    color: var(--text-muted);
    font-size: 1.2rem;
    line-height: 1.4;
    display: block;
}

/* Individual stat card colors */
.license-stat-card:nth-child(1):hover {
    border-color: #43a047;
}

.license-stat-card:nth-child(2):hover {
    border-color: #66bb6a;
}

.license-stat-card:nth-child(3):hover {
    border-color: #81c784;
}

.license-stat-card:nth-child(4):hover {
    border-color: #a5d6a7;
}

/* Loading state */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 20px;
}

.spinner {
    border: 4px solid rgba(102, 187, 106, 0.2);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    #map {
        height: 500px;
    }
}

@media (max-width: 992px) {
    .maps-section {
        padding: 4rem 0;
    }

    .section-header h1 {
        font-size: 3.4rem;
    }

    #map {
        height: 450px;
        margin-bottom: 2rem;
    }

    .license-card .card-body {
        padding: 1.5rem 1.25rem;
    }

    .license-stat-card {
        padding: 1.25rem 0.875rem;
    }

    .card-info h5 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .section-header h1 {
        font-size: 3rem;
    }

    .section-header p {
        font-size: 1.5rem;
    }

    #map {
        height: 400px;
        border-radius: 16px;
    }

    .card-info h5 {
        font-size: 3.4rem;
    }

    .card-info .license-type {
        font-size: 1.35rem;
    }
}

@media (max-width: 576px) {
    .maps-section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-header h1 {
        font-size: 1.75rem;
    }

    #map {
        height: 350px;
    }

    .license-card .card-header {
        padding: 1.25rem 1rem;
    }

    .license-card .card-header h5 {
        font-size: 1.1rem;
    }

    .license-stat-card {
        margin-bottom: 1rem;
    }
}