/*
Theme Name: Hỗ Trợ Dạy Học
Theme URI: https://hotrodayhoc.com/
Author: Hỗ Trợ Dạy Học
Author URI: https://hotrodayhoc.com/
Description: Theme giáo dục hiện đại, tối ưu đọc nội dung và trải nghiệm trên mọi thiết bị.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: htdh
*/

:root {
  --navy: #0b2545;
  --navy-2: #133b63;
  --teal: #0796a6;
  --teal-dark: #047380;
  --amber: #f6aa1c;
  --ink: #172033;
  --muted: #5d687a;
  --line: #dfe7ec;
  --soft: #f2f8f8;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(11, 37, 69, .11);
  --container: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; font-size: 17px; line-height: 1.72; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover, a:focus { color: var(--navy); }
h1, h2, h3, h4 { margin: 0 0 .65em; color: var(--navy); line-height: 1.18; letter-spacing: -.025em; }
h1 { font-size: clamp(2.1rem, 4vw, 4.3rem); }
h2 { font-size: clamp(1.65rem, 2.6vw, 2.65rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.25em; }
.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { width: auto; height: auto; clip: auto; padding: 12px 18px; margin: 8px; background: #fff; z-index: 9999; }
.skip-link { top: 0; left: 0; }
.topbar { color: #d9f6f7; background: var(--navy); font-size: .84rem; }
.topbar-inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar a { color: #fff; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.98); border-bottom: 1px solid rgba(11,37,69,.08); backdrop-filter: blur(12px); }
.header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); }
.brand-link img { width: 58px; height: 58px; object-fit: contain; }
.brand-link strong { display: block; font-size: 1.13rem; line-height: 1.15; }
.brand-link small { display: block; margin-top: 4px; color: var(--muted); font-size: .72rem; letter-spacing: .03em; }
.primary-navigation { display: flex; align-items: center; gap: 22px; }
.primary-navigation ul { display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; list-style: none; }
.primary-navigation a { color: var(--ink); font-weight: 650; font-size: .94rem; }
.primary-navigation .current-menu-item > a, .primary-navigation a:hover { color: var(--teal-dark); }
.button, .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 23px; border: 0; border-radius: 999px; color: #fff !important; background: var(--teal); font-weight: 750; box-shadow: 0 9px 25px rgba(7,150,166,.22); transition: transform .2s, background .2s; }
.button:hover, .wp-block-button__link:hover { color: #fff; background: var(--teal-dark); transform: translateY(-2px); }
.button-small { min-height: 42px; padding: 9px 17px; font-size: .87rem !important; }
.button-secondary { color: var(--navy) !important; background: #fff; box-shadow: none; border: 1px solid rgba(11,37,69,.16); }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.menu-toggle > span:not(.screen-reader-text) { display: block; height: 2px; margin: 5px 0; background: var(--navy); }
.home-hero { padding: 68px 0 78px; overflow: hidden; background: var(--soft); }
.hero-grid { display: grid; grid-template-columns: 1.03fr .97fr; align-items: center; gap: 64px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--teal-dark); font-size: .84rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--amber); }
.hero-copy h1 em { color: var(--teal-dark); font-style: normal; }
.hero-copy > p { max-width: 650px; color: #45546b; font-size: 1.12rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 28px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px 30px; margin-top: 30px; color: var(--navy); font-weight: 650; font-size: .9rem; }
.trust-row span::before { content: "✓"; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 7px; color: #fff; background: var(--teal); border-radius: 50%; font-size: .72rem; }
.hero-media { position: relative; }
.hero-media::before { content: ""; position: absolute; inset: 8% -7% -8% 12%; border-radius: 32px; background: var(--amber); opacity: .18; transform: rotate(5deg); }
.hero-media img { position: relative; width: 100%; aspect-ratio: 1.14; object-fit: cover; border-radius: 30px; box-shadow: var(--shadow); }
.hero-note { position: absolute; left: -30px; bottom: 30px; max-width: 210px; padding: 16px 18px; border-radius: 15px; background: #fff; box-shadow: var(--shadow); font-size: .86rem; }
.hero-note strong { display: block; color: var(--navy); font-size: 1.05rem; }
.section { padding: 84px 0; }
.section-soft { background: var(--soft); }
.section-heading { max-width: 760px; margin: 0 auto 42px; text-align: center; }
.section-heading p { color: var(--muted); }
.service-grid, .value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card, .value-card { height: 100%; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 10px 32px rgba(11,37,69,.05); }
.service-card h3, .value-card h3 { margin-top: 14px; }
.service-card p, .value-card p { color: var(--muted); font-size: .96rem; }
.number-badge { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: #fff; background: var(--navy); font-weight: 850; }
.split-section { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 62px; }
.split-section img { width: 100%; aspect-ratio: 1.2; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.check-list { padding: 0; list-style: none; }
.check-list li { position: relative; padding: 7px 0 7px 34px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 9px; display: grid; place-items: center; width: 22px; height: 22px; color: #fff; background: var(--teal); border-radius: 50%; font-size: .72rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; margin-top: -28px; border-radius: var(--radius); background: rgba(255,255,255,.25); box-shadow: var(--shadow); }
.stat { padding: 26px; background: #fff; text-align: center; }
.stat strong { display: block; color: var(--navy); font-size: 2rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; }
.content-area { padding: 54px 0 86px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 26px; color: var(--muted); font-size: .86rem; }
.content-sidebar-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 50px; align-items: start; }
.entry-header { margin-bottom: 28px; }
.entry-header h1 { max-width: 900px; font-size: clamp(2rem, 3.7vw, 3.5rem); }
.entry-meta { display: flex; flex-wrap: wrap; gap: 9px 22px; color: var(--muted); font-size: .86rem; }
.entry-meta span:not(:last-child), .entry-meta time { position: relative; }
.entry-meta span:not(:last-child)::after, .entry-meta time::after { content: "•"; position: absolute; right: -14px; color: #a4aebb; }
.entry-featured { width: 100%; max-height: 570px; object-fit: cover; margin-bottom: 34px; border-radius: var(--radius); }
.entry-content { color: #293449; }
.single .entry-content { max-width: 790px; font-size: 1.06rem; }
.entry-content h2, .entry-content h3 { margin-top: 1.55em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content blockquote { margin: 2em 0; padding: 20px 26px; border-left: 4px solid var(--amber); background: #fff8e9; color: var(--navy); font-size: 1.08rem; }
.page .entry-content > :first-child { margin-top: 0; }
.archive-hero { position: relative; min-height: 340px; display: flex; align-items: end; overflow: hidden; color: #fff; background: var(--navy); }
.archive-hero::after { content: ""; position: absolute; inset: 0; background: rgba(11,37,69,.72); }
.archive-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.archive-hero-inner { position: relative; z-index: 1; max-width: 760px; padding: 62px 0; }
.archive-hero h1, .archive-hero p, .archive-hero .breadcrumbs, .archive-hero .breadcrumbs a { color: #fff; }
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.post-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card-image img { width: 100%; aspect-ratio: 1.55; object-fit: cover; }
.post-card-body { padding: 24px; }
.post-card .card-category { display: inline-block; margin-bottom: 10px; color: var(--teal-dark); font-size: .75rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.post-card h2, .post-card h3 { font-size: 1.35rem; }
.post-card h2 a, .post-card h3 a { color: var(--navy); }
.post-card p { color: var(--muted); font-size: .94rem; }
.read-more { font-weight: 750; }
.sidebar { position: sticky; top: 118px; }
.widget, .sidebar-panel { margin-bottom: 25px; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.widget-title, .sidebar-panel h2 { padding-bottom: 12px; border-bottom: 2px solid var(--soft); font-size: 1.15rem; }
.widget ul, .sidebar-panel ul { margin: 0; padding: 0; list-style: none; }
.widget li, .sidebar-panel li { padding: 8px 0; border-bottom: 1px solid #edf1f3; }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
.search-field { width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid #cfdbe1; border-radius: 10px; font: inherit; }
.search-submit { min-width: 48px; border: 0; border-radius: 10px; color: #fff; background: var(--teal); font-weight: 800; }
.navigation.pagination { margin-top: 42px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.page-numbers.current { color: #fff; border-color: var(--teal); background: var(--teal); }
.related-posts { margin-top: 55px; padding-top: 40px; border-top: 1px solid var(--line); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related-item img { width: 100%; aspect-ratio: 1.55; object-fit: cover; border-radius: 12px; }
.related-item h3 { margin-top: 12px; font-size: 1rem; }
.not-found { min-height: 58vh; display: grid; place-items: center; padding: 80px 0; text-align: center; }
.not-found .error-code { color: #d8eeee; font-size: clamp(7rem, 20vw, 15rem); font-weight: 900; line-height: .7; }
.cta-strip { padding: 64px 0; color: #fff; background: var(--navy); }
.cta-strip .container { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.cta-strip h2, .cta-strip p { color: #fff; }
.site-footer { color: #c8d7e6; background: #071b31; }
.footer-grid { display: grid; grid-template-columns: 1.45fr 1fr 1fr 1.1fr; gap: 38px; padding-top: 62px; padding-bottom: 52px; }
.site-footer h2 { color: #fff; font-size: 1.05rem; }
.site-footer a { color: #d7f7f5; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin: 8px 0; }
.footer-brand img { margin-bottom: 16px; }
.footer-brand h2 { font-size: 1.3rem; }
.footer-bottom { padding: 19px 0; border-top: 1px solid rgba(255,255,255,.1); color: #c8d7e6; font-size: .86rem; }
.alignwide { width: min(1100px, 100%); max-width: none; }
.alignfull { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); }
@media (max-width: 980px) {
  .menu-toggle { display: block; }
  .primary-navigation { position: absolute; top: 88px; right: 20px; left: 20px; display: none; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
  .primary-navigation.is-open { display: block; }
  .primary-navigation ul { display: block; }
  .primary-navigation li { border-bottom: 1px solid var(--line); }
  .primary-navigation li a { display: block; padding: 11px 4px; }
  .primary-navigation .button { margin-top: 14px; }
  .hero-grid, .split-section { grid-template-columns: 1fr; }
  .hero-copy { max-width: 760px; }
  .hero-media { max-width: 720px; }
  .content-sidebar-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-grid > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .container { width: min(calc(100% - 28px), var(--container)); }
  .topbar-inner > span { display: none; }
  .topbar-inner { justify-content: center; }
  .header-inner { min-height: 76px; }
  .brand-link img { width: 48px; height: 48px; }
  .brand-link small { display: none; }
  .primary-navigation { top: 76px; }
  .home-hero { padding: 48px 0 60px; }
  .hero-grid { gap: 42px; }
  .hero-note { left: 12px; bottom: 12px; }
  .section { padding: 62px 0; }
  .service-grid, .value-grid, .post-grid, .related-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 20px 12px; }
  .archive-hero { min-height: 290px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > :last-child { grid-column: auto; }
  .cta-strip .container { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
