/* Global styles for the entire dashboard (layout, navigation, typography, responsive design, theme colors). */
/* ===================================
   AI Humanitarian Ethics Monitor - Main Styles
   Color Scheme: Black, White, and Grays
   =================================== */

/* ===================================
   CSS Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

/* Prevent horizontal overflow globally */
body, html {
    max-width: 100vw;
}

/* Ensure all major containers are properly constrained */
.page, .section-container, .hero-banner, .main-content {
    max-width: 100%;
    box-sizing: border-box;
}

:root {
    /* Color Variables */
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-maroon: #8a1538;
    --color-maroon-dark: #5e0f24;
    --color-dark-gray: #111111;
    --color-medium-gray: #1f1f1f;
    --color-light-gray: #f7f4f6;
    --color-border-gray: #e6d9de;
    --color-text-gray: #4a4a4a;
    
    /* Spacing */
    --nav-height: 70px;
    --section-padding: 3rem;
    
    /* Transitions */
    --transition-smooth: all 0.3s ease;
    --transition-fast: all 0.2s ease;
}

body {
    font-family: 'Roboto';
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-medium-gray);
    background: linear-gradient(135deg, var(--color-light-gray) 0%, #ffffff 50%, #f2e9ed 100%);
    min-height: 100vh;
    text-align: justify;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* Prevent scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* ===================================
   Fixed Top Navigation
   =================================== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: transparent;
    z-index: 1000;
    transition: background 0.3s ease;
}

.top-nav.scrolled {
    background: rgba(0, 0, 0, 0.92);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    position: relative;
    width: 100%;
}

.nav-brand {
    flex: 0 1 auto;
    min-width: 0;
}

.nav-brand h1 {
    color: var(--color-white);
    font-size: clamp(1rem, 0.8rem + 1.2vw, 2rem);
    font-weight: 800;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 0.8rem;
    transition: opacity 0.3s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-link:hover {
    opacity: 0.75;
}

.nav-link.active {
    opacity: 1;
    color: var(--color-maroon);
    text-decoration: none;
}

/* Navigation Tooltip Styling */
.nav-link-with-tooltip {
    position: relative;
}

.nav-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: white;
    color: var(--color-maroon);
    padding: 10px 18px;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

.nav-link-with-tooltip:hover .nav-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Submit Content Link - Special Styling */

.nav-link-submit::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50px;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.6) 0%, 
        rgba(118, 75, 162, 0.6) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-link-submit:hover {
    color: var(--color-white);
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.nav-link-submit:hover::before {
    opacity: 0.3;
}

/* ===================================
   Mobile Hamburger Menu
   =================================== */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: transform 0.3s ease;
    position: relative;
}

.nav-hamburger:hover {
    transform: scale(1.1);
}

.nav-hamburger:focus {
    outline: 2px solid var(--color-white);
    outline-offset: 4px;
}

.nav-hamburger:focus:not(:focus-visible) {
    outline: none;
}

.nav-hamburger span {
    width: 100%;
    height: 3px;
    background: var(--color-white);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav-hamburger.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Mobile Navigation Overlay */
.nav-mobile-overlay {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
}

.nav-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===================================
   Main Content Layout
   =================================== */
.main-content {
    margin-top: 0;
    min-height: 100vh;
    padding-bottom: 5rem;
    width: 100%;
    overflow-x: hidden;
}

/* ===================================
   Page Sections
   =================================== */
.page {
    display: none;
    opacity: 0;
    min-height: 100vh;
    padding: 0;
    animation: fadeOut 0.3s ease;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.page.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    padding-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.section-container h2 {
    color: var(--color-maroon);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.section-container > p {
    color: var(--color-text-gray);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 800px;
}

/* ===================================
   Home Section - Feature Cards
   =================================== */

/* Hero Banner Styles */
.hero-banner {
    width: 100%;
    max-width: 100%;
    height: 420px;
    background-size: cover;
    background-position: center 70%;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: calc(var(--nav-height) + 2rem) 4rem 3rem 4rem;
    z-index: 1;
}

.hero-title {
    color: var(--color-white);
    font-size: clamp(1.2rem, 0.8rem + 1vw, 1.7rem);
    font-weight: 800;
    line-height: 2rem;
    padding: 5px;
    margin-bottom: 0;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    max-width: 650px;
    transition: var(--transition-smooth);
    text-align: left;
}

.hero-subtitle {
    color: var(--color-white);
    font-size: clamp(0.85rem, 0.7rem + 0.5vw, 1.1rem);
    font-weight: 400;
    line-height: 1.5rem;
    padding: 5px;
    max-width: 750px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.contributors-container .section-heading {
    color: var(--color-maroon-dark);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    
    letter-spacing: -0.5px;
}

.contributors-container .section-intro {
    color: var(--color-text-gray);
    font-size: 1.1rem;
    line-height: 1.8;
    
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

/* Tab Navigation */
.contributors-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--color-border-gray);
    padding-bottom: 0;
}

.contributors-tab:hover {
    color: var(--color-maroon);
}

.contributors-tab.active {
    color: var(--color-maroon);
    border-bottom-color: var(--color-maroon);
}

/* Tab Content Wrapper */
.contributors-content-wrapper {
    position: relative;
    min-height: 400px;
}

.contributors-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===================================
   Qatar Section Styles
   =================================== */

/* Qatar Gallery */
.qatar-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
}

.gallery-item {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: var(--transition-smooth);
    background: var(--color-white);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(138, 21, 56, 0.2);
}

.gallery-photo {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    padding: 1.2rem;
    
    color: var(--color-medium-gray);
    font-weight: 600;
    font-size: 1rem;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(247, 244, 246, 1) 100%);
}

.qatar-section-body-container{
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: flex-start;
    gap: 1.75rem;
    margin-top: 2.25rem;
}

.qatar-section-link{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    background: #ffffff;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: #333;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    overflow: hidden;
    border-radius: 0;
    box-shadow: none;
    line-height: 1.4;
}

.qatar-section-link:last-child {
    border-bottom: none;
}

.qatar-section-link::before{
    display: none;
}

.qatar-section-link::after{
    display: none;
}

.qatar-link-arrow {
    color: var(--color-maroon);
    font-size: 1rem;
    font-weight: 400;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.qatar-section-link:hover{
    background: rgba(138, 21, 56, 0.04);
    color: var(--color-maroon);
    transform: none;
    box-shadow: none;
}

.qatar-section-link:hover .qatar-link-arrow {
    transform: translateX(3px);
}

.qatar-section-link.link-active{
    background: rgba(138, 21, 56, 0.06);
    color: var(--color-maroon);
    box-shadow: none;
    transform: none;
    border-left: 3px solid var(--color-maroon);
}

.qatar-section-link.link-active .qatar-link-arrow {
    color: var(--color-maroon);
}

#qatar-analytics-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 0;
}

#qatar-analytics-container.is-hidden {
    display: none;
}

.qatar-analytics-header {
    grid-column: 1 / -1;
    
    padding: 0 0 2rem 0;
    border-bottom: none;
    margin-bottom: 1.5rem;
    background: none;
    position: relative;
}

.qatar-analytics-header::after {
    content: "";
    display: block;
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%,
        var(--color-maroon) 50%,
        transparent 100%);
    border-radius: 2px;
    margin-top: auto;
}

.qatar-analytics-header h3 {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, 
        var(--color-maroon) 0%, 
        rgba(138, 21, 56, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 1rem 0;
    letter-spacing: -0.8px;
    text-transform: uppercase;
}

.qatar-analytics-header p {
    font-size: 1.15rem;
    color: var(--color-medium-gray);
    margin: 0;
    line-height: 1.7;
    max-width: 700px;
    font-weight: 500;
}

.survey-info-grid {
    max-width: 800px;
    margin: 1.5rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.survey-info-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.survey-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-maroon);
    text-align: left;
}

.survey-value {
    font-size: 0.95rem;
    color: var(--color-medium-gray);
    line-height: 1.6;
    text-align: left;
}

/* ===================================
   Card Grid (Policies, etc.)
   =================================== */
.cards-grid {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.04);
    border-color: rgba(138, 21, 56, 0.18);
}

/* ===================================
   Case Study Cards
   =================================== */
.case-filter-card {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin: 2.5rem 0;
    padding: 2rem 2.25rem;
    border-radius: 0;
    border: none;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(247, 244, 246, 0.98) 100%);
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.case-filter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--color-maroon) 0%, 
        var(--color-maroon-dark) 50%, 
        var(--color-maroon) 100%);
}

