/* Prevent featured image cropping for this specific post */
.post-4127 .post-thumbnail img {
    object-fit: contain !important;
    aspect-ratio: auto !important;
    height: auto !important;
}

/* 1. Kill the 'Recent Posts' overlapping the dashboard */
.page-id-2564 #secondary, 
.page-id-2564 .sidebar, 
.page-id-2564 .widget-area,
.page-id-2564 .wp-block-post-template {
    display: none !important;
}

/* 2. Remove the Spelberg 'Two Column' Grid */
.page-id-2564 .entry-content,
.page-id-2564 .wp-site-blocks,
.page-id-2564 main {
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

/* 3. Hide the Recent Posts section if it's a Footer block */
.page-id-2564 .wp-block-group.has-background, 
.page-id-2564 footer.wp-block-template-part {
    margin-top: 100px !important; /* Pushes it down so it doesn't overlap */
    clear: both !important;
}

/* 4. Fix alignment for non-selectable blocks */
.page-id-2564 .is-layout-constrained > * {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 1. Remove the theme's decorative lines/borders */
.page-id-2564 #primary::before,
.page-id-2564 #primary::after,
.page-id-2564 .entry-header::after,
.page-id-2564 .site-main::before {
    display: none !important;
    content: none !important;
    border: none !important;
}

/* 2. Force Left Alignment and kill centered constraints */
.page-id-2564 .entry-content,
.page-id-2564 .post-content,
.page-id-2564 .wp-block-post-content {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: auto !important; /* Forces push to the left */
    padding-left: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important; /* Hard left align */
}

/* 3. Remove any hidden padding from the site blocks */
.page-id-2564 .wp-site-blocks {
    padding: 0 !important;
    gap: 0 !important;
}

/* --- 1. United Nation Demographics Dashboard FORCE THEME FLOATS TO HARD RESET --- */
/* This prevents the Recent Posts column from pulling up over the viewport box */
.vn-clear-theme-floats {
    clear: both !important;
    display: block !important;
    width: 100% !important;
    height: 30px !important;
    float: none !important;
}

/* --- 2. THE CHASSIS UNLOCK ENGINE --- */
/* Loosens parent structures explicitly on your dashboard canvas link */
.entry-content,
.wp-block-post-content,
.is-layout-constrained,
.wp-block-columns {
    max-width: 100% !important;
    width: 100% !important;
}

/* --- 3. THE SCREEN BREAKOUT ENGINE (DESKTOP) --- */
.vn-fullscreen-dashboard-v3 {
    position: relative !important;
    display: block !important;
    clear: both !important;
    float: none !important;
    
    /* Dynamically spans exactly 86% of the available monitor screen */
    width: 86vw !important;
    max-width: 86vw !important;
    
    /* Center aligns the expanded window box seamlessly */
    margin-left: calc(-43vw + 50%) !important;
    margin-right: calc(-43vw + 50%) !important;
    
    margin-top: 20px !important;
    margin-bottom: 40px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.05) !important;
    
    /* Aspect Ratio Guard: Sets height dynamically to avoid 0px CLS */
    padding-top: 48% !important; 
    height: 0 !important;
    overflow: hidden !important;
}

.vn-fullscreen-dashboard-v3 iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
}

/* --- 4. OVERRIDE THE MULTI-COLUMN CONFLICTS --- */
/* This breaks down the side-by-side grid block on desktop so sidebar drops down safely */
.wp-block-columns, 
.wp-block-column, 
aside, 
.sidebar {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-basis: 100% !important;
    float: none !important;
}

/* --- 5. RESPONSIVE PHONE & TABLET SCALING ENGINE --- */
@media (max-width: 1024px) {
    .vn-fullscreen-dashboard-v3 {
        width: 94vw !important;
        max-width: 94vw !important;
        margin-left: calc(-47vw + 50%) !important;
        margin-right: calc(-47vw + 50%) !important;
        padding-top: 72% !important; /* Adds layout depth for standard tablet layouts */
    }
}

@media (max-width: 768px) {
    .vn-fullscreen-dashboard-v3 {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        padding-top: 148% !important; /* Forces micro-charts to stack beautifully on vertical viewports */
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }
}

