/* --- 1. GLOBAL DESIGN SYSTEM --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Montserrat:wght@700;800&display=swap');

:root {
    --primary-navy: #233959;    /* Authority & Trust */
    --accent-teal: #00A3A1;     /* Innovation */
    --muted-gold: #C5A059;      /* Sophistication */
    --bg-light: #F4F7FA;
    --bg-silver: #cdcfd3;      /* Subtle contrast for sections */
    --text-main: #2D3748;
    --muted-bg: #f3fcfa;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: #FFFFFF;
    overflow-x: hidden;
}

h1, h2, h3, .brand-font {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.5px;
}

p {
    font-size: 1rem !important;
}

.pagination .active .page-link {
    background-color: var(--primary-navy) !important;
    border-color: var(--primary-navy) !important;
    color: #ffffff !important;
}
.page-link:hover {
    background-color: var(--muted-bg);
}

/* --- SECOND TIER NAV DROPDOWNS --- */


.nav-tier-two .nav-item.dropdown.position-static {
    position: static !important;
    
}

/* --- DYNAMIC SCROLL STATE --- */

/* Base transition for the tier */
.nav-tier-two {
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Scrolled State Class */
.nav-tier-two.nav-scrolled {
    background-color: #050505 !important; /* Sleek Black */
    border-bottom: 1px solid #1a1a1a;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
}

/* Update links to white on scroll */
.nav-tier-two.nav-scrolled .nav-link {
    color: #ffffff !important;
}

.nav-search-input:focus {
    box-shadow: none !important;
    outline: none;
}

.nav-tier-two .nav-item {
    color: var(--text-main);
    font-weight: 600;
    transition: color 0.2s ease;
    font-size: 1rem;
    padding: 1rem 0; /* More vertical space for dropdown */}




/* Update the custom chevron to white on scroll */
.nav-tier-two.nav-scrolled .nav-link.dropdown-toggle::after {
    border-top-color: #ffffff;
    border-right-color: #ffffff;
}

/* Handle Search Input visibility on dark background */
.nav-tier-two.nav-scrolled .nav-search-input {
    color: #ffffff !important;
    border-bottom-color: rgba(255, 255, 255, 0.2) !important;
}

.nav-tier-two.nav-scrolled .nav-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.nav-tier-two.nav-scrolled .bi-search {
    color: #ffffff !important;
}

/* Ensure mega menus stay readable (they stay white for contrast) */
.nav-tier-two.nav-scrolled .mega-menu {
    border-top: 3px solid var(--accent-teal);
    background: #ffffff;
}

/* If the nav-link is 'active/show', it remains navy, so it pops against the black */
.nav-tier-two.nav-scrolled .nav-link.show {
    background-color: var(--primary-navy) !important;
}
.nav-tier-two .mega-menu {
    width: 100vw;
    left: 0;
    right: 0;
    margin-top: 0;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
    padding: 3rem 0; /* Generous vertical air */
    background: #ffffff;
}

.mega-menu h6 {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary-navy);
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.mega-menu-link {
    display: block;
    font-size: 0.8rem; /* Small text */
    color: #4A5568;
    text-decoration: none;
    padding: 0.6rem 0; /* Wide gaps between items */
    transition: color 0.2s ease;
}

.mega-menu-link:hover {
    color: var(--accent-teal);
}

/* 4. Active State Button (From your screenshot) */
.nav-tier-two .nav-link.show {
    background-color: var(--primary-navy) !important;
    color: #ffffff !important;
}

/* Flip chevron when open */
.nav-tier-two .nav-link.show::after {
    transform: rotate(-45deg); /* Flips up */
    margin-top: 0.3em;
}



/* Divider line for news section */
.mega-menu-divider {
    border-top: 1px solid #e2e8f0;
    margin: 1.5rem 0;
}

.nav-link {
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

/* --- 2. HERO SECTION (Identity & Impact) --- */
.hero-wrapper {
    /* High-end architectural background with deep navy overlay */
    background: linear-gradient(135deg, rgba(11, 31, 58, 0.92) 0%, rgba(11, 31, 58, 0.8) 100%), 
                url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=2070'); 
    background-size: cover;
    background-position: center;
    color: white;
    padding: 160px 0 120px;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}

.hero-tagline {
    color: var(--accent-teal);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.btn-premium {
    background-color: var(--accent-teal);
    color: white;
    border: none;
    padding: 15px 35px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-premium:hover {
    background-color: #008a88;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    color: white;
}

.btn-premium-outline {
    border: 1px solid var(--bg-light) !important;
    color: white;
    border: none;
    padding: 15px 35px;
    font-weight: 500;
    transition: var(--transition);
}

/* --- 3. GEOGRAPHIC TRUST BAR --- */
.geo-footprint {
    background: var(--bg-light);
    margin-top: -50px;
    z-index: 10;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 30px;
}

.flag-capsule {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-navy);
    padding: 8px 15px;
    border-right: 1px solid #b6c4cc;
}


/* --- 4: IDENTITY & VALUES  --- */
.identity-container {
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
    border: none;
}

/* Background Image Column with Overlay */
.values-bg-overlay {
    background: linear-gradient(rgba(11, 31, 58, 0.85), rgba(11, 31, 58, 0.85)), 
                url('https://images.unsplash.com/photo-1552664730-d307ca884978?q=80&w=1080');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 60px !important;
}


.sleek-heading {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-teal);
    margin-bottom: 25px;
}

.vision-mission-text {
    font-size: 0.95rem; /* Reduced from fs-5 */
    font-weight: 300;
    line-height: 1.7;
    opacity: 0.85;
}

.sleek-strip {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
}

.sleek-strip i {
    font-size: 0.9rem;
    width: 30px;
}

.vision-card-sleek {
    background-color: var(--primary-navy);
    color: white;
    padding: 60px !important;
    height: 100%;
}


/* --- 5. PUBLISHING CHANNELS (Content Portals) --- */

.channel-card-sleek {
    background: #FFFFFF;
    border: 1px solid #edf2f7;
    padding: 40px 30px;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important; /* Entire card is now the link */
    display: block;
    border-radius: 0; /* Industrial sharp look */
}

.channel-card-sleek:hover {
    background-color: var(--primary-navy);
    transform: translateY(-5px);
    border-color: var(--primary-navy);
}

.channel-icon-sleek {
    font-size: 1.8rem;
    color: var(--accent-teal);
    margin-bottom: 25px;
    display: block;
    transition: color 0.3s ease;
}

.channel-title-sleek {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.channel-desc-sleek {
    font-size: 1rem;
    color: #718096;
    line-height: 1.6;
    margin: 0;
    transition: color 0.3s ease;
}

/* Hover state overrides */
.channel-card-sleek:hover .channel-title-sleek,
.channel-card-sleek:hover .channel-desc-sleek {
    color: #FFFFFF;
}

.channel-card-sleek:hover .channel-icon-sleek {
    color: #FFFFFF;
}

/* --- STAGE 6: BOLD SUBJECT BLOCK --- */
.subject-grid {
    position: relative;
    background-color: var(--accent-teal); /* Deep Slate - High contrast from body white */
    padding: 80px 0;
    overflow: hidden;
}

/* Hard-edged geometric overlays for professional distinction */
.subject-grid::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 45%;
    height: 100%;
    background: rgba(0, 163, 161, 0.2); /* Subtle Teal tint */
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
    z-index: 1;
}

.subject-grid::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    background: rgba(255, 255, 255, 0.09);
    clip-path: polygon(0 0, 100% 0, 50% 100%, 0% 100%);
    z-index: 1;
}

.subject-grid .container {
    position: relative;
    z-index: 5;
}

/* Sharp-edged, low-height cards */
.subject-item {
    background-color: #FFFFFF;
    border-radius: 0 !important; /* Force remove roundedness */
    padding: 24px !important;    /* Reduced padding for compact look */
    border: none;
    border-left: 4px solid var(--accent-teal);
    height: 100%;
    transition: all 0.3s ease;
}

.subject-item:hover {
    transform: translateX(5px);
    background-color: #F8FAFC;
}

.subject-title-area h2 {
    color: #FFFFFF;
    font-size: 2.2rem;
    letter-spacing: -1px;
}

.subject-title-area p {
    color: #A0AEC0; /* Faded grey for contrast */
}




/* --- 7. FOOTER & CONTACT --- */
.footer-sleek {
    background-color: #F9FAFB; /* Ultra-light fresh grey */
    border-top: 1px solid #E5E7EB;
    padding-top: 80px;
    padding-bottom: 40px;
    color: #4B5563;
}

/* Institutional Headings */
.footer-sleek h6 {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-navy);
    margin-bottom: 25px;
}

