/* ============================================
   STARTER CSS — based on Playbook design-system v1.0.0
   ============================================ */

:root {
  /* Mỹ Hạnh — palette theo Outseta: peach/cream warm + terracotta CTA */
  --primary-color: #c4533d;     /* terracotta — CTA chính */
  --primary-dark:  #9e3e2c;
  --primary-light: #e3826e;
  --primary-bg:    #fde8e0;
  --secondary-color: #b8417a;   /* magenta cho handwritten accent */
  --secondary-dark:  #8e2c5e;
  --accent-color:    #6f8f5c;   /* sage làm secondary */
  --dark-color:  #1f1812;
  --light-color: #fff4e6;
  --paper:       #ffffff;       /* card pure white */
  --text-color:  #1f1812;
  --text-light:  #54493d;
  --text-muted:  #8a7d6e;
  --white: #ffffff;
  --border-color: #f0e0cf;
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  --gradient-warm:    linear-gradient(135deg, #fff4e6 0%, #ffe4cc 50%, #ffd4b3 100%);
  --gradient-hero:    radial-gradient(ellipse 80% 70% at 50% 0%, #ffe8d4 0%, #fff4e6 50%, #ffeed8 100%);
  --shadow-sm:   0 2px 10px rgba(60,40,20,0.06);
  --shadow-md:   0 8px 24px rgba(60,40,20,0.10);
  --shadow-lg:   0 20px 50px rgba(60,40,20,0.14);
  --shadow-card: 0 4px 12px rgba(60,40,20,0.06), 0 1px 3px rgba(60,40,20,0.04);
  --shadow-glow: 0 0 24px rgba(196,83,61,0.25);
  --border-radius: 14px;
  --border-radius-lg: 22px;
  --border-radius-xl: 32px;
  --transition: all 0.3s ease;
  --font-primary: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Playfair Display', 'Be Vietnam Pro', Georgia, serif;
  --font-script:  'Patrick Hand', 'Caveat', cursive;  /* Patrick Hand hỗ trợ VN */
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (max-width: 768px) { html { scroll-padding-top: 80px; } }
body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-color);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-dark); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--secondary-color); }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark-color);
}
h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.5rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 2rem 0; }
.section-alt { background: var(--light-color); }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.4;
}
.btn { border-radius: 100px; }
.btn-primary { background: var(--primary-color); color: var(--white); box-shadow: 0 4px 12px rgba(196,83,61,0.25); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(196,83,61,0.35); color: var(--white); }
.btn-outline { background: var(--white); border: 1.5px solid var(--dark-color); color: var(--dark-color); box-shadow: var(--shadow-sm); }
.btn-outline:hover { background: var(--dark-color); color: var(--white); }
.btn-white { background: var(--white); color: var(--dark-color); box-shadow: var(--shadow-sm); border: 1.5px solid var(--border-color); }
.btn-white:hover { border-color: var(--dark-color); }
.btn-lg { padding: 1rem 2.2rem; font-size: 1.05rem; }
.btn i, .btn svg { width: 20px; height: 20px; }

/* === Header === */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  text-decoration: none;
  line-height: 1;
}
.logo-img { height: 64px; width: auto; max-width: none; display: block; object-fit: contain; }
.logo-tagline {
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dark-color);
  letter-spacing: 0.02em;
  white-space: nowrap;
  margin-top: -0.1rem;
}
.logo-tagline-sep { color: var(--primary-dark); font-weight: 700; margin: 0 0.2rem; }

.nav-menu { display: flex; align-items: center; gap: 0.3rem; }
.nav-menu a:not(.btn) {
  color: var(--text-color);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1;
}
.nav-menu a:not(.btn):hover, .nav-menu a:not(.btn).active {
  color: var(--primary-dark);
  background: var(--primary-bg);
}
.nav-menu .btn-primary { color: var(--white); }
.nav-menu .btn-primary i, .nav-menu .btn-primary svg { color: var(--white); stroke: var(--white); }
@media (min-width: 1025px) {
  .nav-menu > a:not(.btn) > i,
  .nav-menu > a:not(.btn) > svg { display: none !important; }
}
.nav-cta { margin-left: 0.5rem; }
.nav-cta .btn { padding: 0.6rem 1.5rem; font-size: 0.9rem; }

