/*
 * GCT Bhakkar - Header & Navbar Styles
 * Complete header with top bar and navigation
 */

/* ===== HEADER WRAPPER ===== */

header[data-navbar] {
    position: relative;
    z-index: 1000;
}

/* No body padding needed - top bar scrolls away, navbar is sticky */

/* ===== TOP BAR ===== */

.top-bar {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.top-bar-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.8rem;
}

.top-bar-item i {
    color: #3b82f6;
}

.top-bar-item a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.top-bar-item a:hover {
    color: #3b82f6;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar-social {
    display: flex;
    gap: 0.75rem;
}

.top-bar-social a {
    color: #94a3b8;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.top-bar-social a:hover {
    color: #3b82f6;
}

/* ===== MAIN NAVBAR ===== */

.main-navbar {
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Fixed navbar state when scrolled */
.main-navbar.navbar-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

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

/* ===== BRAND ===== */

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.navbar-brand img {
    height: 50px;
    width: auto;
}

.navbar-brand-text {
    display: flex;
    flex-direction: column;
}

.navbar-brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #3b82f6;
    line-height: 1.2;
}

.navbar-brand-tagline {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== NAVIGATION ===== */

.navbar-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link:focus {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.nav-link.active {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
}

.nav-link .dropdown-arrow {
    font-size: 0.65rem;
    transition: transform 0.2s;
}

/* ===== DROPDOWN MENU ===== */

.nav-item.dropdown {
    position: relative;
}

.nav-item.dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: #1e293b;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.75rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    padding: 0.5rem;
    margin-top: 0.5rem;
    z-index: 1100;
    list-style: none;
}
.dropdown-menu{
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.nav-item.dropdown:hover .dropdown-menu,
.nav-item.dropdown:focus-within .dropdown-menu {
    display: block;
    animation: dropdownFade 0.2s ease;
}

.nav-item.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}
 .nav-item.dropdown:hover .dropdown-menu, .nav-item.dropdown:focus-within .dropdown-menu { display: block; /* keep it visible */ opacity: 1; transform: translateY(0); visibility: visible; }
@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #cbd5e1;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    padding-left: 1.25rem;
}

.dropdown-item i {
    width: 20px;
    color: #3b82f6;
    font-size: 0.85rem;
}

/* ===== CTA BUTTON ===== */

.navbar-cta .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.navbar-cta .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Hide close button on desktop */
.navbar-close {
    display: none;
}

/* ===== MOBILE TOGGLE ===== */

.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.5rem;
    cursor: pointer;
}

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

.navbar-toggle.active .navbar-toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.active .navbar-toggle-bar:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active .navbar-toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1024px) {
    .navbar-toggle {
        display: flex;
    }

    .navbar-nav-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: #0f172a;
        flex-direction: column;
        align-items: stretch;
        padding: 5rem 1.5rem 2rem;
        gap: 1rem;
        transition: right 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }

    .navbar-nav-wrapper.show {
        right: 0;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    /* Mobile close button */
    .navbar-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(239, 68, 68, 0.15);
        border: 1px solid rgba(239, 68, 68, 0.3);
        border-radius: 0.5rem;
        cursor: pointer;
        color: #ef4444;
        font-size: 1.25rem;
        transition: all 0.2s ease;
    }

    .navbar-close:hover {
        background: rgba(239, 68, 68, 0.25);
        transform: scale(1.05);
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 0.25rem;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        padding: 0.75rem 1rem;
        justify-content: space-between;
    }

    /* Mobile dropdown */
    .nav-item.dropdown .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        background: rgba(0, 0, 0, 0.3);
        border: none;
        box-shadow: none;
        margin-top: 0.25rem;
        padding: 0.25rem 0;
    }

    .nav-item.dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown-item {
        padding-left: 1.5rem;
    }

    .navbar-cta {
        width: 100%;
        margin-top: 1rem;
    }

    .navbar-cta .btn {
        width: 100%;
        text-align: center;
    }

    /* Mobile overlay */
    .navbar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }

    .navbar-overlay.show {
        display: block;
    }
}

@media (max-width: 768px) {
    .top-bar-left {
        display: none;
    }

    .top-bar-container {
        justify-content: center;
    }

    .navbar-brand-tagline {
        display: none;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        height: 40px;
    }

    .navbar-brand-name {
        font-size: 1.1rem;
    }
}