/* --- 1. Main Dashboard PageCORE WRAPPER BREAKOUTS --- */
.vn-hub-wrapper {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 40px auto 80px auto !important;
    padding: 0 24px !important;
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- 2. HEADER TYPOGRAPHY DESIGN --- */
.vn-hub-header {
    text-align: center;
    margin-bottom: 50px;
}

.vn-hub-title {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    color: #111827 !important;
    margin-bottom: 12px !important;
    letter-spacing: -0.025em !important;
}

.vn-hub-subtitle {
    font-size: 1.125rem !important;
    color: #4b5563 !important;
    max-width: 700px;
    margin: 0 auto !important;
    line-height: 1.6 !important;
}

/* --- 3. THE FLEXIBLE RESPONSIVE GRID GRID --- */
.vn-hub-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 32px !important;
    width: 100% !important;
}

/* --- 4. CARDS ARCHITECTURE & HOVER EFFECTS --- */
.vn-hub-card {
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    border: 1px solid #e5e7eb !important;
    text-decoration: none !important;
    overflow: hidden !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}

/* Hover Engine for Active Links */
a.vn-hub-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    border-color: #d1d5db !important;
}

/* --- 5. VISUAL THUMBNAIL CONTAINER --- */
.vn-card-image-box {
    position: relative !important;
    width: 100% !important;
    padding-top: 56.25% !important; /* Forces standard widescreen 16:9 box proportions */
    height: 0 !important;
    background: #f3f4f6 !important;
    overflow: hidden !important;
}

.vn-card-img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease !important;
}

a.vn-hub-card:hover .vn-card-img {
    transform: scale(1.04) !important;
}

