/* ==========================================================================
   Gói dịch vụ — Style dùng chung cho List, Detail, Nhóm dịch vụ
   Cách dùng: enqueue file này trong functions.php, ví dụ:

   function gdv_enqueue_assets() {
       if ( is_post_type_archive( 'goi_dich_vu' ) || is_singular( 'goi_dich_vu' ) || is_tax( 'nhom_dich_vu' ) ) {
           wp_enqueue_style( 'goi-dich-vu', get_stylesheet_directory_uri() . '/goi-dich-vu.css', array(), '1.0' );
       }
   }
   add_action( 'wp_enqueue_scripts', 'gdv_enqueue_assets' );
   ========================================================================== */

/* Đã dùng cấu trúc row/row-main + large-12 col + col-inner có sẵn của theme
   (Flatsome) để bọc nội dung — không cần CSS container riêng nữa. */

/* ---------- Hero banner trang Danh sách ---------- */
.gdv-hero {
    background: linear-gradient(120deg, #101b3d, #1e3a8a 55%, #3d5af1);
    color: #fff;
    padding: 56px 0;
    margin-bottom: 40px;
}

.gdv-hero__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.gdv-hero__text {
    max-width: 620px;
}

.gdv-hero__eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #ffb37a;
    margin-bottom: 12px;
}

.gdv-hero__title {
    font-size: clamp(26px, 3.6vw, 38px);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 14px;
    color: #fff;
}

.gdv-hero__desc {
    color: rgba(255, 255, 255, .78);
    line-height: 1.7;
    margin: 0;
    font-size: 15px;
}

.gdv-hero__stats {
    display: flex;
    gap: 36px;
    flex-shrink: 0;
}

.gdv-hero__stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gdv-hero__stat-value {
    font-size: 30px;
    font-weight: 800;
    color: #ffb37a;
}

.gdv-hero__stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, .7);
}

@media (max-width: 700px) {
    .gdv-hero { padding: 40px 0; }
    .gdv-hero__stats {
        gap: 16px 24px;
        flex-wrap: wrap;
        width: 100%;
    }
    .gdv-hero__stat-value { font-size: 24px; }
}

@media (max-width: 380px) {
    .gdv-hero__stats { gap: 12px 18px; }
    .gdv-hero__stat-value { font-size: 20px; }
    .gdv-hero__stat-label { font-size: 12px; }
}

/* ---------- Tiêu đề & filter ---------- */
.gdv-archive__title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin: 40px 0 24px;
}

.gdv-archive__description {
    text-align: center;
    color: #555;
    max-width: 720px;
    margin: 0 auto 24px;
}

.gdv-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.gdv-filter-row__count {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
}

.gdv-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
}

.gdv-filter__item {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid #d5d9e0;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all .2s ease;
}

.gdv-filter__item:hover,
.gdv-filter__item--active {
    background: #16181d;
    border-color: #16181d;
    color: #fff !important;
}

/* Dải chip lọc nhóm con — nhỏ hơn, nhạt hơn để phân cấp rõ với tab nhóm cha */
.gdv-filter--sub {
    margin-top: -16px;
    margin-bottom: 32px;
}

.gdv-filter__item--sub {
    padding: 5px 14px;
    font-size: 13px;
    color: #6b7280;
    border-color: #e9ebf0;
}

.gdv-filter__item--sub:hover,
.gdv-filter__item--sub.gdv-filter__item--active {
    background: #eef1ff;
    border-color: #c7d0fb;
    color: #3d5af1 !important;
}

/* ---------- Grid danh sách ---------- */
.gdv-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

/* Số cột tuỳ chọn khi dùng qua shortcode/UX Builder — luôn responsive về 2 rồi 1 cột */
.gdv-shortcode-grid--cot-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gdv-shortcode-grid--cot-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gdv-shortcode-grid--cot-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) {
    .gdv-shortcode-grid--cot-3,
    .gdv-shortcode-grid--cot-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .gdv-shortcode-grid { grid-template-columns: 1fr !important; }
}

/* ---------- Chế độ Slider cho Element/shortcode [gdv_goi_dich_vu] ---------- */
.gdv-shortcode-slider-wrap {
    position: relative;
}

.gdv-shortcode-slider-wrap .gdv-slider-nav {
    display: flex; /* hiện sẵn, JS sẽ tự ẩn nếu nội dung không tràn */
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 16px;
}

