/* =============================================================================
   VietStage Thanh Hóa – main.css
   Design tokens · Reset · Typography · Layout · Buttons · Header · Footer
   Phong cách: Minimalism – nhiều khoảng trắng, đường mảnh, 2 màu nhấn (đỏ son & vàng đồng)
============================================================================= */

:root {
    /* Màu thương hiệu (lấy từ thiết kế) */
    --c-red: #9c1e1b;
    --c-red-600: #b3241f;
    --c-red-800: #7e1512;
    --c-red-900: #5e0f0d;
    --c-gold: #d5a869;
    --c-gold-300: #e2c087;
    --c-gold-100: #f5e8d2;
    --c-cream: #fcf5eb;
    --c-cream-50: #fdfbf7;
    --c-ink: #1f1a17;
    --c-text: #3d3632;
    --c-muted: #7a716b;
    --c-line: #ece4d8;
    --c-white: #fff;

    /* Typography */
    --f-head: 'Oswald', 'Arial Narrow', sans-serif;
    --f-body: 'Barlow Semi Condensed', 'Segoe UI', Roboto, sans-serif;
    --f-script: 'Great Vibes', cursive;

    /* Layout */
    --container: 1320px;
    --gutter: clamp(16px, 4vw, 40px);
    --header-h: 96px;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --section-y: clamp(56px, 7vw, 104px);

    /* Motion */
    --ease: cubic-bezier(.22, .61, .36, 1);
    --t: .3s var(--ease);

    --shadow-sm: 0 1px 2px rgba(31, 26, 23, .06), 0 2px 8px rgba(31, 26, 23, .05);
    --shadow: 0 8px 28px rgba(31, 26, 23, .09);
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    font-family: var(--f-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--t); }
a:hover { color: var(--c-red); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--f-head);
    font-weight: 500;
    line-height: 1.2;
    color: var(--c-ink);
}
p { margin: 0; }
:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 3px; }
::selection { background: var(--c-red); color: #fff; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip-link:focus {
    clip: auto; width: auto; height: auto;
    top: 8px; left: 8px; z-index: 1000;
    padding: 10px 16px;
    background: var(--c-red); color: #fff;
}

/* ── Icons ───────────────────────────────────────────────────────────────── */
.icon { flex-shrink: 0; vertical-align: middle; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(780px + var(--gutter) * 2); }
.container--mid { max-width: calc(1000px + var(--gutter) * 2); }

.section { position: relative; padding-block: var(--section-y); overflow: hidden; }
.section--tight { padding-block: clamp(40px, 5vw, 72px); }
.section--cream { background: var(--c-cream-50); }
.section + .section--cream,
.section--cream + .section:not(.section--cream) { border-top: 1px solid var(--c-line); }

/* ── Typography helpers ─────────────────────────────────────────────────── */
.section-title {
    font-size: clamp(28px, 3.1vw, 44px);
    font-weight: 500;
    text-transform: uppercase;
    color: var(--c-red);
    letter-spacing: .005em;
    line-height: 1.4;
}
.section-title.has-line::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    margin-top: 20px;
    background: var(--c-gold);
    border-radius: 2px;
}
.section-header--center .section-title.has-line::after { margin-inline: auto; }
.section-desc {
    margin-top: 18px;
    font-size: clamp(16px, 1.25vw, 18px);
    color: var(--c-text);
    max-width: 60ch;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-family: var(--f-head);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--c-gold);
}
.eyebrow::before { content: ''; width: 24px; height: 1px; background: currentColor; }
.eyebrow--light { color: var(--c-gold-300); }

.meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 14px;
    color: var(--c-muted);
}
.meta .icon { color: var(--c-muted); }
.meta-sep { width: 4px; height: 4px; margin-inline: 6px; border-radius: 50%; background: var(--c-line); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 26px;
    font-family: var(--f-head);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    border: 1.5px solid transparent;
    border-radius: 999px;
    transition: background var(--t), color var(--t), border-color var(--t), transform var(--t);
    white-space: nowrap;
}
.btn .btn-icon { transition: transform var(--t); }
.btn:hover .btn-icon { transform: translateX(3px); }
.btn-primary { background: var(--c-red); color: #fff; border-color: var(--c-red); }
.btn-primary:hover { background: var(--c-red-800); border-color: var(--c-red-800); color: #fff; }
.btn-outline { color: var(--c-red); border-color: var(--c-red); background: transparent; }
.btn-outline:hover { background: var(--c-red); color: #fff; }
.btn-light { background: #fff; color: var(--c-red); border-color: #fff; }
.btn-light:hover { background: transparent; color: #fff; }
.btn-sm { min-height: 36px; padding: 6px 16px; font-size: 13px; gap: 8px; }
.btn-sm .icon { width: 16px; height: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--c-ink);
    transition: background var(--t), color var(--t);
}
.icon-btn:hover { background: rgba(156, 30, 27, .08); color: var(--c-red); }

.link-arrow {
    display: inline-grid;
    place-items: center;
    width: 38px; height: 38px;
    border: 1px solid var(--c-line);
    border-radius: 50%;
    color: var(--c-red);
    transition: var(--t);
}
.link-arrow:hover { background: var(--c-red); border-color: var(--c-red); color: #fff; }

.chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text);
    border: 1px solid var(--c-line);
    border-radius: 999px;
    background: #fff;
    transition: var(--t);
}
.chip:hover { border-color: var(--c-red); color: var(--c-red); }
.chip.is-active { background: var(--c-red); border-color: var(--c-red); color: #fff; }
.chip--light { background: rgba(255, 255, 255, .92); border-color: transparent; color: var(--c-red); font-size: 13px; padding: 4px 12px; }
.chip--sm { padding: 2px 10px; font-size: 12px; }

/* =============================================================================
   HEADER
============================================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--c-cream);
    transition: box-shadow var(--t), background var(--t);
}
.admin-bar .site-header { top: 32px; }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--c-line), 0 6px 24px rgba(31, 26, 23, .06); }

.header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    height: var(--header-h);
    transition: height var(--t);
}
.site-header.is-scrolled .header-inner { height: 76px; }

.header-brand { flex-shrink: 0; display: block; }
.header-logo { width: auto; height: 64px; transition: height var(--t); }
.site-header.is-scrolled .header-logo { height: 52px; }

.nav-main { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.nav-list > li { position: relative; }
.nav-list > li > a {
    position: relative;
    display: block;
    padding: 8px 0;
    font-family: var(--f-head);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--c-ink);
}
.nav-list > li > a::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: var(--c-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t);
}
.nav-list > li > a:hover,
.nav-list > .current-menu-item > a,
.nav-list > .current-menu-ancestor > a { color: var(--c-red); }
.nav-list > li > a:hover::after,
.nav-list > .current-menu-item > a::after,
.nav-list > .current-menu-ancestor > a::after { transform: scaleX(1); }

/* Dropdown cấp 2 */
.nav-list .sub-menu {
    position: absolute;
    top: 100%;
    left: -16px;
    min-width: 220px;
    padding: 8px 0;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--t);
}
.nav-list li:hover > .sub-menu,
.nav-list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav-list .sub-menu a { display: block; padding: 8px 16px; font-size: 15px; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: flex; align-items: center; gap: 8px; }
.lang-flag {
    display: block;
    line-height: 0;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
    opacity: .55;
    transition: opacity var(--t), transform var(--t);
}
.lang-flag:hover, .lang-flag.is-active { opacity: 1; }
.lang-flag:hover { transform: translateY(-1px); }
.flag { border-radius: 2px; }
.nav-toggle { display: none; }

/* ── Mobile drawer ───────────────────────────────────────────────────────── */
.mobile-drawer { position: fixed; inset: 0; z-index: 200; visibility: hidden; }
.mobile-drawer.is-open { visibility: visible; }
.mobile-drawer-backdrop {
    position: absolute; inset: 0;
    background: rgba(31, 26, 23, .45);
    opacity: 0;
    transition: opacity var(--t);
}
.mobile-drawer.is-open .mobile-drawer-backdrop { opacity: 1; }
.mobile-drawer-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(380px, 88vw);
    background: var(--c-cream);
    transform: translateX(100%);
    transition: transform .4s var(--ease);
    overflow-y: auto;
}
.mobile-drawer.is-open .mobile-drawer-panel { transform: none; }
.mobile-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--c-line);
}
.mobile-drawer-head img { height: 48px; width: auto; }
.mobile-drawer-nav { padding: 12px 20px; flex: 1; }
.mobile-nav-list > li { border-bottom: 1px solid var(--c-line); }
.mobile-nav-list a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 0;
    font-family: var(--f-head);
    font-size: 18px;
    text-transform: uppercase;
    color: var(--c-ink);
}
.mobile-nav-list .current-menu-item > a { color: var(--c-red); }
.mobile-nav-list .sub-menu { padding: 0 0 12px 16px; }
.mobile-nav-list .sub-menu a { padding: 8px 0; font-size: 16px; text-transform: none; font-family: var(--f-body); }
.mobile-drawer-foot { display: grid; gap: 12px; padding: 20px; border-top: 1px solid var(--c-line); }
.mobile-drawer-slogan { font-family: var(--f-head); color: var(--c-red); text-transform: uppercase; letter-spacing: .04em; }
.contact-line { display: flex; align-items: center; gap: 10px; color: var(--c-text); }
.contact-line .icon { color: var(--c-red); }
.mobile-drawer-lang { display: flex; gap: 16px; padding-top: 8px; }
.mobile-drawer-lang a { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; opacity: .6; }
.mobile-drawer-lang a.is-active { opacity: 1; font-weight: 600; }

