/* ================================
    COLOR PALETTE
================================= */
:root {
    --primary-color: #5d3f6a; /* Deep Purple */
    --secondary-color: #2c3e50; /* Professional Dark Blue */
    --accent-color: #f39c12; /* Optional: A bright accent for highlights/buttons if needed */
    --background-light: #f4f6f9;
    --text-dark: #333;
    --text-light: #fff;
    --shadow-light: rgba(0, 0, 0, 0.08);
}

/* ================================
    GLOBAL STYLES
================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3 {
    color: var(--secondary-color);
    font-weight: 700;
}

section {
    padding: 80px 5%;
}

.container-grid {
    display: grid;
    gap: 30px;
    margin-top: 40px;
}

.two-cols {
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.one-col {
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 40px auto;
    text-align: center;
}

/* Buttons */
.btn {
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    display: inline-block;
    border: 2px solid transparent;
    text-align: center;
}

.small-btn {
    padding: 8px 15px;
    font-size: 14px;
}

.primary-btn {
    background: var(--primary-color);
    color: var(--text-light);
}

.primary-btn:hover {
    background: #463050; /* Slightly darker purple */
}

.secondary-btn {
    background: none;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.secondary-btn:hover {
    background: var(--primary-color);
    color: var(--text-light);
}

.donate-btn {
    background: var(--accent-color);
    color: var(--text-dark);
    font-weight: 700;
}

.donate-btn:hover {
    background: #e68a00;
}

/* ================================
    HEADER & NAVIGATION
================================= */

.main-header {
    width: 100%;
    padding: 15px 5%;
    background: var(--text-light);
    box-shadow: 0 2px 10px var(--shadow-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo img {
    width: 100px; /* Adjust size for logo image */
    height: auto;
    display: block;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
}

/* ================================
    HERO SECTION
================================= */
.hero {
    background: linear-gradient(135deg, var(--background-light) 0%, #dcdfe5 100%);
    display: flex;
    align-items: center;
    text-align: center;
    height: 70vh; /* Viewport height for prominence */
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

/* ================================
    MISSION & VISION
================================= */
.mission-vision {
    text-align: center;
    background: var(--text-light);
}

.mission-vision h2 {
    margin-bottom: 50px;
}

.mission-vision .container-grid {
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
    margin: 40px auto 0 auto;
}

.mission-vision .card {
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-light);
    text-align: left;
}

.mission-vision .mission {
    border-top: 5px solid var(--primary-color);
}

.mission-vision .vision {
    border-top: 5px solid var(--secondary-color);
}

.mission-vision .card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* ================================
    KEY PROGRAMS (WHAT WE DO)
================================= */
.key-programs {
    text-align: center;
}

.key-programs h2 {
    margin-bottom: 50px;
}

.key-programs .container-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-bottom: 40px;
}

.program-item {
    background: var(--text-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--shadow-light);
    transition: transform 0.3s;
}

.program-item:hover {
    transform: translateY(-5px);
}

.program-item h3 {
    color: var(--secondary-color);
    margin-top: 15px;
    margin-bottom: 10px;
}

/* ================================
    CALL TO ACTION
================================= */
.call-to-action {
    background: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    padding: 60px 5%;
}

.call-to-action h2 {
    color: var(--text-light);
    margin-bottom: 15px;
}

.call-to-action p {
    font-size: 18px;
    margin-bottom: 40px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.action-buttons .large {
    padding: 15px 35px;
    font-size: 17px;
}

/* Adjust button colors for dark background */
.call-to-action .secondary-btn {
    border-color: var(--text-light);
    color: var(--text-light);
}

.call-to-action .secondary-btn:hover {
    background: var(--text-light);
    color: var(--primary-color);
}


/* ================================
    FOOTER
================================= */
footer {
    background: var(--secondary-color);
    color: #b0b0b0;
    text-align: center;
    padding: 30px 5%;
}

/* ================================
    PAGE BANNERS & GENERAL STYLES
================================= */

/* Page Banner (Title section for internal pages) */
.page-banner {
    background: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    padding: 60px 5%;
}

.page-banner h1 {
    color: var(--text-light);
    font-size: 42px;
    margin-bottom: 10px;
}

.page-banner p {
    font-size: 18px;
    opacity: 0.9;
}

hr {
    border: 0;
    height: 1px;
    background: #ccc;
    margin: 40px 0;
}


/* ================================
    ABOUT US PAGE STYLES
================================= */
.about-foundation {
    background: var(--text-light);
}

.about-foundation .two-cols {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    text-align: left;
}

.about-foundation .text-content h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-foundation .text-content p {
    margin-bottom: 15px;
}

.about-foundation .image-content img {
    width: 100%;
    max-height: 600px; 
    object-fit: cover; 
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-light);
}


.core-values {
    background: var(--background-light);
    text-align: center;
}

.core-values h2 {
    margin-bottom: 40px;
}

.core-values .values-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.value-item {
    background: var(--text-light);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 3px 10px var(--shadow-light);
    border-bottom: 4px solid var(--accent-color);
    text-align: left;
}

.value-item h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.our-team {
    text-align: center;
}

.our-team h2 {
    margin-bottom: 40px;
}

.our-team .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Adjusted min size for wider images */
    gap: 30px;
}

.team-member {
    text-align: center;
}

.team-member img {
    width: 250px; 
    height: 250px;
    object-fit: contain; /* Prevents cropping on team photos */
    border-radius: 50%; /* Makes the image circular */
    border: 5px solid var(--primary-color);
    margin: 0 auto 15px auto;
    display: block;
}

.team-member h3 {
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.team-member .role {
    color: #666;
    font-weight: 600;
}

/* ================================
    WHAT WE DO PAGE STYLES
================================= */
.strategic-focus {
    background: var(--text-light);
    padding-bottom: 0;
}

.program-details {
    padding-top: 0;
}

.program-area {
    margin-bottom: 50px;
    align-items: flex-start; /* Ensure text and image align from the top */
}

.program-area h3 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 15px;
}

.program-area p {
    margin-bottom: 15px;
}

.program-area ul {
    margin-left: 20px;
    list-style: disc;
}

.program-area ul li {
    margin-bottom: 8px;
}

.program-area .image-content img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-light);
}

