/* Foundations */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    width: 100%; overflow-x: hidden;
    background: linear-gradient(180deg, #0d0d1a 0%, #1a0f2e 50%, #0d1a0d 100%);
    background-attachment: fixed;
    font-family: 'Onest', sans-serif;
}
img { max-width: 100%; height: auto; }
header { width: 100%; max-width: 100vw; }
#logo { max-width: 3.5rem; height: auto; transition: transform 0.3s; }
.social-icons { display: flex; align-items: center; gap: 1.2rem; }
.social-icons img { max-width: 1.6rem; height: auto; transition: all 0.3s ease; }

/* Desktop-submenu & menu-item no longer used - direct links now */

/* ============ DESKTOP ============ */
@media (min-width: 769px) {
    nav {
        width: 100%; display: flex; justify-content: center;
        flex-wrap: nowrap; gap: 0.5rem;
        overflow-x: auto; scrollbar-width: none;
    }
    nav a {
        font-size: 0.75rem; font-weight: 700;
        padding: 0.2rem 0.8rem; border-radius: 50px;
        text-transform: uppercase; letter-spacing: 0.5px;
        white-space: nowrap; text-decoration: none;
        flex-direction: row !important;
    }
    .nv { font-size: 0.75rem; font-weight: 700; opacity: 1; text-transform: uppercase; letter-spacing: 0.5px; }
    nav a::before { display: none !important; }
    
    /* Desktop submenu - handled by JS */
}

/* ============ MOBILE ============ */
@media (max-width: 768px) {
    body { padding-top: 56px; padding-bottom: 68px; }
    header { padding: 0.5rem 4% !important; flex-direction: row; justify-content: space-between; align-items: center; height: auto !important; }
    #logo { max-width: 2.8rem !important; }
    .social-icons { display: none !important; }

    nav {
        position: fixed !important; bottom: 0 !important; top: auto !important;
        left: 0 !important; width: 100% !important; height: auto !important;
        display: flex !important; flex-direction: row !important;
        flex-wrap: nowrap !important; overflow-x: auto !important;
        justify-content: space-around !important; align-items: center !important;
        padding: 0.4rem 1% !important; gap: 0 !important;
        z-index: 1001 !important;
        background: rgba(255,255,255,0.97) !important;
        backdrop-filter: blur(12px);
        border-top: 1px solid rgba(212,136,6,0.3);
        border-bottom: none !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
    }

    nav a {
        flex-shrink: 0; margin: 0 !important;
        font-size: 0.55rem !important; font-weight: 600;
        color: rgba(0,0,0,0.6) !important;
        padding: 0.45rem 0.35rem !important;
        white-space: nowrap; border-radius: 8px;
        background: transparent; letter-spacing: 0;
        text-transform: none; text-decoration: none;
        display: flex !important; flex-direction: column !important;
        align-items: center !important; gap: 1px !important;
        min-width: 36px; text-align: center; line-height: 1.1;
    }
    nav a:active, nav a:focus { color: #d48806 !important; background: rgba(212,136,6,0.12) !important; }
    .nv { font-size: 0.5rem; font-weight: 400; opacity: 0.7; }

    /* Mobile icons via CSS ::before */
    nav a::before { display: block; font-size: 1rem; line-height: 1; margin-bottom: 1px; }
    nav a[href*="index"]::before, nav a[href*="#inicio"]::before { content: '\2302'; }
    nav a[href*="Acerca"]::before { content: '\24D8'; }
    nav a[href*="eventos"]::before { content: '\25F7'; }
    nav a[href*="Contacto"]::before { content: '\2706'; }
    nav a[href*="Invitaciones"]::before { content: '\2726'; }
    nav a[href*="Coleccion"]::before { content: '\229E'; }
    nav a[href*=recorridos]::before { content: '\21BB'; }
    .menu-item > a::before { content: '\2756'; }

    /* Submenu handled by JS */

    footer { padding: 2rem 5% !important; margin-bottom: 56px; }
    h1 { font-size: 2rem !important; } h2 { font-size: 1.6rem !important; } h3 { font-size: 1.1rem !important; } p { font-size: 0.9rem !important; }
    .gallery,.obras-grid,.events-grid,.services-grid { grid-template-columns: 1fr !important; padding: 1rem 3% !important; gap: 1rem !important; width: 100% !important; }
    .exhibition-item { flex-direction: column !important; margin: -0.5rem 0 !important; }
    .exhibition-image { height: 200px !important; } .exhibition-content { padding: 1.5rem !important; }
    .exhibition-title { font-size: 1.2rem !important; }
    .hero { min-height: 50vh !important; } .hero-title { font-size: 2.5rem !important; }
    .section { padding: 3rem 4% !important; } .info-section { grid-template-columns: 1fr !important; }
    .stats-strip { grid-template-columns: repeat(2,1fr) !important; gap: 0.8rem !important; }
    .invitation-card { width: 200px !important; } .event-image { height: 250px !important; }
    .lb-nav { width: 36px !important; height: 36px !important; font-size: 1.5rem !important; }
    .lb-prev { left: 0.5rem !important; } .lb-next { right: 0.5rem !important; } .lb-close { top: 1rem !important; right: 1rem !important; }
}