.mobile-header-actions { display: none; align-items: center; gap: 0.25rem; }
.mobile-call-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-color);
  color: var(--white);
}
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px; height: 40px;
  border-radius: 10px;
}
.mobile-toggle:hover { background: var(--primary-bg); }

.nav-drawer-head, .nav-drawer-footer { display: none; }

/* === Hero === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  overflow: hidden;
  padding-top: clamp(110px, 14vw, 160px);
  padding-bottom: 2rem;
}
.hero .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.hero-content { max-width: 650px; }
.hero h1 { color: var(--dark-color); font-size: 3rem; margin-bottom: 1rem; line-height: 1.3; padding-top: 0.15em; }
.hero h1 span { color: var(--primary-dark); }
.hero-slogan { color: var(--secondary-color); font-style: italic; margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; margin-bottom: 1.5rem; color: var(--text-light); }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-image { flex-shrink: 0; }
.hero-image-circle {
  width: 380px;
  height: 380px;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid var(--primary-color);
  box-shadow: var(--shadow-glow);
  position: relative;
}
.hero-image-circle img {
  position: absolute; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s;
}
.hero-image-circle img.active { opacity: 1; }

/* === Forms === */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--dark-color); margin-bottom: 0.35rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* === Modal === */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}
.modal-close {
  background: rgba(0,0,0,0.05);
  border: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.modal-body { padding: 1.25rem; }

/* === Footer === */
.site-footer { background: var(--dark-color); color: var(--white); padding: 3rem 0 1rem; }
.site-footer h4 { color: var(--white); margin-bottom: 1rem; font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-col a { display: block; color: rgba(255,255,255,0.8); padding: 0.25rem 0; font-size: 0.9rem; }
.footer-col a:hover { color: var(--primary-color); }
.footer-bottom { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; }
.footer-bottom a { color: var(--primary-color); }
.contact-social { display: flex; gap: 0.75rem; margin-top: 1rem; }
.contact-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
}

/* === Loading screen === */
.loading-screen {
  position: fixed; inset: 0;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s;
}
.loading-screen.hidden { opacity: 0; pointer-events: none; }
.loading-spinner { text-align: center; padding: 0 1.5rem; }
.loading-spinner img {
  height: clamp(60px, 14vw, 110px) !important;
  width: auto !important;
  max-width: min(85vw, 420px) !important;
  object-fit: contain;
  margin: 0 auto 1.25rem !important;
}
.loading-bar {
  width: 120px; height: 3px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto;
}
.loading-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  animation: loadingSlide 1.2s ease infinite;
}
@keyframes loadingSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* === Floating actions === */
.floating-actions {
  position: fixed;
  bottom: 1rem; right: 1rem;
  display: flex; flex-direction: column;
  gap: 0.5rem;
  z-index: 998;
}
.floating-btn {
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s;
}
.floating-btn:hover { transform: scale(1.1); }
.floating-btn.messenger { background: #1877F2; }
.floating-btn.zalo { background: #0068FF; }
.floating-btn.phone { background: var(--primary-color); color: var(--white); }

/* === Animations === */
.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: 0.6s; }
.animate-on-scroll.visible { opacity: 1; transform: none; }

/* ============================================
   MỸ HẠNH — Book blog additions
   ============================================ */

/* ============================================
   HERO Outseta-style — peach gradient + bold highlights + pill tabs + handwritten arrows
   ============================================ */
body { background: var(--gradient-hero); }

.hero-editorial {
  display: block !important;
  min-height: auto;
  padding: clamp(120px, 13vw, 160px) 0 clamp(2rem, 4vw, 3rem);
  position: relative;
  overflow: visible;
  text-align: center;
  background: transparent;
  align-items: initial;
}
.hero-editorial .container {
  display: block !important;
  position: relative;
  z-index: 1;
  text-align: center;
}
.hero-editorial-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.hero-editorial h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--dark-color);
  margin-bottom: 1.75rem;
  font-weight: 500;
  max-width: 880px;
}
.hero-editorial h1 strong {
  font-weight: 800;
  color: var(--dark-color);
  text-decoration: underline;
  text-decoration-color: var(--primary-color);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.hero-editorial .hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

/* Pill tabs row (MEMBERSHIP SITES, COURSES, …) */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  position: relative;
}
.hero-pills .pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.1rem;
  border: 1.5px solid var(--dark-color);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dark-color);
  background: transparent;
  white-space: nowrap;
  transition: var(--transition);
}
.hero-pills .pill:hover, .hero-pills .pill.active {
  background: var(--dark-color);
  color: var(--white);
}

