/* ===== Custom Styles for Coats Nutrition ===== */

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Navigation ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(254, 252, 246, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(128, 0, 32, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #dc4462;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu */
.menu-line {
    transition: all 0.3s ease;
}

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

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

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

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* ===== Hero Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

.hero-shape {
    transition: transform 0.6s ease;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .hero-shape {
        transition: none;
        animation: none;
    }
    
    .animate-float {
        animation: none;
    }
}

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

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

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

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

/* ===== Selection ===== */
::selection {
    background: #fce7eb;
    color: #800020;
}

/* ===== Button Focus Styles ===== */
a:focus-visible, button:focus-visible {
    outline: 3px solid #dc4462;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Image Loading ===== */
img {
    background-color: #fce7eb;
}

/* ===== Active Nav Indicator ===== */
.nav-link.active {
    color: #800020;
}

.nav-link.active::after {
    width: 100%;
}

/* ===== Product Card Hover ===== */
.group:hover .group-hover\:rotate-12 {
    transform: rotate(12deg);
}

.group:hover .group-hover\:rotate-45 {
    transform: rotate(45deg);
}

.group:hover .group-hover\:rotate-12,
.group:hover .group-hover\:-rotate-12 {
    transition: transform 0.5s ease;
}

/* ===== Map Container ===== */
iframe {
    filter: saturate(0.8) contrast(1.05);
    transition: filter 0.3s ease;
}

iframe:hover {
    filter: saturate(1) contrast(1);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-shape {
        display: none;
    }
    
    .hero-shape.shape-1,
    .hero-shape.shape-2 {
        display: block;
        opacity: 0.3;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2rem;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}
