/*
Theme Name: CARE Vietnam
Theme URI: https://www.care.org.vn
Author: CARE Vietnam
Author URI: https://www.care.org.vn
Description: Theme WordPress chuẩn SEO, Schema đầy đủ, tối ưu tốc độ load cho CARE Việt Nam. Dựa trên template HTML clean, semantic, responsive.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: care-vietnam
Tags: blog, news, custom-menu, featured-images, threaded-comments, translation-ready, seo
*/

/* ============================================
   CARE Template - Main Stylesheet
   SEO-friendly, Responsive, Clean
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Roboto", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

ul, ol {
  list-style: none;
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
}

/* ---------- Variables ---------- */
:root {
  --care-orange: #e85d04;
  --care-orange-dark: #d14f00;
  --care-orange-light: #fff4ee;
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --border-color: #e8e8e8;
  --bg-light: #f8f8f8;
  --bg-card: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --radius: 10px;
  --radius-sm: 6px;
  --container: 1200px;
  --header-height: 72px;
  --transition: 0.25s ease;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / Nav (full width) ---------- */
.site-header {
  width: 100%;
  background: #ffffff;
  border-bottom: 3px solid var(--care-orange);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  overflow: visible;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img,
.logo-text {
  height: 36px;
  width: auto;
}

.logo-text {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--care-orange);
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--text-primary);
}

/* Nav */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: right;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--care-orange);
}

.nav-link .arrow {
  font-size: 0.7rem;
  transition: transform var(--transition);
}

.nav-item:hover .arrow,
.nav-item.open .arrow {
  transform: rotate(180deg);
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 100;
  padding: 8px 0;
}

.nav-item:hover .dropdown,
.nav-item.open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.dropdown a:hover {
  background: var(--care-orange-light);
  color: var(--care-orange);
}