.case-filter-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.case-filter-header h3 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.3px;
    color: #8a1538;
}

.case-filter-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.2rem;
}

.case-filter-actions .btn-ghost {
    color: var(--color-maroon);
    border: 1px solid var(--color-maroon);
    background: #ffffff;
}

.case-filter-actions .btn-ghost:hover {
    background: rgba(138, 21, 56, 0.08);
    border-color: var(--color-maroon-dark);
}

.analytics-filter-header {
    margin-bottom: 1rem;
}

.analytics-filter-header h3 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.3px;
    color: #8a1538;
}

.resource-filter-header {
    margin-bottom: 1rem;
}

.resource-filter-header h3 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: -0.3px;
    color: #8a1538;
}

.case-filter-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.case-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.case-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.case-filter-field label {
    font-size: 12pt;
    font-weight: 600;
    color: var(--color-maroon-dark);
    letter-spacing: -0.2px;
}

.case-filter-input,
.case-filter-select {
    width: 100%;
    border: 2px solid rgba(138, 21, 56, 0.12);
    border-radius: 0;
    padding: 0.85rem 1rem;
    background: var(--color-white);
    color: var(--color-medium-gray);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.case-filter-input:focus,
.case-filter-select:focus {
    outline: none;
    border-color: var(--color-maroon);
    box-shadow: 0 0 0 3px rgba(138, 21, 56, 0.1);
    background: var(--color-white);
}

.case-filter-input::placeholder {
    color: rgba(74, 74, 74, 0.5);
}

.case-filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a1538' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 12px;
    padding-right: 2.4rem;
}

/* ───────────────────────────────────
   Case Study Cards – Horizontal 2-Column
   ─────────────────────────────────── */
.case-card {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
    border-radius: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
    box-shadow: none;
    transition: border-color 0.3s ease;
}

.case-card:hover {
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.1);
}

/* ── Case left column ── */
.case-left {
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 0, 0, 0.07);
    background: #fafafa;
}

.case-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a2e;
    text-transform: uppercase;
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.case-left-meta {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.case-country-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: #555;
    gap: 0;
}

.case-country-row > span {
    white-space: nowrap;
}

.case-country-row > span + span::before {
    content: '|';
    margin: 0 0.4rem;
    color: #ccc;
    font-weight: 400;
}

.case-meta-row {
    font-size: 0.8rem;
    color: #666;
}

.case-categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin-top: 0.2rem;
}

.case-category + .case-category::before {
    content: '|';
    margin: 0 0.35rem;
    color: #ccc;
    font-weight: 400;
}

/* ── Case right column ── */
.case-right {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.case-summary {
    margin: 0;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.65;
}

.policies-ethical-principle-info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    
    padding: 2rem 1.5rem;
    border: 2px dashed #1e7048;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-white) 0%, var(--color-light-gray) 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    grid-column: 1 / -1;
}

.policies-ethical-principle-info-card-icon {
    font-size: 28px;
    color: #1e7048;
}

.policies-ethical-principle-info-card-title {
    margin: 1rem 0 0.5rem 0;
    font-size: 1.5rem;
    color: #1e7048;
}

.policies-ethical-principle-info-card-description {
    font-size: 1rem;
    color: var(--color-text-gray);
    line-height: 1.6;
}

/* ===================================
   Data & Analytics Section (restyled)
   ================================== */

.analytics-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    font-size: 1.1rem;
    color: var(--color-maroon);
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin: 2rem 0;
}

.analytics-loading i {
    font-size: 1.5rem;
}

.analytics-grid-container{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    align-items: stretch;
    transition: opacity 0.3s ease;
}

.analytics-grid-container:empty {
    display: none;
}

.analytics-card{
    position: relative;
    padding: 1.75rem;
    border-radius: 0;
    border: none;
    background: #ffffff;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    gap: 1rem;
    
    overflow: hidden;
    isolation: isolate;
}

.analytics-card-body{
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex: 1;
}

.analytics-card-body .analytics-title{
    margin: 0;
    color: #1a1a2e;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.35;
}

.analytics-card-body .analytics-description{
    margin: 0;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
    font-weight: 400;
}

.analytics-expandable-content{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
    transition: none;
    height: 100%;
    flex: 1;
}

.analytics-card-body .analytics-data-container{
    position: relative;
    border: none;
    border-radius: 0;
    padding: 1.25rem;
    background: #fafafa;
    min-height: 280px;
    display: grid;
    place-items: center;
    box-shadow: none;
}

.analytics-card-body .analytics-data-container canvas{
    width: 100% ;
    height: 100% ;
    max-height: 280px;
    position: relative;
    z-index: 1;
}

.analytics-card-body .analytics-footer{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.analytics-card-body .analytics-link{
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-maroon);
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    transition: all 0.25s ease;
}

.analytics-card-body .analytics-link:hover{
    background: rgba(138, 21, 56, 0.06);
    color: var(--color-maroon-dark);
}

.analytics-card-body .analytics-link .policy-link-arrow{
    transition: transform 0.25s ease;
}

.analytics-card-body .analytics-link:hover .policy-link-arrow{
    transform: translateX(3px);
}

.map{
    width: 100%;
    height: 280px;
    border-radius: 0;
    box-shadow: none;
    border: none;
    overflow: hidden;
}

.map:hover{
    border-color: rgba(138, 21, 56, 0.12);
}

/* ===================================
   Analytics Filters
   =================================== */
.analytics-filter-card {
    margin: 2.5rem 0;
    padding: 2rem 2.25rem;
    border-radius: 0;
    border: none;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(247, 244, 246, 0.98) 100%);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    position: relative;
    overflow: hidden;
}

.analytics-filter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--color-maroon) 0%, 
        var(--color-maroon-dark) 50%, 
        var(--color-maroon) 100%);
}

.analytics-filter-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.analytics-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.analytics-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.analytics-filter-field label {
    font-size: 12pt;
    font-weight: 600;
    color: var(--color-maroon-dark);
    letter-spacing: -0.2px;
}

.analytics-filter-input,
.analytics-filter-select {
    width: 100%;
    border: 2px solid rgba(138, 21, 56, 0.12);
    border-radius: 0;
    padding: 0.85rem 1rem;
    background: var(--color-white);
    color: var(--color-medium-gray);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.analytics-filter-input:focus,
.analytics-filter-select:focus {
    outline: none;
    border-color: var(--color-maroon);
    box-shadow: 0 0 0 3px rgba(138, 21, 56, 0.1);
    background: var(--color-white);
}

.analytics-filter-input::placeholder {
    color: rgba(74, 74, 74, 0.5);
}

.analytics-filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a1538' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 12px;
    padding-right: 2.4rem;
}

.analytics-filter-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.65rem;
}

.analytics-filter-actions .btn-ghost {
    color: var(--color-maroon);
    border: 1px solid var(--color-maroon);
    background: #ffffff;
}

.analytics-filter-actions .btn-ghost:hover {
    background: rgba(138, 21, 56, 0.08);
    border-color: var(--color-maroon-dark);
}

/* ===================================
   Resources Filters + Cards
   =================================== */

/* Resource Categories Showcase */
.resource-categories-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
}

.resource-category-card {
    height: 220px;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.resource-category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(138, 21, 56, 0.25);
}

.category-card-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    padding: 2rem;
}

.category-card-content h3 {
    color: var(--color-white);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.5);
}

.category-card-content p {
    color: var(--color-white);
    font-size: 1rem;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.resource-filter-card {
    margin: 2.5rem 0;
    padding: 2rem 2.25rem;
    border-radius: 20px;
    border: 1px solid rgba(138, 21, 56, 0.15);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(247, 244, 246, 0.98) 100%);
    box-shadow: 
        0 8px 32px rgba(138, 21, 56, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    position: relative;
    overflow: hidden;
}

.resource-filter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--color-maroon) 0%, 
        var(--color-maroon-dark) 50%, 
        var(--color-maroon) 100%);
}

.resource-filter-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.resource-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.resource-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.resource-filter-field label {
    font-size: 16pt;
    font-weight: 600;
    color: var(--color-maroon-dark);
    letter-spacing: -0.2px;
}

