/* ===== Pakistan – Web phân tích, 2 cột, sidebar phải, xanh lá ===== */
:root {
  --green-dk: #01411C;
  --green-md: #006B2C;
  --green-lg: #0d7d3d;
  --green-soft: #e8f5e9;
  --green-muted: #1b5e20;
  --bg: #f5f9f5;
  --bg-card: #ffffff;
  --text: #1a2e1a;
  --text-muted: #2d4a2d;
  --border: rgba(1, 65, 28, 0.15);
  --link: #006B2C;
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-table: 12px;
  --shadow: 0 2px 10px rgba(1, 65, 28, 0.06);
  --shadow-sidebar: 0 4px 20px rgba(1, 65, 28, 0.08);
  --main-width: min(720px, 100%);
  --sidebar-width: 300px;
  --gap: 2rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.seo-h1 {
  position: absolute;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* ===== Hero – banner image (text fixed in image) ===== */
.hero {
  background: var(--green-dk);
  padding: 0;
  text-align: center;
  line-height: 0;
}
.hero-banner-img {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  margin: 0 auto;
  vertical-align: middle;
}
@media (max-width: 960px) {
  .hero {
    padding-top: 30px;
    padding-bottom: 30px;
    overflow: hidden;
  }
  .hero-banner-img {
    width: 100%;
    transform: scale(1.4);
    transform-origin: center center;
  }
}

/* ===== 2 cột: main + sidebar ===== */
.page-wrap {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--gap);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem 2rem;
}
@media (max-width: 960px) {
  .page-wrap {
    grid-template-columns: 1fr;
    padding: 0.6rem 1rem 1.5rem;
  }
}

.main {
  min-width: 0;
}

/* ===== Sections ===== */
.section {
  padding: 1.25rem 0;
}
/* Hero + intro + 5 sàn vừa 1 màn hình: giảm padding phần đầu */
.main .intro.section {
  padding: 0.4rem 0 0.25rem;
}
.main .quick-table.section {
  padding: 0.35rem 0 1rem;
}
.main .quick-table.section .section-title {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}
.section-alt {
  background: var(--green-soft);
  margin: 0 -0.5rem;
  padding: 1.25rem 1rem;
  border-radius: var(--radius);
}
/* Trading from Pakistan – cùng cấp với quick-table (title size, padding gọn) */
.main .pakistan-context.section-alt {
  padding: 0.75rem 1rem 1rem;
}
.pakistan-context .section-title {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  font-weight: 700;
  color: var(--text);
}
.pakistan-context .intro-text {
  margin: 0;
}
.pakistan-context .intro-text + .intro-text {
  margin-top: 0.5rem;
}
.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.75rem;
}

/* ===== Article images (Unsplash) ===== */
.article-img-wrap {
  margin: 0 auto 1.25rem;
  max-width: 520px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(1, 65, 28, 0.1);
  border: 1px solid var(--border);
}
.article-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}
.article-img-caption {
  margin: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--green-soft);
  line-height: 1.4;
}
.article-img-inline {
  max-width: 340px;
  margin-bottom: 1rem;
}
.article-img-inline .article-img { width: 100%; }

/* ===== Intro ===== */
.intro-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ===== Quick table – 5 sàn, đẹp, cân đối ===== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-table);
  box-shadow: 0 4px 16px rgba(1, 65, 28, 0.1);
  max-width: 460px;
  margin: 0 auto;
  border: 1px solid var(--border);
}
.criterion .table-wrapper {
  max-width: 100%;
}
.quick-ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.quick-ref-table thead tr {
  background: linear-gradient(135deg, var(--green-dk) 0%, var(--green-md) 100%);
}
.quick-ref-table th {
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.6rem 0.75rem;
  text-align: left;
  border: none;
}
.quick-ref-table th:first-child {
  border-radius: var(--radius-table) 0 0 0;
  width: 3rem;
  min-width: 3rem;
  text-align: center;
}
.quick-ref-table th:last-child {
  border-radius: 0 var(--radius-table) 0 0;
  width: 6rem;
  min-width: 5.5rem;
  text-align: center;
}
.quick-ref-table tbody tr {
  background: #fff;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}
.quick-ref-table tbody tr:last-child {
  border-bottom: none;
}
.quick-ref-table tbody tr:hover {
  background: var(--green-soft);
}
.quick-ref-table tbody td {
  padding: 0.55rem 0.75rem;
  vertical-align: middle;
  border: none;
}
.quick-ref-table tbody .col-no {
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--green-md);
  background: rgba(0, 107, 44, 0.06);
}
.quick-ref-table tbody .col-broker {
  font-weight: 600;
  color: var(--green-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 52px;
}
/* Header # và Broker cùng style (chỉ áp dụng cho thead) */
.quick-ref-table thead th {
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent;
}
.quick-ref-table .broker-logo-table {
  width: 64px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--green-soft);
  padding: 4px;
  flex-shrink: 0;
}
.quick-ref-table .col-ref {
  text-align: center;
}
.quick-ref-table .col-ref a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #fff;
  background: linear-gradient(180deg, var(--green-md) 0%, var(--green-dk) 100%);
  padding: 0.4rem 0.65rem;
  min-width: 4.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(1, 65, 28, 0.25);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.quick-ref-table .col-ref a:hover {
  box-shadow: 0 4px 14px rgba(1, 65, 28, 0.35);
  transform: translateY(-1px);
}
.quick-ref-table .btn-icon {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.95;
}

