/* LexCMS default theme — legianglaw.vn (brand: teal logo #1e7299 + gold #febe2b) */

/* Gelasio: font serif hỗ trợ tiếng Việt đầy đủ (Georgia thiếu glyph Ấ Ế Ồ… gây lỗi hiển thị) */
@font-face {
  font-family: 'Gelasio';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/gelasio-400.ttf) format('truetype');
}
@font-face {
  font-family: 'Gelasio';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/gelasio-700.ttf) format('truetype');
}

:root {
  --brand: #1e7299;
  --brand-dark: #14556f;
  --brand-darker: #0d3d52;
  --brand-light: #76cee2;
  --gold: #febe2b;
  --gold-dark: #d99f13;
  --news: #c0392b;        /* đỏ tin nóng — tương phản với teal của topbar */
  --news-dark: #9b2c22;
  --ink: #1d2733;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f4f7f9;
  --card: #ffffff;
  --serif: 'Gelasio', 'Times New Roman', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gold-dark); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.site-header { background: #fff; box-shadow: 0 1px 4px rgba(13,61,82,.08); }

/* Top bar */
.topbar { background: var(--brand-darker); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; }
.topbar-links { display: flex; flex-wrap: wrap; }
.topbar a { color: #c8e2ee; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 8px 12px; transition: all .15s ease; }
.topbar a:hover { color: var(--gold); background: rgba(255,255,255,.06); }
.topbar-cta { display: inline-flex; align-items: center; gap: 6px; background: var(--gold); color: #4a3400 !important;
  font-weight: 800 !important; text-transform: none !important; letter-spacing: 0 !important; font-size: .8rem !important;
  padding: 6px 16px !important; border-radius: 18px; box-shadow: 0 3px 10px rgba(254,190,43,.3); transition: all .18s ease; }
.topbar-cta:hover { background: var(--gold-dark); color: #4a3400 !important; transform: translateY(-1px); box-shadow: 0 5px 14px rgba(254,190,43,.45); }

/* Logo + thông tin công ty */
.header-inner { display: flex; align-items: center; gap: 26px; padding: 14px 16px; }
.brand-logo { height: 108px; width: auto; display: block; transition: transform .2s ease; image-rendering: -webkit-optimize-contrast; }
.brand:hover .brand-logo { transform: scale(1.03); }
.header-info { flex: 1; min-width: 0; border-left: 3px solid var(--gold); padding-left: 18px; }
.header-company { font-family: var(--serif); font-size: 1.18rem; font-weight: 700; color: var(--brand-dark); text-transform: uppercase; letter-spacing: .5px; }
.header-address { color: var(--muted); font-size: .82rem; margin-top: 2px; }
.header-contactline { display: flex; gap: 18px; margin-top: 3px; font-size: .84rem; }
.header-phone { font-weight: 800; color: var(--brand); }
.header-mail { color: var(--muted); }
.header-search { display: flex; width: 300px; max-width: 100%; flex-shrink: 0; }
.header-search input { flex: 1; min-width: 0; padding: 9px 14px; border: 2px solid var(--brand); border-right: none; border-radius: 22px 0 0 22px; font-size: .93rem; outline: none; }
.header-search input:focus { border-color: var(--brand-dark); box-shadow: 0 0 0 3px rgba(30,114,153,.15); }
.header-search button { padding: 9px 18px; border: none; background: var(--brand); color: #fff; border-radius: 0 22px 22px 0; cursor: pointer; font-size: 1rem; transition: background .15s ease; }
.header-search button:hover { background: var(--gold); }
.header-search .hs-wrap { position: relative; flex: 1; min-width: 0; }
.header-search .hs-wrap input { width: 100%; }
.hs-box { position: absolute; top: calc(100% + 6px); right: 0; min-width: 340px; max-width: min(92vw, 440px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(13,61,82,.25); z-index: 200; overflow: hidden; padding: 5px; }
.hs-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--ink); }
.hs-item.active, .hs-item:hover { background: #eef6fa; }
.hs-item img, .hs-ph { width: 48px; height: 36px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.hs-ph { display: flex; align-items: center; justify-content: center; background: #eef6fa; color: #9db4c0; }
.hs-txt { display: flex; flex-direction: column; min-width: 0; }
.hs-txt b { font-size: .86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--brand-dark); }
.hs-txt small { font-size: .74rem; color: var(--muted); }
.hs-all { display: block; padding: 9px 10px; font-size: .82rem; font-weight: 600; color: var(--brand); border-top: 1px solid var(--line); margin-top: 4px; }
.hs-all:hover { background: #eef6fa; }

/* Main nav — mẫu M1: nền trắng kiểu báo chí, hover đổ màu sinh động */
.main-nav { background: #fff; border-top: 3px solid var(--gold); position: sticky; top: 0; z-index: 50; box-shadow: 0 3px 12px rgba(13,61,82,.1); }
.nav-toggle, .nav-burger { display: none; }
.nav-inner { display: flex; flex-wrap: wrap; align-items: center; }
.main-nav a, .nav-more-label { color: var(--ink); padding: 14px 15px; font-size: .95rem; font-weight: 700; transition: all .18s ease; display: block; position: relative; }
/* gạch chân trượt từ giữa ra */
.main-nav a::after, .nav-more-label::after { content: ''; position: absolute; left: 50%; right: 50%; bottom: 0; height: 3px; background: var(--gold); transition: all .18s ease; }
.main-nav a:hover::after, .nav-more:hover .nav-more-label::after { left: 12px; right: 12px; }
.main-nav a:hover, .nav-more:hover .nav-more-label { color: var(--brand); background: linear-gradient(180deg, transparent, #eef6fa); }
.nav-home { color: var(--brand); }
.nav-home::after { left: 12px; right: 12px; }
.nav-cta { margin-left: auto; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff !important; border-radius: 22px; padding: 9px 20px !important; font-size: .86rem !important; box-shadow: 0 4px 12px rgba(30,114,153,.35); }
.nav-cta::after { display: none; }
.nav-cta:hover { background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important; color: #4a3400 !important; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(254,190,43,.4); }

/* Dropdown "Chuyên mục" */
.nav-more { position: relative; cursor: pointer; }
.nav-more-label { user-select: none; }
.nav-dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 270px; background: #fff; border-radius: 0 0 10px 10px; box-shadow: 0 14px 36px rgba(13,61,82,.25); padding: 8px 0; max-height: 70vh; overflow-y: auto; z-index: 60; border-top: 3px solid var(--gold); }
.nav-more:hover .nav-dropdown { display: block; animation: dropIn .18s ease; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.nav-dropdown a { color: var(--ink) !important; padding: 8px 18px !important; border-bottom: none !important; font-weight: 500; display: flex; justify-content: space-between; font-size: .88rem !important; }
.nav-dropdown a:hover { background: #eef6fa !important; color: var(--brand) !important; }
.nav-dropdown em { color: var(--muted); font-style: normal; font-size: .78rem; }

/* Dải tin nóng chạy chữ — màu đỏ, khác hẳn topbar teal phía trên */
.ticker { background: linear-gradient(90deg, var(--news-dark), var(--news)); overflow: hidden; }
.ticker-inner { display: flex; align-items: center; padding: 0; }
.ticker-label { background: var(--gold); color: #4a3400; font-weight: 800; font-size: .76rem; padding: 9px 15px; white-space: nowrap; flex-shrink: 0; letter-spacing: .4px; position: relative; }
.ticker-label::after { content: ''; position: absolute; right: -9px; top: 0; border: 17px solid transparent; border-left-color: var(--gold); border-right: 0; }
.ticker-viewport { overflow: hidden; flex: 1; }
.ticker-track { display: inline-flex; gap: 48px; padding-left: 30px; white-space: nowrap; animation: ticker-run 45s linear infinite; will-change: transform; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track a { color: #fff; font-size: .85rem; font-weight: 500; }
.ticker-track a:hover { color: var(--gold); }
.ticker-track a::before { content: '🔥'; margin-right: 9px; font-size: .8rem; }
@keyframes ticker-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------- Layout ---------- */
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding: 28px 16px 48px; }
.main-col { min-width: 0; }

/* ---------- Hero — mẫu H2: grid card, chữ dưới ảnh, cân đối không dư khoảng trắng ---------- */
.hero-cards {
  display: grid; gap: 18px; margin-bottom: 30px;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-areas: "main a b" "main c d";
}
.hero-cell-main { grid-area: main; display: flex; }
.hero-cell-main .post-card { width: 100%; height: 100%; }
.hero-cell-main .card-thumb { aspect-ratio: auto; flex: 1 1 240px; min-height: 240px; }
.hero-cell-main .card-title { font-size: 1.02rem; line-height: 1.32; }
.hero-cell-main .card-summary {
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-cell-main .card-body { flex: 0 0 auto; }
/* Card nhỏ trong hero: khung hẹp → chữ nhỏ lại cho cân đối */
.hero-cards .post-card:not(.post-card-big) .card-title { font-size: .78rem; line-height: 1.36; }
.hero-cards .post-card:not(.post-card-big) .card-cat { font-size: .62rem; }
.hero-cards .post-card:not(.post-card-big) .card-body { padding: 10px 12px 12px; gap: 4px; }

/* ---------- Banner CTA — thiết kế mới, không dùng ảnh cũ tối màu ---------- */
.cta-banner { display: flex; align-items: center; gap: 18px; padding: 20px 26px; border-radius: 14px; margin: 6px 0 30px; transition: transform .18s ease, box-shadow .18s ease; }
.cta-banner:hover { transform: translateY(-3px); }
.cta-banner-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; flex-shrink: 0; }
.cta-banner-text { flex: 1; min-width: 0; }
.cta-banner-text strong { display: block; font-family: var(--serif); font-size: 1.15rem; margin-bottom: 3px; }
.cta-banner-text span { font-size: .88rem; }
.cta-banner-btn { flex-shrink: 0; padding: 12px 24px; border-radius: 24px; font-weight: 800; font-size: .92rem; white-space: nowrap; transition: all .15s ease; }

.cta-banner.light { background: linear-gradient(120deg, #eef6fa, #e1f1f8); border: 1px solid #cde5ef; box-shadow: 0 3px 14px rgba(30,114,153,.08); }
.cta-banner.light .cta-banner-icon { background: #fff; color: var(--brand); box-shadow: 0 3px 10px rgba(30,114,153,.15); }
.cta-banner.light .cta-banner-text strong { color: var(--brand-darker); }
.cta-banner.light .cta-banner-text span { color: var(--muted); }
.cta-banner.light .cta-banner-btn { background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(30,114,153,.3); }
.cta-banner.light .cta-banner-btn:hover { background: var(--gold); color: #4a3400; }

.cta-banner.brand { background: linear-gradient(120deg, var(--brand), var(--brand-dark)); box-shadow: 0 8px 22px rgba(13,61,82,.25); }
.cta-banner.brand .cta-banner-icon { background: rgba(255,255,255,.18); color: #fff; }
.cta-banner.brand .cta-banner-text strong { color: #fff; }
.cta-banner.brand .cta-banner-text span { color: #cfe5ef; }
.cta-banner.brand .cta-banner-btn { background: var(--gold); color: #4a3400; }
.cta-banner.brand .cta-banner-btn:hover { background: #fff; color: var(--brand-darker); }

/* Sidebar: card giới thiệu văn phòng thay banner ảnh cũ */
.lawyer-card { background: linear-gradient(160deg, var(--brand-dark), var(--brand-darker)); border-radius: 12px; padding: 22px 20px; text-align: center; color: #fff; margin-bottom: 22px; box-shadow: 0 8px 22px rgba(13,61,82,.22); position: relative; overflow: hidden; }
.lawyer-card::before { content: ''; position: absolute; top: -40px; right: -40px; width: 130px; height: 130px; background: rgba(254,190,43,.12); border-radius: 50%; }
.lawyer-card-badge { display: inline-block; background: var(--gold); color: #4a3400; font-size: .7rem; font-weight: 800; padding: 4px 12px; border-radius: 12px; margin-bottom: 14px; letter-spacing: .3px; }
.lawyer-card-logo { display: block; width: auto; height: 58px; margin: 0 auto 12px; border-radius: 10px; background: #fff; padding: 6px 14px; box-shadow: 0 4px 14px rgba(0,0,0,.25); object-fit: contain; position: relative; }
.lawyer-card h4 { font-family: var(--serif); font-size: 1rem; margin-bottom: 6px; position: relative; }
.lawyer-card p { font-size: .8rem; color: #c8dde8; margin-bottom: 16px; position: relative; }
.lawyer-card-btn { display: block; background: var(--gold); color: #4a3400; font-weight: 800; padding: 10px; border-radius: 22px; font-size: .88rem; margin-bottom: 8px; position: relative; transition: all .15s ease; }
.lawyer-card-btn:hover { background: #fff; color: var(--brand-darker); }
.lawyer-card-btn2 { display: block; background: rgba(255,255,255,.12); color: #fff; font-weight: 700; padding: 9px; border-radius: 22px; font-size: .84rem; position: relative; transition: all .15s ease; }
.lawyer-card-btn2:hover { background: rgba(255,255,255,.22); color: #fff; }

/* Section "Xem nhiều" — badge số thứ hạng + ảnh nhỏ */
.popular-list { display: flex; flex-direction: column; gap: 4px; }
.popular-item { display: flex; gap: 12px; align-items: center; padding: 8px 6px; border-radius: 8px; transition: background .15s ease; }
.popular-item:hover { background: #eef6fa; }
.popular-rank { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--bg); color: var(--brand); font-family: var(--serif); font-weight: 700; font-size: .86rem; display: flex; align-items: center; justify-content: center; }
.popular-item:nth-child(1) .popular-rank { background: var(--gold); color: #4a3400; }
.popular-item:nth-child(2) .popular-rank { background: #d8dee3; color: var(--brand-darker); }
.popular-item:nth-child(3) .popular-rank { background: #e8cfa4; color: #6b4a17; }
.popular-thumb { flex-shrink: 0; width: 72px; height: 50px; object-fit: cover; border-radius: 7px; box-shadow: 0 1px 5px rgba(13,61,82,.15); }
.popular-title { flex: 1; min-width: 0; font-size: .88rem; font-weight: 600; color: var(--ink); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.popular-item:hover .popular-title { color: var(--brand); }
.popular-views { flex-shrink: 0; font-size: .74rem; color: var(--muted); white-space: nowrap; }

/* ---------- Cards ---------- */
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.post-card:hover { box-shadow: 0 10px 24px rgba(30,114,153,.16); transform: translateY(-4px); border-color: var(--brand-light); }
.card-thumb { display: block; aspect-ratio: 16/9; overflow: hidden; background: #e8f1f6; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.post-card:hover .card-thumb img { transform: scale(1.05); }
.thumb-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2.4rem; color: var(--brand-light); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card-cat { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--brand); }
.card-cat:hover { color: var(--gold-dark); }
.card-title { font-family: var(--serif); font-size: .84rem; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--brand); }
.post-card-big .card-title { font-size: 1.02rem; }
.card-summary { color: var(--muted); font-size: .85rem; }
.card-date { color: var(--muted); font-size: .74rem; margin-top: auto; }
/* Grid 4 cột cố định để section 4 bài luôn lấp đầy 1 hàng (12 bài = 3 hàng) */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card-grid-list { grid-template-columns: 1fr 1fr; gap: 18px; }
.card-grid-list .card-title { font-size: .95rem; -webkit-line-clamp: 2; line-clamp: 2; }

/* ---------- Sections ---------- */
.cat-section { margin: 38px 0; }
.section-title { font-family: var(--serif); font-size: 1.28rem; color: var(--brand-dark); display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-left: 14px; border-left: 5px solid var(--gold); }
.section-title a { color: var(--brand-dark); }
.section-title a:hover { color: var(--brand); }
.section-more a { font-family: var(--sans); font-size: .8rem; font-weight: 700; color: #fff; background: var(--brand); padding: 5px 14px; border-radius: 16px; transition: background .15s ease; }
.section-more a:hover { background: var(--gold); color: #4a3400; }

/* ---------- Article ---------- */
.breadcrumb { font-size: .84rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb span { color: var(--ink); }
.article { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 32px 36px; box-shadow: 0 2px 10px rgba(13,61,82,.05); }
.article-title { font-family: var(--serif); font-size: 1.9rem; line-height: 1.3; color: var(--brand-darker); margin-bottom: 12px; }
.article-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: .86rem; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.meta-cat { background: var(--brand); color: #fff; padding: 3px 12px; border-radius: 14px; font-size: .76rem; font-weight: 700; }
.meta-cat:hover { background: var(--gold); color: #4a3400; }
.meta-read, .meta-updated, .meta-views { font-size: .82rem; }
.meta-read { color: var(--brand-dark); font-weight: 600; }

/* Điều hướng bài trước / sau */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; }
.post-nav a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); transition: all .16s ease; }
.post-nav a:hover { border-color: var(--brand-light); box-shadow: 0 8px 20px rgba(30,114,153,.14); transform: translateY(-2px); }
.post-nav-next { text-align: right; }
.post-nav-dir { font-size: .78rem; font-weight: 700; color: var(--brand); }
.post-nav-title { font-size: .9rem; font-weight: 600; color: var(--ink); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } .post-nav-next { text-align: left; } }
.article-sapo { font-size: 1.06rem; font-style: italic; color: #37505f; border-left: 4px solid var(--gold); background: #fdf8ea; padding: 12px 16px; border-radius: 0 8px 8px 0; margin-bottom: 22px; }
.article-content { font-size: 1.04rem; line-height: 1.75; }
.article-content p { margin: 0 0 1em; }
.article-content h2, .article-content h3, .article-content h4 { font-family: var(--serif); color: var(--brand-dark); margin: 1.4em 0 .6em; }
.article-content img { border-radius: 8px; margin: 12px auto; display: block; box-shadow: 0 2px 12px rgba(13,61,82,.12); }
.article-content video { max-width: 100%; border-radius: 8px; margin: 12px auto; display: block; }
.article-content blockquote { border-left: 4px solid var(--brand); background: #eef6fa; padding: 12px 18px; margin: 1em 0; border-radius: 0 8px 8px 0; }
.article-content table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .95rem; }
.article-content td, .article-content th { border: 1px solid var(--line); padding: 8px 10px; }
.article-content th { background: #eef6fa; }
.article-content ul, .article-content ol { padding-left: 1.6em; margin-bottom: 1em; }
/* Badge DMCA Protection (mã do admin dán ở /admin/dmca, nướng sẵn vào HTML tĩnh) */
.dmca-badge { margin-top: 22px; }
.dmca-badge img { display: inline-block; max-width: 100%; height: auto; }

.article-tags { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; }
.article-tags a { background: #eef6fa; border: 1px solid #cfe5ef; padding: 4px 13px; border-radius: 20px; font-size: .82rem; color: var(--brand-dark); transition: all .15s ease; }
.article-tags a:hover { background: var(--gold); border-color: var(--gold); color: #4a3400; }

/* ---------- Chia sẻ bài viết ---------- */
.article-share { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.article-share .share-label { font-weight: 600; color: var(--brand-dark); }
.share-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .88rem; font-weight: 600; padding: 7px 15px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); color: var(--brand-dark); cursor: pointer; transition: all .15s ease; }
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(13,61,82,.14); }
.share-fb { background: #1877f2; border-color: #1877f2; color: #fff; }
.share-fb b { font-family: Georgia, serif; font-size: 1.05rem; line-height: 1; }
.share-fb:hover { background: #0f63d6; }
.share-copy, .share-native { background: #eef6fa; border-color: #cfe5ef; }

/* ---------- Quảng cáo ---------- */
.ad-slot { margin: 24px 0; text-align: center; }
.ad-slot img { max-width: 100%; height: auto; border-radius: 8px; }
.ad-tag { display: block; font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); text-align: right; margin-bottom: 3px; opacity: .7; }
.sidebar .ad-slot { margin: 0 0 22px; }

/* ---------- Video ---------- */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 12px; }
.video-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.video-card:hover { box-shadow: 0 14px 30px rgba(13,61,82,.22); transform: translateY(-4px); border-color: var(--brand-light); }
.video-thumb { position: relative; display: block; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--brand-dark), #071e2a); overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.video-card:hover .video-thumb img { transform: scale(1.06); }
.video-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 40%, rgba(0,0,0,.45)); }
.video-thumb-ph { display: flex; align-items: center; justify-content: center; height: 100%; color: rgba(255,255,255,.6); font-size: 2.4rem; }
.video-play { position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,0,0,.92); color: #fff; border-radius: 50%; font-size: 1.15rem; padding-left: 3px; z-index: 2;
  box-shadow: 0 6px 18px rgba(0,0,0,.4); transition: transform .18s ease, background .18s ease; }
.video-card:hover .video-play { transform: scale(1.12); background: #f00; }
.video-badge { position: absolute; top: 9px; left: 9px; z-index: 2; background: #f00; color: #fff; font-size: .6rem; letter-spacing: .05em;
  padding: 3px 8px; border-radius: 5px; font-weight: 800; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.video-card-body { padding: 11px 13px 15px; }
.video-card-title { font-size: .92rem; line-height: 1.35; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-player { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; margin: 14px 0 20px; box-shadow: 0 12px 34px rgba(13,61,82,.28); }
.video-player iframe, .video-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-desc { margin-bottom: 24px; }
@media (max-width: 900px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .video-grid { grid-template-columns: 1fr; } }

/* Facade YouTube: thumbnail + nút play, bấm mới nạp player */
.yt-facade { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; background-size: cover; background-position: center;
  background-color: var(--brand-dark); display: flex; align-items: center; justify-content: center; }
.yt-facade::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.4)); transition: background .2s ease; }
.yt-facade:hover::before { background: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.5)); }
.yt-facade .yt-play { position: relative; z-index: 2; width: 74px; height: 52px; border-radius: 14px; background: rgba(255,0,0,.92);
  box-shadow: 0 8px 24px rgba(0,0,0,.5); transition: transform .18s ease, background .18s ease; }
.yt-facade .yt-play::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-42%, -50%);
  border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff; }
.yt-facade:hover .yt-play { transform: scale(1.1); background: #f00; }

/* ---------- Widget video cột phải trang chủ ---------- */
.widget-video .wv-player { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.widget-video .wv-player iframe, .widget-video .wv-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wv-single-title { display: block; font-weight: 700; color: var(--brand-dark); font-size: .92rem; margin-bottom: 8px; }
.wv-single-title:hover { color: var(--brand); }
.wv-list { list-style: none; margin: 0; padding: 0; }
.wv-list li { margin-bottom: 7px; }
.wv-list a { font-size: .85rem; color: var(--ink); display: block; }
.wv-list a:hover { color: var(--brand); }
.wv-cards { display: flex; flex-direction: column; gap: 12px; }
.wv-card { display: flex; gap: 11px; align-items: center; padding: 5px; border-radius: 10px; transition: background .15s ease; }
.wv-card:hover { background: #eef6fa; }
.wv-thumb { position: relative; flex-shrink: 0; width: 108px; height: 66px; border-radius: 9px; overflow: hidden; background: linear-gradient(135deg, var(--brand-dark), #071e2a); }
.wv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wv-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.4)); }
.wv-thumb-ph { display: flex; align-items: center; justify-content: center; height: 100%; color: rgba(255,255,255,.6); }
.wv-play { position: absolute; inset: 0; margin: auto; width: 34px; height: 24px; display: flex; align-items: center; justify-content: center; z-index: 2; background: rgba(255,0,0,.92); color: #fff; border-radius: 7px; font-size: .62rem; padding-left: 2px; box-shadow: 0 3px 10px rgba(0,0,0,.35); transition: transform .15s ease; }
.wv-card:hover .wv-play { transform: scale(1.12); background: #f00; }
.wv-card-title { font-size: .85rem; font-weight: 600; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wv-card:hover .wv-card-title { color: var(--brand-dark); }
.widget-video { background: linear-gradient(160deg, #f4fafd, #fff); border-color: var(--brand-light); }
.widget-video .widget-title { border-bottom-color: #f00; }
.wv-more { display: inline-block; margin-top: 12px; font-size: .82rem; font-weight: 700; color: var(--brand); }
.wv-more:hover { color: var(--gold-dark); }

/* ---------- Term pages ---------- */
.term-title { font-family: var(--serif); font-size: 1.6rem; color: var(--brand-darker); margin-bottom: 8px; padding-left: 14px; border-left: 5px solid var(--gold); }
.term-desc { color: var(--muted); margin-bottom: 20px; }
.card-grid-list { margin-top: 18px; }

/* ---------- Sidebar ---------- */
.sidebar { min-width: 0; }
.widget { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 22px; box-shadow: 0 2px 8px rgba(13,61,82,.04); }
.widget-title { font-family: var(--serif); font-size: 1.02rem; color: var(--brand-dark); border-bottom: 3px solid var(--gold); padding-bottom: 8px; margin-bottom: 14px; }
.widget-posts { list-style: none; }
.widget-posts li { margin-bottom: 12px; }
.widget-posts a { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; line-height: 1.4; color: var(--ink); }
.widget-posts a:hover { color: var(--brand); }
.widget-posts img { width: 76px; height: 54px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.widget-cats { list-style: none; }
.widget-cats li { border-bottom: 1px dashed var(--line); }
.widget-cats a { display: flex; justify-content: space-between; padding: 7px 2px; font-size: .9rem; border-radius: 4px; }
.widget-cats a:hover { background: #eef6fa; padding-left: 8px; }
.widget-cats em { color: #fff; background: var(--brand-light); font-style: normal; font-size: .74rem; border-radius: 10px; padding: 1px 8px; align-self: center; }

/* ---------- Search ---------- */
.search-form { display: flex; margin: 18px 0; }
.search-form input { flex: 1; padding: 11px 16px; border: 2px solid var(--brand); border-right: none; border-radius: 8px 0 0 8px; font-size: 1rem; outline: none; }
.btn-search { padding: 11px 22px; border: none; background: var(--brand); color: #fff; border-radius: 0 8px 8px 0; cursor: pointer; font-weight: 700; }
.btn-search:hover { background: var(--gold); color: #4a3400; }
.search-note { color: var(--muted); margin-bottom: 14px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 28px 0; }
.pagination a, .pagination .current { padding: 7px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); font-size: .9rem; }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination a:hover { border-color: var(--gold); background: #fdf8ea; }

/* ---------- 404 ---------- */
.page-404 { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 48px 24px; }
.page-404 h1 { font-size: 4.5rem; color: var(--brand); font-family: var(--serif); }
.page-404 .search-form { max-width: 420px; margin: 18px auto; }

/* ---------- Footer — mẫu F1: CTA vàng + 4 cột ---------- */
.site-footer { margin-top: 44px; background: linear-gradient(180deg, var(--brand-dark), var(--brand-darker)); color: #b9d5e2; }
.footer-cta { background: linear-gradient(90deg, var(--gold), #f5cf67); }
.footer-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 16px; flex-wrap: wrap; }
.cta-title { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: #3d2e00; }
.cta-sub { color: #6b5410; font-size: .92rem; margin-top: 2px; }
.cta-call { background: var(--brand-darker); color: #fff; padding: 13px 28px; border-radius: 28px; font-weight: 800; font-size: 1rem; box-shadow: 0 6px 18px rgba(13,61,82,.35); transition: all .15s ease; white-space: nowrap; }
.cta-call:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }

.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr 1.2fr; gap: 30px; padding: 38px 16px 26px; }
.site-footer h3 { font-family: var(--serif); color: #fff; margin-bottom: 13px; font-size: 1rem; border-bottom: 2px solid var(--gold); display: inline-block; padding-bottom: 5px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; font-size: .88rem; }
.site-footer a { color: #b9d5e2; font-size: .88rem; }
.site-footer a:hover { color: var(--gold); }
.site-footer em { color: #7fa5b8; font-style: normal; font-size: .78rem; }
.footer-logo { height: 62px; background: #fff; border-radius: 10px; padding: 6px 10px; margin-bottom: 12px; }
.footer-about p { font-size: .88rem; }
.footer-social { display: flex; gap: 9px; margin-top: 14px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; transition: all .15s ease; }
.footer-social a:hover { background: var(--gold); color: #4a3400; transform: translateY(-2px); }
.footer-posts li { border-bottom: 1px dashed rgba(255,255,255,.12); padding-bottom: 8px; }
.footer-contact li { display: flex; gap: 9px; align-items: flex-start; }
.footer-contact .ic { color: var(--gold); flex-shrink: 0; }
.map-link { text-decoration: underline; }
.footer-bottom { background: #092c3d; color: #7fa5b8; padding: 14px 0; font-size: .8rem; text-align: center; }
.footer-bottom strong { color: var(--gold); }
.footer-bottom a { color: #a9c9d8; text-decoration: underline; font-size: .8rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .page-grid { grid-template-columns: 1fr; }
  .hero-cards { grid-template-columns: 1fr 1fr; grid-template-areas: "main main" "a b" "c d"; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .header-info { display: none; }
  .header-inner { justify-content: space-between; }
}
@media (max-width: 620px) {
  .topbar-contact { display: none; }
  .topbar a { padding: 7px 9px; font-size: .72rem; }
  .header-inner { flex-direction: column; gap: 10px; padding: 12px 16px; }
  .header-search { width: 100%; }
  .brand-logo { height: 76px; }

  /* Hamburger menu (nav trắng) */
  .nav-burger { display: block; color: var(--brand-dark); font-weight: 800; padding: 12px 16px; cursor: pointer; }
  .nav-inner { display: none; flex-direction: column; align-items: stretch; }
  .nav-toggle:checked ~ .nav-inner { display: flex; }
  .main-nav a, .nav-more-label { border-bottom: 1px solid var(--line); }
  .nav-cta { margin: 10px 14px; text-align: center; }
  span.nav-more-label { display: none; }
  .nav-dropdown { display: block; position: static; background: transparent; box-shadow: none; padding: 0; max-height: none; border-top: none; }
  .nav-dropdown a { padding: 11px 26px !important; }
  .ticker-label { font-size: .68rem; padding: 8px 10px; }

  .hero-cards { grid-template-columns: 1fr; grid-template-areas: "main" "a" "b" "c" "d"; }
  .card-grid, .card-grid-list { grid-template-columns: 1fr; }
  .article { padding: 20px 16px; }
  .article-title { font-size: 1.45rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-cta-inner { flex-direction: column; text-align: center; }

  .cta-banner { flex-wrap: wrap; text-align: center; justify-content: center; padding: 18px; }
  .cta-banner-text { flex-basis: 100%; }
  .popular-title { font-size: .85rem; }
  .popular-views { display: none; }
}

/* ---------- Form đăng ký tư vấn ---------- */
.consult-form label { display: block; font-weight: 700; font-size: .88rem; color: var(--brand-darker); margin-bottom: 14px; }
.consult-form label b { color: var(--news); }
.consult-form input, .consult-form textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: .95rem; font-weight: 400; font-family: inherit; }
.consult-form input:focus, .consult-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,114,153,.12); }
.consult-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.consult-services { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; background: #f8fbfd; }
.consult-services legend { font-weight: 800; font-size: .88rem; color: var(--brand-dark); padding: 0 8px; }
.consult-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: .88rem !important; color: var(--ink) !important; margin-bottom: 10px !important; cursor: pointer; }
.consult-check input { width: auto !important; margin-top: 3px !important; flex-shrink: 0; }
.consult-check:hover span { color: var(--brand); }
.consult-submit { display: block; width: 100%; padding: 14px; border: none; border-radius: 26px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; font-size: 1.05rem; font-weight: 800; cursor: pointer; box-shadow: 0 6px 18px rgba(30,114,153,.35); transition: all .15s ease; }
.consult-submit:hover { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #4a3400; transform: translateY(-2px); }
.form-error { background: #fde3e3; color: #a12b2b; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .92rem; }
.form-success { text-align: center; padding: 30px 16px; }
.form-success-icon { display: inline-flex; align-items: center; justify-content: center; width: 74px; height: 74px; border-radius: 50%; background: #e1f4e5; color: #187a33; font-size: 2.4rem; margin-bottom: 14px; }
.form-success h2 { font-family: var(--serif); color: var(--brand-darker); margin-bottom: 10px; }
.form-success p { color: var(--muted); margin-bottom: 8px; }

/* ---------- Khối Liên hệ + bản đồ ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 22px rgba(13,61,82,.14); }
.contact-info { background: linear-gradient(160deg, var(--brand-dark), var(--brand-darker)); color: #d6e7ef; padding: 30px 28px; }
.contact-info h3 { font-family: var(--serif); color: #fff; font-size: 1.15rem; margin-bottom: 16px; border-bottom: 2px solid var(--gold); display: inline-block; padding-bottom: 6px; }
.contact-info ul { list-style: none; }
.contact-info li { display: flex; gap: 10px; margin-bottom: 12px; font-size: .92rem; align-items: flex-start; }
.contact-info .ic { color: var(--gold); flex-shrink: 0; }
.contact-info a { color: #d6e7ef; }
.contact-info a:hover { color: var(--gold); }
.contact-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.contact-btn { padding: 11px 20px; border-radius: 22px; font-weight: 800; font-size: .88rem; background: rgba(255,255,255,.12); color: #fff; transition: all .15s ease; }
.contact-btn:hover { background: rgba(255,255,255,.25); color: #fff; }
.contact-btn.primary { background: var(--gold); color: #4a3400; }
.contact-btn.primary:hover { background: #fff; color: var(--brand-darker); }
.contact-map { min-height: 320px; }
.contact-map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

/* Footer CTA hai nút */
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-call-alt { background: #fff; color: var(--brand-darker); }
.cta-call-alt:hover { background: var(--brand-darker); color: #fff; }

@media (max-width: 760px) {
  .consult-row { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Kiểu hiển thị khối bài viết (chọn trong admin Giao diện) ---------- */
/* Kiểu "lead": magazine — 1 bài lớn trái + danh sách phải */
.pb-lead { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; }
.pb-lead-main { display: flex; }
.pb-lead-main .post-card { width: 100%; }
.pb-lead-main .card-thumb { aspect-ratio: auto; flex: 1 1 200px; min-height: 200px; }
.pb-lead-main .card-title { font-size: 1.02rem; }
.pb-lead-side { display: flex; flex-direction: column; gap: 10px; }
.pb-row { display: flex; gap: 11px; align-items: flex-start; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; transition: all .15s ease; flex: 1; }
.pb-row:hover { border-color: var(--brand-light); box-shadow: 0 4px 12px rgba(30,114,153,.12); transform: translateX(3px); }
.pb-row img { width: 96px; height: 66px; object-fit: cover; border-radius: 7px; flex-shrink: 0; }
.pb-row-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pb-row-title { font-family: var(--serif); font-weight: 700; font-size: .82rem; line-height: 1.35; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pb-row:hover .pb-row-title { color: var(--brand); }
.pb-row time { font-size: .72rem; color: var(--muted); }

/* Kiểu "list": hàng ngang thumb trái */
.pb-list { display: flex; flex-direction: column; gap: 12px; }
.pb-item { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; transition: all .15s ease; }
.pb-item:hover { border-color: var(--brand-light); box-shadow: 0 5px 14px rgba(30,114,153,.13); transform: translateX(3px); }
.pb-item img { width: 180px; height: 112px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.pb-item-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 2px 4px; }
.pb-item-title { font-family: var(--serif); font-weight: 700; font-size: .95rem; line-height: 1.35; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pb-item:hover .pb-item-title { color: var(--brand); }
.pb-item-summary { font-size: .84rem; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pb-item time { font-size: .74rem; color: var(--muted); margin-top: auto; }

/* Kiểu "text": tin vắn gọn */
.pb-text { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px; }
.pb-text-item { display: flex; gap: 10px; align-items: baseline; padding: 9px 2px; border-bottom: 1px dashed var(--line); }
.pb-text-item:last-child { border-bottom: none; }
.pb-bullet { color: var(--gold-dark); font-weight: 800; flex-shrink: 0; }
.pb-text-title { flex: 1; min-width: 0; font-size: .9rem; font-weight: 600; color: var(--ink); line-height: 1.4; }
.pb-text-item:hover .pb-text-title { color: var(--brand); }
.pb-text-item time { font-size: .74rem; color: var(--muted); flex-shrink: 0; }

@media (max-width: 760px) {
  .pb-lead { grid-template-columns: 1fr; }
  .pb-item img { width: 116px; height: 82px; }
  .pb-item-summary { display: none; }
}
