/* Header CSS */
/* Global Anchor Fix */
a {
    pointer-events: auto !important;
    touch-action: manipulation;
}

:root {
    --primary-gradient: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-effect-enhanced {
    background: rgba(61, 26, 31, 0.85);
    /* Matches Maroon Theme #3d1a1f */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}


.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.02em;
    touch-action: manipulation;
    /* Improves touch response */
    cursor: pointer;
    z-index: 50;
    /* Ensure it sits above background effects */
    transform: translateZ(0);
    /* Force layer/hit-test clarity */
    -webkit-tap-highlight-color: transparent;
    /* Remove mobile tap highlight interference */
}

@media (hover: hover) {
    .nav-link:hover {
        color: #fbbf24;
        background: rgba(255, 255, 255, 0.05);
    }
}

.nav-link.active {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #fbbf24;
    border-radius: 2px;
    box-shadow: 0 0 10px #fbbf24;
}

.btn-interactive {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.btn-interactive:active {
    transform: scale(0.95);
}

.btn-primary {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: #0f172a;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

@media (hover: hover) {
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
    }
}

/* Brand Styles */
.brand-title-main {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.05em;
}

.brand-title-sub {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: #fbbf24;
    letter-spacing: 0.1em;
}

.logo-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #fbbf24;
    border-radius: 50%;
    box-shadow: 0 0 10px #fbbf24;
    animation: pulse 2s infinite;
}

.logo-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.3) 0%, transparent 70%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.group:hover .logo-glow {
    opacity: 1;
}

/* Profile Dropdown */
.profile-dropdown {
    background: #ffffff;
    /* White Nuance */
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform-origin: top right;
    animation: dropdownEntrance 0.2s ease-out;
}

@keyframes dropdownEntrance {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

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

.profile-dropdown-header {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
    /* Keep Dark Red header for contrast */
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 4px solid #fef2f2;
    /* Soft separator */
}

.profile-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-info .name {
    font-weight: 700;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.profile-info .email {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.profile-dropdown-items {
    padding: 0.5rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #475569;
    /* Slate 600 */
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    font-weight: 600;
}

.dropdown-item:hover {
    background: #fef2f2;
    /* Red 50 */
    color: #991b1b;
    /* Red 800 */
    transform: translateX(4px);
}

.dropdown-item-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    /* Slate 100 */
    color: #64748b;
    transition: all 0.2s ease;
}

.dropdown-item:hover .dropdown-item-icon {
    background: #ffffff;
    color: #dc2626;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    inset: 0;
    z-index: 100;
}

.sidebar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.sidebar-panel {
    position: relative;
    width: 70%;
    max-width: 260px;
    height: 100%;
    background: linear-gradient(135deg, #3d1a1f 0%, #5a2a2d 50%, #441f24 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    animation: slideInLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

.sidebar-panel.out {
    animation: slideOutLeft 0.3s ease-in forwards;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

.sidebar-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #94a3b8;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo img {
    width: 2.5rem;
    height: 2.5rem;
}

.sidebar-logo-text {
    font-weight: 800;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-nav-item {
    color: #94a3b8;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
}

.sidebar-nav-item:hover,
.sidebar-nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: #fbbf24;
    padding-left: 1.5rem;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}