/* Custom Styles for 2 Sweets Donut Shop and Bakery */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Float Animation for Hero Card */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Mobile Menu Transitions */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobileMenu.open {
    max-height: 400px;
}

/* Menu Lines Animation */
.menu-line {
    transition: all 0.3s ease-in-out;
}

#mobileMenuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobileMenuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobileMenuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Form Focus States */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

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

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

::-webkit-scrollbar-thumb {
    background: #FF6B6B;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF5252;
}

/* Selection Color */
::selection {
    background: #FF6B6B;
    color: #FFF8F0;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .animate-float {
        animation: none;
    }
    
    .group-hover\:scale-110:hover,
    .group:hover .group-hover\:scale-110 {
        transform: none;
    }
}

/* High Contrast Mode Support */
@media (forced-colors: active) {
    .bg-coral-500 {
        background-color: ButtonFace;
    }
    
    .text-coral-600 {
        color: ButtonText;
    }
}

/* Print Styles */
@media print {
    nav,
    #contact,
    .animate-bounce {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.1;
    }
    
    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Tablet Optimizations */
@media (min-width: 641px) and (max-width: 1023px) {
    .grid-cols-2 {
        gap: 1.5rem;
    }
}

/* Large Screen Optimizations */
@media (min-width: 1280px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .group:hover .group-hover\:scale-110 {
        transform: none;
    }
    
    a:hover {
        opacity: 0.8;
    }
}