/* Crisp Link Styling */
.footer-link {
    font-size: 0.95rem;
    color: #6B7280;
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
    margin-bottom: 12px;
    font-weight: 400;
}

.footer-link:hover {
    color: var(--accent-teal);
    transform: translateX(3px);
}

.footer-brand-text {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #4B5563;
    max-width: 400px;
}

/* Social Icon Circles */
.social-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #E5E7EB;
    color: var(--primary-navy);
    transition: all 0.3s ease;
    font-size: 1rem;
    text-decoration: none;
}

.social-icon-btn:hover {
    background-color: var(--accent-teal);
    color: #ffffff;
    border-color: var(--accent-teal);
    transform: translateY(-3px);
}

/* Bottom Legal Bar */
.footer-bottom {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #E5E7EB;
}

.legal-link {
    font-size: 0.75rem;
    color: #9CA3AF;
    text-decoration: none;
    margin-right: 25px;
    transition: color 0.2s ease;
}

.legal-link:hover {
    color: var(--primary-navy);
}

.back-to-top-sleek {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary-navy);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #E5E7EB;
    padding: 10px 20px;
    background: #fff;
    transition: all 0.2s ease;
}

.back-to-top-sleek:hover {
    background: var(--primary-navy);
    color: #fff;
}

/* ===============================

MICRO-UI: LIGHT NOIR EDITOR 

=================================--- */

