/* Krishok Bondhu - Main Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Bengali:wght@400;600&display=swap');

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

body {
    font-family: Arial, Helvetica, sans-serif, 'Noto Sans Bengali';
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* Header */
.header {
    background-color: #2E7D32;
    color: white;
    padding: 15px 0;
}

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

.header-left {
    display: flex;
    flex-direction: column;
}

.header-logo {
    font-size: 24px;
    font-weight: bold;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 4px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 3px;
}

.lang-btn {
    padding: 6px 14px;
    border: none;
    background-color: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    background-color: white;
    color: #2E7D32;
}

/* Navigation */
.nav {
    background-color: #1B5E20;
    padding: 10px 0;
}

.nav .container {
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-list a {
    color: white;
    padding: 8px 16px;
    font-size: 16px;
}

.nav-list a:hover,
.nav-list a.active {
    background-color: #2E7D32;
}

/* Hero Section */
.hero {
    background-color: #E8F5E9;
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 36px;
    color: #2E7D32;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

/* Search Box */
.search-box {
    padding: 20px 0;
    text-align: center;
}

.search-box input {
    padding: 12px 20px;
    width: 400px;
    max-width: 100%;
    border: 2px solid #ccc;
    font-size: 16px;
}

.search-box button {
    padding: 12px 24px;
    background-color: #2E7D32;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

.search-box button:hover {
    background-color: #1B5E20;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #2E7D32;
    color: white;
    border: none;
    font-size: 14px;
    cursor: pointer;
}

.btn:hover {
    background-color: #1B5E20;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #2E7D32;
    color: #2E7D32;
}

.btn-outline:hover {
    background-color: #2E7D32;
    color: white;
}

/* Feature Cards */
.features {
    padding: 40px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-card {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    padding: 30px;
    text-align: center;
}

.feature-card h3 {
    color: #2E7D32;
    margin-bottom: 10px;
    font-size: 20px;
}

.feature-card p {
    color: #666;
    margin-bottom: 15px;
}

/* Crop Cards */
.crops-section {
    padding: 40px 0;
}

.crops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.crop-card {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.crop-card-image {
    width: 100%;
    height: 180px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.crop-card-content {
    padding: 15px;
}

.crop-card-content h3 {
    color: #2E7D32;
    margin-bottom: 8px;
    font-size: 18px;
}

.crop-card-content p {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Crop Detail Page */
.crop-detail {
    padding: 40px 0;
}

.crop-detail-header {
    background-color: #E8F5E9;
    padding: 30px;
    margin-bottom: 30px;
}

.crop-detail-header h1 {
    color: #2E7D32;
    font-size: 32px;
    margin-bottom: 10px;
}

.crop-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.crop-info-item {
    background-color: #f9f9f9;
    padding: 20px;
    border: 1px solid #e0e0e0;
}

.crop-info-item h4 {
    color: #2E7D32;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
}

.crop-info-item p {
    color: #333;
    font-size: 16px;
}

.crop-description {
    background-color: #f9f9f9;
    padding: 25px;
    border: 1px solid #e0e0e0;
}

.crop-description h2 {
    color: #2E7D32;
    margin-bottom: 15px;
}

.crop-description p {
    color: #555;
    line-height: 1.8;
}

/* Table Styles */
.table-section {
    padding: 40px 0;
}

.table-section h2 {
    color: #2E7D32;
    margin-bottom: 20px;
    text-align: center;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #f9f9f9;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

th {
    background-color: #2E7D32;
    color: white;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f0f0f0;
}

tr:hover {
    background-color: #E8F5E9;
}

/* Weather Section */
.weather-section {
    padding: 40px 0;
}

.weather-section h2 {
    color: #2E7D32;
    margin-bottom: 20px;
    text-align: center;
}

.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.weather-card {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    padding: 25px;
    text-align: center;
}

.weather-card h4 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.weather-card .value {
    font-size: 32px;
    color: #2E7D32;
    font-weight: bold;
}

.weather-card .unit {
    color: #888;
    font-size: 14px;
}

.weather-message {
    background-color: #E8F5E9;
    padding: 20px;
    text-align: center;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

/* Disease Section */
.disease-section {
    padding: 40px 0;
}

.disease-section h2 {
    color: #2E7D32;
    margin-bottom: 20px;
    text-align: center;
}

.upload-area {
    background-color: #f9f9f9;
    border: 2px dashed #ccc;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
}

.upload-area p {
    color: #666;
    margin-bottom: 15px;
}

.preview-area {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.preview-area img {
    max-width: 100%;
    max-height: 300px;
}

.disease-message {
    background-color: #E8F5E9;
    padding: 20px;
    text-align: center;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
    margin-top: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* Footer */
.footer {
    background-color: #1B5E20;
    color: white;
    padding: 30px 0;
    margin-top: 40px;
}

.footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-section p,
.footer-section a {
    color: #C8E6C9;
    font-size: 14px;
    line-height: 2;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #2E7D32;
    color: #C8E6C9;
    font-size: 14px;
}

/* Page Header */
.page-header {
    background-color: #E8F5E9;
    padding: 30px 0;
    text-align: center;
}

.page-header h1 {
    color: #2E7D32;
    font-size: 28px;
}

/* Section */
.section {
    padding: 40px 0;
}

.section-title {
    color: #2E7D32;
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
}

/* Auth Pages */
.auth-section {
    padding: 40px 0;
}

.auth-card {
    max-width: 420px;
    margin: 0 auto;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    padding: 30px;
}

.auth-card h2 {
    color: #2E7D32;
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
}

.auth-card .form-group {
    margin-bottom: 15px;
}

.auth-card .form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 600;
}

.auth-card .form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.auth-card .form-group input:focus {
    outline: none;
    border-color: #2E7D32;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-top: 5px;
}

.auth-error {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid #ef9a9a;
    font-size: 14px;
}

.auth-switch {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.auth-switch a {
    color: #2E7D32;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.nav-user-btn {
    cursor: pointer;
}

.nav-user-btn .nav-logout-icon {
    font-size: 10px;
    margin-left: 2px;
    opacity: 0.7;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 10px;
    }

    .header-left {
        align-items: center;
    }

    .nav-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }

    .search-box input {
        width: 100%;
    }

    .features-grid,
    .crops-grid,
    .weather-grid,
    .crop-info-grid {
        grid-template-columns: 1fr;
    }

    .footer .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 24px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .crop-card-image {
        height: 150px;
    }
}
