/* ==========================================================================
   Tràng An — Các section trang chủ bổ sung (PCCC): cam kết, danh mục,
   dịch vụ, chứng chỉ, dự án, CTA báo giá. Responsive mobile-first.
   ========================================================================== */

:root {
    --ta-red: #ED4A2A;
    --ta-red-dark: #C9381C;
    --ta-dark: #1f2430;       /* nền tối làm nền tương phản cho đỏ */
    --ta-ink: #1a2240;        /* màu chữ tiêu đề */
    --ta-muted: #6b7280;
}

/* Top bar: nền tối thay vì đỏ → đỏ làm điểm nhấn, đỡ rát mắt */
.top-bar { background-color: var(--ta-dark) !important; }

/* Tiêu đề section dùng chung */
.ta-sec { padding: 40px 0; }
.ta-sec-head { text-align: center; margin-bottom: 26px; }
.ta-sec-head h2 {
    font-size: clamp(1.25rem, 2.2vw, 1.7rem); font-weight: 800; color: var(--ta-ink);
    margin: 0; text-transform: uppercase; letter-spacing: .3px;
}
.ta-sec-head h2 span { color: var(--ta-red); }
.ta-sec-head p { color: var(--ta-muted); margin: 8px 0 0; font-size: .95rem; }
.ta-sec-head::after {
    content: ""; display: block; width: 64px; height: 3px; margin: 12px auto 0;
    background: var(--ta-red); border-radius: 3px;
}

/* ── Dải cam kết / uy tín ─────────────────────────────────────────────── */
.ta-trust { background: var(--ta-dark); padding: 18px 0; }
.ta-trust .row { --bs-gutter-y: 14px; }
.ta-trust-item {
    display: flex; align-items: center; gap: 12px; color: #fff;
}
.ta-trust-item i {
    font-size: 1.9rem; color: var(--ta-red); flex-shrink: 0; line-height: 1;
}
.ta-trust-item .t { font-weight: 700; font-size: .98rem; line-height: 1.25; }
.ta-trust-item .d { font-size: .8rem; color: #b9bfca; }

/* ── Lưới danh mục hệ thống PCCC (full-width, hiện trên mọi thiết bị) ──── */
.ta-cat-tile {
    display: block; position: relative; overflow: hidden; border-radius: 10px;
    background: #f1f3f5; box-shadow: 0 2px 10px rgba(0,0,0,.07);
    border-bottom: 3px solid var(--ta-red);
    transition: transform .25s ease, box-shadow .25s ease;
}
.ta-cat-tile:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(0,0,0,.14); }
.ta-cat-tile img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; transition: transform .35s ease; }
.ta-cat-tile:hover img { transform: scale(1.06); }
.ta-cat-tile .lbl {
    position: absolute; left: 0; right: 0; bottom: 0; padding: .55rem .7rem;
    background: linear-gradient(transparent, rgba(0,0,0,.78)); color: #fff;
    font-weight: 600; font-size: .9rem; line-height: 1.3;
}
.ta-cat-noimg {
    display: flex; align-items: center; justify-content: center; aspect-ratio: 4/3;
    font-size: 2.2rem; color: #adb5bd; background: #e9ecef;
}