.gdv-shortcode-grid--slider {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.gdv-shortcode-grid--slider::-webkit-scrollbar {
    display: none;
}

.gdv-shortcode-grid--slider > .gdv-card {
    scroll-snap-align: start;
    flex: 0 0 auto;
}

.gdv-shortcode-grid--slider.gdv-shortcode-grid--cot-2 > .gdv-card { width: calc(50% - 12px); }
.gdv-shortcode-grid--slider.gdv-shortcode-grid--cot-3 > .gdv-card { width: calc(33.333% - 16px); }
.gdv-shortcode-grid--slider.gdv-shortcode-grid--cot-4 > .gdv-card { width: calc(25% - 18px); }

@media (max-width: 1024px) {
    .gdv-shortcode-grid--slider.gdv-shortcode-grid--cot-3 > .gdv-card,
    .gdv-shortcode-grid--slider.gdv-shortcode-grid--cot-4 > .gdv-card { width: calc(50% - 12px); }
}

@media (max-width: 600px) {
    .gdv-shortcode-grid--slider > .gdv-card { width: 90% !important; }
}

@media (max-width: 1024px) {
    .gdv-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .gdv-grid { grid-template-columns: 1fr; }
}

/* ---------- Card ---------- */
.gdv-card {
    border: 1px solid #eceef2;
    border-radius: 16px;
    overflow: visible;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(20, 30, 60, .06);
    height: 100%;
}

.gdv-card__banner {
    display: block;
    line-height: 0;
}

.gdv-card__banner img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}

.gdv-card__body {
    padding: 18px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    background: #f6f7fa;
    border-radius: 0 0 16px 16px;
}

.gdv-card__title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
}

.gdv-card__title a {
    color: #16181d !important;
    text-decoration: none;
}

.gdv-card__title a:hover,
.gdv-card__title a:focus {
    color: #3d5af1 !important;
    text-decoration: none;
}

.gdv-card__price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.gdv-card__price-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e63e0;
}

.gdv-card__price-unit  { font-size: 13px; color: #6b7280; font-weight: 400; }

.gdv-tooltip {
    position: relative;
    display: inline-flex;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #b9c0cc;
    color: #8a919e;
    align-items: center;
    justify-content: center;
    cursor: help;
    margin-left: 2px;
    z-index: 20;
}

.gdv-tooltip__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    line-height: 1;
}

.gdv-tooltip__text {
    display: none;
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    width: min(220px, 80vw);
    background: #333;
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    z-index: 50;
    font-style: normal;
}

.gdv-tooltip:hover .gdv-tooltip__text,
.gdv-tooltip:focus .gdv-tooltip__text {
    display: block;
}

.gdv-card__speed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fff;
    border: 1px solid #e9ebf0;
    border-radius: 10px;
    padding: 12px 14px;
}

.gdv-card__speed-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

