/* =========================
   Global Reset & Base
========================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    color: #333;
}

/* =========================
   Site Background
========================= */
.site-bg {
    min-height: 100vh;
    background:
        linear-gradient(
            rgba(255, 255, 255, 0.9),
            rgba(255, 255, 255, 0.9)
        ),
        url("/images/pets-bg.jpg") no-repeat center center fixed;
    background-size: cover;
}

/* =========================
   Layout Containers
========================= */
.container {
    max-width: 1100px;
    margin: auto;
    padding: 20px;
}

/* =========================
   Header & Navigation
========================= */

.site-header {
    background: #2e7d32; /* keep original green */
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
}

/* Navigation */
.nav {
    display: flex;
    gap: 22px;
}

.nav a {
    color: #ffffff; /* white text on green */
    font-weight: 500;
    text-decoration: none;
    padding: 6px 4px;
    transition: all 0.3s ease;
}

.nav a:hover {
    color: #c8e6c9; /* soft hover color */
    border-bottom: 2px solid #c8e6c9;
}

/* =========================
   Hamburger Button
========================= */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: #ffffff;
    margin: 5px 0;
    border-radius: 2px;
}

/* =========================
   Mobile Navigation
========================= */
@media (max-width: 768px) {

    .hamburger {
        display: block;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #2e7d32; /* keep header green in mobile */
        flex-direction: column;
        align-items: center;
        display: none;
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
        transition: all 0.3s ease;
    }

    .nav a {
        width: 100%;
        text-align: center;
        padding: 14px 0;
        border-top: 1px solid rgba(255,255,255,0.1);
        color: #ffffff; /* keep white */
    }

    .nav a:hover {
        background: #1b5e20; /* slightly darker on hover */
        color: #c8e6c9;
    }

    .nav.active {
        display: flex;
    }
}



/* =========================
   Tool Cards
========================= */
.tool {
    background: #ffffff;
    border-radius: 18px;
    padding: 25px;
    margin: 30px auto;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

.tool h2 {
    margin-top: 0;
    color: #2e7d32;
}

/* =========================
   Forms
========================= */
form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 15px;
}

button {
    background: #2e7d32;
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background: #1b5e20;
}

/* =========================
   Results & Food Cards
========================= */
#weightResult {
    font-size: 18px;
    font-weight: 600;
}

#foodSuggestions h3 {
    margin-top: 20px;
    color: #333;
}

#foodSuggestions ul {
    list-style: none;
    padding: 0;
}

#foodSuggestions li {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 14px;
    margin-bottom: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.05);
}

#foodSuggestions a {
    display: inline-block;
    margin-top: 8px;
    color: #2e7d32;
    font-weight: 600;
    text-decoration: none;
}

#foodSuggestions a:hover {
    text-decoration: underline;
}

/* =========================
   Footer
========================= */
footer {
    background: #2e7d32;
    color: #ccc;
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
}

/* =========================
   Responsive
========================= */
@media (max-width: 768px) {

    /* Header adjustments */
    header h1 {
        font-size: 22px;
    }

    /* Hide nav links by default */
    header nav {
        display: none;
        flex-direction: column;
        gap: 15px;
        background: linear-gradient(135deg, #2e7d32, #66bb6a);
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 15px 0;
        box-shadow: 0 6px 15px rgba(0,0,0,0.1);
        z-index: 99;
    }

    /* Show nav when active */
    header nav.active {
        display: flex;
    }

    /* Show hamburger */
    .hamburger {
        display: block;
    }

    /* Stack header items */
    header .container {
        flex-wrap: wrap;
        justify-content: space-between;
        position: relative;
    }

    /* Stack nav links vertically */
    header nav a {
        text-align: center;
        width: 100%;
        padding: 8px 0;
        margin-bottom: 0; /* remove old mobile margin */
    }

    /* Tool cards adjustments */
    .tool {
        margin: 20px 10px;
    }
}
