/* =========================================
   VARIABLES
========================================= */
:root {
    --sand-beige: #dcc7a1;
    --rock-brown: #8a6a4f;
    --oasis-green: #6e8b3d;
    --soft-cream: #f5efe3;
    --golden-sun: #e8b04c;
    --terracotta-red: #b45f3d;
    --text-dark: #1a1a1a;
    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 14px 30px rgba(0,0,0,0.1);
    --space: 1rem;
    --space-lg: 2rem;
}

/* =========================================
   RESET + BASE
========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", sans-serif;
    background: #fdfbf7;
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 2rem;
}

/* =========================================
   HEADER
========================================= */
.site-header {
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(220,199,161,0.97);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(138,106,79,0.3);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-family: "Cairo", sans-serif;
    font-weight: 700;
    color: var(--rock-brown);
}

.main-nav {
    display: flex;
    gap: 1rem;
}

.nav-link {
    text-decoration: none;
    padding: .4rem .8rem;
    border-radius: 999px;
    color: var(--rock-brown);
    transition: .25s;
}

    .nav-link:hover {
        background: var(--oasis-green);
        color: #fff;
    }

    .nav-link.active {
        background: var(--terracotta-red);
        color: #fff;
    }

/* =========================================
   HERO
========================================= */
.hero,
.hero {
    width: 100%;
    padding: 5rem 2rem;
    background: linear-gradient( to right, rgba(26, 26, 26, 0.55), rgba(26, 26, 26, 0.1) ), url("images/alula-hero.jpg") center/cover no-repeat;
    color: #fff;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}
.about-hero {
    width: 100%;
    height: 55vh;
    background: url('images/alula-hero.jpg') center/cover no-repeat;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

    .about-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.45);
    }

.about-hero-content {
    position: relative;
    z-index: 2;
    padding: 1rem;
}

    .about-hero-content h1,
    .about-hero-content p {
        color: #fff !important;
        text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    }

    .about-hero-content h1 {
        font-size: 2.8rem;
        font-family: "Cairo", sans-serif;
    }

/* =========================================
   SECTIONS
========================================= */
.section {
    background: #fff;
    padding: 3rem 2rem;
    margin: 0 auto 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    max-width: 1000px;
    text-align: center;
}

    .section h2 {
        font-family: "Cairo", sans-serif;
        font-size: 2rem;
        color: var(--rock-brown);
        margin-bottom: 1rem;
    }

    .section p {
        max-width: 700px;
        margin: .5rem auto;
        font-size: 1.05rem;
    }

/* =========================================
   BUTTONS
========================================= */
.btn {
    display: inline-block;
    padding: .9rem 1.8rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: .25s;
}

.btn-primary {
    background: var(--oasis-green);
    color: #fff;
    box-shadow: var(--shadow-md);
}

    .btn-primary:hover {
        background: #566f30;
        transform: translateY(-2px);
    }

/* =========================================
   SIMPLE CARDS (ABOUT, ECO, CONTACT)
========================================= */
.about-card,
.eco-box,
.contact-form {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid rgba(220,199,161,0.7);
    box-shadow: var(--shadow-sm);
    transition: .25s;
}

    .about-card:hover,
    .eco-box:hover,
    .contact-form:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }

/* =========================================
   SPECIES CARDS (UPGRADED)
========================================= */
.section-cards .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.species-card {
    background: #fffdf8;
    border-radius: var(--radius);
    padding: 1.2rem;
    border: 1px solid #f0e8d8;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: .25s;
    cursor: pointer;
}

    .species-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-md);
    }

.species-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: .8rem;
    transition: .3s;
}

.species-card:hover .species-img {
    transform: scale(1.03);
}

.tag {
    display: inline-block;
    padding: .35rem .75rem;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 600;
    color: #fff;
}

.mammal-tag {
    background: #b56539;
}

.bird-tag {
    background: #4a7bbf;
}

.reptile-tag {
    background: #3c8d5a;
}

.invertebrate-tag {
    background: #a84e8a;
}