.editor-card-noir {
    background: #FFFFFF;
    border: 1px solid var(--bg-silver);
    padding: 1.5rem !important; /* Reduced from p-5 */
}

/* Stark Small Labels */
.micro-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--primary-navy);
    display: block;
    margin-bottom: 4px;
    opacity: 0.8;
}

/* Compact Inputs */
.compact-input {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.6rem !important;
    border-radius: 0 !important;
    border: 1px solid #d1d5db !important;
    background-color: #fcfcfc !important;
    height: auto !important;
}

.compact-input:focus {
    border-color: var(--accent-teal) !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
}

/* Form Section Headers */
.section-divider-noir {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--accent-teal);
    border-bottom: 1px solid rgba(0, 163, 161, 0.2);
    padding-bottom: 3px;
    margin-bottom: 12px;
    margin-top: 5px;
}

/* Compact Checkbox Group */
.category-scroll-zone {
    max-height: 140px; /* Limits vertical growth */
    overflow-y: auto;
    padding: 10px;
    background: var(--bg-light);
    border: 1px solid var(--bg-silver);
}

.micro-check-label {
    font-size: 0.7rem;
    color: var(--text-main);
    cursor: pointer;
}

/* Fixed Footer for Save Button to save space */
.editor-footer {
    padding-top: 15px;
    margin-top: 10px;
    border-top: 1px solid #eee;
}


/*+++++============================================

    BROWSE / LISTING PAGE STYLES 

=============================================+++++*/    

.browse-wrapper-light {
    background-color: var(--bg-light);
    color: var(--text-main);
    min-height: 100vh;
    padding: 60px 0;
}

/* SIDEBAR: Silver Glassmorphism */
.filter-sidebar-light {
    background: rgba(205, 207, 211, 0.4); /* Based on --bg-silver */
    backdrop-filter: blur(8px);
    border: 1px solid rgba(11, 31, 58, 0.05);
    padding: 25px;
    position: sticky;
    top: 100px;
    border-radius: 0;
}

.filter-header-light {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-navy);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-teal);
    display: inline-block;
    padding-bottom: 4px;
}

.filter-link-light {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid rgba(11, 31, 58, 0.03);
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(11, 31, 58, 0.09);
}

