/* Header Styles - LangMaster Design */

.site-header {
    background: white;
    position: relative;
    z-index: 1000;
}

/* Top Header Bar */
.top-header {
    background: #f8f9fa;
    padding: 0.8rem 0;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.top-header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2rem;
}

/* Course Tags - Left Column */
.course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.course-tag {
    background: linear-gradient(135deg, #2E5C8A 0%, #4A90C2 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.course-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(46, 92, 138, 0.3);
    color: white;
    text-decoration: none;
}

.course-tag:visited {
    color: white;
}

/* Header Tools - Right Column */
.header-tools {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

/* Header Search */
.header-search {
    position: relative;
}

.header-search form {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.header-search form:focus-within {
    border-color: #2E5C8A;
}

.header-search input {
    border: none;
    outline: none;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    width: 200px;
    background: transparent;
}

.header-search button {
    background: #2E5C8A;
    border: none;
    color: white;
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.header-search button:hover {
    background: #1E3A5F;
}

/* Header Social */
.header-social {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.social-icon.facebook {
    background: #1877f2;
    color: white;
}

.social-icon.youtube {
    background: #ff0000;
    color: white;
}

.social-icon.tiktok {
    background: #000;
    color: white;
}

.social-icon.zalo {
    background: #0180c7;
    color: white;
}

.social-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/* Main Header */
.main-header {
    background: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1001;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Main Header when scrolled */
.main-header.scrolled {
    padding: 0.7rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.main-header.scrolled .site-logo img {
    max-height: 50px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

/* Site Branding */
.site-branding {
    flex-shrink: 0;
}

.site-logo img {
    max-height: 60px;
    width: auto;
}

.site-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2E5C8A;
}

.site-title a {
    text-decoration: none;
    color: inherit;
}

/* Navigation Wrapper */
.navigation-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: flex-end;
}

/* Main Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    position: relative;
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a {
    color: #2E5C8A;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2E5C8A;
    transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item > a::after {
    width: 100%;
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    position: relative;
}

.menu-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    position: relative;
    transition: background 0.3s ease;
    margin: 0;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
}

.menu-icon::before {
    top: -7px;
}

.menu-icon::after {
    bottom: -7px;
}

/* Active state for menu toggle */
.menu-toggle.active .menu-icon {
    background: transparent;
}

.menu-toggle.active .menu-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.active .menu-icon::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Consultation Header Button */
.header-cta {
    flex-shrink: 0;
}

.btn-consultation-header {
    background: linear-gradient(135deg, #2E5C8A 0%, #4A90C2 100%);
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-block;
    white-space: nowrap;
}

.btn-consultation-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 92, 138, 0.4);
    color: white;
}

/* Responsive Design */
@media (max-width: 991px) {
    .top-header-inner {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    
    .course-tags {
        justify-content: center;
    }
    
    .header-tools {
        justify-content: center;
    }
    
    .header-search input {
        width: 150px;
    }
    
    .navigation-wrapper {
        gap: 1rem;
    }
    
    .main-navigation ul {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .top-header {
        padding: 0.5rem 0;
    }
    
    .course-tags {
        gap: 0.3rem;
    }
    
    .course-tag {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }
    
    .header-tools {
        gap: 1rem;
    }
    
    .header-search input {
        width: 120px;
        font-size: 0.85rem;
    }
    
    .social-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .main-header {
        padding: 0.8rem 0;
    }
    
    .header-inner {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .site-logo img {
        max-height: 50px;
    }
    
    .navigation-wrapper {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        position: relative;
        gap: 1rem;
    }
    
    /* Show menu toggle button on mobile */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        background: white;
        border: 1px solid #ddd;
        border-radius: 4px;
        cursor: pointer;
        order: 1;
    }
    
    .menu-toggle:hover {
        background: #f5f5f5;
    }
    
    /* Ensure menu icon shows */
    .menu-toggle .menu-icon {
        display: block !important;
        width: 24px;
        height: 2px;
        background: #333;
        position: relative;
    }
    
    .menu-toggle .menu-icon::before,
    .menu-toggle .menu-icon::after {
        content: '';
        display: block;
        position: absolute;
        left: 0;
        width: 24px;
        height: 2px;
        background: #333;
    }
    
    .menu-toggle .menu-icon::before {
        top: -7px;
    }
    
    .menu-toggle .menu-icon::after {
        bottom: -7px;
    }
    
    /* Active state */
    .menu-toggle.active .menu-icon {
        background: transparent;
    }
    
    .menu-toggle.active .menu-icon::before {
        transform: rotate(45deg);
        top: 0;
    }
    
    .menu-toggle.active .menu-icon::after {
        transform: rotate(-45deg);
        bottom: 0;
    }
    
    .header-cta {
        order: 2;
    }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: calc(100% + 20px);
        left: -15px;
        right: -15px;
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .main-navigation.menu-open {
        display: block;
    }
    
    .main-navigation ul {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        gap: 0;
        margin: 0;
    }
    
    .main-navigation li {
        width: 100%;
    }
    
    .main-navigation a {
        display: block;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid #eee;
    }
    
    
    .btn-consultation-header {
        font-size: 0.8rem;
        padding: 0.6rem 1.2rem;
    }
}

@media (max-width: 480px) {
    .top-header-inner {
        gap: 0.8rem;
    }
    
    .course-tags {
        gap: 0.3rem;
    }
    
    .header-tools {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .header-search input {
        width: 100px;
    }
    
    .btn-consultation-header {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}