/**
 * elephant_census.css
 * Scoped styling for the Elephant Census & Corridor Management Dashboard
 */

.ec-page {
    --forest:     #0a2e1a;
    --emerald:    #059669;
    --gold:       #f1c40f;
    --cream:      #f9f6ef;
    --fog:        #e8f0e9;
    --ink:        #0f1c10;
    --white:      #ffffff;
    --blue:       #1e3a8a;
    --light-blue: #3b82f6;
    --ease:       cubic-bezier(0.16, 1, 0.3, 1);

    background: var(--cream);
    color: var(--ink);
    font-family: 'Open Sans', sans-serif;
    padding-bottom: 90px;
    overflow-x: hidden;
}

.ec-wrap {
    padding: 0 5%;
    max-width: 1400px;
    margin: 0 auto;
}

/* === HEADER / PAGE HERO === */
/* strictly inherits standard page-hero 150px from theme */
.ec-header-desc {
    text-align: center;
    max-width: 800px;
    margin: 30px auto 40px auto;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #475569;
}
.ec-title-bar {
    width: 80px;
    height: 4px;
    background: var(--gold);
    border-radius: 2px;
    margin: 20px auto 45px auto;
}

.ec-section-title {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    color: var(--forest);
    letter-spacing: -.02em;
    line-height: 1.1;
    margin-bottom: 8px;
    text-align: center;
}

.ec-section-subtitle {
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    color: #475569;
    max-width: 650px;
    line-height: 1.6;
    margin: 0 auto 40px auto;
    text-align: center;
}

/* === 1. ELEPHANT CENSUS INTERACTIVE DUNG SIMULATOR === */
.ec-census-panel {
    background: radial-gradient(circle at 20% 30%, #152d1d 0%, #06150c 100%);
    color: #adcfb8;
    border-radius: 30px;
    padding: 40px;
    border: 1px solid rgba(5,150,105,0.25);
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    margin-bottom: 60px;
}
.ec-census-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}
@media (max-width: 1024px) {
    .ec-census-grid {
        grid-template-columns: 1fr;
    }
}
.ec-count-board {
    background: rgba(0,0,0,0.3);
    border: 1px dashed rgba(241,196,15,0.3);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    position: relative;
}
.ec-big-num {
    font-family: 'Courier New', Courier, monospace;
    font-size: 5rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(241,196,15,0.5);
    transition: all 0.5s ease;
}
.ec-click-zone {
    width: 100%;
    height: 180px;
    background: rgba(255,255,255,0.03);
    border: 2px dashed rgba(5,150,105,0.3);
    border-radius: 16px;
    margin: 20px 0;
    position: relative;
    cursor: crosshair;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background 0.3s ease;
}
.ec-click-zone:hover {
    background: rgba(255,255,255,0.05);
}
.ec-click-zone-text {
    pointer-events: none;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--emerald);
    letter-spacing: 0.05em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.ec-dung-node {
    position: absolute;
    width: 28px;
    height: 28px;
    background: #5c3a21;
    border: 2px solid #3d2514;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #fff;
    font-weight: 800;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    animation: dungPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes dungPopIn {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* === 2. INTERACTIVE MIGRATION CORRIDORS MAP SIMULATOR === */
.ec-corridor-card {
    background: #091a11;
    color: #adcfb8;
    border-radius: 30px;
    padding: 40px;
    border: 1px solid rgba(5,150,105,0.2);
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
    margin-bottom: 60px;
}
.ec-corridors-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 40px;
}
@media (max-width: 1024px) {
    .ec-corridors-grid {
        grid-template-columns: 1fr;
    }
}

.ec-tabs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ec-tab-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: #adcfb8;
    padding: 20px;
    border-radius: 16px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s var(--ease);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ec-tab-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--emerald);
    transform: translateY(-2px);
}
.ec-tab-btn.active {
    background: rgba(5,150,105,0.12);
    border-color: var(--emerald);
    box-shadow: 0 5px 20px rgba(5,150,105,0.2);
}
.ec-tab-btn-title {
    font-weight: 800;
    color: var(--white);
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.ec-tab-btn-meta {
    font-size: 0.76rem;
    color: #7a9c84;
}

/* SC priority corridor stamp indicator */
.ec-priority-stamp {
    background: var(--gold);
    color: var(--forest);
    font-size: 0.65rem;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(241,196,15,0.3);
}

/* SVG Active Map Screen */
.ec-map-screen {
    background: #040d08;
    border: 1px solid #142e1d;
    border-radius: 24px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    min-height: 480px;
}
.ec-map-head {
    border-bottom: 1px solid #142e1d;
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--emerald);
}
.ec-map-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 5px;
}
.ec-map-details {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #adcfb8;
    margin-bottom: 20px;
}
.ec-stat-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.ec-stat-box {
    background: rgba(0,0,0,0.3);
    border: 1px solid #142e1d;
    padding: 12px 20px;
    border-radius: 12px;
}
.ec-stat-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gold);
}
.ec-stat-lbl {
    font-size: 0.72rem;
    color: #7a9c84;
}

