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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f8f2;
    scroll-behavior: smooth; /* Smooth scrolling between sections */
}

/* Header and Navigation */
header {
    background: linear-gradient(135deg, #2c7a7b, #68d391);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    animation: slideIn 0.5s ease-out;
}

.logo img {
    height: 50px;
}

nav ul {
    display: flex;
    list-style-type: none;
}

nav ul li {
    margin-left: 2rem;
    position: relative; /* For pseudo-element positioning */
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative; /* For pseudo-element positioning */
    padding-bottom: 0.5rem;
}

nav ul li a::after {
    content: '';
    display: block;
    height: 2px;
    background: white;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Common Page Styles */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem;
}

/* Herb Encyclopedia Styles */
#herb-encyclopedia {
    background-color: #ffffff;
    padding: 2rem 1rem;
}

.herb-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.herb-card:hover {
    transform: translateY(-5px);
}

.herb-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.herb-card-content {
    padding: 1rem;
}

.herb-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c7a7b;
    margin-bottom: 0.5rem;
}

.herb-card-description {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.more-info-button {
    display: inline-block;
    background-color: #68d391;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.more-info-button:hover {
    background-color: #2c7a7b;
    transform: scale(1.05);
}

/* Quizzes Styles */

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f8f0; /* Light greenish background */
    color: #2c3e50;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

header {
    width: 100%;
    background-color: #2c7a7b;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

#quizzes {
    width: 90%;
    max-width: 800px;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
}

h1 {
    text-align: center;
    color: #2c7a7b;
    margin-bottom: 1.5rem;
}

fieldset {
    background-color: #e6f5e6;
    border: 2px solid #2c7a7b;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

fieldset:hover {
    background-color: #d4f0d4;
    transform: scale(1.02);
}

legend {
    font-weight: bold;
    font-size: 1.2rem;
    color: #2c7a7b;
    padding: 0 10px;
}

label {
    display: block;
    margin-top: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
}

input[type="radio"] {
    margin-right: 0.5rem;
}

button[type="submit"], .retry-button {
    background-color: #2c7a7b;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    width: 100%;
}

button[type="submit"]:hover, .retry-button:hover {
    background-color: #68d391;
    transform: scale(1.05);
}

#result-container {
    margin-top: 1.5rem;
    text-align: center;
    background-color: #e6f5e6;
    border: 2px solid #68d391;
    border-radius: 10px;
    padding: 1rem;
    color: #2c7a7b;
}

/* Videos Styles */
#videos {
    background-color: #f4f8f2;
    padding: 3rem 1rem;
    text-align: center;
}

.video-gallery {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.video-tutorial {
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-tutorial:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.video-tutorial h3 {
    font-size: 1.4rem;
    color: #2c7a7b;
    margin-bottom: 0.5rem;
}

.video-tutorial iframe {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.video-tutorial p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1rem;
}

footer {
    background: #2c7a7b;
    color: #ffffff;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    width: 100%;
}



/* Animation Definitions */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.25rem;
    }

    .cta-button {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }

    .plant-card {
        flex: 0 0 90%;
        margin: 0 auto;
    }

    .plant-grid {
        flex-direction: column;
        gap: 1rem;
    }

    .prev-btn, .next-btn {
        display: none;
    }

    .search-container {
        flex-direction: column;
        gap: 1rem;
    }

    .login-container {
        margin: 2rem auto;
    }

    .herb-card, .video-card {
        flex: 0 0 90%;
        margin: 0 auto;
    }

    .quiz-container {
        padding: 1rem;
    }
}

footer {
    background: #2c7a7b;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}
