/* AgriAid Custom CSS */
:root {
    --primary-green: #28a745;
    --secondary-green: #20c997;
    --dark-green: #155724;
    --light-green: #d4edda;
    --gradient-primary: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --gradient-hero: linear-gradient(135deg, rgba(16, 0, 0, 0.734) 0%, rgba(32, 201, 151, 0.9) 100%);
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 5px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.text-success {
    color: var(--primary-green) !important;
}

.bg-success {
    background: var(--gradient-primary) !important;
}

/* Navigation */
.navbar {
    background: var(--gradient-primary) !important;
    padding: 1rem 0;
    box-shadow: var(--shadow-light);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-hero), url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.hero-image img {
    animation: fadeInRight 1s ease-out 0.3s both;
}

.stat-item h3 {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Features Section */
.features-section {
    padding: 5rem 0;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #f8f9fa;
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

/* Crops Section */
.crops-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.crop-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: all 0.3s ease;
    height: 100%; /* take full height of parent */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.row.g-4 > div {
    display: flex;
}

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

.crop-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

/* Prediction Interface */
.predict-section {
    padding: 2rem 0;
    margin-top: 5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    min-height: 100vh;
}

.prediction-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
}

.upload-area {
    border: 3px dashed var(--primary-green);
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    background: rgba(40, 167, 69, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--secondary-green);
    background: rgba(40, 167, 69, 0.1);
    transform: scale(1.02);
}

.upload-content {
    transition: all 0.3s ease;
}

.image-preview {
    position: relative;
    display: inline-block;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
}

.preview-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Tips Section */
.tips-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
}

.tip-card {
    text-align: center;
    padding: 1.5rem;
    background: rgba(40, 167, 69, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.tip-card:hover {
    background: rgba(40, 167, 69, 0.1);
    transform: translateY(-3px);
}

/* Result Page */
.result-section {
    padding: 2rem 0;
    margin-top: 5rem;
    min-height: 100vh;
}

.result-alert {
    border-radius: 15px;
    padding: 2rem;
    border: none;
    box-shadow: var(--shadow-light);
}

.result-alert.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 5px solid var(--primary-green);
}

.result-alert.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 5px solid #ffc107;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
}

.treatment-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.treatment-card .card-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 1.5rem;
    border: none;
}

.organic-card .card-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.chemical-card .card-header {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.prevention-card .card-header {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
}

.treatment-list {
    list-style: none;
    padding: 0;
}

.treatment-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.treatment-list li:last-child {
    border-bottom: none;
}

/* About Page */
.about-hero {
    padding: 5rem 0;
    margin-top: 5rem;
}

.mission-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    text-align: center;
    height: 100%;
    transition: all 0.3s ease;
}

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

.mission-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.mission-icon i {
    font-size: 2rem;
    color: white;
}

.tech-feature {
    display: flex;
    align-items: center;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.tech-feature:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-medium);
}

.tech-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 2rem;
    flex-shrink: 0;
}

.tech-icon i {
    font-size: 2rem;
    color: white;
}

.impact-stat {
    text-align: center;
    padding: 2rem;
}

.impact-stat h3 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Services Page */
.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    height: 100%;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.service-icon {
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.service-icon i {
    font-size: 2.5rem;
    color: white;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    padding: 0.5rem 0;
}

.crop-service-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.crop-service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.crop-service-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.disease-list {
    list-style: none;
    padding: 0;
    text-align: left;
}

.disease-list li {
    padding: 0.25rem 0;
    color: #666;
}

.disease-list li::before {
    content: "•";
    color: var(--primary-green);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Testimonials Page */
.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    height: 100%;
    transition: all 0.3s ease;
}

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

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}

.testimonial-info h5 {
    margin-bottom: 0.25rem;
}

.testimonial-info p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.stars i {
    margin-right: 0.25rem;
}

.success-story-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: all 0.3s ease;
}

.success-story-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.story-content {
    padding: 2rem;
}

.story-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
}

.stat {
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 1.5rem;
    color: var(--primary-green);
}

.stat span {
    font-size: 0.9rem;
    color: #666;
}

.video-testimonial-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: all 0.3s ease;
}

.video-testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.video-placeholder {
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-placeholder:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

/* Contact Page */
.contact-form-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
}

.contact-info {
    padding: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.contact-icon i {
    color: white;
    font-size: 1.25rem;
}

.contact-details h5 {
    margin-bottom: 0.5rem;
    color: var(--primary-green);
}

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

.social-link {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-medium);
}

/* CTA Section */
.cta-section {
    background: var(--gradient-primary);
    color: white;
}

/* Button Styles */
.btn-success {
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: var(--gradient-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-outline-success {
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-success:hover {
    background: var(--primary-green);
    border-color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Form Styles */
.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

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

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

/* Loading Animation */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
    }

    .hero-content {
        text-align: center;
        margin-bottom: 3rem;
    }

    .tech-feature {
        flex-direction: column;
        text-align: center;
    }

    .tech-icon {
        margin-right: 0;
        margin-bottom: 1.5rem;
    }

    .story-stats {
        justify-content: center;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
    }

    .contact-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .prediction-card {
        padding: 2rem 1.5rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .feature-card,
    .service-card {
        padding: 1.5rem;
    }
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}