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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode Styles */
body.dark-mode {
    background: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .header {
    background: linear-gradient(135deg, #1B5E20 0%, #0d3d13 100%);
}

body.dark-mode .hero {
    background: linear-gradient(rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.08));
}

body.dark-mode .features,
body.dark-mode .quick-actions {
    background: #242424;
}

body.dark-mode .feature-card,
body.dark-mode .glass-card {
    background: rgba(40, 40, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

body.dark-mode .feature-card:hover {
    background: rgba(50, 50, 50, 0.9);
    border-color: rgba(76, 175, 80, 0.3);
}

body.dark-mode .modal-content {
    background: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #333;
    color: #e0e0e0;
    border-color: #555;
}

body.dark-mode .footer {
    background: #1a1a1a;
    border-top: 1px solid #333;
}

body.dark-mode .language-info small {
    background: rgba(40, 40, 40, 0.9);
    color: #aaa;
}

body.dark-mode .ai-chatbox {
    background: #2a2a2a;
    border-color: #444;
}

body.dark-mode .chat-message.bot {
    background: #333;
}

body.dark-mode .chat-message.user {
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
}

/* Animated Background with Sliding Images */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
    background: 
        url('https://images.unsplash.com/photo-1625246333195-78d9c38ad449?w=800') no-repeat,
        url('https://images.unsplash.com/photo-1574943320219-553eb213f72d?w=800') no-repeat,
        url('https://images.unsplash.com/photo-1592982537447-7440770cbfc9?w=800') no-repeat,
        url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?w=800') no-repeat;
    background-size: 400px 300px, 350px 280px, 380px 290px, 360px 270px;
    background-position: 
        -400px 10%,
        120% 30%,
        -350px 60%,
        120% 80%;
    filter: blur(8px);
    animation: slideImages 60s ease-in-out infinite;
}

@keyframes slideImages {
    0% {
        background-position: 
            -400px 10%,
            120% 30%,
            -350px 60%,
            120% 80%;
    }
    25% {
        background-position: 
            20% 15%,
            80% 25%,
            15% 65%,
            85% 75%;
    }
    50% {
        background-position: 
            120% 20%,
            -400px 35%,
            120% 55%,
            -350px 85%;
    }
    75% {
        background-position: 
            80% 10%,
            20% 40%,
            75% 70%,
            25% 80%;
    }
    100% {
        background-position: 
            -400px 10%,
            120% 30%,
            -350px 60%,
            120% 80%;
    }
}

/* Additional Floating Particles Background */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    background-image: 
        radial-gradient(circle, rgba(76, 175, 80, 0.3) 2px, transparent 2px),
        radial-gradient(circle, rgba(46, 125, 50, 0.2) 1px, transparent 1px),
        radial-gradient(circle, rgba(129, 199, 132, 0.25) 3px, transparent 3px);
    background-size: 200px 200px, 150px 150px, 250px 250px;
    background-position: 0 0, 50px 50px, 100px 100px;
    animation: floatParticles 40s linear infinite;
}

@keyframes floatParticles {
    0% {
        background-position: 0 0, 50px 50px, 100px 100px;
    }
    100% {
        background-position: 200px 200px, 250px 250px, 300px 300px;
    }
}

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

/* Language Toggle */
.language-toggle {
    position: fixed;
    top: 20px;
    right: 80px;
    z-index: 1000;
    text-align: center;
}

#langToggle {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    min-width: 90px;
    font-size: 0.95rem;
}

#langToggle:hover {
    background: linear-gradient(135deg, #45a049 0%, #388E3C 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.language-info {
    margin-top: 5px;
    opacity: 0.8;
}

.language-info small {
    color: #666;
    font-size: 0.7rem;
    background: rgba(255,255,255,0.9);
    padding: 2px 6px;
    border-radius: 10px;
    white-space: nowrap;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.dark-mode-toggle button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 3px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    position: relative;
    overflow: hidden;
}

.dark-mode-toggle button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.sun-icon, .moon-icon {
    transition: all 0.3s ease;
    display: inline-block;
}

body.dark-mode .sun-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
    position: absolute;
}

body.dark-mode .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body:not(.dark-mode) .moon-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
    position: absolute;
}