/* Handwritten annotations với mũi tên cong */
.handwritten {
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--secondary-color);
  line-height: 1.2;
  letter-spacing: 0.005em;
  position: relative;
}
.handwritten-anno {
  position: absolute;
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: var(--secondary-color);
  line-height: 1.15;
  text-transform: uppercase;
  max-width: 200px;
  z-index: 2;
  pointer-events: none;
}
.handwritten-anno.left {
  left: -2rem;
  top: 50%;
  transform: translateY(-50%) rotate(-4deg);
  text-align: right;
}
.handwritten-anno.right {
  right: -2rem;
  top: 50%;
  transform: translateY(-50%) rotate(4deg);
  text-align: left;
}
.handwritten-anno svg.arrow { display: block; margin-top: 0.4rem; }
@media (max-width: 1100px) {
  .handwritten-anno { display: none; }
}

/* Searchbar centered (override) */
.hero-editorial .searchbar { margin: 0 auto; max-width: 540px; }

/* ============================================
   HERO SHOWCASE — 3 card ngang Outseta-style
   ============================================ */
.hero-showcase-wrap {
  padding: 1rem 0 4rem;
  position: relative;
  display: block;
}
.hero-showcase-wrap .container { display: block !important; }
.hero-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  position: relative;
  align-items: stretch;
}
.hero-showcase .showcase-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: visible;
}
.hero-showcase .showcase-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.hero-showcase .showcase-cover {
  aspect-ratio: 16 / 10;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: linear-gradient(135deg, #fef3e2, #fde2c5);
  position: relative;
}
.hero-showcase .showcase-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  color: transparent;
  font-size: 0;
}
.hero-showcase .showcase-card:hover .showcase-cover img { transform: scale(1.04); }
.hero-showcase .showcase-corner-abs {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--dark-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  z-index: 2;
}
.hero-showcase .showcase-card:hover .showcase-corner-abs {
  background: var(--primary-color);
  color: var(--white);
  transform: rotate(-15deg);
}

/* Brand row: title bên trái, avatars bên phải (Outseta) */
.hero-showcase .showcase-brand {
  padding: 1rem 0.7rem 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.hero-showcase .showcase-title-block {
  flex: 1; min-width: 0;
}
.hero-showcase .showcase-title-block .author {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.hero-showcase .showcase-title-block h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark-color);
  margin: 0;
  letter-spacing: -0.005em;
}
.hero-showcase .showcase-title-block .script {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--secondary-color);
  line-height: 1;
  margin-top: 0.3rem;
}
.hero-showcase .avatars { display: flex; flex-shrink: 0; }
.hero-showcase .avatars img {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--white);
  object-fit: cover;
  background: linear-gradient(135deg, #fde2c5, #f0bfa3);
}
.hero-showcase .avatars img + img { margin-left: -10px; }

