/* ============================================
   NAVBAR - BASE STYLES
   Structure and layout (theme-independent)
   ============================================ */

/* Navbar container - 50% transparent with enhanced glassmorphism */
.navbar-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Light Mode Navbar - 50% transparent */
[data-theme="light"] .navbar-container,
html[data-theme="light"] .navbar-container,
body[data-theme="light"] .navbar-container {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
}

/* Dark Mode Navbar - 50% transparent */
[data-theme="dark"] .navbar-container,
html[data-theme="dark"] .navbar-container,
body[data-theme="dark"] .navbar-container {
    background: rgba(15, 23, 42, 0.5) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid rgba(100, 116, 139, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

/* Ensure navbar stays on top of all content */
.navbar-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
}

/* Ensure all navbar content is always visible */
.navbar-container * {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Responsive breakpoints for navbar */
@media (max-width: 639px) {
    /* Mobile - hide desktop nav, show mobile menu button */
    .navbar-container .sm\:hidden {
        display: none !important;
    }
    .navbar-container .lg\:hidden {
        display: flex !important;
    }
    .navbar-container .lg\:block {
        display: none !important;
    }
    .navbar-container .lg\:flex {
        display: none !important;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    /* Tablet - hide desktop nav, show mobile menu button */
    .navbar-container .lg\:hidden {
        display: flex !important;
    }
    .navbar-container .lg\:block {
        display: none !important;
    }
    .navbar-container .lg\:flex {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    /* Desktop - show desktop nav, hide mobile menu button */
    .navbar-container .lg\:block {
        display: block !important;
    }
    .navbar-container .lg\:flex {
        display: flex !important;
    }
    .navbar-container .lg\:hidden {
        display: none !important;
    }
}

/* ============================================
   NAV LINKS - BASE STYLES
   ============================================ */

.nav-link {
    display: inline-block !important;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link:hover {
    transform: scale(1.05);
}

/* Dark Mode Nav Links */
[data-theme="dark"] .nav-link,
html[data-theme="dark"] .nav-link,
body[data-theme="dark"] .nav-link {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link:hover,
body[data-theme="dark"] .nav-link:hover {
    color: #38bdf8 !important;
}

/* Light Mode Nav Links */
[data-theme="light"] .nav-link,
html[data-theme="light"] .nav-link,
body[data-theme="light"] .nav-link {
    color: #374151 !important;
}

[data-theme="light"] .nav-link:hover,
html[data-theme="light"] .nav-link:hover,
body[data-theme="light"] .nav-link:hover {
    color: #0ea5e9 !important;
}

/* ============================================
   BUTTONS - BASE STYLES
   ============================================ */

/* Theme toggle button */
.theme-toggle-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
}

.theme-toggle-btn svg {
    display: block !important;
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease;
}

.theme-toggle-btn:hover svg {
    transform: rotate(15deg);
}

/* Dark Mode Theme Toggle */
[data-theme="dark"] .theme-toggle-btn,
html[data-theme="dark"] .theme-toggle-btn,
body[data-theme="dark"] .theme-toggle-btn {
    color: #e2e8f0 !important;
    background-color: rgba(100, 116, 139, 0.1) !important;
    border-color: rgba(100, 116, 139, 0.3) !important;
}

[data-theme="dark"] .theme-toggle-btn:hover,
html[data-theme="dark"] .theme-toggle-btn:hover,
body[data-theme="dark"] .theme-toggle-btn:hover {
    background-color: rgba(56, 189, 248, 0.1) !important;
    color: #38bdf8 !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
}

/* Light Mode Theme Toggle */
[data-theme="light"] .theme-toggle-btn,
html[data-theme="light"] .theme-toggle-btn,
body[data-theme="light"] .theme-toggle-btn {
    color: #374151 !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .theme-toggle-btn:hover,
html[data-theme="light"] .theme-toggle-btn:hover,
body[data-theme="light"] .theme-toggle-btn:hover {
    background-color: rgba(14, 165, 233, 0.1) !important;
    color: #0ea5e9 !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
}

/* CTA Button - Enhanced Consistency */
.cta-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    white-space: nowrap;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(14, 165, 233, 0.3);
}

.cta-button:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(14, 165, 233, 0.4);
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
}

.cta-button:active {
    transform: scale(0.98) translateY(0);
}

/* Dark Mode CTA Button */
[data-theme="dark"] .cta-button,
html[data-theme="dark"] .cta-button,
body[data-theme="dark"] .cta-button {
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%) !important;
    color: white !important;
    box-shadow: 0 4px 14px 0 rgba(14, 165, 233, 0.3) !important;
}

[data-theme="dark"] .cta-button:hover,
html[data-theme="dark"] .cta-button:hover,
body[data-theme="dark"] .cta-button:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%) !important;
    box-shadow: 0 8px 25px 0 rgba(14, 165, 233, 0.4) !important;
}

/* Light Mode CTA Button */
[data-theme="light"] .cta-button,
html[data-theme="light"] .cta-button,
body[data-theme="light"] .cta-button {
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%) !important;
    color: white !important;
    box-shadow: 0 4px 14px 0 rgba(14, 165, 233, 0.2) !important;
}