body:not(.dark-mode) .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Header */
.header {
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    color: white;
    padding: 2.5rem 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.logo h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.logo p {
    font-size: 1.3rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-weight: 300;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    padding: 4rem 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c5530;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    color: #666;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #4CAF50;
}

.stat-label {
    font-size: 1rem;
    color: #666;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: white;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c5530;
}

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

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 50px rgba(76, 175, 80, 0.3);
    border-color: #4CAF50;
}

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

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c5530;
}

.feature-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.feature-action {
    color: #4CAF50;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Agriculture News Section */
.agri-news {
    padding: 4rem 0;
    background: #f8f9fa;
}

.agri-news h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c5530;
}

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

.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.news-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.social-media-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon {
    font-size: 80px;
}

.news-content {
    padding: 1.5rem;
}

.news-date {
    color: #4CAF50;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.news-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c5530;
}

.news-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.news-content ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #666;
    line-height: 1.6;
}

.news-content ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
}

.news-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
}

.news-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.social-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #4CAF50;
    color: white;
}

/* Quick Actions */
.quick-actions {
    padding: 3rem 0;
    background: white;
}

.quick-actions h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #2c5530;
}

.quick-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.quick-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    position: relative;
}

.quick-btn:hover {
    background: #45a049;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* Tooltip Styles */
.quick-btn .tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    max-width: 250px;
    white-space: normal;
    text-align: center;
}

.quick-btn .tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #333;
}

.quick-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
    bottom: 130%;
}

.quick-btn.emergency {
    background: #f44336;
    animation: pulse 2s infinite;
}

.quick-btn.emergency:hover {
    background: #da190b;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(244, 67, 54, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0); }
}

.btn-icon {
    font-size: 1.2rem;
}

/* Footer */
.footer {
    background: #2c5530;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    color: #4CAF50;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4CAF50;
    opacity: 0.8;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: #000;
}

.emergency-contacts {
    margin-top: 1rem;
}

.contact-item {
    background: #f8f9fa;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.contact-item h3 {
    color: #2c5530;
    margin-bottom: 0.5rem;
}

/* Expert Form */
.expert-form {
    margin-top: 1rem;
}

.expert-form input,
.expert-form select,
.expert-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.expert-form input:focus,
.expert-form select:focus,
.expert-form textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: #45a049;
}

/* Navigation Styles for other pages */
.nav-header {
    background: #4CAF50;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.back-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease;
}

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

/* Page Content */
.page-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .language-toggle {
        top: 15px;
        right: 15px;
    }
    
    .language-info small {
        font-size: 0.6rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .quick-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .quick-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .features h2 {
        font-size: 2rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .language-toggle {
        top: 10px;
        right: 10px;
    }
    
    #langToggle {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* ============================================
   AI CHAT ASSISTANT STYLES
   ============================================ */

/* AI Chat Button (Floating) */
.ai-chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

.chat-icon {
    font-size: 28px;
}

.chat-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* AI Chatbox */
.ai-chatbox {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.ai-chatbox.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

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

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar {
    font-size: 32px;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
}

.chat-status {
    font-size: 12px;
    opacity: 0.9;
}

.chat-header-right {
    display: flex;
    gap: 10px;
}

.chat-lang-btn, .chat-minimize-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

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

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.chat-message {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    animation: messageFadeIn 0.3s ease;
}

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

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    font-size: 24px;
    min-width: 32px;
}

.message-content {
    background: white;
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 70%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message-time {
    font-size: 11px;
    color: #999;
    display: block;
    margin-top: 5px;
}

.chat-message.user .message-time {
    color: rgba(255,255,255,0.8);
}

.chat-quick-questions {
    padding: 10px 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: white;
    border-top: 1px solid #eee;
}

.quick-question {
    background: #f0f0f0;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-question:hover {
    background: #667eea;
    color: white;
}

.chat-input-area {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: center;
}

.voice-btn, .send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.voice-btn:hover, .send-btn:hover {
    transform: scale(1.1);
}

.voice-btn.active {
    background: #ff4444;
    animation: pulse 1s infinite;
}

#chatInput {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
}

#chatInput:focus {
    border-color: #667eea;
}

.voice-indicator {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    text-align: center;
}

.voice-animation {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-bottom: 10px;
}

.voice-wave {
    width: 4px;
    height: 20px;
    background: #667eea;
    border-radius: 2px;
    animation: wave 1s infinite ease-in-out;
}

.voice-wave:nth-child(2) {
    animation-delay: 0.1s;
}

.voice-wave:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes wave {
    0%, 100% { height: 20px; }
    50% { height: 40px; }
}

/* Responsive - AI Chat */
@media (max-width: 768px) {
    .ai-chatbox {
        width: calc(100% - 20px);
        height: calc(100% - 120px);
        right: 10px;
        bottom: 80px;
    }
    
    .ai-chat-button {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .chat-icon {
        font-size: 24px;
    }
}

/* ============================================
   MODERN ENHANCEMENTS FOR HACKATHON
   ============================================ */

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Page Transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-content {
    animation: fadeIn 0.6s ease-out;
}

/* Glassmorphism Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Enhanced Buttons */
.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Card Hover Effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.15), 0 10px 10px rgba(0,0,0,0.12);
}

