/* ================================
   RESET & BASE
================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    /* Colors from existing design */
    --green-base: #66d84a;
    --green-dark: #1b410f;
    --blue-centre: #0047aa;
    --blue-dark: #15508c;
    
    /* Premium palette */
    --bg-dark: #1e382b;
    --bg-darker: #ffffff;
    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    
    /* Premium Glass & Glows */
    --glass-bg: rgba(0, 71, 165, 0.15);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-highlight: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    
    /* Easing */
    --ease-premium: cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ================================
   MAP SECTION - BASE
================================ */
/* ================================
   MAP SECTION - BASE (UPDATED)
================================ */
.bhumi-map-section {
    position: relative;
    z-index: 2;
    padding: 0;
    isolation: isolate;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-light);
    
    /* 👇 NEW: Solid dark background instead of the forest image */
    background-color: #08110b; 
}
/* NOTE: Delete the old .bhumi-map-section::before block entirely! */
/* ================================
   NEW: TEXT BOX VIDEO BACKGROUND
================================ */

/* ================================
   NEW: FULL LEFT PANEL VIDEO
================================ */
.full-panel-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;       /* This stretches the video all the way to the top */
    object-fit: cover;  /* Ensures it fills the space perfectly */
    z-index: 0;         /* Keeps it behind the glass text box */
    pointer-events: none;
    opacity: 0.8;       /* You can adjust this to make it brighter or darker */
    transition: opacity 0.3s ease;
}

/* Ensure the text box stays at the bottom and on top of the video */
.panel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2; 
    /* Remove overflow: hidden if you had it here before */
}

/* Ensure text inside the box stays readable */
.panel-content h2,
.panel-content p,
.panel-meta,
.panel-stats {
    position: relative;
    z-index: 2;
}

/* ================================
   CONTAINER LAYOUT
================================ */

.map-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    min-height: 100vh;
    padding: 0;
    position: relative;
    z-index: 2;
}

/* ================================
   LEFT PANEL: INFO
================================ */

.info-panel {
    position: relative;
    overflow: hidden;
    background: transparent;
    opacity: 0;
    transition: opacity 0.8s var(--ease-premium);
}

.info-panel.active {
    opacity: 1;
}

.info-panel-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.panel-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 65%;
    overflow: hidden;
    opacity: 0;
    transform: scale(1.08);
    transition: opacity 1s var(--ease-premium),
                transform 1.2s var(--ease-premium);
}

.info-panel.active .panel-image-wrapper {
    opacity: 1;
    transform: scale(1);
}

.panel-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Richer gradient mask for smooth blending */
    background: linear-gradient(
        to bottom, 
        rgba(30, 56, 43, 0) 0%, 
        rgba(20, 36, 28, 0.6) 50%,
        rgba(15, 28, 21, 1) 100%
    );
    z-index: 1;
}

.panel-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) contrast(1.1);
}

.panel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4rem 3.5rem;
    z-index: 2;
    
    /* 👇 FULLY TRANSPARENT 👇 */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: none;
    box-shadow: none;
    /* 👆 ================== 👆 */
    
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s var(--ease-premium) 0.3s,
                transform 0.8s var(--ease-premium) 0.3s;
}

.info-panel.active .panel-content {
    opacity: 1;
    transform: translateY(0);
}

.panel-content h2 {
    font-family: 'Syne', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    background: linear-gradient(to right, #ffffff, #a3c2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.04em;
    filter: drop-shadow(0 4px 15px rgba(0,0,0,0.4));
}

.panel-meta {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.6rem;
    margin-bottom: 2rem;
    border-radius: 50px;
    background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(20px);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2), inset 0 1px 1px rgba(255,255,255,0.3);
}

.panel-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.85);
    margin-bottom: 3rem;
    max-width: 95%;
    font-weight: 400;
}

/* ================================
   STATISTICS GRID & CARDS
================================ */

.panel-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-item {
    position: relative;
    overflow: hidden;
    padding: 1.6rem;
    background: linear-gradient(135deg, rgba(0, 71, 170, 0.15), rgba(0, 40, 100, 0.25));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    transition: all 0.5s var(--ease-premium);
    cursor: default;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2), inset 0 1px 1px rgba(255,255,255,0.15);
}

/* The Sweep Shine Effect */
.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: all 0.75s var(--ease-premium);
    z-index: 1;
}

.stat-item:hover {
    transform: translateY(-8px) scale(1.02);
    background: linear-gradient(135deg, rgba(0, 71, 170, 0.3), rgba(0, 50, 120, 0.4));
    border-color: rgba(255,255,255,0.3);
    box-shadow: 
        0 20px 40px rgba(0, 71, 170, 0.2), 
        inset 0 1px 1px rgba(255,255,255,0.4);
}

.stat-item:hover::before {
    left: 200%;
}

.stat-item strong {
    position: relative;
    z-index: 2;
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #8bb4ff;
    margin-bottom: 0.6rem;
    font-weight: 700;
}

.stat-item span {
    position: relative;
    z-index: 2;
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-light);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* ================================
   RIGHT PANEL: MAP
================================ */

.map-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    pointer-events: auto;  
    
    /* 👇 MOVED HERE: Forest background is now ONLY on the right half */
    background-image: 
        radial-gradient(circle at center, rgba(30, 56, 43, 0.4) 0%, rgba(10, 20, 15, 0.95) 100%),
        url("assets/images/forest-bg.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Subtle green/blue gradient only for the right side */
.map-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 216, 74, 0.05), rgba(0, 71, 170, 0.05));
    pointer-events: none;
    z-index: 1;
}

