/*
Theme Name: TopGoiVay
Theme URI: https://topgoivay.com
Author: NLICT Vietnam
Author URI: https://nguyenngocminhluan.com
Description: Theme so sánh và giới thiệu gói vay tín chấp cho site affiliate tài chính. Thương hiệu site đứng độc lập, logo ngân hàng chỉ dùng ở vai trò nhận diện gói vay trong bảng so sánh.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: topgoivay
*/

:root{
  --green:#0aa05a; --green-deep:#067a44; --teal:#1f6e8c; --blue-deep:#1b5f7d;
  --ink:#17302a; --muted:#5c6b66; --line:#e4ece8; --wash:#f3f8f5;
  --radius:14px; --shadow:0 10px 30px rgba(16,58,44,.08);
}
*{box-sizing:border-box}
body{margin:0;font-family:'Be Vietnam Pro',system-ui,-apple-system,Segoe UI,sans-serif;color:var(--ink,#17302a);line-height:1.6;background:#fff;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:var(--green-deep,#067a44)}
.wrap{width:min(1120px,92vw);margin-inline:auto}
h1,h2,h3{line-height:1.25;margin:0 0 .5em;font-weight:700;letter-spacing:-.01em}
h1{font-size:clamp(28px,4.4vw,44px)} h2{font-size:clamp(22px,3vw,33px)} h3{font-size:20px}
p{margin:0 0 1em}
.screen-reader-text{position:absolute;left:-9999px}

/* ---------- Header ---------- */
.site-header{position:sticky;top:0;z-index:40;background:#fff;border-bottom:1px solid var(--line,#e4ece8)}
.site-header__inner{display:flex;align-items:center;gap:24px;padding:14px 0}
.site-brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink,#17302a);font-weight:700;font-size:20px}
.site-brand img{height:38px;width:auto}
.site-nav{margin-left:auto}
.site-nav ul{display:flex;gap:22px;list-style:none;margin:0;padding:0}
.site-nav a{text-decoration:none;color:var(--ink,#17302a);font-size:15.5px;font-weight:500}
.site-nav a:hover{color:var(--green-deep,#067a44)}
.nav-toggle{display:none;margin-left:auto;background:none;border:1px solid var(--line,#e4ece8);border-radius:10px;padding:8px 12px;font-size:15px;cursor:pointer}

/* ---------- Nút ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:14px 30px;border-radius:999px;
  background:linear-gradient(100deg,var(--green,#0aa05a),var(--green-deep,#067a44));color:#fff;font-weight:600;text-decoration:none;
  box-shadow:0 10px 24px rgba(10,160,90,.3);transition:transform .18s ease}
.btn:hover{transform:translateY(-2px);color:#fff}
.btn:focus-visible{outline:3px solid #0b3d2c;outline-offset:3px}
.btn--sm{padding:10px 20px;font-size:14.5px;box-shadow:none}
.btn--ghost,
.btn--ghost:link,
.btn--ghost:visited,
.btn--ghost:hover,
.btn--ghost:focus{background:#fff;color:#067a44;border:2px solid #0aa05a;box-shadow:none}
.btn--ghost:hover{background:#f3f8f5}
.hero .btn--ghost{background:transparent;color:#fff;border-color:rgba(255,255,255,.9)}
.hero .btn--ghost:hover{background:rgba(255,255,255,.14);color:#fff}

/* ---------- Hero ---------- */
.hero{position:relative;overflow:hidden;color:#fff;padding:60px 0 120px;
  background:linear-gradient(120deg,#0f8a52 0%,#0aa05a 42%,#1f6e8c 100%)}
.hero::after{content:"";position:absolute;inset:auto -10% -1px -10%;height:110px;background:#fff;border-radius:100% 100% 0 0/100% 100% 0 0}
.hero__grid{position:relative;z-index:2;display:grid;grid-template-columns:1.05fr .95fr;gap:50px;align-items:center}
.hero p{color:rgba(255,255,255,.92);font-size:17px;max-width:60ch}
.eyebrow{display:inline-block;padding:7px 16px;border-radius:999px;background:rgba(255,255,255,.16);font-size:14px;margin-bottom:16px}
.hero__cta{display:flex;flex-wrap:wrap;gap:14px;margin-top:24px}
.hero__photo{width:min(100%,460px);margin-inline:auto;filter:drop-shadow(0 20px 44px rgba(4,42,28,.3))}
.stats{position:relative;z-index:2;display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:38px}
.stat{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.24);border-radius:14px;padding:15px 18px}
.stat b{display:block;font-size:22px;line-height:1.2}
.stat span{font-size:13.5px;color:rgba(255,255,255,.86)}

/* ---------- Section ---------- */
.section{padding:70px 0}
.section--wash{background:var(--wash,#f3f8f5)}
.section-head{max-width:660px;margin-bottom:36px}
.section-head p{color:var(--muted,#5c6b66);margin:0}

/* ---------- Thẻ gói vay ---------- */
.loan-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.loan-card{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line,#e4ece8);border-radius:var(--radius,14px);padding:22px;box-shadow:var(--shadow,0 10px 30px rgba(16,58,44,.08))}
.loan-card__top{display:flex;align-items:center;gap:12px;min-height:46px;margin-bottom:14px}
.loan-card__logo{height:30px;width:auto;object-fit:contain}
.loan-card__bank{font-weight:600;font-size:15px;color:var(--muted,#5c6b66)}
.loan-card h3{font-size:18px;margin-bottom:12px}
.loan-card h3 a{color:inherit;text-decoration:none}
.loan-specs{list-style:none;margin:0 0 16px;padding:0}
.loan-specs li{display:flex;justify-content:space-between;gap:14px;padding:8px 0;border-bottom:1px dashed var(--line,#e4ece8);font-size:14.5px}
.loan-specs li:last-child{border-bottom:0}
.loan-specs span{color:var(--muted,#5c6b66)}
.loan-specs b{font-weight:600;text-align:right}
.loan-card__foot{margin-top:auto;display:flex;flex-direction:column;gap:8px}
.loan-card__note{font-size:12.5px;color:var(--muted,#5c6b66);text-align:center;margin:0}

/* ---------- Bảng so sánh ---------- */
.compare-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
.compare{width:100%;min-width:760px;border-collapse:collapse;font-size:15px;background:#fff}
.compare th,.compare td{padding:14px 16px;border-bottom:1px solid var(--line,#e4ece8);text-align:left;vertical-align:middle}
.compare thead th{background:var(--wash,#f3f8f5);font-size:13.5px;letter-spacing:.02em;color:var(--muted,#5c6b66);font-weight:600}
.compare tbody tr:hover{background:#fafcfb}
.compare__bank{display:flex;align-items:center;gap:10px}
.compare__bank img{height:26px;width:auto}
.compare__name{font-weight:600}

/* ---------- Trang chi tiết ---------- */
.entry{display:grid;grid-template-columns:1fr 340px;gap:44px;align-items:start;padding:56px 0}
.entry__body{max-width:70ch}
.entry__body h2{margin-top:1.6em}
.entry__body ul{padding-left:20px}
.sidebar-card{position:sticky;top:92px;border:1px solid var(--line,#e4ece8);border-radius:18px;padding:24px;box-shadow:var(--shadow,0 10px 30px rgba(16,58,44,.08))}
.sidebar-card .loan-specs{margin-bottom:18px}
.pros-cons{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:26px 0}
.pros-cons ul{margin:0;padding-left:20px}
.pros-cons h3{font-size:17px}
.pros-cons div:first-child h3{color:var(--green-deep,#067a44)}
.pros-cons div:last-child h3{color:#b4522f}

/* ---------- Đối tác + miễn trừ ---------- */
.partners{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:26px;padding:8px 0}
.partners img{height:30px;width:auto;opacity:.9}
.partners__label{width:100%;text-align:center;font-size:13px;color:var(--muted,#5c6b66);margin-bottom:4px}
.disclosure{background:var(--wash,#f3f8f5);border-left:4px solid var(--green,#0aa05a);border-radius:10px;padding:16px 18px;font-size:14px;color:var(--muted,#5c6b66);margin:26px 0}
.disclosure p{margin:0}

/* ---------- Footer ---------- */
.site-footer{position:relative;overflow:hidden;color:#fff;background:linear-gradient(100deg,#1b5f7d,#0f8a52);padding:52px 0 36px;margin-top:20px}
.site-footer::before{content:"";position:absolute;width:460px;height:460px;left:-150px;top:-140px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.16),transparent 68%)}
.site-footer .wrap{position:relative;z-index:2}
.footer-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:34px;padding-bottom:26px;border-bottom:1px solid rgba(255,255,255,.25)}
.footer-brand{display:flex;align-items:center;gap:12px;font-size:22px;font-weight:700;margin-bottom:10px}
.footer-brand img{height:40px;width:auto}
.footer-grid p{color:rgba(255,255,255,.85);font-size:14.5px}
.footer-grid ul{list-style:none;margin:0;padding:0}
.footer-grid li{padding:6px 0}
.footer-grid a{color:#fff;text-decoration:none;font-size:14.5px}
.footer-grid a:hover{text-decoration:underline}
.footer-heading{font-size:15px;font-weight:600;margin-bottom:8px}
.site-disclaimer{max-width:80ch;margin:22px auto 0;text-align:center;font-size:12.5px;color:rgba(255,255,255,.72)}
.site-copyright{text-align:center;font-size:14px;color:rgba(255,255,255,.85);margin-top:18px}

@media(max-width:960px){
  .hero__grid{grid-template-columns:1fr;gap:30px}
  .hero__media{order:-1}
  .stats{grid-template-columns:1fr 1fr}
  .loan-grid{grid-template-columns:1fr 1fr}
  .entry{grid-template-columns:1fr;gap:30px}
  .sidebar-card{position:static}
  .footer-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:680px){
  .loan-grid,.stats,.footer-grid,.pros-cons{grid-template-columns:1fr}
  .nav-toggle{display:block}
  .site-nav{display:none;width:100%;margin:0}
  .site-nav.is-open{display:block}
  .site-nav ul{flex-direction:column;gap:0;padding:8px 0}
  .site-nav li{border-top:1px solid var(--line,#e4ece8)}
  .site-nav a{display:block;padding:12px 2px}
  .site-header__inner{flex-wrap:wrap}
  .section{padding:52px 0}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}


/* ---------- Vị trí banner quảng cáo ---------- */
.ad-slot{margin:0 auto;padding:18px 0;text-align:center}
.ad-slot--top{border-bottom:1px solid var(--line,#e4ece8)}
.ad-slot__label{display:block;font-size:11px;letter-spacing:.08em;color:var(--muted,#5c6b66);margin-bottom:6px}
.ad-slot img{margin-inline:auto}
.ad-slot .widget{margin-bottom:14px}
.ad-slot .widget:last-child{margin-bottom:0}

/* ---------- Danh sách bài viết ---------- */
.post-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}
.post-card{display:flex;flex-direction:column;border:1px solid var(--line,#e4ece8);border-radius:14px;overflow:hidden;background:#fff}
.post-card__thumb{aspect-ratio:16/9;overflow:hidden;background:var(--wash,#f3f8f5)}
.post-card__thumb img{width:100%;height:100%;object-fit:cover}
.post-card__body{padding:18px 20px 22px;display:flex;flex-direction:column;gap:8px;flex:1}
.post-card h3{font-size:18px;margin:0}
.post-card h3 a{color:inherit;text-decoration:none}
.post-card h3 a:hover{color:var(--green-deep,#067a44)}
.post-card p{color:var(--muted,#5c6b66);font-size:14.5px;margin:0}
.post-card__meta{margin-top:auto;font-size:13px;color:var(--muted,#5c6b66)}
.post-sidebar{display:flex;flex-direction:column;gap:22px}
.post-sidebar .widget{border:1px solid var(--line,#e4ece8);border-radius:14px;padding:20px}
.post-sidebar .widget-title{font-size:16px;font-weight:600;margin:0 0 10px}
.post-sidebar ul{list-style:none;margin:0;padding:0}
.post-sidebar li{padding:7px 0;border-bottom:1px solid var(--line,#e4ece8);font-size:14.5px}
.post-sidebar li:last-child{border-bottom:0}
@media(max-width:960px){.post-grid{grid-template-columns:1fr 1fr}}
@media(max-width:680px){.post-grid{grid-template-columns:1fr}}