.resource-filter-input,
.resource-filter-select {
    width: 100%;
    border: 2px solid rgba(138, 21, 56, 0.12);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    background: var(--color-white);
    color: var(--color-medium-gray);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.resource-filter-input:focus,
.resource-filter-select:focus {
    outline: none;
    border-color: var(--color-maroon);
    box-shadow: 0 0 0 3px rgba(138, 21, 56, 0.1);
    background: var(--color-white);
}

.resource-filter-input::placeholder {
    color: rgba(74, 74, 74, 0.5);
}

.resource-filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a1538' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 12px;
    padding-right: 2.4rem;
}

.resource-filter-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.65rem;
}

.resource-filter-actions .btn-ghost {
    color: var(--color-maroon);
    border: 1px solid var(--color-maroon);
    background: #ffffff;
}

.resource-filter-actions .btn-ghost:hover {
    background: rgba(138, 21, 56, 0.08);
    border-color: var(--color-maroon-dark);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.resources-pagination,
.policies-pagination,
.cases-pagination,
.analytics-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.35rem 0 0.35rem;
    padding: 1rem 0;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.resources-pagination .btn,
.policies-pagination .btn,
.cases-pagination .btn,
.analytics-pagination .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: auto;
    padding: 0.65rem 1.8rem;
    background: #ffffff;
    color: var(--color-maroon);
    border: none;
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: none;
    transition: all 0.3s ease;
}

.resources-pagination .btn:disabled,
.policies-pagination .btn:disabled,
.cases-pagination .btn:disabled,
.analytics-pagination .btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
}

.resources-pagination .btn:not(:disabled):hover,
.policies-pagination .btn:not(:disabled):hover,
.cases-pagination .btn:not(:disabled):hover,
.analytics-pagination .btn:not(:disabled):hover {
    background: var(--color-maroon);
    color: #fff;
    border-color: var(--color-maroon);
    transform: none;
    box-shadow: none;
}

.pagination-status {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-maroon-dark);
    letter-spacing: 1px;
    min-width: 60px;
    
    padding: 0;
    background: none;
    border-radius: 0;
}

/* ───────────────────────────────────
   Resource Cards – Horizontal 2-Column
   ─────────────────────────────────── */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(680px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.resource-card {
    padding: 0;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    display: grid;
    grid-template-columns: 270px 1fr;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.resource-card:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.09);
    border-color: rgba(138, 21, 56, 0.2);
}

/* ── Resource left column ── */
.resource-left {
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 0, 0, 0.07);
    background: #fafafa;
}

.resource-image {
    width: 100%;
    height: 190px;
    background-size: cover;
    background-position: center;
    background-color: #e8e0e3;
}

.resource-left-meta {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.resource-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a2e;
    text-transform: uppercase;
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.resource-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: #555;
    gap: 0;
}

.resource-meta-row > span {
    white-space: normal;
    word-break: break-word;
}

.resource-meta-row > span + span::before {
    content: '|';
    margin: 0 0.4rem;
    color: #ccc;
    font-weight: 400;
}

/* ── Resource right column ── */
.resource-right {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.resource-summary {
    margin: 0;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.65;
}

/* Tags as pipe-separated plain text */
.resource-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.resource-tags .tag {
    display: inline;
    padding: 0;
    border-radius: 0;
    background: none;
    border: none;
    color: #666;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0;
    transition: none;
}

.resource-tags .tag + .tag::before {
    content: '|';
    margin: 0 0.4rem;
    color: #ccc;
}

.resource-tags .tag:hover {
    background: none;
    border-color: transparent;
}

.resource-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
    padding-top: 0.5rem;
}

.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-maroon);
    color: #fff;
    padding: 0.55rem 1.6rem;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s ease;
}

.resource-link:hover {
    background: var(--color-maroon-dark);
    color: #fff;
}

.resource-link.is-disabled {
    background: #ccc;
    color: #fff;
    pointer-events: none;
}

/* ===================================
   Contact Section
   =================================== */
/* ===================================
   Contact Page Styles (Active/Current)
   =================================== */

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, 
        var(--color-maroon) 0%, 
        var(--color-maroon-dark) 100%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.contact-card:hover {
    transform: translateY(-6px);
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.12),
        0 10px 30px rgba(138, 21, 56, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: rgba(138, 21, 56, 0.25);
}

.contact-card:hover::before {
    opacity: 1;
}

.contact-list li {
    border: 1px solid rgba(138, 21, 56, 0.12);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(247, 244, 246, 0.5) 100%);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-list li:hover {
    transform: translateX(4px);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: rgba(138, 21, 56, 0.25);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(138, 21, 56, 0.02) 100%);
}

.contact-email::after {
    content: '→';
    opacity: 0;
    transform: translateX(-8px);
    transition: var(--transition-fast);
}

.contact-email:hover {
    color: var(--color-maroon-dark);
    gap: 0.75rem;
}

.contact-email:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.contact-email--muted::after {
    display: none;
}

.case-card-media {
    width: 100%;
    height: 190px;
    background-size: cover;
    background-position: center;
    background-color: #e8e0e3;
}

.case-card-media:not(.has-image) {
    background: linear-gradient(135deg, rgba(138, 21, 56, 0.12) 0%, rgba(60, 10, 30, 0.08) 100%);
}

.case-org {
    margin: 0;
    color: var(--color-maroon);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.case-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.65rem;
}

.case-additional-info {
    display: flex;
    gap: 2.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.case-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.case-info-item.is-hidden {
    display: none;
}

.case-info-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.case-humanitarian-sector,
.case-decision-criticality,
.case-technology {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.case-info-tag {
    display: inline;
    padding: 0;
    border-radius: 0;
    background: none;
    border: none;
    font-size: 0.82rem;
    font-weight: 500;
    color: #333;
    letter-spacing: 0;
}

.case-info-tag + .case-info-tag::before {
    content: ', ';
    color: #999;
    font-weight: 400;
}

.case-humanitarian-sector .case-info-tag {
    color: rgb(30, 90, 170);
}

.case-decision-criticality .case-info-tag {
    color: rgb(160, 90, 0);
}

.case-technology .case-info-tag {
    color: rgb(80, 20, 140);
}

.metric {
    display: flex;
    flex-direction: column;
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    
    min-height: 60px;
    transition: all 0.3s ease;
}

.metric:hover {
    border-color: rgba(138, 21, 56, 0.15);
    background: rgba(138, 21, 56, 0.03);
}

.metric-title {
    background: rgba(0, 0, 0, 0.03);
    padding: 0.4rem 0.75rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.metric-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 0.6rem 0.75rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text-gray);
    line-height: 1.4;
}

/* Tags as pipe-separated plain text */
.case-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.case-tags .tag {
    display: inline;
    padding: 0;
    border-radius: 0;
    background: none;
    border: none;
    color: #666;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0;
    transition: none;
}

.case-tags .tag + .tag::before {
    content: '|';
    margin: 0 0.4rem;
    color: #ccc;
}

.case-tags .tag:hover {
    background: none;
    border-color: transparent;
}

/* CTA button */
.case-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
    padding-top: 0.5rem;
}

.case-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-maroon);
    color: #fff;
    padding: 0.55rem 1.6rem;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s ease;
}

.case-link:hover {
    background: var(--color-maroon-dark);
    color: #fff;
}

.case-link.is-disabled {
    background: #ccc;
    color: #fff;
    pointer-events: none;
}

.card-summary {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.65;
    margin: 0.15rem 0 0.5rem;
    min-height: 2.8rem;
}

.card-link {
    color: var(--color-maroon);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.88rem;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
}

.card-link:hover {
    color: var(--color-maroon-dark);
    text-decoration: none;
}

/* Override .card-link color for maroon button links */
.card-link.policy-link,
.card-link.case-link,
.card-link.resource-link {
    color: #fff;
}

.card-link.policy-link:hover,
.card-link.case-link:hover,
.card-link.resource-link:hover {
    color: #fff;
}

/* ===================================
   Policy Cards (Hero + Meta)
   =================================== */
/* ───────────────────────────────────
   Policy Cards – Horizontal 2-Column
   ─────────────────────────────────── */
.policies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(680px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Card shell */
.policy-card {
    padding: 0;
    overflow: hidden;
    border-radius: 0;
    display: grid;
    grid-template-columns: 270px 1fr;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
    box-shadow: none;
    transition: border-color 0.3s ease;
}

.policy-card:hover {
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.1);
}

/* ── Left column ── */
.policy-left {
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 0, 0, 0.07);
    background: #fafafa;
}

.policy-image {
    width: 100%;
    height: 190px;
    background-size: cover;
    background-position: center;
    background-color: #e8e0e3;
}

.policy-image.no-image {
    background: linear-gradient(135deg, rgba(138, 21, 56, 0.12) 0%, rgba(60, 10, 30, 0.08) 100%);
}

