/*
Theme Name: SEO MASTER Premium Lite
Theme URI: https://local.test/seo-master-premium-lite
Author: SEO MASTER Toolkit
Description: Premium lite SEO theme — MB66-inspired: white #fff, red #ff2600, black #000. Clean, no overflow, fixed header, mobile CTA outside, native scroll-to-top.
Version: 4.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: seo-speed-master
Tags: custom-logo, blog, one-column, two-columns, featured-images, seo, lightweight
*/

/* ============================================================
   DESIGN SYSTEM — WARM PREMIUM: BEIGE / WARM WHITE / ACCENT
   ============================================================ */

:root {
  --sm-bg: #F5FBFF;
  --sm-surface: #ffffff;
  --sm-soft: #EAF4FF;
  --sm-soft-red: #E1F0FF;
  --sm-overlay: #00000099;

  --sm-accent: #078CF5;
  --sm-accent-dark: #0067DC;
  --sm-accent-soft: #E1F0FF;

  --sm-text: #123D75;
  --sm-text-2: #1E4E86;
  --sm-text-3: #3C6AA0;
  --sm-muted: #5E7CA0;

  --sm-border: #D9EBFF;
  --sm-radius: 16px;
  --sm-radius-lg: 20px;
  --sm-radius-pill: 100px;

  --sm-container: 1200px;
  --sm-header-h: 72px;
  --sm-shadow: 0 10px 30px rgba(0,0,0,.06);
  --sm-shadow-light: rgba(175,175,175,.15) 0 0 7.2px 6.7px inset, rgba(232,242,255,.02) 0 3.4px 9.6px 9.2px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  width: 100%;
  max-width: 100%;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(30,144,255,.07) 0%, transparent 42%),
    radial-gradient(ellipse at 88% 20%, rgba(30,144,255,.05) 0%, transparent 36%),
    var(--sm-bg);
  color: var(--sm-text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe, table { max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

button { font: inherit; cursor: pointer; }

/* ============================================================
   UTILITY
   ============================================================ */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 12px; z-index: 10000;
  padding: 10px 14px; background: #fff; border-radius: var(--sm-radius); box-shadow: var(--sm-shadow);
}
.skip-link:focus { left: 12px; }

/* Hide Flatsome/third-party scroll-to-top */
.back-to-top, .scroll-top, .scrollToTop, .top-link,
.ux-scroll-to-top, .flatsome-scroll-to-top, .go-top { display: none !important; }

/* ============================================================
   CONTAINER
   ============================================================ */
.sm-container,
.container,
.sm-home-shell,
.sm-layout,
.sm-footer__inner {
  width: min(100% - 32px, var(--sm-container));
  margin-inline: auto;
}

.sm-site-main, .site-main { padding: 32px 0 40px; }

.sm-main.sm-home {
  padding-top: 0;
}

@media (max-width: 480px) {
  .sm-container,
  .container,
  .sm-home-shell,
  .sm-layout,
  .sm-footer__inner {
    width: min(100% - 20px, var(--sm-container));
  }
}

/* ============================================================
   HEADER — STICKY WITH BACKDROP
   ============================================================ */
.sm-header {
  position: sticky;
  top: 0; left: 0; right: 0;
  width: 100%;
  max-width: 100%;
  height: var(--sm-header-h);
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--sm-border);
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  z-index: 9999;
  overflow: visible;
  transition: box-shadow 0.3s, background 0.3s;
}

@supports (backdrop-filter: blur(10px)) {
  .sm-header {
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,.82);
  }
}

/* Scrolled state — JS adds class via intersection observer or scroll */
.sm-header.sm-header--scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  background: rgba(255,255,255,.96);
}
@supports (backdrop-filter: blur(10px)) {
  .sm-header.sm-header--scrolled {
    background: rgba(255,255,255,.90);
  }
}

.sm-header__shell {
  width: min(100% - 32px, var(--sm-container));
  height: var(--sm-header-h);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

/* Brand */
.sm-header__brand {
  display: inline-flex;
  align-items: center;
  color: #000;
  font-weight: 900;
  font-size: 18px;
  white-space: nowrap;
  text-decoration: none;
}
.sm-header__brand:hover { text-decoration: none; }

/* Logo image */
.sm-logo {
  display: block;
  max-height: 45px;
  width: auto;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* Fallback brand mark (kept for compatibility) */
.sm-brand-mark {
  width: 28px; height: 28px;
  display: inline-block;
  border-radius: var(--sm-radius-pill);
  background: var(--sm-accent);
  flex-shrink: 0;
}

.sm-brand-text {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Desktop navigation */
.sm-nav--desktop {
  min-width: 0;
  display: flex;
  justify-content: center;
}

.sm-menu--desktop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-width: 0;
  margin: 0; padding: 0;
  list-style: none;
  flex-wrap: nowrap;
}

.sm-menu__item {
  position: relative;
  list-style: none;
}

.sm-menu__row { display: flex; align-items: center; }

.sm-menu__link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 8px;
  border-radius: var(--sm-radius-pill);
  color: #000;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 140ms ease, color 140ms ease;
}

.sm-menu__link:hover,
.sm-menu__item.is-active > .sm-menu__row > .sm-menu__link {
  background: var(--sm-accent-soft);
  color: var(--sm-accent);
}

/* Dropdown */
.sm-submenu-toggle { display: none; }

.sm-submenu {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 10001;
  width: 220px;
  margin: 0; padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
  box-shadow: var(--sm-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.sm-menu--desktop .sm-menu__item:hover > .sm-submenu,
.sm-menu--desktop .sm-menu__item:focus-within > .sm-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Keep the dropdown open while the pointer is anywhere over the parent item
   OR the dropdown itself. JS also adds the .is-open class with a close delay. */
.sm-menu--desktop .sm-menu__item.is-open > .sm-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 120ms ease, transform 120ms ease;
}

.sm-submenu a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--sm-radius);
  color: var(--sm-text-2);
  font-size: 13px;
  font-weight: 600;
  transition: background 140ms ease;
}

.sm-submenu a:hover {
  background: var(--sm-accent-soft);
  color: var(--sm-accent);
}

/* Desktop header actions */
.sm-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}

.sm-header__actions .sm-btn {
  height: 40px;
  padding: 0 16px;
  white-space: nowrap;
}

/* ============================================================
   MOBILE HEADER
   ============================================================ */
.sm-header__mobile-actions {
  display: none;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sm-mobile-login,
.sm-mobile-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--sm-radius-pill);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}

