.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    padding: 1rem 0;
}
.header.scrolled {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.header_top {
    position: relative;
    padding: 0 2rem;
    max-width: 1600px;
    margin: 0 auto;
}
.logo_header {
    display: inline-block;
}
.content-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 10px;
}
.title-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 2s;
    margin-top: -5px;
}
.top-line-group {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    padding-right: 20px;
    margin-bottom: 2px;
}
.the {
    color: #FFFFFF;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    opacity: 0;
    animation: fadeInThe 1s ease forwards;
    animation-delay: 2.2s;
    margin: 0 2px;
    text-transform: none;
    font-family: serif;
    transition: color 0.3s ease;
}
.title {
    color: #FFFFFF;
    font-size: 32px;
    line-height: 1;
    margin: 0;
    font-weight: normal;
    letter-spacing: 0;
    width: 100%;
    text-transform: none;
    font-family: serif;
    transition: color 0.3s ease;
}
.line {
    height: 2px;
    background-color: #FFFFFF;
    transform: scaleX(0);
    animation: drawLine 1s ease forwards;
    animation-delay: 2.5s;
    transition: background-color 0.3s ease;
}
.line.left {
    width: 10px;
    flex: none;
}
.line.right {
    flex: 1;
}
.line.bottom {
    width: 100%;
    transform-origin: right;
    margin-top: 8px;
}
.line.left,
.line.right {
    transform-origin: center;
}
.draw-hammer {
    width: 60px;
    height: 60px;
    display: block;
    cursor: pointer;
    flex-shrink: 0;
    transform: translateY(5px);
}
.header .hammer-fill {
    stroke: #FFFFFF;
    fill: #FFFFFF;
    transition: stroke 0.3s ease, fill 0.3s ease;
}
/* Color transitions */
.header.scrolled .the,
.header.scrolled .title {
    color: #000000;
}
.header.scrolled .line {
    background-color: #000000;
}
.header.scrolled .hammer-fill {
    stroke: #000000;
    fill: #000000;
}
@keyframes draw {
    0% {
        stroke-dashoffset: 12000;
        fill: transparent;
    }
    75% {
        stroke-dashoffset: 0;
        fill: transparent;
    }
    100% {
        stroke-dashoffset: 0;
        fill: #FFFFFF;
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes fadeInThe {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes drawLine {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}
/* Rest of your header styles... */
.header_nav {
    margin-top: 1rem;
    padding: 0 2rem;
    max-width: 1600px;
    margin: 1rem auto 0;
}
.header_nav_section {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.secondary_nav_list,
.sub_nav_list {
    display: flex;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.secondary_nav_item,
.sub_nav_item {
    position: relative;
}
.secondary_nav_link,
.sub_nav_link {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.7rem;
    padding: 0.5rem 0;
    display: block;
    transition: color 0.2s ease;
}
.header.scrolled .secondary_nav_link,
.header.scrolled .sub_nav_link {
    color: #000000;
}
.secondary_nav_link:hover,
.sub_nav_link:hover {
    opacity: 0.8;
}
/* Controls */
/* Position header right cell content */
.header .header_top .fs-cell.fs-lg-8 {
    display: flex;
    justify-content: flex-end !important;
}

.header_controls {
    flex: 1;
    display: flex;
    justify-content: flex-end !important;
    align-items: center;
}
.header_controls_right {
    flex: 1;
    justify-content: flex-end;
    display: flex;
    gap: 1rem;
}
.header_menu_handle,
.header_search_handle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: #FFFFFF;
}
.header.scrolled .header_menu_handle,
.header.scrolled .header_search_handle {
    color: #000000;
}
.header_menu_handle_icon,
.header_search_handle_icon {
    display: block;
    width: 24px;
    height: 24px;
}
.symbol_menu,
.symbol_search {
    fill: #FFFFFF;
}
.header.scrolled .symbol_menu,
.header.scrolled .symbol_search {
    fill: #000000;
}
/* Search */
.site_search_lg {
    display: none;
}
/* Mobile styles */
@media (max-width: 768px) {
    .header {
        height: 80px;
    }
    .header_nav {
        display: none;
    }
    .header_menu_handle_label,
    .header_search_handle_label {
        display: none;
    }
    .content-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding-top: 0;
    }
    .title-container {
        width: 100%;
        align-items: center;
        margin-top: 0;
    }
    .top-line-group {
        padding-right: 0;
    }
    .title {
        font-size: 24px;
    }
    .the {
        font-size: 14px;
    }
    .line.left {
        width: 20px;
    }
    .draw-hammer {
        width: 40px;
        height: 40px;
        transform: none;
    }
    .line {
        height: 1px;
    }
}
/* Fix title link underline */
.content-wrapper {
    text-decoration: none;
}

/* Invert SVG icon when scrolled */
.header.scrolled .draw-hammer {
    filter: invert(1);
}


/* Main Navigation Menu */
.header_nav .moduletable {
    width: 100%;
}

.mod-menu.mod-list.nav,
ul.mod-menu.mod-list.nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.mod-menu.mod-list.nav .nav-item {
    flex-shrink: 0;
    position: relative;
}

.mod-menu.mod-list.nav .nav-item > a,
.mod-menu.mod-list.nav .nav-item > .mod-menu__heading,
.mod-menu.mod-list.nav .nav-item > .nav-header {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mod-menu.mod-list.nav .nav-item > a:hover,
.mod-menu.mod-list.nav .nav-item > .mod-menu__heading:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mod-menu.mod-list.nav img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

.mod-menu.mod-list.nav .image-title {
    color: #fff;
    font-size: 0.75rem;
}

/* Scrolled state */
.header.scrolled .mod-menu.mod-list.nav .nav-item > a,
.header.scrolled .mod-menu.mod-list.nav .nav-item > .mod-menu__heading,
.header.scrolled .mod-menu.mod-list.nav .nav-item > .nav-header,
.header.scrolled .mod-menu.mod-list.nav .image-title {
    color: #000;
}

.header.scrolled .mod-menu.mod-list.nav .nav-item > a:hover,
.header.scrolled .mod-menu.mod-list.nav .nav-item > .mod-menu__heading:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.header.scrolled .mod-menu.mod-list.nav img {
    filter: brightness(0);
}

/* Dropdown menus */
.mod-menu.mod-list.nav .mod-menu__sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(0, 0, 0, 0.95);
    min-width: 200px;
    padding: 0.5rem 0;
    border-radius: 6px;
    z-index: 1000;
    list-style: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 0.25rem;
}

.mod-menu.mod-list.nav .nav-item:hover > .mod-menu__sub {
    display: block;
}

.mod-menu.mod-list.nav .mod-menu__sub .nav-item {
    position: relative;
}

.mod-menu.mod-list.nav .mod-menu__sub a {
    display: block;
    padding: 0.5rem 1rem;
    color: #fff;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.mod-menu.mod-list.nav .mod-menu__sub a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Nested dropdowns */
.mod-menu.mod-list.nav .mod-menu__sub .mod-menu__sub {
    top: 0;
    left: 100%;
    margin-top: 0;
    margin-left: 0.25rem;
}


/* ==========================================================================
   Header Search Bar - Enhanced Styling
   ========================================================================== */

.header_search_bar {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.header-search-form {
    width: 100%;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.search-icon {
    color: rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
    margin-right: 0.75rem;
    transition: color 0.3s ease;
}

.search-input-wrapper:focus-within .search-icon {
    color: rgba(255, 255, 255, 1);
}

.header-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    min-width: 0;
}

.header-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.header-search-input:focus::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.header-search-submit {
    background: #3d4f5f !important;
    color: #fff;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.header-search-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.header-search-submit:active {
    transform: translateY(0);
}

/* Scrolled state */
.header.scrolled .search-input-wrapper {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
}

.header.scrolled .search-input-wrapper:focus-within {
    background: rgba(0, 0, 0, 0.08);
    border-color: var(--color-accent);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.header.scrolled .search-icon {
    color: rgba(0, 0, 0, 0.6);
}

.header.scrolled .search-input-wrapper:focus-within .search-icon {
    color: var(--color-accent);
}

.header.scrolled .header-search-input {
    color: #333;
}

.header.scrolled .header-search-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Compact Search Bar
   ========================================================================== */

.header_search_compact {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.header-search-form-compact {
    display: flex;
}

.search-compact-wrapper {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    border-bottom: 2px solid #fff;
    border-radius: 0;
    padding: 0.4rem 0.5rem 0.4rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-compact-wrapper:focus-within {
    background: transparent;
    border-bottom-color: #fff;
    box-shadow: none;
}

.search-icon-compact {
    color: #fff;
    flex-shrink: 0;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.search-compact-wrapper:focus-within .search-icon-compact {
    color: #fff;
    transform: scale(1.1);
}

.search-input-compact {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.9rem;
    padding: 0.3rem 0;
    width: 140px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input-compact:focus {
    width: 200px;
}

.search-input-compact::placeholder {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.search-input-compact:focus::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-submit-compact {
    background: transparent;
    color: #fff;
    border: none;
    padding: 0.35rem 0.6rem;
    border-radius: 0;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-submit-compact:hover {
    color: rgba(255, 255, 255, 0.8);
}

.search-submit-compact:active {
    color: rgba(255, 255, 255, 0.6);
}

/* Scrolled state for compact search */
.header.scrolled .search-compact-wrapper {
    background: transparent;
    border-bottom-color: rgba(0, 0, 0, 0.3);
}

.header.scrolled .search-compact-wrapper:focus-within {
    background: transparent;
    border-bottom-color: #1a1a2e;
    box-shadow: none;
}

.header.scrolled .search-submit-compact {
    color: #1a1a2e;
}

.header.scrolled .search-submit-compact:hover {
    color: rgba(26, 26, 46, 0.6);
}

.header.scrolled .search-icon-compact {
    color: rgba(0, 0, 0, 0.6);
}

.header.scrolled .search-compact-wrapper:focus-within .search-icon-compact {
    color: var(--color-accent);
}

.header.scrolled .search-input-compact {
    color: #333;
}

.header.scrolled .search-input-compact::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Responsive Search
   ========================================================================== */

@media (max-width: 768px) {
    .header_search_bar {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .header-search-submit {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
    
    .header-search-input {
        font-size: 0.9rem;
    }
    
    .search-input-compact {
        width: 100px;
    }
    
    .search-input-compact:focus {
        width: 140px;
    }
    
    .search-submit-compact {
        padding: 0.3rem 0.7rem;
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   Search Autocomplete Dropdown
   ========================================================================== */

.search-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}

.search-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #f0f0f0;
}

.search-autocomplete-item:last-child {
    border-bottom: none;
}

.search-autocomplete-item:hover,
.search-autocomplete-item.selected {
    background-color: #f5f5f5;
}

.search-autocomplete-icon {
    flex-shrink: 0;
    color: #999;
}

.search-autocomplete-text {
    flex: 1;
    color: #333;
    font-size: 0.9rem;
}

.search-autocomplete-text strong {
    color: var(--color-accent);
    font-weight: 600;
}

/* Dark mode dropdown for transparent header state */
.header:not(.scrolled) .search-autocomplete-dropdown {
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.header:not(.scrolled) .search-autocomplete-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.header:not(.scrolled) .search-autocomplete-item:hover,
.header:not(.scrolled) .search-autocomplete-item.selected {
    background-color: rgba(255, 255, 255, 0.1);
}

.header:not(.scrolled) .search-autocomplete-icon {
    color: rgba(255, 255, 255, 0.6);
}

.header:not(.scrolled) .search-autocomplete-text {
    color: #fff;
}

.header:not(.scrolled) .search-autocomplete-text strong {
    color: #9db5ff;
}

@media (max-width: 768px) {
    .search-autocomplete-dropdown {
        border-radius: 8px;
    }
    
    .search-autocomplete-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .search-autocomplete-text {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   Header Styles for Pages Without Hero
   ========================================================================== */

/* When page has no hero, give header a solid background */
.no-hero .header {
    background-color: #2c3e50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Keep the header styling consistent when scrolled on no-hero pages */
.no-hero .header.scrolled {
    background-color: #fff;
}

.no-hero .header.scrolled .title,
.no-hero .header.scrolled .the {
    color: #333;
}

.no-hero .header.scrolled .line {
    background-color: #333;
}

.no-hero .header.scrolled .mod-menu.mod-list.nav .nav-item > a,
.no-hero .header.scrolled .mod-menu.mod-list.nav .nav-item > .mod-menu__heading {
    color: #333;
}

.no-hero .header.scrolled .search-input-compact {
    color: #333;
}

.no-hero .header.scrolled .search-icon-compact {
    color: #666;
}

/* Position header right cell content to the right */
.header .header_top .fs-cell.fs-lg-8 {
    display: flex;
    justify-content: flex-end !important;
}

/* Position search to far right of header */
.header_top .fs-cell.fs-lg-8 {
    position: static;
}

.header_search_compact {
    position: absolute;
    right: 5rem;
    top: 50%;
    transform: translateY(-50%);
}

/* ==========================================================================
   LOGIN ICON
   ========================================================================== */

.header_login_icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.login-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    padding: 0.5rem;
}

.login-icon-link svg {
    fill: #fff;
}

.login-icon-link:hover {
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
}

.login-icon-link:hover svg {
    fill: rgba(255, 255, 255, 0.8);
}

.header.scrolled .login-icon-link {
    background: transparent;
    color: #1a1a2e;
    border: none;
}

.header.scrolled .login-icon-link svg {
    fill: #1a1a2e;
}

.header.scrolled .login-icon-link:hover {
    background: transparent;
    color: rgba(26, 26, 46, 0.7);
}

.header.scrolled .login-icon-link:hover svg {
    fill: rgba(26, 26, 46, 0.7);
}

/* User dropdown for logged in users */
.user-menu-dropdown {
    position: relative;
}

.user-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.5rem;
}

.user-icon-btn svg {
    fill: #fff;
}

.user-icon-btn:hover {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
}

.user-icon-btn:hover svg {
    fill: rgba(255, 255, 255, 0.8);
}

.header.scrolled .user-icon-btn {
    background: transparent;
    color: #1a1a2e;
    border: none;
}

.header.scrolled .user-icon-btn svg {
    fill: #1a1a2e;
}

.header.scrolled .user-icon-btn:hover {
    background: transparent;
    color: rgba(26, 26, 46, 0.7);
}

.header.scrolled .user-icon-btn:hover svg {
    fill: rgba(26, 26, 46, 0.7);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-menu-dropdown:hover .user-dropdown-menu,
.user-menu-dropdown:focus-within .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-name {
    display: block;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #1a1a2e;
    background: #f8f8f8;
    border-bottom: 1px solid #e5e5e5;
    font-size: 0.9rem;
}

.user-dropdown-menu a {
    display: block;
    padding: 0.65rem 1rem;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s ease;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .header_search_compact {
        right: 3rem;
    }
    
    .header_login_icon {
        right: 0.5rem;
    }
    
    .login-icon-link svg,
    .user-icon-btn svg {
        width: 20px;
        height: 20px;
    }
}
