/* ========================================================================= */
/* 0. Global Variables, Reset & Base Styles */
/* ========================================================================= */
:root {
    /* Color Variables */
    --primary: #00a2e8;
    --secondary: #0072bc;
    --dark: #0b1d35;
    --light: #f5fbff;
    --text: #1f2a3b;
    --muted: #5f6b7c;
    /* Lighter, Vibrant Blue for alternating sections */
    --color-light-bg: #D4EEFF;

    /* Spacing & Layout */
    --radius: 14px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    --max-width: 1200px;

    font-size: 16px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 150px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    /* Using Lato for better body text readability */
    font-family: "Lato", "Segoe UI", system-ui, -apple-system, sans-serif;
    margin: 0;
    color: var(--text);
    background: #d9f2ff;
    line-height: 1.7;
    overflow-x: hidden; /* Prevents horizontal scroll from fade-in effects */
}

[id] {
    scroll-margin-top: 120px;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.container {
    width: min(90%, var(--max-width));
    margin: 0 auto;
}

section {
    padding: 4rem 0;
}

/* ========================================================================= */
/* 1. Typography & General Components */
/* ========================================================================= */

/* --- Global Heading Styles (Centered by Default) --- */
.section-heading {
    text-transform: capitalize;
    letter-spacing: 2px;
    font-size: 1.8rem;
    font-weight: 1000;
    font-family: 'Playfair Display', serif;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.section-title,
.hero h1,
.card h3,
.cta-panel h3,
.site-footer h4,
.team-card h3,
.subsection-title {
    font-family: "Playfair Display", serif;
    font-weight: 700;
    text-align: center;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin: 0 auto 1.5rem auto;
    color: var(--secondary);
    text-align: center;
}

/* --- Force Centering for Specific Page Headings --- */
/* This ensures About Us and Programs sub-menu headings are centered */
#partners .section-title,
#future-goals .section-title,
#focus-areas .section-heading,
#sdgs .section-heading,
#projects .section-heading,
#voices .section-heading {
    text-align: center !important;
}

/* --- Paragraph Styles --- */

/* Intro/Description paragraphs remain justified for a formal look */
.section-description,
.intro-text,
.closing-statement {
    color: var(--muted);
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: justify;
    text-justify: inter-word;
}

/* --- Card Paragraphs are JUSTIFIED with hyphens to reduce gaps --- */
/* This is the professional standard for readability in narrow columns */
.card p,
.project-card p,
.sdg-item p,
.voices-card p,
.team-card p,
.about-summary p,
.photographer-text,
.cta-panel p {
    font-family: 'Lato', sans-serif;
    color: var(--muted);
    line-height: 1.6;
    text-align: justify !important;
    text-justify: inter-word !important;
    hyphens: auto !important;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* --- Component Styles --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.75rem;
}

.card {
    background: white;
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Aligns card content to the left for clean look */
    text-align: left;
}

.card h3 {
    margin-top: 0;
    color: var(--secondary);
    text-align: center; /* Card titles remain centered */
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 12px 30px rgba(0, 162, 232, 0.35);
}

.btn-outline {
    border: 1px solid var(--secondary);
    color: var(--secondary);
    background: transparent;
}

.btn:hover {
    transform: translateY(-2px);
}

/* ========================================================================= */
/* 2. Header & Navigation */
/* ========================================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
    padding: 1rem 0;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    transform: none;
    left: auto;
}

.logo span {
    color: var(--primary);
}

.nav-toggle {
    display: block;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--secondary);
    z-index: 1001;
    margin-left: auto;
}

.nav-toggle:focus {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

/* Slide-in Sidenav */
.sidenav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    padding: 4rem 0 2rem;
}

.sidenav.open {
    left: 0;
}

.sidenav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 999;
}

.sidenav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    font-weight: 500;
    padding: 0;
    text-transform: none !important; /* Prevents unwanted uppercase */
}

.nav-links li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-links .has-dropdown {
    position: relative;
}

