/*
 * B21 Unique Frontend Header Styles
 * Original design with no external copyright or influences
 * Custom B21 branding and styling
 */

/* Custom B21 Font Stack */
* {
    font-family: 'Inter', 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* B21 Color Variables */
:root {
    --b21-primary: #1e3a8a;      /* Deep blue */
    --b21-secondary: #059669;     /* Emerald green */
    --b21-accent: #f59e0b;        /* Amber */
    --b21-dark: #1f2937;          /* Dark gray */
    --b21-light: #f8fafc;        /* Light gray */
    --b21-white: #ffffff;
    --b21-text: #374151;          /* Medium gray */
    --b21-text-light: #6b7280;   /* Light gray text */
    --b21-border: #e5e7eb;       /* Border color */
    --b21-hover: #3b82f6;        /* Blue hover */
}

/* Main Header Container */
.b21-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--b21-primary) 0%, var(--b21-secondary) 100%);
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.b21-header.scrolled {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.95) 0%, rgba(5, 150, 105, 0.95) 100%);
    box-shadow: 0 8px 32px rgba(30, 58, 138, 0.25);
}

/* Navigation Container */
.b21-nav {
    width: 100%;
    padding: 0;
}

.b21-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 85px;
    position: relative;
}

/* Brand/Logo Section with Unique Styling */
.b21-brand {
    display: flex;
    align-items: center;
    z-index: 10;
}

.b21-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--b21-white);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.025em;
    transition: all 0.3s ease;
    position: relative;
}

.b21-logo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--b21-accent);
    transition: width 0.3s ease;
}

.b21-logo:hover::after {
    width: 100%;
}

.b21-logo:hover {
    color: var(--b21-accent);
    transform: translateY(-1px);
}

.b21-logo-img {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.b21-logo:hover .b21-logo-img {
    filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(35deg);
}

/* Unique Navigation Center Section */
.b21-nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.b21-nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2.5rem;
    align-items: center;
}

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

.b21-nav-link {
    color: var(--b21-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.b21-nav-link:hover {
    color: var(--b21-accent);
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--b21-accent);
}

/* Unique Dropdown Design */
.b21-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--b21-white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(30, 58, 138, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 320px;
    z-index: 1001;
    border: 2px solid var(--b21-border);
    overflow: hidden;
}

.b21-nav-item:hover .b21-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.b21-dropdown-content {
    padding: 1.5rem;
}

.b21-dropdown-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.b21-dropdown-link {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--b21-text);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.b21-dropdown-link:hover {
    background: linear-gradient(135deg, var(--b21-light) 0%, rgba(30, 58, 138, 0.05) 100%);
    color: var(--b21-primary);
    border-color: var(--b21-primary);
    transform: translateX(4px);
}

.b21-dropdown-link i {
    color: var(--b21-secondary);
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.b21-link-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--b21-dark);
    margin-bottom: 4px;
}

.b21-link-desc {
    font-size: 13px;
    color: var(--b21-text-light);
    line-height: 1.5;
}

/* Right Actions Section */
.b21-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 10;
}

.b21-signin-link {
    color: var(--b21-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.b21-signin-link:hover {
    color: var(--b21-primary);
    background: var(--b21-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.b21-cta-btn {
    background: linear-gradient(135deg, var(--b21-accent) 0%, #f97316 100%);
    color: var(--b21-white);
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    position: relative;
    overflow: hidden;
}

.b21-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.b21-cta-btn:hover::before {
    left: 100%;
}

.b21-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.6);
}

.b21-cta-btn:active {
    transform: translateY(0);
}

/* Mobile Menu Toggle */
.b21-mobile-toggle {
    display: none;
}

.b21-mobile-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.b21-mobile-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.b21-hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.b21-hamburger-line {
    width: 24px;
    height: 3px;
    background: var(--b21-white);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.b21-mobile-btn.active .b21-hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.b21-mobile-btn.active .b21-hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.b21-mobile-btn.active .b21-hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation */
.b21-mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.b21-mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.b21-mobile-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: linear-gradient(135deg, var(--b21-primary) 0%, var(--b21-secondary) 100%);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    border-left: 3px solid var(--b21-accent);
}

.b21-mobile-nav.active .b21-mobile-content {
    transform: translateX(0);
}

.b21-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.b21-mobile-logo .b21-logo-img {
    height: 32px;
    width: auto;
}

.b21-mobile-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--b21-white);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.b21-mobile-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.b21-mobile-links {
    padding: 2rem;
}

.b21-mobile-section {
    margin-bottom: 2.5rem;
}

.b21-mobile-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--b21-white);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--b21-accent);
    display: inline-block;
}

.b21-mobile-nav-link {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 16px;
    padding: 12px 0;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    padding-left: 16px;
    margin-left: -16px;
}

.b21-mobile-nav-link:hover {
    color: var(--b21-accent);
    border-left-color: var(--b21-accent);
    padding-left: 24px;
}

.b21-mobile-actions {
    padding: 2rem;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.b21-mobile-signin {
    color: var(--b21-white);
    text-decoration: none;
    font-weight: 500;
    padding: 14px;
    text-align: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.b21-mobile-signin:hover {
    background: rgba(255, 255, 255, 0.2);
}

.b21-mobile-cta {
    background: linear-gradient(135deg, var(--b21-accent) 0%, #f97316 100%);
    color: var(--b21-white);
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

.b21-mobile-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.6);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .b21-container {
        padding: 0 1.5rem;
    }

    .b21-nav-links {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .b21-container {
        padding: 0 1rem;
        height: 75px;
    }

    .b21-nav-center {
        display: none;
    }

    .b21-mobile-toggle {
        display: block;
    }

    .b21-signin-link {
        display: none;
    }

    .b21-logo {
        font-size: 24px;
    }

    .b21-logo-img {
        height: 38px;
    }

    .b21-cta-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .b21-container {
        height: 70px;
        padding: 0 0.75rem;
    }

    .b21-actions {
        gap: 1rem;
    }

    .b21-cta-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .b21-logo {
        font-size: 22px;
    }

    .b21-logo-img {
        height: 35px;
    }
}

/* Smooth Scrolling and Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.b21-nav-item:hover .b21-dropdown {
    animation: fadeInUp 0.4s ease forwards;
}

/* Focus States for Accessibility */
.b21-nav-link:focus,
.b21-signin-link:focus,
.b21-cta-btn:focus {
    outline: 3px solid var(--b21-accent);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: more) {
    .b21-header {
        border-bottom: 2px solid var(--b21-white);
    }

    .b21-nav-link {
        border: 2px solid rgba(255, 255, 255, 0.5);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
