/*
====================================================================
GLOBAL STYLES & RESETS
====================================================================
*/
/* Using a more standard CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
    scroll-padding-top: 80px; /* Space for fixed header */
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif; /* Using Inter font */
    color: var(--text-color-dark); /* Using variable for main text */
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
    background-color: var(--background-light); /* Light background for sections */
    -webkit-font-smoothing: antialiased; /* Better font rendering */
    -moz-osx-font-smoothing: grayscale;
}

/* CSS Variables for easier theme management */
:root {
    /* Colors */
    --primary-blue: #007bff;        /* Main brand blue */
    --primary-blue-dark: #0056b3;   /* Darker blue for hover/accents */
    --accent-green: #28a745;        /* Secondary accent color */
    --accent-yellow: #ffc107;       /* Tertiary accent for icons etc. */
    --text-color-dark: #333;        /* Main body text color */
    --text-color-medium: #555;      /* Secondary text, descriptions */
    --text-color-light: #fff;       /* White text */
    --background-light: #f8f8f8;    /* General light background */
    --background-white: #fff;       /* White background for cards/header */
    --background-dark: #222;        /* Dark sections */
    --background-darker: #1a1a1a;   /* Footer background */
    --border-light: #eee;           /* Light border color */
    --shadow-light: rgba(0, 0, 0, 0.08); /* Subtle shadow */
    --shadow-medium: rgba(0, 0, 0, 0.12); /* Slightly stronger shadow */
    --shadow-strong: rgba(0, 123, 255, 0.2); /* Button specific shadow */

    /* Spacing */
    --padding-sm: 15px;
    --padding-md: 20px;
    --padding-lg: 30px;
    --padding-xl: 40px;
    --section-padding: 80px;
    --section-padding-mobile: 40px;

    /* Font Sizes */
    --font-size-base: 1em;
    --font-size-h1: 3.8em;
    --font-size-h2: 2.8em;
    --font-size-h3: 1.6em;
    --font-size-button: 1.05em;
    --font-size-nav: 1.0em;
    --font-size-description: 1.15em;
    --font-size-card-text: 0.95em;

    /* Border Radius */
    --border-radius-sm: 5px;
    --border-radius-md: 8px;
    --border-radius-lg: 10px;

    /* Transitions */
    --transition-speed: 0.3s;
    --transition-ease: ease-out;
}

/* Container for consistent content width */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--padding-md);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.5em;
    line-height: 1.2;
    color: #222; /* Darker grey for headings */
}

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

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

p {
    margin-bottom: 1em;
}

/* Utility classes */
.section-padded {
    padding: var(--section-padding) 0;
    text-align: center;
}

.section-description {
    font-size: var(--font-size-description);
    max-width: 800px;
    margin: 0 auto 50px auto;
    color: var(--text-color-medium);
    line-height: 1.5;
}

.mt-40 {
    margin-top: 40px;
}

/*
====================================================================
HEADER SECTION STYLES
====================================================================
*/
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--background-white); /* White header */
    padding: var(--padding-sm) 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header .logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-blue); /* Primary blue for logo */
    letter-spacing: -0.5px;
}

.main-nav ul {
    display: flex;
    gap: 25px;
}

.main-nav a {
    color: var(--text-color-medium);
    font-size: var(--font-size-nav);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: color var(--transition-speed) var(--transition-ease);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-blue); /* Primary blue underline */
    transform: scaleX(0);
    transform-origin: bottom center;
    transition: transform var(--transition-speed) var(--transition-ease);
}

.main-nav a:hover,
.main-nav a:focus {
    color: var(--primary-blue);
    outline: none; /* Remove default focus outline */
}

.main-nav a:hover::after,
.main-nav a:focus::after {
    transform: scaleX(1);
}

/* Hamburger menu toggle for mobile */
.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 101; /* Above nav for clickability */
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color-dark);
    position: relative;
    transition: background-color var(--transition-speed) var(--transition-ease);
}

.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color-dark);
    position: absolute;
    transition: transform var(--transition-speed) var(--transition-ease), top var(--transition-speed) var(--transition-ease);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.menu-toggle.active .hamburger {
    background-color: transparent; /* Hide middle bar */
}

.menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}


/*
====================================================================
BUTTON STYLES
====================================================================
*/
.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: var(--border-radius-lg); /* Larger radius for softer look */
    font-size: var(--font-size-button);
    font-weight: 600;
    transition: all var(--transition-speed) var(--transition-ease);
    cursor: pointer;
    text-align: center;
    border: none;
    line-height: 1; /* Ensure text sits well */
}

.btn-primary {
    background-color: var(--primary-blue); /* Primary brand blue */
    color: var(--text-color-light);
    box-shadow: 0 4px 12px var(--shadow-strong);
}

.btn-primary:hover {
    background-color: var(--primary-blue-dark); /* Darker blue on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.btn-secondary {
    background-color: #6c757d; /* Neutral grey */
    color: var(--text-color-light);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
}

