/* ============================================================
   AUTOSHOP — css/single-post.css
   Single post: Wanderland-layout
   Hero banner → Featured image → Post header → Content+Sidebar → Related
   ============================================================ */

/* ============================================================
   1. MAIN
   ============================================================ */
.au-single-main {
  background: #fff;
}

/* ============================================================
   2. BLOG HERO BANNER (fixed height, header floats above)
   ============================================================ */
.au-blog-hero {
  position: relative;
  width: 100%;
  height: 400px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--color-dark, #1a1a1a);
  overflow: hidden;
}

.au-blog-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

.au-blog-hero__inner {
  position: absolute;
  bottom: var(--au-page-hero-pad-bottom);
  left: 0;
  z-index: 2;
  width: 100%;
}

.au-blog-hero__label {
  font-family: var(--font-heading, sans-serif);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

@media (max-width: 768px) {
  .au-blog-hero {
    height: 260px;
  }
  .au-blog-hero__inner {
    bottom: 24px;
  }
  .au-blog-hero__label {
    font-size: 28px;
  }
}

/* ============================================================
   3. FEATURED IMAGE (contained, below hero)
   ============================================================ */
.au-single-featured-wrap {
  background: #fff;
  padding-top: var(--au-gap-xl);
}

.au-single-featured-inner {
  position: relative;
  overflow: hidden;
}

.au-single-featured-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  object-position: center;
}

