/* Landing Page Custom CSS */

/* Base styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

/* Floating particles animation */
.floating-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(59, 160, 217, 0.3);
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Fade in up animation */
.animate-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Slide animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Category tabs */
.category-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.3s;
    transform: scale(1);
    background: rgba(255, 255, 255, 0.05);
    color: rgb(209, 213, 219);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .category-tab {
        gap: 0.75rem;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

.category-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #55DBDB;
    transform: scale(1.05);
}

.category-tab.active {
    background: linear-gradient(to right, #3BA0D9, #2180B3);
    color: white;
    box-shadow: 0 10px 25px -5px rgba(59, 160, 217, 0.3);
}

/* Recipe cards */
.recipe-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.recipe-card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Feature cards */
.feature-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.5s;
}

@media (min-width: 768px) {
    .feature-card {
        padding: 2rem;
    }
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(59, 160, 217, 0.3);
    transform: scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
}

@media (min-width: 640px) {
    .feature-icon {
        width: 3.5rem;
        height: 3.5rem;
        margin-bottom: 1.25rem;
    }
}

@media (min-width: 768px) {
    .feature-icon {
        width: 4rem;
        height: 4rem;
        margin-bottom: 1.5rem;
    }
}

.feature-icon i {
    width: 1.5rem;
    height: 1.5rem;
}

@media (min-width: 768px) {
    .feature-icon i {
        width: 2rem;
        height: 2rem;
    }
}

/* Pricing cards */
.pricing-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 1.75rem;
    text-align: center;
    position: relative;
    transition: all 0.3s;
}

@media (min-width: 640px) {
    .pricing-card {
        padding: 2rem;
    }
}

@media (min-width: 768px) {
    .pricing-card {
        padding: 2.5rem;
    }
}

.pricing-card:hover {
    border-color: #3BA0D9;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

.pricing-card.featured {
    border-color: #3BA0D9;
    transform: scale(1.05);
    box-shadow: 0 20px 60px rgba(59, 160, 217, 0.15);
}

/* Glassmorphism effects */
.backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Enhanced hover effects */
.hover\:scale-105:hover {
    transform: scale(1.05);
}

.hover\:scale-110:hover {
    transform: scale(1.1);
}

/* Enhanced shadows */
.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hover\:shadow-2xl:hover {
    box-shadow: 0 25px 50px -12px rgba(59, 160, 217, 0.2);
}

/* Gradient text */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Search input styling */
#hero-search {
    transition: all 0.3s ease;
}

#hero-search:focus {
    box-shadow: 0 0 0 3px rgba(59, 160, 217, 0.1);
}

/* Button animations */
button {
    position: relative;
    overflow: hidden;
}

button::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;
}

button:hover::before {
    left: 100%;
}

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

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 160, 217, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 160, 217, 0.7);
}

/* Performance optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.transform {
    transform: translateZ(0);
    will-change: transform;
}

/* Loading states */
.loading {
    opacity: 0;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Focus states for accessibility */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #3BA0D9;
    outline-offset: 2px;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .text-5xl {
        font-size: 2.5rem;
    }

    .text-7xl {
        font-size: 3.5rem;
    }

    .text-8xl {
        font-size: 4rem;
    }

    .pricing-card.featured {
        transform: none;
    }

    #hero-search {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    /* Fix text wrapping on mobile for hero sections */
    .content-slide h1 span {
        display: inline-block;
        white-space: normal !important;
        line-height: 1.2;
    }

    /* Ensure proper spacing for wrapped text */
    .content-slide h1 {
        line-height: 1.15;
    }

    /* Adjust font sizes for better mobile readability */
    .text-3xl {
        font-size: 1.875rem;
        line-height: 1.2;
    }

    /* Fix stats section spacing */
    .flex.items-center.gap-2 {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Ensure gradient text is readable on mobile */
    .bg-clip-text {
        -webkit-text-fill-color: transparent;
        background-clip: text;
        -webkit-background-clip: text;
    }
}

/* Pulse animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Testimonial dots */
.testimonial-dot {
    cursor: pointer;
    transition: all 0.3s;
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

#mobile-menu.hidden {
    display: none;
}

/* Slide transition for background images */
.slide {
    transition: opacity 1s ease-in-out;
}

/* Content slider styles */
.content-slider {
    position: relative;
    min-height: 500px;
    width: 100%;
}

@media (min-width: 768px) {
    .content-slider {
        min-height: 600px;
    }
}

.content-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-in-out, transform 0.5s ease-in-out;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

/* Ensure active slide is interactive */
.content-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

/* Add entrance animation for active slides */
.content-slide.active .animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Ensure buttons in slides are always clickable when visible */
.content-slide button {
    pointer-events: auto;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.content-slide button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 160, 217, 0.3);
}

