/* ==========================================================================
   Langmaster Careers — Site Shell (header + footer)
   Pure CSS, no framework. Theme via :root variables.
   ========================================================================== */

:root {
    --brand: #db1f1f;
    --brand-dark: #b3141a;
    --brand-2: #e51c30;
    --brand-soft: #fff1f1;

    --navy: #0a1529;
    --navy-2: #111f3a;
    --navy-3: #1b2c4d;

    --ink: #252525;
    --muted: #6b7280;
    --line: #e6e8ee;
    --bg: #ffffff;
    --gold: #ffd071;

    --shell-max: 1280px;
    --nav-h: 72px;
    --radius: 10px;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(10, 21, 41, .06);
    --shadow-md: 0 8px 24px rgba(10, 21, 41, .12);
    --ease: cubic-bezier(.4, .14, .3, 1);

    --font-shell: "Reddit Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Shared container */
.shell {
    width: 100%;
    max-width: var(--shell-max);
    margin-inline: auto;
    padding-inline: 20px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
    font-family: var(--font-shell);
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg);
    box-shadow: var(--shadow-sm);
}

/* --- Row 1: contact + search + social --- */
.topbar {
    background: #fff;
    border-bottom: 1px solid #f1eeee;
}

.topbar .shell {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 53px;
}

.topbar__contact {
    display: flex;
    align-items: center;
    gap: 26px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.topbar__contact a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--brand);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .2s var(--ease);
}

.topbar__contact a:hover { opacity: .72; }

.topbar__contact i {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    background: var(--brand);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
}

.topbar__search {
    position: relative;
    margin-inline: auto;
    flex: 0 0 316px;
    width: 316px;
    max-width: 316px;
}

.topbar__search input {
    width: 100%;
    height: 36px;
    border: 0;
    border-radius: 42px;
    background: #fff;
    color: var(--ink);
    padding: 0 16px 0 40px;
    font: inherit;
    font-size: 14px;
    outline: none;
    box-shadow: 0 1px 6px 0 rgba(219, 31, 31, .24);
    transition: box-shadow .2s var(--ease);
}

.topbar__search input::placeholder { color: #b9b1b1; }

.topbar__search input:focus {
    box-shadow: 0 1px 6px 0 rgba(219, 31, 31, .24), 0 0 0 3px rgba(219, 31, 31, .12);
}

.topbar__search button {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--brand);
    cursor: pointer;
    font-size: 14px;
}

.topbar__social {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.topbar__social a {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    text-decoration: none;
    transition: transform .2s var(--ease), background .2s var(--ease);
}

.topbar__social a:hover {
    background: var(--brand-dark);
    transform: translateY(-2px);
}

/* --- Row 2: achievements (red bar) --- */
.promobar {
    background: linear-gradient(180deg, #DB1F1F 0%, #9D0B0F 100%);
    color: #fff;
    overflow: hidden;
}

.promobar__marquee {
    display: flex;
    width: max-content;
    animation: promo-scroll 28s linear infinite;
}

.promobar:hover .promobar__marquee { animation-play-state: paused; }

.promobar__track {
    display: flex;
    align-items: center;
    gap: 44px;
    padding-right: 44px;
    min-height: 40px;
    flex: 0 0 auto;
}

@keyframes promo-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .promobar__marquee { animation: none; }
}

.promo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 26px;
    white-space: nowrap;
}

.promo img {
    height: 20px;
    width: auto;
    flex: 0 0 auto;
    object-fit: contain;
}

.promo strong { font-weight: 900; }

/* --- Row 3: main nav --- */
.navbar__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--nav-h);
}

.navbar__brand {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
}

.navbar__brand img {
    width: 174px;
    height: 18px;
    display: block;
}

.navbar__menu {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu__item { position: relative; }

.menu__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 11px;
    height: var(--nav-h);
    color: var(--ink);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s var(--ease);
}

.menu__link .caret {
    font-size: 11px;
    opacity: .85;
    transition: transform .25s var(--ease);
}

.menu__item:hover > .menu__link,
.menu__link.active { color: var(--brand); }

.menu__item:hover > .menu__link .caret { transform: rotate(180deg); }

/* Submenu (desktop dropdown) */
.submenu {
    position: absolute;
    top: calc(100% - 8px);
    left: 0;
    min-width: 240px;
    list-style: none;
    margin: 0;
    padding: 8px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
    z-index: 10;
}

.menu__item:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu a {
    display: block;
    padding: 10px 12px;
    border-radius: 7px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background .18s var(--ease), color .18s var(--ease);
}

.submenu a:hover,
.submenu a.active {
    background: var(--brand-soft);
    color: var(--brand);
}

/* CTA: Tìm việc ngay */
.menu__item--cta { margin-left: 8px; }