.filter-link-light:hover {
    color: var(--accent-teal);
    background: var(--muted-bg);
    padding: 10px;

}

/* LISTING: Precision Industrial Grid */
.list-strip-industrial {
    display: grid;
    /* Desktop Default */
    grid-template-columns: 200px 1fr 200px 100px 40px;
    gap: 20px;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid rgba(11, 31, 58, 0.05);
    margin-bottom: -1px;
    padding: 20px;
    text-decoration: none !important;
    transition: var(--transition);
    overflow: hidden; /* Prevent internal breaks */
}

.list-strip-industrial:hover {
    z-index: 2;
    background-color: var(--muted-bg);
    border-color: var(--muted-gold);
    box-shadow: 0 10px 30px rgba(11, 31, 58, 0.05);
    transform: scale(1.005);
}

/* Compact Thumbnail Boundary */
/* --- UPDATED: INDUSTRIAL NOIR THUMBNAIL BOUNDARY --- */
.thumb-boundary {
    width: 200px;
    height: 105px;
    background: var(--primary-navy); /* Navy background to host the silver/white logos */
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate; /* Create stacking context for mix-blend-mode */
    transition: var(--transition);
}

.thumb-boundary img {
    width: 85%; /* Breathability for logos */
    height: auto;
    max-height: 80%;
    object-fit: contain; /* Maintain logo proportions without cropping */
    
    /* Standard Logo Treatment: Silver/White silhouette */
    filter: brightness(0) invert(1) opacity(0.8);
    transition: var(--transition);
}

/* Specific logic for Complex Logos (e.g. Peace Education) */
.thumb-boundary img.logo-complex {
    /* Prevent overflow and ensure proportional fit */
    width: auto;
    height: auto;
    max-width: 95%;
    max-height: 95%;
    
    /* Mix-blend-mode: screen works best when the image is fully contained */
    filter: grayscale(1) brightness(1.2) contrast(1.1) !important;
    mix-blend-mode: screen; 
    opacity: 0.9;
}

/* Hover State Alignment */
.list-strip-industrial:hover .thumb-boundary {
    border-color: var(--accent-teal);
    background: #0d2545; /* Slight glow in the box */
}

.list-strip-industrial:hover .thumb-boundary img {
    filter: brightness(0) invert(1) opacity(1);
    transform: scale(1.05);
}

.list-strip-industrial:hover .thumb-boundary img.logo-complex {
    filter: grayscale(0) brightness(1.1) !important;
    mix-blend-mode: normal;
}

/* High-Density Typography */
.list-title-stark {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-navy);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.2px;
}

.list-tag-tech {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--accent-teal);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

.list-author-stark {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 1px solid var(--bg-silver);
    padding-left: 20px;
}

.list-date-stark {
    font-family: 'monospace'; /* Futurist feel */
    font-size: 0.75rem;
    color: var(--muted-gold);
    text-align: right;
    font-weight: 600;
}

.chevron-stark {
    color: var(--bg-silver);
    text-align: right;
    transition: var(--transition);
}

.list-strip-industrial:hover .chevron-stark {
    color: var(--muted-gold);
    transform: translateX(3px);
}

/* Sorting & Header Stats */
.browse-header-stats {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary-navy);
    opacity: 0.6;
    letter-spacing: 1px;
}

/* Custom Scrollbar for Neo-Futurist feel */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0F172A; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #F59E0B; }

/* Tablet / Small Laptop (MD to LG) */
@media (max-width: 1200px) {
    .list-strip-industrial {
        grid-template-columns: 150px 1fr 180px 40px;
        gap: 15px;
    }
    .list-date-stark {
        display: none; /* Hide date on tablet to save horizontal space */
    }
}

/* Mobile View (Below MD) */
@media (max-width: 768px) {
    .list-strip-industrial {
        grid-template-columns: 80px 1fr; /* Thumb + Title only */
        padding: 15px;
        gap: 15px;
    }

    /* Hide high-density metadata that causes overflow */
    .list-author-stark, 
    .list-date-stark, 
    .chevron-stark {
        display: none;
    }

    /* Shrink the thumbnail boundary for mobile */
    .thumb-boundary {
        width: 80px !important;
        height: 100px !important;
        flex: 0 0 80px !important;
    }

    .list-title-stark {
        font-size: 0.9rem;
        -webkit-line-clamp: 3; 
        line-clamp: 3;
/* Allow title to wrap more on mobile */
    }
}

