/* BalconyVegGrow - Custom Styles */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom selection color */
::selection {
    background-color: rgba(74, 124, 89, 0.3);
    color: #1a1a1a;
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #4a7c59;
    outline-offset: 2px;
}

/* Smooth transitions for interactive elements */
a,
button {
    transition: all 0.3s ease;
}

/* Card hover effects */
.veg-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.veg-card:hover {
    transform: translateY(-4px);
}

/* Troubleshooting accordion animation */
.trouble-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.trouble-content.show {
    max-height: 1000px;
}

.trouble-icon.rotated {
    transform: rotate(45deg);
}

/* FAQ accordion animation */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-content.show {
    max-height: 500px;
}

.faq-icon.rotated {
    transform: rotate(45deg);
}

/* Tab active state */
.veg-tab.active {
    background-color: #4a7c59;
    color: white;
}

/* Vegetable card filtering animation */
.veg-card {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.veg-card.hidden {
    display: none;
}

/* Newsletter form styles */
#newsletterForm input:focus {
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.3);
}

/* Contact form styles */
#contactForm input:focus,
#contactForm select:focus,
#contactForm textarea:focus {
    border-color: #4a7c59;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

/* Gradient text effect for special headings */
.gradient-text {
    background: linear-gradient(135deg, #4a7c59 0%, #9caf88 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom list styles */
.custom-list li::before {
    content: "•";
    color: #4a7c59;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Adjust card stagger on mobile */
    .grid > div[class*="translate-y"] {
        transform: translateY(0) !important;
    }
    
    /* Better spacing on mobile */
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Loading animation for form submission */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Seasonal card hover enhancement */
.group:hover .absolute {
    opacity: 1;
}

/* Navigation link underline effect */
nav a {
    position: relative;
}

nav a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #d4c4b0;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Hide scrollbar for horizontal scroll areas if needed */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Print styles */
@media print {
    nav,
    footer,
    #newsletterForm,
    #contactForm,
    .trouble-item button,
    .faq-toggle {
        display: none !important;
    }
    
    .trouble-content,
    .faq-content {
        display: block !important;
        max-height: none !important;
    }
    
    body {
        background: white !important;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* Accessibility: Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .veg-card,
    .trouble-item,
    .bg-white {
        border: 2px solid #333;
    }
    
    a {
        text-decoration: underline;
    }
}
