/* ========================================
   AgriLens Home Page Styles
   Styles for the homepage scanner and hero section
   ======================================== */

/* ========================================
   HERO SECTION - FULL PAGE VISIBILITY
   ======================================== */
.hero-wrapper {
    margin: 0;
    margin-bottom: 0;
    width: 100%;
    overflow-x: hidden;
}

.hero-bg {
    background: url("../images/bg1.8c193a4bbf4d.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
    width: 100%;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.min-vh-80 {
    min-height: 70vh;
}

/* Hero Text */
.hero-text-section {
    color: white;
    padding: 2rem 0;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5), 0 1px 3px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.btn-start-scan {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #166534;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.btn-start-scan:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    color: #166534;
}

/* Hero Icon */
.hero-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    backdrop-filter: blur(10px);
}

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

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-learn-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,0.7);
    transition: all 0.3s ease;
}

.btn-learn-more:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    color: white;
    transform: translateY(-3px);
}

/* Trust Badges */
.trust-badges {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.3);
    margin-top: 2rem;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.badge-item i {
    color: #fbbf24;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .trust-badges {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
}

/* ========================================
   SCANNER CARD
   ======================================== */
.scanner-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.scanner-header {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    font-size: 0.95rem;
}

.pcpb-badge {
    background: rgba(255,255,255,0.95);
    color: #166534;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pcpb-badge i {
    color: #f59e0b;
}

/* ========================================
   FORM STEPS
   ======================================== */
.scan-step {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.scan-step:last-of-type {
    border-bottom: none;
}

.step-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #166534;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.step-num {
    width: 24px;
    height: 24px;
    background: #166534;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
}

/* ========================================
   CROP SELECTION GRID
   ======================================== */
.crop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.crop-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crop-btn:hover {
    border-color: #22c55e;
    background: #f0fdf4;
}

.crop-btn.selected {
    border-color: #166534;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    box-shadow: 0 4px 12px rgba(22, 101, 52, 0.2);
}

.crop-btn.selected .crop-check {
    display: flex;
}

.crop-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

.crop-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #166534;
}

.crop-check {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: #166534;
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid white;
}

/* ========================================
   SCAN TYPE SELECTION
   ======================================== */
.scan-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.scan-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.85rem;
    color: #475569;
}

.scan-type-btn i {
    font-size: 22px;
}

.scan-type-btn[data-type="disease"] i {
    color: #dc2626;
}

.scan-type-btn[data-type="pest"] i {
    color: #ea580c;
}

.scan-type-btn:hover {
    border-color: #22c55e;
    background: #f0fdf4;
}

.scan-type-btn.active {
    border-color: #166534;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    box-shadow: 0 4px 12px rgba(22, 101, 52, 0.2);
}

/* ========================================
   PEST SELECTION GRID
   ======================================== */
.pest-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pest-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.pest-btn:hover {
    border-color: #ea580c;
    background: #fff7ed;
}

.pest-btn.selected {
    border-color: #ea580c;
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.2);
}

.pest-btn.selected .pest-check {
    display: flex;
}

.pest-icon {
    font-size: 24px;
    margin-bottom: 2px;
}

.pest-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #9a3412;
}

.pest-btn small {
    font-size: 0.65rem;
    color: #78716c;
}

.pest-check {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: #ea580c;
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid white;
}

/* ========================================
   CAPTURE BUTTONS
   ======================================== */
.capture-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.capture-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 12px;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.85rem;
    color: #64748b;
}

.capture-btn i {
    font-size: 28px;
    color: #22c55e;
}

.capture-btn:hover {
    border-color: #22c55e;
    background: #f0fdf4;
    color: #166534;
}

/* ========================================
   IMAGE PREVIEW
   ======================================== */
.preview-box {
    position: relative;
    grid-column: span 2;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid #22c55e;
    background: #f0fdf4;
}

.preview-box img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
}

.preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.preview-remove:hover {
    background: #dc2626;
}

/* ========================================
   SUBMIT BUTTON
   ======================================== */
.submit-section {
    padding: 16px 20px;
    background: #f8fafc;
}

.btn-analyze {
    width: 100%;
    background: linear-gradient(135deg, #166534 0%, #15803d 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(22, 101, 52, 0.3);
}

.btn-analyze:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(22, 101, 52, 0.4);
}

.btn-analyze:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-loading .spinner-border {
    width: 1.25rem;
    height: 1.25rem;
}

/* ========================================
   FEATURES SECTION
   ======================================== */
.features-row {
    background: white;
    margin: 0;
    padding: 2.5rem 0;
    border-top: 1px solid #e2e8f0;
}

.feature-box {
    text-align: center;
    padding: 1.5rem;
}

.feature-box .feature-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.feature-box .feature-icon img {
    max-width: 100%;
    height: auto;
}

.feature-box h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #166534;
    margin-bottom: 0.5rem;
}

.feature-box p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 991px) {
    .hero-bg {
        min-height: auto;
        padding: 1.5rem 0;
    }
    
    .min-vh-80 {
        min-height: auto;
    }
    
    .hero-text-section {
        text-align: center;
        padding: 1.5rem 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.88rem;
    }
    
    .btn-start-scan {
        padding: 10px 22px;
        font-size: 0.85rem;
    }
    
    .scanner-card {
        margin-top: 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .crop-icon {
        font-size: 24px;
    }
    
    .crop-name {
        font-size: 0.7rem;
    }
    
    .capture-btn {
        padding: 12px 8px;
        font-size: 0.8rem;
    }
    
    .feature-box {
        padding: 1.25rem;
    }
    
    .feature-box .feature-icon {
        font-size: 2rem;
    }
}