/* ── Dịch vụ PCCC ─────────────────────────────────────────────────────── */
.ta-services { background: #f7f8fa; }
.ta-service {
    background: #fff; border-radius: 12px; padding: 26px 20px; height: 100%;
    text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border-top: 3px solid transparent; transition: .25s ease;
}
.ta-service:hover { border-top-color: var(--ta-red); transform: translateY(-4px); box-shadow: 0 12px 26px rgba(0,0,0,.1); }
.ta-service .ic {
    width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(237,74,42,.1); color: var(--ta-red); font-size: 1.8rem;
}
.ta-service h3 { font-size: 1.05rem; font-weight: 700; color: var(--ta-ink); margin: 0 0 8px; }
.ta-service p { font-size: .9rem; color: var(--ta-muted); margin: 0; }

/* ── Chứng chỉ / năng lực ─────────────────────────────────────────────── */
.ta-certs { background: #fff; }
.ta-cert {
    background: #fff; border: 1px solid #eceef2; border-radius: 10px; overflow: hidden;
    height: 100%; transition: .25s ease; box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.ta-cert:hover { box-shadow: 0 10px 24px rgba(0,0,0,.12); transform: translateY(-3px); }
.ta-cert-img {
    display: block; background: #f5f6f8; aspect-ratio: 3/4; overflow: hidden;
}
.ta-cert-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ta-cert .cap {
    display: block; text-align: center; padding: 10px 8px; font-weight: 600;
    font-size: .9rem; color: var(--ta-ink); background: #fafbfc; border-top: 1px solid #eceef2;
}

/* ── Dự án tiêu biểu ──────────────────────────────────────────────────── */
.ta-projects { background: #f7f8fa; }
.ta-project { display: block; text-decoration: none; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.07); height: 100%; transition: .25s ease; }
.ta-project:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(0,0,0,.13); }
.ta-project-img { aspect-ratio: 16/10; overflow: hidden; background: #e9ecef; }
.ta-project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.ta-project:hover .ta-project-img img { transform: scale(1.06); }
.ta-project h3 { font-size: 1rem; font-weight: 700; color: var(--ta-ink); margin: 0; padding: 14px 16px; line-height: 1.4; }

/* ── CTA báo giá ──────────────────────────────────────────────────────── */
.ta-cta {
    background: linear-gradient(135deg, var(--ta-red) 0%, var(--ta-red-dark) 100%);
    color: #fff; padding: 34px 0; text-align: center;
}
.ta-cta h2 { font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 800; margin: 0 0 6px; }
.ta-cta p { margin: 0 0 18px; opacity: .95; font-size: 1rem; }
.ta-cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ta-cta-btn {
    display: inline-flex; align-items: center; gap: 8px; font-weight: 700;
    padding: 12px 22px; border-radius: 50px; text-decoration: none; font-size: 1rem;
    background: #fff; color: var(--ta-red-dark); transition: .2s ease;
}
.ta-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.2); color: var(--ta-red-dark); }
.ta-cta-btn.outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.85); }
.ta-cta-btn.outline:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ── Đối tác (Swiper slider) ──────────────────────────────────────────── */
.ta-partners-swiper { padding: 4px 44px; }
.ta-partner-slide { display: flex; align-items: center; justify-content: center; height: 90px; }
.ta-partner-slide img { max-height: 64px; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: .75; transition: .3s; }
.ta-partner-slide:hover img { filter: none; opacity: 1; }
.ta-partners-swiper .swiper-button-prev,
.ta-partners-swiper .swiper-button-next { color: var(--ta-red); }
.ta-partners-swiper .swiper-button-prev::after,
.ta-partners-swiper .swiper-button-next::after { font-size: 1.4rem; font-weight: 700; }

/* ── Banner đôi (home_promo) ─────────────────────────────────────────── */
.ta-sec-tight { padding: 14px 0; }
.ta-promo-tile {
    display: block; border-radius: 12px; overflow: hidden;
    box-shadow: 0 3px 14px rgba(0,0,0,.08); line-height: 0;
}
.ta-promo-tile img { width: 100%; height: auto; display: block; transition: transform .4s ease; }
.ta-promo-tile:hover img { transform: scale(1.04); }

/* ── Banner ngang full-width (home_strip) ────────────────────────────── */
.ta-strip-wrap { margin: 18px 0; }
.ta-strip-wrap .banner-wrapper img { display: block; width: 100%; height: auto; }

/* ── Mobile: section SP nổi bật bỏ padding + nền xám để lấy tối đa không gian ─ */
@media (max-width: 991.98px) {
    .pf-products {
        padding: 0;            /* bỏ padding 20px của .pf-section */
        background-image: none;/* bỏ nền gradient xám của .pf-bg-gray */
        border-radius: 0;      /* bỏ bo góc trên của .pf-bg-gray */
    }
}

