/* ============================================
   Albergue La Xana — Custom Styles
   ============================================ */

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

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

/* Selection */
::selection {
    background-color: rgba(45, 70, 24, 0.2);
    color: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf9f4;
}
::-webkit-scrollbar-thumb {
    background: #b8d09a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8fb566;
}

/* ============================================
   Header
   ============================================ */
#main-header {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#main-header.scrolled {
    background: rgba(250, 249, 244, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(45, 70, 24, 0.08);
}

#main-header.scrolled .nav-link {
    color: #2d4618;
}

#main-header.scrolled .nav-link:hover {
    color: #4a7228;
}

#main-header.scrolled a[href="#contacto"]:not(.nav-link) {
    background: #2d4618;
}

#main-header.scrolled a[href="#contacto"]:not(.nav-link):hover {
    background: #1a2a0e;
}

/* ============================================
   Navigation links
   ============================================ */
.nav-link {
    position: relative;
}

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

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

/* ============================================
   Mobile menu
   ============================================ */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu .mobile-link {
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

/* Hamburger animation */
#menu-btn.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-btn.active #bar2 {
    opacity: 0;
}
#menu-btn.active #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 50%;
}

/* ============================================
   Reveal animations
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ============================================
   Form inputs
   ============================================ */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.4) sepia(1) saturate(3) hue-rotate(90deg);
    cursor: pointer;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234a7228' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ============================================
   Date input focus
   ============================================ */
input:focus, textarea:focus, select:focus {
    border-color: #4a7228 !important;
}

/* ============================================
   Responsive tweaks
   ============================================ */
@media (max-width: 640px) {
    .font-serif {
        word-spacing: 0.02em;
    }
}
