/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #2e7d32;
    --light-green: #4caf50;
    --dark-green: #1b5e20;
    --accent-yellow: #ffc107;
    --light-yellow: #fff8e1;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #424242;
    --text-color: #333333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-gray);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    color: var(--dark-green);
    text-align: center;
    margin-bottom: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* Header */
.header {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 1.5rem 0;
    box-shadow: var(--shadow);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 2rem;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0;
}

.tagline {
    font-style: italic;
    opacity: 0.9;
    margin-top: 0.5rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--light-green) 0%, var(--primary-green) 100%);
    color: var(--white);
    padding: 3rem 0;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-content {
    flex: 1;
}

.hero-content h2 {
    font-size: 2.5rem;
    color: var(--white);
    text-align: left;
    margin-bottom: 1rem;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Crop Selection */
.crop-selection {
    padding: 3rem 0;
    background-color: var(--white);
}

.section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--dark-gray);
}

.selection-form {
    background-color: var(--light-yellow);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-green);
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--medium-gray);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background-color: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background-color: var(--primary-green);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* Crop Grid */
.crop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.crop-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.crop-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.crop-image {
    height: 150px;
    overflow: hidden;
}

.crop-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.crop-card:hover .crop-image img {
    transform: scale(1.05);
}

.crop-info {
    padding: 1.5rem;
}

.crop-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-green);
    margin-bottom: 0.5rem;
}

.crop-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--light-yellow);
    color: var(--dark-green);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.crop-duration {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

/* Guide Display */
.guide-display {
    padding: 3rem 0;
    background-color: var(--light-gray);
}

.guide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.guide-header h2 {
    margin-bottom: 0;
    text-align: left;
}

.guide-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background-color: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.summary-card h3 {
    color: var(--primary-green);
    border-bottom: 2px solid var(--light-yellow);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.summary-details p {
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
}

.summary-details p strong {
    color: var(--dark-gray);
}

/* Timeline */
.guide-timeline {
    background-color: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--primary-green);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--medium-gray);
}

.timeline-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.3rem;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-green);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 3px var(--primary-green);
}

.timeline-week {
    display: inline-block;
    background-color: var(--light-yellow);
    color: var(--dark-green);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-activity {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-green);
    margin-bottom: 0.5rem;
}

.timeline-detail {
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.timeline-input {
    display: flex;
    justify-content: space-between;
    background-color: var(--light-gray);
    padding: 0.75rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
}

.timeline-input strong {
    color: var(--primary-green);
}

/* Pest Info */
.pest-info {
    background-color: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.pest-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--medium-gray);
}

.pest-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.pest-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-green);
    margin-bottom: 0.5rem;
}

.pest-solution {
    color: var(--dark-gray);
    background-color: var(--light-yellow);
    padding: 1rem;
    border-radius: 5px;
    border-left: 4px solid var(--accent-yellow);
}

/* Print Section */
.print-section {
    text-align: center;
    margin-top: 2rem;
}

/* Footer */
.footer {
    background-color: var(--dark-green);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer p:last-child {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero .container {
        flex-direction: column;
    }
    
    .hero-content h2 {
        text-align: center;
    }
    
    .selection-form {
        flex-direction: column;
    }
    
    .form-group {
        width: 100%;
    }
    
    .guide-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .guide-header h2 {
        text-align: left;
    }
    
    .crop-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .guide-summary {
        grid-template-columns: 1fr;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-item::before {
        left: -1.8rem;
    }
}

@media (max-width: 480px) {
    .crop-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
}

/* Animation Effects */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Print Styles */
@media print {
    .header, .hero, .crop-selection, .footer, .btn-secondary, .print-section {
        display: none !important;
    }
    
    .guide-display {
        display: block !important;
        padding: 0;
        background-color: white;
    }
    
    .container {
        width: 100%;
        max-width: none;
    }
    
    .guide-summary, .guide-timeline, .pest-info {
        box-shadow: none;
        margin-bottom: 1rem;
        page-break-inside: avoid;
    }
    
    .timeline-item {
        page-break-inside: avoid;
    }
}