/* Public Navbar Styles - Consistent Format */

/* Base navbar styles */
.navbar-blur {
    background: linear-gradient(135deg, #ac1e06 0%, #dc2626 50%, #daf9fc 100%);
    border-bottom: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.navbar-scrolled .nav-logo,
.navbar-scrolled .nav-link {
    color: #374151 !important;
}

.navbar-scrolled .nav-login {
    border-color: #dc2626;
    color: #dc2626;
}

.navbar-scrolled .nav-login:hover {
    background-color: #dc2626;
    color: white;
}

/* Container responsive */
.container-responsive {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

@media (min-width: 640px) {
    .container-responsive {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-responsive {
        padding: 0 2rem;
    }
}

/* Navbar flex container fixes */
.navbar-blur .container-responsive > .flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 64px;
}

/* Logo section container */
.navbar-blur .flex.items-center.space-x-2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* Mobile menu button positioning */
.navbar-blur .md\\:hidden {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Logo styles - Consistent */
.nav-logo {
    font-size: 0.875rem !important;
    line-height: 1.25rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 700;
}

@media (min-width: 640px) {
    .nav-logo {
        font-size: 1rem !important;
        line-height: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .nav-logo {
        font-size: 1.125rem !important;
        line-height: 1.75rem;
    }
}

/* Navigation links - Consistent */
.nav-link {
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: none;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
}

.nav-link:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.nav-link:focus {
    outline: none;
    border-radius: 4px;
}

/* Login button - Consistent */
.nav-login {
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    white-space: nowrap;
    border-width: 2px;
    border-style: solid;
}

.nav-login:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-login:focus {
    outline: none;
    outline-offset: 2px;
}

/* Dropdown styles - Consistent */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 220px;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

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

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

.dropdown-menu a {
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    text-decoration: none;
    transform: translateX(4px);
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.05) 0%, transparent 100%);
}

.dropdown-menu a:focus {
    outline: none;
    outline-offset: -2px;
}

.dropdown-menu a i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover i {
    opacity: 1;
    transform: scale(1.1);
}

/* Touch targets for mobile - Consistent */
.touch-target {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

/* Active states - Consistent */
.nav-link.text-red-200,
.dropdown-menu a.text-red-600 {
    position: relative;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .navbar-blur {
        padding: 0.5rem 0;
    }
    
    /* Fix navbar height for mobile */
    .navbar-blur .flex {
        height: 60px !important;
        min-height: 60px;
    }
    
    /* Logo section fixes */
    .nav-logo {
        font-size: 0.75rem !important;
        line-height: 1.1;
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Logo container fixes */
    .navbar-blur .flex.items-center.space-x-2 {
        flex-shrink: 1;
        min-width: 0;
        max-width: calc(100% - 60px);
    }
    
    /* Logo image fixes */
    .navbar-blur img {
        width: 32px !important;
        height: 32px !important;
        flex-shrink: 0;
    }
    
    /* Mobile menu button container */
    .md\\:hidden {
        flex-shrink: 0;
        width: 60px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
    
    .touch-target {
        padding: 0.375rem;
        min-height: 40px;
        min-width: 40px;
    }
    
    .container-responsive {
        padding: 0 0.75rem;
        max-width: 100%;
    }
    
    /* Ensure proper flex behavior */
    .container-responsive > .flex {
        width: 100%;
        max-width: 100%;
    }
    
    /* Hide desktop navigation completely on mobile */
    .hidden.md\\:flex {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .nav-logo {
        font-size: 0.65rem !important;
        line-height: 1rem;
        max-width: 160px;
    }
    
    .container-responsive {
        padding: 0 0.5rem;
    }
    
    /* Further reduce logo image on very small screens */
    .navbar-blur img {
        width: 28px !important;
        height: 28px !important;
    }
    
    /* Adjust logo container for very small screens */
    .navbar-blur .flex.items-center.space-x-2 {
        max-width: calc(100% - 50px);
        gap: 0.5rem;
    }
}

@media (max-width: 360px) {
    .nav-logo {
        font-size: 0.6rem !important;
        max-width: 140px;
    }
    
    .navbar-blur img {
        width: 24px !important;
        height: 24px !important;
    }
    
    .container-responsive {
        padding: 0 0.375rem;
    }
}

/* Focus states for accessibility - Consistent */
.nav-link:focus,
.nav-login:focus,
.dropdown-menu a:focus {
    outline: none;
    outline-offset: 2px;
    border-radius: 4px;
}

/* High contrast mode support - Consistent */
@media (prefers-contrast: high) {
    .navbar-blur {
        background: #000;
        border-bottom: 2px solid #fff;
    }
    
    .nav-link,
    .nav-logo {
        color: #fff !important;
        font-weight: 700;
    }
    
    .nav-login {
        border-color: #fff;
        color: #fff;
    }
    
    .dropdown-menu {
        background: #fff;
        border: 2px solid #000;
    }
    
    .dropdown-menu a {
        color: #000 !important;
        font-weight: 600;
    }
    
    .dropdown-menu a:hover {
        background: #000;
        color: #fff !important;
    }
}

/* Reduced motion support - Consistent */
@media (prefers-reduced-motion: reduce) {
    .navbar-blur,
    .nav-link,
    .nav-login,
    .dropdown-menu,
    .dropdown-menu a {
        transition: none;
    }
    
    .nav-link:hover,
    .nav-login:hover {
        transform: none;
    }
    
    .dropdown:hover .nav-link i {
        transform: none;
    }
}

/* Print styles - Consistent */
@media print {
    .navbar-blur {
        display: none;
    }
}

/* Loading states - Consistent */
.nav-link:disabled,
.nav-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Animation for smooth interactions */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown:hover .dropdown-menu {
    animation: fadeInDown 0.3s ease-out;
}