* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#cuerpo_login {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#login {
    width: 100%;
    padding: 8px 46px 8px 30px; /* 46px matches 30px menu padding + 16px link padding */
    text-align: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

#login p {
    margin: 0;
}

.login-link {
    color: #a0a0a0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.login-link i {
    font-size: 14px;
}

.login-link:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.separator {
    color: #444;
    margin: 0 12px;
}

header {
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    top: 0;
    position: sticky;
    z-index: 999;
    border-radius: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

header.scrolled {
    width: 95%;
    max-width: 1250px;
    top: 20px;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255,255,255,0.03) inset;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

header.scrolled .menu {
    height: 68px;
}

header.scrolled .logo img {
    height: 56px;
}

.menu {
    width: 100%;
    padding: 0 30px;
    margin: auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 85px;
    transition: height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.logo a {
    display: block;
}

.logo img {
    height: 70px;
    transition: all 0.3s ease;
}

.logo img:hover {
    transform: scale(1.03);
}

.enlaces {
    list-style: none;
    display: flex;
    gap: 5px;
    align-items: center;
}

.enlaces li a {
    color: #c9c9c9;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.enlaces li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateX(-50%);
    opacity: 0;
}

.enlaces li a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.enlaces li a:hover::after {
    width: 60%;
    opacity: 1;
}

/* Dropdowns */
.enlaces li {
    position: relative;
}

.enlaces li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #111;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    padding: 10px 0;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    border: 1px solid #333;
}

.enlaces li:hover > ul {
    display: block;
    opacity: 1;
    transform: translateY(0);
    z-index: 100;
}

.enlaces li ul li {
    width: 100%;
}

.enlaces li ul li a {
    padding: 12px 20px;
    display: block;
    border-radius: 0;
    font-weight: 500;
}

.enlaces li ul li a::before {
    display: none;
}

.enlaces li ul li a:hover {
    background: #2a2a2a;
    padding-left: 25px;
}

/* Mobile Menu */
.menu_bar {
    display: none;
}

#menu_general {
    display: none;
}

@media screen and (max-width: 950px) {
    body {
        padding-top: 54px; /* Spacer for fixed menu bar */
    }

    header {
        display: none;
    }
    
    #menu_general {
        display: block;
        width: 100%;
    }
    
    .menu_bar {
        display: block;
        background: #000;
        padding: 15px 20px;
        position: fixed;
        width: 100%;
        top: 0;
        z-index: 1000;
        box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    }
    
    .menu_bar .bt-menu {
        color: #fff;
        text-decoration: none;
        font-size: 18px;
        font-weight: 600;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .menu_bar .icon-menu {
        font-size: 24px;
    }
    #menu_movil_content {
        position: fixed;
        top: 54px; /* Just under menu_bar */
        left: 0;
        width: 100%;
        max-height: calc(100vh - 54px);
        overflow-y: auto;
        background: #0d0d0d;
        z-index: 990; /* behind the fixed menu bar (1000) */
        transform: translateY(-150%);
        transition: transform 0.4s ease-in-out;
        box-shadow: 0 15px 25px rgba(0,0,0,0.6);
        border-bottom: 2px solid #333;
    }
    
    #menu_movil_content.active {
        transform: translateY(0);
    }
    
    #login_movil {
        background: #1a1a1a;
        padding: 15px 20px;
        text-align: center;
        border-bottom: 1px solid #333;
    }
    
    #login_movil p {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        margin: 0;
    }
    
    #navegacion {
        background: #0d0d0d;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
    
    #navegacion ul {
        list-style: none;
    }
    
    .lista {
        border-bottom: 1px solid #222;
    }
    
    .lista a {
        display: block;
        padding: 18px 20px;
        color: #e0e0e0;
        text-decoration: none;
        font-size: 16px;
        transition: background 0.3s ease;
    }
    
    .lista a:hover {
        background: #2a2a2a;
        color: #fff;
    }
    
    .lista .caret {
        float: right;
    }
    
    .children {
        display: none;
        background: #1a1a1a;
    }
    
    .lista:hover .children {
        display: block;
    }
    
    .children li a {
        padding-left: 40px;
        font-size: 15px;
    }
}