.navbar {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 15px 50px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: rgb(0, 0, 0);
    z-index: 90;
    box-sizing: border-box;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 120px;
    height: 40px;
}

.logo a {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Menu */
.menu-items {
    display: flex;
    gap: 20px;
    flex: 3;
    justify-content: center;
}

.nav-link {
    text-decoration: none;
    padding: 10px 20px;
    color: black;
    font-weight: 500;
    border-bottom: 1px solid transparent;
}

.nav-link:hover {
    text-decoration: none;
    transition: border-bottom 0.2s ease;
    border-bottom: 1px solid #96B675;
}

/* Hover específico para "Comienza tu proyecto" */
.nav-link[href*="comenzar"]:hover {
    border-bottom: 1px solid #8189D8;
}

.nav-link.active {
    border-bottom: 3px solid white;
    transition: 0.3s ease;
    position: relative;
    border-radius: 4px;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #8189D8;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(129, 137, 216, 0.3);
}

/* Color específico para "Conoce Proyectos" */
.navbar .nav-link[href*="proyectos"].active::after {
    background-color: #96B675 !important;
    box-shadow: 0 2px 4px rgba(150, 182, 117, 0.3) !important;
}

/* Usuario */
.user-info {
    font-family: Metropolis-Bold;
    white-space: nowrap;
}

/* Hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    width: 35px;
    height: 32px;
    justify-content: center;
}

.hamburger span {
    background: rgb(0, 0, 0);
    height: 3px;
    width: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu {
    display: none;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 4px);
    background: rgb(255, 255, 255);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -5px);
    background: rgb(255, 255, 255);
}

/* Hamburger Overlay */
.hamburger-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00000066;
    z-index: 95;
    pointer-events: none;
}

body.menu-hamburguesa-activo {
    overflow: hidden;
}

