/*
 * CSS bổ sung riêng cho bản WordPress.
 *
 * Tệp này KHÔNG sửa bộ nhận diện đã duyệt trong style.css. Nó chỉ lo ba việc mà
 * bản HTML tĩnh không có:
 *
 *   1. Bản HTML dùng thẻ button cho các nút gọi điện, Zalo, chọn tuyến, chọn xe;
 *      bản WordPress đổi sang thẻ a để bấm là gọi hoặc mở trang thật. Trình duyệt
 *      tạo kiểu mặc định cho hai thẻ này khác nhau nên phải chỉnh lại cho khớp.
 *   2. Tạo kiểu cho các lớp do khung giao diện cha sinh ra (widget, vùng quảng
 *      cáo). Giao diện con không nạp CSS của cha nên thiếu bước này thì widget
 *      hiện ra trần trụi.
 *   3. Nội dung do trình soạn thảo của WordPress sinh ra: ảnh có chú thích,
 *      khối căn rộng, danh sách, trích dẫn, bảng, bình luận.
 *
 * Nạp sau cùng nên mọi quy tắc ở đây thắng khi trùng độ ưu tiên.
 */

/* =====================================================================
 * 1. Thẻ a đóng vai nút
 * ================================================================== */

.phone-link,
.contact-call,
.contact-zalo,
.fleet-card,
.btn-route,
.text-link,
.mobile-quick-contact .btn {
  text-decoration: none;
}

.phone-link,
.contact-call,
.contact-zalo,
.fleet-card {
  cursor: pointer;
}

/* Thẻ a không kế thừa cỡ chữ như button nên phải nói rõ. */
.phone-link,
.fleet-card,
.btn-route {
  font: inherit;
}

.fleet-card {
  color: inherit;
}

.footer-contact a,
.footer-links a {
  text-decoration: none;
}

.footer-contact a:hover,
.footer-links a:hover {
  text-decoration: underline;
}

/* Lô-gô do quản trị viên tải lên, thay cho vùng ảnh cắt từ tấm tư liệu. */
.navbar-brand .logo-site {
  height: 46px;
  width: auto;
  display: block;
}

.footer-brand .footer-logo-anh {
  max-height: 52px;
  width: auto;
}

/* =====================================================================
 * 2. Biểu mẫu đặt xe
 * ================================================================== */

