/* =========================================================
   BayVui Flight Styles (shortcode + CPT single/archive)
   ========================================================= */

/* ---- Tùy biến nhanh chiều cao header dính (menu) ---- */
:root{
  --bv-header-offset: 100px; /* tăng/giảm nếu header cao/thấp hơn */
}

/* ---------- Layout helpers ---------- */
.bv-container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
.bv-section{ margin-bottom: 20px; }

/* ---------- HERO / PAGE TITLE cho single CPT ---------- */
.bv-page-hero{
  background: #f3f4f6;
  /* cộng thêm offset để không “ăn” vào menu */
  padding: calc(48px + var(--bv-header-offset)) 0 32px;
  margin: 0 0 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: center; /* canh giữa toàn bộ hero */
}
.bv-page-title{
  margin: 0 auto;
  max-width: 800px;
  font-size: clamp(24px, 3.2vw, 40px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
}
.bv-single-body{ padding-top: 8px; }

/* Chỉ ẩn title post trong vùng nội dung – không ảnh hưởng header/menu của theme */
.single-bv_flight .site-main .entry-title,
.single-bv_flight .content-area .entry-title,
.single-bv_flight .hentry .entry-title,
.single-bv_flight .entry-header .entry-title{
  display: none !important;
}

/* Offset cho anchor khi theme có sticky header */
body.single-bv_flight [id]{ scroll-margin-top: var(--bv-header-offset); }

/* ---------- BẢNG GIÁ ---------- */
.bv-price-table-wrap{ margin-top: 4px; }
.bv-price-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.bv-price-table th,
.bv-price-table td{
  padding: 10px;
  border-top: 1px solid #f1f5f9;
  word-break: break-word;
}
.bv-price-table th{
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: inset 0 -2px 0 rgba(255,255,255,0.15);
}
.bv-price-table th span{
  font-weight: 400;
  text-transform: none;
  font-size: 12px;
  opacity: 0.9;
}
.bv-price-table td{ color: #111827; }
.bv-price-table tr.odd{ background: #fcfcff; }
.bv-airline{ font-weight: 600; }
.bv-oneway,
.bv-roundtrip{ text-align: center; }
.bv-price-note{
  font-size: 13px;
  color: #6b7280;
  margin-top: 8px;
}

/* Mobile card layout cho bảng giá */
@media (max-width: 640px){
  .bv-price-table thead{ display: none; }
  .bv-price-table,
  .bv-price-table tbody,
  .bv-price-table tr,
  .bv-price-table td{
    display: block;
    width: 100%;
  }
  .bv-price-table tr{
    background: #fff !important;
    margin: 0 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
  }
  .bv-price-table td{
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-top: 1px solid #f1f5f9;
  }
  .bv-price-table td:first-child{ border-top: 0; }
  .bv-price-table td::before{
    content: attr(data-label);
    font-weight: 600;
    color: #374151;
    flex: 0 0 52%;
    max-width: 52%;
  }
}

/* ---------- HÀNH LÝ & DỊCH VỤ THEO HÃNG ---------- */
.bv-baggage .bv-h2{
  font-size: clamp(18px, 2.2vw, 22px);
  margin: 0 0 10px;
  line-height: 1.25;
}
.bv-baggage .bv-h3{
  font-size: 16px;
  margin: 0 0 6px;
  line-height: 1.3;
}
.bv-baggage .bv-muted{
  color: #6b7280;
  font-size: 14px;
  margin: 0;
}

/* Grid responsive: 1 → 2 → 3 cột */
.bv-grid-3{
  display: grid;
  grid-template-columns: 1fr; /* mobile */
  gap: 12px;
}
@media (min-width: 640px){ .bv-grid-3{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px){ .bv-grid-3{ grid-template-columns: repeat(3, minmax(0,1fr)); } }

/* Card */
.bv-card{
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  overflow-wrap: anywhere;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
@media (hover:hover){
  .bv-card:hover{
    box-shadow: 0 6px 16px rgba(17,24,39,.08);
    transform: translateY(-2px);
    border-color: #d1d5db;
  }
}

/* List gọn gàng */
.bv-list{
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
}
.bv-list li{ margin: 4px 0; }

/* ---------- NAV / MỤC LỤC (nếu dùng nav tùy biến) ---------- */
nav.bv-toc{
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
  background: #fafafa;
}

/* ---------- Dark mode nhẹ ---------- */
@media (prefers-color-scheme: dark){
  .bv-page-hero{ background: #0d1220; border-bottom-color: #1f2937; }
  .bv-page-title{ color: #e5e7eb; }
  .bv-card{ background: #0b0f16; border-color: #1f2937; }
  .bv-baggage .bv-h2, .bv-baggage .bv-h3{ color: #e5e7eb; }
  .bv-list li, .bv-baggage .bv-muted{ color: #9ca3af; }
  .bv-price-table td{ color: #e5e7eb; }
  .bv-price-table tr.odd{ background: #0b0f16; }
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 640px){
  .bv-page-hero{
    padding: calc(28px + var(--bv-header-offset)) 0 22px;
  }
  .bv-page-title{ font-size: 24px; }
  .bv-card{ padding: 10px; border-radius: 10px; }
  .bv-baggage .bv-h3{ font-size: 15px; }
  .bv-list{ font-size: 13px; }
}