@media (max-width: 1200px) {
    .thumb-boundary { flex: 0 0 150px; }
}




/* ----------------------------

    FLASH MESSAGES (ALERTS & NOTIFICATIONS)

----------------------------- */
.flash-overlay {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 100%;
    max-width: 500px;
    pointer-events: none;
}

.flash-alert {
    pointer-events: auto;
}


/* --------------------------

SUBMISSION GRID: INDUSTRIAL NOIR 

------------------------------ */

.submission-grid-container {
    padding: 20px;
    background-color: #061121; /* Slightly darker than primary navy */
}

.submission-card-noir {
    position: relative;
    background-color: var(--primary-navy);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    height: 100%;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1;
    border-radius: 0; /* Industrial Sharpness */
}

/* Subtle Geometric Overlay inside the card */
.submission-card-noir::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 163, 161, 0.15) 0%, rgba(0, 163, 161, 0) 100%);
    clip-path: polygon(40% 0, 100% 0, 100% 100%, 0% 100%);
    z-index: -1;
}

.submission-card-noir:hover {
    background-color: #0d2545;
    border-color: var(--accent-teal);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Hover effect for the internal geometry */
.submission-card-noir:hover::before {
    background: linear-gradient(135deg, rgba(0, 163, 161, 0.25) 0%, rgba(0, 163, 161, 0.05) 100%);
}

.submission-title-noir {
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.4;
    margin-bottom: 15px;
}

.submission-btn-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent-teal);
    text-transform: uppercase;
}

.submission-card-noir .logo-preview {
    max-height: 45px;
    filter: brightness(0) invert(1) opacity(0.8); /* Make logo white/silver for dark bg */
    transition: var(--transition);
}

.submission-card-noir:hover .logo-preview {
    filter: brightness(0) invert(1) opacity(1);
    transform: scale(1.05);
}

/* --- Support for Logos with Dark Backgrounds --- */

/* Reset inversion for complex logos */
.submission-card-noir .logo-preview.logo-complex {
    filter: grayscale(1) brightness(1.3) contrast(1.2) !important;
    mix-blend-mode: screen; /* This drops the dark background of the logo automatically */
    transform: scale(1.1); /* Give complex logos a bit more presence */
}

/* Ensure the container doesn't crop the blend effect */
.submission-card-noir {
    isolation: isolate; /* Creates a new stacking context for blend modes */
}

/* Hover state for complex logos */
.submission-card-noir:hover .logo-preview.logo-complex {
    filter: grayscale(0) brightness(1.1) !important; /* Restore color on hover if desired */
    mix-blend-mode: normal;
}

/* -----------------------------------------------

SIDE STRIP NOIR (For Stacked Cards) 

------------------------------------------------- */
.side-strip-noir {
    position: relative;
    background-color: #061121;
    
    /* Force exact uniform width across all cards */
    flex: 0 0 400px; 
    width: 400px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
}

/* Ensure the parent card is a flex container */
.bg-white.border.transition-hover.d-flex {
    display: flex !important;
}

/* The signature geometric teal overlay from the submission cards */
.side-strip-noir::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 163, 161, 0.12) 0%, rgba(0, 163, 161, 0.3) 60%);
    clip-path: polygon(0 0, 100% 0, 30% 100%, 0% 100%);
    z-index: -1;
}

/* Hover effect: The geometry "glows" slightly when the whole card is hovered */
.transition-hover:hover .side-strip-noir::before {
    background: linear-gradient(135deg, rgba(0, 163, 161, 0.2) 0%, rgba(0, 163, 161, 0.05) 80%);
}

/* Logo treatments within the Noir side strip */
.side-strip-noir .logo-preview {
    max-height: 55px;
    width: auto;
    filter: brightness(0) invert(1) opacity(0.85); /* Standard Silver/White */
    transition: var(--transition);
}

