/*
Theme Name: Xe Ghep Child
Template: twentytwentyfive
Description: Child theme for Xe Ghep Lien Tinh
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@600;700&display=swap');

/* ===== RESET block theme header ===== */
.site-header,
header.wp-block-template-part,
.wp-block-template-part[data-slug="header"] {
    all: unset;
    display: block;
}

/* ===== WRAPPER — max 1920px, bo góc, shadow ===== */
.xg-header-wrap {
    max-width: 1920px;
    margin: 0 auto;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* ===== TOP BAR — 40px, nền xanh đậm ===== */
.xg-topbar {
    background: linear-gradient(90deg, #0D3C84 0%, #1a4fa0 100%);
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #fff;
}
.xg-topbar__left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.xg-topbar__right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.xg-topbar__cta-text {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    font-size: 13px;
    white-space: nowrap;
}
.xg-topbar__btn {
    background: #FF6A00;
    color: #fff;
    border-radius: 10px;
    padding: 6px 18px;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    transition: background .2s;
    line-height: 1;
}
.xg-topbar__btn:hover { background: #e05e00; color: #fff; }

/* ===== MAIN HEADER — 80px, nền trắng ===== */
.xg-header {
    background: #fff;
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 40px;
    gap: 0;
    position: relative;
}

/* --- Logo bên trái --- */
.xg-header__logo { flex-shrink: 0; }
.xg-header__logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.xg-header__logo img {
    height: 58px;
    width: auto;
    display: block;
}
.xg-logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #1E5BB8;
    line-height: 1.2;
}

/* --- Nav căn giữa --- */
.xg-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    height: 100%;
}
.xg-nav a {
    color: #333;
    text-decoration: none;
    padding: 0 16px;
    position: relative;
    white-space: nowrap;
    height: 80px;
    display: flex;
    align-items: center;
    transition: color .2s;
}
/* Underline animation */
.xg-nav a::after {
    content: '';
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: #1E5BB8;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s ease;
}
.xg-nav a:hover { color: #1E5BB8; }
.xg-nav a:hover::after { transform: scaleX(1); }
.xg-nav a.current-menu-item { color: #1E5BB8; }
.xg-nav a.current-menu-item::after { transform: scaleX(1); }

.xg-nav__sep {
    color: #d0d0d0;
    font-weight: 300;
    font-size: 16px;
    line-height: 1;
    user-select: none;
    flex-shrink: 0;
}

/* --- Right: search + CTA + hotline --- */
.xg-header__right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 7px;
}

/* Search box */
.xg-search {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    height: 40px;
    width: 240px;
    background: #fff;
    overflow: hidden;
}
.xg-search input {
    border: none;
    outline: none;
    padding: 0 14px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    flex: 1;
    height: 100%;
    color: #333;
    background: transparent;
    min-width: 0;
}
.xg-search input::placeholder { color: #aaa; }
.xg-search button {
    background: #1E5BB8;
    border: none;
    width: 40px;
    height: 40px;
    min-width: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    margin: 0;
}
.xg-search button svg { display: block; flex-shrink: 0; }

/* CTA buttons — viền xám nhạt, nền trắng, text #333, bo 8px */
.xg-header__cta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.xg-btn-secondary {
    border: 1px solid #d0d0d0;
    color: #333;
    background: #fff;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
    transition: border-color .2s, color .2s;
}
.xg-btn-secondary:hover {
    border-color: #1E5BB8;
    color: #1E5BB8;
}

/* Hotline */
.xg-hotline {
    font-size: 12px;
    color: #1E5BB8;
    font-family: 'Inter', sans-serif;
    text-align: right;
}
.xg-hotline a { color: #1E5BB8; text-decoration: none; }
.xg-hotline a:hover { text-decoration: underline; }

/* ===== MOBILE ===== */
.xg-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
    flex-direction: column;
    gap: 5px;
}
.xg-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    border-radius: 2px;
}
.xg-mobile-nav { display: none; }

@media (max-width: 1200px) {
    .xg-nav a { padding: 0 10px; font-size: 14px; }
    .xg-nav a::after { left: 10px; right: 10px; }
}

@media (max-width: 960px) {
    .xg-header { padding: 0 24px; }
    .xg-topbar { padding: 0 24px; }
    .xg-search { width: 180px; }
}

@media (max-width: 768px) {
    .xg-header-wrap { border-radius: 0; }
    .xg-topbar { padding: 0 16px; font-size: 12px; }
    .xg-topbar__left span { display: none; }
    .xg-header { padding: 0 16px; height: 64px; }
    .xg-nav { display: none; }
    .xg-header__right { display: none; }
    .xg-mobile-toggle { display: flex; }
    .xg-mobile-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0; right: 0;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 200;
        padding: 16px 0;
    }
    .xg-mobile-nav.open { display: block; }
    .xg-mobile-nav a {
        display: block;
        padding: 12px 24px;
        font-family: 'Poppins', sans-serif;
        font-size: 15px;
        font-weight: 600;
        color: #333;
        text-decoration: none;
        border-bottom: 1px solid #f0f0f0;
    }
    .xg-mobile-nav a:hover,
    .xg-mobile-nav a.current-menu-item { color: #1E5BB8; }
}
