/* LeafyCarePro - Custom Styles */

/* Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate-fade-in {
    animation: fade-in 0.8s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background-color: #86efac;
    color: #14532d;
}

/* Navigation background on scroll */
.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Card hover effects */
.guide-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.guide-card:hover {
    transform: translateY(-8px);
}

/* Stat counter animation */
.stat-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.stat-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tip accordion */
.tip-accordion .tip-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.3s ease-out;
}

.tip-accordion.active .tip-content {
    max-height: 2000px;
}

.tip-accordion.active .tip-icon {
    transform: rotate(180deg);
}

/* Quiz styles */
.quiz-option {
    transition: all 0.3s ease;
}

.quiz-option:hover {
    transform: translateX(8px);
}

.quiz-option.selected {
    border-color: #4ade80;
    background-color: rgba(74, 222, 128, 0.2);
}

/* Plant mini cards */
.plant-mini-card {
    transition: all 0.3s ease;
}

.plant-mini-card:hover {
    transform: translateY(-4px);
}

/* Page transition overlay */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #166534;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition.active {
    transform: translateY(0);
}

/* Form styles */
.form-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #dcfce7;
    border-radius: 1rem;
    background-color: white;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.form-input::placeholder {
    color: #86efac;
}

textarea.form-input {
    resize: vertical;
    min-height: 150px;
}

/* Button styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background-color: #15803d;
    color: white;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #166534;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(21, 128, 61, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background-color: transparent;
    color: #15803d;
    border: 2px solid #15803d;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #15803d;
    color: white;
}

/* Prose styling for content pages */
.prose h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #14532d;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #166534;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose p {
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

.prose ul, .prose ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

.prose ul li {
    list-style-type: disc;
}

.prose ol li {
    list-style-type: decimal;
}

.prose a {
    color: #16a34a;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose a:hover {
    color: #15803d;
}

/* Hero pattern background */
.hero-pattern {
    background-image: radial-gradient(circle at 25px 25px, #dcfce7 2px, transparent 0);
    background-size: 50px 50px;
}

/* Diagonal section */
.diagonal-top {
    clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%);
}

.diagonal-bottom {
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0fdf4 25%, #dcfce7 50%, #f0fdf4 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background-color: #166534;
    color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
}

.toast.show {
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .guide-card {
        margin-top: 0 !important;
    }
    
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-7xl {
        font-size: 3rem;
    }
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Reduced motion */
@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;
    }
}