.program-area.reversed {
    grid-template-areas: "image text";
}

.program-area.reversed .text-content {
    grid-area: text;
}

.program-area.reversed .image-content {
    grid-area: image;
}


/* ================================
    PARTNER & VOLUNTEER PAGE STYLES
================================= */

.volunteer-section {
    background: var(--text-light);
    text-align: center;
}

.roles-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-bottom: 50px;
}

.role-card {
    background: var(--background-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--shadow-light);
    border-top: 5px solid var(--accent-color);
    text-align: left;
}

.role-card h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.role-card p {
    margin-bottom: 20px;
}

.partner-section {
    text-align: center;
}

.types-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.type-card {
    background: var(--text-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-light);
    text-align: left;
    border-left: 5px solid var(--primary-color);
}

.type-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.type-card ul {
    list-style: disc;
    margin-left: 20px;
    margin-top: 10px;
    color: #555;
}

/* ================================
    MEDIA CENTER PAGE STYLES
================================= */

.news-announcements {
    background: var(--text-light);
    text-align: center;
}

.news-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-bottom: 50px;
}

.news-item {
    background: var(--background-light);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--shadow-light);
    text-align: left;
    border-bottom: 3px solid var(--primary-color);
}

.news-item h3 {
    margin-bottom: 5px;
    font-size: 20px;
}

.news-item .date {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 14px;
}

.news-item p {
    margin-bottom: 15px;
}

.photo-gallery {
    text-align: center;
}

.gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.gallery-item {
    background: var(--text-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-light);
}

.gallery-item img {
    width: 100%;
    height: 250px; /* Uniform height for clean display */
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.gallery-item .caption {
    padding: 15px;
    font-size: 14px;
    color: #555;
    font-style: italic;
    border-top: 1px solid #eee;
}

/* ================================
    CONTACT PAGE STYLES
================================= */

.contact-section {
    background: var(--text-light);
}

.contact-grid-layout {
    align-items: flex-start;
}

.contact-info {
    padding: 20px;
    background: var(--background-light);
    border-radius: 8px;
}

.contact-info h2 {
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 15px;
}

.info-item {
    margin-bottom: 25px;
    border-left: 3px solid var(--primary-color);
    padding-left: 15px;
}

.info-item h3 {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 5px;
}

.info-item p a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
}

.info-item .small-text {
    font-size: 14px;
    color: #777;
    margin: 0;
}

.social-links a {
    margin-right: 15px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

.contact-form h2 {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
}

/* Map Section */
.map-section {
    text-align: center;
    padding-top: 0;
}

.map-placeholder {
    width: 100%;
    height: 400px;
    background: #e0e0e0;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-style: italic;
    color: #666;
    overflow: hidden;
}

.map-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================================
    DONATE PAGE STYLES
================================= */

.impact-section {
    background: var(--text-light);
    text-align: center;
}

.impact-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-bottom: 50px;
}

.impact-card {
    background: var(--background-light);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px var(--shadow-light);
    border-top: 5px solid var(--accent-color);
    text-align: left;
}

.impact-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.payment-options {
    text-align: center;
}

.payment-grid {
    grid-template-columns: 1fr 1fr;
}

.payment-card {
    background: var(--text-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-light);
    text-align: left;
}

.payment-card.online {
    border: 1px solid var(--accent-color);
}

.payment-card.bank {
    border: 1px solid var(--primary-color);
}

.payment-card h3 {
    margin-bottom: 15px;
    font-size: 24px;
}

.payment-card p {
    margin-bottom: 15px;
}

.payment-card .placeholder-button {
    text-align: center;
    padding: 20px;
    background: var(--accent-color);
    color: var(--text-dark);
    font-weight: 700;
    border-radius: 5px;
    margin: 20px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.payment-card .placeholder-button:hover {
    background: #e68a00;
}

.payment-card .note {
    font-size: 14px;
    color: #777;
    margin-top: 10px;
}


/* ================================
    RESPONSIVE DESIGN
================================= */

@media (max-width: 1000px) {
    .main-header {
        flex-direction: column;
        gap: 15px;
    }

    .main-header nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 36px;
    }

    .mission-vision .container-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .action-buttons .large {
        width: 100%;
    }
}

/* RESPONSIVE UPDATES FOR ALL TWO-COL GRIDS */
@media (max-width: 768px) {
    .about-foundation .two-cols,
    .program-area.two-cols,
    .contact-grid-layout,
    .payment-grid { /* Added payment-grid here */
        /* Stack columns vertically on smaller screens */
        grid-template-columns: 1fr; 
    }

    .about-foundation .image-content,
    .program-area .image-content {
        order: -1; /* Puts the image above the text on mobile */
        margin-bottom: 30px;
    }

    /* Reset order for reversed section on mobile */
    .program-area.reversed .image-content {
        order: -1;
    }

    .program-area.reversed {
        grid-template-areas: none;
    }

    .core-values .values-grid,
    .roles-grid,
    .types-grid,
    .news-grid,
    .gallery-grid,
    .impact-grid { /* Added impact-grid here */
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        margin-bottom: 30px;
    }
}