/*
|--------------------------------------------------------------------------
| T-Dev Header
|--------------------------------------------------------------------------
*/

/* =========================================================
   Header
========================================================= */

.site-header {

    background: var(--header-bg);

    border-bottom: 1px solid var(--border);

    position: sticky;

    top: 0;

    z-index: 999;
}


/* =========================================================
   Header Inner
========================================================= */

.header-inner {

    width: 100%;

    min-height: 80px;

    display: flex;

    align-items: center;

    justify-content: space-between;
}


/* =========================================================
   Logo
========================================================= */

.site-logo {

    display: flex;

    align-items: center;

    flex-shrink: 0;
}

.site-logo a {

    display: flex;

    align-items: center;

    text-decoration: none;
}

.site-logo img {

    display: block;

    width: 205px;

    height: 48px;
}


/* =========================================================
   Desktop Navigation
========================================================= */

.main-navigation {

    margin-left: auto;

    margin-right: 40px;
}

.main-menu {

    display: flex;

    align-items: center;

    list-style: none;

    margin: 0;

    padding: 0;

    gap: 36px;
}

.main-menu li {

    margin: 0;

    padding: 0;
}

.main-menu a {

    text-decoration: none;

    color: var(--text);

    font-weight: 500;

    transition: color 0.2s ease;
}

.main-menu a:hover {

    color: var(--primary);
}


/* =========================================================
   Header Actions
========================================================= */

.header-actions {

    display: flex;

    align-items: center;

    gap: 14px;

    flex-shrink: 0;
}


/* =========================================================
   Icon Buttons
========================================================= */

.icon-btn {

    width: 42px;

    height: 42px;

    padding: 0;

    border: 1px solid transparent;

    border-radius: var(--radius-md);

    background: var(--surface-light);

    color: var(--text);

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.icon-btn:hover {

    background: var(--border-light);

    border-color: var(--border);
}

.icon-btn img {

    display: block;

    width: 20px;

    height: 20px;
}


/* =========================================================
   Sign In
========================================================= */

.signin-btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    text-decoration: none;

    padding: 11px 22px;

    background: var(--primary);

    color: var(--white);

    border-radius: var(--radius-md);

    font-weight: 600;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.signin-btn:hover {

    background: var(--primary-hover);
}


/* =========================================================
   Accessibility
========================================================= */

.icon-btn:focus-visible,
.signin-btn:focus-visible,
.main-menu a:focus-visible {

    outline: 3px solid rgba(37, 99, 235, 0.35);

    outline-offset: 3px;
}


/* =========================================================
   Mobile Menu Button
========================================================= */

.mobile-menu-toggle {

    display: none;

    width: 42px;

    height: 42px;

    padding: 0;

    border: 1px solid transparent;

    border-radius: var(--radius-md);

    background: var(--surface-light);

    color: var(--text);

    cursor: pointer;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    gap: 5px;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.mobile-menu-toggle:hover {

    background: var(--border-light);

    border-color: var(--border);
}

.mobile-menu-toggle span {

    display: block;

    width: 20px;

    height: 2px;

    background: var(--text);

    border-radius: 2px;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}


/* =========================================================
   Mobile Menu Open Icon
========================================================= */

.mobile-menu-toggle.is-open span:nth-child(1) {

    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.is-open span:nth-child(2) {

    opacity: 0;
}

.mobile-menu-toggle.is-open span:nth-child(3) {

    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   Mobile Navigation
========================================================= */

.mobile-navigation {

    display: none;
}

.mobile-menu {

    list-style: none;

    margin: 0;

    padding: 10px 0;
}

.mobile-menu li {

    margin: 0;

    padding: 0;
}

.mobile-menu a {

    display: block;

    padding: 14px 0;

    text-decoration: none;

    color: var(--text);

    font-weight: 500;

    border-bottom: 1px solid var(--border-light);

    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}

.mobile-menu a:hover {

    color: var(--primary);
}


/* =========================================================
   Header Search Panel
========================================================= */

.header-search-panel {

    position: absolute;

    top: 100%;

    left: 0;

    right: 0;

    display: flex;

    justify-content: center;

    padding: 20px 24px;

    background: var(--surface);

    border-top: 1px solid var(--border);

    border-bottom: 1px solid var(--border);

    box-shadow: var(--shadow-md);

    z-index: 998;
}


/* =========================================================
   Search Form
========================================================= */

.header-search-form {

    width: 100%;

    max-width: 700px;

    display: flex;

    align-items: center;

    gap: 10px;
}


/* =========================================================
   Search Input
========================================================= */

.header-search-form input {

    flex: 1;

    min-width: 0;

    height: 46px;

    padding: 0 16px;

    border: 1px solid var(--border);

    border-radius: var(--radius-md);

    background: var(--surface);

    color: var(--text);

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}

.header-search-form input::placeholder {

    color: var(--text-muted);
}

.header-search-form input:focus {

    border-color: var(--primary);

    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}


/* =========================================================
   Search Button
========================================================= */

.header-search-submit {

    height: 46px;

    padding: 0 22px;

    border: none;

    border-radius: var(--radius-md);

    background: var(--primary);

    color: var(--white);

    font-weight: 600;

    cursor: pointer;

    transition: background-color 0.2s ease;
}

.header-search-submit:hover {

    background: var(--primary-hover);
}


/* =========================================================
   Accessibility Helper
========================================================= */

.screen-reader-text {

    position: absolute;

    width: 1px;

    height: 1px;

    padding: 0;

    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}


/* =========================================================
   Hidden
========================================================= */

[hidden] {

    display: none !important;
}