/* Custom CSS for Edible Gardens Website */
/* Minimal additional styles to complement Tailwind CSS */

/* Custom animations and utilities not covered by Tailwind */

/* Fade-in animation for scroll-triggered elements */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

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

/* Smooth scroll behavior for the entire page */
html {
    scroll-behavior: smooth;
}

/* Focus styles for better accessibility (enhancing Tailwind's focus styles) */
.focus-enhanced:focus {
    outline: 2px solid #22C55E;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

/* Custom gradient overlay for hero section */
.hero-gradient {
    background: linear-gradient(135deg, #F8FAFC 0%, rgba(255, 255, 255, 0.9) 100%);
}

/* Service card hover effects enhancement */
.service-card:hover {
    transform: translateY(-4px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gallery item overlay effects */
.gallery-item .overlay {
    background: linear-gradient(45deg, rgba(30, 58, 138, 0.8), rgba(34, 197, 94, 0.6));
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F8FAFC;
}

::-webkit-scrollbar-thumb {
    background: #22C55E;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #16A34A;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #000000;
    }
    
    .bg-gray-50 {
        background-color: #FFFFFF;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000000;
        background: #FFFFFF;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666666;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}

/* Screen reader only content - enhanced version */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background-color: #22C55E;
    color: white;
    border-radius: 0.5rem;
    z-index: 9999;
}

/* Focus trap for modal dialogs (if implemented) */
.focus-trap {
    position: relative;
}

.focus-trap:focus {
    outline: none;
}

/* Custom font weights for Montserrat */
.font-weight-800 {
    font-weight: 800 !important;
}

/* Force green color for active navigation links */
.nav-link.text-accent,
.mobile-nav-link.text-accent {
    color: #22C55E !important;
}

/* Custom button animations */
.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:before,
.btn-secondary:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn-primary:hover:before,
.btn-secondary:hover:before {
    width: 300px;
    height: 300px;
}

/* Loading animation for forms */
.loading {
    position: relative;
}

.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #22C55E;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile-specific optimizations */
@media (max-width: 768px) {
    /* Ensure tap targets are at least 44px */
    button,
    a,
    input,
    textarea,
    select {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Improve text readability on mobile */
    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
    /* Currently not implemented but structure is ready */
}

/* Additional utility classes */
.aspect-ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.aspect-ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.aspect-ratio-1-1 {
    aspect-ratio: 1 / 1;
}

/* Text selection styling */
::selection {
    background-color: rgba(34, 197, 94, 0.2);
    color: #0F172A;
}

::-moz-selection {
    background-color: rgba(34, 197, 94, 0.2);
    color: #0F172A;
}

/* Image lazy loading placeholder */
.lazy-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}