/* ── Search overlay ──────────────────────────────────────────────────────── */
.search-overlay {
    position: fixed;
    inset: 0 0 auto;
    z-index: 210;
    padding-block: 28px;
    background: #fff;
    box-shadow: var(--shadow);
    transform: translateY(-100%);
    transition: transform .4s var(--ease);
}
.search-overlay.is-open { transform: none; }
.search-overlay-form {
    display: flex; align-items: center; gap: 16px;
    border-bottom: 1.5px solid var(--c-ink);
    color: var(--c-red);
}
.search-overlay-form input {
    flex: 1;
    padding: 14px 0;
    font-family: var(--f-head);
    font-size: clamp(20px, 3vw, 32px);
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--c-ink);
}

/* =============================================================================
   FOOTER
============================================================================= */
.site-footer {
    position: relative;
    padding-top: clamp(96px, 11vw, 190px);
    padding-bottom: clamp(48px, 6vw, 96px);
    color: rgba(255, 255, 255, .86);
    isolation: isolate;
}
.footer-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url('../images/footer-bg.webp') center top / cover no-repeat;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr .8fr 1.1fr 1.25fr;
    gap: clamp(28px, 4vw, 64px);
}
.footer-logo { width: auto; height: 84px; }
.footer-title {
    margin-bottom: 18px;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
}
.footer-links-list { display: grid; gap: 8px; }
.footer-links-list a,
.footer-contact a { color: rgba(255, 255, 255, .82); }
.footer-links-list a:hover,
.footer-contact a:hover { color: var(--c-gold-300); }
.footer-contact { display: grid; gap: 12px; font-size: 16px; }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; }
.footer-contact .icon { margin-top: 3px; color: #fff; }

.social-links { display: flex; gap: 14px; margin-top: 22px; }
.social-links a {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    border-radius: 50%;
    transition: color var(--t), transform var(--t), background var(--t);
}
.social-links a:hover { color: var(--c-gold-300); transform: translateY(-2px); }
.social-links--dark a { color: var(--c-red); border: 1px solid var(--c-line); }
.social-links--dark a .icon { width: 20px; height: 20px; }
.social-links--dark a:hover { background: var(--c-red); border-color: var(--c-red); color: #fff; }

.footer-newsletter-desc { margin-bottom: 14px; font-size: 16px; }
.newsletter-form {
    display: flex;
    background: #fff;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.newsletter-form input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 0;
    outline: 0;
    color: var(--c-ink);
    font-size: 15px;
}
.newsletter-form button {
    display: grid;
    place-items: center;
    width: 52px;
    margin: 4px;
    color: var(--c-red);
    border: 1.5px solid var(--c-red);
    border-radius: 4px;
    transition: var(--t);
}
.newsletter-form button:hover { background: var(--c-red); color: #fff; }
.form-message { min-height: 1.4em; margin-top: 8px; font-size: 14px; }
.form-message.is-error { color: #ffd5c9; }
.site-main .form-message.is-error { color: var(--c-red); }
.form-message.is-success { color: var(--c-gold-300); }
.site-main .form-message.is-success { color: #2f7d4c; }
.footer-copyright { margin-top: 18px; font-size: 14px; color: rgba(255, 255, 255, .65); }

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 90;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #fff;
    background: var(--c-red);
    border-radius: 50%;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: var(--t);
}
.back-to-top .icon { transform: rotate(180deg); }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--c-red-800); }

/* =============================================================================
   RESPONSIVE – HEADER/FOOTER
============================================================================= */
@media (max-width: 1100px) {
    .nav-list { gap: 20px; }
    .nav-list > li > a { font-size: 14px; }
}
@media (max-width: 1024px) {
    :root { --header-h: 76px; }
    .nav-main { display: none; }
    .header-actions { margin-left: auto; }
    .nav-toggle { display: inline-grid; }
    .header-logo { height: 52px; }
    .site-header.is-scrolled .header-inner { height: 68px; }
    .site-header.is-scrolled .header-logo { height: 46px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 782px) {
    .admin-bar .site-header { top: 46px; }
}
@media (max-width: 600px) {
    body { font-size: 16px; }
    .lang-switch { display: none; }
    .header-logo { height: 46px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-logo { height: 72px; }
}
@media (max-width: 600px) {
    #wpadminbar { position: fixed; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