.map-wrapper {
    width: 100%;
    max-width: 2000px;
    aspect-ratio: 1;
    z-index: 2;
    position: relative;
    pointer-events: auto;
    /* Richer map shadow */
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.5)) drop-shadow(0 0 100px rgba(102, 216, 74, 0.1));
    animation: floatMap 8s ease-in-out infinite;
}

@keyframes floatMap {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

/* ================================
   SVG MAP STYLING & INTERACTIONS
================================ */

#india-map {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: auto;
}

#india-map path {
    fill: var(--green-base);
    stroke: var(--green-dark);
    stroke-width: 0.6;
    cursor: pointer;
    transition: fill 0.3s var(--ease-premium), 
                stroke 0.3s var(--ease-premium), 
                stroke-width 0.3s var(--ease-premium),
                filter 0.3s var(--ease-premium);
    pointer-events: all !important; 
}

/* General hover for non-active states */
#india-map path:hover:not(.centre-state) {
    fill: #7be85f; /* Slightly lighter green */
    filter: drop-shadow(0 0 8px rgba(102, 216, 74, 0.4));
}

/* Centre State active/highlight style */
#india-map path.centre-state {
    fill: var(--blue-centre);
    stroke: #ffffff;
    stroke-width: 0.8;
    cursor: pointer;
    transition: all 0.4s var(--ease-premium);
}

/* Pulsing glow for centre states */
@keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 8px rgba(0, 113, 255, 0.4)); }
    50% { filter: drop-shadow(0 0 18px rgba(0, 113, 255, 0.8)); }
    100% { filter: drop-shadow(0 0 8px rgba(0, 113, 255, 0.4)); }
}

#india-map path.centre-state {
    animation: pulseGlow 4s infinite alternate;
}

#india-map path.centre-state:hover {
    fill: #1a63cc;
    stroke-width: 1.2;
    filter: drop-shadow(0 0 20px rgba(0, 113, 255, 0.9)) !important;
}

/* Super active state (when clicked or targeted) */
#india-map path.centre-state.active-highlight {
    fill: #ffffff !important; 
    stroke: var(--blue-centre);
    stroke-width: 1.8;
    filter: drop-shadow(0 0 25px rgba(255, 255, 255, 1)) !important;
}

/* ================================
   HOVER CARD (TOOLTIP)
================================ */

.hover-card {
    position: absolute;
    pointer-events: none !important; 
    z-index: 100;
    
    /* Premium frosted tooltip */
    background: rgba(15, 25, 35, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.15);
    border-top: 1px solid rgba(255,255,255,0.4); /* Highlight top edge */
    border-radius: 16px;
    padding: 1.5rem;
    
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.5), 
        0 0 0 1px rgba(255,255,255,0.05),
        inset 0 1px 0 rgba(255,255,255,0.2);
        
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s var(--ease-premium), 
                transform 0.3s var(--ease-premium); 
                
    min-width: 280px;
    max-width: 320px;
}

/* Little glowing dot/accent on the card */
.hover-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20px;
    width: 30px;
    height: 2px;
    background: #0047aa;
    box-shadow: 0 0 10px #0047aa, 0 0 20px #66d84a;
    border-radius: 5px;
}

.hover-card.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hover-card h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-light);
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    position: relative;
}

.hover-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--green-base);
    border-radius: 2px;
}

.hover-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    margin: 0;
}

/* ================================
   OPTIONAL: MAP CARD WRAPPER
   (Enhanced just in case it's used as a background panel)
================================ */

.map-card {
    padding: 2rem;
    border-radius: 32px;
    background: linear-gradient(145deg, rgba(24, 87, 163, 0.15), rgba(10, 30, 60, 0.25));
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.25),
        0 40px 80px rgba(0,0,0,0.5);
    color: #fff;
    /* Removed z-index:-5 to prevent click issues, handled via DOM order ideally */
    position: relative;
}

/* ================================
   RESPONSIVE DESIGN (Preserved layout)
================================ */

@media (max-width: 1024px) {
    .map-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    
    .info-panel {
        order: 2;
    }
    
    .map-panel {
        order: 1;
        padding: 2rem;
    }
    
    .panel-content {
        padding: 3rem 2.5rem;
        position: relative;
        background: linear-gradient(135deg, rgba(25, 45, 35, 0.85), rgba(15, 30, 22, 0.95));
        border-top: none; /* Smooth flow on mobile */
    }
    
    .panel-image-wrapper {
        height: 100%;
    }
    
    .panel-content h2 {
        font-size: 2.4rem;
    }
    
    /* Disable float on tablet/mobile to save performance */
    .map-wrapper {
        animation: none;
    }
}

@media (max-width: 768px) {
    .map-panel {
        padding: 1.5rem;
    }
    
    .panel-content {
        padding: 2.5rem 1.5rem;
    }
    
    .panel-content h2 {
        font-size: 2rem;
    }
    
    .panel-stats {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .hover-card {
        min-width: 240px;
        padding: 1.2rem;
    }
    
    .hover-card h3 {
        font-size: 1.15rem;
    }
    
    .hover-card p {
        font-size: 0.9rem;
    }
}

/* ================================
   ENTRANCE ANIMATIONS
================================ */

@keyframes fadeInUpPremium {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.stat-item {
    animation: fadeInUpPremium 0.8s var(--ease-premium) forwards;
    opacity: 0;
}

.stat-item:nth-child(1) { animation-delay: 0.4s; }
.stat-item:nth-child(2) { animation-delay: 0.5s; }
.stat-item:nth-child(3) { animation-delay: 0.6s; }
.stat-item:nth-child(4) { animation-delay: 0.7s; }