.policy-left-meta {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
}

.policy-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a2e;
    text-transform: uppercase;
    line-height: 1.35;
    letter-spacing: 0.02em;
}

/* Country | Year row */
.policy-country-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: #555;
    gap: 0;
}

.policy-country-row > span {
    white-space: nowrap;
}

.policy-country-row > span + span::before {
    content: '|';
    margin: 0 0.4rem;
    color: #ccc;
    font-weight: 400;
}

/* Region | Languages | Status meta row */
.policy-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
    gap: 0;
}

.policy-meta > span:not(.is-hidden) ~ span:not(.is-hidden)::before,
.policy-meta > span:not(.is-hidden) ~ .policy-languages:not(.is-hidden)::before,
.policy-meta > .policy-languages:not(.is-hidden) ~ span:not(.is-hidden)::before {
    content: '|';
    margin: 0 0.4rem;
    color: #ccc;
    font-weight: 400;
}

.policy-languages {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

/* Language chips reset to plain text with pipe separators */
.policy-card .lang-chip {
    display: inline;
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: inherit;
    font-weight: inherit;
    backdrop-filter: none;
    box-shadow: none;
}

.policy-card .lang-chip + .lang-chip::before {
    content: ' | ';
    color: #ccc;
    font-weight: 400;
}

/* Ethical principles in left column */
.policy-ethical-principle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.35rem;
}

.policy-ethical-principle .tag {
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    background: #f3f3f3;
    border: 1px solid #cccccc;
    color: #555555;
    font-size: 0.7rem;
    font-weight: 500;
}

/* ── Right column ── */
.policy-right {
    padding: 3.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.policy-summary {
    margin: 0;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.65;
}

/* Tags as pipe-separated plain text */
.policy-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.policy-tags .tag {
    display: inline;
    padding: 0;
    border-radius: 0;
    background: none;
    border: none;
    color: #666;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0;
}

.policy-tags .tag + .tag::before {
    content: '|';
    margin: 0 0.4rem;
    color: #ccc;
}

/* Metadata groups */
.policy-metadata-row {
    display: flex;
    gap: 2.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.policy-metadata-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.policy-metadata-group.is-hidden {
    display: none;
}

.policy-metadata-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.policy-sectoral-focus,
.policy-document-type {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.policy-sectoral-focus .tag,
.policy-document-type .tag {
    display: inline;
    padding: 0;
    border-radius: 0;
    background: none;
    border: none;
    color: #333;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0;
}

.policy-sectoral-focus .tag + .tag::before,
.policy-document-type .tag + .tag::before {
    content: ', ';
    color: #999;
    font-weight: 400;
}

/* Humanitarian / Non-humanitarian color coding (plain text) */
.policy-sectoral-focus .tag-humanitarian {
    color: rgb(80, 80, 80);
}

.policy-sectoral-focus .tag-non-humanitarian {
    color: rgb(160, 40, 50);
}

/* CTA button */
.policy-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
    padding-top: 0.5rem;
}

.policy-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-maroon);
    color: #fff;
    padding: 0.55rem 1.6rem;
    border-radius: 0;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s ease;
}

.policy-link:hover {
    background: var(--color-maroon-dark);
    color: #fff;
}

.policy-link-arrow {
    display: none;
}

.policy-link.is-disabled {
    background: #ccc;
    color: #fff;
    pointer-events: none;
}

/* ===================================
   Policies Layout + Fixed Filter Card
   =================================== */

.filter-card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(247, 244, 246, 0.98) 100%);
    color: var(--color-medium-gray);
    border: none;
    border-radius: 0;
    padding: 2rem 1.75rem;
    box-shadow: none;
    overflow: hidden;
    width: 100%;
    z-index: 20;
    margin: 20px auto;
    position: relative;
}

.filter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--color-maroon) 0%, 
        var(--color-maroon-dark) 50%, 
        var(--color-maroon) 100%);
}

.policies-filter-header {
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
    display: grid;
    gap: 0.5rem;
}

.policies-filter-header h3 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.5px;
    color: #8a1538;
    font-weight: 700;
}

.policy-apply-btn:hover {
    background: var(--color-maroon-dark);
    color: #ffffff;
}

.filter-subtitle {
    margin: 0;
    color: var(--color-text-gray);
    font-size: 0.92rem;
    line-height: 1.6;
}

.filter-form {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-field label {
    font-size: 12pt;
    font-weight: 600;
    color: var(--color-maroon-dark);
    letter-spacing: -0.2px;
}

.filter-field input,
.filter-field select {
    width: 100%;
    border: 2px solid rgba(138, 21, 56, 0.12);
    border-radius: 0;
    padding: 0.85rem 1rem;
    background: var(--color-white);
    color: var(--color-medium-gray);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.filter-field input::placeholder,
.filter-field select::placeholder {
    color: rgba(74, 74, 74, 0.5);
}

.filter-field input:focus,
.filter-field select:focus {
    outline: none;
    border-color: var(--color-maroon);
    box-shadow: 0 0 0 3px rgba(138, 21, 56, 0.1);
    background: var(--color-white);
}

.filter-card select option {
    background-color: var(--color-white);
    color: var(--color-medium-gray);
}

.filter-card select::-ms-expand {
    display: none;
}

/* Green theme for Ethical Principle dropdown */
#policy-ethical-principle {
    border-color: rgba(46, 139, 87, 0.3);
    background: rgba(46, 139, 87, 0.04);
}

#policy-ethical-principle:focus {
    border-color: rgb(46, 139, 87);
    box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.15);
    background: rgba(46, 139, 87, 0.06);
}

#policy-ethical-principle option {
    background-color: var(--color-white);
}

/* Darker maroon theme for Case Studies Category dropdown */
#case-study-category {
    border-color: rgba(138, 21, 56, 0.4);
    background: rgba(138, 21, 56, 0.08);
}

#case-study-category:focus {
    border-color: rgb(138, 21, 56);
    box-shadow: 0 0 0 3px rgba(138, 21, 56, 0.2);
    background: rgba(138, 21, 56, 0.12);
}

#case-study-category option {
    background-color: var(--color-white);
}

/* ===================================
   Filter Toggle Button & Animation
   =================================== */
.filter-header-content {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.filter-toggle-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(138, 21, 56, 0.08);
    border: 1px solid rgba(138, 21, 56, 0.2);
    color: var(--color-maroon);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.filter-toggle-btn:hover {
    background: rgba(138, 21, 56, 0.15);
    border-color: var(--color-maroon);
    transform: scale(1.05);
}

.filter-toggle-btn i {
    transition: transform 0.3s ease;
}

.filter-toggle-btn.expanded i {
    transform: rotate(180deg);
}

/* Filter Form Collapse Animation */
.filter-form.collapsed,
.case-filter-form.collapsed,
.analytics-filter-form.collapsed,
.resource-filter-form.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease, margin-top 0.3s ease, padding 0.3s ease;
}

.filter-form,
.case-filter-form,
.analytics-filter-form,
.resource-filter-form {
    max-height: 2000px;
    opacity: 1;
    overflow: visible;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease, margin-top 0.3s ease, padding 0.3s ease;
}

.filter-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.filter-actions .btn-ghost {
    background: rgba(138, 21, 56, 0.08);
    color: var(--color-maroon-dark);
    border: 1px solid rgba(138, 21, 56, 0.2);
}

.filter-actions .btn-ghost:hover {
    background: rgba(138, 21, 56, 0.15);
    color: var(--color-maroon-dark);
    border-color: var(--color-maroon);
}

.btn {
    border: none;
    border-radius: 0;
    padding: 0.75rem 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-maroon) 0%, var(--color-maroon-dark) 100%);
    color: #ffffff;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ===================================
   Fixed Chatbot Widget
   =================================== */
.chatbot-container {
    position: fixed;
    right: 2rem;
    bottom: 6rem;
    width: min(400px, calc(100vw - 4rem));
    height: min(600px, calc(100vh - var(--nav-height) - 8rem));
    max-height: calc(100vh - var(--nav-height) - 8rem);
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 999;
    transition: var(--transition-smooth);
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chatbot-container.hidden {
    display: none;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}

.chatbot-container:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Chatbot Toggle Button */
.chatbot-toggle-btn {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-maroon) 0%, var(--color-maroon-dark) 100%);
    border: none;
    color: var(--color-white);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.chatbot-toggle-btn:active {
    transform: scale(0.95);
}

