/* ================================================================
# DACOG Search Engine – System Architecture
# File: country-page.css
# Path: /static/css/country-page.css
# Version: 3.0.0
# Description: Mathematical-Unit National Profile (Light/Hero Theme)
# ================================================================*/

/* 1. Hero & Macro Header */
.country-hero-card {
    background: linear-gradient(135deg, #121212 0%, #2c3e50 100%);
    border: none;
    -webkit-border-radius: 1.25rem;
    -moz-border-radius: 1.25rem;
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
    color: #ffffff !important;
}

/* Subtle background pattern for hero */
.country-hero-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(rgba(255,255,255,0.05) 0.0625rem, transparent 0.0625rem);
    background-size: 1.25rem 1.25rem;
    pointer-events: none;
}

.country-metric-box {
    background: rgba(255,255,255,0.08);
    border: 0.0625rem solid rgba(255,255,255,0.15);
    padding: 1.5rem;
    -webkit-border-radius: 1rem;
    -moz-border-radius: 1rem;
    border-radius: 1rem;
    -webkit-backdrop-filter: blur(0.3125rem);
    backdrop-filter: blur(0.3125rem);
}

/* 2. Theme-Aware Data Cards */
.country-data-card {
    background-color: var(--dacog-bg-nav);
    border: 0.0625rem solid var(--dacog-border-color);
    -webkit-border-radius: 1rem;
    -moz-border-radius: 1rem;
    border-radius: 1rem;
    -webkit-box-shadow: var(--dacog-shadow-sm);
    -moz-box-shadow: var(--dacog-shadow-sm);
    box-shadow: var(--dacog-shadow-sm);
    padding: 1.5rem;
    overflow: hidden;
}

/* 3. Geographic Map Styling */
#countryFocusMap {
    width: 100%;
    z-index: 1;
    border-bottom: 0.0625rem solid var(--dacog-border-color);
    background-color: var(--dacog-bg-base);
}

/* Custom Marker Styling for Leaflet */
.leaflet-popup-content-wrapper {
    -webkit-border-radius: 0.5rem;
    -moz-border-radius: 0.5rem;
    border-radius: 0.5rem;
    font-family: 'Inter', Arial, sans-serif;
    padding: 0.3125rem;
    background-color: var(--dacog-bg-nav);
    color: var(--dacog-text-main);
}
.leaflet-popup-tip {
    background: var(--dacog-bg-nav);
}

/* 4. Leadership & Resources */
.country-section-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.0625rem;
    color: var(--dacog-text-main);
    display: flex;
    align-items: center;
    border-bottom: 0.0625rem solid var(--dacog-border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}

/* Fix Tables for Dark Theme */
.theme-hero .table { color: var(--dacog-text-main); }
.theme-hero .table-light { background-color: var(--dacog-border-color); color: var(--dacog-text-muted); }
.theme-hero .table > :not(caption) > * > * { border-bottom-color: var(--dacog-border-color); }

/* 5. Tiered Access & Blur System */
.content-locked-blur {
    -webkit-filter: blur(0.375rem); /* ~6px */
    filter: blur(0.375rem);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
    opacity: 0.5;
    -webkit-transition: filter 0.3s ease;
    transition: filter 0.3s ease;
}

.lock-overlay-container {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    -o-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    z-index: 10;
}

/* 6. Soft Badges & Progress */
.bg-success-soft { background-color: rgba(25, 135, 84, 0.1); color: var(--dacog-accent-green); }
.bg-primary-soft { background-color: rgba(13, 110, 253, 0.08); color: var(--dacog-accent-primary); }
.bg-info-soft { background-color: rgba(13, 202, 240, 0.1); color: #0dcaf0; }

.progress {
    background-color: var(--dacog-border-color);
    -webkit-border-radius: 0.625rem;
    -moz-border-radius: 0.625rem;
    border-radius: 0.625rem;
}

/* ==========================================================================
   7. MEDIA QUERIES (AFRICAN TARGET OPTIMIZATION)
   ========================================================================== */

@media screen and (max-width: 48em) { /* 768px */
    .country-hero-card {
        text-align: center;
        -webkit-border-radius: 0;
        -moz-border-radius: 0;
        border-radius: 0;
    }
    
    .country-hero-card .border-start {
        border-left: none !important;
        border-bottom: 0.0625rem solid rgba(255,255,255,0.2);
        padding-left: 0 !important;
        padding-bottom: 0.5rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .country-metric-box {
        margin-top: 1rem;
    }
    
    #countryFocusMap {
        height: 18.75rem !important; /* 300px */
    }
}

@media screen and (max-width: 30em) { /* 480px */
    .country-data-card {
        padding: 1.25rem;
    }
    
    .country-hero-card h1.display-4 {
        font-size: 2.5rem;
    }
    
    .table-responsive {
        border: 0.0625rem solid var(--dacog-border-color);
        -webkit-border-radius: 0.5rem;
        border-radius: 0.5rem;
    }
}