/* POST HERO */
.post-hero {
  position: relative;
  height: 50vh;
  min-height: 380px;
  padding-top: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  overflow: hidden;
}
.post-hero .hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  filter: brightness(0.3);
}
.post-hero .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.post-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  max-width: 800px;
  padding: 0 20px;
}
.post-hero-content .breadcrumb-nav {
  font-size: 13px;
  margin-bottom: 18px;
}
.post-hero-content .breadcrumb-nav #breadcrumbs {
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}
.post-hero-content .breadcrumb-nav #breadcrumbs a {
  color: var(--primary);
  text-decoration: none;
}
.post-hero-content .breadcrumb-nav #breadcrumbs a:hover {
  text-decoration: underline;
}
.post-hero-content .breadcrumb-nav #breadcrumbs .breadcrumb_last {
  color: rgba(255, 255, 255, 0.8);
}
.post-hero-content a.post-category {
  display: inline-block;
  background: var(--primary);
  color: var(--dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 5px 14px;
  border-radius: 20px;
  /*            margin-bottom: 18px;*/
}
.post-hero-content a.post-category:hover {
  opacity: 0.85;
}
.post-hero-content h1 {
  font-family: "Montserrat", sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 15px;
}
.post-hero-content .post-meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.post-hero-content .post-meta i {
  color: var(--primary);
  margin-right: 5px;
}

/* POST LAYOUT: TOC + Content */
.post-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 50px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 20px;
}
.post-layout.no-toc {
    grid-template-columns: 1fr;
    max-width: 800px;
}

/* TOC Sidebar */
.toc-wrapper {
  position: sticky;
  top: 100px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.toc-box {
  background: var(--dark);
  border-radius: 12px;
  padding: 25px;
}
.toc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.toc-header i {
  color: var(--primary);
  font-size: 16px;
}
.toc-header span {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-list li {
  margin-bottom: 8px;
}
.toc-list li a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all 0.3s;
}
.toc-list li a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.toc-list li a.active {
  color: var(--primary);
  border-left-color: var(--primary);
  background: rgba(240, 165, 0, 0.08);
}
.toc-list li a .toc-number {
  color: var(--primary);
  font-weight: 700;
  min-width: 18px;
}

/* POST CONTENT */
.post-content {
  max-width: 720px;
}
.post-content h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 45px;
  margin-bottom: 18px;
  color: var(--text-dark);
  padding-top: 15px;
}
.post-content h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 30px;
  margin-bottom: 12px;
  color: var(--text-dark);
}
.post-content p {
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--text);
  margin-bottom: 18px;
}
.post-content img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 25px 0;
}
.post-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 20px 25px;
  margin: 30px 0;
  background: var(--gray);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-dark);
}
.post-content ul,
.post-content ol {
  margin: 18px 0;
  padding-left: 25px;
}
.post-content li {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 8px;
}
.post-content strong {
  color: var(--text-dark);
  font-weight: 600;
}
.post-content a {
  color: var(--primary);
  text-decoration: underline;
}

/* Info Box */
.info-box {
  background: linear-gradient(
    135deg,
    rgba(240, 165, 0, 0.08),
    rgba(240, 165, 0, 0.03)
  );
  border: 1px solid rgba(240, 165, 0, 0.2);
  border-radius: 12px;
  padding: 25px;
  margin: 25px 0;
}
.info-box h4 {
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
.info-box ul {
  margin: 0;
  padding-left: 20px;
}
.info-box li {
  font-size: 14px;
  margin-bottom: 6px;
}

/* POST TAGS */
.post-tags {
  margin-top: 45px;
  padding-top: 25px;
  border-top: 1px solid var(--border);
}
.post-tags-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
}
.post-tags a {
  display: inline-block;
  background: var(--gray);
  color: var(--text);
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  margin: 4px;
  text-decoration: none;
  transition: all 0.3s;
}
.post-tags a:hover {
  background: var(--primary);
  color: var(--dark);
}

/* SHARE */
.post-share {
  margin-top: 25px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.post-share span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}
.post-share a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray);
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s;
}
.post-share a:hover {
  background: var(--primary);
  color: var(--dark);
}
/* SHARE */
.post-share {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.post-share label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dark);
}
.post-share a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  color: var(--text-dark);
  transition: 0.3s;
}
.post-share a:hover {
  background: var(--red);
  color: var(--white);
}
/*social-icons*/
.social-icons a {
  display: inline-block;
  margin-right: 3px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff !important;
  font-size: 14px;
  line-height: 30px;
  text-align: center;
}
.social-icons span {
  margin-right: 5px;
}
.social-icons a.face {
  background: #3a589d;
}
.social-icons a.instagram {
  background: #e80c26;
}
.social-icons a.twitter {
  background: #2478ba;
}
.social-icons a.gooogle {
  background: #dd4e31;
}
.social-icons a.email {
  background: #111;
}
.social-icons a.linkedin {
  background: #0072b7;
}
/*.social-icons{
            margin: 20px 0 0;
        }*/
/*End social-icons*/

/* AUTHOR BOX */
.author-box {
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--gray);
  border-radius: 12px;
  padding: 25px;
  margin-top: 35px;
}
.author-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
}
.author-info h4 {
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 5px;
}
.author-info p {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

/* RELATED POSTS */
.related-posts {
  background: var(--gray);
  padding: 70px 0;
}
.related-posts h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-dark);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.related-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.4s;
  text-decoration: none;
  color: inherit;
}
.related-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
}
.related-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.related-card-body {
  padding: 20px;
}
.related-card-body .card-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.related-card-body h4 {
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text-dark);
}
.related-card-body .card-date {
  font-size: 12px;
  color: var(--text);
}

/* RESPONSIVE */
@media (max-width: 968px) {
  .post-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .toc-wrapper {
    position: relative;
    top: 0;
    max-height: none;
  }
  .toc-box {
    border-radius: 10px;
  }
  .post-hero-content h1 {
    font-size: 2rem;
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 576px) {
  .post-hero {
    height: auto;
    min-height: 300px;
    padding: 120px 0 50px;
  }
  .post-hero-content h1 {
    font-size: 1.5rem;
  }
  .post-content h2 {
    font-size: 1.3rem;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .author-box {
    flex-direction: column;
    text-align: center;
  }
}

/* === Fix video portrait responsive (v2) === */

/* Container co theo viewport */
.wp-video {
    max-width: 100% !important;
    width: 100% !important;
}

/* Player giữ tỷ lệ 9:16 thay vì height cố định */
.mejs-container {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 9 / 16 !important;
    overflow: hidden !important;
}

/* Video element lấp đầy container */
.mejs-container video,
.wp-video video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* Overlay và controls layer theo container */
.mejs-overlay,
.mejs-layer,
.mejs-mediaelement {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
}

/* Giới hạn chiều cao tối đa trên mobile */
@media (max-width: 768px) {
    .mejs-container {
        max-height: 70vh !important;
    }
}

/* Đảm bảo bài viết không bị tràn */
article.post-content,
.entry-content {
    overflow: hidden;
}