[data-theme="light"] .cta-button:hover,
html[data-theme="light"] .cta-button:hover,
body[data-theme="light"] .cta-button:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%) !important;
    box-shadow: 0 8px 25px 0 rgba(14, 165, 233, 0.3) !important;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid;
    min-width: 48px;
    min-height: 48px;
}

.mobile-menu-btn:hover {
    transform: scale(1.05);
}

.mobile-menu-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* ============================================
   MOBILE MENU - BASE STYLES
   ============================================ */

#mobile-menu {
    position: relative;
    z-index: 1000;
    width: 100%;
    display: none !important; /* Force hidden by default */
}

/* Ensure mobile menu can be properly hidden */
#mobile-menu.hidden {
    display: none !important;
}

#mobile-menu.block {
    display: block !important;
}

/* Override any conflicting responsive classes */
@media (max-width: 1023px) {
    #mobile-menu {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    #mobile-menu.block {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Body class when menu is open */
body.menu-open {
    overflow: hidden !important;
}

body.menu-open #mobile-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-menu-container {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid;
    position: relative;
    z-index: 1001;
}

.mobile-nav-link {
    display: block !important;
    padding: 0.75rem 1rem;
    border-left: 4px solid;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    padding-left: 1.25rem;
}

/* ============================================
   LOGO STYLES - BASE
   ============================================ */

.navbar-container .flex-shrink-0 a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-container .flex-shrink-0 img {
    height: 2.5rem;
    width: auto;
    transition: all 0.3s ease;
}

@media (min-width: 1024px) {
    .navbar-container .flex-shrink-0 img {
        height: 3rem;
    }
}

.navbar-container .flex-shrink-0 a:hover img {
    transform: scale(1.05);
}

/* Logo text */
.navbar-container .bg-gradient-to-r {
    font-size: 1.25rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

@media (min-width: 1024px) {
    .navbar-container .bg-gradient-to-r {
        font-size: 1.5rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Ensure proper spacing */
.navbar-container .max-w-7xl {
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .navbar-container .max-w-7xl {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .navbar-container .max-w-7xl {
        padding: 0 2rem;
    }
}

/* Flex containers */
.navbar-container .flex {
    display: flex;
}

.navbar-container .items-center {
    align-items: center;
}

.navbar-container .justify-between {
    justify-content: space-between;
}

.navbar-container .space-x-3 > * + * {
    margin-left: 0.75rem;
}

.navbar-container .space-x-4 > * + * {
    margin-left: 1rem;
}

.navbar-container .space-x-8 > * + * {
    margin-left: 2rem;
}

/* Height */
.navbar-container .h-16 {
    height: 4rem;
}

@media (min-width: 1024px) {
    .navbar-container .lg\:h-20 {
        height: 5rem;
    }
}