/* Footer: SÁCH NỔI BẬT · MUA TRÊN · [icon] (Outseta "COURSE · BUILT ON · WEBFLOW") */
.hero-showcase .showcase-footer {
  padding: 0.7rem 0.7rem 0.2rem;
  border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  flex-wrap: wrap;
}
.hero-showcase .showcase-footer .platform {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: var(--dark-color);
}
.hero-showcase .showcase-footer .platform i { width: 12px; height: 12px; }
.hero-showcase .showcase-footer .dot { color: var(--text-muted); }

/* Handwritten arrows trỏ vào card */
.showcase-anno {
  position: absolute;
  font-family: var(--font-script);
  font-size: 1.25rem;
  color: var(--secondary-color);
  line-height: 1.15;
  text-transform: uppercase;
  z-index: 3;
  pointer-events: none;
  letter-spacing: 0.005em;
}
.showcase-anno.top-left {
  top: -3.5rem;
  left: -1rem;
  transform: rotate(-4deg);
  text-align: center;
}
.showcase-anno.top-right {
  top: -3.5rem;
  right: -1rem;
  transform: rotate(4deg);
  text-align: center;
}
.showcase-anno svg.arrow { display: block; margin: 0.3rem auto 0; color: var(--secondary-color); }

@media (max-width: 1024px) {
  .hero-showcase { grid-template-columns: 1fr; gap: 1rem; }
  .showcase-anno { display: none; }
}

@media (max-width: 768px) {
  /* Hero mobile tightening */
  .hero-editorial { padding: 100px 0 1.5rem !important; }
  .hero-editorial h1 { font-size: 1.4rem !important; line-height: 1.4; margin-bottom: 1rem; }
  .hero-editorial .hero-buttons { gap: 0.5rem; margin-bottom: 1.5rem; }
  .hero-editorial .hero-buttons .btn { padding: 0.7rem 1.2rem; font-size: 0.95rem; }
  .hero-pills { gap: 0.4rem; margin-bottom: 1.5rem; }
  .hero-pills .pill { padding: 0.35rem 0.75rem; font-size: 0.7rem; }
  .hero-editorial .searchbar { padding: 0.4rem 0.7rem; }
  .hero-editorial .searchbar input { font-size: 0.9rem; }
  .hero-showcase-wrap { padding: 1rem 0 2.5rem; }

  /* Showcase card (already 1col) */
  .hero-showcase .showcase-cover { aspect-ratio: 16 / 10; }
  .hero-showcase .showcase-title-block h3 { font-size: 1.2rem; }

  /* Book grid mobile: 1 col, full bleed */
  .book-grid { grid-template-columns: 1fr; gap: 1rem; }
  .post-list { grid-template-columns: 1fr; gap: 1rem; }

  /* Section spacing tight */
  .section { padding: 2.5rem 0; }
  .section-title h2 { font-size: 1.6rem; }
  .section-subtitle { font-size: 0.9rem; margin-bottom: 1.5rem; }

  /* Post detail */
  .post-article h1 { font-size: 1.6rem !important; }
  .post-article .cover { margin-bottom: 1rem; border-radius: var(--border-radius); }
  .post-content { font-size: 1rem !important; line-height: 1.7; }
  .affiliate-card { flex-direction: column; align-items: flex-start; padding: 1rem !important; }
  .affiliate-card img { width: 80px !important; }
  .share-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1.5rem 0 !important;
  }
  .share-row .btn {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    justify-content: center;
    white-space: nowrap;
  }
  .share-row .btn i { width: 18px; height: 18px; flex-shrink: 0; }

  /* Sách detail mobile: stack cover + info */
  .book-detail { grid-template-columns: 1fr !important; gap: 1.25rem !important; }
  .book-detail > div:first-child { aspect-ratio: 4 / 3 !important; max-width: 240px; margin: 0 auto; }

  /* Doc page (privacy/cookies/terms/giới thiệu/liên hệ) */
  .doc-page { padding: 130px 1.25rem 3rem; }
  .doc-page h1 { font-size: 1.8rem; line-height: 1.3; padding-top: 0.15em; }
  .doc-page h2 { font-size: 1.25rem; margin-top: 2rem; padding-top: 0.15em; }

  /* Admin shell mobile (vẫn giữ stacked sidebar) */
  .admin-side h1 { font-size: 1.05rem; }
  .admin-side a { font-size: 0.9rem; padding: 0.4rem 0.7rem; }

  /* Profile page avatar header stack */
  #profileBox > div:first-child { flex-direction: column; align-items: flex-start !important; gap: 1rem !important; }

  /* Header mobile — logo nhỏ hơn */
  .logo-tagline { font-size: 1.1rem !important; }

  /* Hero showcase title block + avatar không quá dài */
  .hero-showcase .showcase-brand { padding: 0.85rem 0.6rem 0.4rem; }
}

