/* IndoorLeafyGuide - Custom Styles */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom selection color */
::selection {
    background-color: rgba(22, 163, 74, 0.3);
    color: inherit;
}

/* Navigation scroll effect */
#main-nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#main-nav.scrolled .absolute {
    transform: skewY(0) !important;
}

/* Plant card hover effects */
.plant-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.plant-card:hover {
    transform: translateY(-8px);
}

/* Troubleshooting accordion animation */
.trouble-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.3s ease;
}

.trouble-content.active {
    max-height: 800px;
}

.trouble-toggle span:last-child {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.trouble-toggle.active span:last-child {
    transform: rotate(45deg);
}

/* FAQ card hover */
.bg-white.p-6.rounded-2xl {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bg-white.p-6.rounded-2xl:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Hero text animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text {
    animation: fadeInUp 0.8s ease-out;
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Pulse animation for stats */
@keyframes pulse-soft {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Form input focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

/* Button hover effects */
button,
a[href] {
    transition: all 0.3s ease;
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease;
    transform-origin: top;
}

#mobile-menu.hidden {
    opacity: 0;
    transform: scaleY(0);
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    transform: scaleY(1);
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card shine effect on hover */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.shine-effect:hover::before {
    left: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-7xl {
        font-size: 3.5rem;
    }
    
    section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    
    /* Contact page mobile optimizations */
    .gap-16 {
        gap: 2rem;
    }
}

/* Smooth reveal animation for sections */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Page transition overlay */
.page-transition {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    z-index: 9999;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.5s cubic-bezier(0.86, 0, 0.07, 1);
}

.page-transition.active {
    transform: scaleY(1);
    transform-origin: top;
}

/* Print styles */
@media print {
    nav,
    footer,
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* 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;
    }
    
    html {
        scroll-behavior: auto;
    }
}
