/* --- GLOBAL STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
        "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    scroll-behavior: smooth;
}

/* --- HEADER STYLES (Includes desktop default and mobile overrides) --- */
header {
    padding: 0 1rem; /* Base for mobile */
    height: auto;
    min-height: 80px;
    display: flex;
    flex-wrap: wrap; /* Allows stacking on small screens */
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 1px solid #e0e0e0a5;
}

.header-hero {
    width: auto;
    max-width: 100%;
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
}

.header-hero img {
    width: 50px;
    height: 50px;
    display: block;
    margin-right: 1rem;
}

.header-hero-text {
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.header-hero-text h1 {
    font-size: 18px;
    color: hsl(220, 43%, 11%);
    font-weight: 500;
}

.header-hero-text p {
    font-size: 12px;
    color: hsl(216, 15%, 34%);
}

nav {
    width: 100%; /* Full width on mobile */
    order: 2;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
}

nav a {
    text-decoration: none;
    outline: none;
    color: #030213;
    padding-block: calc(0.25rem * 2);
    padding-inline: 0.5rem;
    border-radius: calc(0.625rem - 2px);
    transition: 0.2s;
    text-align: center;
    flex-grow: 1;
}

nav i {
    margin-left: 0.5rem;
}

.nav-hover:hover {
    background: #e0e0e0a5;
}

.nav-button-black {
    color: white;
    background: #030213;
}

.nav-button-black:hover {
    background: #030213e0;
}

.nav-button-green {
    color: white;
    background: rgb(0, 166, 62);
    margin-left: 0; /* Override desktop margin on mobile */
}

.nav-button-green:hover {
    background: rgb(1, 128, 47);
}

@media (min-width: 768px) {
    header {
        padding: 0 1.5rem;
        height: 80px;
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    .header-hero {
        padding: 0;
        width: auto;
    }
    nav {
        width: auto;
        order: initial;
        justify-content: flex-start;
        gap: 1rem;
        padding-bottom: 0;
    }
    nav a {
        flex-grow: 0;
        padding-inline: calc(0.25rem * 4);
    }
    .nav-button-green {
        margin-left: 1rem; /* Restore desktop margin */
    }
}

/* --- MAIN HERO SECTION (Original desktop styles) --- */
main {
    background: rgb(240, 253, 244);
    background: linear-gradient(
        225deg,
        rgba(240, 253, 244, 1) 0%,
        rgba(239, 246, 255, 1) 100%
    );
    height: calc(100vh - 80px); /* Desktop fixed height */
    padding: 2.25rem 3rem;
    display: flex;
    justify-content: space-evenly;
}

.main-text-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 500px;
    justify-content: center;
    height: 100%;
}

.main-text-container span {
    color: rgb(2, 102, 48);
    font-size: 0.75rem;
    font-weight: 500;
    background: rgb(220, 252, 231);
    border-radius: calc(0.625rem - 2px);
    padding-block: calc(0.25rem * 0.5);
    padding-inline: calc(0.25rem * 2);
    width: fit-content;
}

.main-text-container h1 {
    color: #101828;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: calc(0.25rem * 6);
}

.main-text-container p {
    color: #4a5565;
    font-size: 1.25rem;
    line-height: calc(1.75 / 1.25);
}

.main-image-container {
    max-width: 28rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.main-image-container img {
    width: 100%;
    display: block;
    border-radius: 0.625rem;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

/* --- IMPACT SECTION (Original desktop styles) --- */
.impact-section {
    text-align: center;
    padding: 4rem 2rem;
}

.impact-list {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.impact-item {
    width: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.impact-section p {
    margin-top: 0.5rem;
}

.impact-section .icon {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.icon-green {
    background: rgb(220, 252, 231);
    color: rgb(2, 102, 48);
}

.icon-blue {
    background: rgb(219, 234, 254);
    color: rgb(37, 99, 235);
}

.icon-purple {
    background: rgb(237, 233, 254);
    color: rgb(124, 58, 237);
}

.icon-orange {
    background: rgb(255, 243, 205);
    color: rgb(245, 73, 0);
}

.impact-section i {
    font-size: 2rem;
    padding: 1.2rem;
}

.section-header {
    color: #101828;
    font-size: 1.875rem;
}

.section-subheader {
    font-size: 1.25rem;
    margin-top: 0.5rem;
}

.impact-section p {
    color: #4a5565;
    margin-top: 0.5rem;
}

.impact-text p {
    font-size: 16px;
}

hr {
    max-width: 80%;
    margin: 0 auto;
    border: 0;
    height: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- WORK SECTION (Original desktop styles - UNCHANGED) --- */
.work-section {
    padding: 4rem 2rem;
    text-align: center;
    background: #f9fafb;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background-color: #ffffff;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    border: 1px solid #e0e0e0cc;
    transition: 0.2s;
    cursor: pointer;
}

.card:hover {
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

.card-title {
    font-size: 1.25em;
    font-weight: bold;
    color: #101828;
    margin-top: 0;
    margin-bottom: 1.2rem;
}

.card-description {
    margin-top: 1rem;
    font-size: 1em;
    color: #4a5565;
    margin-bottom: 15px;
}

.card-button, .work-section-button {
    display: inline-block;
    padding: 6px 12px;
    background-color: white;
    color: #101828;
    text-decoration: none;
    border: 1px solid #e0e0e0cc;
    border-radius: 7px;
    transition: 0.2s;
    width: fit-content;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.work-section-button {
    margin-top: 2rem;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
}

.card-button:hover, .work-section-button:hover {
    background-color: #e0e0e0a5;
}

.full-width-card {
    grid-column: 1 / -1;
}

/* --- ABOUT SECTION (Original desktop styles) --- */
.about-section {
    padding: 4rem 2rem;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    gap: 3rem;
}

.about-section img {
    width: 140px;
    height: 140px;
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    margin-bottom: 1.5rem;
}

.about-section-text h1 {
    font-size: 1.875rem;
    line-height: 2.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

.about-section-text p {
    font-size: 1.125rem;
    line-height: 1.75rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
    max-width: 600px;
    text-align: justify;
}

.about-section-text a {
    text-align: left;
    text-decoration: none;
    outline: none;
    color: white;
    background: #030213;
    padding-block: calc(0.25rem * 2);
    padding-inline: calc(0.25rem * 4);
    border-radius: calc(0.625rem - 2px);
    transition: 0.2s;
}

.about-section-text a:hover {
    background: #030213e0;
}

/* --- DONATE SECTION (Original desktop styles) --- */
.donate-section {
    background: oklch(.627 .194 149.214);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    padding: 4rem;
}

.donate-section h1 {
    color: white;
    font-size: 1.875rem;
    font-weight: 700;
}

.donate-section p {
    color: rgb(220, 252, 231);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: calc(1.75 / 1.25);
}

.donate-section-buttons {
    display: flex;
    gap: 1rem;
}

.donate-section a {
    text-decoration: none;
    outline: none;
    background: white;
    color: #030213;
    padding-block: calc(0.25rem * 2);
    padding-inline: calc(0.25rem * 4);
    border-radius: calc(0.625rem - 2px);
    transition: 0.2s;
    border: 1px solid #e0e0e0cc;
}

.donate-section a:hover {
    background-color: #efefef;
}


/* --- MOBILE RESPONSIVE OVERRIDES (max-width: 767px) --- */
@media (max-width: 767px) {
    /* --- MAIN HERO SECTION OVERRIDES --- */
    main {
        height: calc(100vh - 120px);
        /* height: auto; */
        min-height: auto; /* Remove min-height constraint */
        padding: 2rem 1.5rem;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .main-text-container {
        text-align: center;
        margin-bottom: 2rem;
        height: auto;
    }

    .main-text-container span {
        margin: 0 auto;
    }
    
    .main-text-container h1 {
        font-size: 2.25rem;
        line-height: 1.2;
        margin-bottom: calc(0.25rem * 4);
    }
    
    .main-text-container p {
        font-size: 1rem;
        text-align: justify;
    }

    .main-image-container {
        max-width: 100%;
        height: auto;
    }

    /* --- IMPACT SECTION OVERRIDES --- */
    .impact-section {
        padding: 3rem 1rem;
    }

    .section-header {
        font-size: 1.5rem;
    }

    .section-subheader {
        font-size: 1rem;
    }
    
    .impact-list {
        margin-top: 2rem;
        gap: 1.5rem;
    }
    
    .impact-item {
        width: 45%;
        min-width: 120px;
    }

    .impact-section i {
        font-size: 1.5rem;
        padding: 1rem;
    }
    
    .impact-text p {
        font-size: 14px;
    }

    /* --- ABOUT SECTION OVERRIDES --- */
    .about-section {
        padding: 3rem 1.5rem;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        text-align: center;
    }

    .about-section img {
        width: 120px;
        height: 120px;
        margin-bottom: 1rem;
    }

    .about-section-text h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .about-section-text p {
        font-size: 1rem;
        margin-bottom: 1rem;
        /* text-align: center; */
    }
    
    .about-section-text a {
        align-self: center;
    }

    /* --- DONATE SECTION OVERRIDES --- */
    .donate-section {
        padding: 3rem 1.5rem;
        gap: 1rem;
    }
    
    .donate-section h1 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .donate-section p {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        text-align: center;
    }
}