/* Handle Peace Education style logos */
.side-strip-noir  .logo-preview.logo-complex {
    filter: grayscale(1) brightness(1.4) contrast(1.1) !important;
    mix-blend-mode: screen;
    max-height: 70px;
}

/* Interactions */
.transition-hover:hover .side-strip-noir .logo-preview {
   
    transform: scale(1.05);
}


.side-strip-noir-journal{
    position: relative;
    background-color: #061121;
    
    /* Force exact uniform width across all cards */
    flex: 0 0 400px; 
    width: 200px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
}


.side-strip-noir-journal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 163, 161, 0.12) 0%, rgba(0, 163, 161, 0.3) 60%);
    clip-path: polygon(0 0, 100% 0, 70% 100%, 0% 100%);
    z-index: -1;
}

.side-strip-noir-journal img {
    width: 100%; /* Breathability for logos */
    height: auto;
    max-height: 80%;
    object-fit: contain; /* Maintain logo proportions without cropping */
    
    /* Standard Logo Treatment: Silver/White silhouette */
    filter: brightness(0) invert(1) opacity(0.8);
    transition: var(--transition);
}
.side-strip-noir-journal  .logo-preview.logo-complex {
    filter: grayscale(1) brightness(1.4) contrast(1.1) !important;
    mix-blend-mode: screen;
    max-height: 70px;
}

/* Ensuring the geometric overlay spans the full width of the detail card block */
.col-md-7 .side-strip-noir-journal::before {
    clip-path: polygon(0 0, 100% 0, 70% 100%, 0% 100%);
}
/* --===========================================-

404 ERROR PAGE: SLEEK REFACTOR 

=======================================--- */

.error-wrapper-noir {
    min-height: 80vh;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-light);
}

/* Background Geometry for 404 */
.error-geometry {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.error-geometry::before {
    content: "";
    position: absolute;
    top: -10%;
    right: -5%;
    width: 50%;
    height: 120%;
    background: linear-gradient(135deg, rgba(0, 163, 161, 0.05) 0%, rgba(0, 163, 161, 0) 100%);
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
}

.error-geometry::after {
    content: "";
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 40%;
    height: 80%;
    background: linear-gradient(45deg, rgba(11, 31, 58, 0.03) 0%, rgba(11, 31, 58, 0) 100%);
    clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%);
}

.mt-n5 {
    margin-top: -3.5rem !important; /* Overlap effect for the large 404 text */
}

/* Custom Search Input focus for 404 */
.error-wrapper-noir .compact-input:focus {
    border-color: var(--accent-teal) !important;
    background-color: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 163, 161, 0.1) !important;
}


/* --- RESPONSIVE NAV REFINEMENTS --- */

/* Mobile Toggler Icon Customization */
.navbar-toggler:focus {
    box-shadow: none;
}

@media (max-width: 991.98px) {
    /* Collapse the 'airy' padding for mobile stacking */
    .nav-tier-two .nav-link {
        padding: 12px 20px !important;
        border-bottom: 1px solid #f0f0f0;
    }

    /* Transform Mega Menu into a clean vertical list for mobile */
    .nav-tier-two .mega-menu {
        width: 100% !important;
        position: relative !important;
        box-shadow: none;
        padding: 20px !important;
        background-color: var(--bg-light);
    }
    
    .nav-tier-two .mega-menu .row {
        flex-direction: column;
    }

    /* Adjust the sticky scroll background for mobile */
    .nav-tier-two.nav-scrolled {
        background-color: #050505 !important;
    }
    
    .nav-search-input {
        margin-bottom: 10px;
    }
}

/* Ensure the sticky-top doesn't overlap content on very small screens */
@media (max-width: 576px) {
    .navbar-brand img {
        height: 32px;
    }
}

/* ---

RESPONSIVE OPTIMIZATION

 --- */
@media (max-width: 992px) {
    .hero-wrapper { text-align: center; clip-path: none; padding: 100px 0; }
    .vision-card { border-radius: 4px; margin-top: 30px; }
    .flag-capsule { border-right: none; border-bottom: 1px solid #eee; }
}