/* --- Submenu (Dropdown Menu) Styling --- */

/* --- Desktop: Horizontal Dropdown --- */
@media (min-width: 992px) {
    .has-dropdown {
        position: relative !important;
    }

    .dropdown-menu {
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        position: absolute !important;
        top: 100% !important;
        left: 50% !important;
        transform: translateX(-50%) translateY(20px) !important;
        opacity: 0;
        visibility: hidden;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px) !important;
        padding: 10px 20px !important;
        border-radius: 50px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
        width: max-content !important;
        z-index: 9999 !important;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    }

    .has-dropdown:hover .dropdown-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(-50%) translateY(10px) !important;
    }

    .dropdown-menu li {
        display: inline-block !important;
    }

    .dropdown-menu li a {
        white-space: nowrap !important;
        padding: 8px 15px !important;
        border-radius: 20px !important;
    }
}

/* --- Mobile: Vertical Dropdown --- */
@media (max-width: 991px) {
    /* Mobile menu should be hidden by default */
    .sidenav .dropdown-menu {
        display: none !important; 
        position: static !important;
        background: rgba(0,0,0,0.03) !important; /* Slightly darker to distinguish submenu */
        width: 100% !important;
        padding: 10px 20px !important;
        transform: none !important;
        flex-direction: column !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Critical: Show menu when active class is added */
    .sidenav .has-dropdown.active > .dropdown-menu {
        display: flex !important;
    }

    .dropdown-menu li {
        display: block !important;
        width: 100% !important;
    }
}

/* Base Styles */
.nav-links a {
    display: block;
    padding: 1rem 2rem;
    color: var(--muted);
    transition: background-color 0.2s ease, color 0.2s ease;
    text-transform: none !important;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary);
    background-color: rgba(0, 162, 232, 0.05);
}

@media (min-width: 769px) {
    /* Ensure dropdown menu is displayed on hover/focus on desktop */
    .has-dropdown:hover > .dropdown-menu,
    .has-dropdown:focus-within > .dropdown-menu {
        display: block;
    }
}

/* Desktop navigation - hidden by default, shown with media query */
.desktop-nav {
    display: none;
}

.desktop-nav .nav-links {
    flex-direction: row;
    gap: 0;
    align-items: stretch;
    width: 100%;
}

.desktop-nav .nav-links li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
}

.desktop-nav .nav-links li:last-child {
    border-bottom: none;
}

.desktop-nav .nav-links a {
    padding: 0.75rem 1.5rem;
    display: block;
    width: 100%;
    white-space: nowrap;
}

/* ========================================================================= */
/* 2.5. Full-Width Image Slider */
/* ========================================================================= */

.full-width-slider {
    /* Remove padding/margin to make it full-width */
    padding: 0; 
    margin: 0;
    width: 100%;
    /* Set a fixed height for the slider container */
    height: 450px;
    overflow: hidden; 
}

.heroSlider {
    width: 100%;
    height: 450%;
}

/* Individual slide styling */
.heroSlider .swiper-slide {
    background: #e0e0e0;
    text-align: center;
}

/* Image styling (Ensures image covers the slide without text) */
.full-width-slider {
    padding: 0; 
    margin: 0;
    width: 100%;
    height: 700px; /* Adjusted height for better view */
    overflow: hidden; 
    background: var(--dark);
}

.heroSlider {
    width: 100%;
    height: 100%;
}

.heroSlider img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    /* This fills the sides without leaving gaps */
    object-fit: cover !important; 
    /* Ensures faces/subjects aren't cut off from the top */
    object-position: center top 20%; 
    transition: opacity 0.5s ease;
}

/* Responsive adjustment: 700px is too big for small laptops and phones */
@media (max-width: 1200px) {
    .full-width-slider {
        height: 400px; 
    }
}

@media (max-width: 768px) {
    .full-width-slider {
        height: 250px; /* Perfect for mobile screens */
    }
}

