/* Global Styles */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --light-color: #f8f9fa;
    --dark-color: #333;
    --text-color: #555;
    --border-radius: 10px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f7fa;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    position: relative; 
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 40px;
    height: 40px;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Desktop Navigation */
.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    position: static; 
    width: auto;
    height: auto;
    background: transparent;
    box-shadow: none;
    flex-direction: row;
    padding: 0;
    overflow-y: visible;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    transition: color 0.3s;
    padding: 0; 
    display: inline-block; 
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Mobile Menu Toggle - Hidden by default on desktop */
.menu-toggle {
    display: none; 
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.menu-toggle:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/header-bg.jpg') no-repeat center/cover;
    height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    margin-top: 70px; /* Adjust for fixed header height */
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.cta-btn:hover {
    background: #45a049;
}

/* How It Works Section */
.how-it-works {
    padding: 4rem 0;
    background: white;
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

.steps {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.step {
    flex: 1;
    min-width: 250px;
    text-align: center;
    padding: 2rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s;
}

.step:hover {
    transform: translateY(-10px);
}

.step i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.step h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* Assessment Form */
.assessment {
    padding: 4rem 0;
    background: #f5f7fa;
}

.assessment h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.subtitle {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
}

#health-form {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.stress-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stress-input input {
    flex: 1;
}

#stress-value {
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

#submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

#submit-btn:hover {
    background: #45a049;
}

/* Results Section */
#results {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-top: 2rem;
    text-align: center;
}

#results.hidden {
    display: none;
}

#score-display {
    font-size: 1.8rem;
    margin: 1rem 0;
    color: var(--primary-color);
    font-weight: 700;
}

#feedback {
    text-align: left;
    margin: 2rem 0;
}

#feedback p {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

#feedback p:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

#retake-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

#retake-btn:hover {
    background: #0b7dda;
}

/* Footer Styles */
footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.footer-logo img {
    width: 40px;
    height: 40px;
}

.footer-logo h3 {
    color: white;
}

.footer-links h4,
.footer-social h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: white;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #444;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%; /* Position right below the header */
        left: -100%; /* Hidden off-screen to the left */
        width: 100%;
        height: auto; 
        max-height: calc(100vh - 70px); /* Max height to prevent overflow, 70px is header height */
        background: white;
        flex-direction: column; /* Stack navigation items vertically */
        align-items: center; /* Center items horizontally */
        padding: 2rem 0;
        transition: left 0.3s ease-in-out; /* Smooth slide animation */
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        overflow-y: auto; /* Enable scrolling if menu content is too long */
        z-index: 999; /* Ensure it's above other content */
        display: flex; /* Ensure flexbox properties apply for vertical layout */
    }

    .nav-links.active {
        left: 0; /* Slide into view */
    }

    .nav-links li {
        width: 100%; /* Make list items take full width */
        text-align: center;
        margin-bottom: 15px; /* Add space between menu items */
    }

    .nav-links li:last-child {
        margin-bottom: 0;
    }

    .nav-links a {
        display: block; /* Make links block-level for larger tap area */
        padding: 10px 0; /* Add padding for better touch targets */
        font-size: 1.1rem; /* Slightly larger font size for readability */
        color: var(--dark-color); /* Ensure text color is visible against white background */
    }

    .nav-links a:hover {
        color: var(--primary-color); /* Hover effect for mobile links */
    }

    .menu-toggle {
        display: block; /* Show the hamburger icon on mobile */
    }

    .steps {
        flex-direction: column;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }
}