/* ============================================
   El Bolillazo — Custom Styles
   ============================================ */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* Navbar */
#navbar {
    background: rgba(255, 255, 255, 0);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 20px rgba(26, 39, 68, 0.08);
    backdrop-filter: blur(10px);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile Menu */
#mobile-menu {
    transition: opacity 0.35s ease, transform 0.35s ease, pointer-events 0.35s ease;
}

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

#mobile-menu.closed {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 5rem;
}

/* Menu Tabs */
.menu-tab {
    background: transparent;
    border: 2px solid #dce3f0;
    color: #2d3d5c;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-tab:hover {
    border-color: #d4a84b;
    color: #d4a84b;
}

.menu-tab.active {
    background: #1a2744;
    border-color: #1a2744;
    color: #d4a84b;
}

.menu-tab:focus-visible {
    outline: 2px solid #d4a84b;
    outline-offset: 2px;
}

/* Scroll Reveal */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
    }

    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
    }

    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
    }

    .reveal-up.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: none;
    }
}

/* Hover effects for gallery images */
.grid img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.grid img:hover {
    transform: scale(1.05);
}

/* Smooth section transitions */
section {
    position: relative;
}

/* Selection color */
::selection {
    background: #d4a84b;
    color: #1a2744;
}

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

/* Image placeholder fallback */
img {
    background: linear-gradient(135deg, #f0f3f9 0%, #dce3f0 100%);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8fa5cc;
}

/* Mobile nav link animation */
.mobile-nav-link {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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