/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Light Theme (default) */
:root {
    --primary-color: #2c5f2d;
    --secondary-color: #97bc62;
    --accent-color: #ff6b35;
    --dark-color: #1a1a1a;
    --light-color: #f4f4f4;
    --text-color: #333;
    --text-light: #666;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);

    /* Theme-aware variables */
    --bg-primary: #ffffff;
    --bg-secondary: #f4f4f4;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --input-bg: #f9fafb;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #e5e7eb;
    --hover-bg: #f3f4f6;
    --navbar-bg: #ffffff;
}

/* Dark Theme */
body[data-theme="dark"] {
    --primary-color: #4ade80;
    --secondary-color: #97bc62;
    --accent-color: #ff6b35;
    --dark-color: #1a1a1a;
    --light-color: #374151;
    --text-color: #f3f4f6;
    --text-light: #9ca3af;
    --white: #1f2937;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.4);

    /* Theme-aware variables */
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --card-bg: #2a2f3e;
    --header-bg: #1a1f2e;
    --input-bg: #1a1f2e;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --border-color: #374151;
    --hover-bg: #374151;
    --navbar-bg: #1f2937;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-primary);
    transition: background-color 0.3s, color 0.3s;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: all 0.2s;
    margin-right: 1rem;
}

.theme-toggle:hover {
    background: var(--hover-bg);
    color: var(--text-color);
    border-color: var(--accent-color);
}

.theme-toggle .sun-icon {
    display: block;
}

.theme-toggle .moon-icon {
    display: none;
}

body[data-theme="dark"] .theme-toggle .sun-icon {
    display: none;
}

body[data-theme="dark"] .theme-toggle .moon-icon {
    display: block;
}

/* Nav Right container */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
header {
    background-color: var(--navbar-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.logo h1 {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 700;
}

.logo-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    display: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #ff5722;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* Sections */
section {
    padding: 80px 0;
}

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

/* Features Section */
.features {
    background-color: var(--light-color);
}

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

.feature-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-light);
}

/* Resources Section */
.resources-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.resource-item {
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    background-color: var(--light-color);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.resource-item:hover {
    background-color: var(--white);
    box-shadow: var(--shadow);
}

.resource-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.resource-item p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.resource-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.resource-link:hover {
    color: var(--primary-color);
}

/* About Section */
.about {
    background-color: var(--light-color);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    text-align: center;
}

/* Contact Section */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

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

.form-group textarea {
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--light-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (min-width: 768px) {
    .logo-subtitle {
        display: inline;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: var(--shadow);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }

    section {
        padding: 40px 0;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Dropdown Menu Styles */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    list-style: none;
    margin: 5px 0 0 0;
    padding: 5px 0;
    min-width: 150px;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: #f0f0f0;
}

/* User Section & Auth Buttons */
.user-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-section #user-name {
    color: white;
    font-weight: 500;
}

#auth-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}
