/* ==========================================================================
   Landing blocks – chỉ tải cho mẫu "Trang trình bày" (page-wide.php)
   Class gắn vào block Gutenberg (Nâng cao → Lớp CSS bổ sung):
   bbat-split, bbat-split--reverse, bbat-photo, bbat-kicker, bbat-lead, bbat-note,
   bbat-quote-band, bbat-section--soft, bbat-cards, bbat-checklist, bbat-steps-list,
   bbat-numlist, bbat-ico bbat-ico--{task|gift|user|doc|mail|phone},
   bbat-job, bbat-job__head, bbat-job__meta, bbat-job__grid, bbat-badge,
   bbat-btn-accent, bbat-btn-outline, bbat-apply, bbat-apply__grid, bbat-apply__item
   ========================================================================== */

:root {
    --ico-task: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E");
    --ico-gift: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='4' rx='1'/%3E%3Cpath d='M12 8v13M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7M7.5 8a2.5 2.5 0 0 1 0-5C11 3 12 8 12 8s1-5 4.5-5a2.5 2.5 0 0 1 0 5'/%3E%3C/svg%3E");
    --ico-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E");
    --ico-doc: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E");
    --ico-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 6L2 7'/%3E%3C/svg%3E");
    --ico-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E");
    --ico-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.landing { padding-block: 40px 72px; display: grid; gap: 56px; }
.landing > * { margin: 0 !important; }
.landing h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); }
.landing h3 { font-size: 1.15rem; }
@media (min-width: 900px) { .landing { padding-block: 64px 96px; gap: 88px; } }

.bbat-kicker {
    display: inline-flex; align-items: center; gap: .5em; margin: 0 0 .6rem;
    font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand);
}
.bbat-kicker::before { content: ""; width: 24px; height: 2px; background: var(--accent); border-radius: 2px; }
.bbat-lead { font-size: 1.1rem; line-height: 1.75; }
.bbat-note {
    padding: 14px 18px; border-left: 4px solid var(--accent); background: var(--bg-soft);
    border-radius: 0 var(--radius) var(--radius) 0; font-size: .95rem;
}

/* ---------- Hai cột chữ + ảnh ---------- */
.wp-block-columns.bbat-split { gap: 32px; align-items: center !important; }
.bbat-photo { margin: 0; }
.bbat-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.bbat-photo--natural img { aspect-ratio: auto; object-fit: initial; } /* ảnh có chữ, không được cắt */
@media (min-width: 782px) { .wp-block-columns.bbat-split { gap: 64px; } }
@media (max-width: 781px) { .bbat-split--reverse > .wp-block-column:first-child { order: 2; } }

/* ---------- Dải trích dẫn ---------- */
.bbat-quote-band {
    position: relative; overflow: hidden; text-align: center; padding: 48px 24px;
    border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--brand) 0%, var(--brand-900) 100%);
}
.bbat-quote-band::before {
    content: "\201C"; position: absolute; top: -36px; left: 24px;
    font: 14rem/1 Georgia, serif; color: rgba(255, 255, 255, .07);
}
.bbat-quote-band p {
    position: relative; max-width: 820px; margin: 0 auto;
    color: #fff; font-size: clamp(1.2rem, 1rem + 1vw, 1.7rem); font-weight: 700; line-height: 1.5;
}
@media (min-width: 900px) { .bbat-quote-band { padding: 72px 48px; } }

/* ---------- Section nền nhạt ---------- */
.bbat-section--soft { padding: 32px 20px; border-radius: var(--radius-lg); background: var(--bg-soft); }
@media (min-width: 900px) { .bbat-section--soft { padding: 56px; } }

/* ---------- Lưới thẻ ---------- */
.wp-block-columns.bbat-cards { gap: 20px; margin: 24px 0 0; }
.bbat-cards > .wp-block-column {
    padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s;
}
.bbat-cards > .wp-block-column:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.bbat-cards > .wp-block-column > h3 { padding-bottom: 12px; margin-bottom: 14px; border-bottom: 2px solid var(--brand-100); }
.bbat-cards p { margin: 0; }

/* ---------- Danh sách tick ---------- */
.bbat-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bbat-checklist li { position: relative; padding-left: 30px; line-height: 1.6; }
.bbat-checklist li::before {
    content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%;
    background: var(--brand);
}
.bbat-checklist li::after {
    content: ""; position: absolute; left: 4px; top: calc(.2em + 4px); width: 12px; height: 12px; background: #fff;
    -webkit-mask: var(--ico-check) center / contain no-repeat; mask: var(--ico-check) center / contain no-repeat;
}