.chatbot-toggle-btn .icon-chat,
.chatbot-toggle-btn .icon-close {
    position: absolute;
    transition: var(--transition-smooth);
}

.chatbot-toggle-btn .icon-close {
    opacity: 0;
    transform: rotate(90deg) scale(0.8);
}

.chatbot-toggle-btn.active .icon-chat {
    opacity: 0;
    transform: rotate(-90deg) scale(0.8);
}

.chatbot-toggle-btn.active .icon-close {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.chatbot-contact{
    width: 100%;
    padding: 16px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #8D1B3D 0%, #6B0F1A 100%);
    border-bottom: none;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chatbot-contact p, .chatbot-contact div{
    font-size: 16px;
    color: white;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.chatbot-messages-container{
    background: linear-gradient(180deg, #F9FAFB 0%, #F3F4F6 100%);
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.chatbot-messages-list{
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    flex: 1;
    overflow-y: auto;
    gap: 10px;
}
.chatbot-message{
    background: #FFFFFF;
    color: #1F2937;
    padding: 10px 14px;
    align-self: flex-start;
    border: 1px solid #E5E7EB;
    border-radius: 16px 16px 16px 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    max-width: 80%;
    margin: 6px 0;
    line-height: 1.5;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}
.chatbot-message-user{
    align-self: flex-end;
    padding: 10px 14px;
    background: linear-gradient(135deg, #8D1B3D 0%, #6B0F1A 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 2px 8px rgba(141, 27, 61, 0.25);
    max-width: 80%;
    margin: 6px 0;
    line-height: 1.5;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.chatbot-message-prompt-container{
    background: #FFFFFF;
    padding: 16px 20px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
    flex-shrink: 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
}

.chatbot-input{
    background: #F9FAFB;
    color: #111827;
    border: 2px solid #D1D5DB;
    border-radius: 22px;
    padding: 12px 16px;
    font-size: 14px;
    flex: 1;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.chatbot-input:focus{
    outline: none;
    border-color: #8D1B3D;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(141, 27, 61, 0.1);
}

.chatbot-input::placeholder{
    color: #9CA3AF;
    font-size: 14px;
}

.send-button{
    background: linear-gradient(135deg, #8D1B3D 0%, #6B0F1A 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(141, 27, 61, 0.25);
}

.send-button:hover{
    background: linear-gradient(135deg, #6B0F1A 0%, #550C15 100%);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(141, 27, 61, 0.4);
}

.send-button:active{
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(141, 27, 61, 0.3);
}

/* Chatbot Loading Indicator */

.chatbot-loading-dots span {
    width: 8px;
    height: 8px;
    background: #8D1B3D;
    border-radius: 50%;
    animation: loading-bounce 1.4s infinite ease-in-out both;
}

.chatbot-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.chatbot-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===================================
   Footer - Redesigned
   =================================== */
.site-footer {
    background-color: #8a1538;
    color: var(--color-white);
    margin-top: 0;
}

/* ===================================
   Home Page Redesign Styles
   =================================== */

/* Nav Right wrapper */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    transform: none;
    transition: none;
}

/* Ensure nav-right is visible on desktop */
@media (min-width: 1025px) {
    .nav-right {
        position: relative ;
        transform: none ;
        width: auto ;
        height: auto ;
        background: transparent ;
        border: none ;
    }
    
    .nav-links {
        flex-direction: row ;
        padding: 0 ;
    }
    
    .nav-link {
        border: none ;
    }
}

/* Submit Content Button */
.nav-submit-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.4rem;
    background: transparent;
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--color-white);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-submit-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Hero Banner Redesign */

.hero-browse-btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: rgba(0, 0, 0, 0.7);
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 100;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.hero-browse-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* 3-Column Introduction */

.home-intro-col p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-text-gray);
}

/* Section Titles */
.home-section-title {
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-maroon-dark);
    text-align: center;
    margin-bottom: 0.75rem;
}

.home-section-subtitle {
    font-size: 1rem;
    color: var(--color-text-gray);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

/* Features Grid (Static - No Carousel) */
.home-features-section {
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--color-border-gray);
}

.home-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.home-feature-card {
    background: var(--color-white);
    border: 1px solid var(--color-border-gray);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    transition: all 0.3s ease;
    
}

.home-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(138, 21, 56, 0.12);
    border-color: var(--color-maroon);
}

.home-feature-icon {
    font-size: 2rem;
    color: var(--color-maroon);
    margin-bottom: 1rem;
    text-align: center;
}

.home-feature-card h3 {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-maroon-dark);
    margin-bottom: 1rem;
    text-align: left;
}

.home-feature-card  p {
    font-size: 28px;
    line-height: 1.7;
    color: var(--color-text-gray);
}

/* Collaboration Section */

.home-collab-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-collab-info h3 {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-maroon-dark);
    margin-bottom: 0.4rem;
}

.home-collab-email:hover {
    color: var(--color-maroon-dark);
}

/* Recognition & Collaborators - Logo Carousel */

/* Key Supporters Section */

.home-supporter-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--color-maroon);
}

.home-supporter-logo img {
    max-height: 100%;
    max-width: 200px;
    object-fit: contain;
}

.home-supporter-card h3 {
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-maroon-dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.home-supporter-card h3 span {
    font-weight: 400;
    opacity: 0.6;
    font-size: 0.85rem;
}

.home-supporter-card > p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--color-text-gray);
}

@keyframes logo-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.home-logo-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 0.5rem 0;
}

/* Fade edges so logos gracefully enter/exit */
.home-logo-carousel::before,
.home-logo-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 1;
    pointer-events: none;
}

.home-logo-carousel::before {
    left: 0;
    background: linear-gradient(to right, #ffffff, transparent);
}

.home-logo-carousel::after {
    right: 0;
    background: linear-gradient(to left, #ffffff, transparent);
}

.home-logo-strip {
    display: flex;
    align-items: center;
    width: max-content;
    animation: logo-scroll 35s linear infinite;
    gap: 0;
}

.home-logo-strip:hover {
    animation-play-state: paused;
}

.home-logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    padding: 0.5rem 2rem;
    flex-shrink: 0;
    min-width: 130px;
}

.home-logo-item:hover {
    transform: translateY(-4px);
    opacity: 0.85;
}

.home-logo-item img {
    height: 65px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
}

.home-logo-item span {
    font-size: 0.7rem;
    color: var(--color-text-gray);
    
    line-height: 1.3;
    font-weight: 600;
}

/* Qatar Home Section */
.home-qatar-section {
    padding: 3.5rem 0 2rem;
}

.home-qatar-section .qatar-gallery {
    margin: 2rem 0 2.5rem;
}

.home-qatar-section .gallery-caption {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    font-weight: 700;
}

/* Qatar Card Paginator */
.qatar-card-paginator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 0 1.5rem;
}

/* When the paginator is a direct child of the body grid, span all columns
   so it always sits full-width below both sidebar and content */
.qatar-section-body-container > .qatar-card-paginator {
    grid-column: 1 / -1;
}

#qatar-analytics-container > .qatar-card-paginator {
    grid-column: 1 / -1;
}

.qatar-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.4rem;
    background: var(--color-white);
    color: var(--color-maroon);
    border: 1px solid var(--color-border-gray);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qatar-page-btn:hover:not(:disabled) {
    background: var(--color-maroon);
    color: var(--color-white);
    border-color: var(--color-maroon);
}

.qatar-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.qatar-page-counter {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-maroon-dark);
    letter-spacing: 1px;
    min-width: 60px;
    
}

/* Remove bottom padding from main content when footer follows */
.main-content {
    padding-bottom: 0;
}

/* ===================================
   Contact/Submission Form Section
   =================================== */
.contact-form-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 0;
}

.contact-form-container {
    background: #fafafa;
    padding: 2.5rem;
    border: 1px solid #e0e0e0;
}

.contact-form-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-maroon);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Radio Group Styling */
.form-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--color-text-dark);
}

.radio-label input[type="radio"] {
    margin-right: 0.5rem;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--color-maroon);
}

.radio-text {
    user-select: none;
}

/* Form Field Styling */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-dark);
    letter-spacing: 0.3px;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea {
    padding: 0.75rem;
    border: 1px solid #ccc;
    background: white;
    font-size: 0.95rem;
    font-family: inherit;
}

.form-field input[type="text"]:focus,
.form-field input[type="email"]:focus,
.form-field textarea:focus {
    outline: none;
    border: 1px solid var(--color-maroon);
}

