/* Main Styles for Farmer Support System */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* Custom colors */
.bg-agriculture {
    background-color: #2e7d32;
}

.text-agriculture {
    color: #2e7d32;
}

/* Card styling */
.card {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    margin-bottom: 20px;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    border-radius: 10px 10px 0 0;
    font-weight: bold;
}

/* Dashboard stats */
.stat-card {
    text-align: center;
    padding: 20px;
}

.stat-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #2e7d32;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: bold;
}

/* Chat interface */
.chat-container {
    height: 500px;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #f5f5f5;
}

.chat-input {
    display: flex;
    padding: 10px;
    background-color: #fff;
    border-top: 1px solid #ddd;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 10px;
}

.chat-input button {
    border-radius: 20px;
}

.message {
    margin-bottom: 15px;
    max-width: 80%;
}

.message-user {
    align-self: flex-end;
    background-color: #dcf8c6;
    padding: 10px 15px;
    border-radius: 20px;
    margin-left: auto;
}

.message-bot {
    align-self: flex-start;
    background-color: #fff;
    padding: 10px 15px;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Login and Register forms */
.auth-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2e7d32;
}

/* Footer */
footer {
    margin-top: 50px;
    padding: 20px 0;
    background-color: #2e7d32;
    color: #fff;
}

/* Landing Page Styles */
.hero-section {
    background: linear-gradient(rgba(46, 125, 50, 0.8), rgba(27, 94, 32, 0.9)) !important;
    color: white;
    padding: 120px 0;
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-section .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.feature-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    background-color: white;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #2E7D32;
}

.testimonial-section {
    background-color: #f8f9fa;
    padding: 80px 0;
}

.testimonial-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    height: 100%;
}

.testimonial-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #e0e0e0;
    object-fit: cover;
    margin-right: 20px;
}

.cta-section {
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    color: white;
    padding: 80px 0;
}

.stats-counter {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2E7D32;
}

.stats-label {
    font-size: 1.1rem;
    color: #666;
}

.stats-card {
    padding: 30px;
    border-radius: 10px;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    height: 100%;
}

.how-it-works-step {
    text-align: center;
    padding: 20px;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: #2E7D32;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

.wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-container svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.wave-container .shape-fill {
    fill: #FFFFFF;
}

.hero-image {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chat-container {
        height: 400px;
    }
    
    .stat-card {
        margin-bottom: 20px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .admin-sidebar {
        min-height: auto;
        margin-bottom: 20px;
    }
    
    .admin-sidebar .nav-link {
        padding: 8px 15px;
    }
    
    .hero-section {
        padding: 80px 0;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-image {
        margin-top: 30px;
    }
    
    .stats-counter {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .chat-container {
        height: 350px;
    }
    
    .message {
        max-width: 95%;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .btn {
        padding: 0.375rem 0.5rem;
    }
    
    .table-responsive th, 
    .table-responsive td {
        padding: 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .feature-card {
        margin-bottom: 20px;
    }
}

/* Botpress widget customization */
#bp-widget-container {
    z-index: 9999;
}

/* Admin panel */
.admin-sidebar {
    background-color: #343a40;
    color: #fff;
    min-height: calc(100vh - 56px);
    padding-top: 20px;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    margin-bottom: 5px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-sidebar .nav-link i {
    margin-right: 10px;
}

.admin-content {
    padding: 20px;
}

/* Ticket status colors */
.status-open {
    background-color: #dc3545;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.status-in-progress {
    background-color: #ffc107;
    color: black;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.status-closed {
    background-color: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Feedback system styling */
.rating-stars {
    cursor: pointer;
}

.rating-stars .fa-star {
    color: #ffc107;
    margin-right: 2px;
}

.feedback-container {
    padding: 15px;
    border-top: 1px solid #dee2e6;
}

/* Information cards for pests and crops */
.info-card {
    height: 100%;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.info-card .card-img-top {
    height: 180px;
    object-fit: cover;
}

.info-card .card-title {
    color: #2e7d32;
    font-weight: 600;
}

.info-card .badge {
    font-size: 0.8rem;
    padding: 5px 10px;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Detail pages for pests and crops */
.detail-image {
    max-height: 300px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 20px;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    color: #2e7d32;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background-color: white;
    }
}

/* Accessibility improvements */
.btn:focus, 
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(46, 125, 50, 0.25);
}

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