.sm-mobile-login {
  background: #fff;
  color: var(--sm-text);
  border: 1px solid var(--sm-border);
}

.sm-mobile-login:hover {
  color: var(--sm-accent);
  border-color: var(--sm-accent);
}

.sm-mobile-cta {
  background: var(--sm-accent);
  color: #fff;
  border: 1px solid var(--sm-accent);
}

.sm-mobile-cta:hover {
  background: var(--sm-accent-dark);
  color: #fff;
}

.sm-menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--sm-radius-pill);
  border: 1px solid var(--sm-border);
  background: #fff;
  color: #000;
  font-size: 20px;
  line-height: 1;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.sm-mobile-panel {
  display: none;
  position: fixed;
  top: var(--sm-header-h);
  left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid var(--sm-border);
  box-shadow: var(--sm-shadow);
  max-height: calc(100vh - var(--sm-header-h));
  overflow-y: auto;
  z-index: 9998;
}

.sm-mobile-panel[hidden] { display: none; }

.sm-mobile-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--sm-border);
  background: #fff;
}

.sm-mobile-panel__title { color: var(--sm-accent-dark); font-size: 14px; }

.sm-mobile-panel__close {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--sm-border); border-radius: 999px;
  background: #fff; color: var(--sm-accent-dark); font-size: 24px;
  line-height: 1; cursor: pointer;
}

.sm-mobile-panel__close:hover,
.sm-mobile-panel__close:focus-visible { background: var(--sm-accent-soft); border-color: var(--sm-accent); }

.sm-mobile-panel__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--sm-border);
}

.sm-menu--mobile {
  display: grid;
  gap: 4px;
  padding: 8px 14px;
  list-style: none;
  margin: 0;
}

.sm-menu--mobile .sm-menu__item {
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
  overflow: hidden;
}

.sm-menu--mobile .sm-menu__row { min-height: 42px; }

.sm-menu--mobile .sm-menu__link {
  flex: 1;
  min-height: 42px;
  justify-content: flex-start;
  border-radius: 0;
  padding: 0 12px;
  font-size: 13px;
}

.sm-menu--mobile .sm-submenu-toggle {
  width: 42px; height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-left: 1px solid var(--sm-border);
  background: transparent;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}

.sm-menu--mobile .sm-submenu {
  position: static;
  width: 100%;
  max-height: 0;
  padding: 0 8px;
  border: 0;
  border-top: 1px solid var(--sm-border);
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  overflow: hidden;
  transition: max-height 240ms ease, padding 240ms ease;
}

.sm-menu--mobile .is-submenu-open > .sm-submenu {
  max-height: 400px;
  padding: 6px 8px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.sm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--sm-radius);
  font-size: 14px;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
  text-decoration: none;
}

.sm-btn--primary {
  background: var(--sm-accent);
  color: #fff;
}

.sm-btn--primary:hover {
  background: var(--sm-accent-dark);
  color: #fff;
}

.sm-btn--pill { border-radius: var(--sm-radius-pill); }

.sm-btn--ghost {
  background: transparent;
  color: #000;
  border-color: var(--sm-border);
}

.sm-btn--ghost:hover {
  background: var(--sm-accent-soft);
  color: var(--sm-accent);
}

.sm-btn--light {
  background: rgba(255,255,255,.14);
  color: #fff;
  border-color: rgba(255,255,255,.28);
}

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.sm-scroll-top {
  position: fixed;
  right: 16px;
  bottom: 18px;
  width: 44px; height: 44px;
  border-radius: var(--sm-radius-pill);
  border: 0;
  background: var(--sm-accent);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(30,144,255,.28);
  z-index: 9998;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.sm-scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}


/* ============================================================
   AO68 IMAGE SLIDER — directly below the header
   ============================================================ */
.ao68-slider {
  position: relative;
  width: 100%;
  margin: 0 auto 28px;
  overflow: visible;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius-lg);
  background: transparent;
  box-shadow: 0 12px 30px rgba(30, 144, 255, .12);
}

.ao68-slider__viewport { position: relative; width: 100%; overflow: hidden; aspect-ratio: 1920 / 660; background: transparent; transition: aspect-ratio .4s ease; }
.ao68-slider__track { display: block; width: 100%; }
.ao68-slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  color: inherit;
  line-height: 0;
  opacity: 0;
  transition: opacity .5s ease;
}
.ao68-slide, .ao68-slide.is-active {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
}
.ao68-slide.is-active {
  opacity: 1;
  z-index: 2;
}
.ao68-slide picture { display: block; width: 100%; height: 100%; }
.ao68-slide img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }

.ao68-slider__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 50%;
  background: rgba(15, 27, 45, .42);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.ao68-slider__arrow:hover { background: var(--sm-accent); transform: scale(1.05); }
.ao68-slider__arrow--prev { left: 12px; }
.ao68-slider__arrow--next { right: 12px; }

.ao68-slider__dots {
  position: static;
  display: flex;
  justify-content: center;
  gap: 7px;
  min-height: 9px;
  margin: 8px 0 10px;
}
.ao68-slider__dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 50%;
  background: rgba(255,255,255,.52);
  cursor: pointer;
  transition: width .2s ease, border-radius .2s ease, background .2s ease;
}
.ao68-slider__dots button.is-active { width: 24px; border-radius: 9px; background: var(--sm-accent); }

/* ============================================================
   HOMEPAGE — POLISHED INTRO UNDER THE SLIDER
   ============================================================ */
/* The full-width slider is the visual lead; this block carries the SEO message. */
.sm-home-shell > .sm-hero {
  display: block;
  max-width: 920px;
  margin: 0 auto;
  padding: 26px 28px 24px;
  text-align: center;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius-lg);
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 28px rgba(15,27,45,.06);
}

.sm-home-shell > .sm-hero .sm-hero__content {
  max-width: 780px;
  margin: 0 auto;
}

.sm-home-shell > .sm-hero .sm-hero__media { display: none; }
.sm-home-shell > .sm-hero .sm-kicker { margin-bottom: 8px; }
.sm-home-shell > .sm-hero h1 {
  max-width: 760px;
  margin: 0 auto 12px;
  color: var(--sm-text);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
  text-wrap: balance;
}
.sm-home-shell > .sm-hero .sm-hero__desc {
  max-width: 720px;
  margin: 0 auto 18px;
  color: var(--sm-text-2);
  font-size: 16px;
  line-height: 1.7;
}
.sm-home-shell > .sm-hero .sm-hero__actions,
.sm-home-shell > .sm-hero .sm-hero__badges {
  justify-content: center;
}
.sm-home-shell > .sm-hero .sm-hero__actions { margin-bottom: 12px; }

