/* ==========================================================================
   RUSTIC Working Area & Geographic Footprint - Modern Dedicated Stylesheet
   Integrates with shushilan-theme.css & rustic-polish.js
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Working Area Hero Section
   -------------------------------------------------------------------------- */
.working-hero {
    position: relative;
    background: linear-gradient(135deg, #092015 0%, #12402a 50%, #0f2e48 100%);
    color: #ffffff;
    padding: 70px 0 65px;
    overflow: hidden;
}

.working-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: radial-gradient(circle at 85% 20%, rgba(34, 197, 94, 0.15) 0%, transparent 60%),
                radial-gradient(circle at 15% 85%, rgba(56, 189, 248, 0.12) 0%, transparent 50%);
    pointer-events: none;
}

.working-hero .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 18px;
    font-size: 0.88rem;
}

.working-hero .breadcrumb a {
    color: #86efac;
    text-decoration: none;
    transition: color 0.2s ease;
}

.working-hero .breadcrumb a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.working-hero .breadcrumb-item.active {
    color: #e2e8f0;
}

.working-hero .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.4);
    content: "/";
}

.hero-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fef08a;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 9999px;
    margin-bottom: 16px;
}

.working-hero-title {
    font-size: 2.65rem;
    font-weight: 800;
    line-height: 1.18;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.working-hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #cbd5e1;
    max-width: 820px;
    margin-bottom: 30px;
}

/* Hero Stats Ribbon */
.hero-stats-ribbon {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-top: 25px;
}

.hero-stat-pill {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 14px 18px;
    text-align: left;
    transition: transform 0.25s ease, background 0.25s ease;
}

.hero-stat-pill:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
}

.stat-pill-num {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-pill-num .accent-green {
    color: #4ade80;
}

.stat-pill-num .accent-gold {
    color: #facc15;
}

.stat-pill-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   2. Geographic Command Center & Map Spotlight
   -------------------------------------------------------------------------- */
.working-section {
    padding: 65px 0;
    position: relative;
    opacity: 1 !important;
    visibility: visible !important;
}

.working-section .map-spotlight-card,
.working-section .district-dossier-card,
.working-section .demographic-table-card,
.working-section .policy-card {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.section-tag-clean {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 5px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.tag-forest {
    background: #ecfdf5;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.tag-navy {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.tag-gold {
    background: #fefce8;
    color: #a16207;
    border: 1px solid #fef08a;
}

.section-title-bold {
    font-size: 2.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.section-desc-lead {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #475569;
    margin-bottom: 24px;
}

/* Map Card Layout */
.map-spotlight-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.map-spotlight-card:hover {
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.map-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.map-header-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.map-frame-wrapper {
    position: relative;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    text-align: center;
    padding: 12px;
}

.map-image-display {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    transition: transform 0.4s ease;
    cursor: zoom-in;
}

.map-frame-wrapper:hover .map-image-display {
    transform: scale(1.02);
}

.map-zoom-hint {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Map Color Legend */
.map-legend-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    padding: 6px 12px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.legend-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-khulna {
    background: #84cc16; /* Light green on map */
    box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.25);
}

.dot-bagerhat {
    background: #ec4899; /* Bright pink/magenta on map */
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.25);
}

.dot-satkhira {
    background: #eab308; /* Yellow on map */
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.25);
}

/* Executive Quotation Callout */
.mandate-quote-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ecfdf5 100%);
    border-left: 5px solid #166534;
    border-radius: 0 14px 14px 0;
    padding: 24px 28px;
    margin: 22px 0 28px;
    box-shadow: 0 4px 14px rgba(22, 101, 52, 0.05);
}

.mandate-quote-text {
    font-size: 1.12rem;
    font-weight: 600;
    line-height: 1.7;
    color: #12402a;
    font-style: italic;
    margin-bottom: 10px;
}

.mandate-quote-author {
    font-size: 0.86rem;
    font-weight: 700;
    color: #15803d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --------------------------------------------------------------------------
   3. Group Organization Pillars & Community Evolution
   -------------------------------------------------------------------------- */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.pillar-item-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.pillar-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

.pillar-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 14px;
}

.icon-forest {
    background: #ecfdf5;
    color: #15803d;
}

.icon-navy {
    background: #f0f9ff;
    color: #0284c7;
}

.icon-gold {
    background: #fefce8;
    color: #ca8a04;
}

.icon-purple {
    background: #faf5ff;
    color: #9333ea;
}

.pillar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.pillar-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #475569;
    margin: 0;
}

/* --------------------------------------------------------------------------
   4. District-Specific Flagship Dossier Cards
   -------------------------------------------------------------------------- */
.filter-tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.district-tab-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 9px 20px;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.district-tab-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.district-tab-btn.active {
    background: #12402a;
    color: #ffffff;
    border-color: #12402a;
    box-shadow: 0 4px 14px rgba(18, 64, 42, 0.25);
}

.district-tab-btn.active .tab-badge-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.tab-badge-count {
    background: #e2e8f0;
    color: #475569;
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 9999px;
    font-weight: 800;
}