.btn-secondary:hover {
    background-color: #5a6268; /* Darker grey on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.3);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.1);
}

.btn-small { /* For buttons inside venture cards */
    padding: 10px 20px;
    font-size: 0.9em;
    border-radius: var(--border-radius-md); /* Slightly smaller radius */
}

/* Focus state for accessibility */
.btn:focus {
    outline: 3px solid rgba(0, 123, 255, 0.5); /* Blue outline for focus */
    outline-offset: 2px;
}


/*
====================================================================
HERO SECTION STYLES
====================================================================
*/
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%); /* Blue gradient background */
    color: var(--text-color-light);
    padding: 150px 0 120px 0; /* More padding for visual impact */
    min-height: 70vh; /* Ensure it takes up a good portion of the viewport */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative; /* For potential future background elements */
    overflow: hidden; /* Ensures no overflow from elements that might extend */
}

.hero-section h1 {
    font-size: var(--font-size-h1);
    margin-bottom: var(--padding-md);
    line-height: 1.1;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color-light); /* White heading */
    text-shadow: 0 2px 4px rgba(0,0,0,0.2); /* Subtle text shadow for depth */
}

.hero-section .tagline {
    font-size: 1.4em;
    margin-bottom: var(--padding-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300; /* Lighter font weight for tagline */
    opacity: 0.9;
}

/*
====================================================================
MAIN CONTENT SECTIONS STYLES
====================================================================
*/
/* About Us & Other White Sections */
.about-section,
.ventures-section,
.contact-section { /* Apply to main sections that aren't specifically light/dark */
    background-color: var(--background-white);
}

/* Vision & Mission (bg-light) and Donate sections */
.bg-light {
    background-color: var(--background-light);
}

/* Specific Section Heading Overrides */
.contact-section h2 {
    color: var(--text-color-light);
}


/*
====================================================================
VISION & MISSION SECTION STYLES
====================================================================
*/
.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--padding-lg);
    text-align: left;
    margin-top: var(--padding-xl); /* Add spacing from section description */
}

.two-column-grid div {
    padding: var(--padding-lg);
    background-color: var(--background-white); /* Cards within a light section */
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); /* Refined shadow */
    transition: transform var(--transition-speed) var(--transition-ease), box-shadow var(--transition-speed) var(--transition-ease);
}
.two-column-grid div:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.two-column-grid h3 {
    color: var(--primary-blue); /* Give headings in these cards a brand color */
    margin-bottom: var(--padding-sm);
}
.two-column-grid p {
    color: var(--text-color-dark);
    font-size: 1em;
}


/*
====================================================================
INITIATIVES & IMPACT SECTIONS (Venture/Feature Cards)
====================================================================
*/
.ventures-section h2,
.impact-section h2 { /* Corrected class for impact section */
    font-size: var(--font-size-h2);
    margin-bottom: var(--padding-md);
}

.venture-cards-grid,
.feature-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: var(--padding-lg);
    margin-top: 50px; /* Consistent spacing from section description */
}

.venture-card,
.feature-item {
    background-color: var(--background-white);
    padding: var(--padding-lg);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 5px 20px var(--shadow-light);
    text-align: left; /* Default text align */
    transition: transform var(--transition-speed) var(--transition-ease), box-shadow var(--transition-speed) var(--transition-ease);
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align text left */
}

.venture-card:hover,
.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

.venture-card img {
    width: 100%;
    height: 200px; /* Consistent image height */
    object-fit: cover;
    border-radius: var(--border-radius-md);
    margin-bottom: var(--padding-md);
    border: 1px solid var(--border-light); /* Subtle border for images */
}

.venture-card h3,
.feature-item h3 {
    font-size: var(--font-size-h3);
    margin-bottom: 10px;
    color: var(--primary-blue-dark); /* Darker blue for card headings */
}

.venture-card p,
.feature-item p {
    font-size: var(--font-size-card-text);
    color: var(--text-color-medium);
    flex-grow: 1; /* Allows paragraph to take available space */
}

.venture-card .btn {
    align-self: center; /* Center the button within the card */
    margin-top: var(--padding-md); /* Space above the button */
}

.feature-item {
    text-align: center; /* Center content within feature item */
    align-items: center; /* Center icon/text horizontally */
}

.feature-item .icon-circle {
    font-size: 3.5em;
    color: var(--primary-blue); /* Icon color */
    background-color: var(--background-light); /* Light background for icon circle */
    border-radius: 50%;
    width: 90px; /* Larger circle */
    height: 90px; /* Larger circle */
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto var(--padding-sm) auto; /* Center icon and space below */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--primary-blue); /* Outline the circle for prominence */
}


/*
====================================================================
ABOUT US SECTION STYLES
====================================================================
*/
.about-section h2 {
    font-size: var(--font-size-h2);
    margin-bottom: var(--padding-md);
}