/* Keep category navigation visually connected to the intro card. */
.sm-home-shell > .sm-category-strip {
  margin: 22px 0 34px;
  gap: 12px;
}
.sm-home-shell > .sm-category-strip .sm-category-card {
  min-height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(15,27,45,.035);
}
.sm-home-shell > .sm-category-strip .sm-category-card:hover {
  box-shadow: 0 10px 22px rgba(30,144,255,.14);
}

/* Give the content sections a consistent rhythm after the navigation. */
.sm-home-shell > .sm-section { padding: 26px 0; }
.sm-home-shell > .sm-section:first-of-type { padding-top: 0; }
.sm-home-content-card { box-shadow: 0 8px 24px rgba(15,27,45,.045); }

/* ============================================================
   HOMEPAGE — HERO (2 cột, visual phải)
   ============================================================ */
.sm-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: center;
  padding: 48px 0 32px;
}

.sm-hero__content {
  min-width: 0;
  max-width: 680px;
}

.sm-hero__media {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.sm-hero__media-card {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--sm-accent-soft), var(--sm-soft));
  border: 1px solid var(--sm-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sm-hero__media-card img,
.sm-hero__image {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  display: block;
  border-radius: 20px;
}

.sm-hero__media-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--sm-accent);
  text-align: center;
  padding: 24px;
}

.sm-hero__media-fallback span {
  font-size: 52px;
  font-weight: 900;
  line-height: 1;
}

.sm-hero__media-fallback small {
  font-size: 13px;
  font-weight: 600;
  color: var(--sm-text-3);
}

.sm-kicker {
  margin: 0 0 10px;
  color: var(--sm-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sm-hero h1 {
  margin: 0 0 14px;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 800;
  color: #000;
}

.sm-hero__desc {
  max-width: 620px;
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--sm-text-2);
}

.sm-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.sm-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sm-hero__badges span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius-pill);
  background: var(--sm-soft);
  color: var(--sm-text-2);
  font-size: 13px;
  font-weight: 500;
}

.sm-hero-card {
  width: 100%;
  max-width: 320px;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius-lg);
  background: var(--sm-soft);
  padding: 24px;
}

.sm-hero-card__mark {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border-radius: var(--sm-radius);
  background: var(--sm-accent-soft);
  color: var(--sm-accent);
  font-size: 22px;
  font-weight: 900;
}

.sm-hero-card strong {
  display: block;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.sm-hero-card p {
  margin: 8px 0 14px;
  color: var(--sm-text-3);
  font-size: 14px;
  line-height: 1.5;
}

/* Category strip */
.sm-category-strip {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 20px;
}

.sm-category-card {
  min-width: 0;
  border: 1px solid var(--sm-border);
  border-radius: 20px;
  padding: 14px 8px 12px;
  text-align: center;
  background: var(--sm-surface);
  color: var(--sm-text);
  font-weight: 700;
  font-size: 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  text-decoration: none;
}

.sm-category-card:hover {
  border-color: var(--sm-accent);
  box-shadow: var(--sm-shadow);
  transform: translateY(-1px);
}

.sm-category-card__icon {
  width: 40px; height: 40px;
  margin: 0 auto 8px;
  border-radius: var(--sm-radius);
  background: var(--sm-accent-soft);
  color: var(--sm-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.sm-category-card__icon svg {
  display: block;
}
.sm-category-card:hover .sm-category-card__icon {
  background: var(--sm-accent);
  color: #fff;
  transform: scale(1.05);
}

.sm-category-card__title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

/* Section generic */
.sm-section { padding: 32px 0; }
.sm-section-head { margin-bottom: 20px; }
.sm-section-title { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.2; }

.sm-grid { display: grid; gap: 16px; }
.sm-grid--features { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.sm-feature-card {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius-lg);
  transition: box-shadow 0.25s, transform 0.25s;
}
.sm-feature-card:hover {
  box-shadow: var(--sm-shadow);
  transform: translateY(-2px);
}

.sm-feature-card span {
  width: 28px; height: 4px;
  display: block;
  margin-bottom: 12px;
  border-radius: var(--sm-radius-pill);
  background: var(--sm-accent);
}

.sm-feature-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.sm-feature-card p { margin: 0; color: var(--sm-text-3); font-size: 14px; line-height: 1.55; }

.sm-final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-radius: var(--sm-radius-lg);
  background: linear-gradient(135deg, var(--sm-soft), #fff);
  border: 1px solid var(--sm-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.sm-final-cta h2 { margin: 6px 0 0; font-size: 22px; font-weight: 700; line-height: 1.2; }

/* ============================================================
   LAYOUT — ARTICLE / PAGE
   ============================================================ */
.sm-layout {
  display: grid;
  grid-template-columns: minmax(0, 780px) 300px;
  justify-content: center;
  gap: 24px;
  align-items: start;
}

.sm-content {
  min-width: 0;
  max-width: 780px;
}

.sm-entry-content,
.sm-article-card,
.sm-content {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.sm-entry-content * {
  max-width: 100%;
}

.sm-page { max-width: 820px; margin: 0 auto; }
.sm-page--wide { max-width: 100%; }

.sm-article-card, .article-card,
.sm-home-content-card {
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius-lg);
  padding: 24px;
  overflow: hidden;
}

/* Homepage content card — narrower, centered */
.sm-home-content-card {
  max-width: 860px;
  margin: 0 auto 28px;
}

/* Tighter first image inside home content */
.sm-home-content-card .sm-entry-content img:first-child,
.sm-home-content-card .sm-entry-content figure:first-child,
.sm-home-content-card .sm-entry-content p:first-child img {
  margin-top: 12px;
}

.sm-home-content { max-width: 100%; }

/* Breadcrumb */
.sm-breadcrumb, .breadcrumb, .breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 14px;
  color: var(--sm-muted);
  font-size: 13px;
}

.sm-breadcrumb a { color: var(--sm-muted); font-weight: 600; }
.sm-breadcrumb a:hover { color: var(--sm-accent); }

/* Badge */
.sm-badge, .category-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 10px;
  margin: 0 0 10px;
  border-radius: var(--sm-radius-pill);
  background: var(--sm-accent-soft);
  color: var(--sm-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Article title */
.sm-article-title, .article-title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}

.sm-meta, .article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 12px;
  color: var(--sm-muted);
  font-size: 14px;
}

.sm-meta span { display: inline-flex; align-items: center; }

/* ============================================================
   VISUAL PLACEHOLDER — for pages without featured image
   ============================================================ */
.sm-visual-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 180px;
  margin: 16px 0 20px;
  border-radius: var(--sm-radius);
  background: var(--sm-soft);
  border: 1px solid var(--sm-border);
  color: var(--sm-accent);
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
}

/* Featured image */
.sm-featured-image, .featured {
  margin: 16px 0 20px;
  overflow: hidden;
  border-radius: var(--sm-radius);
}

.sm-featured-image img, .featured img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--sm-radius);
}

