/*
Theme Name: VanBang2 Knowledge Hub
Theme URI: https://vanbang2.com/
Description: Child theme nhẹ cho cổng dữ liệu chương trình văn bằng 2 toàn quốc.
Author: VanBang2.com
Template: generatepress
Version: 1.0.1
Text Domain: vanbang2-hub
*/

:root {
  --vb2-navy-950: #07172d;
  --vb2-navy: #0b2345;
  --vb2-navy-700: #153a68;
  --vb2-blue: #1769e0;
  --vb2-blue-dark: #0d4fac;
  --vb2-gold: #f4b740;
  --vb2-ink: #142033;
  --vb2-muted: #5d6878;
  --vb2-surface: #f4f7fb;
  --vb2-surface-blue: #edf4ff;
  --vb2-border: #dce4ee;
  --vb2-success: #127442;
  --vb2-white: #fff;
  --vb2-radius-sm: 10px;
  --vb2-radius: 16px;
  --vb2-radius-lg: 24px;
  --vb2-shadow-sm: 0 1px 2px rgba(7, 23, 45, 0.05);
  --vb2-shadow: 0 18px 50px rgba(7, 23, 45, 0.1);
  --vb2-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Arial, "Noto Sans", sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  color: var(--vb2-ink);
  background: var(--vb2-white);
  font-family: var(--vb2-font);
  font-size: 17px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

a {
  color: var(--vb2-blue);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover,
a:focus-visible {
  color: var(--vb2-blue-dark);
}

:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.38);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4,
.site-title {
  color: var(--vb2-navy);
  font-family: var(--vb2-font);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 5.2vw, 4.25rem);
}

h2 {
  font-size: clamp(1.75rem, 3.3vw, 2.65rem);
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.32rem);
}

p {
  margin-block: 0 1em;
}

button,
input,
select,
textarea {
  font: inherit;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.vb2-container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

/* GeneratePress shell */
.site-header {
  position: relative;
  z-index: 20;
  background: var(--vb2-white);
  border-bottom: 1px solid var(--vb2-border);
}

.site-header .inside-header {
  width: min(1180px, calc(100% - 40px));
  min-height: 88px;
  margin-inline: auto;
  padding: 16px 0;
}

.site-title,
.site-title a,
.main-title,
.main-title a {
  color: var(--vb2-navy);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 850;
  text-decoration: none;
}

/* GeneratePress floats the primary navigation inside the header on desktop. */
.site-header .main-navigation {
  margin-left: auto;
  background: transparent;
}

.site-header .main-navigation .inside-navigation {
  width: auto;
}

.site-header .main-navigation .main-nav ul li a {
  min-height: 46px;
  padding-inline: 14px;
  color: var(--vb2-navy);
  background: transparent;
  border-radius: 9px;
  font-size: 0.92rem;
}

.site-header .main-navigation .main-nav ul li:hover > a,
.site-header .main-navigation .main-nav ul li:focus > a,
.site-header .main-navigation .main-nav ul li[class*="current-menu-"] > a {
  color: var(--vb2-blue-dark);
  background: var(--vb2-surface-blue);
}

/* Fragment links share the homepage URL, so WordPress marks all of them current. */
.home .site-header .main-navigation .main-nav ul li.current-menu-item > a {
  color: var(--vb2-navy);
  background: transparent;
}

.home .site-header .main-navigation .main-nav ul li.current-menu-item:first-child > a {
  color: var(--vb2-blue-dark);
  background: var(--vb2-surface-blue);
}

.site-description {
  color: var(--vb2-muted);
  font-size: 0.85rem;
}

.main-navigation,
.main-navigation ul ul {
  background: var(--vb2-navy);
}

.main-navigation .inside-navigation {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.main-navigation .main-nav ul li a,
.menu-toggle,
.main-navigation .menu-bar-item > a {
  min-height: 52px;
  color: #f7faff;
  font-weight: 700;
}

.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li:focus > a,
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
  color: var(--vb2-white);
  background: rgba(255, 255, 255, 0.1);
}

.site.grid-container,
.site-content {
  max-width: none;
}

.site-content {
  display: block;
  padding: 0;
}

.vb2-home {
  width: 100%;
  min-height: 70vh;
}

.site-footer {
  border-top: 1px solid var(--vb2-border);
}

.site-info {
  background: var(--vb2-navy-950);
}

/* Trust bar */
.vb2-notice {
  color: #26415f;
  background: #eef5ff;
  border-bottom: 1px solid #d4e4fa;
  font-size: 0.9rem;
}

.vb2-notice__inner {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
}

.vb2-notice__dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: var(--vb2-success);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(18, 116, 66, 0.12);
}

.vb2-notice__copy {
  color: #526981;
}

.vb2-notice a {
  margin-left: auto;
  color: var(--vb2-navy);
  font-weight: 750;
}