.form-field textarea {
    min-height: 100px;
    resize: vertical;
}

/* File Upload Styling */
.form-field-file {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.file-upload-btn {
    cursor: pointer;
    display: inline-block;
}

.file-upload-btn input[type="file"] {
    display: none;
}

.file-btn-text {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--color-maroon);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-upload-btn:hover .file-btn-text {
    background: var(--color-maroon-dark);
}

.file-name-display {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.file-name-display.has-file {
    color: var(--color-text-dark);
    font-style: normal;
    font-weight: 500;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-ghost {
    padding: 0.75rem 1.5rem;
    border: 1px solid #999;
    background: white;
    color: #333;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-ghost:hover {
    border: 1px solid #666;
    background: #f5f5f5;
}

.btn-primary {
    padding: 0.75rem 2rem;
    border: 1px solid var(--color-maroon);
    background: var(--color-maroon);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--color-maroon-dark);
    border: 1px solid var(--color-maroon-dark);
}

/* ===================================
   Accessibility & Utility Classes
   =================================== */
.is-hidden {
    display: none ;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid var(--color-maroon);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background: var(--color-maroon);
    color: var(--color-white);
}

/* ===================================
   Home Page Redesign Overrides (Feb 2026)
   =================================== */

/* --- Body background: White --- */
body {
    background: #ffffff;
}

/* --- Typography Overrides for Home Page --- */
#home .home-section-title {
    font-weight: bold;
    font-size: 30pt;
    color: #8a1538;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#home .home-intro-text p {
    font-size: 14pt;
    line-height: 1.8;
}

#home .home-section-subtitle {
    font-size: 13pt;
    line-height: 1.7;
}

#home .home-feature-card > p {
    font-size: 12pt;
    line-height: 1.7;
    
}

/* --- Browse Database CTA --- */
.hero-browse-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: transparent;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 2pt solid #ffffff;
    transition: all 0.3s ease;
}

.hero-browse-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* --- Merged Intro Text --- */
.home-intro-text {
    padding: 3rem 0;
    border-bottom: none;
    width: 100%;
}

.home-intro-text p {
    text-align: justify;
    max-width: 1000px;
    margin: 0 auto;
}

/* --- Section Container Flex Ordering --- */
#home .section-container {
    display: flex;
    flex-direction: column;
}

.home-intro-text { order: 1; width: 100%; text-align: justify; }
.home-section-banners { order: 2; width: 100%; }
.home-features-section { order: 3; width: 100%; }

/* ===================================
   Section Navigator Banners
   =================================== */
.home-section-banners {
    padding: 0 0 3.5rem;
}

.home-section-banners-label {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--color-maroon);
    margin: 0 0 2rem;
    opacity: 0.8;
}

.home-section-banners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.section-banner-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-top: 3px solid transparent;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.section-banner-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
    border-top-color: var(--color-maroon);
}

.section-banner-img {
    height: 210px;
    background-size: cover;
    flex-shrink: 0;
    position: relative;
    transition: transform 0.55s ease;
}

.section-banner-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.0), rgba(0,0,0,0.22));
    transition: background 0.35s ease;
}

.section-banner-card:hover .section-banner-img {
    transform: scale(1.06);
}

.section-banner-body {
    padding: 1.5rem 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    border-left: 1px solid rgba(0,0,0,0.06);
    border-right: 1px solid rgba(0,0,0,0.06);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.section-banner-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-maroon-dark);
    margin: 0 0 0.75rem;
    line-height: 1.4;
    text-align: left;
}

.section-banner-desc {
    font-size: 0.83rem;
    line-height: 1.65;
    color: #5a5a5a;
    flex: 1;
    margin: 0 0 1.25rem;
}

.section-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-maroon);
    transition: gap 0.25s ease, color 0.25s ease;
}

.section-banner-arrow {
    display: inline-block;
    transition: transform 0.25s ease;
}

.section-banner-card:hover .section-banner-cta {
    gap: 0.65rem;
    color: var(--color-maroon-dark);
}

.section-banner-card:hover .section-banner-arrow {
    transform: translateX(4px);
}

/* --- Feature Cards: No Border, No Hover --- */
.home-feature-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 2rem 1.5rem;
    
    transition: none;
}

.home-feature-card:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

/* --- Feature Icons: Centered, Image-based --- */
.home-feature-icon {
    text-align: center;
    margin-bottom: 1.25rem;
    font-size: 0;
}

.home-feature-icon img {
    height: 65px;
    width: auto;
    display: inline-block;
}

/* --- Features section border --- */
.home-features-section {
    padding: 3.5rem 0;
    border-bottom: none;
    border-top: none;
}

/* --- Qatar Gallery: No Round Corners, No Borders, No Hover --- */
.gallery-item {
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    background: transparent;
}

.gallery-item:hover {
    transform: none;
    box-shadow: none;
}

.gallery-photo {
    border-radius: 0;
    height: 280px;
    width: 100%;
    object-fit: cover;
}

.gallery-caption {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: #000000;
    padding: 1rem 0.5rem;
    
    background: transparent;
}

/* --- Qatar Section Styling --- */
.home-qatar-section {
    padding: 2rem 0 2rem;
}

.home-qatar-section .home-section-title {
    
    margin-bottom: 1rem;
}

/* --- Qatar Sidebar Container Override --- */
.qatar-links-sections-container {
    border: none;
    border-radius: 0;
    background: #e8e4e4;
    box-shadow: none;
    overflow: visible;
    width: 100%;
}

/* --- Qatar Sidebar Links --- */
.qatar-section-link {
    font-weight: 700;
    font-size: 0.95rem;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #ffffff;
    border-bottom: 2px solid var(--color-maroon);
    border-left: none;
    padding: 1rem 1.25rem 0.75rem;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.25rem;
    line-height: 1.5;
}

.qatar-section-link:last-child {
    border-bottom: 2px solid var(--color-maroon);
}

.qatar-section-link.link-active {
    color: var(--color-maroon);
    background: #e8e4e4;
    border-left: none;
}

.qatar-section-link:hover {
    background: #ddd8d8;
    color: var(--color-maroon);
}

.qatar-link-arrow {
    color: var(--color-maroon);
    font-size: 1.1rem;
    font-weight: 400;
    align-self: flex-start;
    margin-top: 0.15rem;
}

/* --- Qatar Content Container Override --- */
.qatar-content-container {
    border-radius: 0;
    background: #ffffff;
    backdrop-filter: none;
    box-shadow: none;
    border: 2px solid var(--color-maroon);
    padding: 1rem;
    min-height: auto;
    gap: 0;
}

.qatar-content-container::before {
    display: none;
}

/* --- Policy Cards within Qatar Section --- */
.qatar-content-container .policy-card {
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    grid-template-columns: 270px 1fr;
}

.qatar-content-container .policy-card:hover {
    border-color: transparent;
    box-shadow: none;
    transform: none;
    cursor: default;
}

.qatar-content-container .policy-left {
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

/* Policy right column inside Qatar */
.qatar-content-container .policy-right {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 1.25rem 1.5rem;
    overflow: hidden;
}

.qatar-content-container .policy-image {
    height: 240px;
    border-radius: 0;
}

/* Policy right column inside Qatar - backgrounds for metadata */
.qatar-content-container .policy-summary {
    font-size: 0.88rem;
    line-height: 1.7;
    color: #555;
    margin: 0 0 0.85rem 0;
}

.qatar-content-container .policy-tags {
    background: #e8e4e4;
    padding: 0.6rem 1.5rem;
    margin: 0 -1.5rem;
    border-radius: 0;
}

.qatar-content-container .policy-tags .tag {
    color: #555;
    font-size: 0.82rem;
}

.qatar-content-container .policy-metadata-row {
    flex-direction: column;
    gap: 0;
    border-top: none;
    padding-top: 0;
    margin: 0 -1.5rem;
}

.qatar-content-container .policy-metadata-group {
    padding: 0.6rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.qatar-content-container .policy-metadata-group:first-child {
    background: #fce4ec;
}

.qatar-content-container .policy-metadata-group:last-child {
    background: #fff8e1;
}

.qatar-content-container .policy-metadata-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.1rem;
}

.qatar-content-container .policy-sectoral-focus .tag,
.qatar-content-container .policy-document-type .tag {
    font-size: 0.85rem;
    color: #444;
    font-weight: 500;
}

.qatar-content-container .policy-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding: 0.75rem 0 0;
}