.gdv-card__speed-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.gdv-card__speed-label { color: #1e63e0; }

.gdv-card__speed-value {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    color: #16181d;
    font-size: 14px;
}

.gdv-speed-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.gdv-speed-item .fa-arrow-down { color: #1e9e5a; }
.gdv-speed-item .fa-arrow-up   { color: #ff7a00; }

/* Khung danh sách tính năng có scroll, giống thiết kế gốc */
.gdv-card__features-wrap {
    max-height: 118px;
    overflow-y: auto;
    padding-right: 6px;
}

.gdv-card__features-wrap::-webkit-scrollbar { width: 5px; }
.gdv-card__features-wrap::-webkit-scrollbar-thumb {
    background: #d6dae2;
    border-radius: 999px;
}
.gdv-card__features-wrap::-webkit-scrollbar-track { background: transparent; }

.gdv-card__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    color: #333;
}

.gdv-card__features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.gdv-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1e9e5a;
    color: #fff;
    font-size: 10px;
    flex-shrink: 0;
    margin-top: 1px;
}

.gdv-card__footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Footer riêng cho trang Chi tiết: 2 nút CTA full-width, xếp dọc,
   thay cho "Xem chi tiết" (không cần vì đang đứng ngay trên trang đó). */
.gdv-card__footer--detail .gdv-btn--cta-primary,
.gdv-card__footer--detail .gdv-btn--cta-secondary {
    width: 100%;
}

/* Tablet: sidebar lúc này đã full-width (grid rớt xuống 1 cột dưới 900px)
   nên 2 nút CTA nằm cạnh nhau (2 cột) hợp lý hơn là xếp dọc dài lê thê. */
@media (min-width: 601px) and (max-width: 900px) {
    .gdv-card__footer--detail {
        flex-direction: row;
        gap: 16px;
    }
    .gdv-card__footer--detail .gdv-btn--cta-primary,
    .gdv-card__footer--detail .gdv-btn--cta-secondary {
        width: auto;
        flex: 1 1 0;
    }
}

.gdv-card__link-detail {
    text-align: center;
    color: #1e63e0 !important;
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
    transition: color .18s ease;
}

.gdv-card__link-detail:hover,
.gdv-card__link-detail:focus {
    color: #16389c !important;
    text-decoration: underline;
}

/* ---------- Nút CTA ---------- */
.gdv-btn {
    display: block;
    text-align: center;
    padding: 13px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.gdv-btn:hover {
    text-decoration: none;
}

.gdv-btn--primary {
    background: #3d5af1;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(61, 90, 241, .25);
}

.gdv-btn--primary:hover,
.gdv-btn--primary:focus {
    background: #2e46d1;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(61, 90, 241, .32);
}

/* ---------- Pagination ---------- */
.gdv-pagination {
    margin: 32px 0;
}

.gdv-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.gdv-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #e2e5eb;
    background: #fff;
    color: #333 !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all .18s ease;
}

.gdv-pagination a.page-numbers:hover {
    border-color: #3d5af1;
    color: #3d5af1 !important;
}

.gdv-pagination .page-numbers.current {
    background: #3d5af1;
    border-color: #3d5af1;
    color: #fff !important;
}

.gdv-pagination .page-numbers.dots {
    border: none;
    background: none;
    color: #9aa1ab !important;
    min-width: auto;
    padding: 0 4px;
}

.gdv-pagination .prev.page-numbers,
.gdv-pagination .next.page-numbers {
    padding: 0 16px;
}

.gdv-empty {
    text-align: center;
    color: #6b7280;
    padding: 56px 24px;
    border: 1px solid #e9ebf0;
    border-radius: 14px;
    background: #fafbfc;
}

.gdv-empty a {
    color: #3d5af1 !important;
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.gdv-empty a:hover {
    text-decoration: underline;
}

/* ---------- Khối nội dung SEO (Xem thêm / Thu gọn) ---------- */
.gdv-seo-block {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid #eceef2;
}

.gdv-seo-block__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 16px;
}

.gdv-seo-block__content {
    max-height: 160px;
    overflow: hidden;
    position: relative;
    color: #4b5563;
    line-height: 1.75;
    font-size: 14.5px;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
    transition: max-height .3s ease;
}

.gdv-seo-block--expanded .gdv-seo-block__content {
    max-height: 2000px;
    -webkit-mask-image: none;
    mask-image: none;
}

.gdv-seo-block__content p {
    margin: 0 0 14px;
}

.gdv-seo-block__content strong {
    color: #16181d;
}

.gdv-seo-block__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    background: none;
    border: none;
    padding: 0;
    color: #3d5af1 !important;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.gdv-seo-block__toggle:hover {
    text-decoration: underline;
}

.gdv-seo-block__toggle i {
    font-size: 11px;
    transition: transform .2s ease;
}

/* ==========================================================================
   Trang Chi tiết (single-goi_dich_vu.php)
   ========================================================================== */

.gdv-single__promo {
    margin-bottom: 40px;
}

.gdv-single__promo img {
    width: 100%;
    display: block;
    border-radius: 12px;
}

.gdv-title-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: #eef1ff;
    color: #3d5af1 !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 14px;
    transition: background-color .18s ease;
}

.gdv-title-badge:hover,
.gdv-title-badge:focus {
    background: #dfe4fe;
    color: #3d5af1 !important;
    text-decoration: none;
}

.gdv-single__title {
    text-align: left;
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 40px;
}

/* ---------- Bố cục 2 cột: nội dung chính + sidebar giá sticky ---------- */
.gdv-detail-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 48px;
    align-items: start;
}

.gdv-detail-main {
    min-width: 0; /* tránh nội dung dài tràn grid */
}

.gdv-detail-sidebar {
    min-width: 0;
}

.gdv-detail-sidebar__sticky {
    position: sticky;
    top: 24px;
}

