/**
 * Header Redesign Styles
 * Top bar and main navigation with modern design
 */

/* Top Bar Styles */
.top-bar {
    background: linear-gradient(135deg, rgba(107, 33, 168, 0.08) 0%, rgba(220, 38, 38, 0.08) 100%);
    border-bottom: 1px solid rgba(107, 33, 168, 0.12);
    padding: 10px 0;
    font-size: 14px;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6B21A8;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 4px 8px;
    border-radius: 6px;
}

.top-bar-item:hover {
    color: #DC2626;
    background: rgba(107, 33, 168, 0.08);
    transform: translateY(-1px);
}

.top-bar-item svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0;
}

.top-bar-divider {
    width: 1px;
    height: 20px;
    background: rgba(107, 33, 168, 0.3);
    margin: 0 15px;
}

.top-bar-social {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6B21A8;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 6px 10px;
    border-radius: 8px;
    position: relative;
}

.top-bar-social::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(107, 33, 168, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.top-bar-social:hover::before {
    width: 100%;
    height: 100%;
}

.top-bar-social:hover {
    color: #DC2626;
    transform: translateY(-2px) scale(1.05);
}

.top-bar-social span {
    position: relative;
    z-index: 1;
}

.top-bar-social svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Main Header Styles */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(107, 33, 168, 0.1);
}

.main-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-bottom-color: rgba(107, 33, 168, 0.15);
}

.main-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    transition: padding 0.3s ease;
}

.main-header.scrolled .main-header-content {
    padding: 14px 0;
}