/* Header right */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.lang-switch a {
  padding: 4px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.lang-switch a.active,
.lang-switch a:hover {
  color: var(--care-orange);
  background: var(--care-orange-light);
}

.search-form {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  overflow: hidden;
  background: #fff;
  transition: border-color var(--transition);
}

.search-form:focus-within {
  border-color: var(--care-orange);
}

.search-form input {
  border: none;
  outline: none;
  padding: 8px 14px;
  width: 140px;
  font-size: 0.875rem;
  background: transparent;
}

.search-form button {
  background: none;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.search-form button:hover {
  color: var(--care-orange);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ---------- Page Header / Breadcrumb ---------- */
.page-header {
  padding: 32px 0 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-header h1::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 24px;
  background: var(--care-orange);
  border-radius: 2px;
}

.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 8px 0px;
}

.breadcrumb a:hover {
  color: var(--care-orange);
}

.filters {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 8px 36px 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: var(--care-orange);
}

/* ---------- Posts Grid ---------- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}

.post-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.post-card__image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-light);
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card__image img {
  transform: scale(1.04);
}

.post-card__body {
  padding: 18px 20px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--care-orange);
  margin-bottom: 8px;
}

.post-card__category::before {
  content: "";
  width: 10px;
  height: 3px;
  background: var(--care-orange);
  border-radius: 1px;
}

.post-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.post-card__title a:hover {
  color: var(--care-orange);
}

.post-card__excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0 60px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.pagination a:hover {
  border-color: var(--care-orange);
  color: var(--care-orange);
}

.pagination .current {
  background: var(--care-orange);
  border-color: var(--care-orange);
  color: #fff;
}

/* ---------- Single Post Layout ---------- */
.single-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  margin-bottom: 60px;
  align-items: start;
}

.single-content {
  min-width: 0;
}

.single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.single-meta .category {
  color: var(--care-orange);
  font-weight: 600;
}

.single-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.single-featured {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

.single-featured img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.single-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #333;
}

.single-body p {
  margin-bottom: 1.25em;
}

.single-body h2 {
  font-size: 1.4rem;
  margin: 1.8em 0 0.6em;
  font-weight: 700;
}

.single-body h3 {
  font-size: 1.2rem;
  margin: 1.5em 0 0.5em;
  font-weight: 600;
}

.single-body ul,
.single-body ol {
  margin: 0 0 1.25em 1.5em;
  list-style: disc;
}

.single-body ol {
  list-style: decimal;
}

.single-body li {
  margin-bottom: 0.4em;
}

.single-body a {
  color: var(--care-orange);
  text-decoration: underline;
}

.single-body img {
  border-radius: var(--radius-sm);
  margin: 1.5em 0;
}

.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.single-tags a {
  padding: 5px 12px;
  background: var(--bg-light);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.single-tags a:hover {
  background: var(--care-orange-light);
  color: var(--care-orange);
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--care-orange);
  color: var(--text-primary);
}

.widget-list li {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.widget-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.widget-list a {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
}

.widget-list a:hover {
  color: var(--care-orange);
}

.widget-list .meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Related Posts */
.related-posts {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.related-posts h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ---------- Page Content (static) ---------- */
.page-content {
  max-width: 800px;
  margin: 0 auto 60px;
}

.page-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.page-content p {
  margin-bottom: 1.2em;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ---------- Search Results ---------- */
.search-header {
  margin-bottom: 28px;
}

.search-header h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.search-header .result-count {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-result-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-thumb {
  flex-shrink: 0;
  width: 160px;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-light);
}

.search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-body h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.search-result-body h2 a:hover {
  color: var(--care-orange);
}

.search-result-body .excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-body .meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ---------- 404 ---------- */
.error-404 {
  text-align: center;
  padding: 80px 20px 100px;
}

.error-404 .code {
  font-size: 6rem;
  font-weight: 800;
  color: var(--care-orange);
  line-height: 1;
  margin-bottom: 12px;
}

.error-404 h1 {
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.error-404 p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: var(--care-orange);
  color: #fff;
  font-weight: 600;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
}

.btn:hover {
  background: var(--care-orange-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--care-orange);
  color: var(--care-orange);
}

.btn-outline:hover {
  background: var(--care-orange);
  color: #fff;
}

/* ---------- Footer ---------- */
.site-footer {
  width: 100%;
  background: #1a1a1a;
  color: #ccc;
  padding: 48px 0 24px;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand .logo-text {
  color: #fff;
  margin-bottom: 12px;
  display: block;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #999;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: #999;
  margin-bottom: 8px;
}

.footer-col a:hover {
  color: var(--care-orange);
}

.footer-bottom {
  max-width: var(--container);
  margin: 32px auto 0;
  padding: 20px 20px 0;
  border-top: 1px solid #333;
  text-align: center;
  font-size: 0.8rem;
  color: #777;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .single-layout {
    grid-template-columns: 1fr 280px;
    gap: 28px;
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0 16px;
    position: relative;
  }

  /* Hamburger always visible on mobile */
  .hamburger {
    display: flex !important;
  }

  /*
   * Mobile menu: absolute under header (not fixed inside sticky)
   * to avoid containing-block bugs in some browsers
   */
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1001;
    flex: none;
    width: 100%;
    max-width: none;
    margin: 0;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    justify-content: flex-start;
  }

  .main-nav.open {
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 12px 0;
    gap: 0;
  }

  .nav-link {
    padding: 14px 20px;
    border-radius: 0;
    width: 100%;
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: var(--bg-light);
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.3s ease;
    min-width: 0;
  }

  .nav-item.open .dropdown {
    max-height: 300px;
    padding: 4px 0;
  }

  .dropdown a {
    padding-left: 36px;
  }

  .header-right .search-form {
    display: inherit;
  }

  .lang-switch {
    font-size: 0.8rem;
  }

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

  .single-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

  .search-result-item {
    flex-direction: column;
  }

  .search-result-thumb {
    width: 100%;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .single-title {
    font-size: 1.5rem;
  }

  .page-header h1 {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .header-right .lang-switch span {
    display: none;
  }
  .search-form input {
    width: 100px;
  }
}

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

.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }

/* ---------- WordPress extras ---------- */
.custom-logo-link {
  display: flex;
  align-items: center;
}
.custom-logo {
  max-height: 40px;
  width: auto;
}

.page-content,
.entry-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #333;
}
.page-content p,
.entry-content p {
  margin-bottom: 1.25em;
}
.page-content h2,
.entry-content h2 {
  font-size: 1.4rem;
  margin: 1.8em 0 0.6em;
  font-weight: 700;
}
.page-content h3,
.entry-content h3 {
  font-size: 1.2rem;
  margin: 1.5em 0 0.5em;
  font-weight: 600;
}
.page-content ul,
.page-content ol,
.entry-content ul,
.entry-content ol {
  margin: 0 0 1.25em 1.5em;
  list-style: disc;
}
.page-content ol,
.entry-content ol {
  list-style: decimal;
}
.page-content a,
.entry-content a {
  color: var(--care-orange);
  text-decoration: underline;
}
.page-content img,
.entry-content img {
  border-radius: var(--radius-sm);
  margin: 1.5em 0;
}
.page-featured {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}
.page-featured img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.recent-posts-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}
.recent-posts-list li:last-child {
  border-bottom: none;
}
.recent-posts-list a {
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
.recent-posts-list a:hover {
  color: var(--care-orange);
}
.recent-posts-list .meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.no-results {
  text-align: center;
  padding: 60px 20px;
}
.no-results h2 {
  margin-bottom: 12px;
}
.no-results p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.archive-desc {
  color: var(--text-secondary);
  margin-top: 8px;
  max-width: 640px;
}

.page-intro {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 640px;
}

/* Align post_class extra classes harmlessly */
.post-card.hentry,
.single-content.hentry {
  /* no override needed */
}

/* Footer links as block */
.footer-col a {
  display: block;
  margin-bottom: 8px;
  color: #ccc;
  font-size: 0.9rem;
}
.footer-col a:hover {
  color: #fff;
}

/* Skip link visible on focus */
.sr-only:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;
  width: auto;
  height: auto;
  padding: 12px 16px;
  margin: 0;
  overflow: visible;
  clip: auto;
  background: var(--care-orange);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
}
/* ---------- Comments ---------- */
.comments-area {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.comments-title,
.comment-reply-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.comment-list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
}

.comment-list .children {
  list-style: none;
  margin: 16px 0 0 24px;
  padding: 0;
}

.comment-body {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.comment-list > .comment:last-child > .comment-body {
  border-bottom: none;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 10px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.comment-avatar,
.comment-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-metadata {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.comment-metadata a {
  color: var(--text-muted);
}

.comment-metadata a:hover {
  color: var(--care-orange);
}

.comment-content {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.comment-content p {
  margin-bottom: 0.75em;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

.reply {
  margin-top: 8px;
}

.reply a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--care-orange);
}

.comment-awaiting-moderation {
  font-size: 0.875rem;
  color: var(--care-orange);
  margin: 6px 0 0;
}

.no-comments {
  color: var(--text-muted);
  font-style: italic;
}

.comment-form {
  margin-top: 8px;
}

.comment-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.comment-form .required {
  color: var(--care-orange);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  transition: border-color var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--care-orange);
}

.comment-form textarea {
  resize: vertical;
  min-height: 120px;
}

.comment-form p {
  margin-bottom: 16px;
}

.comment-notes {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.comment-form-cookies-consent input {
  margin-top: 3px;
  flex-shrink: 0;
}

.comment-form-cookies-consent label {
  display: inline;
  font-weight: 400;
  margin: 0;
}

.form-submit .btn,
.comment-form .submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  background: var(--care-orange);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition);
}

.form-submit .btn:hover,
.comment-form .submit:hover {
  background: var(--care-orange-dark);
}

.comment-navigation {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 24px;
  font-size: 0.9rem;
}

.comment-navigation a {
  color: var(--care-orange);
  font-weight: 500;
}
/* Name + Email: 2 cột 50% */
.comment-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}

.comment-form .comment-notes,
.comment-form .comment-form-comment,
.comment-form .comment-form-cookies-consent,
.comment-form .form-submit,
.comment-form .comment-reply-title {
  width: 100%;
  flex: 0 0 100%;
}

.comment-form-author,
.comment-form-email {
  width: calc(50% - 8px);
  flex: 0 0 calc(50% - 8px);
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .comment-form-author,
  .comment-form-email {
    width: 100%;
    flex: 0 0 100%;
  }
}

/* ========== HOME LAYOUT (hero + cards + list + trending) ========== */

.home-layout {
  padding-top: 28px;
  padding-bottom: 48px;
}

/* --- Hero --- */
.home-hero {
  margin-bottom: 28px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.home-hero__link {
  display: block;
  position: relative;
  aspect-ratio: 21 / 9;
  background: #1a1a1a;
}

.home-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-hero__img--placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #333, #111);
}

.home-hero__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 28px 32px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.25) 45%, transparent 70%);
}

