/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

/*=============== VARIABLES CSS ===============*/
:root {
    --header-height: 4.5rem;

    /*========== Colors ==========*/
    /*Color mode HSL(hue, saturation, lightness)*/
    --primary-color: hsl(222, 75%, 50%); /* Royal Blue */
    --secondary-color: hsl(158, 100%, 27%); /* Emerald Green */
    --accent-color: hsl(39, 100%, 50%); /* Golden Orange */
    
    --title-color: hsl(222, 25%, 20%);
    --text-color: hsl(222, 10%, 45%);
    --text-color-light: hsl(222, 8%, 65%);
    --body-color: hsl(222, 100%, 99%);
    --container-color: #fff;
    --border-color: hsl(222, 25%, 90%);

    /*========== Typography ==========*/
    --body-font: 'Inter', sans-serif;
    --title-font: 'Poppins', sans-serif;

    --big-font-size: 3rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;

    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /*========== z-index ==========*/
    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;

    /*========== Transitions & Shadows ==========*/
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow: 0 4px 15px hsla(222, 25%, 20%, 0.05);
}

/*=============== DARK THEME VARIABLES ===============*/
body.dark-theme {
    --primary-color: hsl(222, 75%, 65%);
    --secondary-color: hsl(158, 60%, 55%);
    --accent-color: hsl(39, 100%, 60%);

    --title-color: hsl(222, 25%, 95%);
    --text-color: hsl(222, 10%, 75%);
    --body-color: hsl(222, 25%, 12%);
    --container-color: hsl(222, 25%, 16%);
    --border-color: hsl(222, 25%, 25%);
    --shadow: 0 4px 15px hsla(222, 25%, 4%, 0.2);
}

/*=============== BASE ===============*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body, button, input, textarea {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
}

body {
    background-color: var(--body-color);
    color: var(--text-color);
    transition: var(--transition);
}

h1, h2, h3, h4 {
    color: var(--title-color);
    font-family: var(--title-font);
    font-weight: var(--font-semibold);
}

ul { list-style: none; }
a { text-decoration: none; }
img { max-width: 100%; height: auto; }

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.section {
    padding: 6rem 0 2rem;
}

.section__title, .section__title--left {
    font-size: var(--h1-font-size);
    margin-bottom: 2rem;
    text-align: center;
}
.section__title--left { text-align: left; }

.section__subtitle {
    max-width: 700px;
    margin: 0 auto 3rem;
    text-align: center;
    font-size: var(--h3-font-size);
    color: var(--text-color-light);
}

/*=============== HEADER & NAV ===============*/
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: var(--body-color);
    transition: var(--transition);
}
.header.scrolled {
    box-shadow: var(--shadow);
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    font-family: var(--title-font);
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    color: var(--primary-color);
}

.nav__menu {
    display: flex;
    align-items: center;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav__link {
    color: var(--title-color);
    font-weight: var(--font-medium);
    transition: color .3s;
}

.nav__link:hover, .nav__link.active-link {
    color: var(--primary-color);
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav__toggle, .nav__close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--title-color);
    display: none;
}

/* Dark mode toggle */
.dark-mode-toggle {
    cursor: pointer;
    font-size: 1.25rem;
}
.dark-mode-toggle .fa-sun { display: none; }
.dark-theme .dark-mode-toggle .fa-sun { display: block; }
.dark-theme .dark-mode-toggle .fa-moon { display: none; }

/* Language Switcher */
.lang-switcher {
    position: relative;
}

.lang-switcher__button {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--text-color);
    font-weight: var(--font-medium);
}

.lang-switcher__button:hover {
    color: var(--primary-color);
}

.lang-switcher__dropdown {
    position: absolute;
    top: 150%;
    right: 0;
    background-color: var(--container-color);
    box-shadow: var(--shadow);
    border-radius: .5rem;
    padding: .5rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
/*=============== BUTTONS ===============*/
.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: .5rem;
    font-weight: var(--font-semibold);
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}
.button:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-3px);
}
.button--secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}
.button--outline {
    background-color: transparent;
    color: var(--primary-color);
}
.button--outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}
.button--white {
    background-color: #fff;
    color: var(--primary-color);
    border-color: #fff;
}
.button--white:hover {
    background-color: #fff;
    color: var(--accent-color);
}
.button--link {
    color: var(--primary-color);
    font-weight: var(--font-semibold);
    background: none;
    border: none;
    padding: 0;
}
.button--link:hover {
    color: var(--accent-color);
}
.button--nav {
    padding: .5rem 1rem;
}