/* Loading Spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    border: 4px solid rgba(76, 175, 80, 0.1);
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Gradient Backgrounds */
.bg-gradient-green {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
}

.bg-gradient-blue {
    background: linear-gradient(135deg, #2196F3 0%, #1565C0 100%);
}

.bg-gradient-purple {
    background: linear-gradient(135deg, #9C27B0 0%, #6A1B9A 100%);
}

/* Text Shadows */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive Grid Improvements */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 2rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
}

/* Accessibility Improvements */
*:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .language-toggle,
    .ai-chat-button,
    .back-btn {
        display: none;
    }
}

/* ============================================
   ADDITIONAL ANIMATIONS FOR WOW FACTOR
   ============================================ */

/* Slide In Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Scale Pulse */
@keyframes scalePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Glow Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.8), 0 0 30px rgba(76, 175, 80, 0.6);
    }
}

/* Flip Animation */
@keyframes flip {
    0% {
        transform: perspective(400px) rotateY(0);
    }
    100% {
        transform: perspective(400px) rotateY(360deg);
    }
}

/* Zoom In */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Fade In Rotate */
@keyframes fadeInRotate {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Heartbeat */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(0.9);
    }
    20%, 40%, 60%, 80% {
        transform: scale(1.1);
    }
    50%, 70% {
        transform: scale(1.05);
    }
}

/* Wiggle */
@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

/* Rainbow Background */
@keyframes rainbow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Typing Effect */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* Apply Animations to Elements */

/* Feature Cards - Staggered Animation */
.feature-card:nth-child(1) {
    animation: slideInUp 0.6s ease-out 0.1s both;
}

.feature-card:nth-child(2) {
    animation: slideInUp 0.6s ease-out 0.2s both;
}

.feature-card:nth-child(3) {
    animation: slideInUp 0.6s ease-out 0.3s both;
}

.feature-card:nth-child(4) {
    animation: slideInUp 0.6s ease-out 0.4s both;
}

.feature-card:nth-child(5) {
    animation: slideInUp 0.6s ease-out 0.5s both;
}

.feature-card:nth-child(6) {
    animation: slideInUp 0.6s ease-out 0.6s both;
}

/* Feature Icons - Bounce on Hover */
.feature-card:hover .feature-icon {
    animation: bounce 1s ease;
}

/* Header Animation */
.header {
    animation: slideInDown 0.8s ease-out;
}

/* Hero Stats - Scale Pulse */
.stat {
    animation: zoomIn 0.8s ease-out;
}

.stat:hover {
    animation: scalePulse 1s ease-in-out infinite;
}

/* News Cards - Slide In */
.news-card:nth-child(odd) {
    animation: slideInLeft 0.8s ease-out;
}

.news-card:nth-child(even) {
    animation: slideInRight 0.8s ease-out;
}

/* Language Toggle - Glow Effect */
#langToggle {
    animation: glow 2s ease-in-out infinite;
}

/* Buttons - Wiggle on Hover */
button:hover {
    animation: wiggle 0.5s ease;
}

/* AI Chat Button - Heartbeat */
.ai-chat-button {
    animation: heartbeat 2s ease-in-out infinite;
}

/* Loading States */
.loading {
    animation: rotate 1s linear infinite;
}