/* Hero */
.vb2-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #e9f1fb;
  background:
    radial-gradient(circle at 80% 20%, rgba(46, 132, 246, 0.34), transparent 30%),
    linear-gradient(135deg, var(--vb2-navy-950) 0%, var(--vb2-navy) 58%, #123a6b 100%);
}

.vb2-hero::after {
  position: absolute;
  z-index: -1;
  right: -180px;
  bottom: -320px;
  width: 620px;
  height: 620px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 72px rgba(255, 255, 255, 0.025), 0 0 0 150px rgba(255, 255, 255, 0.018);
}

.vb2-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.75fr);
  gap: clamp(40px, 7vw, 90px);
  align-items: center;
  min-height: 610px;
  padding-block: clamp(70px, 9vw, 110px);
}

.vb2-eyebrow,
.vb2-kicker {
  margin: 0 0 12px;
  color: var(--vb2-blue);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vb2-eyebrow {
  color: #90bff8;
}

.vb2-kicker--light {
  color: #a8cdfa;
}

.vb2-hero h1 {
  max-width: 820px;
  margin: 0 0 22px;
  color: var(--vb2-white);
}

.vb2-hero__lead {
  max-width: 720px;
  margin: 0 0 30px;
  color: #c7d7ea;
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
}

.vb2-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  max-width: 780px;
  padding: 7px;
  color: #607086;
  background: var(--vb2-white);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 15px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
}

.vb2-search svg {
  margin-inline: 10px 4px;
}

.vb2-search input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 10px;
  color: var(--vb2-ink);
  background: transparent;
  border: 0;
}

.vb2-search input:focus {
  outline: 0;
}

.vb2-search button,
.vb2-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  color: var(--vb2-white);
  background: var(--vb2-blue);
  border: 0;
  border-radius: var(--vb2-radius-sm);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease;
}

.vb2-search button:hover,
.vb2-button:hover {
  color: var(--vb2-white);
  background: var(--vb2-blue-dark);
  transform: translateY(-1px);
}

.vb2-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 18px;
  color: #aebfd2;
  font-size: 0.88rem;
}

.vb2-quick-links a {
  color: #f1f6fc;
  font-weight: 700;
}

.vb2-hero-panel {
  padding: clamp(24px, 4vw, 34px);
  background: rgba(255, 255, 255, 0.085);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: var(--vb2-radius-lg);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(12px);
}

