/**
 * Custom Styles — Handmade Crafts Website
 * Version: 1.0.0
 */

/* ========================================
   Smooth Scrolling
   ======================================== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* ========================================
   Animations
   ======================================== */

/* Fade in from below */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade in from left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade in from right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale in */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Float animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(2deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

@keyframes floatDelayed {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(10px) rotate(-2deg); }
    66% { transform: translateY(-15px) rotate(1deg); }
}

/* Slow bounce */
@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* WhatsApp pulse */
@keyframes whatsappPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ========================================
   Animation Classes
   ======================================== */
.animate-float {
    animation: float 8s ease-in-out infinite;
}

.animate-float-delayed {
    animation: floatDelayed 10s ease-in-out infinite;
}

.animate-bounce-slow {
    animation: bounceSlow 2.5s ease-in-out infinite;
}

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }

/* ========================================
   WhatsApp Floating Button
   ======================================== */
.whatsapp-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: whatsappPulse 2s infinite;
}

/* ========================================
   Navbar States
   ======================================== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* ========================================
   Gallery Masonry Fine-tuning
   ======================================== */
.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
}

/* ========================================
   Lightbox
   ======================================== */
#lightbox.active {
    display: flex;
    opacity: 1;
}

#lightbox img {
    animation: scaleIn 0.3s ease-out;
}

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

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

::-webkit-scrollbar-thumb {
    background: #d4a5a5;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9b6b6b;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #d4a5a5 #f5f0ed;
}

/* ========================================
   Selection Color
   ======================================== */
::selection {
    background: rgba(212, 165, 165, 0.3);
    color: #3d3d3d;
}

/* ========================================
   Mobile Menu Animation
   ======================================== */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

#mobile-menu.open {
    display: block;
    max-height: 500px;
    opacity: 1;
}

/* ========================================
   Reviews Carousel
   ======================================== */
#reviews-container {
    overflow: hidden;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    #navbar,
    #whatsapp-float,
    #back-to-top,
    #lightbox {
        display: none !important;
    }
}