.home-hero__title {
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.25;
  max-width: 820px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
  margin: 0;
}

.home-hero__link:hover .home-hero__title {
  color: #fff;
  opacity: 0.92;
}

/* --- 2 cột: main + trending --- */
.home-main-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  align-items: start;
}

/* --- 3 cards --- */
.home-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.home-card {
  display: flex;
  flex-direction: column;
}

.home-card__thumb {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-light);
  margin-bottom: 12px;
}

.home-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.home-card:hover .home-card__thumb img {
  transform: scale(1.04);
}

.home-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px;
}

.home-card__title a:hover {
  color: var(--care-orange);
}

.home-card__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* --- List items --- */
.home-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-list-item {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: center;
}

.home-list-item__thumb {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-light);
}

.home-list-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.home-list-item:hover .home-list-item__thumb img {
  transform: scale(1.03);
}

.home-list-item__kicker {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--care-orange);
  margin-bottom: 6px;
}

.home-list-item__title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
}

.home-list-item__title a:hover {
  color: var(--care-orange);
}

.home-list-item__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* --- Trending sidebar --- */
.home-trending {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: calc(var(--header-height) + 16px);
}

.home-trending__title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 14px;
}

.home-trending__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.home-trending__tab {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-light);
  color: var(--text-secondary);
  border: 1px solid transparent;
  cursor: default;
}

