/* Custom Styles for Nieves Mi Ranchito 2 */

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

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

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

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

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

/* Selection Color */
::selection {
    background: #d63d68;
    color: #ffffff;
}

/* Reveal Animation - Progressive Enhancement */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    
    .reveal-on-scroll.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Image Parallax */
#hero-image {
    will-change: transform;
}

/* Navigation Transition */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(130, 21, 53, 0.1);
}

#navbar.scrolled a,
#navbar.scrolled .logo-text {
    color: #6e1631;
}

/* Mobile Menu Transitions */
#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
    transform: translateX(0);
}

/* Image Hover Effects */
img {
    will-change: transform;
}

/* Smooth Image Loading */
img {
    transition: opacity 0.3s ease-in-out;
}

img[data-src] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav,
    #gallery,
    #visit iframe {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* Tablet Adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .text-plum-800\/70 {
        color: #6e1631;
    }
    
    .text-white\/80 {
        color: #ffffff;
    }
}

/* Landscape Mode on Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    #home {
        height: 100vh;
    }
    
    .pt-20 {
        padding-top: 1rem;
    }
}
