.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #fff;
    transition: transform 0.3s ease-in-out;
}

.header-hidden {
    transform: translateY(-100%);
}

.masthead {
    width: 100%;
}

.masthead__primary {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: stretch;
}

.masthead__primary-left {
    background-color: #fff;
    padding: 10px 0;
    display: flex;
    align-items: center;
    border-right: 1px solid #e0e0e0;
    padding-right: 20px;
}

.site-logo {
    display: block;
    line-height: 0;
}

.site-logo .logo {
    height: 70px;
    width: auto;
    display: block;
}

.masthead__primary-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.masthead__primary-right-top {
    background-color: #fff;
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.button-menu {
    display: flex;
    gap: 0;
}

.btn-header {
    padding: 10px 20px;
    background-color: #fff;
    color: #000;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid #000;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.btn-header:first-child {
    background-color: #e31837;
    color: #fff;
    border-color: #e31837;
    margin-left: 0;
}

.btn-header:first-child:hover {
    background-color: #c41530;
    border-color: #c41530;
}

.btn-header:not(:first-child):hover {
    background-color: #f5f5f5;
}

.language-switcher {
    display: flex;
    align-items: center;
}

.language-toggle {
    background: none;
    border: none;
    color: #333;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 5px 10px;
}

.search-toggle,
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.icon-search {
    width: 16px;
    height: 16px;
}

.hamburger-inner {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #333;
    position: relative;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background-color: #333;
    position: absolute;
}

.hamburger-inner::before {
    top: -6px;
}

.hamburger-inner::after {
    top: 6px;
}

.menu-toggle .label {
    font-size: 0.75rem;
    color: #333;
}

.masthead__primary-right-bottom {
    background-color: #fff;
    padding: 0;
    border-bottom: 1px solid #e0e0e0;
}

.main-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: space-between;
    width: 100%;
}

.main-menu li {
    border-right: 1px solid #e0e0e0;
}

.main-menu li:last-child {
    border-right: none;
}

.main-menu a {
    color: #000;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 18px 30px;
    display: block;
    transition: background-color 0.3s ease;
}

.main-menu a:hover {
    background-color: #f5f5f5;
}

.menu-item-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    z-index: 1000;
    border-top: 3px solid #e31837;
}

.menu-item-dropdown:hover .dropdown-menu {
    display: flex;
}

.dropdown-menu a {
    padding: 15px 25px;
    font-size: 0.85rem;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

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

.dropdown-menu a:hover {
    background-color: #f5f5f5;
}

body {
    padding-top: 140px;
}

@media (max-width: 1024px) {
    .masthead__primary {
        padding: 0 20px;
        grid-template-columns: 1fr;
    }
    
    .masthead__primary-left {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-right: 0;
        padding-bottom: 10px;
        justify-content: center;
    }
    
    .main-menu ul {
        flex-wrap: wrap;
    }
    
    .main-menu a {
        padding: 15px 20px;
        font-size: 0.9rem;
    }
    
    body {
        padding-top: 170px;
    }
}

@media (max-width: 768px) {
    .masthead__primary {
        padding: 0 16px;
    }
    
    .site-logo .logo {
        height: 55px;
    }
    
    .masthead__primary-right-top {
        padding: 10px 0;
        gap: 10px;
    }
    
    .btn-header {
        padding: 8px 16px;
        font-size: 0.75rem;
    }
    
    .main-menu ul {
        flex-direction: column;
    }
    
    .main-menu li {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .main-menu li:last-child {
        border-bottom: none;
    }
    
    .main-menu a {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-top: none;
        border-left: 3px solid #e31837;
        margin-left: 16px;
    }
    
    .dropdown-menu a {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
    
    body {
        padding-top: 190px;
    }
}

@media (max-width: 480px) {
    .masthead__primary {
        padding: 0 16px;
    }
    
    .site-logo .logo {
        height: 55px;
    }
    
    .masthead__primary-left {
        padding: 12px 0;
    }
    
    .masthead__primary-right-top {
        padding: 12px 0;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .button-menu {
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }
    
    .btn-header {
        padding: 12px 16px;
        font-size: 0.75rem;
        margin-left: 0;
        flex: 1;
        text-align: center;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
    }
    
    .btn-header:first-child {
        margin-left: 0;
    }
    
    .language-toggle {
        font-size: 0.75rem;
        padding: 8px 12px;
        min-height: 44px;
    }
    
    .search-toggle,
    .menu-toggle {
        padding: 8px 12px;
        min-height: 44px;
        min-width: 44px;
    }
    
    .icon-search {
        width: 16px;
        height: 16px;
    }
    
    .hamburger-inner {
        width: 20px;
    }
    
    .hamburger-inner::before,
    .hamburger-inner::after {
        width: 20px;
    }
    
    .menu-toggle .label {
        font-size: 0.75rem;
        font-weight: 700;
    }
    
    .main-menu a {
        padding: 14px 16px;
        font-size: 0.9rem;
        min-height: 48px;
    }
    
    .dropdown-menu {
        margin-left: 12px;
    }
    
    .dropdown-menu a {
        padding: 12px 16px;
        font-size: 0.85rem;
        min-height: 44px;
    }
    
    body {
        padding-top: 200px;
    }
}