.au-single-cat-badge {
  position: absolute;
  top: 16px;
  left: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-dark, #1a1a1a);
  font-family: var(--font-sub, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 7px 14px;
  transition:
    background var(--transition-fast, 0.15s),
    color var(--transition-fast, 0.15s);
}

.au-single-cat-badge i {
  font-size: 9px;
}

.au-single-cat-badge:hover {
  background: var(--color-red, #eb0a1e);
  color: #fff;
}

@media (max-width: 768px) {
  .au-single-featured-wrap {
    padding-top: var(--au-gap-lg);
  }
  .au-single-featured-img {
    max-height: 280px;
  }
}

/* ============================================================
   4. POST HEADER
   ============================================================ */
.au-single-header-wrap {
  background: #fff;
  border-bottom: 1px solid var(--color-border, #e4e4e4);
  --au-page-hero-pad-top: 36px;
  --au-page-hero-pad-bottom: 36px;
}

.au-single-header {
  max-width: 760px;
}

/* Author + Date row */
.au-single-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: var(--au-gap-sm) 0 var(--au-gap-md);
  flex-wrap: wrap;
}

.au-single-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.au-single-author-name {
  font-family: var(--font-sub, sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-dark, #1a1a1a);
  text-decoration: none;
  transition: color var(--transition-fast, 0.15s);
}

.au-single-author-name:hover {
  color: var(--color-red, #eb0a1e);
}

.au-single-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ccc;
  flex-shrink: 0;
  display: inline-block;
}

.au-single-date {
  font-family: var(--font-body, sans-serif);
  font-size: 12px;
  font-weight: 400;
  font-style: italic;
  color: #999;
}

.au-single-readtime {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body, sans-serif);
  font-size: 12px;
  color: #999;
  font-style: italic;
}

.au-single-readtime i {
  font-size: 11px;
  color: var(--color-red, #eb0a1e);
}

/* Post title */
.au-single-title {
  font-family: var(--font-heading, sans-serif);
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--color-dark, #1a1a1a);
  margin: 0;
}

@media (max-width: 768px) {
  .au-single-header-wrap {
    --au-page-hero-pad-top: 24px;
    --au-page-hero-pad-bottom: 24px;
  }
  .au-single-title {
    font-size: 22px;
  }
}

/* ============================================================
   5. MAIN LAYOUT (content + sidebar)
   ============================================================ */
.au-single-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0 60px;
  padding: 48px 0 80px;
  align-items: start;
}

.au-single-content {
  min-width: 0;
}

/* ============================================================
   6. TABLE OF CONTENTS
   ============================================================ */
.au-toc {
  margin-bottom: 36px;
  border: 1px solid var(--color-border, #e4e4e4);
  background: #fafafa;
}

.au-toc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--color-border, #e4e4e4);
  cursor: pointer;
  user-select: none;
}

.au-toc__label {
  font-family: var(--font-sub, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-dark, #1a1a1a);
}

.au-toc__toggle {
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast, 0.15s);
  flex-shrink: 0;
}

.au-toc__toggle:hover {
  color: var(--color-red, #eb0a1e);
}

.au-toc__arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
  display: block;
}

.au-toc.is-collapsed .au-toc__arrow {
  transform: rotate(180deg);
}

.au-toc__body {
  overflow: hidden;
  max-height: 600px;
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease;
  opacity: 1;
}

.au-toc.is-collapsed .au-toc__body {
  max-height: 0;
  opacity: 0;
}

.au-toc__list {
  list-style: none;
  margin: 0;
  padding: 14px 18px 18px;
  counter-reset: toc-counter;
}

.au-toc__list li {
  counter-increment: toc-counter;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.au-toc__list li:last-child {
  border-bottom: none;
}

.au-toc__list li::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-family: var(--font-sub, sans-serif);
  font-size: 10px;
  font-weight: 700;
  color: var(--color-red, #eb0a1e);
  flex-shrink: 0;
  line-height: 1.6;
}

.au-toc__list li a {
  font-family: var(--font-body, sans-serif);
  font-size: 13px;
  color: var(--color-dark, #1a1a1a);
  text-decoration: none;
  line-height: 1.55;
  transition: color var(--transition-fast, 0.15s);
}

.au-toc__list li a:hover,
.au-toc__list li.is-active a {
  color: var(--color-red, #eb0a1e);
}

.au-toc__list li.au-toc-h3 {
  padding-left: 18px;
}

.au-toc__list li.au-toc-h3 a {
  font-size: 12px;
  color: #777;
}

/* ============================================================
   7. POST CONTENT TYPOGRAPHY
   ============================================================ */
.au-post-content {
  font-family: var(--font-body, sans-serif);
  font-size: 15px;
  color: #444;
  line-height: 1.82;
}

.au-post-content p {
  margin-bottom: 22px;
}

.au-post-content h2,
.au-post-content h3,
.au-post-content h4 {
  font-family: var(--font-sub, sans-serif);
  color: var(--color-dark, #1a1a1a);
  font-weight: 700;
  margin: 36px 0 14px;
  line-height: 1.25;
}

.au-post-content h2 {
  font-size: clamp(18px, 2vw, 24px);
}
.au-post-content h3 {
  font-size: clamp(16px, 1.7vw, 20px);
}
.au-post-content h4 {
  font-size: 16px;
}

.au-post-content blockquote {
  margin: 32px 0;
  padding: 20px 28px;
  border-left: 3px solid var(--color-red, #eb0a1e);
  background: #fafafa;
  border-radius: 0 4px 4px 0;
  font-style: italic;
  color: #666;
}

.au-post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 28px 0;
  border-radius: 2px;
}

.au-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}

.au-post-content table th,
.au-post-content table td {
  border: 1px solid #ddd;
  padding: 9px 14px;
  text-align: left;
  vertical-align: middle;
  line-height: 1.5;
}

.au-post-content table th {
  background: #f5f5f5;
  font-weight: 700;
  color: var(--color-dark, #1a1a1a);
}

.au-post-content table tr:nth-child(even) td {
  background: #fafafa;
}

.au-post-content ul,
.au-post-content ol {
  padding-left: 26px;
  margin-bottom: 22px;
}

.au-post-content li {
  margin-bottom: 7px;
  line-height: 1.7;
}

.au-post-content a {
  color: var(--color-red, #eb0a1e);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.au-post-content a:hover {
  color: var(--color-red-dark, #b80015);
}

/* ============================================================
   8. POST FOOTER (tags + share)
   ============================================================ */
.au-single-footer {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border, #e4e4e4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.au-post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #888;
}

.au-post-tags > i {
  font-size: 13px;
  color: var(--color-red, #eb0a1e);
}

.au-post-tag {
  display: inline-flex;
  padding: 4px 11px;
  background: #f3f3f3;
  border: 1px solid #e4e4e4;
  font-family: var(--font-sub, sans-serif);
  font-size: 10px;
  font-weight: 600;
  color: #666;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 2px;
  transition:
    background var(--transition-fast, 0.15s),
    color var(--transition-fast, 0.15s),
    border-color var(--transition-fast, 0.15s);
}

.au-post-tag:hover {
  background: var(--color-red, #eb0a1e);
  border-color: var(--color-red, #eb0a1e);
  color: #fff;
}

/* Share */
.au-single-share {
  display: flex;
  align-items: center;
  gap: 12px;
}

.au-share-label {
  font-family: var(--font-sub, sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aaa;
}

.au-share-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.au-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #555;
  font-size: 14px;
  text-decoration: none;
  transition:
    background var(--transition-fast, 0.15s),
    color var(--transition-fast, 0.15s),
    transform var(--transition-fast, 0.15s);
}

.au-share-btn:hover {
  transform: translateY(-2px);
}

.au-share-btn--fb:hover {
  background: #1877f2;
  color: #fff;
}

.au-share-btn--zalo {
  font-family: var(--font-sub, sans-serif);
  font-size: 13px;
  font-weight: 800;
  color: #0068ff;
}

.au-share-btn--zalo:hover {
  background: #0068ff;
  color: #fff;
}

/* ============================================================
   9. PREV / NEXT NAVIGATION
   ============================================================ */
.au-post-nav {
  margin-top: 44px;
  border-top: 1px solid var(--color-border, #e4e4e4);
  border-bottom: 1px solid var(--color-border, #e4e4e4);
}

.au-post-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 1px;
  background: var(--color-border, #e4e4e4);
}

.au-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: #fff;
  text-decoration: none;
  flex: 1;
  transition: background var(--transition-fast, 0.15s);
}

.au-nav-item:hover {
  background: #fefafa;
}

.au-nav-next {
  justify-content: flex-end;
}

.au-nav-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 48px;
  overflow: hidden;
}

.au-nav-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.au-nav-item:hover .au-nav-thumb img {
  transform: scale(1.06);
}

.au-nav-arrow {
  display: flex;
  align-items: center;
  color: var(--color-red, #eb0a1e);
  font-size: 18px;
  flex-shrink: 0;
}

.au-nav-label {
  font-family: var(--font-sub, sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-dark, #1a1a1a);
  white-space: nowrap;
}

/* ============================================================
   10. AUTHOR BOX
   ============================================================ */
.au-author-box {
  margin-top: 44px;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--color-border, #e4e4e4);
  background: #fafafa;
  overflow: hidden;
}

.au-author-box__img {
  flex-shrink: 0;
  width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #fff;
  border-right: 1px solid var(--color-border, #e4e4e4);
}

.au-author-box__avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.au-author-box__content {
  flex: 1;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.au-author-box__name {
  font-family: var(--font-sub, sans-serif);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

.au-author-box__name a {
  color: var(--color-dark, #1a1a1a);
  text-decoration: none;
  transition: color var(--transition-fast, 0.15s);
}

.au-author-box__name a:hover {
  color: var(--color-red, #eb0a1e);
}

.au-author-box__bio {
  font-family: var(--font-body, sans-serif);
  font-size: 13px;
  color: #777;
  line-height: 1.7;
  margin: 0;
}

@media (max-width: 768px) {
  .au-author-box {
    flex-direction: column;
  }
  .au-author-box__img {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-border, #e4e4e4);
    padding: 20px;
  }
}

/* ============================================================
   11. COMMENTS
   ============================================================ */
.au-comments-wrap {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border, #e4e4e4);
}

.au-comments-wrap .comments-title {
  font-family: var(--font-sub, sans-serif);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-dark, #1a1a1a);
  margin: 0 0 28px;
}

/* Comment form inputs */
.au-comments-wrap #respond input[type="text"],
.au-comments-wrap #respond input[type="email"],
.au-comments-wrap #respond input[type="url"],
.au-comments-wrap #respond textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-body, sans-serif);
  font-size: 14px;
  color: var(--color-dark, #1a1a1a);
  background: #fff;
  border: 1px solid var(--color-border, #e4e4e4);
  outline: none;
  transition: border-color var(--transition-fast, 0.15s);
  box-sizing: border-box;
  margin-bottom: 12px;
  border-radius: 2px;
}

.au-comments-wrap #respond input:focus,
.au-comments-wrap #respond textarea:focus {
  border-color: var(--color-red, #eb0a1e);
}

.au-comments-wrap #respond textarea {
  min-height: 140px;
  resize: vertical;
}

.au-comments-wrap #respond input[type="submit"] {
  padding: 12px 30px;
  font-family: var(--font-sub, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--color-dark, #1a1a1a);
  border: none;
  cursor: pointer;
  transition:
    background var(--transition-fast, 0.15s),
    transform var(--transition-fast, 0.15s);
}

.au-comments-wrap #respond input[type="submit"]:hover {
  background: var(--color-red, #eb0a1e);
  transform: translateY(-1px);
}

/* ============================================================
   12. SIDEBAR
   ============================================================ */
.au-single-sidebar {
  position: sticky;
  top: calc(var(--au-header-height, 72px) + 20px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* sidebar card, catlist, recent, cta → defined in blog.css (shared) */

/* ============================================================
   13. RELATED POSTS SECTION (outside container)
   ============================================================ */
.au-related-section {
  background: #fafafa;
  padding: 64px 0 72px;
  border-top: 1px solid var(--color-border, #e4e4e4);
}

.au-related-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.au-related-title {
  font-family: var(--font-sub, sans-serif);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-dark, #1a1a1a);
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.au-related-title-accent {
  color: var(--color-red, #eb0a1e);
  margin-left: 8px;
}

.au-related-line {
  flex: 1;
  height: 1px;
  background: var(--color-border, #e4e4e4);
}

/* Related grid: tái sử dụng .au-arc-card */
.au-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.au-related-card {
  background: #fff;
}

/* ============================================================
   14. RESPONSIVE — Single
   ============================================================ */
@media (max-width: 1024px) {
  .au-single-layout {
    grid-template-columns: 1fr 260px;
    gap: 0 40px;
  }
  .au-related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .au-single-layout {
    grid-template-columns: 1fr;
    padding: 32px 0 48px;
    gap: 40px 0;
  }
  .au-single-sidebar {
    position: static;
    border-top: 1px solid var(--color-border, #e4e4e4);
    padding-top: 36px;
  }
  .au-post-nav__inner {
    background: transparent;
    gap: 0;
  }
  .au-nav-label {
    display: none;
  }
  .au-single-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .au-related-section {
    padding: 44px 0 52px;
  }
  .au-related-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .au-related-header {
    margin-bottom: 28px;
  }
}

@media (max-width: 480px) {
  .au-single-title {
    font-size: 20px;
  }
  .au-nav-thumb {
    display: none;
  }
}