/* =========================================
   FILTER BUTTONS
========================================= */
.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .7rem;
    margin-top: 1.5rem;
}

.filter-btn {
    padding: .6rem 1.4rem;
    border-radius: 999px;
    border: none;
    background: var(--sand-beige);
    color: var(--rock-brown);
    font-weight: 600;
    cursor: pointer;
    transition: .25s;
    font-size: .95rem;
    box-shadow: var(--shadow-sm);
}

    .filter-btn:hover {
        background: var(--terracotta-red);
        color: #fff;
    }

    .filter-btn.active {
        background: var(--oasis-green);
        color: #fff;
    }

/* =========================================
   MODAL
========================================= */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    padding-top: 60px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    overflow-y: auto;
    z-index: 9999;
}

.modal-content {
    background: #fffdf8;
    margin: auto;
    padding: 2rem;
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-md);
    animation: modalFade .35s ease;
    text-align: center;
}

.modal-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 1.2rem;
}

.modal-close {
    float: right;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    color: #6b5b4a;
    transition: .2s;
}

    .modal-close:hover {
        color: #000;
    }

#modal-name {
    font-size: 1.8rem;
    margin-bottom: .8rem;
    color: #4a3f2d;
}

.modal-content p strong {
    color: #6b5b4a;
}

#modal-facts {
    background: #f8f3e7;
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-top: .8rem;
    border-left: 4px solid #d2b48c;
    text-align: center;
}

/* =========================================
   CONTACT FORM
========================================= */
.form-group {
    margin-bottom: 1.2rem;
}

    .form-group label {
        display: block;
        font-weight: 600;
        margin-bottom: .4rem;
        color: #4a3f2d;
    }

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: .9rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid #ddd;
    background: #fafafa;
    font-size: 1rem;
}

    .contact-form input:focus,
    .contact-form textarea:focus {
        outline: none;
        border-color: #c9a97c;
        background: #fff;
    }

/* =========================================
   ANIMATIONS
========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: .8s;
}

    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }

@keyframes modalFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 600px) {
    .modal-content {
        padding: 1.4rem;
    }

    .modal-img {
        height: 200px;
    }
}
.site-footer {
    margin-top: 3rem;
    padding: 2rem 1rem;
    background-color: var(--rock-brown);
    color: var(--soft-cream);
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.4;
    border-top: 1px solid rgba(255,255,255,0.15);
}
.hero,
.about-hero,
.species-hero,
.conservation-hero {
    margin-bottom: 3rem;
}
#darkToggle {
    position: fixed;
    bottom: 25px;
    left: 25px;
    padding: 0.6rem 0.9rem;
    border-radius: 50%;
    background: var(--rock-brown);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
}

body.dark {
    background: #1a1a1a;
    color: #eee;
}

    body.dark .section,
    body.dark .species-card,
    body.dark .about-card,
    body.dark .eco-box,
    body.dark .contact-form {
        background: #2a2a2a;
        color: #eee;
        border-color: #444;
    }
    /* Dark mode for modal */
    body.dark .modal-content {
        background: #2a2a2a;
        color: #eee;
        border-color: #444;
    }

    body.dark .modal-img {
        opacity: 0.9;
    }

    body.dark #modal-name {
        color: #fff;
    }

    body.dark #modal-facts {
        background: #333;
        border-left-color: #666;
        color: #ddd;
    }

    body.dark .modal-close {
        color: #ccc;
    }
/* Base search bar (light mode) */
#speciesSearch {
    width: 100%;
    max-width: 420px;
    padding: 1rem 1.4rem;
    border-radius: 20px;
    font-size: 1rem;
    outline: none;
    transition: 0.25s ease;
    border: 2px solid #d8c7a1;
    background: #fffdf8;
    color: #4a3f2d;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

    #speciesSearch::placeholder {
        color: #8b7a5c;
    }

/* Dark mode override */
body.dark #speciesSearch {
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
    color: #fff;
    box-shadow: none;
}

    body.dark #speciesSearch::placeholder {
        color: rgba(255,255,255,0.7);
    }
