/**
 * Navbar & Mega Dropdown — CSS dedicat (sursa unică de adevăr)
 *
 * Ultima modificare: 2026-02-01 00:10
 * Modificare: Telefon + WhatsApp icoane mari în navbar-actions
 */

/* ==========================================================================
   1. NAVBAR PRINCIPAL (fixed top)
   ========================================================================== */

.site-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-navbar.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    border-bottom-color: rgba(99, 102, 241, 0.1);
    animation: navSlide 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes navSlide {
    from {
        transform: translateY(-4px);
        opacity: 0.9;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==========================================================================
   2. LAYOUT INTERN — flex pe o linie
   ========================================================================== */

.navbar-inner {
    display: flex;
    align-items: center;
    height: 72px;
}

/* Logo */
.navbar-logo {
    flex-shrink: 0;
    margin-right: 1rem;
}

.navbar-logo img {
    height: 38px;
    width: auto;
    transition: opacity 0.15s ease;
}

.navbar-logo:hover img {
    opacity: 0.8;
}

/* Meniu container (nav items + actions) */
.navbar-menu {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    margin-left: 1rem;
}

/* Lista de navigare — CRITICAL: flex-direction: row suprascrie Bootstrap .navbar-nav column */
.navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0.25rem;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.navbar-nav .nav-item {
    position: relative;
}

.navbar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.7rem;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-dark, #374151);
    text-decoration: none;
    white-space: nowrap;
    border-radius: var(--radius-md, 0.5rem);
    transition: color 0.15s ease, background 0.15s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--color-primary, #6366f1);
    background: rgba(99, 102, 241, 0.06);
}

/* ==========================================================================
   3. ACTIONS (telefon + buton CTA) — aliniate la dreapta
   ========================================================================== */

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* Container telefon + WhatsApp */
.navbar-contact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-phone-number {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-dark, #374151);
    white-space: nowrap;
}

.navbar-phone,
.navbar-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.navbar-phone {
    color: var(--color-accent-green, #10b981);
    background: rgba(16, 185, 129, 0.08);
}

.navbar-phone i {
    font-size: 1.1rem;
}

.navbar-phone:hover {
    background: rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    color: var(--color-accent-green, #10b981);
}

.navbar-whatsapp {
    color: #25d366;
    background: rgba(37, 211, 102, 0.08);
}

.navbar-whatsapp i {
    font-size: 1.25rem;
}

.navbar-whatsapp:hover {
    background: rgba(37, 211, 102, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
    color: #25d366;
}

.btn-nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.15rem;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff !important;
    background: var(--gradient-primary, linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%));
    border: none;
    border-radius: 50px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-nav-cta:hover {
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   4. MEGA DROPDOWN
   ========================================================================== */

.dropdown-arrow {
    transition: transform 0.15s ease;
    opacity: 0.5;
}

.has-mega-dropdown.show .dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.mega-dropdown {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    width: 860px;
    max-width: calc(100vw - 2rem);
    background: #ffffff;
    border-radius: var(--radius-xl, 1rem);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12),
                0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: 1.75rem 2rem;
    margin-top: 0;
    z-index: 1060;
}

.has-mega-dropdown.show .mega-dropdown {
    display: block !important;
}

.mega-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.mega-dropdown-col {
    display: flex;
    flex-direction: column;
}

.mega-dropdown-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary, #6366f1);
    margin-bottom: 0.875rem;
    padding-bottom: 0.625rem;
    border-bottom: 2px solid rgba(99, 102, 241, 0.12);
}

.mega-dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0.625rem;
    margin: 0 -0.625rem;
    border-radius: var(--radius-md, 0.5rem);
    text-decoration: none;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mega-dropdown-item:hover {
    background: var(--color-surface, #f8fafc);
    color: #374151;
}

.mega-dropdown-item:hover .mega-item-icon {
    background: rgba(99, 102, 241, 0.15);
    color: var(--color-primary-dark, #4f46e5);
}

.mega-item-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.08);
    border-radius: var(--radius-md, 0.5rem);
    color: var(--color-primary, #6366f1);
    font-size: 0.9375rem;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
    margin-top: 1px;
}

.mega-item-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mega-item-text .item-title {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-dark, #1f2937);
    line-height: 1.3;
}

.mega-item-text .item-desc {
    font-size: 0.6875rem;
    color: var(--color-text-light, #9ca3af);
    line-height: 1.3;
    margin-top: 1px;
}

/* ==========================================================================
   5. HAMBURGER TOGGLE + OVERLAY
   ========================================================================== */

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1200;
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-dark, #374151);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}

.navbar-spacer {
    height: 72px;
}

.navbar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1090;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.navbar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   6. RESPONSIVE — mobil (sub 992px)
   ========================================================================== */

@media (max-width: 991px) {
    .navbar-menu {
        display: none !important;
        position: fixed;
        top: 0;
        right: 0;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 80px 1.5rem 2rem;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
        z-index: 1100;
        overflow-y: auto;
    }

    .navbar-menu.open {
        display: flex !important;
    }

    .navbar-nav {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100%;
        gap: 0 !important;
    }

    .navbar-nav .nav-link {
        padding: 0.875rem 0;
        font-size: 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        border-radius: 0;
    }

    .navbar-actions {
        margin-left: 0;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.75rem;
    }

    .navbar-contact {
        justify-content: center;
    }

    .navbar-phone,
    .navbar-whatsapp {
        width: 42px;
        height: 42px;
    }

    .navbar-phone i {
        font-size: 1.25rem;
    }

    .navbar-whatsapp i {
        font-size: 1.4rem;
    }

    .navbar-phone-number {
        font-size: 1rem;
    }

    .btn-nav-cta {
        text-align: center;
        justify-content: center;
        padding: 0.75rem 1.5rem;
    }

    .mega-dropdown {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
        padding: 0.5rem 0 0.75rem !important;
        border-radius: 0 !important;
    }

    .mega-dropdown-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }

    .mega-dropdown-col {
        padding-bottom: 0.5rem;
    }

    .mega-dropdown-title {
        margin-bottom: 0.5rem;
        padding-bottom: 0.375rem;
    }

    .mega-dropdown-item {
        padding: 0.375rem 0.5rem;
        margin: 0;
    }

    .mega-item-icon {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 0.75rem;
    }

    .navbar-toggle {
        display: flex !important;
    }
}