/* Placeholder Skeletons for upcoming modules */
.vn-img-skeleton {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.vn-skeleton-icon {
    width: 48px;
    height: 48px;
    color: #9ca3af;
}

/* --- 6. METADATA CATEGORY BADGES --- */
.vn-badge {
    position: absolute !important;
    top: 14px !important;
    left: 14px !important;
    padding: 6px 12px !important;
    border-radius: 9999px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    z-index: 2 !important;
}

.badge-blue { background: #eff6ff !important; color: #1e40af !important; border: 1px solid #bfdbfe !important; }
.badge-green { background: #ecfdf5 !important; color: #065f46 !important; border: 1px solid #a7f3d0 !important; }
.badge-orange { background: #fff7ed !important; color: #9a3412 !important; border: 1px solid #ffedd5 !important; }

/* --- 7. CONTENT BLOCKS --- */
.vn-card-content {
    padding: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

.vn-card-title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin: 0 0 10px 0 !important;
    line-height: 1.4 !important;
}

.vn-card-description {
    font-size: 0.925rem !important;
    color: #6b7280 !important;
    line-height: 1.55 !important;
    margin: 0 0 20px 0 !important;
    flex-grow: 1 !important;
}

/* --- 8. CALL TO ACTION CARD FOOTERS --- */
.vn-card-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-top: 1px solid #f3f4f6 !important;
    padding-top: 16px !important;
    margin-top: auto !important;
}

.vn-action-text {
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    color: #2563eb !important;
    transition: color 0.2s ease !important;
}

.vn-action-icon {
    width: 16px;
    height: 16px;
    color: #2563eb;
    transition: transform 0.2s ease !important;
}

a.vn-hub-card:hover .vn-action-text { color: #1d4ed8 !important; }
a.vn-hub-card:hover .vn-action-icon { transform: translateX(4px) !important; color: #1d4ed8 !important; }

/* Non-active placeholder state rules */
.vn-card-placeholder { opacity: 0.75 !important; cursor: not-allowed !important; }
.vn-status-text { font-size: 0.825rem !important; font-style: italic !important; color: #9ca3af !important; }

/* --- 9. VIEWPORT MEDIA QUERY ENGINE (DEVICE RESPONSIVENESS) --- */

/* Tablets Viewports (Landscape & Portrait) */
@media (max-width: 1024px) {
    .vn-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 24px !important;
    }
    .vn-hub-title { font-size: 2.15rem !important; }
}

/* Smartphone Viewports */
@media (max-width: 640px) {
    .vn-hub-wrapper { padding: 0 16px !important; margin: 24px auto 40px auto !important; }
    .vn-hub-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
        gap: 24px !important;
    }
    .vn-hub-title { font-size: 1.85rem !important; }
    .vn-hub-subtitle { font-size: 1rem !important; }
    .vn-card-content { padding: 20px !important; }
}

/* Core correction to fix rendering and hide alt-text text fragments behind the card layer */
.vn-card-img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    font-size: 0 !important; /* Disappears the broken text link fragment layout while loading */
    background-color: #f3f4f6 !important;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* --- FIXED THUMBNAIL IMAGE CONFIGURATION --- */
.vn-card-img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    
    /* FIX: "contain" ensures the entire dashboard layout scales inside the card without clipping edges */
    object-fit: contain !important; 
    
    /* Adds clean inside margins so buttons don't smash against the card borders */
    padding: 12px !important; 
    box-sizing: border-box !important;
    
    /* Matches your card's background so the inner margins look completely seamless */
    background-color: #ffffff !important; 
    
    font-size: 0 !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Keeps the sleek interactive hover effect crisp and clean */
a.vn-hub-card:hover .vn-card-img {
    transform: scale(1.02) !important;
}

/* --- 1. REMOVE ONLY THE BLANK WHITE GAP (KEEP TEXT) --- */
/* This targets the exact structural empty spaces above your banner */
.page-id-2564 .site-content,
.page-id-2564 .page-content,
.page-id-2564 .content-area {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Collapses any blank padding inside the template's main layout column */
.page-id-2564 .entry-content {
    padding-top: 0 !important;
}

/* --- 2. ENSURE TEXT TITLE IS VISIBLE & FLUSH --- */
/* Forces the black cover block banner to sit flush against the black top navigation bar */
.page-id-2564 .wp-block-cover,
.page-id-2564 .wp-block-group.has-background {
    margin-top: 0 !important;
    padding-top: 40px !important; /* Gives breathing room inside the black block for your text */
    padding-bottom: 40px !important;
}

/* --- 3. SAFETY OVERRIDE RE-ENABLER --- */
/* Explicitly ensures your post title elements stay visible */
.page-id-2564 .entry-header,
.page-id-2564 .wp-block-post-title {
    display: block !important;
    visibility: visible !important;
}

/* --- EXTRA-ATTRACTIVE E-E-A-T INFORMATION CONTAINER --- */
.vn-eeat-briefcase {
    width: 86vw !important;
    max-width: 86vw !important;
    margin: 30px auto 15px auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    position: relative !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 32px !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.02);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

/* Two Column Grid Setup */
.vn-eeat-grid {
    display: grid !important;
    grid-template-columns: 1.1fr 0.9fr !important;
    gap: 40px !important;
    align-items: center !important;
}

/* Badge Indicator */
.vn-eeat-badge {
    display: inline-block !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 6px 14px !important;
    border-radius: 9999px !important;
    margin-bottom: 16px !important;
    border: 1px solid #bfdbfe !important;
}

/* Left Typography */
.vn-eeat-heading {
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    color: #0f172a !important;
    margin: 0 0 12px 0 !important;
    letter-spacing: -0.02em !important;
}

.vn-eeat-lead {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: #475569 !important;
    margin: 0 !important;
}

/* Right Column Technical Specifications Stack */
.vn-eeat-col.data-specs {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.vn-spec-card {
    display: flex !important;
    align-items: flex-start !important;
    gap: 16px !important;
    background: #f8fafc !important;
    padding: 14px 18px !important;
    border-radius: 10px !important;
    border: 1px solid #f1f5f9 !important;
}

.vn-spec-icon {
    width: 22px !important;
    height: 22px !important;
    color: #3b82f6 !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
}

.vn-spec-icon svg {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

.vn-spec-text {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

.vn-spec-text strong {
    font-size: 0.875rem !important;
    color: #1e293b !important;
    font-weight: 700 !important;
}

.vn-spec-text span {
    font-size: 0.825rem !important;
    color: #64748b !important;
    line-height: 1.4 !important;
}

/* --- DEVICE RESPONSIVENESS MEDIA QUERIES --- */

/* Tablets & Small Monitors */
@media (max-width: 1024px) {
    .vn-eeat-briefcase {
        width: 94vw !important;
        max-width: 94vw !important;
        padding: 24px !important;
    }
    .vn-eeat-grid {
        gap: 28px !important;
    }
    .vn-eeat-heading {
        font-size: 1.5rem !important;
    }
}

/* Smartphone Viewports */
@media (max-width: 768px) {
    .vn-eeat-briefcase {
        width: 100vw !important;
        max-width: 100vw !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        padding: 24px 16px !important;
        margin: 20px auto 0 auto !important;
        box-shadow: none !important;
    }
    .vn-eeat-grid {
        grid-template-columns: 1fr !important; /* Forces layout stacked as one uniform card list column */
        gap: 24px !important;
    }
    .vn-eeat-heading {
        font-size: 1.35rem !important;
    }
}