/* Slide dots animation */
.slide-dot {
    transition: all 0.3s ease;
    cursor: pointer;
}

.slide-dot:hover {
    transform: scale(1.2);
}

/* Navigation arrow styles */
@media (max-width: 640px) {
    .content-slider {
        min-height: 450px;
    }
    
    /* Hide navigation arrows on very small screens */
    .absolute.left-4.right-4 {
        display: none;
    }
}

/* Medium phone breakpoint (641px-767px) - Fills gap between small phones and tablets */
@media (min-width: 641px) and (max-width: 767px) {
    .content-slider {
        min-height: 525px; /* Between 450px (small) and 600px (tablet) */
    }

    .content-slide h1 {
        font-size: 2.25rem; /* Between small and tablet sizes */
        line-height: 1.15;
    }

    .content-slide p {
        font-size: 1rem; /* Appropriate for medium phones */
        line-height: 1.5;
    }

    /* Ensure proper button sizing */
    .content-slide button {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }

    /* Adjust text sizes for better medium phone readability */
    .text-3xl {
        font-size: 2rem;
        line-height: 1.2;
    }

    .text-4xl {
        font-size: 2.25rem;
        line-height: 1.15;
    }
}

/* Comprehensive Mobile Carousel Fixes for S/M/L screens */
@media (max-width: 767px) {
    /* Consistent text layout and spacing for all carousel slides */
    .content-slide h1 {
        font-size: 2rem !important; /* Consistent across all mobile sizes */
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
        padding: 0 1rem;
        text-align: center;
    }

    .content-slide p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1.5rem !important;
        padding: 0 1.5rem;
        text-align: center;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    /* Improve button positioning and touch targets */
    .content-slide button {
        padding: 1rem 2rem !important;
        font-size: 1rem !important;
        min-height: 48px; /* Better touch target */
        min-width: 200px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 2rem;
    }

    /* Fix container spacing and overflow */
    .content-slider {
        min-height: 500px !important;
        padding: 2rem 1rem;
    }

    .content-slide {
        padding: 2rem 0.5rem 1rem 0.5rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    /* Ensure proper spacing between elements */
    .content-slide .animate-fade-in-up {
        margin-bottom: 1rem;
    }

    .content-slide .animate-fade-in-up:last-child {
        margin-bottom: 0;
    }
}

/* Extra small mobile phones (320px-374px) */
@media (max-width: 374px) {
    .content-slide h1 {
        font-size: 1.75rem !important;
        padding: 0 0.75rem;
    }

    .content-slide p {
        font-size: 0.9rem !important;
        padding: 0 1rem;
    }

    .content-slide button {
        font-size: 0.95rem !important;
        padding: 0.9rem 1.5rem !important;
        min-width: 180px;
    }

    .content-slider {
        min-height: 480px !important;
    }
}

/* Small mobile phones (375px-413px) */
@media (min-width: 375px) and (max-width: 413px) {
    .content-slide h1 {
        font-size: 1.9rem !important;
    }

    .content-slide p {
        font-size: 0.95rem !important;
        max-width: 85%;
    }
}

/* Large mobile phones (414px-767px) */
@media (min-width: 414px) and (max-width: 767px) {
    .content-slide h1 {
        font-size: 2.1rem !important;
    }

    .content-slide p {
        font-size: 1rem !important;
        max-width: 80%;
    }

    .content-slide button {
        font-size: 1.05rem !important;
        min-width: 220px;
    }

    .content-slider {
        min-height: 520px !important;
    }
}

/* Enhance text shadows for better readability */
.content-slide h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

.content-slide h1 div {
    display: block;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.content-slide h1 div:last-child {
    margin-bottom: 0;
}

.content-slide p {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Parallax effect enhancement */
@media (prefers-reduced-motion: no-preference) {
    .parallax {
        will-change: transform;
    }
}

/* Print styles */
@media print {
    * {
        background: white !important;
        color: black !important;
    }
    
    nav, footer, .hero, #mobile-menu {
        display: none !important;
    }
}