/* Valvix application pages */

body {
    font-family: 'Inter', sans-serif;
}

/* Form */
.form-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.07);
}

.form-input {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    transition: border 0.2s;
    font-family: 'Inter', sans-serif;
}

.form-input:focus {
    border-color: #a3e635;
}

.form-input.is-invalid {
    border-color: #ef4444;
}

.form-input.is-invalid:focus {
    border-color: #ef4444;
}

.form-error {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
    color: #dc2626;
}

.form-select {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    background: #fff;
    font-family: 'Inter', sans-serif;
    appearance: none;
}

.form-select:focus {
    border-color: #a3e635;
}

.btn-submit {
    width: 100%;
    background: #a3e635;
    color: #000;
    font-weight: 700;
    font-size: 15px;
    border: none;
    border-radius: 10px;
    padding: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: #84cc16;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-submit-error {
    margin-top: 12px;
    text-align: center;
}

.toast {
    display: none;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    color: #15803d;
    margin-top: 12px;
}

/* Sidebar layout */
#applications-sidebar {
    align-self: stretch;
}

.applications-sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 6rem;
}

/* Testimonial slider (sidebar) */
.testi-slider {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.testi-slide {
    display: none;
    animation: fadeSlide 0.5s ease;
}

.testi-slide.active {
    display: block;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.testi-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
}

.testi-dot.active {
    background: #a3e635;
}

.testi-slide-img {
    width: 80px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.testi-slide-body {
    background: #f9fafb;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-left: -16px;
    margin-top: 12px;
    flex: 1;
}

/* Stats */
.stat-card {
    background: #f7fee7;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
}

/* Testimonials (main content) */
.testimonial-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
}

.testi-avatar {
    width: 120px;
    height: 140px;
    object-fit: cover;
    border-radius: 16px;
    flex-shrink: 0;
}

.testi-body {
    background: #f9fafb;
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    margin-left: -24px;
    margin-top: 16px;
    position: relative;
    flex: 1;
}

/* Related cards */
.related-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    display: block;
}

.related-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* How it works steps */
.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #a3e635;
    color: #000;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Image grid */
.img-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.img-grid img {
    border-radius: 12px;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.img-grid .img-wide {
    grid-column: span 2;
    height: 260px;
}

/* Video */
.video-thumb {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: #111827;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(163, 230, 53, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform 0.2s, background 0.2s;
}

.video-play-btn:hover {
    transform: scale(1.08);
    background: #a3e635;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}

/* Stars */
.stars {
    color: #facc15;
    letter-spacing: 2px;
}

/* FAQ accordion */
.faq-item {
    border-bottom: 1px solid #e5e7eb;
}

.faq-q {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 1rem 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Inter', sans-serif;
}

.faq-a {
    display: none;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.7;
    padding-bottom: 1rem;
}

.faq-item.open .faq-a {
    display: block;
}

.faq-icon {
    transition: transform 0.2s;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

/* Page layout */
.applications-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

/* Growers testimonials & demo video — hidden sitewide */
.testi-slider,
.mb-12:has(.testimonial-card),
.mb-12:has(.video-thumb) {
    display: none !important;
}

/* ===== Floating contact popup ===== */

.popup-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 900;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #a3e635;
    color: #000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.popup-fab:hover {
    background: #84cc16;
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.25);
}

.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 901;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 28px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.popup-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.popup-modal {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.18);
    transform: translateY(24px);
    transition: transform 0.25s;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
}

.popup-overlay.is-open .popup-modal {
    transform: translateY(0);
}

.popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.popup-close:hover {
    color: #111;
    background: #f3f4f6;
}

@media (max-width: 480px) {
    .popup-overlay {
        padding: 0;
        align-items: flex-end;
        justify-content: center;
    }

    .popup-modal {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        max-width: 100%;
    }
}
