/* Estilos para el zócalo superior */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--background-color, #F9F5EF);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: transform 0.3s ease;
}

.top-nav.scroll-down {
    transform: translateY(-100%);
}

.top-nav.scroll-up {
    transform: translateY(0);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Estilos para información del usuario logueado */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(216, 144, 109, 0.1);
    border-radius: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(216, 144, 109, 0.2);
}

.user-info:hover {
    background: rgba(216, 144, 109, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(216, 144, 109, 0.2);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-color, #D8906D);
}

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

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.user-name {
    font-weight: 600;
    color: var(--text-color, #3A3A3A);
    font-size: 0.9rem;
    line-height: 1.2;
}

.user-pulses {
    font-size: 0.75rem;
    color: var(--primary-color, #D8906D);
    font-weight: 500;
    line-height: 1;
}

/* Dropdown menu */
.user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 0.5rem;
}

.user-dropdown i {
    font-size: 0.8rem;
    color: var(--text-color, #3A3A3A);
    transition: transform 0.3s ease;
}

.user-info.active .user-dropdown i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid rgba(216, 144, 109, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-color, #3A3A3A);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(216, 144, 109, 0.1);
}

.dropdown-item i {
    font-size: 0.8rem;
    width: 16px;
    text-align: center;
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .user-info {
        padding: 0.4rem 0.8rem;
        gap: 0.5rem;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
    }
    
    .user-name {
        font-size: 0.8rem;
    }
    
    .user-pulses {
        font-size: 0.7rem;
    }
    
    .dropdown-menu {
        min-width: 140px;
    }
    
    .dropdown-item {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color, #D8906D);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-color, #EFE8DB);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color, #F1EAE3);
    color: var(--text-color, #3A3A3A);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 10px;
    display: inline-block;
    font-size: 1rem;
}

.btn-secondary:hover {
    background-color: var(--accent-color, #EFE8DB);
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--text-color, #3A3A3A);
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .top-nav {
        padding: 10px 15px;
        height: 60px;
    }
    
    .nav-container {
        padding: 0;
        justify-content: flex-end;
    }
    
    .logo {
        display: none;
    }
    
    .auth-buttons {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: 100%;
        gap: 10px;
    }
    
    .btn-secondary, .btn-primary {
        padding: 8px 16px;
        font-size: 14px;
        margin-right: 0;
        width: auto;
        white-space: nowrap;
    }
    
    #profileBtn {
        display: none !important;
    }
    
    #profileBtn.visible {
        display: inline-block !important;
    }
    
    #loginBtn {
        display: none;
    }
    
    #loginBtn.visible {
        display: inline-block;
    }
    
    #professionalLoginBtn {
        display: none;
    }
    
    #professionalLoginBtn.visible {
        display: inline-block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background-color: white;
        flex-direction: column;
        padding: 2rem;
        transition: right 0.3s ease;
        z-index: 101;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        display: none;
    }

    .nav-links.active {
        right: 0;
        display: flex;
    }

    .menu-toggle {
        display: block;
        cursor: pointer;
        z-index: 102;
        background: none;
        border: none;
        padding: 0.5rem;
    }

    .menu-toggle i {
        font-size: 1.5rem;
        color: #333;
    }

    .menu-toggle.active i {
        color: #007bff;
    }

    .auth-buttons {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: #fff;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s;
        display: none;
        z-index: 999;
    }

    .auth-buttons.active {
        transform: translateY(0);
        opacity: 1;
        display: flex;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .logo img {
        height: 32px;
    }

    .auth-buttons {
        display: flex !important;
        position: static;
        transform: none;
        opacity: 1;
        background: none;
        box-shadow: none;
        padding: 0;
    }
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.5rem;
    }

    .logo img {
        height: 28px;
    }
}

/* Menú de navegación */
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-color, #3A3A3A);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color, #D8906D);
}

/* Menú de usuario */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.user-menu.hidden {
    display: none !important;
}

.user-menu:not(.hidden) {
    display: flex !important;
}

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

.user-name {
    font-weight: 500;
    color: #333;
}

.profile-link {
    color: var(--primary-color, #D8906D);
    text-decoration: none;
    font-weight: 500;
}

.logout-btn {
    padding: 0.5rem 1rem;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    opacity: 0.9;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        padding: 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        display: block;
        padding: 1rem 0;
        color: #495057;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        transition: color 0.3s ease;
        text-decoration: none;
    }

    .nav-links a:hover {
        color: var(--primary-color, #D8906D);
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--primary-color, #D8906D);
        cursor: pointer;
        padding: 0.5rem;
        z-index: 1001;
    }

    .menu-toggle.active {
        color: var(--secondary-color, #F1EAE3);
    }

    .auth-buttons {
        display: none;
        margin-top: auto;
        padding-top: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    .auth-buttons.active {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .auth-buttons button {
        width: 100%;
        padding: 0.8rem;
        font-size: 1rem;
    }

    .user-menu {
        display: none;
        margin-top: auto;
        padding-top: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    .user-menu:not(.hidden) {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .user-menu .user-info {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.5rem 0;
    }

    .user-menu .user-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
    }

    .user-menu .user-name {
        font-weight: 500;
        color: #495057;
    }

    .user-menu .logout-btn {
        width: 100%;
        padding: 0.8rem;
        background-color: #dc3545;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .user-menu .logout-btn:hover {
        opacity: 0.9;
    }
}

/* Asegurar que el menú móvil esté por encima de otros elementos */
.header-container {
    position: relative;
    z-index: 1000;
}

/* Ajuste para el contenido principal */
main {
    margin-top: 80px; /* Altura del menú superior */
    padding: 2rem;
}

/* Ajustes para el perfil */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Asegurar que el contenido no sea tapado por el menú */
.profile-section {
    margin-top: 1rem;
    padding-top: 1rem;
    position: relative;
    z-index: 1;
}

/* Corrección para el menú móvil después del login */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    /* Asegurar que el menú no tape el contenido después del login */
    body.logged-in .nav-links {
        display: none;
    }
    
    body.logged-in .nav-links.active {
        display: flex;
    }
    
    /* Ajustar el z-index del menú para que no tape el contenido */
    .nav-links {
        z-index: 999;
    }
    
    /* Asegurar que el contenido principal esté por encima del menú cuando está cerrado */
    .main-container {
        position: relative;
        z-index: 2;
    }
}

/* Estilos para el botón de perfil */
.btn-secondary {
    background-color: var(--secondary-color, #F1EAE3);
    color: var(--text-color, #3A3A3A);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 10px;
    display: inline-block;
    font-size: 1rem;
}

.btn-secondary:hover {
    background-color: var(--accent-color, #EFE8DB);
    transform: translateY(-2px);
}

/* Ajustes para dispositivos móviles */
@media (max-width: 768px) {
    .auth-buttons {
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    
    .btn-secondary, .btn-primary {
        padding: 6px 12px;
        font-size: 14px;
        margin-right: 5px;
    }
    
    .nav-container {
        padding: 10px 15px;
    }
} 