/* ===== Fit cards (vertical) ===== */
.fit-intro {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.fit-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.fit-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.5rem 1.25rem;
  padding-left: 3.25rem;
  box-shadow: var(--shadow);
}
.fit-rank {
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, var(--green-md) 0%, var(--green-dk) 100%);
  border-radius: var(--radius) 0 0 var(--radius);
  border-right: 2px solid rgba(255,255,255,0.2);
  line-height: 1;
}
.fit-card-1 .fit-rank {
  background: linear-gradient(180deg, #0d7d3d 0%, var(--green-dk) 100%);
  font-size: 1.5rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}
.fit-card-2 .fit-rank { background: linear-gradient(180deg, #1b5e20 0%, #0a5c28 100%); }
.fit-card-3 .fit-rank { background: linear-gradient(180deg, var(--green-md) 0%, var(--green-dk) 100%); }
.fit-card-4 .fit-rank { background: linear-gradient(180deg, #0a5c28 0%, var(--green-dk) 100%); }
.fit-card-5 .fit-rank { background: linear-gradient(180deg, #006B2C 0%, #002a12 100%); }
/* Cụm nổi bật: Logo + tên + Best for + tags */
.fit-card-highlight {
  background: linear-gradient(135deg, rgba(0, 107, 44, 0.12) 0%, var(--green-soft) 50%, rgba(13, 125, 61, 0.1) 100%);
  border: 1px solid rgba(0, 107, 44, 0.25);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(1, 65, 28, 0.08);
}
.fit-card-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.fit-card-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.fit-card-name { margin: 0; font-size: 1.2rem; font-weight: 700; color: var(--text); }
.fit-card-highlight .fit-label {
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--green-muted);
}
.fit-card-highlight .fit-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.fit-card-highlight .fit-tag {
  font-size: 0.8rem;
  padding: 0.28rem 0.6rem;
  background: #fff;
  color: var(--green-md);
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid rgba(0, 107, 44, 0.3);
  box-shadow: 0 1px 3px rgba(1, 65, 28, 0.06);
}
.fit-desc {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.fit-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  background: linear-gradient(180deg, var(--green-md) 0%, var(--green-dk) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(1, 65, 28, 0.28);
  transition: transform 0.2s, box-shadow 0.2s;
}
.fit-cta-btn:hover {
  background: linear-gradient(180deg, var(--green-dk) 0%, #002a12 100%);
  box-shadow: 0 4px 16px rgba(1, 65, 28, 0.38);
  transform: translateY(-2px);
  color: #fff;
}
.fit-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, var(--green-md) 0%, var(--green-dk) 100%);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(1, 65, 28, 0.25);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.fit-link:hover {
  background: linear-gradient(180deg, var(--green-dk) 0%, #002a12 100%);
  box-shadow: 0 4px 14px rgba(1, 65, 28, 0.35);
  transform: translateY(-1px);
}
.fit-link-icon {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}
.fit-cta-hint {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.suggest-note {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}

/* ===== Criteria ===== */
.criteria-intro p { margin: 0; color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.criterion-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.criterion-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--green-dk) 0%, var(--green-md) 100%);
  border-radius: var(--radius-sm);
}
.criterion-lead {
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}
.criterion p {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}
.data-table th,
.data-table td {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  text-align: left;
}
.data-table th {
  background: linear-gradient(135deg, var(--green-dk) 0%, var(--green-md) 100%);
  color: #fff;
  font-weight: 600;
}
.data-table tbody tr:nth-child(even) td { background: var(--green-soft); }
.table-note {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}
.conclusion p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.wrap-up-link { color: var(--link); font-weight: 600; text-decoration: none; }
.wrap-up-link:hover { text-decoration: underline; }

/* ===== CTA – links only at end of article ===== */
.cta.section {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}
.cta-intro {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(180deg, var(--green-md) 0%, var(--green-dk) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cta-btn:hover {
  background: linear-gradient(180deg, var(--green-dk) 0%, #002a12 100%);
  box-shadow: 0 4px 14px rgba(1, 65, 28, 0.35);
  transform: translateY(-1px);
}
.cta-btn-icon {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}
.table-ref-link {
  color: var(--link);
  font-size: 0.9rem;
  text-decoration: none;
}
.table-ref-link:hover { text-decoration: underline; }

/* ===== Sidebar (right) ===== */
.sidebar {
  position: relative;
}
.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sidebar);
}
.sidebar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--green-md);
}
.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-list li {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}
.sidebar-list a {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
}
.sidebar-list a:hover { text-decoration: underline; }

/* Sidebar broker list with logos */
.sidebar-broker-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-broker-item {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.sidebar-broker-item a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.35rem 0;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}
.sidebar-broker-item a:hover {
  background: var(--green-soft);
  color: var(--green-md);
}
.sidebar-broker-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
  background: var(--green-soft);
  padding: 2px;
}
.sidebar-broker-item a:hover .sidebar-broker-logo {
  background: #fff;
}

/* Sidebar: only logos, no link – grid 3x3, logo to rõ */
.sidebar-broker-logos-only {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.sidebar-broker-logos-only .sidebar-broker-item {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  min-height: 0;
  aspect-ratio: 1;
  background: var(--green-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.sidebar-broker-logos-only .sidebar-broker-logo {
  width: 52px;
  height: 52px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
/* Octa, LiteFinance, Markets4You – fill ô để bằng các logo khác (7,8,9; 6 là FBS) */
.sidebar-broker-logos-only .sidebar-broker-item:nth-child(7) .sidebar-broker-logo,
.sidebar-broker-logos-only .sidebar-broker-item:nth-child(8) .sidebar-broker-logo,
.sidebar-broker-logos-only .sidebar-broker-item:nth-child(9) .sidebar-broker-logo {
  width: 100%;
  height: 100%;
}
/* Sidebar logo scale: Vantage +45%, Lite +125%, Octa +15%, Markets4You +15% */
.sidebar-broker-logos-only .sidebar-broker-item:nth-child(5) .sidebar-broker-logo { transform: scale(1.45); }
.sidebar-broker-logos-only .sidebar-broker-item:nth-child(7) .sidebar-broker-logo { transform: scale(1.15); }
.sidebar-broker-logos-only .sidebar-broker-item:nth-child(8) .sidebar-broker-logo { transform: scale(2.25); }
.sidebar-broker-logos-only .sidebar-broker-item:nth-child(9) .sidebar-broker-logo { transform: scale(1.15); }

.sidebar-note {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}

.sidebar-tv .tv-embed-wrap {
  overflow: hidden;
  border-radius: var(--radius-sm);
  height: 338px; /* 380 * 0.88 so no white gap below */
}
.sidebar-tv .tv-embed {
  height: 380px;
  min-height: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  transform: scale(0.88);
  transform-origin: top center;
}
.sidebar-tv .tradingview-widget-container { width: 100% !important; }

/* ===== Footer ===== */
.disclaimer {
  background: linear-gradient(180deg, var(--green-dk) 0%, #002a12 100%);
  padding: 1.25rem 1.5rem;
  margin: 0;
}
.disclaimer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.disclaimer-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.disclaimer p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.55;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .fit-card-head { flex-wrap: wrap; }
  .fit-card { padding-left: 2.85rem; }
  .fit-rank { width: 2.25rem; font-size: 1.15rem; }
  .fit-card-1 .fit-rank { font-size: 1.25rem; }
  .table-wrapper { max-width: 100%; }
  .quick-ref-table th:last-child { width: 8rem; min-width: 7rem; }
  .quick-ref-table th, .quick-ref-table td { padding: 0.5rem 0.6rem; }
  .quick-ref-table { font-size: 0.85rem; }
  .quick-ref-table .broker-logo-table { width: 48px; height: 32px; }
}
/* Màn hình thấp: intro + 5 sàn gọn hơn nữa */
@media (max-height: 700px) {
  .main .intro.section { padding: 0.25rem 0 0.15rem; }
  .main .quick-table.section { padding: 0.25rem 0 0.75rem; }
  .intro-text { font-size: 0.8rem; line-height: 1.45; }
  .quick-ref-table th, .quick-ref-table td { padding: 0.28rem 0.45rem; }
}


/* === FIX LOGO BOX SIZE & XM VISIBILITY === */
.broker-logo, .logo-box, .broker-item-logo {
    width: 72px !important;
    height: 72px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.broker-logo img, .logo-box img, .broker-item-logo img {
    max-width: 90% !important;
    max-height: 90% !important;
    object-fit: contain !important;
}

/* Make XM logo larger and clearer */
img.xm-logo {
    max-width: 115% !important;
    max-height: 115% !important;
}