/* Entry content */
.sm-entry-content,
.sm-article-content, .article-content {
  font-size: 16px;
  line-height: 1.65;
  color: var(--sm-text-2);
  overflow-wrap: break-word;
}

.sm-entry-content > *:first-child,
.sm-article-content > *:first-child,
.article-content > *:first-child { margin-top: 0; }

.sm-entry-content p,
.sm-article-content p, .article-content p {
  margin: 0 0 14px;
  font-weight: 400;
  line-height: 1.65;
}

.sm-entry-content a,
.sm-article-content a, .article-content a {
  color: var(--sm-accent);
  font-weight: 600;
}

.sm-entry-content a:hover,
.sm-article-content a:hover, .article-content a:hover { text-decoration: underline; }

.sm-entry-content h2,
.sm-article-content h2, .article-content h2 {
  margin: 28px 0 12px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  color: #000;
}

.sm-entry-content h3,
.sm-article-content h3, .article-content h3 {
  margin: 22px 0 10px;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.4;
  color: #000;
}

.sm-entry-content ul, .sm-entry-content ol,
.sm-article-content ul, .sm-article-content ol,
.article-content ul, .article-content ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.sm-entry-content li,
.sm-article-content li, .article-content li { margin: 6px 0; }

.sm-entry-content blockquote,
.sm-article-content blockquote, .article-content blockquote {
  margin: 20px 0;
  padding: 14px 16px;
  background: var(--sm-accent-soft);
  border-left: 3px solid var(--sm-accent);
  border-radius: var(--sm-radius);
}

.sm-entry-content table,
.sm-article-content table, .article-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  white-space: nowrap;
  border-collapse: collapse;
}

.sm-entry-content th, .sm-entry-content td,
.sm-article-content th, .sm-article-content td,
.article-content th, .article-content td {
  padding: 10px;
  border: 1px solid var(--sm-border);
  font-size: 14px;
}

.sm-entry-content img,
.sm-article-content img, .article-content img {
  display: block;
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  margin: 20px auto;
  border-radius: var(--sm-radius);
  object-fit: cover;
}

.sm-entry-content figure,
.sm-article-content figure, .article-content figure { margin: 20px 0; text-align: center; }

.sm-entry-content figcaption,
.sm-article-content figcaption, .article-content figcaption, .wp-caption-text {
  margin-top: 6px;
  color: var(--sm-muted);
  font-size: 13px;
  text-align: center;
}

.sm-entry-content pre, .sm-entry-content code,
.sm-article-content pre, .article-content pre,
.sm-article-content code, .article-content code {
  max-width: 100%;
  overflow-x: auto;
}

.sm-entry-content pre,
.sm-article-content pre, .article-content pre {
  border-radius: var(--sm-radius);
  padding: 14px;
  background: #f5f7fa;
  font-size: 14px;
}

/* Tags */
.sm-tags { margin-top: 18px; color: var(--sm-muted); font-size: 14px; }

/* CTA box */
.sm-cta-box, .post-cta {
  margin-top: 24px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-radius: var(--sm-radius-lg);
  background: var(--sm-soft);
  border: 1px solid var(--sm-border);
}

.sm-cta-box strong { display: block; font-size: 18px; font-weight: 700; }
.sm-cta-box p { margin: 6px 0 0; color: var(--sm-text-3); font-size: 14px; }

/* TOC */
.sm-toc, .toc-box {
  max-width: 100%;
  margin: 18px 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
  overflow: hidden;
}

.sm-toc__title, .toc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

.sm-toc__title span { color: var(--sm-accent); font-size: 14px; }

.sm-toc__list, .toc-list {
  max-height: 300px;
  overflow: auto;
  margin: 0;
  padding: 0 14px 12px 32px;
}

.sm-toc__item, .toc-list li { margin: 6px 0; color: var(--sm-muted); }
.sm-toc__item--h3, .toc-level-3 { margin-left: 12px; font-size: 14px; }