/*=============== HERO SECTION ===============*/
.hero {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
    background-color: var(--container-color);
}
.hero__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    gap: 3rem;
}
.hero__title {
    font-size: var(--big-font-size);
    font-weight: var(--font-extrabold);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}
.hero__description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}
.hero__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.hero__img {
    width: 100%;
    max-width: 500px;
    justify-self: center;
}

/*=============== ABOUT SECTION ===============*/
.about { text-align: center; }

/*=============== MISSION & VISION / CARD ===============*/
.mission-vision .grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.card {
    background-color: var(--container-color);
    padding: 2.5rem;
    border-radius: .75rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px hsla(222, 25%, 20%, 0.1);
}
.card__icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.card__title {
    font-size: var(--h3-font-size);
    margin-bottom: .5rem;
}

/*=============== AREAS OF WORK ===============*/
.areas__container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.areas__card {
    background-color: var(--container-color);
    padding: 2rem;
    border-radius: .75rem;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
}
.areas__card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}
.areas__icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}
.areas__title {
    font-size: 1.15rem;
    margin-bottom: .5rem;
}

/*=============== IMPACT SECTION ===============*/
.impact {
    background-color: var(--primary-color);
    color: #fff;
}
.impact .section__title {
    color: #fff;
}
.impact__container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    text-align: center;
}
.impact__icon {
    font-size: 2.5rem;
    margin-bottom: .5rem;
}
.impact__number {
    font-size: 2.5rem;
    font-weight: var(--font-bold);
    font-family: var(--title-font);
}
.impact__text {
    font-size: var(--normal-font-size);
}

/*=============== PRESIDENT'S MESSAGE ===============*/
.president-message .grid {
    grid-template-columns: 300px 1fr;
    align-items: center;
    gap: 3rem;
}
.president-message__image img {
    border-radius: .75rem;
    box-shadow: var(--shadow);
}
.president-message__content blockquote {
    font-size: 1.25rem;
    font-style: italic;
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}
.president-message__content cite {
    font-style: normal;
}
.president-message__content cite strong {
    display: block;
    font-size: 1.1rem;
    color: var(--title-color);
}

