:root {
    --primary-color: #1a3c34;
    --secondary-color: #2e7d32;
    --background-color: #f5f5f5;
    --text-color: #333;
    --card-bg: #fff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

header p {
    font-size: 1rem;
    margin-top: 0.5rem;
}

.desktop-nav {
    display: none;
}

.hero-section {
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    color: #fff;
    text-align: center;
    padding: 2rem 1rem;
}

.hero-section h2 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.btn-primary {
    background: var(--secondary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    transition: var(--transition);
}

.btn-primary:hover,
.btn-primary:active {
    background: #1b5e20;
    transform: scale(0.98);
}

.container {
    padding: 1rem;
    max-width: 100%;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

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

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.search-bar {
    margin-bottom: 1.5rem;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.crop-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.crop-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.crop-card:hover,
.crop-card:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.crop-card img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.crop-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.crop-details {
    padding: 1rem;
}

.crop-details h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.crop-details p {
    margin-bottom: 0.75rem;
}

.auth-form {
    max-width: 400px;
    margin: 0 auto;
}

.auth-form h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.auth-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form label {
    font-weight: 500;
}

.auth-form input,
.auth-form textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.auth-form textarea {
    resize: vertical;
    min-height: 100px;
}

.auth-form .error {
    color: #d32f2f;
    font-size: 0.9rem;
    display: none;
}

.auth-form .error.active {
    display: block;
}

.auth-form button[type="submit"] {
    background: var(--primary-color);
    color: #fff;
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.auth-form button[type="submit"]:hover,
.auth-form button[type="submit"]:active {
    background: #123029;
}

.about-section,
.guide-section,
.faq-section,
.testimonial-section,
.contact-section {
    padding: 1rem;
}

.about-section ul,
.guide-section ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.faq-item {
    margin-bottom: 1rem;
}

.faq-item h3 {
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item h3 span::after {
    content: '+';
    font-size: 1.5rem;
}

.faq-item.active h3 span::after {
    content: '−';
}

.faq-item p {
    display: none;
    padding: 0.75rem;
    background: var(--card-bg);
    border-radius: 5px;
}

.faq-item.active p {
    display: block;
}

.testimonial {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.testimonial p {
    margin-bottom: 0.5rem;
}

.testimonial cite {
    font-style: italic;
    color: var(--secondary-color);
}

.blog-post {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.blog-post h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.blog-post p {
    margin-bottom: 0.5rem;
}

.team-member {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.team-member img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

.team-member h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.team-member p {
    margin-bottom: 0.5rem;
}

.bottom-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    background: var(--primary-color);
    padding: 0.5rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}

.bottom-nav a {
    color: #fff;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.9rem;
    text-decoration: none;
    flex: 1;
    transition: var(--transition);
}

.bottom-nav a:hover,
.bottom-nav a:active {
    background: var(--secondary-color);
}

.bottom-nav i {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.bottom-nav span {
    display: none;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    max-width: 90%;
    text-align: center;
    position: relative;
    animation: slideIn 0.3s ease;
}

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

.modal-content .close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.modal-content p {
    margin-bottom: 1rem;
}

.modal-content button {
    background: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-content button:hover,
.modal-content button:active {
    background: #123029;
}

footer {
    text-align: center;
    padding: 1rem;
    background: var(--primary-color);
    color: #fff;
    margin-bottom: 4rem;
}

footer a {
    color: #fff;
    text-decoration: underline;
}

.touch-feedback {
    transition: transform 0.1s ease;
}

.touch-feedback:active {
    transform: scale(0.95);
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #121212;
        --text-color: #e0e0e0;
        --card-bg: #1e1e1e;
        --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .search-bar input,
    .auth-form input,
    .auth-form textarea {
        background: #2e2e2e;
        color: #e0e0e0;
        border-color: #444;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .page.active,
    .modal-content,
    .crop-card,
    .btn-primary,
    .auth-form button,
    .modal-content button,
    .bottom-nav a,
    .touch-feedback {
        transition: none;
        animation: none;
    }
}

/* Desktop Styles */
@media (min-width: 768px) {
    header h1 {
        font-size: 2.2rem;
    }

    header p {
        font-size: 1.2rem;
    }

    .desktop-nav {
        display: block;
        background: var(--primary-color);
        padding: 0.5rem;
    }

    .desktop-nav .nav-container {
        display: flex;
        justify-content: center;
        gap: 1rem;
        max-width: 1200px;
        margin: 0 auto;
    }

    .desktop-nav a {
        color: #fff;
        text-decoration: none;
        padding: 0.5rem 1rem;
        border-radius: 5px;
        transition: var(--transition);
    }

    .desktop-nav a:hover,
    .desktop-nav a:active {
        background: var(--secondary-color);
    }

    .hero-section {
        padding: 3rem 2rem;
    }

    .hero-section h2 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1.2rem;
    }

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

    .crop-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .crop-card img {
        width: 100px;
        height: 100px;
    }

    .crop-card h3 {
        font-size: 1.3rem;
    }

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

    .bottom-nav {
        display: none;
    }

    footer {
        margin-bottom: 0;
    }
}