.qatar-content-container .policy-link {
    border-radius: 2px;
    font-size: 0.76rem;
    padding: 0.5rem 1.4rem;
}

/* --- Qatar Card Paginator --- OUTSIDE maroon border, right-aligned --- */
.qatar-card-paginator {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.75rem 0 0;
    border-top: none;
    margin: 0;
}

.qatar-card-paginator .qatar-page-btn {
    background: none;
    border: none;
    padding: 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.qatar-card-paginator .qatar-page-btn:hover:not(:disabled) {
    background: none;
    color: var(--color-maroon);
    border: none;
}

.qatar-card-paginator .qatar-page-btn:disabled {
    opacity: 0.3;
}

.qatar-card-paginator .qatar-page-counter {
    font-size: 1rem;
    font-weight: 400;
    color: #333;
    letter-spacing: 2px;
}

/* --- Recognition Section --- */

/* --- Bigger Logos for Specific Organizations --- */
.home-logo-item-lg img {
    height: 85px;
    max-width: 150px;
}

/* --- Footer Redesign --- */
.site-footer {
    background: var(--color-maroon);
    color: var(--color-white);
    margin-top: 0;
    border-top: 3px solid var(--color-maroon);
}

.footer-main {
    padding: 3rem 0 2.5rem;
}

.footer-main .footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    
    align-items: start;
}

.footer-supporters-wrapper {
    width: 100%;
}

.footer-supporters-wrapper h3 {
    
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-white);
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-supporters-wrapper h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: var(--color-maroon);
}

.footer-supporters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-supporter h4 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    
}

.footer-supporter h4 span {
    display: block;
    font-weight: 400;
    opacity: 0.7;
    font-size: 0.85rem;
}

.footer-supporter h4 a {
    color: #ffffff;
    text-decoration: none;
}

.footer-supporter h4 a:hover {
    text-decoration: underline;
}

.footer-supporter p {
    font-size: 0.85rem;
    line-height: 1.6;
    opacity: 0.85;
    margin-bottom: 1rem;
    
}

.footer-supporter-logo {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-supporter-logo img {
    max-height: 100%;
    max-width: 180px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.footer-supporter-logo img:hover {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px var(--color-maroon);
    padding: 1.5rem 2rem;
    text-align: center;
    
}

.footer-bottom p {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
}

.footer-bottom p:last-child {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    opacity: 0.5;
}

/* ===================================
   Global Overrides — Design Polish
   =================================== */

/* Task 3: Remove border-radius from ALL buttons platform-wide */
button,
.btn,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    border-radius: 0 ;
}

/* Task 6: Qatar section — apply same card layout to case-cards & resource-cards
   as the ethics (policy) cards already have */
.qatar-content-container .case-card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    grid-template-columns: 270px 1fr;
    overflow: hidden;
}

.qatar-content-container .case-card:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.1);
    cursor: default;
}

.qatar-content-container .case-left {
    overflow: hidden;
    border-right: 1px solid rgba(0, 0, 0, 0.07);
    background: #fafafa;
}

.qatar-content-container .case-right {
    min-width: 0;
    overflow: hidden;
    gap: 0.7rem;
}

.qatar-content-container .case-card-media {
    height: 190px;
    border-radius: 0;
}

.qatar-content-container .resource-card {
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    grid-template-columns: 270px minmax(0, 1fr);
}

.qatar-content-container .resource-card:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
    cursor: default;
}

.qatar-content-container .resource-left {
    width: 270px;
    min-width: 270px;
    max-width: 270px;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.qatar-content-container .resource-right {
    min-width: 0;
    overflow: hidden;
}

.qatar-content-container .resource-image {
    height: 240px;
    border-radius: 0;
}

.footer-supporter-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    
    gap: 0.75rem;
}

.footer-supporter-col h4 {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-white);
    margin: 0;
    line-height: 1.4;
}