.section { padding: 4rem 0; }
.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-title .eyebrow {
  font-family: var(--font-script);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--secondary-dark);
  display: block;
  line-height: 1.2;
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
.section-title h2 { font-size: 2rem; }
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  max-width: 640px;
  margin: 0.4rem auto 2.5rem;
  font-size: 1rem;
}

/* ============================================
   Book card — Outseta showcase style
   ============================================ */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.book-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-card);
}
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.book-card > a:first-child { display: contents; color: inherit; }
.book-card .cover {
  aspect-ratio: 16 / 11;
  background: linear-gradient(135deg, #fef3e2, #fde2c5);
  margin: 0.85rem 0.85rem 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
}
.book-card .cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  background: transparent;
  color: transparent; /* hide alt text khi img broken */
  font-size: 0;
}
.book-card .cover img[alt]:after {
  content: ''; display: block; width: 100%; height: 100%;
  background: linear-gradient(135deg, #fef3e2, #fde2c5);
}
.book-card:hover .cover img { transform: scale(1.04); }
.book-card .corner {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(255,255,255,0.95);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--dark-color);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.book-card:hover .corner { background: var(--primary-color); color: var(--white); transform: rotate(-15deg); }

/* Brand row: title bên trái, avatar(s) bên phải (Outseta-style) */
.book-card .brand-row {
  padding: 1.1rem 1.4rem 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.book-card .brand-row h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--dark-color);
  margin: 0;
}
.book-card .brand-row .author-script {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--secondary-color);
  line-height: 1;
}
.book-card .avatars { display: flex; }
.book-card .avatars img {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--white);
  object-fit: cover;
  background: var(--paper);
}
.book-card .avatars img + img { margin-left: -10px; }

/* Footer row: SÁCH · TỪ · [icon] — Outseta "COURSE/BOOK · BUILT ON · WEBFLOW" */
.book-card .footer-row {
  padding: 0.6rem 1.4rem 1.2rem;
  border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  flex-wrap: wrap;
}
.book-card .footer-row .dot { color: var(--text-muted); }
.book-card .footer-row .platform {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--dark-color);
}
.book-card .footer-row .platform i { width: 14px; height: 14px; }

/* Backward compat */
.book-card .body { padding: 1.1rem 1.4rem; }
.book-card .author { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.book-card h3 { font-family: var(--font-display); font-size: 1.3rem; color: var(--dark-color); line-height: 1.25; font-weight: 700; }
.book-card .meta {
  margin-top: 0.6rem;
  display: flex; gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
}
.book-card .meta .tag {
  background: var(--primary-bg);
  color: var(--primary-dark);
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
}

/* Smart-link buttons (TikTok/Shopee/...) */
.platform-row { display: flex; gap: 0.5rem; flex-wrap: wrap; padding: 0 1.1rem 1.1rem; }
.platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: var(--white);
  color: var(--text-color);
  transition: var(--transition);
}
.platform-btn:hover { background: var(--primary-bg); color: var(--primary-dark); border-color: var(--primary-light); }
.platform-btn.featured { background: var(--secondary-color); color: var(--white); border-color: transparent; }