/*=============== CALL TO ACTION (CTA) ===============*/
.cta {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    padding: 4rem 0;
    text-align: center;
    color: #fff;
}
.cta__container {
    max-width: 800px;
}
.cta__title {
    font-size: var(--h1-font-size);
    margin-bottom: 1rem;
}
.cta__description {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/*=============== FOOTER ===============*/
.footer {
    background-color: var(--container-color);
    padding-top: 4rem;
}
.footer__container {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.footer__title {
    font-size: var(--h3-font-size);
    margin-bottom: 1rem;
}
.footer__links {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.footer__link {
    color: var(--text-color);
    transition: color .3s;
}
.footer__link:hover {
    color: var(--primary-color);
}
.footer__bottom {
    margin-top: 4rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: var(--small-font-size);
}
.footer__copy { margin-bottom: .5rem; }

/*=============== PAGE-SPECIFIC STYLES ===============*/
/* Page Header */
.page-header {
    background-color: var(--container-color);
    padding: calc(var(--header-height) + 4rem) 0 4rem;
    text-align: center;
}
.page-header__title {
    font-size: var(--big-font-size);
}
.page-header__subtitle {
    font-size: 1.1rem;
    color: var(--text-color-light);
    max-width: 600px;
    margin: 1rem auto 0;
}

/* Contact Page */
.contact-page .grid {
    grid-template-columns: 1fr 1.5fr;
    align-items: flex-start;
}
.contact-page__details address {
    font-style: normal;
    line-height: 1.8;
    margin: 1rem 0;
}
.contact-page__details p {
    margin-bottom: .5rem;
}
.form__group {
    position: relative;
    margin-bottom: 2rem;
}
.form__input {
    width: 100%;
    padding: .75rem;
    border: 1px solid var(--border-color);
    border-radius: .5rem;
    background-color: var(--body-color);
    color: var(--text-color);
    outline: none;
}
.form__label {
    position: absolute;
    top: .75rem;
    left: .75rem;
    color: var(--text-color-light);
    transition: .3s;
    pointer-events: none;
}
.form__input:focus + .form__label,
.form__input:not(:placeholder-shown) + .form__label {
    top: -.75rem;
    left: .5rem;
    font-size: var(--small-font-size);
    background-color: var(--body-color);
    padding: 0 .25rem;
}
.map-placeholder iframe {
    border-radius: .75rem;
    box-shadow: var(--shadow);
}

/* Donate Page */
.donate-details .note {
    background-color: var(--body-color);
    padding: 1rem;
    border-radius: .5rem;
    border-left: 4px solid var(--accent-color);
    font-size: var(--small-font-size);
}

/*=============== UTILITIES ===============*/
/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--body-color);
    z-index: var(--z-modal) + 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity .5s, visibility .5s;
}
.loader::after {
    content: '';
    width: 60px;
    height: 60px;
    border: 5px solid var(--text-color-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.loader.hidden {
    opacity: 0;
    visibility: hidden;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scroll Progress */
.progress-container {
    width: 100%;
    height: 5px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed) + 1;
    background: transparent;
}
.progress-bar {
    height: 5px;
    background: var(--accent-color);
    width: 0%;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary-color);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: .5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-fixed);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    bottom: 3rem;
}
.back-to-top:hover {
    background-color: var(--accent-color);
}

/* Scroll Reveal */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}
[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Gallery Page & Lightbox */
.gallery__filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}
.gallery__filter-btn {
    background: none;
    border: 2px solid var(--border-color);
    padding: .5rem 1.5rem;
    border-radius: 2rem;
    cursor: pointer;
    color: var(--text-color);
    font-weight: var(--font-semibold);
    transition: var(--transition);
}
.gallery__filter-btn:hover, .gallery__filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.gallery__container {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.gallery__item {
    position: relative;
    overflow: hidden;
    border-radius: .75rem;
    cursor: pointer;
    box-shadow: var(--shadow);
}
.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.gallery__item:hover img {
    transform: scale(1.1);
}
.gallery__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, hsla(0, 0%, 0%, 0.7), transparent);
    color: #fff;
    padding: 2rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform .4s;
}
.gallery__item:hover .gallery__overlay {
    transform: translateY(0);
}
.gallery__item[data-category] {
    display: block;
}
.gallery__item.hidden {
    display: none;
}

/* Text Content Page (Privacy, Terms) */
.text-content-page {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}
.text-content-page h2 {
    font-size: var(--h2-font-size);
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.text-content-page ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

/* 404 Page */
.error-page {
    text-align: center;
    padding: 4rem 0;
}
.error-page__title {
    font-size: 8rem;
    font-weight: var(--font-extrabold);
    color: var(--primary-color);
    line-height: 1;
}
.error-page__subtitle {
    font-size: var(--h1-font-size);
    margin-bottom: 1rem;
}
.error-page__description {
    margin-bottom: 2rem;
}

/* News/Events Card */
.news-card {
    background-color: var(--container-color);
    border-radius: .75rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

/* FAQ / Accordion */
.faq__container {
    max-width: 800px;
    margin: 0 auto;
}
.faq__item {
    background-color: var(--container-color);
    border: 1px solid var(--border-color);
    border-radius: .5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}
.faq__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    cursor: pointer;
}
.faq__title {
    font-size: var(--h3-font-size);
    font-weight: var(--font-medium);
}
.faq__icon {
    font-size: 1.5rem;
    transition: transform .3s;
}
.faq__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease-out, padding .4s ease-out;
}
.faq__content p {
    padding: 0 1.25rem 1.25rem;
    line-height: 1.7;
}

