/* ==========================================
   NAVBAR.CSS — Automation Expo 2026
========================================== */

.navbar {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 80px);
    max-width: 1440px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 9999;

    background: rgba(7, 9, 26, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18),
                0 0 0 0.5px rgba(255,215,0,0.08);
    transition: all 0.4s ease;
}

/* Animated gradient border */
.navbar::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(120deg, #FFD700, #07091A, #E63B2E, #FFD700);
    background-size: 300% 300%;
    animation: borderFlow 10s linear infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.7;
}

/* Subtle gold underline */
.navbar::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 36%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.6), transparent);
}

@keyframes borderFlow {
    0%   { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* Scrolled state */
.navbar.scrolled {
    top: 10px;
    height: 64px;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 8px 30px rgba(0,0,0,0.10);
    border-color: rgba(0,0,0,0.06);
}

.navbar.scrolled::before { opacity: 0; }

/* --- Logo --- */
.navbar-logo {
    display: flex;
    align-items: center;
    z-index: 1001;
    text-decoration: none;
}

.nav-img-logo {
    height: 58px;
    width: auto;
    transition: 0.35s ease;
}

.navbar-logo:hover .nav-img-logo { transform: scale(1.06); }

/* --- Nav Links --- */
.navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 36px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-nav a {
    position: relative;
    font-size: 0.80rem;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    transition: color 0.3s;
}

.navbar-nav a:hover { color: #FFD700; }

.navbar-nav a.active {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255,215,0,0.5);
}

.navbar-nav a.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    border-radius: 20px;
    background: #FFD700;
    box-shadow: 0 0 12px #FFD700;
}

.navbar.scrolled .navbar-nav a { color: #111; }
.navbar.scrolled .navbar-nav a:hover { color: var(--accent-indigo, #0A1650); }

/* --- Action Buttons --- */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-nav-secondary {
    height: 42px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.07);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: 0.3s ease;
}

.btn-nav-secondary:hover {
    background: #fff;
    color: #07091A;
    transform: translateY(-2px);
}

.btn-nav-primary {
    height: 42px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #FFD700, #FFE44A);
    color: #07091A;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-nav-primary::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.6s;
}

.btn-nav-primary:hover::before { left: 100%; }
.btn-nav-primary:hover {
    background: #07091A;
    color: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(7,9,26,0.3);
}

/* --- Mobile Toggle --- */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.navbar-toggle span {
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.navbar.scrolled .navbar-toggle span { background: #111; }

/* --- Responsive --- */
@media (max-width: 1100px) {
    .navbar-nav { gap: 20px; }
}

@media (max-width: 991px) {
    .navbar {
        height: 66px;
        width: calc(100% - 32px);
    }

    .navbar-actions { display: none; }
    .navbar-toggle  { display: flex; }

    .navbar-nav {
        position: absolute;
        top: 82px;
        left: 0; right: 0;
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        background: rgba(7,9,26,0.97);
        backdrop-filter: blur(20px);
        border-radius: 18px;
        border: 1px solid rgba(255,255,255,0.09);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-16px);
        transition: 0.3s ease;
    }

    .navbar-nav.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .navbar-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .navbar-toggle.open span:nth-child(2) { opacity: 0; }
    .navbar-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}