/* Post (blog) card */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.post-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card .cover { aspect-ratio: 16/10; background: var(--paper); overflow: hidden; }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 1.1rem 1.2rem 1.3rem; flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.post-card h3 { font-family: var(--font-display); font-size: 1.25rem; color: var(--dark-color); line-height: 1.35; }
.post-card .excerpt { color: var(--text-light); font-size: 0.95rem; }
.post-card .post-meta {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; color: var(--text-muted);
  margin-top: auto;
}
.post-card .post-meta img.avatar { width: 24px; height: 24px; border-radius: 50%; }

/* Section spotlight (Góc của Hạnh — feel cá nhân hơn) */
.spotlight {
  background: var(--gradient-warm);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.spotlight .quote {
  font-family: var(--font-script);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--secondary-dark);
  line-height: 1.4;
}
.spotlight .img-frame {
  border-radius: var(--border-radius);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--paper);
}
@media (max-width: 768px) {
  .spotlight { grid-template-columns: 1fr; padding: 1.5rem; }
}

/* Search bar */
.searchbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 0.5rem 1rem;
  max-width: 540px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}
.searchbar input { flex: 1; border: none; outline: none; font: inherit; background: transparent; }
.searchbar button { background: var(--primary-color); color: var(--white); border: 0; border-radius: 100px; padding: 0.45rem 1.1rem; font-weight: 600; cursor: pointer; }

/* Pill tabs */
.pill-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.pill-tabs a {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  background: var(--white);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 600;
}
.pill-tabs a.active, .pill-tabs a:hover { background: var(--primary-color); color: var(--white); border-color: transparent; }

/* Profile header chips */
.user-chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.7rem; border-radius: 100px; background: var(--primary-bg); color: var(--primary-dark); font-size: 0.85rem; font-weight: 600; }
.user-chip img { width: 24px; height: 24px; border-radius: 50%; }

