/* Custom styles for Mariano Jewelry Palace */

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

/* Hero animations */
@keyframes slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-in {
    animation: fade-in 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .animate-slide-up,
    .animate-fade-in {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    img,
    .group:hover img {
        transform: none;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

/* Menu line animations */
#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: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

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

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

::-webkit-scrollbar-thumb {
    background: #d4a853;
    border-radius: 4px;
}

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

/* Selection color */
::selection {
    background: #C4775B;
    color: white;
}

/* Image placeholder styling */
img {
    max-width: 100%;
    height: auto;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(196, 119, 91, 0.2);
}

/* Hover underline animation for links */
.nav-link {
    position: relative;
}

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

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

/* Mobile menu link hover */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #C4775B;
    transition: width 0.3s ease;
}

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

/* Tablet adjustments */
@media (max-width: 768px) {
    .font-serif.text-5xl,
    .font-serif.text-6xl {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .font-serif.text-4xl {
        font-size: 2rem;
    }
}