/* Testimonials */
.testimonials {
    background-color: var(--body-color);
}
.testimonial-card {
    background-color: var(--container-color);
    padding: 2rem;
    border-radius: .75rem;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.testimonial-card__img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--primary-color);
}
.testimonial-card blockquote {
    font-style: italic;
    margin-bottom: 1rem;
    flex-grow: 1;
}
.testimonial-card cite {
    font-style: normal;
    font-weight: var(--font-semibold);
    color: var(--title-color);
    font-size: var(--small-font-size);
}

/* Meet the Team */
.team-section {
    background-color: var(--container-color);
}
.team-card {
    background-color: var(--body-color);
    border-radius: .75rem;
    box-shadow: var(--shadow);
    text-align: center;
    padding: 2rem;
    transition: var(--transition);
}
.team-card:hover {
    transform: translateY(-10px);
}
.team-card__img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 4px solid var(--container-color);
    box-shadow: 0 0 0 3px var(--primary-color);
}
.team-card__name {
    font-size: var(--h3-font-size);
    margin-bottom: .25rem;
}
.team-card__title {
    font-size: var(--small-font-size);
    color: var(--primary-color);
    font-weight: var(--font-semibold);
}

/* Partners Section */
.partners {
    padding: 4rem 0;
}
.partners__container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}
.partners__logo {
    max-height: 60px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: var(--transition);
}
.partners__logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Hero Slider */
.hero__image {
    position: relative;
    overflow: hidden;
    border-radius: .75rem;
    box-shadow: var(--shadow);
    min-height: 400px; /* Ensure container has height */
}

.hero__slider {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.hero__slide {
    min-width: 100%;
    box-sizing: border-box;
}

.hero__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
}

.hero__slider-btn {
    background-color: hsla(0, 0%, 100%, 0.5);
    border: none;
    color: var(--title-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color .3s;
}

.hero__slider-btn:hover {
    background-color: hsla(0, 0%, 100%, 0.8);
}

/* Blog Post Template */
.blog-post__header {
    text-align: center;
    margin-bottom: 2rem;
}
.blog-post__meta {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    margin-top: 1rem;
}
.blog-post__featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: .75rem;
    margin-bottom: 2rem;
}
.lang-switcher__dropdown.show {
    opacity: 1;
    visibility: visible;
    top: 120%;
}
/*=============== BREAKPOINTS ===============*/
/* For large devices */
@media screen and (max-width: 1200px) {
    .container { max-width: 960px; }
}

/* For medium devices */
@media screen and (max-width: 992px) {
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100%;
        background-color: var(--body-color);
        box-shadow: -4px 0 15px hsla(222, 25%, 20%, 0.1);
        padding: 6rem 2rem 0;
        transition: right .4s;
    }
    .nav__list {
        flex-direction: column;
        gap: 3rem;
    }
    .nav__toggle, .nav__close { display: block; }
    .nav__close {
        position: absolute;
        top: 1.2rem;
        right: 1.5rem;
    }
    .nav__menu.show-menu { right: 0; }

    .hero__container { grid-template-columns: 1fr; text-align: center; }
    .hero__image { order: -1; margin-bottom: 2rem; }
    .hero__buttons { justify-content: center; }

    .president-message .grid { grid-template-columns: 1fr; text-align: center; }
    .president-message__image { justify-self: center; }
    .president-message__content blockquote { margin: 1.5rem auto; }

    .contact-page .grid { grid-template-columns: 1fr; }
    .page-header__title { font-size: var(--h1-font-size); }
}

/* For small devices */
@media screen and (max-width: 767px) {
    :root {
        --big-font-size: 2.5rem;
        --h1-font-size: 1.75rem;
        --h2-font-size: 1.25rem;
        --h3-font-size: 1.1rem;
    }
    .section { padding: 4rem 0 1rem; }
    .footer__bottom { text-align: center; }
    .footer__dev { margin-top: 0.5rem; }
}

@media screen and (max-width: 576px) {
    .nav__menu { width: 100%; }
    .cta__title { font-size: 1.75rem; }
}

/*=============== PRINT STYLES ===============*/
@media print {
    body {
        background-color: #fff;
        color: #000;
    }
    .nav, .footer, .back-to-top, .cta, .hero__image {
        display: none;
    }
    .section, .section__title {
        color: #000;
    }
    .card, .areas__card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}