/* ========================================================================= */
/* 3. Homepage Sections */
/* ========================================================================= */

/* --- Hero Section (Original Content) --- */
.hero {
    /* Reduced top padding to look good below the new full-width slider */
    padding: 3rem 0 4rem;
    background: linear-gradient(180deg, rgba(0, 162, 232, 0.08), rgba(255, 255, 255, 0));
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    align-items: center;
}

.hero h1 {
    /* Font is Playfair Display via the combined selector above */
    /* Larger font size for main hero title */
    font-size: clamp(3rem, 8vw, 6rem); 
    line-height: 1.1; 
    margin-bottom: 1rem;
    /* Using the high-contrast dark color for the main title */
    color: var(--primary); 
}

.hero p {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 2rem;
    text-align: justify;
    text-justify: inter-word;
}

.tagline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--secondary);
    background: rgba(0, 162, 232, 0.08);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    /* Ensure opacity is managed by JS for fade-in */
    opacity: 0; 
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.stats.visible {
    opacity: 1; 
    transform: translateY(0); 
}

.stat {
    color: var(--dark);
}

.stat strong {
    font-size: 2rem;
    display: block;
    /* Keep count numbers distinct */
    font-family: "Playfair Display", serif;
}

/* Hero Image Styles (Vertical Layout) */
.hero-image-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius);
}

.hero-image-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin: 0;
}

.hero-image-wrapper .hero-image {
    width: 100%;
    height: auto;
    object-fit: initial;
    display: block;
    border-radius: var(--radius);
}

.hero-image-item figcaption {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--muted);
    margin-top: 5px;
    text-align: right;
}

.photographer-bio {
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.photographer-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin: 0 0 0.25rem 0;
    font-weight: 600;
}

.photographer-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 0 0 0.5rem 0;
}

/* --- About Section --- */
.about-summary {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--light);
    border-left: 5px solid var(--primary);
    border-radius: 4px;
}

@media (max-width:768px){
    .card{
        padding: 1.5rem;
        margin-left: 10px;
        margin-right: 10px;
    }
}

.values-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
}

/* --- SDG Section (#sdgs) --- */
#sdgs .sdg-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

/* SDG Styles (for image-based icons) */
.sdg-image {
    width: 80px; 
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 12px; 
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15); 
    transition: transform 0.3s ease-in-out;
}

.sdg-item {
    text-align: center;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease-in-out;
}

.sdg-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px); 
}

.sdg-item:hover .sdg-image {
    transform: scale(1.05); 
}

/* Hiding old icon styles to rely on the new .sdg-image tag */
.sdg-icon {
    display: none; 
}
.sdg-emoji {
    display: none;
}

/* Page Hero Section (for blog, research, podcasts pages) */
.page-hero {
    padding: 3rem 0 2rem;
    background: linear-gradient(180deg, rgba(0, 162, 232, 0.08), rgba(255, 255, 255, 0));
}

.page-hero h1 {
    /* Font is Playfair Display via the combined selector above */
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    color: var(--secondary);
}

.page-hero p {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 700px;
    text-align: justify;
    text-justify: inter-word;
}

.sdg-item h3 {
    color: var(--secondary);
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    /* Font is Playfair Display via the combined selector above */
}

/* --- Projects / Events Section (#projects) --- */
.project-grid {
    margin-top: 1.5rem;
    gap: 2rem !important; /* Spacing between cards */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important; /* Card width */
}

.project-grid .project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2.5rem 2rem !important; /* Larger cards */
    min-height: 320px; /* Equalize height */
}

.project-grid .project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.project-card .pill {
    font-size: 0.8rem;
    align-self: flex-start;
    margin-bottom: 1rem !important;
}

.project-card h3 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.35rem !important;
}

/* Most important: Text alignment fix for English language */
.project-card p {
    /* Most important change: Left-aligns text to eliminate gaps */
    text-align: left !important;
    /* Line spacing for better readability */
    line-height: 1.6 !important;
    /* Remove problematic commands for English */
    word-spacing: normal !important;
    hyphens: none !important;
}