/* ---------- Danh sách đánh số dạng thẻ ---------- */
.bbat-steps-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; counter-reset: bstep; }
.bbat-steps-list li {
    counter-increment: bstep; position: relative; min-height: 80px; padding: 20px 20px 20px 78px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); line-height: 1.65;
}
.bbat-steps-list li::before {
    content: counter(bstep, decimal-leading-zero); position: absolute; left: 18px; top: 18px;
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
    background: var(--accent); color: var(--brand-900); font-weight: 800;
}
@media (min-width: 900px) {
    .bbat-steps-list { grid-template-columns: repeat(2, 1fr); }
    .bbat-steps-list li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------- Danh sách số nhỏ ---------- */
.bbat-numlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: bnum; }
.bbat-numlist li { counter-increment: bnum; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--bg-soft); border-radius: 12px; font-weight: 500; }
.bbat-numlist li::before {
    content: counter(bnum); flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px;
    border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; font-weight: 700;
}

/* ---------- Icon cho heading/đoạn ---------- */
.bbat-ico { display: flex; align-items: center; gap: 12px; }
.bbat-ico::before {
    content: ""; flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
    background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand-100);
}
.bbat-ico::after {
    content: ""; position: absolute; width: 22px; height: 22px; margin-left: 11px; background: var(--brand);
    -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.bbat-ico { position: relative; }
.bbat-ico--task { --ico: var(--ico-task); }
.bbat-ico--gift { --ico: var(--ico-gift); }
.bbat-ico--user { --ico: var(--ico-user); }
.bbat-ico--doc { --ico: var(--ico-doc); }
.bbat-ico--mail { --ico: var(--ico-mail); }
.bbat-ico--phone { --ico: var(--ico-phone); }

/* ---------- Tin tuyển dụng ---------- */
.bbat-job { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.bbat-job__head { padding: 28px 20px; background: linear-gradient(135deg, var(--brand-50), #fff 70%); border-bottom: 1px solid var(--line); }
.bbat-job__head h2 { margin: 10px 0 18px; }
.bbat-badge {
    display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 5px 12px; border-radius: 999px;
    background: #fff4de; color: #8a5200; font-size: .8rem; font-weight: 700;
}
.bbat-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
.bbat-job__meta { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.bbat-job__meta li {
    display: flex; flex-direction: column; padding: 12px 14px; line-height: 1.35;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; font-weight: 700; color: var(--ink);
}
.bbat-job__meta li strong { margin-bottom: 2px; font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.wp-block-columns.bbat-job__grid { gap: 32px; margin: 0; padding: 28px 20px 0; }
.wp-block-columns.bbat-job__grid:last-child { padding-bottom: 28px; }
.bbat-job__grid h3 { margin-bottom: 16px; }
@media (min-width: 782px) {
    .bbat-job__head { padding: 40px; }
    .bbat-job__meta { grid-template-columns: repeat(4, 1fr); }
    .wp-block-columns.bbat-job__grid { gap: 48px; padding: 40px 40px 0; }
    .wp-block-columns.bbat-job__grid:last-child { padding-bottom: 40px; }
    .wp-block-columns.bbat-job__grid + .wp-block-columns.bbat-job__grid { margin-top: 40px; border-top: 1px solid var(--line); }
}

/* ---------- Nút trong block ---------- */
.landing .wp-block-buttons { gap: 10px; }
.landing .wp-block-button__link {
    display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: .8em 1.6em;
    border: 2px solid transparent; border-radius: 999px; font-size: .98rem; font-weight: 700;
    transition: transform .2s, background .2s, color .2s;
}
.landing .wp-block-button__link:hover { transform: translateY(-1px); }
.bbat-btn-accent .wp-block-button__link { background: var(--accent); color: var(--brand-900); }
.bbat-btn-accent .wp-block-button__link:hover { background: var(--accent-600); color: var(--brand-900); }
.bbat-btn-outline .wp-block-button__link { background: transparent; border-color: var(--brand); color: var(--brand); }
.bbat-btn-outline .wp-block-button__link:hover { background: var(--brand); color: #fff; }
@media (max-width: 559px) {
    .bbat-job__actions .wp-block-button { flex: 1 1 100%; }
    .bbat-job__actions .wp-block-button__link { width: 100%; }
}

/* ---------- Khối ứng tuyển ---------- */
.bbat-apply { padding: 32px 20px; text-align: center; border-radius: var(--radius-lg); background: var(--brand-900); }
.bbat-apply h2 { color: #fff; }
/* Theme cổ điển: nội dung block Nhóm nằm trong .wp-block-group__inner-container → không dùng selector ">" */
.bbat-apply p:not(.bbat-apply__item) { color: rgba(255, 255, 255, .75); }
.wp-block-columns.bbat-apply__grid { gap: 16px; max-width: 820px; margin: 24px auto 0; }
.bbat-apply__item {
    display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: center; margin: 0;
    padding: 16px 18px; text-align: left; background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius);
}
.bbat-apply__item::before { grid-row: 1 / span 2; background: var(--accent); box-shadow: none; }
.bbat-apply__item::after { top: 50%; left: 18px; margin: -11px 0 0 11px; background: var(--brand-900); }
.bbat-apply__item span { display: block; font-size: .8rem; color: rgba(255, 255, 255, .65); }
.bbat-apply__item a { font-size: 1.05rem; font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.bbat-apply__item a:hover { color: var(--accent); }
@media (min-width: 900px) { .bbat-apply { padding: 56px; } }