/* Utility Classes */
.animate-bounce {
    animation: bounce 1s ease infinite;
}

.animate-shake {
    animation: shake 0.5s ease;
}

.animate-rotate {
    animation: rotate 2s linear infinite;
}

.animate-pulse {
    animation: scalePulse 2s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-flip {
    animation: flip 1s ease;
}

.animate-zoom {
    animation: zoomIn 0.5s ease;
}

.animate-fade-rotate {
    animation: fadeInRotate 0.8s ease;
}

.animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

.animate-wiggle {
    animation: wiggle 0.5s ease;
}

.animate-slide-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slide-right {
    animation: slideInRight 0.8s ease-out;
}

.animate-slide-up {
    animation: slideInUp 0.6s ease-out;
}

.animate-slide-down {
    animation: slideInDown 0.6s ease-out;
}

/* Hover Animations */
.hover-bounce:hover {
    animation: bounce 0.8s ease;
}

.hover-shake:hover {
    animation: shake 0.5s ease;
}

.hover-rotate:hover {
    animation: rotate 0.6s ease;
}

.hover-flip:hover {
    animation: flip 0.6s ease;
}

.hover-wiggle:hover {
    animation: wiggle 0.5s ease;
}

/* Continuous Animations */
.continuous-float {
    animation: float 3s ease-in-out infinite;
}

.continuous-pulse {
    animation: scalePulse 2s ease-in-out infinite;
}

.continuous-glow {
    animation: glow 2s ease-in-out infinite;
}

.continuous-rotate {
    animation: rotate 10s linear infinite;
}

/* Gradient Animation */
.animated-gradient {
    background: linear-gradient(270deg, #4CAF50, #2E7D32, #1B5E20, #4CAF50);
    background-size: 800% 800%;
    animation: rainbow 8s ease infinite;
}

/* Text Animations */
.typing-text {
    overflow: hidden;
    border-right: 3px solid #4CAF50;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* Stagger Delay Utilities */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Parallax Effect */
.parallax {
    transition: transform 0.3s ease-out;
}

.parallax:hover {
    transform: translateZ(20px) scale(1.05);
}

/* 3D Transform Effects */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card-3d:hover {
    transform: rotateY(10deg) rotateX(10deg);
}

/* Neon Glow Effect */
@keyframes neonGlow {
    0%, 100% {
        text-shadow: 0 0 10px #4CAF50, 0 0 20px #4CAF50, 0 0 30px #4CAF50;
    }
    50% {
        text-shadow: 0 0 20px #4CAF50, 0 0 30px #4CAF50, 0 0 40px #4CAF50, 0 0 50px #4CAF50;
    }
}

.neon-text {
    animation: neonGlow 2s ease-in-out infinite;
}

/* Particle Effect */
@keyframes particle {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}

.particle {
    animation: particle 2s ease-out infinite;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 1.2rem 2rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10000;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 300px;
    max-width: 500px;
}

.toast.show {
    top: 30px;
}

.toast-icon {
    font-size: 2rem;
    animation: bounceIn 0.6s ease;
}

.toast-message {
    font-size: 1rem;
    line-height: 1.4;
    flex: 1;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: rgba(76, 175, 80, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 1s ease-out;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #2c5530;
    margin-bottom: 1rem;
}

.faq-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.faq-question {
    width: 100%;
    background: white;
    border: none;
    padding: 1.5rem 2rem;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c5530;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4CAF50;
    transition: transform 0.3s ease;
    min-width: 30px;
    text-align: center;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #f8f9fa;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 1.5rem 2rem;
}

.faq-answer p {
    margin: 0;
    color: #555;
    line-height: 1.8;
    font-size: 1rem;
}

/* Dark Mode FAQ Styles */
body.dark-mode .faq-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

body.dark-mode .faq-section h2 {
    color: #4CAF50;
}

body.dark-mode .faq-subtitle {
    color: #aaa;
}

body.dark-mode .faq-item {
    background: #2a2a2a;
    border: 1px solid #444;
}

body.dark-mode .faq-question {
    background: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .faq-question:hover {
    background: #333;
}

body.dark-mode .faq-answer {
    background: #1f1f1f;
}

body.dark-mode .faq-answer p {
    color: #ccc;
}

/* Performance Optimization */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}