/* Botones de autenticacion */
.auth-buttons {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* Perfil de usuario */
.user-profile {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.user-profile-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.user-profile-container:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar svg {
    width: 24px;
    height: 24px;
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-name {
    color: #37383E;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.dropdown-arrow {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.dropdown-arrow path {
    stroke: #37383E;
}

.user-profile-container:hover .dropdown-arrow {
    transform: translateY(2px);
}

.user-profile {
    position: relative;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    pointer-events: none;
}

.user-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    text-decoration: none;
    color: #37383E;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    position: relative;
}

.dropdown-item:hover {
    background-color: #F7F7F7;
}

.dropdown-indicator {
    width: 2px;
    height: 20px;
    background: transparent;
    margin-right: 12px;
    flex-shrink: 0;
}

.dropdown-item.active .dropdown-indicator {
    background: #8189D8;
}

.dropdown-text {
    flex: 1;
}

.dropdown-separator {
    height: 1px;
    background: #E0E0E0;
    margin: 8px 0;
}

.btn-iniciar-sesion {
    text-decoration: none;
    padding: 12px 0px;
    color: #8189D8;
    font-weight: 500;
    background: white;
    border: 1px solid #8189D8;
    border-radius: 20px;
    transition: all 0.3s ease;
    width: 140px;
    text-align: center;
}

.btn-iniciar-sesion:hover {
    background: #8189D8;
    color: white;
    border: 1px solid #8189D8;
}

.btn-registrarse {
    text-decoration: none;
    padding: 12px 0px;
    color: #96b675;
    font-weight: 500;
    background: white;
    border: 1px solid transparent;
    border-radius: 20px;
    transition: all 0.3s ease;
    width: 140px;
    text-align: center;
    background: linear-gradient(white, white) padding-box,
        linear-gradient(91.53deg, #96b675 2.47%, #8189d8 99.87%) border-box;
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.btn-registrarse:hover {
    background: linear-gradient(91.53deg, #96B675 2.47%, #8189D8 99.87%);
    color: white;
    border: 1px solid transparent;
}

.btn-registrarse:hover span {
    color: white;
    background: none;
}

/* ========================================
   MEDIA QUERIES RESPONSIVAS
   ======================================== */


/* Pantalla pequeña (1024px) */
@media screen and (max-width: 1024px) {
    .navbar {
        padding: 20px 12px;
    }

    .logo img {
        height: 35px;
    }

    .menu-items {
        gap: 15px;
    }

    .nav-link {
        padding: 8px 16px;
        font-size: 16px;
    }

    .auth-buttons {
        gap: 12px;
    }

    .btn-iniciar-sesion,
    .btn-registrarse {
        padding: 6px 0px;
        font-size: 14px;
    }

    .user-profile-container {
        gap: 8px;
        padding: 6px 10px;
    }

    .user-avatar {
        width: 35px;
        height: 35px;
    }

    .user-avatar svg {
        width: 20px;
        height: 20px;
    }

    .user-avatar-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

    .user-name {
        font-size: 14px;
    }

    .dropdown-arrow {
        width: 10px;
        height: 6px;
    }
}

/* Tablet (577px - 992px) */
@media screen and (min-width: 577px) and (max-width: 992px) {
    .navbar {
        padding: 20px 10px;
    }

    .logo img {
        height: 30px;
    }

    .menu-items {
        gap: 12px;
        padding-right: 5%;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 13px;
    }

    .auth-buttons {
        display: none;
    }

    .user-profile {
        display: none;
    }

    .hamburger {
        display: flex;
        background: transparent;
        border: none;
        margin-top: 0px;
        margin-right: 20px;
        transition: transform 0.3s ease;
        z-index: 9999;
    }

    .hamburger:hover {
        transform: scale(1.1);
    }

    .menu-items {
        display: none !important;
    }

    .hamburger-overlay {
        display: block;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 95;
    }

    .hamburger-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .menu-hamburguesa-activo .navbar {
        z-index: revert-layer;
    }

    .mobile-menu {
        position: absolute;
        z-index: 110;
        top: 70px;
        right: 30px;
        background: white;
        padding: 12px;
        width: 230px;
        height: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
        pointer-events: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        border-radius: 15px;
    }

    .mobile-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .mobile-menu a {
        text-decoration: none;
        color: #37383E;
        font-weight: 400;
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.3s ease;
        transition-delay: 0.1s;
    }

    .mobile-menu.active a {
        opacity: 1;
        transform: translateX(0);
    }

    .mobile-menu a:nth-child(1) {
        transition-delay: 0.1s;
    }

    .mobile-menu a:nth-child(2) {
        transition-delay: 0.15s;
    }

    .mobile-menu a:nth-child(3) {
        transition-delay: 0.2s;
    }

    .mobile-menu a:nth-child(4) {
        transition-delay: 0.25s;
    }

    .mobile-menu a:nth-child(5) {
        transition-delay: 0.3s;
    }

    .menu-header {
        padding: 20px 0;
        padding-left: 20px;
        border-bottom: none;
        font-size: 16px;
        position: relative;
    }

    .mobile-menu a.active .menu-header::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 20px;
        background-color: #8189D8;
        border-radius: 2px;
    }

    .mobile-menu a[href*="comenzar"].active .menu-header::before {
        background-color: #8189D8;
    }

    .mobile-menu a[href*="proyectos"].active .menu-header::before {
        background-color: #96B675 !important;
    }

    .mobile-menu a[href*="comenzar"]:hover .menu-header::before {
        background-color: #8189D8;
    }

    .mobile-menu a:not(:last-child) .menu-header {
        border-bottom: 1px solid #37383E4D;
        border-bottom-width: 1px;
        width: 205px;
        border-bottom-style: solid;
        border-bottom-color: #37383E4D;
    }

    .mobile-menu a:last-child .menu-header {
        border-bottom: none;
    }

    #mobile-link-proyectos {
        position: relative;
        width: 100%;
        display: block;
    }

    #mobile-link-proyectos .menu-header {
        border-bottom: none;
    }

    #mobile-link-proyectos::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 0.5px;
        background-color: #000000;
    }

    #mobile-link-inicio {
        position: relative;
        width: 100%;
        display: block;
    }

    #mobile-link-inicio::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 0.5px;
        background-color: #CCCCCC;
    }

    #mobile-link-comenzar {
        position: relative;
        width: 100%;
        display: block;
    }

    #mobile-link-comenzar::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 0.5px;
        background-color: #CCCCCC;
    }

    #mobile-link-proyectos-usuario {
        position: relative;
        width: 100%;
        display: block;
    }

    #mobile-link-proyectos-usuario::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 0.5px;
        background-color: #CCCCCC;
    }

    .menu-header-user {
        padding: 0 20px 20px 20px;
        border-bottom: none !important;
        font-size: 16px;
        position: relative;
    }

    #mobile-link-proyectos-usuario .menu-header-user {
        border-bottom: 1px solid #37383E4D !important;
        width: 205px;
    }

    .mobile-menu a.active .menu-header-user::before {
        content: '';
        position: absolute;
        left: 0;
        width: 4px;
        height: 17px;
        background-color: #8189D8;
        border-radius: 2px;
    }

    .mobile-menu a[href*="comenzar"].active .menu-header-user::before {
        background-color: #8189D8;
    }

    .mobile-menu a[href*="proyectos"].active .menu-header-user::before {
        background-color: #96B675 !important;
    }

    .mobile-menu a[href*="comenzar"]:hover .menu-header-user::before {
        background-color: #8189D8;
    }

    .menu-user-name {
        padding: 20px 20px 20px 20px;
        font-size: 16px;
        font-weight: bold;
        color: #37383E;
        border-bottom: none;
    }

    .logo {
        align-items: flex-start;
        justify-content: flex-start;
        margin-left: 20px;
    }

    .mobile-menu.active {
        z-index: 9999;
    }
}