/* The SVG Visual Crossover Canvas */
.ec-svg-canvas {
    width: 100%;
    height: 180px;
    background: rgba(5,150,105,0.02);
    border: 1px solid #112d1b;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}
/* Safe passage green path glow */
.ec-svg-path {
    stroke-dasharray: 8;
    animation: dashLoop 1.5s infinite linear;
}
@keyframes dashLoop {
    to { stroke-dashoffset: -16; }
}

/* Safe passage elephant crossing */
.ec-crossing-elephant {
    position: absolute;
    font-size: 2.2rem;
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
    filter: drop-shadow(0 2px 10px rgba(5,150,105,0.5));
}
.ec-crossing-elephant.crossing {
    animation: crossingLoop 6s infinite linear;
}
@keyframes crossingLoop {
    0% { left: -50px; opacity: 0; transform: translateY(-50%) scale(0.8); }
    5% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: calc(100% + 50px); opacity: 0; transform: translateY(-50%) scale(1); }
}

.ec-sc-priority-stamp {
    position: absolute;
    right: 20px;
    bottom: 20px;
    border: 3px double var(--gold);
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 900;
    padding: 8px 18px;
    border-radius: 10px;
    transform: rotate(-10deg);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: priorityPulse 1.5s infinite alternate;
    background: rgba(241,196,15,0.05);
}
@keyframes priorityPulse {
    0% { transform: rotate(-10deg) scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(241,196,15,0.2); }
    100% { transform: rotate(-10deg) scale(1.05); opacity: 1; box-shadow: 0 0 15px 4px rgba(241,196,15,0.4); }
}

/* === 3. BILATERAL DIALOGUE SUMMIT CONSOLE === */
.ec-dialogue-panel {
    background: radial-gradient(circle at 90% 10%, #10243e 0%, #050d18 100%);
    border-radius: 30px;
    padding: 50px;
    border: 1px solid rgba(59,130,246,0.2);
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
    margin-bottom: 60px;
    color: #a4b5cf;
}
.ec-dialogue-head {
    text-align: center;
    margin-bottom: 40px;
}
.ec-dialogue-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 10px;
}
.ec-timeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    position: relative;
}
.ec-timeline::before {
    content: '';
    position: absolute;
    top: 30px; left: 10%; right: 10%;
    height: 3px;
    background: rgba(59,130,246,0.15);
    z-index: 1;
}
.ec-timeline-node {
    text-align: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
}
.ec-timeline-dot {
    width: 60px; height: 60px;
    background: #0a1320;
    border: 3px solid #1a2a40;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    font-size: 1.1rem;
    font-weight: 800;
    color: #4b5f7e;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.ec-timeline-node.active .ec-timeline-dot {
    background: var(--light-blue);
    border-color: #93c5fd;
    color: var(--white);
    box-shadow: 0 0 20px rgba(59,130,246,0.6);
    transform: scale(1.1);
}
.ec-timeline-node.completed .ec-timeline-dot {
    background: var(--emerald);
    border-color: #86efac;
    color: var(--white);
}
.ec-timeline-year {
    font-weight: 800;
    color: var(--white);
    font-size: 0.95rem;
    margin-bottom: 5px;
}
.ec-timeline-lbl {
    font-size: 0.72rem;
    color: #6c82a3;
}

/* Summit detailed panel */
.ec-summit-box {
    background: #030810;
    border: 1px solid #10243e;
    border-radius: 20px;
    padding: 35px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.ec-summit-desc {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #a4b5cf;
}
.ec-summit-ratify-btn {
    background: var(--light-blue);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
    margin-top: 25px;
    box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}
.ec-summit-ratify-btn:hover {
    background: #2563eb;
    box-shadow: 0 6px 20px rgba(59,130,246,0.5);
    transform: translateY(-2px);
}
.ec-summit-ratify-btn.ratified {
    background: #10b981;
    color: #fff;
    box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}

/* === 4. PARALLEL IMAGE UPLOAD CARDS (USER REQUEST) === */
.ec-parallel-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 60px;
}
@media (max-width: 768px) {
    .ec-parallel-row {
        grid-template-columns: 1fr;
    }
}
.ec-img-card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--fog);
    box-shadow: 0 15px 35px rgba(0,0,0,0.04);
    transition: all 0.4s var(--ease);
    position: relative;
}
.ec-img-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}
.ec-img-frame {
    height: 300px;
    overflow: hidden;
    position: relative;
}
.ec-img-frame img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}
.ec-img-card:hover .ec-img-frame img {
    transform: scale(1.08);
}
.ec-img-info {
    padding: 25px;
}
.ec-img-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--forest);
    margin-bottom: 6px;
}
.ec-img-cap {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
}

/* Legal Authority directive strip */
.ec-directive-bar {
    background: var(--white);
    border-radius: 20px;
    padding: 24px 30px;
    border: 1px solid var(--fog);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}
.ec-directive-title {
    font-weight: 800;
    color: var(--forest);
    font-size: 0.95rem;
}
.ec-directive-tag {
    background: rgba(59,130,246,0.06);
    color: var(--blue);
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 800;
    border: 1px solid rgba(59,130,246,0.15);
}