/* Admin layout */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--dark-color); color: var(--white); padding: 1.5rem 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side h1 { color: var(--white); font-size: 1.2rem; margin-bottom: 1rem; }
.admin-side a { display: flex; align-items: center; gap: 0.55rem; padding: 0.6rem 0.85rem; color: rgba(255,255,255,0.8); border-radius: 8px; font-size: 0.95rem; }
.admin-side a:hover, .admin-side a.active { background: rgba(255,255,255,0.08); color: var(--white); }
.admin-main { padding: 2rem; background: var(--paper); }
.admin-main h1 { font-size: 1.6rem; margin-bottom: 1.25rem; }
.admin-card { background: var(--white); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 1.25rem; margin-bottom: 1rem; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: var(--white); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 1rem 1.2rem; }
.stat .label { color: var(--text-muted); font-size: 0.85rem; }
.stat .value { font-family: var(--font-display); font-size: 1.8rem; color: var(--dark-color); }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--border-color); }
.table th { color: var(--text-muted); font-weight: 600; background: var(--paper); }
.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 100px; font-size: 0.75rem; font-weight: 600; }
.badge.published { background: var(--primary-bg); color: var(--primary-dark); }
.badge.pending   { background: #fdebd0; color: #b8651b; }
.badge.rejected  { background: #fbe3e3; color: var(--accent-color); }
.badge.draft     { background: #ece8df; color: var(--text-light); }

@media (max-width: 1024px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; display: flex; gap: 0.5rem; flex-wrap: wrap; }
  .admin-side a { padding: 0.4rem 0.8rem; }
}

/* ============================================
   Doc page (privacy / cookies / terms / about / contact)
   ============================================ */
.doc-page { max-width: 760px; margin: 0 auto; padding: 130px 1.5rem 4rem; line-height: 1.8; }
.doc-page h1 { font-family: var(--font-display); font-size: 2.4rem; margin-bottom: 0.5rem; line-height: 1.3; padding-top: 0.15em; }
.doc-page .updated { color: var(--text-muted); margin-bottom: 2rem; font-size: 0.9rem; }
.doc-page h2 { font-family: var(--font-display); font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 0.6rem; }
.doc-page h3 { font-family: var(--font-display); font-size: 1.2rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.doc-page p, .doc-page li { color: var(--text-color); margin-bottom: 0.8rem; }
.doc-page ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.doc-page ul li { list-style: disc; }
.doc-page strong { color: var(--dark-color); font-weight: 700; }
.doc-page a { color: var(--primary-color); text-decoration: underline; }
.doc-page .toc {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0 2rem;
}
.doc-page .toc ol { margin: 0; padding-left: 1.5rem; }
.doc-page .doc-callout {
  background: var(--gradient-warm);
  border-radius: var(--border-radius);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid var(--secondary-color);
}

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

/* ============================================
   RESPONSIVE — Tablet/iPad ≤1024px
   Hamburger drawer trigger
   ============================================ */
@media (max-width: 1024px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.8rem; }
  .logo-img { height: 56px; }
  .logo-tagline { font-size: 0.68rem; }

  .nav-menu {
    position: fixed;
    top: 0; right: -100%;
    width: 82%;
    max-width: 320px;
    height: 100dvh;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
    transition: right 0.3s cubic-bezier(.4,0,.2,1);
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    overflow-y: auto;
  }
  .nav-menu.open { right: 0; }
  .mobile-header-actions { display: flex; }
  .mobile-toggle { display: flex; }

  .nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-bg), #fff);
  }
  .nav-drawer-brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary-dark);
    letter-spacing: 0.05em;
  }
  .nav-drawer-close {
    background: rgba(0,0,0,0.05);
    border: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
  }
  .nav-drawer-close:hover { background: var(--secondary-color); color: #fff; transform: rotate(90deg); }

  .nav-menu a:not(.btn):not(.nav-drawer-contact) {
    width: auto;
    margin: 0 0.6rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.98rem;
    border-radius: 10px;
    color: var(--text-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.7rem;
  }
  .nav-menu a:not(.btn):not(.nav-drawer-contact):first-of-type { margin-top: 0.5rem; }
  .nav-menu a:not(.btn):not(.nav-drawer-contact) i,
  .nav-menu a:not(.btn):not(.nav-drawer-contact) svg {
    width: 18px; height: 18px;
    color: var(--primary-dark);
    flex-shrink: 0;
  }
  .nav-menu a:not(.btn):not(.nav-drawer-contact):hover,
  .nav-menu a:not(.btn):not(.nav-drawer-contact).active {
    background: var(--primary-bg);
    color: var(--primary-dark);
  }

  .nav-cta {
    margin: 0.85rem 0.6rem 0;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
  }
  .nav-cta .btn { width: 100%; justify-content: center; }

  .nav-drawer-footer {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 1rem 0.6rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
  }
  .nav-drawer-contact {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.55rem 0.85rem !important;
    background: var(--primary-bg);
    border: 1px solid rgba(162,228,0,0.35);
    border-radius: 10px;
    color: var(--primary-dark) !important;
    font-size: 0.92rem !important;
    font-weight: 700;
  }
  .nav-drawer-contact.zalo {
    background: #e6f3ff;
    color: #0068ff !important;
    border-color: rgba(0,104,255,0.25);
  }
  .nav-drawer-tagline {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    text-align: center;
    color: var(--text-light);
    font-style: italic;
  }

  .hero .container { gap: 1.5rem; align-items: center; }
  .hero h1 { font-size: 2.4rem; }
  .hero-content { max-width: 540px; }
  .hero-image-circle { width: 300px; height: 300px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   RESPONSIVE — Mobile ≤768px
   ============================================ */
@media (max-width: 768px) {
  section { padding: 1.5rem 0; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .container { padding: 0 1rem; }

  .hero { min-height: auto; padding: 5.5rem 0 2.5rem; }
  .hero .container { flex-direction: column; text-align: center; gap: 1.5rem; }
  .hero-content { max-width: 100%; }
  .hero-buttons { justify-content: center; }
  .hero h1 { font-size: 2rem; }
  .hero-image-circle { width: 200px; height: 200px; }

  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
