/* ==========================================
   TAJ INDIA MACHINERY - HEADER
   Matches the live tajindiamachinery.com header.
   Desktop : >= 1320px (live layout is exact from 1425px up)
   Mobile  : <  1320px (hamburger + off-canvas menu)
   Small   : <  690px  (narrow background image)
========================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    height: 110px;
    font-family: "Oxanium", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    animation: headerSlideDown 0.8s ease-out;
    animation-delay: 0.5s;
}

@keyframes headerSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.site-header,
.site-header *,
.site-header *::before,
.site-header *::after {
    box-sizing: border-box;
}

/* White logo patch + gradient bar are one transparent image */
.header-row {
    position: relative;
    width: 100%;
    height: 110px;
    background: url("../images/header-bg.webp") 0 0 / cover no-repeat;
}

/* ---------- Logo ---------- */

.brand-logo {
    position: absolute;
    top: 8px;
    left: 160px;
    display: block;
    line-height: 0;
}

.brand-logo img {
    display: block;
    width: auto;
    height: 60px;
}

/* ---------- Navigation ---------- */

.header-nav {
    position: absolute;
    top: 22px;
    left: min(calc(50% - 348.5px), calc(100% - 1061px));
    display: flex;
    gap: 1px;
}

.header-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

.header-nav .header-nav-link::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 10px;
    width: 0;
    height: 2px;
    background: #ffd9c5;
    transition: width 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

.header-nav-link:hover,
.header-nav-link:focus-visible,
.header-nav-link.active {
    color: #ffd9c5;
}

.header-nav .header-nav-link:hover::after,
.header-nav .header-nav-link:focus-visible::after,
.header-nav .header-nav-link.active::after {
    width: calc(100% - 20px);
}

/* ---------- Search ---------- */

.header-search-btn {
    position: absolute;
    top: 25px;
    left: min(calc(50% + 478.5px), calc(100% - 234px));
    display: flex;
    width: 15px;
    height: 15px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    fill: #fff;
    transition: fill 0.12s ease;
}

.header-search-btn:hover {
    fill: #dfdfdf;
}

/* ---------- Language (GTranslate) ---------- */

.gtranslate_wrapper {
    position: absolute;
    top: 10px;
    right: 130px;
    z-index: 2;
}

.site-header #gt_float_wrapper {
    position: static !important;
    background: transparent !important;
}

/* Live site uses Arial for the switcher */
body .gt_float_switcher,
body .gt_float_switcher * {
    font-family: Arial, sans-serif !important;
}

.site-header .gt_float_switcher {
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible;
}

.site-header .gt_float_switcher .gt-selected {
    background-color: transparent !important;
}

.site-header .gt_float_switcher .gt-selected .gt-current-lang {
    color: #fff !important;
    font-size: 15px;
}

.site-header .gt_float_switcher .gt_options {
    position: fixed !important;
    top: 90px;
    right: 130px;
    width: 140px;
    max-height: 250px;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.9);
    border-radius: 6px;
    z-index: 9999;
    display: none;
}

.site-header .gt_float_switcher .gt_options.gt-open {
    display: block;
}

.site-header .gt_float_switcher .gt_options a {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    color: #fff !important;
    font-size: 0 !important;
}

.site-header .gt_float_switcher .gt_options a img {
    width: 25px;
    margin-right: 5px;
}

.site-header .gt_float_switcher .gt_options a::after {
    content: attr(data-gt-lang);
    margin-left: 5px;
    font-size: 14px !important;
    font-weight: bold;
    text-transform: uppercase;
}

/* ---------- Email ---------- */

.header-email-btn {
    position: absolute;
    top: 24px;
    right: 110px;
    display: flex;
    width: 20px;
    height: 20px;
    fill: #fff;
    transition: fill 0.12s ease;
}

.header-email-btn:hover {
    fill: #ffd3bb;
}

/* ---------- Mobile menu button ---------- */

.mobile-menu-btn {
    position: absolute;
    top: 46px;
    right: 42px;
    display: none;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    fill: rgb(77, 93, 109);
}

/* ---------- Shared panel close button ---------- */

.header-panel-close {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    fill: rgba(255, 255, 255, 0.7);
    transition: fill 0.15s ease, background 0.15s ease;
}

.header-panel-close:hover {
    fill: #fff;
    background: rgba(255, 255, 255, 0.2);
}

/* ---------- Search modal ---------- */

.header-search-panel {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    background-color: rgba(18, 21, 25, 0.98);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.header-search-panel.is-open {
    opacity: 1;
    visibility: visible;
}

.header-search-form {
    position: relative;
    width: 100%;
    max-width: 800px;
}

.header-search-form input {
    width: 100%;
    height: 70px;
    padding: 0 60px 0 0;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
    font-size: 35px;
    outline: none;
}

.header-search-form input:focus {
    border-bottom-color: #fff;
}

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

.header-search-form button {
    position: absolute;
    top: 50%;
    right: 0;
    display: flex;
    padding: 10px;
    border: 0;
    background: none;
    cursor: pointer;
    fill: rgba(255, 255, 255, 0.7);
    transform: translateY(-50%);
}

.header-search-form button:hover {
    fill: #fff;
}

/* ---------- Off-canvas mobile menu ---------- */

.header-offcanvas {
    position: fixed;
    inset: 0;
    z-index: 100000;
    visibility: hidden;
    transition: visibility 0.25s ease;
}

.header-offcanvas.is-open {
    visibility: visible;
}

.header-offcanvas-inner {
    position: absolute;
    top: 0;
    right: 0;
    width: 65vw;
    height: 100%;
    padding: 90px 35px 40px;
    overflow-y: auto;
    background-color: rgba(18, 21, 25, 0.98);
    box-shadow: 0 0 70px rgba(0, 0, 0, 0.35);
    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.header-offcanvas.is-open .header-offcanvas-inner {
    transform: translateX(0);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
}

.mobile-nav .header-nav-link {
    height: auto;
    padding: 10px 0;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.mobile-nav .header-nav-link:hover,
.mobile-nav .header-nav-link.active {
    color: #8d87ff;
}

body.header-menu-open {
    overflow: hidden;
}

/* ==========================================
   MOBILE (< 1320px)
========================================== */

@media (max-width: 1319.98px) {
    .header-nav,
    .header-search-btn,
    .header-email-btn {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .brand-logo {
        left: 163px;
    }
}

@media (max-width: 768px) {
    .gtranslate_wrapper {
        top: 20px;
        right: 70px;
    }

    .site-header .gt_float_switcher .gt_options {
        top: 80px;
        right: 70px;
    }
}

/* ==========================================
   SMALL (< 690px)
========================================== */

@media (max-width: 689.98px) {
    .header-row {
        background: url("../images/header-bg-mobile.webp") 0 0 / contain no-repeat;
    }

    .brand-logo {
        top: 11px;
        left: 30px;
    }

    .brand-logo img {
        height: 53px;
    }

    .mobile-menu-btn {
        top: 26px;
        right: 40px;
        fill: #fff;
    }

    .header-offcanvas-inner {
        width: 90vw;
        background-color: #373737;
    }

    .mobile-nav .header-nav-link {
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .gtranslate_wrapper {
        top: 20px;
        right: 50px;
    }

    .site-header .gt_float_switcher .gt_options {
        top: 70px;
        right: 50px;
    }
}
