/* --- CSS VARIABLES & RESET --- */
:root {
    --primary-color: #2D6A4F; /* Forest Green */
    --secondary-color: #D8F3DC; /* Light Mint */
    --accent-color: #E07A5F; /* Terra Cotta */
    --text-color: #333;
    --bg-color: #F8F9FA;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
}

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

ul {
    list-style: none;
}

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

/* --- HEADER & NAV --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent-color);
}

.btn-donate {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-donate:hover {
    background-color: #c0553a;
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1523381210434-271e8be1f52b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btn {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.hero-btn:hover {
    background-color: #1b4332;
}

/* --- ABOUT --- */
.section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.feature-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* --- FILTER BUTTONS (NEW) --- */
.gallery-filter {
    text-align: center;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 8px 20px;
    margin: 0 5px;
    border: 2px solid var(--primary-color);
    background: none;
    color: var(--primary-color);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* --- GALLERY --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.item-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    position: relative;
    cursor: pointer; /* Pointer to indicate clickable */
}

/* Animation for filtering */
.item-card.hide {
    display: none;
}
.item-card.show {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.item-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.item-card:hover img {
    transform: scale(1.05);
}

.item-info {
    padding: 1rem;
}

.tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    z-index: 2;
}

/* --- DONATE FORM --- */
.donate-section {
    background-color: var(--secondary-color);
    border-radius: 20px;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: var(--transition);
}

.submit-btn:hover {
    background-color: #1b4332;
}

/* --- FOOTER --- */
footer {
    background-color: #1b262c;
    color: #ddd;
    padding: 3rem 5%;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.social-icons a {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: #ddd;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--accent-color);
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #444;
}

/* --- BACK TO TOP BUTTON (NEW) --- */
#backToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--accent-color);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: var(--transition);
}

#backToTop:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

/* --- LIGHTBOX / MODAL (NEW) --- */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 5px;
    animation: zoom 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .navbar .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 0;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    .navbar .nav-links.active {
        display: flex;
    }
    .menu-toggle {
        display: block;
        color: var(--primary-color);
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .lightbox-content {
        width: 100%;
    }
}