/* ========================================
   ABOUT SECTION - 3D KERALA MAP STYLES
   Add this file: css/about-3d-map.css
   Link in index.html: <link rel="stylesheet" href="./css/about-3d-map.css">
======================================== */

/* Override/Update About Section */
.about {
    padding: 100px 0;
    background: #ffffff;
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: radial-gradient(circle at 50% 0%, rgba(227, 0, 27, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.about .container {
    position: relative;
    z-index: 1;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
    min-height: 600px;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* District Selector */
.about-district-selector {
    margin-top: 30px;
}

.selector-label {
    display: block;
    font-family: var(--font-family-primary);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.selector-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.store-dropdown {
    width: 100%;
    padding: 18px 55px 18px 24px;
    font-family: var(--font-family-primary);
    font-size: 16px;
    color: var(--color-text-primary);
    background: white;
    border: 3px solid var(--color-primary);
    border-radius: 50px;
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(227, 0, 27, 0.08);
}

.store-dropdown:hover {
    border-color: #b8002a;
    box-shadow: 0 6px 20px rgba(227, 0, 27, 0.15);
    transform: translateY(-2px);
}

.store-dropdown:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(227, 0, 27, 0.1);
}

.store-dropdown option {
    padding: 12px;
    font-size: 15px;
    background: white;
    color: var(--color-text-primary);
}

.dropdown-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.selector-wrapper:hover .dropdown-icon {
    transform: translateY(-50%) rotate(180deg);
}

/* 3D Map Container */
.about-map-3d {
    position: relative;
    width: 100%;
    height: 600px;
    background: transparent;
   /* border-radius: 24px;*/
    overflow: hidden;
   /* box-shadow: 
        0 20px 60px rgba(227, 0, 27, 0.08),
        0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(227, 0, 27, 0.05);*/
}

#kerala-3d-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#kerala-3d-container canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* ✅ ensures it scales neatly */
}
/* Loading State */
.map-loading-state {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff5f7 0%, #ffffff 50%, #fef5f7 100%);
    z-index: 100;
    transition: opacity 0.5s ease;
}

.map-loading-state.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(227, 0, 27, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spinMap 1s linear infinite;
    margin-bottom: 24px;
}

@keyframes spinMap {
    to { transform: rotate(360deg); }
}

.map-loading-state p {
    font-family: var(--font-family-primary);
    font-size: 16px;
    color: var(--color-text-caption);
    font-weight: 500;
}

/* Hide old map elements */
.about-map {
    display: none !important;
}

.map-marker {
    display: none !important;
}

/* ========================================
   RESPONSIVE - LARGE DESKTOP (1440px+)
======================================== */
@media screen and (min-width: 1440px) {
    .about-content {
        gap: 100px;
    }

    .about-map-3d {
        height: 650px;
    }
}

/* ========================================
   RESPONSIVE - TABLET (768px - 1023px)
======================================== */
@media screen and (max-width: 1023px) {
    .about {
        padding: 80px 0;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 50px;
        min-height: auto;
    }

    .about-text {
        text-align: left;
    }

    .about-map-3d {
        height: 500px;
    }

    .selector-wrapper {
        max-width: 100%;
    }
}

/* ========================================
   RESPONSIVE - MOBILE (481px - 767px)
======================================== */
@media screen and (max-width: 767px) {
    .about {
        padding: 60px 0;
    }

    .about-content {
        gap: 40px;
    }

    .about-map-3d {
        height: 450px;
        border-radius: 20px;
    }

    .store-dropdown {
        padding: 16px 50px 16px 20px;
        font-size: 15px;
    }

    .selector-label {
        font-size: 13px;
    }

    .about-district-selector {
        margin-top: 20px;
    }

    .dropdown-icon {
        right: 18px;
    }
}

/* ========================================
   RESPONSIVE - SMALL MOBILE (up to 480px)
======================================== */
@media screen and (max-width: 480px) {
    .about {
        padding: 50px 0;
    }

    .about-content {
        gap: 30px;
    }

    .about-map-3d {
        height: 380px;
        border-radius: 16px;
    }

    .store-dropdown {
        font-size: 14px;
        padding: 14px 45px 14px 18px;
    }

    .loading-spinner {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }

    .map-loading-state p {
        font-size: 14px;
    }

    .selector-wrapper {
        max-width: 100%;
    }
}



.store-label {
    position: absolute;
    background: rgba(227, 0, 27, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 500;
    pointer-events: auto;
    cursor: pointer;
    white-space: nowrap;
    transform: translate(-50%, -100%);
    margin-top: -25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    user-select: none;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tablet */
@media screen and (max-width: 1024px) {
    .store-label {
        max-width: 130px;
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .store-label {
        max-width: 110px;
        border-radius: 3px;
    }
    
    .store-label:hover {
        transform: translate(-50%, -100%) scale(1.08);
    }
}

/* Small mobile */
@media screen and (max-width: 480px) {
    .store-label {
        max-width: 90px;
        border-radius: 3px;
    }
    
    .store-label:hover {
        transform: translate(-50%, -100%) scale(1.1);
    }
}

.store-label:hover {
    background: rgba(227, 0, 27, 1);
    transform: translate(-50%, -100%) scale(1.05);
    box-shadow: 0 4px 12px rgba(227, 0, 27, 0.4);
}

.store-label:active {
    transform: translate(-50%, -100%) scale(0.98);
}

.store-label::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid rgba(227, 0, 27, 0.9);
    transition: border-top-color 0.3s ease;
}

.store-label:hover::after {
    border-top-color: rgba(227, 0, 27, 1);
}

/* Responsive map container */
#kerala-map-container {
    width: 100%;
    height: 500px;
    position: relative;
}

@media screen and (max-width: 1024px) {
    #kerala-map-container {
        height: 450px;
    }
}

@media screen and (max-width: 768px) {
    #kerala-map-container {
        height: 400px;
    }
}

@media screen and (max-width: 480px) {
    #kerala-map-container {
        height: 350px;
    }
}

/* =========================================
   MOBILE TAP INSTRUCTION
========================================= */
.mobile-tap-instruction {
    display: none; /* Hidden by default (desktop) */
    text-align: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(227, 0, 27, 0.1) 0%, rgba(227, 0, 27, 0.05) 100%);
    border: 1px solid rgba(227, 0, 27, 0.2);
    border-radius: 8px;
    margin-bottom: 20px;
    color: #e3001b;
    font-family: var(--font-family-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

/* =========================================
   RESPONSIVE BEHAVIOR
========================================= */

/* Desktop: Show dropdown, hide mobile instruction */
@media screen and (min-width: 900px) {
    .about-district-selector {
        display: block; /* Show dropdown */
    }
    
    .mobile-tap-instruction {
        display: none; /* Hide mobile instruction */
    }
}

/* Tablet and Mobile: Hide dropdown, show tap instruction */
@media screen and (max-width: 900px) {
    .about-district-selector {
        display: none; /* Hide dropdown */
    }
    
    .mobile-tap-instruction {
        display: block; /* Show tap instruction */
    }
    
    /* Optional: Adjust map height for mobile */
    #kerala-map-container {
        height: 400px !important;
    }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
    .mobile-tap-instruction {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    #kerala-map-container {
        height: 350px !important;
    }
}