/* Style for the 'Key Highlights' Sub-heading */
.subsection-title {
    /* Font is Playfair Display via the combined selector above */
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary);
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 0.5rem;
}

/* --- Future Goals Section (#future-goals) */
#future-goals {
    background-color: var(--color-light-bg);
    padding: 4rem 0;
}

#future-goals .goals-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1rem 2rem;
}

#future-goals .goals-list li {
    position: relative;
    padding-left: 2rem;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
    color: var(--muted);
    text-align: left;
}

#future-goals .goals-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* --- Partners Section (#partners) */
#partners {
    padding: 4rem 0;
}

/* --- Partners Logos --- */
.partner-logo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 30px; 
    margin-top: 40px;
    align-items: center; 
    justify-items: center;
}

.partner-logo-link {
    display: block;
    height: 80px; 
    width: 100%;
    transition: opacity 0.3s, transform 0.3s; 
    opacity: 0.8;
}

.partner-logo-link:hover {
    opacity: 1; 
    transform: scale(1.05); 
}

.partner-logo-link img {
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    object-fit: contain; 
}

/* Styling for the remaining text list */
.partner-list-text {
    list-style: disc;
    padding-left: 20px;
    columns: 2; 
    margin-bottom: 50px;
    font-size: 1.1em;
    text-align: justify;
    text-justify: inter-word; 
}

#partners .partner-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem 2rem;
}

#partners .partner-list li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    color: var(--dark);
    font-weight: 500;
    text-align: left;
}

#partners .partner-list li::before {
    content: '★';
    position: absolute;
    left: 0;
    color: #ffc107;
    font-size: 0.8rem;
    top: 5px;
}

/* --- Membership Section (#membership) */
#membership {
    padding: 4rem 0;
    text-align: center;
}

#membership .card, #membership ul {
    margin-left: auto;
    margin-right: auto;
}

/* --- Voices of Change (General Cards) --- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: rgba(0, 114, 188, 0.08);
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.voices-card a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--secondary);
    font-weight: 600;
    margin-top: 1rem;
}

/* --- CTA Panel --- */
.cta-panel {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    padding: 3rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.cta-panel h3 {
    /* Font is Playfair Display via the combined selector above */
    font-size: 2rem;
    margin: 0 0 1rem;
}

.cta-panel .contact-info {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    font-weight: 600;
}

/* ========================================================================= */
/* 4. Team Page (team.html) */
/* ========================================================================= */
.team-intro {
    padding-top: 2rem;
    padding-bottom:  2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.team-grid {
    padding: 2rem 0 5rem 0;
}

.grid-title {
    /* Matches Our Partners Style */
    font-family: 'Playfair Display', serif !important;
    font-weight: 700 !important;
    font-size: 2rem;
    color: var(--secondary);
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0.5rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
    text-align: center;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    justify-content: center;
    grid-template-columns: 1fr;
}

/* Main fix for team cards - everything centered */
.team-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    text-align: center !important; /* Important: all text centered */
    display: flex;
    flex-direction: column;
    align-items: center !important; /* Important: all elements horizontally centered */
    justify-content: flex-start;
}

/* Hide member card style for filtering */
.team-card.hide {
    display: none !important;
}
.team-card:not(.hide) {
    opacity: 1;
    height: auto;
    transform: scale(1);
}

.team-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

/* Fix for team photo - completely centered */
.team-photo {
    width: 130px;
    height: 130px;
    object-fit: cover;
    object-position: top;
    border-radius: 50%;
    margin: 0 auto 1.5rem auto !important; /* Important: photo centered */
    display: block;
    border: 3px solid var(--light);
}

/* Fix for team paragraph - better alignment */
.team-card p {
    font-family: 'Lato', sans-serif;
    color: var(--muted);
    line-height: 1.6;
    text-align: center !important; /* Important: description text centered */
    width: 100%;
    margin-top: 1rem;
    hyphens: auto;
}

/* Fix for team title */
.team-card h3 {
    font-family: 'Playfair Display', serif !important;
    font-weight: 700 !important;
    font-size: 1.4rem;
    color: var(--dark);
    margin-top: 0;
    margin-bottom: 1rem;
    text-align: center !important; /* Important: title centered */
    width: 100%;
}

/* Fix for position/title */
.team-card span {
    font-family: 'Lato', sans-serif;
    
    letter-spacing: 1px;
    display: block;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center !important; /* Important: position centered */
}

/* For cards without an image */
.empty-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 250px;
}