/* ── Nút "Xem tất cả sản phẩm" cuối section SP nổi bật ───────────────── */
.pf-products-allbtn {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 700; text-decoration: none; font-size: 1rem;
    padding: 11px 30px; border-radius: 50px;
    color: var(--ta-red, #ED4A2A); border: 2px solid var(--ta-red, #ED4A2A);
    background: #fff; transition: .2s ease;
}
.pf-products-allbtn:hover {
    background: var(--ta-red, #ED4A2A); color: #fff;
    transform: translateY(-2px); box-shadow: 0 8px 18px rgba(237,74,42,.25);
}

/* ── Lightbox chứng chỉ ─────────────────────────────────────────────── */
.ta-cert { cursor: zoom-in; }
.ta-cert .cap i { color: var(--ta-red); margin-right: 2px; }
.ta-lb {
    position: fixed; inset: 0; z-index: 2000;
    display: none; align-items: center; justify-content: center;
    background: rgba(10,12,16,.92); padding: 24px;
}
.ta-lb.active { display: flex; }
.ta-lb-figure { margin: 0; max-width: 90vw; max-height: 88vh; text-align: center; }
.ta-lb-img {
    max-width: 100%; max-height: 80vh; object-fit: contain;
    border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); background: #fff;
}
.ta-lb-cap { color: #fff; margin-top: 12px; font-size: .95rem; font-weight: 600; }
.ta-lb-close {
    position: absolute; top: 18px; right: 22px; z-index: 2;
    background: none; border: 0; color: #fff; font-size: 2.4rem; line-height: 1;
    cursor: pointer; opacity: .85; transition: opacity .2s;
}
.ta-lb-close:hover { opacity: 1; }
.ta-lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    background: rgba(255,255,255,.12); border: 0; color: #fff;
    width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.ta-lb-nav:hover { background: var(--ta-red); }
.ta-lb-prev { left: 18px; }
.ta-lb-next { right: 18px; }
@media (max-width: 575.98px) {
    .ta-lb-nav { width: 40px; height: 40px; }
    .ta-lb-prev { left: 6px; } .ta-lb-next { right: 6px; }
}

/* ── Hero quote band (dưới banner) ───────────────────────────────────── */
.ta-hero-quote { background: #f7f8fa; padding: 32px 0; border-bottom: 1px solid #eceef2; }
.ta-hero-quote .thq-title { font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 800; color: var(--ta-ink); margin: 0 0 10px; line-height: 1.25; }
.ta-hero-quote .thq-title span { color: var(--ta-red); }
.ta-hero-quote .thq-sub { color: var(--ta-muted); font-size: .98rem; margin: 0 0 16px; max-width: 560px; }
.ta-hero-quote .thq-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.thq-btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; padding: 11px 22px; border-radius: 50px; transition: .2s ease; }
.thq-btn-call { background: var(--ta-red); color: #fff; }
.thq-btn-call:hover { background: var(--ta-red-dark); color: #fff; transform: translateY(-2px); }
.thq-btn-ghost { background: #fff; color: var(--ta-ink); border: 2px solid #d7dbe2; }
.thq-btn-ghost:hover { border-color: var(--ta-red); color: var(--ta-red); }

.thq-form-card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 8px 28px rgba(0,0,0,.10); border-top: 3px solid var(--ta-red); }
.thq-form-title { font-size: 1.1rem; font-weight: 800; color: var(--ta-ink); margin: 0 0 4px; }
.thq-form-title i { color: var(--ta-red); }
.thq-form-desc { font-size: .85rem; color: var(--ta-muted); margin: 0 0 12px; }
.thq-form .form-control { border: 1.5px solid #e2e8f0; border-radius: 7px; padding: .6rem .85rem; font-size: .9rem; }
.thq-form .form-control:focus { border-color: var(--ta-red); box-shadow: 0 0 0 3px rgba(237,74,42,.13); outline: none; }
.thq-submit { width: 100%; border: 0; border-radius: 7px; padding: .75rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--ta-red), var(--ta-red-dark)); cursor: pointer; transition: .2s; }
.thq-submit:hover { filter: brightness(1.05); box-shadow: 0 6px 16px rgba(237,74,42,.3); }
.thq-submit:disabled { opacity: .7; cursor: not-allowed; }
.thq-alert { font-size: .85rem; margin-top: 8px; }
.thq-alert.ok { color: #16794a; }
.thq-alert.err { color: #c0000c; }

/* ── Mobile tinh chỉnh ───────────────────────────────────────────────── */
@media (max-width: 575.98px) {
    .ta-sec { padding: 28px 0; }
    .ta-trust-item { gap: 9px; }
    .ta-trust-item i { font-size: 1.5rem; }
    .ta-trust-item .t { font-size: .85rem; }
    .ta-cat-tile .lbl { font-size: .8rem; padding: .4rem .5rem; }

    /* Dải cam kết: cuộn NGANG cho đỡ chiếm diện tích, mượt + snap */
    .ta-trust .row {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: none;            /* Firefox */
        margin-bottom: 0;
        padding-bottom: 2px;
    }
    .ta-trust .row::-webkit-scrollbar { display: none; }  /* Chrome/Safari */
    .ta-trust .row > [class*="col-"] {
        flex: 0 0 auto;
        width: 72%;                       /* lộ ~1/4 card kế tiếp → gợi ý kéo được */
        scroll-snap-align: start;
    }
    .ta-trust-item {
        background: rgba(255,255,255,.06);
        border: 1px solid rgba(255,255,255,.10);
        border-radius: 10px;
        padding: 12px 14px;
        height: 100%;
    }
}