.sm-toc__link, .toc-link {
  color: var(--sm-text-2);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.sm-toc__link:hover, .toc-link:hover { color: var(--sm-accent); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sm-sidebar-inner {
  position: sticky;
  top: calc(var(--sm-header-h) + 16px);
  display: grid;
  gap: 14px;
  align-items: start;
}

.sm-widget {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
}

.sm-widget__title { margin-bottom: 10px; font-size: 15px; font-weight: 700; }
.sm-widget p { margin: 0 0 12px; color: var(--sm-text-3); font-size: 14px; }

.sm-widget a:not(.sm-btn) {
  display: block;
  padding: 8px 0;
  border-top: 1px solid var(--sm-border);
  color: var(--sm-text-2);
  font-size: 14px;
  font-weight: 600;
}

.sm-widget a:not(.sm-btn):hover { color: var(--sm-accent); }

/* ============================================================
   RELATED / CARDS
   ============================================================ */
.sm-related { margin-top: 24px; }

.sm-related__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sm-related__grid--landing { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.sm-related-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
  transition: box-shadow 160ms ease;
}

.sm-related-card:hover { box-shadow: var(--sm-shadow); }

.sm-related-card a {
  display: grid;
  color: #000;
  font-weight: 600;
}

.sm-related-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.sm-related-card span { padding: 12px; font-size: 14px; line-height: 1.35; }

/* ============================================================
   FAQ
   ============================================================ */
.sm-faq-list { display: grid; gap: 8px; }

.sm-faq-item {
  padding: 0 16px;
  background: #fff;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
}

.sm-faq-item summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  font-weight: 700;
  cursor: pointer;
}

.sm-faq-item p {
  margin: 0 0 14px;
  color: var(--sm-text-3);
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination .page-numbers,
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 4px 12px;
  margin: 0 2px;
  border-radius: var(--sm-radius);
  font-weight: 600;
  color: var(--sm-text-2);
  background: #fff;
  border: 1px solid var(--sm-border);
  text-decoration: none;
  font-size: 14px;
  transition: border-color 160ms ease, background 160ms ease;
}

.page-numbers.current, .page-numbers.current:hover {
  background: var(--sm-accent);
  color: #fff;
  border-color: var(--sm-accent);
}

.page-numbers:hover { border-color: var(--sm-accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.sm-footer {
  padding: 28px 0 0;
  background: #000;
  color: rgba(255,255,255,.78);
  font-size: 14px;
}

.sm-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, minmax(0, 0.7fr));
  gap: 24px;
}

.sm-footer__logo {
  display: inline-block;
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  text-decoration: none;
}
.sm-footer__logo:hover { text-decoration: none; }

.sm-footer__brand p, .sm-footer__note {
  max-width: 320px;
  margin: 10px 0 0;
  color: rgba(255,255,255,.6);
  font-size: 13px;
  line-height: 1.55;
}

.sm-footer__title {
  margin-bottom: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.sm-footer__col a {
  display: block;
  padding: 5px 0;
  color: rgba(255,255,255,.65);
  font-size: 13px;
  font-weight: 600;
  transition: color 140ms ease;
}

.sm-footer__col a:hover { color: #fff; }

.sm-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
  border-top: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.5);
  font-size: 13px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet / small desktop */
@media (max-width: 1180px) {
  .sm-header__shell {
    gap: 14px;
  }

  .sm-menu--desktop {
    gap: 12px;
  }

  .sm-menu__link {
    font-size: 12px;
    padding: 0 6px;
  }

  .sm-header__actions .sm-btn {
    padding: 0 12px;
    font-size: 13px;
  }
}

/* Mobile header switch */
@media (max-width: 1023px) {
  .sm-nav--desktop,
  .sm-header__actions {
    display: none !important;
  }

  .sm-header__shell {
    display: flex;
    justify-content: space-between;
  }

  .sm-header__mobile-actions {
    display: inline-flex;
  }

  .sm-menu-toggle {
    display: inline-flex;
  }

  .sm-mobile-panel {
    display: block;
    position: fixed;
    top: var(--sm-header-h);
    left: 0;
    right: 0;
    z-index: 10000;
  }
}

/* Tablet / mobile layout */
@media (max-width: 1023px) {
  /* Tablet banner uses the 16:7 asset (1600x700). */
  .ao68-slider__viewport { aspect-ratio: 1600 / 700; }

  .sm-layout {
    display: block;
  }

  .sm-content {
    max-width: 100%;
  }

  .sm-sidebar {
    display: none;
  }

  .sm-category-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sm-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 0 24px;
  }

  .sm-hero__media {
    justify-content: stretch;
    order: -1;
  }

  .sm-hero__media-card {
    max-width: none;
  }

  .sm-hero__media-card img,
  .sm-hero__image {
    min-height: 220px;
  }

  .sm-hero h1 {
    font-size: 26px;
    line-height: 1.3;
  }

  .sm-grid--features {
    grid-template-columns: 1fr;
  }

  .sm-related__grid,
  .sm-related__grid--landing {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .ao68-slider { margin-bottom: 20px; border-radius: var(--sm-radius); }
  .ao68-slider__viewport { aspect-ratio: 750 / 579; }
  .ao68-slide img { object-fit: contain; }
  .ao68-slider__arrow { width: 34px; height: 34px; margin-top: -17px; font-size: 26px; }
  .ao68-slider__arrow--prev { left: 8px; }
  .ao68-slider__arrow--next { right: 8px; }
  .ao68-slider__dots { position: static; gap: 6px; margin: 8px 0 10px; }
  .ao68-slider__dots button { width: 7px; height: 7px; }
  .ao68-slider__dots button.is-active { width: 18px; border-radius: 7px; }

  .sm-site-main, .site-main { padding: 20px 0 32px; }

  .sm-header__shell {
    gap: 10px;
  }

  .sm-header__brand {
    font-size: 16px;
  }

  .sm-logo {
    max-height: 36px;
    max-width: 108px;
  }

  .sm-header__mobile-actions {
    gap: 4px;
    min-width: 0;
  }

  .sm-mobile-login,
  .sm-mobile-cta {
    padding-inline: 8px;
    font-size: 11px;
  }

  .sm-brand-text {
    max-width: 100px;
  }

  .sm-mobile-cta {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }

  .sm-menu-toggle {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .sm-hero h1 {
    font-size: 26px;
  }

  .sm-hero__image {
    min-height: 190px;
  }

  .sm-category-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 16px 0 20px;
  }

  .sm-category-card {
    padding: 10px 6px;
  }

  .sm-category-card__icon {
    width: 26px; height: 26px;
    font-size: 13px;
    margin-bottom: 6px;
  }

  .sm-category-card__title {
    font-size: 12px;
  }

  .sm-section {
    padding: 18px 0;
  }

  .sm-section-title {
    font-size: 20px;
  }

  .sm-article-card, .article-card,
  .sm-home-content-card {
    padding: 16px;
    border-radius: var(--sm-radius);
  }

  .sm-article-title, .article-title {
    font-size: 25px;
    line-height: 1.35;
  }

  .sm-entry-content h2,
  .sm-article-content h2, .article-content h2 { font-size: 22px; }
  .sm-entry-content h3,
  .sm-article-content h3, .article-content h3 { font-size: 19px; }

  .sm-entry-content img,
  .sm-article-content img, .article-content img {
    max-height: 280px;
  }

  .sm-cta-box, .post-cta, .sm-final-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }

  .sm-footer__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .sm-footer__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .sm-footer {
    padding: 20px 0 0;
  }

  .sm-scroll-top {
    right: 14px;
    bottom: 18px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

/* Small mobile */
@media (max-width: 420px) {
  .sm-category-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================================
   LOCAL SEO (seo-dia-danh) OVERRIDES
   ============================================================ */
.sm-local-seo .container,
.sm-local-seo .sm-container {
  padding: 0;
}


/* Final mobile polish for the homepage composition. */
@media (max-width: 768px) {
  .sm-home-shell > .sm-hero {
    padding: 22px 16px 20px;
    border-radius: var(--sm-radius);
  }
  .sm-home-shell > .sm-hero h1 { font-size: 25px; }
  .sm-home-shell > .sm-hero .sm-hero__desc { font-size: 15px; line-height: 1.6; }
  .sm-home-shell > .sm-category-strip { margin: 16px 0 24px; gap: 8px; }
  .sm-home-shell > .sm-category-strip .sm-category-card {
    min-height: 86px;
    border-radius: 13px;
  }
}

/* AO68 category artwork icons */
.sm-category-card__icon img {
  display: block;
  width: 64px;
  height: 64px;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 5px 7px rgba(7, 140, 245, .16));
}
.sm-category-card:hover .sm-category-card__icon img {
  transform: scale(1.06);
}
@media (max-width: 768px) {
  .sm-category-card__icon img { width: 48px; height: 48px; }
}

/* ============================================================
   HOMEPAGE ADDITIONS — guides, news body, brand note, links
   Scoped to .sm-home-shell so other templates are untouched.
   Palette: sky #078CF5 / gradient #0067DC->#20B8FF / gold #F4C430 / bg #F5FBFF
   ============================================================ */
.sm-home-shell { background: #F5FBFF; }

/* GUIDE CARDS (Section 5) */
.sm-home-shell .sm-grid--features { gap: 16px; }
.sm-home-shell .sm-feature-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid #D9EBFF;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(7, 140, 245, .06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.sm-home-shell .sm-feature-card:hover {
  transform: translateY(-2px);
  border-color: #078CF5;
  box-shadow: 0 14px 30px rgba(7, 140, 245, .12);
}
.sm-home-shell .sm-feature-card h3 { margin: 0; font-size: 17px; font-weight: 700; color: #0f1b2d; }
.sm-home-shell .sm-feature-card p { margin: 0; color: #41566b; font-size: 14px; line-height: 1.55; }
.sm-text-link {
  margin-top: auto;
  font-weight: 700;
  font-size: 14px;
  color: #078CF5;
  text-decoration: none;
}
.sm-text-link:hover { text-decoration: underline; }

/* NEWS CARDS (Section 6) — richer card with date + excerpt */
.sm-related-card {
  display: flex;
  border: 1px solid #D9EBFF;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 22px rgba(7, 140, 245, .06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.sm-related-card:hover {
  transform: translateY(-2px);
  border-color: #078CF5;
  box-shadow: 0 14px 30px rgba(7, 140, 245, .12);
}
.sm-related-card a { display: flex; flex-direction: column; width: 100%; color: inherit; text-decoration: none; }
.sm-related-card img { width: 100%; height: 180px; object-fit: cover; }
.sm-related-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px 14px;
}
.sm-related-card__body strong { font-size: 15px; line-height: 1.35; color: #0f1b2d; }
.sm-related-card__body small { font-size: 12px; color: #078CF5; font-weight: 700; }
.sm-related-card__body em { font-style: normal; font-size: 13px; color: #5a6b7c; line-height: 1.45; }
.sm-related-card__body b { margin-top: 4px; font-size: 13px; font-weight: 700; color: #078CF5; }

/* BRAND NOTE (Section 7) */
.sm-brand-note {
  background: linear-gradient(135deg, #0067DC 0%, #20B8FF 100%);
  border: none;
}
.sm-brand-note .sm-section-head .sm-kicker,
.sm-brand-note .sm-section-head .sm-section-title { color: #fff; }
.sm-brand-note p { color: rgba(255, 255, 255, .92); }

/* HOMEPAGE CONTENT CARD uses spec border/radius */
.sm-home-shell > .sm-section .sm-home-content-card,
.sm-home-shell > .sm-section > .sm-home-content-card {
  border: 1px solid #D9EBFF;
  border-radius: 16px;
  background: #fff;
  padding: 26px;
}

/* Keep the visual lead (slider) within the 1200px content frame */
.sm-home-shell > .ao68-slider { max-width: var(--sm-container); margin-left: auto; margin-right: auto; }

@media (max-width: 600px) {
  .sm-home-shell > .sm-section .sm-home-content-card { padding: 18px; }
  .sm-related-card img { height: 150px; }
}

/* AO68 homepage cards: readable descriptions and consistent card rhythm. */
.sm-category-strip--home {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.sm-category-strip--home .sm-category-card {
  min-height: 190px;
  padding: 18px 14px;
  text-align: center;
}
.sm-category-card__desc {
  display: block;
  margin-top: 7px;
  color: var(--sm-muted);
  font-size: 13px;
  line-height: 1.45;
}
.sm-feature-card__link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.sm-feature-card__more {
  display: inline-block;
  margin-top: 10px;
  color: var(--sm-accent-dark);
  font-weight: 700;
}
@media (max-width: 900px) {
  .sm-category-strip--home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .sm-category-strip--home { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sm-category-strip--home .sm-category-card { min-height: 155px; padding: 13px 9px; }
  .sm-category-card__desc { font-size: 12px; }
}

/* P0 responsive polish: the guide grid must be 3/2/1 columns and cards
   should stretch naturally without a fixed height. */
.sm-home-shell .sm-home-guides .sm-grid--features {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.sm-home-shell .sm-home-guides .sm-feature-card {
  min-width: 0;
  height: auto;
  min-height: 0;
  box-sizing: border-box;
}
.sm-home-shell .sm-home-guides .sm-feature-card__link {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow-wrap: anywhere;
}
.sm-home-shell .sm-home-guides .sm-feature-card__more {
  white-space: nowrap;
  margin-top: auto;
}

/* Keep the slider's layout box tied to the selected asset at every width. */
.sm-home-shell > .ao68-slider,
.sm-home-shell > .ao68-slider .ao68-slider__viewport {
  max-width: 100%;
  box-sizing: border-box;
}
.sm-home-shell > .ao68-slider .ao68-slide picture,
.sm-home-shell > .ao68-slider .ao68-slide img {
  margin: 0;
}

@media (max-width: 1023px) {
  .sm-home-shell .sm-home-guides .sm-grid--features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .sm-home-shell .sm-home-guides .sm-grid--features {
    grid-template-columns: 1fr;
  }
  .sm-home-shell .sm-home-guides .sm-feature-card {
    padding: 20px;
    border-radius: 14px;
  }
  .sm-home-shell .sm-home-intro h1 {
    font-size: clamp(28px, 7.5vw, 32px);
    line-height: 1.2;
  }
  .sm-home-shell .sm-home-intro p,
  .sm-home-shell .sm-home-guides p {
    font-size: 15px;
    line-height: 1.6;
  }
  .sm-home-shell > .sm-section {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .sm-home-shell > .ao68-slider {
    margin-bottom: 12px;
  }
}

/* Header-only breakpoint: the full AO68 menu is too wide for a 1024px
   tablet once the logo and actions are included. Keep the content layout
   desktop/tablet while using the compact, tappable menu chrome. */
@media (min-width: 1024px) and (max-width: 1100px) {
  .sm-nav--desktop,
  .sm-header__actions {
    display: none !important;
  }
  .sm-header__shell {
    display: flex;
    justify-content: space-between;
  }
  .sm-header__mobile-actions {
    display: inline-flex;
  }
  .sm-menu-toggle {
    display: inline-flex;
  }
  .sm-mobile-panel {
    display: block;
  }
}


/* Centralized AO68/A068 domain links component */
.ao68-domain-links { margin: 24px 0; padding: 20px; border: 1px solid #D9EBFF; border-radius: 16px; background: #F5FBFF; }
.ao68-domain-links__title { margin: 0 0 6px; color: #0067DC; font-size: 1.25rem; }
.ao68-domain-links__note { margin: 0 0 14px; color: var(--sm-muted); font-size: .9rem; }
.ao68-domain-links__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ao68-domain-links__item { min-height: 48px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid #D9EBFF; border-radius: 12px; background: #fff; color: #0067DC; font-weight: 700; text-decoration: none; }
.ao68-domain-links__item:hover, .ao68-domain-links__item:focus-visible { border-color: #078CF5; background: #EAF4FF; color: #0067DC; }
@media (max-width: 900px) { .ao68-domain-links__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .ao68-domain-links { padding: 14px; } .ao68-domain-links__grid { grid-template-columns: 1fr; } }

/* P0 responsive guardrails: tie the slider box to the supplied asset ratio
   and prevent guide cards/links from overflowing their grid cells. */
.sm-home-shell > .ao68-slider { max-width: 100%; overflow: hidden; }
.sm-home-shell > .ao68-slider .ao68-slider__viewport { width: 100%; height: auto; aspect-ratio: 1920 / 660; }
.sm-home-shell > .ao68-slider .ao68-slide picture,
.sm-home-shell > .ao68-slider .ao68-slide img { width: 100%; height: 100%; max-width: 100%; }
.sm-home-shell .sm-home-guides .sm-feature-card { min-width: 0; box-sizing: border-box; }
.sm-home-shell .sm-home-guides .sm-feature-card__more { white-space: nowrap; overflow-wrap: normal; }
@media (min-width: 768px) and (max-width: 1023px) {
  .sm-home-shell > .ao68-slider .ao68-slider__viewport { aspect-ratio: 1600 / 700; }
}
@media (max-width: 767px) {
  .sm-home-shell > .ao68-slider { margin-bottom: 12px; }
  .sm-home-shell > .ao68-slider .ao68-slider__viewport { aspect-ratio: 750 / 579; }
  .ao68-slider__dots { margin: 8px 0 10px; }
}
/* AO68 header CTA polish */
.sm-header-login { background:#fff !important; border:2px solid #078CF5 !important; color:#0067DC !important; gap:6px; }
.sm-header-register-wrap { position:relative; display:inline-flex; }
.sm-header-register { gap:6px; border:1px solid rgba(255,255,255,.85) !important; background:linear-gradient(120deg,#0067DC,#20B8FF) !important; box-shadow:0 8px 18px rgba(7,140,245,.2); }
.sm-header-register-badge { position:absolute; right:-5px; top:-16px; z-index:2; padding:2px 6px; border-radius:999px; background:#F4C430; color:#17345b; font-size:10px; font-weight:800; line-height:1.2; white-space:nowrap; }
.sm-header-login:hover,.sm-header-register:hover { transform:translateY(-2px); box-shadow:0 10px 24px rgba(7,140,245,.28); }
@media (prefers-reduced-motion:reduce) { .sm-header-login,.sm-header-register { transition:none !important; } .sm-header-login:hover,.sm-header-register:hover { transform:none; } }
@media (max-width:1023px) { .sm-header-register-badge { top:-10px; right:-3px; } }
.sm-mobile-register-wrap{position:relative;display:inline-flex;align-items:center}.sm-mobile-register-wrap .sm-header-register-badge{top:-9px;right:-2px}.sm-mobile-login,.sm-mobile-cta{display:inline-flex;align-items:center;gap:4px}.sm-mobile-login{border:2px solid #078CF5!important;background:#fff!important;color:#0067DC!important;border-radius:999px}.sm-mobile-cta{border:1px solid rgba(255,255,255,.85);background:linear-gradient(120deg,#0067DC,#20B8FF);box-shadow:0 6px 14px rgba(7,140,245,.18)}

/* ============================================================
   AO68 P0 — UI consistency, spacing & overflow fixes (appended)
   Keeps base design tokens; overrides listed Owner complaints:
   1) category cards text overflow  2) section spacing too large
   3) "Xem chuyên mục" wrap         4) footer black               5) ragged alignment
   ============================================================ */

/* Align homepage shell with header/footer container width */
.sm-home-shell {
  width: min(100% - 32px, var(--sm-container));
  margin-inline: auto;
}

/* Tighter, even section rhythm */
.sm-home-shell > .sm-section {
  padding: 20px 0;
}
.sm-section-head {
  margin-bottom: 14px;
}

/* Category cards: never overflow, clamp description to 2 lines */
.sm-category-card {
  min-width: 0;
  overflow: hidden;
}
.sm-category-card__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.sm-category-card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  max-width: 100%;
}

/* Category detail grid: balanced 3/2/1 columns */
.sm-grid--cats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.sm-grid--cats .sm-feature-card {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.sm-grid--cats .sm-feature-card__link {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.sm-grid--cats .sm-feature-card h3,
.sm-grid--cats .sm-feature-card p {
  overflow-wrap: break-word;
  max-width: 100%;
}
.sm-grid--cats .sm-feature-card__more {
  white-space: nowrap;
  margin-top: auto;
  padding-top: 8px;
}

/* Feature cards: never break "Đọc thêm / Xem chuyên mục" */
.sm-feature-card__more {
  white-space: nowrap;
  display: inline-block;
}

/* Featured empty state (public visitors) */
.sm-featured-empty {
  padding: 18px 20px;
  border: 1px dashed var(--sm-border);
  border-radius: var(--sm-radius);
  background: var(--sm-surface);
  color: var(--sm-muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}
.sm-featured-empty a { color: var(--sm-accent-dark); font-weight: 700; }

/* Related/article cards: date + excerpt on archive cards */
.sm-related-card__date {
  display: block;
  margin-top: 6px;
  color: var(--sm-muted);
  font-size: 12px;
  font-weight: 400;
}
.sm-related-card__excerpt {
  display: block;
  margin-top: 6px;
  color: var(--sm-text-3);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
}

/* ============================================================
   AO68 P0 — Footer: light sky-blue/white theme (was #000)
   ============================================================ */
.sm-footer {
  background: var(--sm-surface);
  background-image: linear-gradient(180deg, #F9FCFF 0%, var(--sm-soft) 100%);
  color: var(--sm-text-2);
  border-top: 1px solid var(--sm-border);
  padding: 32px 0 0;
}
.sm-footer__logo { color: var(--sm-accent-dark); font-weight: 900; }
.sm-footer__brand p,
.sm-footer__note { color: var(--sm-text-3); }
.sm-footer__title { color: var(--sm-text); }
.sm-footer__col a { color: var(--sm-text-2); }
.sm-footer__col a:hover { color: var(--sm-accent); }
.sm-footer__bottom {
  border-top: 1px solid var(--sm-border);
  color: var(--sm-muted);
}
.sm-footer__grid { gap: 28px; }

/* ============================================================
   AO68 P0 — Responsive: 2-col category strip on small screens,
   2/1-col category detail grid
   ============================================================ */
@media (max-width: 900px) {
  .sm-grid--cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sm-category-strip,
  .sm-category-strip--home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .sm-grid--cats { grid-template-columns: 1fr; }
  .sm-home-shell { width: min(100% - 24px, var(--sm-container)); }
  .sm-home-shell > .sm-section { padding: 14px 0; }
  .sm-section-head { margin-bottom: 10px; }
}

/* P0: missing-thumbnail placeholder on cards */
.sm-card-image-pending {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 12px;
  background: var(--sm-soft);
  color: var(--sm-text-3);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  border-radius: 12px 12px 0 0;
}

/* P0: pagination wrapper on home.php / archives */
.sm-pagination-wrap {
  text-align: center;
  padding: 24px 0 8px;
}
.sm-pagination-wrap .nav-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}
.sm-pagination-wrap .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--sm-border);
  border-radius: 10px;
  background: var(--sm-surface);
  color: var(--sm-text-2);
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.sm-pagination-wrap .page-numbers.current {
  background: var(--sm-accent);
  border-color: var(--sm-accent);
  color: #fff;
}
.sm-pagination-wrap .page-numbers:hover {
  background: var(--sm-soft);
  border-color: var(--sm-accent);
  color: var(--sm-accent-dark);
}

/* ============================================================
   AO68 — CATEGORY ARCHIVE (2-column) + SIDEBAR
   Left 70% cards (thumb left / text right), right 30% widgets.
   ============================================================ */
.sm-archive-head {
  padding: 22px 0 4px;
}
.sm-archive-title {
  margin: 4px 0 6px;
  color: var(--sm-text);
  font-size: clamp(24px, 3.5vw, 32px);
  line-height: 1.25;
}
.sm-archive-desc {
  max-width: 720px;
  margin: 0 0 8px;
  color: var(--sm-muted);
  font-size: 14px;
  line-height: 1.6;
}
.sm-archive-layout {
  grid-template-columns: minmax(0, 3fr) minmax(0, 1.3fr);
  gap: 22px;
  align-items: start;
  padding: 14px 0 34px;
}
.sm-archive-main {
  min-width: 0;
}
.sm-archive-list {
  display: grid;
  gap: 14px;
}
.sm-archive-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
  overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease;
}
.sm-archive-card:hover {
  box-shadow: 0 8px 22px rgba(7, 140, 245, .12);
  transform: translateY(-1px);
}
.sm-archive-card__thumb {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
}
.sm-archive-card__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 128px;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}
.sm-archive-card__thumb .sm-card-image-pending {
  min-height: 128px;
  border-radius: 10px;
}
.sm-archive-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.sm-archive-card__title {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
}
.sm-archive-card__title a {
  color: var(--sm-text);
  text-decoration: none;
}
.sm-archive-card__title a:hover { color: var(--sm-accent-dark); }
.sm-archive-card__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--sm-muted);
  font-size: 12px;
}
.sm-archive-card__cat {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--sm-soft);
  color: var(--sm-accent-dark);
  font-weight: 600;
  font-size: 11px;
}
.sm-archive-card__excerpt {
  margin: 0;
  color: var(--sm-text-3);
  font-size: 13.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sm-archive-card__more {
  margin-top: auto;
  padding-top: 8px;
}
.sm-btn--sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 999px;
}

/* Sidebar widgets */
.sm-archive-sidebar { min-width: 0; }
.sm-widget__dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--sm-accent);
  vertical-align: middle;
}
.sm-widget a:not(.sm-btn).is-current {
  color: var(--sm-accent-dark);
  background: var(--sm-soft);
  border-radius: 8px;
  padding-left: 8px;
}
.sm-widget--search .search-form {
  display: flex;
  gap: 6px;
}
.sm-widget--search .search-field {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--sm-border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--sm-text);
}
.sm-widget--search .search-submit {
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--sm-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.sm-widget--search .search-submit:hover { background: var(--sm-accent-dark); }

@media (max-width: 1023px) {
  .sm-archive-layout { display: block; }
  .sm-archive-sidebar { display: none; }
}
@media (max-width: 640px) {
  .sm-archive-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .sm-archive-card__thumb img,
  .sm-archive-card__thumb .sm-card-image-pending { min-height: 0; aspect-ratio: 16 / 9; }
  .sm-archive-title { font-size: 24px; }
}

/* AO68 Local Preview (admin) — filter form */
.sm-preview-filters {
  margin: 14px 0 22px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
}
.sm-preview-filters__row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(200px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.sm-preview-filters__field { display: flex; flex-direction: column; gap: 6px; }
.sm-preview-filters__field span {
  font-size: 12px;
  font-weight: 700;
  color: var(--sm-text-2);
}
.sm-preview-filters__field select,
.sm-preview-filters__field input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--sm-border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--sm-text);
  background: #fff;
}
.sm-preview-filters__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.sm-preview-list { margin-top: 4px; }
@media (max-width: 720px) {
  .sm-preview-filters__row { grid-template-columns: 1fr; }
  .sm-preview-filters__actions { flex-wrap: wrap; }
}

