/* --- 1. RESET Y BASES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Ruta corregida para CI4: sube un nivel (css) y entra a img */
    background-image: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), 
                      url('../img/imgcarrusel1.png') !important;
    background-attachment: fixed !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #000 !important;
    padding-top: 118px;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
}

.site-header .proyecto {
    color: #fff;
    font-family: 'Cinzel Decorative', serif;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    background-color: rgb(0, 140, 255);
    padding: 4px 8px;
}

.site-header .proyecto img {
    height: 100px;
    width: auto;
    margin-left: 6px;
    vertical-align: middle;
}

/* --- HEADER DESKTOP --- */
.header-bg {
    background: #000 url('../img/U.png') repeat; /* OJO: Verifica si la U es mayúscula en el servidor */
    background-size: auto 98%;
    height: 118px;
    padding: 10px 0;
    display: block;
}

.header-inner {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo {
    position: absolute;
    left: 0;
    pointer-events: none;
}

.logo img {
    height: 145px;
    filter: drop-shadow(0 6px 10px rgba(230, 138, 2, 0.6));
}

/* --- NAVEGACIÓN --- */
.nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    padding: 8px 6px;
    transition: all 0.3s ease;
}

.nav-links a:hover { color: #AE8E1C; }

.nav-links a.active {
    font-weight: 600;
    padding: 3px 14px;
    border-radius: 6px;
    z-index: 1;
}

.nav-links a.active::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background-image: url("../img/decoraciont.png");
    background-repeat: repeat-x;
    background-size: auto 100%;
    animation: bgLoop 8s linear infinite;
    opacity: 0.65;
    z-index: -1;
}

/* --- SUBMENU --- */
.has-submenu:hover > .submenu { display: block; animation: fadeIn 0.25s ease; }

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(0, 0, 0, 0.95);
    border-radius: 20px;
    min-width: 180px;
    list-style: none;
    padding: 10px 0;
    border-top: 3px solid #b08d2e;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.submenu li a {
    display: block;
    padding: 10px 20px;
    font-size: 15px;
    color: #fffcfc;
}

/* --- ANIMACIONES --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bgLoop {
    from { background-position: 0 0; }
    to { background-position: -170px 0; }
}

/* --- MOBILE HEADER (SOLO UNA VEZ) --- */
.mobile-header, .mobile-nav { display: none; }

@media (max-width: 991px) {
    body { padding-top: 64px; }
    .header-bg { display: none; }
    
    .mobile-header {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: #000 url('../img/U.png') repeat;
        background-size: auto 98%;
        align-items: center;
        padding: 0 12px;
        z-index: 9999;
    }

    .mobile-nav {
        display: block;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: #000;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 9998;
    }

    .mobile-nav.open { transform: translateY(0); }
    
    .mobile-logo img { height: 50px; width: auto; } /* Ajustado tamaño logo móvil */
    
    .mobile-menu { list-style: none; }
    .mobile-menu a {
        display: block;
        padding: 14px 18px;
        color: #fff;
        text-decoration: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}