.btn-apply {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 178px;
    height: 45px;
    padding: 0 16px;
    border-radius: 22px;
    background: linear-gradient(180deg, #DB1F1F 0%, #9D0B0F 100%);
    color: #ffeb94 !important;
    font-family: "SVN-Gilroy", var(--font-shell);
    font-weight: 800;
    font-size: 18px;
    line-height: 21px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 -2px 10px 0 rgba(219, 31, 31, .44);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s var(--ease);
}

.btn-apply__arrow {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 235, 148, .2);
    color: #ffeb94;
    font-size: 12px;
    flex: 0 0 auto;
}

.btn-apply:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 -2px 10px 0 rgba(219, 31, 31, .44), 0 8px 18px rgba(157, 11, 15, .35);
}

/* Hamburger */
.navbar__toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 0;
    border-radius: 10px;
    background: var(--brand);
    cursor: pointer;
    padding: 0;
    place-items: center;
}

.navbar__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px auto;
    background: #fff;
    border-radius: 2px;
}

/* Backdrop */
.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 21, 41, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s;
    z-index: 1099;
}

/* ==========================================================================
   RESPONSIVE — header
   ========================================================================== */
@media (max-width: 1200px) {
    .promo { font-size: 13px; }
    .promobar__track { gap: 12px; }
}

@media (max-width: 991px) {
    .promobar__marquee { animation-duration: 20s; }
    .promo { font-size: 12.5px; }
    .promobar__track { gap: 32px; padding-right: 32px; }

    .topbar .shell { gap: 12px; min-height: 48px; }
    .topbar__contact li:not(:first-child) { display: none; }
    .topbar__search { flex: 1 1 auto; width: auto; max-width: none; }
    .topbar__social { display: none; }

    :root { --nav-h: 64px; }

    .navbar__toggle { display: grid; }

    .navbar__menu {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(86vw, 340px);
        background: #fff;
        display: block;
        overflow-y: auto;
        padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
        transform: translateX(-100%);
        transition: transform .32s var(--ease);
        box-shadow: 0 0 40px rgba(0, 0, 0, .2);
        z-index: 1100;
    }

    .site-header.is-open .navbar__menu { transform: translateX(0); }
    .site-header.is-open .nav-backdrop { opacity: 1; visibility: visible; }

    .navbar__menu::before {
        content: "MENU";
        display: block;
        font-weight: 800;
        font-size: 12px;
        letter-spacing: 2px;
        color: var(--muted);
        padding: 4px 8px 14px;
        border-bottom: 1px solid var(--line);
        margin-bottom: 8px;
    }

    .menu { flex-direction: column; align-items: stretch; gap: 2px; }
    .menu__item { position: static; }

    .menu__link {
        height: auto;
        padding: 13px 10px;
        border-radius: 8px;
        justify-content: space-between;
    }

    .menu__item.is-expanded > .menu__link .caret { transform: rotate(180deg); }

    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        border-left: 2px solid var(--line);
        border-radius: 0;
        margin: 0 0 6px 14px;
        padding: 2px 0 2px 8px;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s var(--ease);
    }

    .menu__item.is-expanded > .submenu { max-height: 600px; }

    .menu__item--cta { margin: 14px 0 0; }
    .btn-apply { width: 100%; height: 50px; justify-content: center; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    font-family: var(--font-shell);
    background: var(--navy);
    color: #aeb9cc;
    font-size: 14px;
    line-height: 1.65;
}

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

.footer__top {
    padding: 56px 0 40px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 36px;
}

.footer__brand img { max-width: 180px; height: auto; margin-bottom: 18px; }

.footer__tagline { color: #93a1b8; margin: 0 0 20px; max-width: 280px; }

.footer__social { display: flex; gap: 10px; }

.footer__social a {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--navy-3);
    color: #cbd5e1;
    font-size: 16px;
    transition: background .2s var(--ease), transform .2s var(--ease), color .2s var(--ease);
}

.footer__social a:hover { background: var(--brand); color: #fff; transform: translateY(-3px); }

.footer__col h3 {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin: 0 0 16px;
    padding-bottom: 12px;
    position: relative;
}

.footer__col h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 3px;
    border-radius: 2px;
    background: var(--brand);
}

.footer__block + .footer__block { margin-top: 24px; }

.footer__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 11px;
}

.footer__item i { color: var(--brand-2); font-size: 13px; margin-top: 5px; flex: 0 0 auto; }
.footer__item p { margin: 0; }
.footer__item a:hover { color: #fff; }

.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 0; }

.footer__bottom .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.footer__bottom p { margin: 0; font-size: 13px; color: #8493aa; }

@media (max-width: 991px) {
    .footer__top { grid-template-columns: 1fr 1fr; gap: 28px; padding: 40px 0 28px; }
}

@media (max-width: 560px) {
    .footer__top { grid-template-columns: 1fr; }
    .footer__bottom .shell { justify-content: center; text-align: center; }
}
