/* ===============================================
   NAVBAR-PUBLIC.CSS - Navegación para páginas públicas
   =============================================== */

/* ===== NAVBAR BASE ===== */
.navbar-custom {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 0.75rem 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 70px;
    z-index: 1000;
    
    /* Gradiente público */
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.95) 0%, 
        rgba(118, 75, 162, 0.95) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Contenedor del navbar */
.navbar-custom .container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Efecto scroll */
.navbar-custom.scrolled {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.98) 0%, 
        rgba(118, 75, 162, 0.98) 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* ===== BRAND ===== */
.navbar-brand {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: white !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-brand:hover {
    color: rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-1px);
}

/* Brand container */
.brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Brand text */
.brand-text-main {
    font-size: 24px;
    font-weight: 600;
    color: #000;
}

.brand-text-secondary {
    color: #666;
}

/* CSS del brand-icon eliminado - se mantiene SVG original por mejor fidelidad visual */

/* ===== NAVEGACIÓN RESPONSIVA ===== */
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5rem;
    height: 1.5rem;
}

.navbar-nav {
    align-items: center;
    gap: 0.5rem;
}

/* ===== BOTONES DE AUTENTICACIÓN ===== */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-navbar {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-navbar:hover::before {
    left: 100%;
}

.btn-navbar i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

/* Botón login - CTA secundario */
.btn-login {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Botón registro - CTA primario */
.btn-register {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.btn-register:hover {
    background: white;
    color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ===== SECCIÓN DE USUARIO AUTENTICADO ===== */
/* Elementos básicos para usuarios logueados en páginas públicas */
.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ===== ELEMENTOS DE USUARIO AUTENTICADO ===== */
/* Botón de dashboard */
.nav-link-custom {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem;
    gap: 0.5rem;
    text-decoration: none;
}

.nav-link-custom:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Botón dropdown de usuario */
.user-dropdown-btn {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: white;
    transition: all 0.3s ease;
    gap: 0.75rem;
}

.user-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.user-avatar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar i {
    font-size: 0.9rem;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.user-email-display {
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

/* Pastilla de créditos (independiente, junto al botón de usuario) */
.user-credits-pill {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-credits-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.user-credits-pill i {
    color: #f5b400;
}

.dropdown-arrow {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease;
}

.user-dropdown-btn[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown menu */
.user-dropdown-menu {
    min-width: 280px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
}

.dropdown-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
}

.user-email-full {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.user-status {
    font-size: 0.75rem;
    color: #28a745;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.credits-details {
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.02);
    margin: 0;
}

.credits-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.credits-row:last-child {
    margin-bottom: 0;
}

.logout-item {
    color: #dc3545;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.logout-item:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Utility */
.hidden {
    display: none;
}

/* ===== INDICADORES ===== */
.nav-link.active {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

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

.navbar-collapse.show {
    animation: slideDown 0.3s ease-out;
}

/* ===== RESPONSIVE ===== */
/* Tablets y dispositivos medianos */
@media (max-width: 992px) {
    .navbar-custom {
        padding: 0.6rem 0;
        min-height: 65px;
    }
    
    .navbar-custom .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem !important;
    }
    
    /* Referencias a brand-icon, brand-title, brand-subtitle eliminadas */
    
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(20px);
        border-radius: 12px;
        padding: 0.75rem 1rem;
        margin-top: 0.5rem;
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .auth-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    
    .btn-navbar {
        width: 100%;
        justify-content: center;
        transition: all 0.2s ease;
        transform: scale(1);
    }
    
    .btn-navbar:active {
        transform: scale(0.98);
        opacity: 0.8;
    }
    
    .user-section {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        width: 100%;
    }
    
    /* Referencia a .user-button eliminada */
}

/* Móviles */
@media (max-width: 576px) {
    .navbar-custom {
        padding: 0.5rem 0;
        min-height: 60px;
    }
    
    .navbar-custom .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .navbar-brand {
        font-size: 1rem !important;
    }
    
    /* Referencias a brand-icon, brand-title, brand-subtitle eliminadas */
    
    .btn-navbar {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .navbar-collapse {
        padding: 0.5rem 0.75rem;
        margin-top: 0.25rem;
    }
} 