/* ========================================
   TIPZ - Navbar Landing
   Modern Pill Navigation Design
   ======================================== */

/* ============================================
   NAVBAR CONTAINER
   ============================================ */

.navbar-landing {
    background: transparent;
    padding: 1rem 0;
    /* Safe-area iOS: respeta notch/Dynamic Island */
    padding-top: calc(1rem + env(safe-area-inset-top, 0px));
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: none !important;
    border-bottom: none !important;
}

.navbar-landing.scrolled {
    background: rgba(10, 10, 14, 0.92);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.75rem 0;
    /* Safe-area se mantiene al hacer scroll */
    padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

/* Container interno del navbar */
.navbar-landing .container {
    max-width: 1600px;
}

/* ============================================
   NAVBAR BRAND / LOGO
   ============================================ */

.navbar-brand .brand-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.navbar-brand i {
    color: var(--tipz-green-primary);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.navbar-landing.scrolled .navbar-brand .brand-text {
    color: #FFFFFF;
    text-shadow: none;
}

.navbar-landing.scrolled .navbar-brand i {
    text-shadow: none;
}

/* ============================================
   MODERN PILL NAVIGATION - Landing
   ============================================ */

/* Container de los pills */
.navbar-landing .navbar-nav.nav-pills-landing {
    gap: 0.5rem;
    display: flex;
    align-items: center;
}

/* Links estilo pill moderno */
.nav-link-landing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem !important;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85) !important;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    backdrop-filter: blur(4px);
}

.nav-link-landing:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.nav-link-landing.active {
    color: #fff !important;
    background: linear-gradient(135deg, #00A859 0%, #007A42 100%);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(0, 168, 89, 0.35);
}

.nav-link-landing i {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Scrolled state - mantener oscuro */
.navbar-landing.scrolled .nav-link-landing {
    color: rgba(255, 255, 255, 0.85) !important;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.navbar-landing.scrolled .nav-link-landing:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.navbar-landing.scrolled .nav-link-landing.active {
    color: #fff !important;
    background: linear-gradient(135deg, #00A859 0%, #007A42 100%);
    border-color: transparent;
}

.navbar-toggler {
    border: none !important;
    padding: 0.5rem;
}

.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, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mantener icono blanco siempre (navbar oscuro) */
.navbar-landing.scrolled .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, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   ACTION BUTTONS - Modern Style
   ============================================ */

.btn-landing-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #00A859 0%, #007A42 100%);
    color: #FFFFFF;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 168, 89, 0.25);
}

.btn-landing-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 168, 89, 0.4);
    color: #FFFFFF;
}

.btn-landing-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    backdrop-filter: blur(4px);
}

.btn-landing-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* Scrolled state - mantener estilo consistente */
.navbar-landing.scrolled .btn-landing-outline {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.navbar-landing.scrolled .btn-landing-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    color: #FFFFFF;
}

.btn-landing-dashboard {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #00A859 0%, #007A42 100%);
    color: #FFFFFF;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 168, 89, 0.25);
}

.btn-landing-dashboard:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 168, 89, 0.4);
    color: #FFFFFF;
}

/* ============================================
   AUTH PAGES - Consistent Dark Design
   ============================================ */

.navbar-landing.auth-page {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.navbar-landing.auth-page .brand-text,
.navbar-landing.auth-page .nav-link-landing {
    color: #FFFFFF !important;
}

.navbar-landing.auth-page .btn-landing-outline {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.navbar-landing.auth-page .btn-landing-outline:hover {
    background: linear-gradient(135deg, #00A859 0%, #007A42 100%);
    border-color: transparent;
    color: #FFFFFF !important;
}

/* ============================================
   COLLAPSE BEHAVIOR - Bootstrap Fix
   ============================================ */

#navbarLanding.navbar-collapse {
    opacity: 1 !important;
}

/* ============================================
   RESPONSIVE - Compact Desktop (992px - 1199px)
   ============================================ */

@media (min-width: 992px) and (max-width: 1199px) {
    .nav-link-landing {
        padding: 0.45rem 0.75rem !important;
        font-size: 0.8rem;
        gap: 0.3rem;
    }

    .nav-link-landing i {
        font-size: 0.85rem;
    }

    .btn-landing-primary,
    .btn-landing-outline,
    .btn-landing-dashboard {
        padding: 0.45rem 0.9rem;
        font-size: 0.8rem;
    }

    .navbar-landing .navbar-brand img {
        height: 60px !important;
    }
}

/* ============================================
   RESPONSIVE - Mobile Styles
   ============================================ */

@media (max-width: 991px) {
    .navbar-landing {
        background: rgba(26, 26, 26, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 0.75rem 0;
    }

    .navbar-landing .navbar-collapse {
        background: rgba(35, 35, 35, 0.98);
        padding: 1rem;
        border-radius: 12px;
        margin-top: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }

    .navbar-landing .navbar-nav.nav-pills-landing {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-link-landing {
        padding: 0.75rem 1.25rem !important;
        justify-content: center;
        width: 100%;
    }

    .btn-landing-primary,
    .btn-landing-outline,
    .btn-landing-dashboard {
        width: 100%;
        margin-top: 0.5rem;
        justify-content: center;
    }

    /* Reducir logo en mobile para navbar mas compacto */
    .navbar-landing .navbar-brand img {
        height: 55px !important;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInNav {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-landing {
    animation: fadeInNav 0.5s ease-out;
}