.about-section p {
    font-size: 1.1em;
    max-width: 900px;
    margin: 0 auto 1.5em auto;
    color: var(--text-color-medium);
    line-height: 1.7;
}


/*
====================================================================
CONTACT SECTION STYLES
====================================================================
*/
.contact-section {
    background-color: var(--background-dark); /* Dark background for contact */
    color: var(--text-color-light);
}

.contact-section h2 {
    color: var(--text-color-light);
}

.contact-info {
    margin-top: var(--padding-xl);
    font-size: 1.1em;
}

.contact-info p {
    margin-bottom: var(--padding-sm);
    color: var(--text-color-light); /* Ensure text is visible on dark background */
}

.contact-info a {
    color: var(--primary-blue); /* Highlight contact links */
    font-weight: 600;
    transition: color var(--transition-speed) var(--transition-ease);
}

.contact-info a:hover {
    color: #4da6ff; /* Lighter blue on hover */
}


/*
====================================================================
FOOTER STYLES
====================================================================
*/
.main-footer {
    background-color: var(--background-darker); /* Even darker footer */
    color: #bbb;
    padding: var(--padding-lg) 0;
    text-align: center;
    font-size: 0.9em;
    border-top: 1px solid #333;
}

/*
====================================================================
RESPONSIVE DESIGN (Media Queries)
====================================================================
*/

/* Tablet and smaller desktops */
@media (max-width: 992px) {
    .main-header .logo {
        font-size: 1.6em;
    }
    .main-nav ul {
        gap: 15px;
    }
    .main-nav a {
        font-size: 0.95em;
    }

    .hero-section h1 {
        font-size: 3em;
    }
    .hero-section .tagline {
        font-size: 1.2em;
    }

    .section-padded {
        padding: 60px 0;
    }

    h2 {
        font-size: 2.2em;
    }
    .section-description {
        font-size: 1em;
        margin-bottom: 40px;
    }

    .venture-cards-grid,
    .feature-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }

    .venture-card,
    .feature-item,
    .two-column-grid div { /* Apply padding adjustment to two-column grid items as well */
        padding: 25px;
    }
    .feature-item .icon-circle { /* Adjust icon circle size on smaller screens */
        width: 80px;
        height: 80px;
        font-size: 3em;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .main-header .container {
        flex-wrap: wrap; /* Allow logo and toggle to wrap */
        justify-content: space-between;
    }

    .main-nav {
        display: none; /* Hidden by default on mobile */
        flex-direction: column;
        width: 100%;
        background-color: var(--background-white);
        position: absolute;
        top: 70px; /* Below header */
        left: 0;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        padding: var(--padding-md) 0;
        transform: translateY(-100%); /* Slide up animation */
        transition: transform var(--transition-speed) var(--transition-ease);
    }

    .main-nav.active {
        display: flex; /* Show nav when active */
        transform: translateY(0); /* Slide down */
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .main-nav ul li {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    .main-nav a {
        padding: 12px 20px;
        display: block;
        width: 100%;
        color: var(--text-color-dark);
        font-size: 1.1em;
        border-bottom: 1px solid var(--border-light); /* Separator for mobile links */
    }
    .main-nav a:last-child {
        border-bottom: none;
    }
    .main-nav a::after {
        display: none; /* No underline effect on mobile */
    }

    .menu-toggle {
        display: block; /* Show hamburger on mobile */
    }

    .hero-section {
        padding: 120px 0 80px 0;
        min-height: 60vh;
    }
    .hero-section h1 {
        font-size: 2.2em;
    }
    .hero-section .tagline {
        font-size: 1em;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.95em;
    }

    .section-padded {
        padding: var(--section-padding-mobile) 0;
    }

    h2 {
        font-size: 1.8em;
    }
    .section-description {
        font-size: 0.95em;
        margin-bottom: 30px;
    }

    .venture-cards-grid,
    .feature-cards-grid,
    .two-column-grid { /* Ensure two-column grid stacks too */
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }

    .venture-card,
    .feature-item,
    .two-column-grid div {
        padding: 20px;
    }
    .venture-card h3,
    .feature-item h3 {
        font-size: 1.2em;
    }
    .venture-card p,
    .feature-item p {
        font-size: 0.85em;
    }

    .about-section p,
    .contact-info p {
        font-size: 1em;
    }

    .contact-info {
        margin-top: 30px;
    }
    .feature-item .icon-circle { /* Adjust icon circle size on smaller mobile screens */
        width: 70px;
        height: 70px;
        font-size: 2.5em;
    }
}

@media (max-width: 480px) {
    .main-header .logo {
        font-size: 1.4em;
    }
    .hero-section h1 {
        font-size: 1.8em;
    }
    .hero-section .tagline {
        font-size: 0.9em;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    h2 {
        font-size: 1.6em;
    }
    .section-description {
        font-size: 0.9em;
    }
}