.footer-supporter-col .footer-supporter-abbr {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.footer-supporter-col .footer-supporter-logo {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-supporter-col .footer-supporter-logo img {
    max-height: 100%;
    max-width: 200px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.footer-supporter-col .footer-supporter-logo img:hover {
    opacity: 1;
}

/* ===================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   =================================== */

/* ===================================
   Tablets & Small Laptops (≤ 1024px)
   =================================== */
@media (max-width: 1024px) {
    :root {
        --nav-height: 60px;
        --section-padding: 2rem;
    }

    .nav-container {
        padding: 0 1.5rem;
    }

    .nav-brand h1 {
        font-size: clamp(1rem, 1rem + 1.5vw, 1.8rem);
    }

    /* Show Hamburger Menu on tablets */
    .nav-hamburger {
        display: flex;
    }

    .nav-mobile-overlay {
        display: block;
    }

    /* Mobile menu layout for tablets */
    .nav-right {
        position: fixed;
        top: var(--nav-height);
        right: 0;
        width: 320px;
        height: calc(100vh - var(--nav-height));
        background: rgba(0, 0, 0, 0.97);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-right.active {
        transform: translateX(0);
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 1.5rem 0;
        width: 100%;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: background 0.2s ease, padding-left 0.2s ease;
    }

    .nav-link:hover {
        background: rgba(138, 21, 56, 0.2);
        padding-left: 2rem;
        opacity: 1;
    }

    .nav-link.active {
        background: rgba(138, 21, 56, 0.3);
        border-left: 3px solid var(--color-maroon);
    }

    /* Hide tooltips on tablet */
    .nav-tooltip {
        display: none;
    }

    .hero-banner {
        min-height: 400px;
    }

    .hero-banner-small {
        min-height: 300px;
    }

    .hero-title {
        font-size: clamp(1.2rem, 1.2vw + 0.6rem, 1.7rem);
        line-height: 2rem;
        padding: 5px;
    }

    .hero-subtitle {
        font-size: clamp(0.75rem, 0.7vw + 0.35rem, 1rem);
        line-height: 1.4rem;
        padding: 5px;
        max-width: 90%;
    }

    .section-container {
        padding: 1.5rem;
    }

    /* Qatar Section - Tablets & below */
    .qatar-gallery {
        grid-template-columns: 1fr;
    }

    .gallery-photo {
        width: 100%;
    }

    .qatar-section-body-container {
        grid-template-columns: 1fr;
        grid-template-rows: 2fr auto;
    }

    /* Policies Section - Tablets */
    .policies-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .filter-card {
        max-width: 100%;
        min-width: 100%;
    }

    .policies-filter-header {
        display: block;
    }

    .filter-form {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .filter-form:not(.collapsed) {
        max-height: 2000px;
    }

    .policies-grid {
        grid-template-columns: 1fr;
    }

    .policy-card {
        grid-template-columns: 1fr;
    }

    .policy-image {
        height: 180px;
    }

    /* Case Studies Section - Tablets */
    .case-filter-card {
        margin-bottom: 2rem;
    }

    .case-filter-header {
        display: block;
    }

    .case-filter-form {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .case-filter-form:not(.collapsed) {
        max-height: 2000px;
    }

    .case-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .case-card {
        grid-template-columns: 1fr;
    }

    .case-card-media {
        height: 180px;
    }

    /* Resources Cards - Tablets */
    .resource-card {
        grid-template-columns: 1fr;
    }

    .resource-left {
        display: grid;
        grid-template-columns: 200px 1fr;
        gap: 1.5rem;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        padding-bottom: 1rem;
    }

    .resource-image {
        height: 180px;
    }

    .home-section-banners-grid{
        grid-template-columns: 1fr 1fr;
    }

}

/* ===================================
   Small Tablets (600px - 768px)
   =================================== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-brand h1 {
        font-size: clamp(0.85rem, 1rem + 1vw, 1.4rem);
    }

    /* Adjust mobile menu width for smaller tablets */
    .nav-right {
        width: 280px;
    }

    .hero-banner {
        min-height: 350px;
    }

    .hero-banner-small {
        min-height: 250px;
    }

    .hero-title {
        font-size: clamp(1rem, 1vw + 0.5rem, 1.36rem);
        line-height: 1.7rem;
        padding: 5px;
    }

    .hero-subtitle {
        font-size: clamp(0.7rem, 0.6vw + 0.3rem, 0.92rem);
        line-height: 1.3rem;
        padding: 5px;
        max-width: 95%;
    }

    .section-container {
        padding: 1rem;
    }

    /* Policies Section - Small Tablets */
    .policy-left {
        grid-template-columns: 1fr;
    }

    .policy-image {
        height: 200px;
        border-radius: 12px 12px 0 0;
    }

    .policy-left-meta {
        padding: 1rem;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    /* Case Studies Section - Small Tablets */
    .case-filter-grid {
        grid-template-columns: 1fr;
    }

    .case-left {
        grid-template-columns: 1fr;
    }

    .case-card-media {
        height: 200px;
        border-radius: 12px 12px 0 0;
    }

    .case-left-meta {
        padding: 1rem;
    }

    /* Resources - Small Tablets */
    .resource-left {
        grid-template-columns: 1fr;
    }

    .resource-image {
        height: 200px;
        border-radius: 12px 12px 0 0;
    }

    .resource-left-meta {
        padding: 1rem;
    }

    .qatar-content-container .resource-left {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .qatar-content-container .resource-card {
        grid-template-columns: 1fr;
    }

    /* Footer - Small Tablets */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .home-section-banners-grid{
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Mobile Landscape & Large Phones (480px - 600px)
   =================================== */
@media (max-width: 600px) {
    :root {
        --nav-height: 55px;
        --section-padding: 1rem;
    }

    .nav-container {
        padding: 0 0.75rem;
    }

    .nav-brand {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .nav-brand h1 {
        font-size: clamp(0.75rem, 0.8rem + 0.8vw, 1.2rem);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Mobile menu adjustments */
    .nav-right {
        width: 260px;
    }

    .nav-link {
        padding: 0.9rem 1.25rem;
        font-size: 0.85rem;
    }

    .nav-link:hover {
        padding-left: 1.75rem;
    }

    .hero-banner {
        min-height: 300px;
    }

    .hero-banner-small {
        min-height: 220px;
    }

    .hero-overlay {
        padding: 1.5rem;
    }

    .hero-title {
        font-size: clamp(0.95rem, 0.85vw + 0.4rem, 1.22rem);
        line-height: 1.5rem;
        padding: 5px;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: clamp(0.65rem, 0.55vw + 0.25rem, 0.8rem);
        line-height: 1.2rem;
        padding: 5px;
    }

    .section-container {
        padding: 0.75rem;
    }

    /* Cards General - Mobile */
    .card {
        border-radius: 12px;
    }

    .card-summary {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Policies Section - Mobile */
    .policy-card {
        padding: 0;
    }

    .policy-title {
        font-size: 1.1rem;
    }

    .policy-country-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .policy-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .policy-right {
        padding: 1rem;
    }

    .policy-tags {
        gap: 0.4rem;
    }

    .policy-metadata-row {
        flex-direction: column;
        gap: 1rem;
    }

    /* Case Studies Section - Mobile */
    .case-card {
        padding: 0;
    }

    .case-title {
        font-size: 1.1rem;
    }

    .case-country-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .case-right {
        padding: 1rem;
    }

    .case-tags {
        gap: 0.4rem;
    }

    .case-additional-info {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .case-metrics {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Pagination - Mobile */
    .policies-pagination,
    .cases-pagination {
        gap: 0.75rem;
        padding: 1rem 0.5rem;
    }

    .pagination-status {
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.5rem 0.9rem;
        font-size: 1rem;
    }

    /* Footer - Mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-supporter-col {
        gap: 0.5rem;
    }

    .footer-supporter-col h4 {
        font-size: 0.8rem;
        text-align: center;
    }

    .footer-supporter-col .footer-supporter-logo {
        height: 60px;
    }

    .footer-supporter-col .footer-supporter-logo img {
        max-width: 150px;
    }

}

/* ===================================
   Mobile Portrait (< 480px)
   =================================== */
@media (max-width: 480px) {
    :root {
        --nav-height: 50px;
    }

    body {
        font-size: 14px;
    }

    .nav-container {
        padding: 0 0.5rem;
    }

    .nav-brand {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .nav-brand h1 {
        font-size: clamp(0.65rem, 0.7rem + 0.5vw, 1rem);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Mobile menu - full width on small screens */
    .nav-right {
        width: 100%;
        max-width: 280px;
    }

    .nav-link {
        padding: 0.85rem 1.25rem;
        font-size: 0.8rem;
    }

    .nav-hamburger {
        width: 26px;
        height: 22px;
    }

    .nav-hamburger span {
        height: 2.5px;
    }

    .hero-banner {
        min-height: 250px;
    }

    .hero-banner-small {
        min-height: 180px;
    }

    .hero-overlay {
        padding: 1rem;
    }

    .hero-title {
        font-size: clamp(0.85rem, 0.75vw + 0.3rem, 0.95rem);
        line-height: 1.3rem;
        padding: 5px;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: clamp(0.55rem, 0.45vw + 0.18rem, 0.72rem);
        line-height: 1.1rem;
        padding: 5px;
    }

    .section-container {
        padding: 0.5rem;
    }

    /* Policies Section - Small Mobile */
    .filter-field label {
        font-size: 0.85rem;
    }

    .filter-field input,
    .filter-field select {
        font-size: 0.85rem;
        padding: 0.6rem;
    }

    .policy-image {
        height: 180px;
    }

    .policy-title {
        font-size: 1rem;
    }

    .policy-country-row span,
    .policy-meta span {
        font-size: 0.8rem;
    }

    .policy-summary {
        font-size: 0.85rem;
    }

    .policy-tag {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    .policy-metadata-label {
        font-size: 0.75rem;
    }

    .policy-link-text {
        font-size: 0.75rem;
    }

    /* Case Studies Section - Small Mobile */
    .case-filter-field label {
        font-size: 0.85rem;
    }

    .case-filter-input,
    .case-filter-select {
        font-size: 0.85rem;
        padding: 0.6rem;
    }

    .case-card-media {
        height: 180px;
    }

    .case-title {
        font-size: 1rem;
    }

    .case-org {
        font-size: 0.85rem;
    }

    .case-country-row span {
        font-size: 0.8rem;
    }

    .case-summary {
        font-size: 0.85rem;
    }

    .case-tag {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    .case-info-label {
        font-size: 0.75rem;
    }

    .metric-title {
        font-size: 0.75rem;
    }

    .metric-content {
        font-size: 0.85rem;
    }

    /* Buttons & Links - Small Mobile */
    .btn {
        padding: 0.45rem 0.8rem;
        font-size: 0.9rem;
    }

    .btn-ghost {
        font-size: 0.85rem;
    }

    /* Filter Toggle Buttons */
    .filter-toggle-btn {
        padding: 0.5rem;
    }

    .filter-toggle-btn i {
        font-size: 1rem;
    }

    .filter-header-content h3 {
        font-size: 1rem;
    }

    /* Pagination - Small Mobile */
    .policies-pagination,
    .cases-pagination {
        gap: 0.5rem;
        padding: 0.75rem 0.25rem;
    }

    .pagination-status {
        font-size: 0.75rem;
    }

    /* Footer - Small Mobile */
    .footer {
        padding: 2rem 1rem;
    }

    .footer-supporter-col h4 {
        font-size: 0.75rem;
    }

    .footer-supporter-col .footer-supporter-abbr {
        font-size: 0.7rem;
    }

    .footer-supporter-col .footer-supporter-logo {
        height: 50px;
    }

    .footer-supporter-col .footer-supporter-logo img {
        max-width: 120px;
    }

}

/* ===================================
   Extra Small Mobile (< 360px)
   =================================== */
@media (max-width: 360px) {
    :root {
        --nav-height: 45px;
    }

    body {
        font-size: 13px;
    }

    .nav-brand {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .nav-brand h1 {
        font-size: clamp(0.6rem, 0.65rem + 0.4vw, 0.9rem);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-right {
        width: 100%;
    }

    .nav-link {
        padding: 0.8rem 1rem;
        font-size: 0.75rem;
    }

    .nav-hamburger {
        width: 24px;
        height: 20px;
    }

    .nav-hamburger span {
        height: 2px;
    }

    .hero-banner {
        min-height: 200px;
    }

    .hero-banner-small {
        min-height: 150px;
    }

    .hero-title {
        font-size: clamp(0.8rem, 0.7vw + 0.28rem, 0.88rem);
        line-height: 1.2rem;
        padding: 5px;
    }

    .hero-subtitle {
        font-size: clamp(0.5rem, 0.4vw + 0.15rem, 0.63rem);
        line-height: 0.95rem;
        padding: 5px;
    }



    .policy-image,
    .case-card-media,
    .resource-image {
        height: 150px;
    }

    .policy-title,
    .case-title {
        font-size: 0.95rem;
    }

    .card-summary {
        font-size: 0.8rem;
    }

    .btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.85rem;
    }

}