/* --- Team Filtering Styles --- */
.team-filter-menu {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    border: 1px solid var(--secondary);
    background: transparent;
    color: var(--secondary);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.filter-btn:hover {
    background-color: rgba(0, 114, 188, 0.1);
}

.filter-btn.active {
    background-color: var(--secondary);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 114, 188, 0.2);
}

/* ========================================================================= */
/* 5. Contact Page (contact.html) */
/* ========================================================================= */
.contact-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Fixed typo and added center logic */
#contact .section-title,
#contact .section-description {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

#membership h2, 
#membership .section-title,
.membership-benefits-title {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    display: block;
    width: 100%;
}

.card,
ul {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

form {
    display: grid;
    gap: 1.25rem;
}

label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    display: block;
}

input,
textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font: inherit;
    resize: vertical;
}

input:focus,
textarea:focus {
    outline: 2px solid rgba(0, 162, 232, 0.3);
    border-color: transparent;
}

.map-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.map-placeholder {
    background: linear-gradient(135deg, rgba(0, 162, 232, 0.12), rgba(0, 114, 188, 0.12));
    border-radius: 12px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-weight: 600;
    margin-top: 1.5rem;
}

/* Style for social links in the contact details box */
.map-card .social-links-contact-page {
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.map-card .social-links-contact-page a {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    text-decoration: none;
    font-weight: 500;
    color: var(--secondary);
}

/* Styling the Font Awesome icon inside the social link */
.map-card .social-links-contact-page a i {
    margin-right: 0.6rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* ========================================================================= */
/* 6. Footer - All Items Side-by-Side */
/* ========================================================================= */

/* This code ensures all text inside the footer is white */
footer.footer-section,
footer.footer-section *,
footer.footer-section p,
footer.footer-section a,
footer.footer-section h3,
footer.footer-section h4,
footer.footer-section div,
footer.footer-section span {
    color: #ffffff !important;
}

/* Main footer section - with less padding to make it smaller */
footer.footer-section {
    background-color: #0056b3 !important;
    padding: 40px 0 20px 0;
    clear: both;
    width: 100%;
    margin-top: 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.contact-us-container {
    margin-bottom: 30px;
}

/* This is the key section: it places everything in a single horizontal row */
.contact-grid {
    display: flex;
    justify-content: flex-start; /* Everything starts from the left */
    align-items: center; /* Vertically aligns everything to the center */
    gap: 40px; /* Gap between email, phone, and social media */
    flex-wrap: wrap; /* On small screens, wrap to the next line if there's not enough space */
}

/* Style for the email and phone number paragraphs */
.contact-info-left {
    margin: 0; /* Remove extra paragraph margin */
    font-size: 0.95rem;
}

/* Container for the social media links */
.social-links-right {
    display: flex; /* Makes the social media links sit side-by-side */
    align-items: center;
    gap: 15px; /* Gap between each social media icon */
    margin-left: auto; /* Pushes this section to the right */
}

.social-links-right a {
    text-decoration: none;
    font-size: 1rem;
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

/* For mobile view */
@media (max-width: 768px) {
    .contact-grid {
        flex-direction: column; /* On mobile, stack everything vertically */
        gap: 20px;
        text-align: center;
    }
    .social-links-right {
        margin-left: 0; /* On mobile, don't stick to the right anymore */
        justify-content: center;
    }
}

/* ========================================================================= */
/* 7. Media Queries (Mobile Responsiveness) */
/* ========================================================================= */

@media (max-width: 768px) {
    /* --- General Mobile Adjustments --- */
    .stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .cta-panel {
        padding: 2rem;
    }

    .cta-panel h3 {
        padding: 2rem;
        margin: 0 0 1rem;
        color: black;
    }

    .page-hero {
        padding-top: 6rem;
    }

    .logo {
        font-size: 1rem;
    }

    .logo img {
        height: 30px !important;
    }

    body {
        overflow-x: hidden;
    }

    /* --- Mobile Navigation & Dropdowns --- */
    .sidenav {
        top: 0;
        padding-top: 4rem;
        z-index: 1000;
    }

    .sidenav.open {
        left: 0;
        box-shadow: 2px 0 25px rgba(0, 0, 0, 0.15);
    }

    /* FIXED: Hide submenus by default on mobile */
    .sidenav .dropdown-menu {
        position: static;
        display: none; /* Submenu hidden until clicked */
        box-shadow: none;
        border: none;
        padding: 0.5rem 0 0.5rem 2rem; 
        background: rgba(0, 0, 0, 0.03); /* Slight background to distinguish submenu */
        width: 100%;
        transform: none; 
        text-align: left;
    }

    /* Show submenu when parent LI has .active class */
    .sidenav .has-dropdown.active > .dropdown-menu {
        display: block;
    }

    .sidenav .dropdown-menu a {
        padding: 0.75rem 0;
        font-size: 0.9rem;
    }

    main {
        position: relative;
        z-index: 1;
    }

    /* --- Footer & Grid Adjustments --- */
    .contact-grid {
        flex-direction: column; 
    }

    .contact-info-left,
    .social-links-right {
        flex-basis: 100%;
        max-width: 100%;
        text-align: center; 
        padding: 10px 0;
    }

    .partner-logo-grid {
        grid-template-columns: repeat(2, 1fr); 
    }

    .partner-list-text {
        columns: 1; 
    }
    
    .full-width-slider {
        height: 250px; 
    }
}

/* --- Desktop Navigation (769px and up) --- */
@media (min-width: 769px) {
    .nav-toggle, 
    .sidenav, 
    .sidenav-overlay {
        display: none;
    }

    .desktop-nav {
        display: block;
        flex: 0 1 auto;
        margin-left: 1.5rem;
    }

    .desktop-nav .nav-links {
        flex-direction: row;
        gap: 1.5rem;
        align-items: center;
    }

    .desktop-nav .nav-links a {
        padding: 0.5rem 0;
        font-size: 0.95rem;
    }

    /* Desktop Hover Effect for Submenus */
    .has-dropdown:hover > .dropdown-menu {
        display: block;
    }
}

/* --- Tablet & Large Screen Adjustments --- */
@media (min-width: 768px) {
    .site-footer .footer-grid {
        grid-template-columns: 2fr 1fr;
    }
}

@media (min-width: 992px) {
    .contact-layout {
        grid-template-columns: 1.5fr 1fr;
        gap: 3rem;
    }
}

/* ========================================================================= */
/* 8. Utility & JavaScript Hooks (FIXED FOR TEAM FILTER) */
/* ========================================================================= */

/* IMPORTANT: This rule ensures that when JavaScript adds the .hide class, 
   the card is removed from the layout entirely.
*/
.team-card.hide {
    display: none !important;
}

/* Base style for team cards with smooth transition */
.team-card {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ========================================================================= */
/* 9. Visual Effects & Animations (Fade-In) */
/* ========================================================================= */

.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px); 
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-on-scroll.visible {
    opacity: 1; 
    transform: translateY(0); 
}

/* --- Membership Section Centering --- */
#membership-highlights .membership-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; /* Centers everything horizontally */
    text-align: center !important;
}

/* Centers the list box while keeping the text left-aligned */
.member-list {
    display: inline-block !important; 
    text-align: left !important;      
    margin: 30px auto !important;     
    padding: 0 !important;
    max-width: fit-content !important;
    list-style: none !important;
}

.member-list li {
    margin-bottom: 15px !important;
    font-size: 1.1rem !important;
    display: flex !important;
    align-items: center !important;
}

/* Centering the Join Us Button container */
#membership-highlights .text-center {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
}

/* --- Typography Fixes (SDGs and Titles) --- */
/* Fix for "Our Commitment to The SDGs" and main headings */
h2.section-title, 
.section-heading {
    text-transform: none !important; 
    font-variant: normal !important;
    letter-spacing: normal !important;
}

/* ---- Final and Most Powerful Fix for Beautiful Text ---- */
p, .card p, .project-card p, .sdg-item p, .voices-card p,.team-card p, .about-summary p, .photographer-text, .cta-panel p, .section-description, .intro-text, .closing-statement, .page-hero p {
    text-align: justify !important;
    text-justify: distribute-all-lines; /* Tries to distribute space more evenly */
    line-height: 1.65; /* Slightly increases line height for better readability */
    word-spacing: -0.05em; /* Reduces the space between words */
    hyphens: auto; /* Breaks words at the end of a line */
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* Force center headings regardless of the tag type (p or h2) */
.section-heading, .section-title {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

/* Vertical projects container */
.projects-vertical-container {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Less spacing between cards for simplicity */
    width: 100%;
    max-width: 950px; 
    margin: 2rem auto;
}

/* Simple project card */
.project-wide-card.no-image {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px; /* Slightly sharper corners for a more formal look */
    border: 1px solid #e0e0e0; /* Just a simple gray border */
    box-shadow: none !important; /* Complete removal of shadows */
    transition: background-color 0.2s ease;
}

/* Very subtle color change on hover (optional) */
.project-wide-card.no-image:hover {
    background-color: #f9f9f9;
    transform: none !important; /* Remove card movement */
}

.project-content h3 {
    margin: 0 0 10px 0;
    color: #00a2e8; /* Darker, simpler color for title */
    font-size: 1.3rem;
    font-weight: 700;
}

/* Final text alignment */
/* Final text alignment - modified for mobile and desktop */
.project-content p {
    text-align: justify !important;
    text-justify: inter-character !important; /* Distributes space between characters, not words */
    hyphens: auto !important; /* Breaks long words */
    -webkit-hyphens: auto;
    line-height: 1.7;
    color: #555;
    margin: 0;
    word-break: break-word; /* Prevents words from overflowing the box */
}

/* Mobile-specific settings to completely eliminate gaps */
@media (max-width: 768px) {
    .project-content p {
        text-align: justify !important;
        text-justify: inter-character !important;
        letter-spacing: -0.2px; /* Slightly brings letters closer together to create more space */
        font-size: 0.95rem; /* Slightly smaller text for better word fitting */
    }
    
    .project-wide-card.no-image {
        padding: 1.2rem; /* Less padding for more text space */
    }
}
.card,.card h3,.card p{
text-align: left !important;
}
.card ul{
    text-align: left !important;
    padding-left: 20px;
}

/* --- Special Styling for Core Values with Green Checkmarks --- */

/* Align text to Justify and remove default bullets */
.values-with-ticks li {
    text-align: justify !important;
    text-justify: inter-word !important;
    list-style: none; /* Removes default black bullets */
    position: relative;
    padding-left: 35px; /* Creates space for the checkmark */
    margin-bottom: 15px;
    color: var(--dark) !important; /* Sets text color to secondary blue */
    line-height: 1.6;
}

/* Add a green checkmark before each list item */
.values-with-ticks li::before {
    content: '✔'; /* Checkmark symbol */
    position: absolute;
    left: 0;
    top: 0;
    color: #28a745; /* Standard green color for success/ticks */
    font-weight: bold;
    font-size: 1.2rem;
}

/* Ensure the Core Values heading is left-aligned */
.core-values-card h3 {
    text-align: left !important;
    margin-bottom: 20px;
}
/* --- Styles for Core Values: Blue Titles and Black Text --- */

/* This makes the titles (Innovation, Sustainability, etc.) Blue */
.values-with-ticks li strong {
    color: var(--secondary) !important; /* Uses your theme's blue */
    font-weight: 700;
}

/* This ensures the descriptive text remains Black */
.values-with-ticks li {
    color: #000000 !important; /* Pure black for the description */
    text-align: justify !important;
}

/* --- Fix for fixed header overlapping sections --- */
.scroll-anchor {
    display: block;
    visibility: hidden;
    position: relative;
    top: -150px; 
}

/* تغییر فونت اختصاصی برای بخش کانتکت */
#contact .section-title {
    font-family: 'Playfair Display', serif !important;
    font-weight: 800 !important;
    font-size: 2.2rem !important;
    color: var(--secondary);
}

/* تنظیم نهایی اسلایدر: نمایش کامل عکس + پس‌زمینه آبی */
.full-width-slider, 
.heroSlider,
.swiper-slide {
    height: 450px !important; /* ارتفاع را طبق نظر مشتری تنظیم کن (مثلا 450) */
    background-color: #8ccdf9 !important; /* رنگ آبی برند شما (Secondary Color) */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.heroSlider img {
    height: 100% !important; /* ارتفاع کامل اسلایدر را بگیرد */
    width: auto !important;   /* عرض خودکار باشد تا عکس دفرمه نشود */
    max-width: 100% !important;
    object-fit: contain !important; /* نمایش کامل عکس بدون برش */
    margin: 0 auto !important;
    display: block !important;
}

/* تنظیم برای موبایل */
@media (max-width: 768px) {
    .full-width-slider, 
    .heroSlider,
    .swiper-slide {
        height: 250px !important; /* ارتفاع کمتر در موبایل */
    }
}

/* اصلاح فاصله کلمات در بخش Core Values برای موبایل */
@media (max-width: 768px) {
    .values-with-ticks li {
        /* تغییر از justify به تراز از چپ برای جلوگیری از ایجاد فاصله خالی */
        text-align: left !important; 
        /* غیرفعال کردن توزیع فضا بین کلمات */
        text-justify: none !important; 
        /* استفاده از خط تیره برای کلمات طولانی جهت پر کردن بهتر خطوط */
        hyphens: auto !important;
        word-spacing: normal !important;
        letter-spacing: -0.02em; /* کمی نزدیک کردن حروف برای فیت شدن بهتر */
    }
    
    .core-values-card h3 {
        text-align: center !important; /* عنوان در موبایل وسط باشد بهتر است */
    }
}


/* حل نهایی و قطعی فاصله‌های غیرطبیعی در موبایل */
@media (max-width: 768px) {
    /* هدف قرار دادن تمام متن‌های سایت در موبایل */
    p, 
    li, 
    .project-content p, 
    .values-with-ticks li, 
    .member-list li, 
    .section-description,
    .card p {
        text-align: left !important; /* تراز از چپ (بهترین حالت برای موبایل) */
        text-justify: none !important; /* غیرفعال کردن توزیع فضا */
        word-spacing: 0 !important; /* حذف فاصله‌های اضافه بین کلمات */
        white-space: normal !important;
        hyphens: auto !important; /* شکستن کلمات طولانی برای پر کردن خط */
    }

    /* برای بخش Become a Member که عکس دادی */
    .values-with-ticks li, .member-list li {
        display: flex !important;
        align-items: flex-start !important;
        text-align: left !important;
    }

    /* اگر می‌خواهی کانتکت حتماً وسط باشد اما بدون فاصله زشت */
    #contact .section-description, 
    #contact p {
        text-align: center !important;
        text-justify: none !important;
        word-spacing: normal !important;
    }
}