@media (max-width: 900px) {
    .gdv-detail-grid {
        grid-template-columns: 1fr;
    }
    .gdv-detail-sidebar__sticky {
        position: static;
    }
}

.gdv-single__desc {
    margin: 0 0 40px;
    text-align: left;
    color: #444;
    line-height: 1.75;
    font-size: 15px;
}

.gdv-single__section {
    margin-bottom: 48px;
}

.gdv-related {
    margin-top: 24px;
    padding-top: 48px;
    border-top: 1px solid #eceef2;
}

.gdv-related__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1024px) {
    .gdv-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .gdv-related__grid { grid-template-columns: 1fr; }
}

.gdv-single__heading {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 28px;
}

.gdv-single__heading--center { text-align: center; }
.gdv-single__heading--flush { margin-bottom: 0; }

/* ---------- Slider "Nhận thêm trong gói này" ---------- */
.gdv-slider-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.gdv-slider-nav {
    display: none; /* mặc định ẩn, JS sẽ hiện nếu nội dung tràn và cần cuộn */
    gap: 8px;
    flex-shrink: 0;
}

.gdv-slider-nav__btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e2e5eb;
    background: #fff;
    color: #9aa1ab;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: border-color .18s ease, color .18s ease;
}

.gdv-slider-nav__btn:hover:not(:disabled),
.gdv-slider-nav__btn:focus:not(:disabled) {
    border-color: #3d5af1;
    color: #3d5af1 !important;
}

.gdv-slider-nav__btn:disabled {
    opacity: .4;
    cursor: default;
}

.gdv-included {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.gdv-included::-webkit-scrollbar {
    display: none;
}

.gdv-included__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    flex: 0 0 auto;
    width: 160px;
    padding: 24px 16px;
    background: #f6f7fa;
    border-radius: 14px;
    scroll-snap-align: start;
    transition: box-shadow .2s ease, transform .2s ease;
}

.gdv-included__item:hover {
    box-shadow: 0 2px 8px rgba(20, 30, 60, .06);
    transform: translateY(-2px);
}

.gdv-included__item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.gdv-included__item span {
    font-weight: 600;
    font-size: 14px;
    color: #16181d;
}

@media (max-width: 600px) {
    .gdv-included__item {
        width: 130px;
        padding: 18px 12px;
    }

    /* Mobile ưu tiên vuốt tay để cuộn, ẩn hẳn nút mũi tên cho gọn */
    .gdv-slider-nav {
        display: none !important;
    }
}

.gdv-privileges {
    max-width: 700px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #333;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gdv-privileges li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    line-height: 1.6;
}

.gdv-check--lg {
    width: 22px;
    height: 22px;
    font-size: 11px;
    margin-top: 2px;
}

.gdv-privileges__note {
    text-align: left;
    color: #888;
    font-size: 13px;
    margin-top: 20px;
}

/* (Đã bỏ .gdv-attached — card giá giờ nằm trong sidebar sticky
   .gdv-detail-sidebar, dùng nguyên component card mặc định, không cần
   ép grid ngang riêng nữa.) */

.gdv-single__cta {
    text-align: left;
}

.gdv-cta__buttons {
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.gdv-btn--cta-primary,
.gdv-btn--cta-secondary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
    padding: 16px;
}

.gdv-btn--cta-primary {
    background: linear-gradient(135deg, #ff9a3c, #ff5b2e);
    color: #fff !important;
}

.gdv-btn--cta-primary:hover,
.gdv-btn--cta-primary:focus {
    background: linear-gradient(135deg, #ff8a1f, #ff431a);
    color: #fff !important;
    transform: translateY(-2px);
}

.gdv-btn--cta-secondary {
    background: #eef1f6;
    color: #16181d !important;
}

.gdv-btn--cta-secondary:hover,
.gdv-btn--cta-secondary:focus {
    background: #e3e7ee;
    color: #16181d !important;
    transform: translateY(-2px);
}

.gdv-btn--cta-primary strong,
.gdv-btn--cta-secondary strong {
    color: inherit !important;
    font-size: 15px;
}

.gdv-btn--cta-primary span {
    color: rgba(255, 255, 255, .9) !important;
    font-weight: 400;
    font-size: 12px;
}

.gdv-btn--cta-secondary span {
    color: #6b7280 !important;
    font-weight: 400;
    font-size: 12px;
}