.home-trending__tab.is-active {
  background: #1a1a1a;
  color: #fff;
}

.home-trending__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-trending__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.home-trending__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.home-trending__item:first-child {
  padding-top: 0;
}

.home-trending__thumb {
  flex-shrink: 0;
  width: 72px;
  height: 54px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-light);
}

.home-trending__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-trending__text {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
}

.home-trending__text:hover {
  color: var(--care-orange);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .home-main-grid {
    grid-template-columns: 1fr;
  }

  .home-trending {
    position: static;
  }

  .home-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-list-item {
    grid-template-columns: 200px 1fr;
  }
}

@media (max-width: 768px) {
  .home-hero__link {
    aspect-ratio: 16 / 10;
  }

  .home-hero__overlay {
    padding: 20px;
  }

  .home-cards {
    grid-template-columns: 1fr;
  }

  .home-list-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.home-layout {
  padding-top: 28px;
  padding-bottom: 48px;
}

/* Grid 2 cột ngay từ đầu: main | trending */
.home-main-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  align-items: start;
}

/* Hero chỉ rộng bằng cột list */
.home-hero {
  margin-bottom: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.home-hero--compact .home-hero__link,
.home-hero__link {
  display: block;
  position: relative;
  aspect-ratio: 16 / 7; /* gọn hơn 21/9 */
  background: #1a1a1a;
}

.home-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-hero__img--placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #333, #111);
}

.home-hero__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 18px 22px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.25) 45%, transparent 70%);
}

.home-hero__title {
  color: #fff;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.25;
  max-width: 100%;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
  margin: 0;
}

.home-trending {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: calc(var(--header-height) + 16px);
}

@media (max-width: 1024px) {
  .home-main-grid {
    grid-template-columns: 1fr;
  }
  .home-trending {
    position: static;
    order: -1; /* trending lên trên hero khi mobile nếu muốn; xóa dòng này nếu muốn trending dưới */
  }
}

@media (max-width: 768px) {
  .home-hero__link,
  .home-hero--compact .home-hero__link {
    aspect-ratio: 16 / 9;
  }
}
.home-list-item__excerpt {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Hover giống post-card trên archive */
.home-list-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  /* nếu muốn padding nhẹ quanh item */
  /* padding: 12px; */
  transition: box-shadow var(--transition), transform var(--transition);
}

.home-list-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Card 3 cột trang chủ (nếu muốn đồng bộ) */
.home-card {
  transition: box-shadow var(--transition), transform var(--transition);
}

.home-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}