/* ============================================
   Tienda Martinez — Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
}

.font-display {
    font-family: 'Playfair Display', Georgia, serif;
}

/* Navigation */
.nav-text {
    transition: color 0.4s ease;
}

#navbar.scrolled .nav-text {
    color: #0f1a2e;
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: #0f1a2e;
}

/* Mobile Menu */
.mobile-link {
    font-family: 'Playfair Display', Georgia, serif;
}

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

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

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

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

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

.animate-float-delayed {
    animation: float-delayed 4s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* Button Hover Effects */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Selection Color */
::selection {
    background: #B8544E;
    color: #fff;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .animate-float,
    .animate-float-delayed {
        animation: none;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #B8544E;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

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

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

/* Card hover glow */
.group:hover .group-hover\\:shadow-xl {
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

/* Gradient text support */
.text-gradient {
    background: linear-gradient(135deg, #B8544E, #d36658);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Map container fix */
iframe {
    border-radius: 0.75rem;
}

/* Ensure hero images load properly */
.aspect-\[4\/5\] img,
.aspect-\[3\/4\] img {
    will-change: transform;
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}

/* Print styles */
@media print {
    #navbar,
    .animate-float,
    .animate-float-delayed {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