/* Móvil (hasta 576px) */
@media screen and (max-width: 576px) {
    .navbar {
        padding: 20px 10px;
    }

    .logo img {
        height: 30px;
    }

    .auth-buttons {
        display: none;
    }

    .user-profile {
        display: none;
    }

    .hamburger {
        margin-right: 20px;
        display: flex;
        background: transparent;
        border: none;
        width: 32px;
        height: 32px;
        margin-top: 0px;
        margin-left: 0px;
        z-index: 9999;
    }

    .menu-items {
        display: none !important;
    }

    .mobile-menu {
        position: absolute;
        z-index: 110;
        top: 70px;
        right: 30px;
        background: white;
        padding: 12px;
        width: 230px;
        height: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
        pointer-events: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        border-radius: 15px;
    }

    .mobile-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
        z-index: 9999;
    }

    .mobile-menu a {
        text-decoration: none;
        color: #37383E;
        font-weight: 400;
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.3s ease;
        transition-delay: 0.1s;
    }

    .mobile-menu.active a {
        opacity: 1;
        transform: translateX(0);
    }

    .mobile-menu a:nth-child(1) {
        transition-delay: 0.1s;
    }

    .mobile-menu a:nth-child(2) {
        transition-delay: 0.15s;
    }

    .mobile-menu a:nth-child(3) {
        transition-delay: 0.2s;
    }

    .mobile-menu a:nth-child(4) {
        transition-delay: 0.25s;
    }

    .mobile-menu a:nth-child(5) {
        transition-delay: 0.3s;
    }

    .menu-header {
        padding: 20px;
        border-bottom: none;
        font-size: 16px;
        position: relative;
    }

    .menu-separator {
        display: none;
    }

    .menu-user-name {
        padding: 20px 20px 20px 20px;
        font-size: 16px;
        font-weight: bold;
        color: #37383E;
        border-bottom: none;
    }

    .menu-header-user {
        padding: 0 20px 20px 20px;
        border-bottom: none !important;
        font-size: 16px;
        position: relative;
    }

    .mobile-menu a.active .menu-header-user::before {
        content: '';
        position: absolute;
        left: 0;
        width: 4px;
        height: 17px;
        background-color: #8189D8;
        border-radius: 2px;
    }

    .mobile-menu a[href*="comenzar"].active .menu-header-user::before {
        background-color: #8189D8;
    }

    .mobile-menu a .menu-header-user {
        border-bottom: none;
    }

    .mobile-menu a.active .menu-header::before {
        content: '';
        position: absolute;
        left: 0;
        width: 4px;
        height: 17px;
        background-color: #8189D8;
        border-radius: 2px;
    }

    .mobile-menu a[href*="comenzar"].active .menu-header::before {
        background-color: #8189D8;
    }

    .mobile-menu a .menu-header {
        border-bottom: none;
    }

    #mobile-link-inicio {
        position: relative;
        width: 100%;
        display: block;
    }

    #mobile-link-inicio::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 0.5px;
        background-color: #CCCCCC;
    }

    #mobile-link-comenzar {
        position: relative;
        width: 100%;
        display: block;
    }

    #mobile-link-comenzar::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 0.5px;
        background-color: #CCCCCC;
    }

    #mobile-link-proyectos {
        position: relative;
        width: 100%;
        display: block;
    }

    #mobile-link-proyectos .menu-header {
        border-bottom: none;
    }

    #mobile-link-proyectos::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 0.5px;
        background-color: #000000;
    }

    #mobile-link-proyectos-usuario {
        position: relative;
        width: 100%;
        display: block;
    }

    #mobile-link-proyectos-usuario::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 0.5px;
        background-color: #CCCCCC;
    }

    .logo {
        align-items: flex-start;
        justify-content: flex-start;
        margin-left: 15px;
        width: 105px;
        height: 35px;
        order: 1;
    }

    .hamburger {
        order: 2;
    }

    .hamburger-overlay {
        display: block;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .hamburger-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .menu-hamburguesa-activo .navbar {
        z-index: revert-layer;
    }

    .mobile-menu a[href*="proyectos"].active .menu-header::before {
        background-color: #96B675 !important;
    }

    /* Hover específico para "Comienza tu proyecto" en menú móvil */
    .mobile-menu a[href*="comenzar"]:hover .menu-header::before {
        background-color: #8189D8;
    }
}