/* Ô bẫy máy tự động: người thật không thấy, máy tự động vẫn đọc được trong mã nguồn. */
.o-bay {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status.is-success {
  color: #0a7a43;
  font-weight: 600;
}

.form-status.is-error {
  color: #bd1430;
}

.booking-submit .btn:disabled {
  opacity: 0.65;
  cursor: progress;
}

/* Ảnh đại diện thật trong thẻ đánh giá, thay cho vùng ảnh của bản thiết kế. */
.review-avatar-anh {
  width: 43px;
  height: 43px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}

.review-avatar-anh img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Ảnh minh hoạ tuyến và dịch vụ khi quản trị viên đã tải ảnh riêng. */
.route-card > .route-photo:not(.art),
.service-card > .service-photo:not(.art) {
  display: block;
  overflow: hidden;
}

.route-card > .route-photo:not(.art) img,
.service-card > .service-photo:not(.art) img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =====================================================================
 * 3. Widget của khung giao diện cha
 * ================================================================== */

.widget {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
}

.widget__tieu-de {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 14px;
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget li + li {
  margin-top: 10px;
}

.widget a {
  color: #164c95;
  text-decoration: none;
}

.widget a:hover {
  color: var(--blue);
  text-decoration: underline;
}

/* Nút dùng chung của khung cha. */
.nut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.nut--chinh {
  background: var(--blue);
  color: #fff;
}

.nut--phu {
  background: var(--red);
  color: #fff;
}

.nut--vien {
  border-color: var(--blue);
  color: var(--blue);
  background: transparent;
}

.nut--rong {
  width: 100%;
}

.nut--lon {
  min-height: 52px;
  font-size: 17px;
}

/* Widget bảng giá. */
.bang-gia__dong {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
}

.bang-gia__dong:last-child {
  border-bottom: 0;
}

.bang-gia__ten {
  color: var(--navy);
}

.bang-gia__gia {
  font-weight: 700;
  color: var(--red);
  white-space: nowrap;
}

.bang-gia__ghi-chu {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 0;
}

/* Widget kêu gọi hành động. */
.khoi-cta {
  border-radius: 14px;
  padding: 22px;
  text-align: center;
}

.khoi-cta--nhat {
  background: var(--pale);
}

.khoi-cta--chinh {
  background: var(--navy);
  color: #fff;
}

.khoi-cta--phu {
  background: var(--red);
  color: #fff;
}

.khoi-cta--chinh a:not(.nut),
.khoi-cta--phu a:not(.nut) {
  color: #fff;
}

.khoi-cta__mo-ta {
  margin: 8px 0 16px;
  line-height: 1.6;
}

.khoi-cta__nut {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* Widget thông tin liên hệ. */
.khoi-lien-he__dau {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.khoi-lien-he__logo img {
  max-height: 44px;
  width: auto;
}

.khoi-lien-he__danh-tinh {
  font-weight: 700;
  color: var(--navy);
}

.khoi-lien-he__so {
  font-size: 20px;
  font-weight: 700;
  color: var(--red);
  text-decoration: none;
}

.khoi-lien-he__so-phu {
  font-size: 15px;
  color: var(--muted);
}

.khoi-lien-he__ds {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.khoi-lien-he__dong {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 7px 0;
}

.khoi-lien-he__icon {
  color: var(--blue);
  flex-shrink: 0;
  line-height: 1.4;
}

.khoi-lien-he__noi-dung {
  color: var(--navy);
  line-height: 1.6;
}

.khoi-lien-he__nut {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.khoi-lien-he__ban-do {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
}

/* Widget mạng xã hội. */
.mang-xa-hoi {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mang-xa-hoi a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pale);
  color: var(--navy);
}

.mang-xa-hoi a:hover {
  background: var(--blue);
  color: #fff;
}

.mang-xa-hoi--nhan a {
  width: auto;
  border-radius: 999px;
  padding: 0 16px;
  gap: 8px;
  grid-auto-flow: column;
}

/*
 * Widget danh sách bài viết. Thiếu phần này thì ảnh hiện nguyên kích thước gốc,
 * chiếm trọn chiều ngang cột bên và đẩy danh sách dài lê thê.
 */
.ds-bai-widget {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ds-bai-widget__muc {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.ds-bai-widget__muc:last-child {
  border-bottom: 0;
}

.ds-bai-widget__anh {
  width: 78px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

.ds-bai-widget__anh img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ds-bai-widget__tieu-de {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
}

.ds-bai-widget__tom-tat {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}

/* Vùng quảng cáo. */
.o-quang-cao {
  margin: 18px 0;
  text-align: center;
}

.o-quang-cao img {
  max-width: 100%;
  height: auto;
}

.o-quang-cao__nhan {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

/* Cụm nút liên hệ nổi ở góc màn hình do khung cha in ra. */
.cum-nut-noi {
  position: fixed;
  right: 14px;
  bottom: 84px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1030;
}

.nut-noi {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 41, 109, 0.28);
}

.nut-noi--goi {
  background: var(--red);
}

.nut-noi--zalo,
.nut-noi--messenger {
  background: var(--blue);
}

@media (max-width: 991.98px) {
  /* Chừa chỗ cho thanh điều hướng dưới đáy trên điện thoại. */
  .cum-nut-noi {
    bottom: 96px;
  }
}

/* =====================================================================
 * 4. Nội dung do trình soạn thảo WordPress sinh ra
 * ================================================================== */

.post-content img {
  max-width: 100%;
  height: auto;
}

.post-content figure {
  margin: 22px 0;
}

.post-content figcaption,
.wp-caption-text {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}

.post-content .alignleft {
  float: left;
  margin: 6px 22px 14px 0;
}

.post-content .alignright {
  float: right;
  margin: 6px 0 14px 22px;
}

.post-content .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.post-content blockquote {
  border-left: 4px solid var(--blue);
  background: var(--pale);
  margin: 22px 0;
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.post-content th,
.post-content td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

.post-content th {
  background: var(--pale);
  color: var(--navy);
}

/* Bảng rộng phải tự cuộn trong khung riêng, không kéo cả trang tràn ngang. */
.bang-cuon {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
}

.bang-cuon table {
  margin: 0;
  min-width: 520px;
}

.post-content pre {
  background: #0d2140;
  color: #e8f1ff;
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
}

.post-content .wp-block-embed iframe,
.post-content iframe {
  max-width: 100%;
}

/* =====================================================================
 * 5. Bình luận
 * ================================================================== */

.khu-binh-luan {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  margin-top: 26px;
}

.khu-binh-luan h2 {
  font-size: 19px;
  color: var(--navy);
  margin: 0 0 18px;
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-list .children {
  list-style: none;
  padding-left: 22px;
}

.comment-body {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.comment-author img {
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

.comment-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.comment-form label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 5px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 13px;
  font: inherit;
  margin-bottom: 14px;
}

.comment-form .submit {
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 12px 24px;
  font-weight: 700;
  min-height: 44px;
  cursor: pointer;
}

/* =====================================================================
 * 6. Vài chỗ nhỏ khác
 * ================================================================== */

/* Thanh quản trị của WordPress đẩy trang xuống 32px, đầu trang dính phải né theo. */
body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Trang có thanh điều hướng dưới đáy cần chừa chỗ để không che chân trang. */
@media (max-width: 991.98px) {
  .site-footer {
    padding-bottom: 76px;
  }
}

/* =====================================================================
 * 7. Widget dạng khối của WordPress
 * Người quản trị vẫn có thể kéo widget khối vào cột bên, nên phải tạo kiểu
 * cho chúng khớp với bộ nhận diện thay vì để nguyên kiểu mặc định.
 * ================================================================== */

.widget .wp-block-heading,
.widget .wp-block-group__inner-container > h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 14px;
}

.widget .wp-block-search__inside-wrapper {
  display: flex;
  gap: 8px;
}

.widget .wp-block-search__input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  font: inherit;
  min-width: 0;
}

.widget .wp-block-search__button {
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 0 18px;
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
}

.widget .wp-block-latest-posts,
.widget .wp-block-latest-comments,
.widget .wp-block-archives,
.widget .wp-block-categories,
.widget .wp-block-page-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget .wp-block-latest-posts li,
.widget .wp-block-latest-comments li,
.widget .wp-block-archives li,
.widget .wp-block-categories li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.55;
}

.widget .wp-block-latest-posts li:last-child,
.widget .wp-block-latest-comments li:last-child,
.widget .wp-block-archives li:last-child,
.widget .wp-block-categories li:last-child {
  border-bottom: 0;
}