/* Logo Section */
.header-logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    animation: fadeInLeft 0.6s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.header-logo-icon {
    width: 55px;
    height: 55px;
    background: transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-logo-icon:hover {
    transform: scale(1.05) rotate(2deg);
}

.header-logo-icon img,
.header-logo-icon svg {
    filter: drop-shadow(0 4px 8px rgba(107, 33, 168, 0.2));
    transition: filter 0.3s ease;
}

.header-logo-icon:hover img,
.header-logo-icon:hover svg {
    filter: drop-shadow(0 6px 12px rgba(107, 33, 168, 0.4));
}

.header-logo-icon span {
    font-size: 24px;
    font-weight: 900;
    color: white;
    position: relative;
    z-index: 1;
}

.header-logo-text {
    display: flex;
    flex-direction: column;
}

.header-logo-name {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, #6B21A8 0%, #DC2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    line-height: 1.1;
    transition: all 0.3s ease;
}

.header-logo-section a:hover .header-logo-name {
    background: linear-gradient(135deg, #7C3AED 0%, #EF4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-logo-tagline {
    font-size: 11px;
    font-weight: 600;
    color: #6B21A8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-top: 2px;
}

/* Navigation Section */
.header-nav-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

.header-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    animation: fadeInRight 0.6s ease-out 0.2s both;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.header-nav-link {
    padding: 12px 18px;
    color: #374151;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.header-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(107, 33, 168, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 0;
}

.header-nav-link:hover::before {
    left: 100%;
}

.header-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #6B21A8 0%, #DC2626 100%);
    border-radius: 2px 2px 0 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.header-nav-link:hover {
    color: #6B21A8;
    transform: translateY(-2px);
}

.header-nav-link:hover::after {
    width: 60%;
    transform: translateX(-50%) scaleX(1);
}

.header-nav-link.active {
    color: #6B21A8;
    background: linear-gradient(135deg, rgba(107, 33, 168, 0.08) 0%, rgba(220, 38, 38, 0.08) 100%);
}

.header-nav-link.active::after {
    width: 60%;
    transform: translateX(-50%) scaleX(1);
}

/* Stagger animation for nav links */
.header-nav-links a {
    animation: fadeInRight 0.6s ease-out both;
}

.header-nav-links a:nth-child(1) { animation-delay: 0.1s; }
.header-nav-links a:nth-child(2) { animation-delay: 0.15s; }
.header-nav-links a:nth-child(3) { animation-delay: 0.2s; }
.header-nav-links a:nth-child(4) { animation-delay: 0.25s; }
.header-nav-links a:nth-child(5) { animation-delay: 0.3s; }
.header-nav-links a:nth-child(6) { animation-delay: 0.35s; }
.header-nav-links a:nth-child(7) { animation-delay: 0.4s; }

/* Dropdown Menu */
.header-nav-dropdown {
    position: relative;
}

.header-nav-dropdown > .header-nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-nav-dropdown > .header-nav-link::after {
    content: '▼';
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.header-nav-dropdown:hover > .header-nav-link::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    margin-top: 8px;
}

.header-nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    color: #6B21A8;
    background: rgba(107, 33, 168, 0.05);
    padding-left: 24px;
}

/* CTA Button */
.header-cta-button {
    padding: 14px 28px;
    background: linear-gradient(135deg, #6B21A8 0%, #DC2626 100%);
    color: white;
    font-weight: 700;
    font-size: 15px;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    margin-left: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(107, 33, 168, 0.3);
}

.header-cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.header-cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.header-cta-button:hover {
    background: linear-gradient(135deg, #7C3AED 0%, #EF4444 100%);
    color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(107, 33, 168, 0.5);
    border-color: transparent;
}

.header-cta-button:active {
    transform: translateY(-1px) scale(1);
}

.header-cta-button span {
    position: relative;
    z-index: 1;
}

.header-cta-button {
    animation: fadeInRight 0.6s ease-out 0.3s both;
}

.header-cta-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.header-cta-button:hover svg {
    transform: translateX(5px);
}

.header-cta-button {
    animation: fadeInRight 0.6s ease-out 0.3s both;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    padding: 10px;
    background: rgba(107, 33, 168, 0.05);
    border: 2px solid rgba(107, 33, 168, 0.2);
    border-radius: 10px;
    cursor: pointer;
    color: #6B21A8;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(107, 33, 168, 0.1);
    border-color: rgba(107, 33, 168, 0.4);
    transform: scale(1.05);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.mobile-menu-btn.active svg {
    transform: rotate(90deg);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 24px;
    border-top: 1px solid rgba(107, 33, 168, 0.1);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.mobile-menu.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu a {
    display: block;
    padding: 14px 18px;
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-radius: 10px;
    margin-bottom: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mobile-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, #6B21A8 0%, #DC2626 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.mobile-menu a:hover::before,
.mobile-menu a.active::before {
    transform: scaleY(1);
}

.mobile-menu a:hover {
    color: #6B21A8;
    background: linear-gradient(90deg, rgba(107, 33, 168, 0.08) 0%, transparent 100%);
    padding-left: 24px;
    transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-nav-links {
        gap: 2px;
    }
    
    .header-nav-link {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .header-logo-name {
        font-size: 24px;
    }
    
    .header-logo-tagline {
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .top-bar-left {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    
    .top-bar-right {
        justify-content: center;
        width: 100%;
    }
    
    .top-bar-divider {
        display: none;
    }
    
    .main-header-content {
        flex-wrap: wrap;
    }
    
    .header-nav-section {
        order: 3;
        width: 100%;
        margin-top: 16px;
    }
    
    .header-nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .header-cta-button {
        margin-left: auto;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .header-logo-name {
        font-size: 20px;
    }
    
    .header-logo-tagline {
        font-size: 9px;
    }
    
    .header-logo-icon {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 640px) {
    .top-bar {
        padding: 8px 0;
        font-size: 12px;
    }
    
    .top-bar-item {
        gap: 6px;
    }
    
    .top-bar-item svg {
        width: 14px;
        height: 14px;
    }
    
    .header-logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .header-logo-icon span {
        font-size: 20px;
    }
    
    .header-logo-name {
        font-size: 18px;
    }
    
    .header-cta-button {
        padding: 10px 16px;
        font-size: 14px;
    }
}

