/* Digital Krishi Officer - Farmer-Friendly CSS */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #2d5016;
    background-color: #f8fdf5;
    font-size: 16px;
}

/* Color Palette - Green & Earthy Tones */
:root {
    --primary-green: #4a7c36;
    --secondary-green: #6ba644;
    --light-green: #e8f5e8;
    --dark-green: #2d5016;
    --earth-brown: #8b4513;
    --golden-yellow: #f4d03f;
    --warm-orange: #e67e22;
    --cream: #faf7f0;
    --white: #ffffff;
    --light-gray: #f4f4f4;
    --text-gray: #555555;
    --border-color: #ddd;
    --shadow: rgba(74, 124, 54, 0.1);
    --hover-shadow: rgba(74, 124, 54, 0.2);
}

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

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--white);
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.logo-text {
    color: var(--white);
    font-size: 1.4rem;
    font-weight: 600;
    display: none;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Language Switcher */
.language-switcher {
    position: relative;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-width: 120px;
    display: none;
    z-index: 1001;
}

.lang-dropdown.show {
    display: block;
}

.lang-option {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    color: var(--dark-green);
    cursor: pointer;
    font-size: 0.95rem;
    text-align: left;
}

.lang-option:hover {
    background: var(--light-green);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 4px;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--light-green), var(--cream));
    padding: 80px 0;
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-gray);
    margin-bottom: 30px;
    font-weight: 400;
}

.cta-button {
    background: linear-gradient(135deg, var(--secondary-green), var(--primary-green));
    color: var(--white);
    border: none;
    padding: 18px 35px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--hover-shadow);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-icon {
    font-size: 12rem;
    color: var(--secondary-green);
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Features Section */
.features {
    padding: 100px 0;
    background: var(--white);
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary-green);
    text-align: center;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    text-align: center;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    border: 2px solid var(--light-green);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 0 5px 15px var(--shadow);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px var(--hover-shadow);
    border-color: var(--secondary-green);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--secondary-green), var(--primary-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2.2rem;
    color: var(--white);
}

.feature-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 15px;
}

.feature-desc {
    font-size: 1rem;
    color: var(--text-gray);
    line-height: 1.6;
}

/* AI Feature Special Styling */
.ai-feature {
    background: linear-gradient(135deg, var(--light-green), var(--cream));
    border-color: var(--golden-yellow);
    position: relative;
    overflow: hidden;
}

.ai-feature::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(244, 208, 63, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ai-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--golden-yellow);
    color: var(--dark-green);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Quick Actions Section */
.quick-actions {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--light-green), var(--cream));
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.action-btn {
    background: var(--white);
    border: 2px solid var(--secondary-green);
    color: var(--primary-green);
    padding: 25px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px var(--shadow);
}

.action-btn:hover {
    background: var(--secondary-green);
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--hover-shadow);
}

.action-btn i {
    font-size: 2.5rem;
}

/* Footer */
.footer {
    background: var(--dark-green);
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--golden-yellow);
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

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

.footer-section a:hover {
    opacity: 1;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    /* Logo text visible on mobile */
    .logo-text {
        display: block;
        font-size: 1.1rem;
    }
    
    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--primary-green);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        transition: left 0.3s ease;
        gap: 20px;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        font-size: 1.3rem;
        padding: 15px 25px;
        width: 80%;
        text-align: center;
    }
    
    /* Hero Section */
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-icon {
        font-size: 8rem;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .feature-card {
        padding: 30px 25px;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 2.2rem;
    }
    
    /* Actions Grid */
    .actions-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .features {
        padding: 60px 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 25px 20px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .quick-actions {
        padding: 60px 0;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus States */
button:focus,
a:focus,
input:focus {
    outline: 2px solid var(--secondary-green);
    outline-offset: 2px;
}

/* Loading Animation */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 350px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 9999;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-content {
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.notification-message {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--dark-green);
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-success {
    border-left: 4px solid var(--secondary-green);
}

.notification-error {
    border-left: 4px solid #e74c3c;
}

.notification-warning {
    border-left: 4px solid var(--golden-yellow);
}

.notification-info {
    border-left: 4px solid #3498db;
}

/* Form Error States */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.field-error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Voice Recording Animation */
.recording {
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }