/* =====================================================
   NAVBAR STYLES
===================================================== */

/* 1. Navbar Container - EXACT ORIGINAL STYLING */
.navbar-custom .container{
    max-width: 1300px;
}

.navbar-custom {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent; /* Prevents layout shift if border added later */
}

.navbar-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* 2. Brand / Logo - RESTORED SIZES */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 2.2rem; /* Restored large size */
    color: var(--text-primary) !important;
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-brand:hover {
    text-decoration: none;
}

.navbar-brand img {
    height: 36px;
}

/* Logo Wrapper (Your Custom Hover Effect) */
.logo-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: fit-content;
}

/* Gradient Clone for Hover */
.logo-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--brand-gradient);
    -webkit-mask-image: url('images/WhiteLogo.png');
    mask-image: url('images/WhiteLogo.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.navbar-brand:hover .logo-wrapper::after {
    opacity: 1;
}

/* =========================================
   Brand Text Smooth Gradient Animation
   ========================================= */

/* 1. Base Text (White) */
.brand-text {
    position: relative;
    display: inline-block;
    text-decoration: none;
    font-weight: 500; /* Ensure it's bold enough for the gradient */
    
    /* Apply Brand Gradient Directly */
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    
    /* Make text transparent so background shows */
    -webkit-text-fill-color: transparent;
    color: transparent;
    
    transition: opacity 0.3s ease;
}

.navbar-brand:hover .brand-text {
    opacity: 0.9;
}

/* 2. The "Ghost" Gradient Overlay */
/* .brand-text::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
} */

/* 3. Trigger Fade on Hover */
/* When you hover ANYWHERE on the brand link, fade in the gradient text
.navbar-brand:hover .brand-text::before {
    opacity: 1;
}

ADD THIS: Make the underlying white text transparent on hover
.navbar-brand:hover .brand-text {
    color: transparent;
} */


/* 3. Desktop Navigation Links - RESTORED COLORS */
.nav-links-desktop {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link-custom {
    color: var(--text-primary) !important; /* Restored to White */
    font-size: 1.1rem; /* Restored size */
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

/* Active Page Glowing Underline */
.nav-link-custom.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  box-shadow: 0 0 10px var(--gradient-2);
  border-radius: 2px;
}

/* Hover Gradient Effect */
.nav-link-custom:hover,
.nav-link-custom.active {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Dropdown Arrow */
.nav-link-custom i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    /* Ensure icon inherits the gradient on hover */
    -webkit-text-fill-color: initial; 
    color: inherit;
}

.nav-dropdown:hover .nav-link-custom i {
    transform: rotate(180deg);
}

/* 4. Desktop Dropdown Menus */
.nav-dropdown {
    position: relative;
}

.dropdown-menu-custom {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    min-width: 220px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

.nav-dropdown:hover .dropdown-menu-custom {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item-custom {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary) !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item-custom:hover {
    padding-left: 2rem;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-color: transparent;
    font-weight: 700;
}

/* 5. Right Side Actions */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-gradient {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    background-size: 200% 200%;
    animation: gradientMove 3s ease infinite;
    border: none;
    color: white;
    padding: 0.75rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.3);
    text-decoration: none;
    display: inline-block;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(236, 72, 153, 0.4);
    color: white;
}

/* =====================================================
   MOBILE NAVIGATION (Additions Only)
===================================================== */

/* Hamburger Button - Hidden on Desktop */
.mobile-menu-toggle {
    display: none; /* Default hidden */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    gap: 5px;
    padding: 0;
    z-index: 1002;
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Animation for Active Hamburger */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Drawer */
.mobile-nav-menu {
    display: block; /* Structure exists but hidden by opacity/height */
    position: fixed;
    top: 0; /* Cover full screen */
    left: 0;
    right: 0;
    height: 100vh;
    background: var(--bg-secondary);
    padding-top: 100px; /* Space for navbar */
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    
    /* Animation states */
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%); /* Slide out to right */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    z-index: 1001; /* Below hamburger, above content */
    overflow-y: auto;
}

.mobile-nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0); /* Slide in */
}

/* Mobile Links Styling */
.mobile-nav-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-link {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    width: 100%;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
    color: var(--gradient-3);
}

/* Mobile Dropdowns */
.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    margin-top: 0;
}

.mobile-dropdown-menu.active {
    max-height: 500px; /* Expand */
    margin-top: 10px;
    margin-bottom: 10px;
}

.mobile-dropdown-item {
    display: block;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
}

.mobile-dropdown-item:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.mobile-dropdown-toggle i {
    transition: transform 0.3s;
}
.mobile-dropdown-toggle.active i {
    transform: rotate(180deg);
}

.mobile-login-btn {
    width: 100%;
    text-align: center;
    margin-top: 2rem;
}

/* =====================================================
   RESPONSIVE MEDIA QUERIES
===================================================== */

/* Laptops & Tablets (Max Width: 1199px) - Switch to Mobile Menu */
@media (max-width: 1199px) {
    .navbar-custom .container{
        max-width: 1000px !important;
    }
    
    /* Hide Desktop Links */
    .nav-links-desktop {
        display: none !important;
    }

    /* Show Mobile Toggle */
    .mobile-menu-toggle {
        display: flex !important;
    }

    /* Hide Desktop Login Button (move to menu) */
    .navbar-actions .btn-login {
        display: none !important;
    }
}

@media (max-width: 992px) {
    .navbar-custom .container {
        max-width: 960px !important;
    }
}

/* Smaller Mobile Screens */
@media (max-width: 767px) {
    .navbar-custom .container{
        max-width: 720px !important;
    }

    .navbar-brand {
        font-size: 1.5rem; /* Scale down logo text slightly on phones */
    }
    
    .navbar-brand img {
        height: 30px;
    }
    
    .navbar-custom {
        padding: 0.8rem 0;
    }
}