/*
Theme Name: Xe Ghep Ha Nam Editable
Theme URI: https://goixehn.com
Author: CÔNG TY TNHH CS HMD
Description: Theme WordPress dễ chỉnh sửa cho dịch vụ xe ghép Hà Nam - Hà Nội - Nội Bài.
Version: 2.3.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: xeghep-hanam
*/

:root {
  --green: #16a34a;
  --green-dark: #067a35;
  --blue: #0068ff;
  --blue-dark: #004bd6;
  --dark: #0f172a;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
  padding-bottom: 0;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
.container { width: min(1120px, calc(100% - 36px)); margin: 0 auto; }
.narrow { width: min(860px, calc(100% - 36px)); }
.section { padding: 72px 0; }
.soft-bg { background: var(--soft); }
.center { text-align: center; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { text-decoration: none; font-weight: 900; font-size: 20px; color: var(--dark); letter-spacing: -.02em; }
.brand img { max-height: 54px; width: auto; display: block; }
.main-nav { display: flex; align-items: center; gap: 18px; font-weight: 800; font-size: 15px; }
.main-nav a { text-decoration: none; color: var(--dark); }
.main-nav a:hover { color: var(--green); }
.nav-hotline { padding: 10px 14px; border-radius: 999px; color: #fff !important; background: var(--green); }
.menu-toggle { display: none; border: 0; background: var(--soft); border-radius: 12px; padding: 8px 12px; font-size: 22px; }

.hero { background: radial-gradient(circle at top left, #dcfce7 0, transparent 35%), linear-gradient(180deg, #fff 0%, #f8fafc 100%); }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 34px; align-items: center; }
.eyebrow { margin: 0 0 10px; color: var(--green-dark); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
h1, h2, h3 { color: var(--dark); line-height: 1.16; letter-spacing: -.035em; margin: 0; }
h1 { font-size: clamp(38px, 7vw, 66px); }
h2 { font-size: clamp(30px, 5vw, 46px); }
h3 { font-size: 22px; }
.hero-desc { margin: 18px 0 24px; font-size: 20px; color: var(--muted); max-width: 680px; }
.hero-note { margin: 16px 0 0; color: var(--muted); font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.center-actions { justify-content: center; }
.btn { min-height: 56px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 18px; color: #fff; text-decoration: none; font-weight: 900; box-shadow: var(--shadow); -webkit-tap-highlight-color: transparent; }
.btn-call { background: linear-gradient(135deg, var(--green), var(--green-dark)); }
.btn-zalo { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }
.btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.hero-card { background: var(--white); border: 1px solid var(--line); border-radius: 30px; padding: 24px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.stat { padding: 18px; border-radius: 22px; background: var(--soft); border: 1px solid var(--line); }
.stat strong { display: block; font-size: 30px; color: var(--dark); line-height: 1; }
.stat span { color: var(--muted); font-weight: 700; }

.section-head { margin-bottom: 26px; max-width: 760px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-head p:not(.eyebrow) { color: var(--muted); margin: 12px 0 0; font-size: 18px; }
.card-grid, .news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.route-card, .news-card, .article-card, .empty-news { background: #fff; border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 10px 28px rgba(15,23,42,.06); overflow: hidden; }
.route-card { padding: 24px; }
.route-number { display: inline-flex; width: 42px; height: 42px; border-radius: 14px; align-items: center; justify-content: center; background: #dcfce7; color: var(--green-dark); font-weight: 900; margin-bottom: 16px; }
.route-card p { color: var(--muted); }
.route-card a, .read-more { color: var(--green-dark); font-weight: 900; text-decoration: none; }

.price-table { border: 1px solid var(--line); border-radius: 26px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.price-row { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 14px; align-items: center; padding: 18px; border-bottom: 1px solid var(--line); }
.price-row:last-child { border-bottom: 0; }
.price-row span { display: inline-flex; padding: 8px 12px; border-radius: 999px; background: #dcfce7; color: var(--green-dark); font-weight: 900; }
.price-row a { display: inline-flex; justify-content: center; padding: 10px 14px; border-radius: 999px; background: var(--green); color: #fff; text-decoration: none; font-weight: 900; }

.trust-section { background: #0f172a; color: #e2e8f0; }
.trust-section h2 { color: #fff; }
.trust-section .eyebrow { color: #86efac; }
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center; }
.trust-grid p { font-size: 18px; color: #cbd5e1; }
.check-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.check-list li { padding: 16px 18px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(255,255,255,.06); font-weight: 800; }
.check-list li:before { content: "✓"; color: #86efac; margin-right: 10px; }

.news-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }

.service-slider { display: grid; gap: 18px; }
.slider-track { position: relative; min-height: 1px; }
.service-slide { display: none; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.service-slide.is-active { display: grid; }
.service-slide-media { background: linear-gradient(135deg, #ecfdf5, #eff6ff); }
.service-slide-media img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; display: block; }
.service-slide-body { padding: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.service-slide-body h3 { margin-bottom: 10px; font-size: clamp(28px, 4vw, 40px); }
.service-slide-body p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 18px; }
.service-slider-controls { display: flex; align-items: center; justify-content: center; gap: 14px; }
.slider-arrow { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--dark); font-size: 28px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 8px 20px rgba(15,23,42,.08); }
.slider-arrow:hover { color: var(--green-dark); border-color: #bbf7d0; }
.service-slider-dots { display: flex; align-items: center; gap: 8px; }
.service-slider-dots button { width: 11px; height: 11px; border-radius: 50%; border: 0; background: #cbd5e1; cursor: pointer; padding: 0; }
.service-slider-dots button.is-active { width: 30px; border-radius: 999px; background: var(--green); }
.news-body { padding: 20px; }
.news-body time { display: block; color: var(--muted); font-size: 14px; font-weight: 800; margin-bottom: 8px; }
.news-body h3, .news-body h2 { font-size: 22px; margin-bottom: 10px; }
.news-body h3 a, .news-body h2 a { text-decoration: none; }
.news-body p { color: var(--muted); }
.empty-news { padding: 24px; grid-column: 1 / -1; }
.final-cta { background: linear-gradient(135deg, #dcfce7, #dbeafe); }

.content-wrap { padding: 46px 0 84px; }
.archive-head { margin-bottom: 28px; }
.archive-grid { grid-template-columns: repeat(2, 1fr); }
.article-card { padding: 30px; }
.article-card h1 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 20px; }
.article-thumb { width: 100%; border-radius: 22px; margin: 10px 0 22px; }
.entry-content { font-size: 18px; }
.entry-content img { border-radius: 16px; }
.pagination { display: flex; gap: 12px; margin-top: 26px; }
.pagination a { background: var(--soft); border: 1px solid var(--line); padding: 10px 14px; border-radius: 999px; text-decoration: none; font-weight: 800; }

.site-footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); }
.footer-inner { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; text-align: center; }
.footer-inner strong { color: var(--dark); }



/* BẢNG GIÁ MỚI - theo mẫu ảnh người dùng gửi */
.price-section-wrap { max-width: 980px; }
.pricing-block + .pricing-block { margin-top: 34px; }
.pricing-title { display: flex; align-items: center; margin-bottom: 14px; }
.pricing-title h3 { margin: 0; font-size: clamp(24px, 3.2vw, 34px); }
.pricing-number { margin-right: 6px; }
.pricing-title-bar { width: 5px; height: 30px; border-radius: 999px; margin-right: 12px; flex: 0 0 auto; }
.pricing-title-green .pricing-title-bar { background: var(--green); }
.pricing-title-blue .pricing-title-bar { background: var(--blue); }
.pricing-card { background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 10px 28px rgba(15,23,42,.06); overflow: hidden; }
.pricing-table-wrap { overflow-x: auto; }
.pricing-table { width: 100%; min-width: 860px; border-collapse: collapse; }
.pricing-table thead th { background: #0f1833; color: #fff; font-size: 16px; text-align: left; padding: 20px 18px; font-weight: 900; }
.pricing-table thead th:first-child { width: 29%; }
.pricing-table thead th:last-child { width: 130px; text-align: center; }
.pricing-table tbody td { padding: 16px 18px; border-top: 1px solid #e8edf5; font-size: 17px; color: #334155; font-weight: 800; background: #fff; }
.pricing-table tbody tr:hover td { background: #fbfdff; }
.pricing-table .route-cell strong { color: var(--dark); }
.pricing-table .price-green { color: #16a34a; font-weight: 900; }
.table-cta-group { display: flex; align-items: center; justify-content: center; gap: 8px; }
.table-cta { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 900; }
.table-cta-call { background: #dcfce7; color: #2563eb; }
.table-cta-zalo { background: #dbeafe; color: #2563eb; }
.pricing-note { margin-top: 26px; display: flex; align-items: center; gap: 12px; background: #fff7e8; border: 1px solid #f6ddaa; border-radius: 18px; padding: 18px 20px; color: #b45309; }
.pricing-note p { margin: 0; font-weight: 800; }
.pricing-note-icon { font-size: 20px; line-height: 1; }

/* Nút Call/Zalo nổi: luôn xếp dọc ở góc phải, không nằm ngang màn hình */
.floating-cta { position: fixed; right: 16px; bottom: 18px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.floating-btn { pointer-events: auto; width: 188px; min-height: 58px; border-radius: 999px; display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 9px; color: #fff; text-decoration: none; font-weight: 900; border: 2px solid rgba(255,255,255,.9); box-shadow: 0 16px 36px rgba(15,23,42,.26); transition: transform .18s ease, filter .18s ease; }
.floating-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.floating-icon { width: 40px; height: 40px; min-width: 40px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-weight: 1000; font-size: 20px; }
.floating-btn strong, .floating-btn small { display: block; line-height: 1.1; }
.floating-btn small { margin-top: 4px; font-size: 12px; opacity: .94; }
.floating-call { background: linear-gradient(135deg, var(--green), var(--green-dark)); animation: callPulse 2.8s ease-in-out infinite; }
.floating-zalo { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }
@keyframes callPulse { 0%, 100% { box-shadow: 0 16px 36px rgba(15,23,42,.26), 0 0 0 0 rgba(22,163,74,.34); } 50% { box-shadow: 0 18px 42px rgba(15,23,42,.30), 0 0 0 10px rgba(22,163,74,0); } }

.contact-popup { position: fixed; right: 18px; bottom: 162px; z-index: 99998; width: min(330px, calc(100vw - 36px)); background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 18px; box-shadow: var(--shadow); transform: translateY(16px); opacity: 0; pointer-events: none; transition: .22s ease; }
.contact-popup.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.contact-popup strong { display: block; color: var(--dark); font-size: 20px; }
.contact-popup p { margin: 8px 0 14px; color: var(--muted); }
.popup-close { position: absolute; top: 8px; right: 10px; border: 0; background: var(--soft); width: 30px; height: 30px; border-radius: 50%; font-size: 22px; line-height: 1; }
.popup-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.popup-actions a { text-align: center; color: #fff; background: var(--green); border-radius: 14px; padding: 10px; text-decoration: none; font-weight: 900; }
.popup-actions a:last-child { background: var(--blue); }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .main-nav { display: none; position: absolute; left: 18px; right: 18px; top: 72px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 10px 12px; border-radius: 12px; }
  .hero-grid, .trust-grid, .service-slide { grid-template-columns: 1fr; }
  .card-grid, .news-grid, .archive-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
}

@media (max-width: 640px) {
  .container, .narrow { width: min(100% - 28px, 1120px); }
  .header-inner { min-height: 74px; position: relative; display: flex; align-items: center; justify-content: flex-end; }
  .brand { position: absolute; left: 50%; transform: translateX(-50%); max-width: calc(100% - 120px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; font-size: 22px; font-weight: 1000; }
  .brand img { max-height: 40px; width: auto; }
  .main-nav { top: 74px; }
  .menu-toggle { margin-left: auto; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; min-height: 58px; border-radius: 16px; }
  .price-row { grid-template-columns: 1fr; gap: 10px; }
  .price-row a { width: 100%; }
  .pricing-title h3 { font-size: 24px; }
  .pricing-note { align-items: flex-start; padding: 16px; }
  .article-card { padding: 20px; border-radius: 22px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .floating-cta { right: 10px; bottom: 12px; gap: 8px; }
  .floating-btn { width: 154px; min-height: 54px; border-radius: 18px; padding: 8px; gap: 8px; }
  .floating-icon { width: 34px; height: 34px; min-width: 34px; font-size: 17px; }
  .floating-btn strong { font-size: 14px; }
  .floating-btn small { font-size: 10px; }
  .contact-popup { right: 10px; bottom: 136px; width: min(310px, calc(100vw - 20px)); }
  .service-slide-body { padding: 20px; }
  .service-slide-media img { min-height: 220px; }
  .service-slider-controls { gap: 10px; }
}


/* Mobile: bảng giá chuyển thành từng card, không cần kéo ngang */
@media (max-width: 640px) {
  .price-section-wrap { max-width: 100%; }
  .pricing-block + .pricing-block { margin-top: 28px; }
  .pricing-card {
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .pricing-table-wrap {
    overflow: visible;
  }
  .pricing-table {
    min-width: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 14px;
  }
  .pricing-table thead {
    display: none;
  }
  .pricing-table tbody,
  .pricing-table tr,
  .pricing-table td {
    display: block;
    width: 100%;
  }
  .pricing-table tbody tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 14px;
    box-shadow: 0 10px 28px rgba(15,23,42,.06);
  }
  .pricing-table tbody td {
    border-top: 0;
    padding: 10px 0;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    background: transparent;
  }
  .pricing-table tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 14px;
    font-weight: 900;
    flex: 0 0 94px;
  }
  .pricing-table .route-cell {
    display: block;
    padding-bottom: 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
  }
  .pricing-table .route-cell::before {
    display: block;
    margin-bottom: 4px;
  }
  .pricing-table .route-cell strong {
    display: block;
    font-size: 18px;
  }
  .pricing-table .price-green {
    color: #16a34a;
    font-weight: 1000;
  }
  .table-cta-group {
    justify-content: flex-end;
    gap: 10px;
  }
  .table-cta {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 18px;
  }
}

/* ===== FIX MENU HEADER FINAL - DESKTOP BLOCK, MOBILE ẨN ===== */

/* Desktop: menu hiện dạng block đẹp */
@media (min-width: 861px) {
  .site-header .menu-toggle {
    display: none !important;
  }

  .site-header .main-nav.top-menu-blocks {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    width: auto !important;
    position: static !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    flex: 1 1 auto !important;
  }

  .site-header .top-menu-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }

  .site-header .top-menu-list li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .site-header .top-menu-list a {
    display: block !important;
    padding: 10px 14px !important;
    background: #ffffff !important;
    border: 1px solid #dbe3ef !important;
    border-radius: 14px !important;
    text-decoration: none !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06) !important;
    white-space: nowrap !important;
    line-height: 1.15 !important;
  }

  .site-header .top-menu-list a:hover {
    background: #f0fdf4 !important;
    border-color: #16a34a !important;
    color: #16a34a !important;
    transform: translateY(-1px);
  }

  .site-header .top-menu-list .current-menu-item > a,
  .site-header .top-menu-list .current_page_item > a {
    background: #e8fff1 !important;
    border-color: #16a34a !important;
    color: #067a35 !important;
  }

  .site-header .top-menu-list li:last-child > a {
    background: #16a34a !important;
    color: #ffffff !important;
    border-color: #16a34a !important;
  }

  .site-header .top-menu-list li:last-child > a:hover {
    background: #067a35 !important;
    color: #ffffff !important;
  }
}

/* Mobile/tablet: menu ẩn, chỉ hiện khi bấm nút ☰ */
@media (max-width: 860px) {
  .site-header .header-inner {
    position: relative !important;
  }

  .site-header .menu-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: auto !important;
    z-index: 10001 !important;
  }

  .site-header .main-nav.top-menu-blocks {
    display: none !important;
    position: absolute !important;
    left: 14px !important;
    right: 14px !important;
    top: 74px !important;
    width: auto !important;
    padding: 14px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .12) !important;
    z-index: 10000 !important;
  }

  .site-header .main-nav.top-menu-blocks.is-open {
    display: block !important;
  }

  .site-header .main-nav.top-menu-blocks .top-menu-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .site-header .main-nav.top-menu-blocks .top-menu-list li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .site-header .main-nav.top-menu-blocks .top-menu-list a {
    display: block !important;
    width: 100% !important;
    padding: 13px 14px !important;
    text-align: center !important;
    background: #ffffff !important;
    border: 1px solid #dbe3ef !important;
    border-radius: 14px !important;
    text-decoration: none !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06) !important;
    line-height: 1.25 !important;
  }

  .site-header .main-nav.top-menu-blocks .top-menu-list li:last-child > a {
    background: #16a34a !important;
    color: #ffffff !important;
    border-color: #16a34a !important;
  }
}