.vb2-hero-panel__label {
  margin-bottom: 14px;
  color: #a9c3df;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.vb2-hero-panel ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vb2-hero-panel li {
  display: flex;
  gap: 13px;
  align-items: center;
  padding-block: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.vb2-hero-panel li span {
  color: #8db9ed;
  font-size: 0.76rem;
  font-weight: 850;
}

.vb2-hero-panel li strong {
  color: var(--vb2-white);
  font-size: 0.95rem;
}

.vb2-hero-panel__note {
  margin: 18px 0 0;
  color: #b8c8da;
  font-size: 0.82rem;
  line-height: 1.55;
}

/* Shared sections */
.vb2-section {
  padding-block: clamp(72px, 9vw, 112px);
}

.vb2-section--surface {
  background: var(--vb2-surface);
}

.vb2-section-heading {
  display: flex;
  gap: 40px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 36px;
}

.vb2-section-heading h2 {
  max-width: 760px;
  margin: 0;
}

.vb2-section-heading > p {
  max-width: 390px;
  margin: 0 0 4px;
  color: var(--vb2-muted);
}

.vb2-updated {
  color: var(--vb2-muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

/* Browse cards */
.vb2-browse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.vb2-browse-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 104px;
  padding: 20px;
  color: var(--vb2-ink);
  background: var(--vb2-white);
  border: 1px solid var(--vb2-border);
  border-radius: var(--vb2-radius);
  box-shadow: var(--vb2-shadow-sm);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.vb2-browse-card:hover {
  color: var(--vb2-ink);
  border-color: #a8c8ef;
  box-shadow: 0 14px 36px rgba(7, 23, 45, 0.08);
  transform: translateY(-2px);
}

.vb2-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--vb2-blue);
  background: var(--vb2-surface-blue);
  border-radius: 12px;
  font-weight: 850;
}

.vb2-browse-card strong,
.vb2-browse-card small {
  display: block;
}

.vb2-browse-card strong {
  margin-bottom: 2px;
  color: var(--vb2-navy);
  font-size: 1.02rem;
}

.vb2-browse-card small {
  color: var(--vb2-muted);
  font-size: 0.85rem;
}

.vb2-arrow {
  color: var(--vb2-blue);
  font-size: 1.35rem;
}

/* Program cards */
.vb2-program-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.vb2-program-card {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 26px;
  background: var(--vb2-white);
  border: 1px solid var(--vb2-border);
  border-radius: var(--vb2-radius);
  box-shadow: var(--vb2-shadow-sm);
}

.vb2-program-card__top {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  color: var(--vb2-muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.vb2-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  color: var(--vb2-success);
  background: #e8f7ef;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
}

.vb2-program-card h3 {
  margin: 0 0 12px;
  font-size: 1.28rem;
}

.vb2-program-card p {
  color: var(--vb2-muted);
  font-size: 0.94rem;
}

.vb2-program-card > a {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.vb2-program-card > a span {
  margin-left: 5px;
}

/* Method */
.vb2-method {
  color: #c7d6e7;
  background: var(--vb2-navy-950);
}

.vb2-method__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(440px, 1.15fr);
  gap: clamp(50px, 9vw, 120px);
  align-items: start;
}

.vb2-method h2 {
  margin: 0 0 20px;
  color: var(--vb2-white);
}

.vb2-method-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.vb2-method-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.vb2-method-list li:first-child {
  padding-top: 0;
}

.vb2-method-list li > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #a9cffb;
  background: rgba(64, 145, 244, 0.14);
  border: 1px solid rgba(132, 188, 255, 0.22);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 850;
}

.vb2-method-list strong {
  display: block;
  margin-bottom: 4px;
  color: var(--vb2-white);
}

.vb2-method-list p {
  margin: 0;
  color: #aebfd2;
  font-size: 0.9rem;
}

/* Guides */
.vb2-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.vb2-guide-card {
  padding: 28px;
  background: var(--vb2-surface);
  border-radius: var(--vb2-radius);
}

.vb2-guide-card > span {
  display: block;
  margin-bottom: 34px;
  color: var(--vb2-blue);
  font-size: 0.78rem;
  font-weight: 850;
}

.vb2-guide-card h3 {
  margin: 0 0 10px;
}

.vb2-guide-card p {
  margin: 0;
  color: var(--vb2-muted);
  font-size: 0.9rem;
}

/* CTA */
.vb2-cta {
  padding-block: 56px;
  color: #c7d7e8;
  background: linear-gradient(110deg, var(--vb2-blue-dark), var(--vb2-blue));
}

.vb2-cta__inner {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: space-between;
}

.vb2-cta h2 {
  margin: 0 0 10px;
  color: var(--vb2-white);
}

.vb2-cta p {
  margin: 0;
}

.vb2-button--light {
  min-width: 180px;
  color: var(--vb2-navy);
  background: var(--vb2-white);
}

.vb2-button--light:hover {
  color: var(--vb2-navy);
  background: #eef5ff;
}

/* Standard content */
.site-main:not(.vb2-home) .inside-article,
.search-results .inside-article,
.archive .inside-article,
.single .inside-article,
.page:not(.home) .inside-article {
  border: 1px solid var(--vb2-border);
  border-radius: var(--vb2-radius);
  box-shadow: var(--vb2-shadow-sm);
}

.entry-title a {
  color: var(--vb2-navy);
  text-decoration: none;
}

.entry-meta {
  color: var(--vb2-muted);
  font-size: 0.82rem;
}

.vb2-site-search {
  display: flex;
  gap: 8px;
}

.vb2-site-search label {
  flex: 1;
}

.vb2-site-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--vb2-border);
  border-radius: 8px;
}

.vb2-site-search button {
  color: var(--vb2-white);
  background: var(--vb2-blue);
  border-radius: 8px;
}

@media (max-width: 960px) {
  .vb2-hero__grid,
  .vb2-method__grid {
    grid-template-columns: 1fr;
  }

  .vb2-hero__grid {
    min-height: auto;
  }

  .vb2-hero-panel {
    max-width: 680px;
  }

  .vb2-program-grid,
  .vb2-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vb2-guide-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .vb2-container,
  .site-header .inside-header,
  .main-navigation .inside-navigation {
    width: min(100% - 24px, 1180px);
  }

  .vb2-notice__inner {
    flex-wrap: wrap;
    gap: 4px 9px;
    padding-block: 10px;
  }

  .vb2-notice__copy {
    display: none;
  }

  .vb2-notice a {
    width: 100%;
    margin: 2px 0 0 17px;
  }

  .vb2-hero__grid {
    gap: 40px;
    padding-block: 62px;
  }

  .vb2-search {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .vb2-search button {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 4px;
  }

  .vb2-section-heading,
  .vb2-cta__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .vb2-section-heading {
    display: flex;
    gap: 16px;
  }

  .vb2-browse-grid,
  .vb2-program-grid,
  .vb2-guide-grid {
    grid-template-columns: 1fr;
  }

  .vb2-guide-card:last-child {
    grid-column: auto;
  }

  .vb2-method__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .vb2-cta__inner {
    display: flex;
  }

  .vb2-button--light {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .vb2-browse-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .vb2-browse-card .vb2-arrow {
    display: none;
  }

  .vb2-hero-panel {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Keep navigation available while readers compare program details. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(7, 23, 45, 0.08);
}

body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}