.district-dossier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.district-dossier-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.district-dossier-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.card-top-banner {
    padding: 22px 24px 18px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}

.banner-khulna {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-top: 4px solid #16a34a;
}

.banner-bagerhat {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border-top: 4px solid #db2777;
}

.banner-satkhira {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border-top: 4px solid #ca8a04;
}

.district-pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.tag-khulna-badge {
    background: #166534;
    color: #ffffff;
}

.tag-bagerhat-badge {
    background: #9d174d;
    color: #ffffff;
}

.tag-satkhira-badge {
    background: #854d0e;
    color: #ffffff;
}

.district-card-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.district-card-meta {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.card-body-content {
    padding: 22px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.district-stat-chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 18px;
    text-align: center;
}

.stat-chip-box {
    display: flex;
    flex-direction: column;
}

.chip-num {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.chip-sub {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}

.card-activities-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #334155;
}

.activity-item i {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.activity-item strong {
    color: #0f172a;
}

/* --------------------------------------------------------------------------
   5. 2024-2025 Demographic Data Table
   -------------------------------------------------------------------------- */
.demographic-table-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
    padding: 28px;
    margin-bottom: 45px;
}

.table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.table-toolbar-search {
    position: relative;
    max-width: 380px;
    width: 100%;
}

.table-toolbar-search input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.9rem;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.table-toolbar-search input:focus {
    border-color: #166534;
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.15);
}

.table-toolbar-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
}

.table-responsive-custom {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.data-table-modern {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    text-align: left;
    background: #ffffff;
    margin: 0;
}

.data-table-modern thead th {
    background: #092015;
    color: #ffffff;
    padding: 14px 16px;
    font-weight: 700;
    font-size: 0.86rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border: none;
    white-space: nowrap;
}

.data-table-modern thead th.sub-header {
    background: #12402a;
    font-size: 0.8rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.data-table-modern tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
}

.data-table-modern tbody tr:hover {
    background-color: #f8fafc;
}

.data-table-modern td {
    padding: 12px 16px;
    color: #334155;
    vertical-align: middle;
}

.district-badge-cell {
    font-weight: 800;
    font-size: 0.96rem;
    border-right: 1px solid #e2e8f0;
    vertical-align: top;
}

.upazila-name-cell {
    font-weight: 700;
    color: #0f172a;
}

.numeric-cell {
    text-align: center;
    font-weight: 600;
}

.total-cell-highlight {
    font-weight: 800;
    color: #12402a;
    background: #f0fdf4;
    text-align: center;
}

.gender-split-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
    display: flex;
    margin-top: 5px;
}

.split-female {
    background: #ec4899;
    height: 100%;
}

.split-male {
    background: #0284c7;
    height: 100%;
}

/* Total Summary Row */
.data-table-modern tfoot tr {
    background: #092015;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.98rem;
}

.data-table-modern tfoot td {
    padding: 16px;
    border: none;
    color: #ffffff;
}

.data-table-modern tfoot .total-numeric {
    text-align: center;
    color: #facc15;
    font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   6. Vulnerability (HCP) & Revolving Loan Fund (RLF) Protocols
   -------------------------------------------------------------------------- */
.policy-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 30px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    height: 100%;
}

.policy-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.policy-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.policy-card-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.policy-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.policy-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #475569;
}

.policy-checklist li i {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 3px;
}

/* --------------------------------------------------------------------------
   7. Map Lightbox Modal
   -------------------------------------------------------------------------- */
.map-lightbox-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.map-lightbox-modal.active {
    display: flex;
}

.lightbox-content-box {
    position: relative;
    max-width: 1100px;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.lightbox-close-btn {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 40px;
    height: 40px;
    background: #ffffff;
    color: #0f172a;
    border: 2px solid #0f172a;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: transform 0.2s ease, background 0.2s ease;
}

.lightbox-close-btn:hover {
    transform: scale(1.1);
    background: #0f172a;
    color: #ffffff;
}

.lightbox-image {
    max-height: 80vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-caption {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 14px;
}

/* --------------------------------------------------------------------------
   8. Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .working-hero-title {
        font-size: 2.15rem;
    }
    .hero-stats-ribbon {
        grid-template-columns: repeat(2, 1fr);
    }
    .section-title-bold {
        font-size: 1.85rem;
    }
}

@media (max-width: 767px) {
    .working-hero {
        padding: 45px 0;
    }
    .working-hero-title {
        font-size: 1.75rem;
    }
    .hero-stats-ribbon {
        grid-template-columns: 1fr;
    }
    .map-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .demographic-table-card {
        padding: 16px 12px;
    }
    .data-table-modern th, .data-table-modern td {
        padding: 10px 8px;
        font-size: 0.82rem;
    }
    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .table-toolbar-search {
        max-width: 100%;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .hero-stat-pill, .map-spotlight-card, .pillar-item-card, .district-dossier-card, .map-image-display {
        transition: none !important;
        transform: none !important;
    }
}
