/* ==========================================================
   POST.CSS — Dùng riêng cho trang danh sách bài viết & chi tiết
   (Không load ở home.html — tránh ảnh hưởng trang khác)
   Palette: --brand #055360 | --accent #FF5E14
   ========================================================== */

/* ==========================================================
   [1] BREADCRUMB
   ========================================================== */
.post-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .85rem;
  color: rgba(255, 255, 255, .7);
}
.post-breadcrumb a {
  color: rgba(255, 255, 255, .85);
  transition: color .2s ease;
}
.post-breadcrumb a:hover { color: #fff; }
.post-breadcrumb svg { flex-shrink: 0; opacity: .6; }
.post-breadcrumb span.current {
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

/* ==========================================================
   [2] PAGE HERO
   ========================================================== */
.post-hero {
  position: relative;
  overflow: hidden;
  padding: 3rem 0;
  background:
    radial-gradient(900px 400px at 85% -20%, rgba(255, 94, 20, .20), transparent 60%),
    linear-gradient(135deg, #055360 0%, #044650 55%, #022A31 100%);
}
.post-hero--small { padding: 1.75rem 0; }
@media (min-width: 768px) {
  .post-hero { padding: 4rem 0; }
  .post-hero--small { padding: 2.25rem 0; }
}
.post-hero::after {
  content: "";
  position: absolute;
  right: -80px; bottom: -120px;
  width: 340px; height: 340px;
  border-radius: 9999px;
  background: rgba(255, 94, 20, .12);
  filter: blur(50px);
  pointer-events: none;
}
.post-hero__title {
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.post-hero__desc {
  color: rgba(255, 255, 255, .8);
  line-height: 1.65;
}

/* ==========================================================
   [3] POST CARD (dùng cho grid list + related)
   ========================================================== */
.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #E7EDEF;
  box-shadow: 0 4px 18px -12px rgba(5, 83, 96, .4);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 40px -24px rgba(5, 83, 96, .55);
  border-color: #C9E3E6;
}
.post-card__img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #E9F4F5;
  display: block;
}
.post-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
  display: block;
}
.post-card:hover .post-card__img img { transform: scale(1.07); }
.post-card__category {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--accent, #FF5E14);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .3rem .7rem;
  border-radius: 9999px;
  box-shadow: 0 8px 16px -8px rgba(255, 94, 20, .9);
}
.post-card__body {
  padding: 1.25rem 1.35rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  font-size: .76rem;
  color: #94a3b8;
  margin-bottom: .6rem;
}
.post-card__meta svg { width: 14px; height: 14px; }
.post-card__title {
  font-weight: 800;
  color: var(--brand-deep, #022A31);
  font-size: 1rem;
  line-height: 1.4;
  transition: color .2s ease;
}
.post-card__title a { color: inherit; }
.post-card:hover .post-card__title { color: var(--brand, #055360); }
.post-card__excerpt {
  margin-top: .55rem;
  font-size: .86rem;
  color: #64748b;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card__link {
  margin-top: auto;
  padding-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--accent, #FF5E14);
  transition: gap .2s ease;
}
.post-card__link svg {
  width: 15px; height: 15px;
  transition: transform .2s ease;
}
.post-card:hover .post-card__link { gap: .6rem; }
.post-card:hover .post-card__link svg { transform: translateX(3px); }

/* ==========================================================
   [4] POST DETAIL
   ========================================================== */
.post-detail-category {
  display: inline-block;
  background: var(--accent, #FF5E14);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .35rem .85rem;
  border-radius: 9999px;
  margin-bottom: .85rem;
}
.post-detail-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--brand-deep, #022A31);
  line-height: 1.25;
  letter-spacing: -.02em;
}
@media (min-width: 768px) {
  .post-detail-title { font-size: 2.15rem; }
}

.post-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: .85rem;
  color: #64748b;
  padding: 1rem 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  margin: 1.25rem 0;
}
.post-detail-meta__item {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.post-detail-meta__item svg {
  width: 15px; height: 15px;
  color: var(--accent, #FF5E14);
}

.post-featured-img {
  display: block;
  width: 100%;
  border-radius: 16px;
  margin: 1.25rem 0;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  box-shadow: 0 12px 28px -20px rgba(5, 83, 96, .5);
}

/* --- Typography nội dung bài viết --- */
.post-content {
  color: #334155;
  font-size: 1rem;
  line-height: 1.75;
}
@media (min-width: 768px) {
  .post-content { font-size: 1.05rem; }
}
.post-content > * + * { margin-top: 1.15rem; }
.post-content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand-deep, #022A31);
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: .75rem;
  padding-left: .85rem;
  border-left: 4px solid var(--accent, #FF5E14);
}
.post-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-deep, #022A31);
  line-height: 1.4;
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}
.post-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-deep, #022A31);
  margin-top: 1.25rem;
  margin-bottom: .4rem;
}
.post-content p { margin-bottom: .95rem; }
.post-content a {
  color: var(--brand, #055360);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s ease;
}
.post-content a:hover { color: var(--accent, #FF5E14); }
.post-content strong {
  color: var(--brand-deep, #022A31);
  font-weight: 700;
}
.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: .4rem; }
.post-content li::marker { color: var(--accent, #FF5E14); }
.post-content blockquote {
  position: relative;
  background: #E9F4F5;
  border-left: 4px solid var(--brand, #055360);
  padding: 1.1rem 1.25rem 1.1rem 1.5rem;
  border-radius: 0 12px 12px 0;
  color: var(--brand-deep, #022A31);
  font-style: italic;
  margin: 1.5rem 0;
}
.post-content blockquote::before {
  content: "\201C";
  position: absolute;
  top: -.5rem; left: .5rem;
  font-size: 3rem;
  color: var(--brand, #055360);
  opacity: .2;
  font-family: Georgia, serif;
  line-height: 1;
}
.post-content img {
  width: 100%;
  border-radius: 12px;
  margin: 1.25rem 0;
}
.post-content figure { margin: 1.5rem 0; }
.post-content figure img { margin: 0; }
.post-content figcaption {
  text-align: center;
  font-size: .82rem;
  color: #94a3b8;
  margin-top: .5rem;
  font-style: italic;
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .92rem;
  border-radius: 10px;
  overflow: hidden;
}
.post-content table th,
.post-content table td {
  padding: .7rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}
.post-content table th {
  background: var(--brand, #055360);
  color: #fff;
  font-weight: 700;
}
.post-content table tr:nth-child(even) td { background: #f8fafb; }

/* --- Tags --- */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding: 1.25rem 0;
  border-top: 1px solid #e2e8f0;
  margin-top: 1.5rem;
}
.post-tags__label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--brand-deep, #022A31);
  margin-right: .25rem;
}
.post-tag {
  display: inline-block;
  padding: .35rem .85rem;
  font-size: .78rem;
  font-weight: 600;
  background: #E9F4F5;
  color: var(--brand, #055360);
  border-radius: 9999px;
  transition: all .2s ease;
}
.post-tag:hover {
  background: var(--accent, #FF5E14);
  color: #fff;
}

/* --- Share --- */
.post-share {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-top: 1px solid #e2e8f0;
  margin-top: .5rem;
}
.post-share__label {
  font-size: .85rem;
  font-weight: 700;
  color: var(--brand-deep, #022A31);
  margin-right: .25rem;
}
.post-share__btn {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: #475569;
  transition: all .2s ease;
  cursor: pointer;
}
.post-share__btn:hover {
  background: var(--brand, #055360);
  color: #fff;
  transform: translateY(-2px);
}
.post-share__btn--fb:hover { background: #1877f2; }
.post-share__btn--zalo:hover { background: #0068ff; }
.post-share__btn--copy:hover { background: var(--accent, #FF5E14); }

/* --- Author box --- */
.post-author {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: #f8fafb;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  margin-top: 1.5rem;
}
.post-author__avatar {
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .15);
}
.post-author__name {
  font-weight: 800;
  color: var(--brand-deep, #022A31);
  font-size: .95rem;
}
.post-author__role {
  font-size: .78rem;
  color: var(--accent, #FF5E14);
  font-weight: 600;
  margin-top: .15rem;
}
.post-author__bio {
  font-size: .85rem;
  color: #64748b;
  line-height: 1.6;
  margin-top: .4rem;
}

/* ==========================================================
   [5] SIDEBAR WIDGETS (dùng chung cho cả 2 trang)
   ========================================================== */
.sidebar-widget {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 1.35rem;
  box-shadow: 0 4px 18px -12px rgba(5, 83, 96, .3);
}
.sidebar-widget + .sidebar-widget { margin-top: 1.25rem; }
.sidebar-widget__title {
  font-size: .92rem;
  font-weight: 800;
  color: var(--brand-deep, #022A31);
  text-transform: uppercase;
  letter-spacing: .06em;
  position: relative;
  padding-bottom: .6rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
}
.sidebar-widget__title::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 44px; height: 2px;
  background: var(--accent, #FF5E14);
}

/* Search */
.sidebar-search { position: relative; }
.sidebar-search input {
  width: 100%;
  padding: .75rem 2.6rem .75rem 1rem;
  border: 1px solid #dce5e8;
  border-radius: 12px;
  font-size: .9rem;
  outline: none;
  transition: all .2s ease;
}
.sidebar-search input:focus {
  border-color: var(--brand, #055360);
  box-shadow: 0 0 0 4px rgba(5, 83, 96, .12);
}
.sidebar-search button {
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--brand, #055360);
  color: #fff;
  display: grid;
  place-items: center;
  transition: background .2s ease;
}
.sidebar-search button:hover { background: var(--accent, #FF5E14); }

/* Categories */
.category-list { list-style: none; }
.category-list li + li { border-top: 1px solid #f1f5f9; }
.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .65rem 0;
  font-size: .9rem;
  font-weight: 600;
  color: #475569;
  transition: color .2s ease;
}
.category-list a:hover { color: var(--accent, #FF5E14); }
.category-list a .count {
  font-size: .76rem;
  color: #94a3b8;
  background: #f1f5f9;
  padding: .15rem .55rem;
  border-radius: 9999px;
  font-weight: 700;
}

/* Recent posts */
.recent-post {
  display: flex;
  gap: .85rem;
  padding: .6rem 0;
}
.recent-post + .recent-post {
  border-top: 1px solid #f1f5f9;
  padding-top: .85rem;
}
.recent-post__img {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #E9F4F5;
}
.recent-post__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.recent-post:hover .recent-post__img img { transform: scale(1.1); }
.recent-post__title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--brand-deep, #022A31);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s ease;
}
.recent-post:hover .recent-post__title { color: var(--accent, #FF5E14); }
.recent-post__date {
  font-size: .74rem;
  color: #94a3b8;
  margin-top: .3rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.recent-post__date svg { width: 12px; height: 12px; }

/* Sidebar CTA */
.sidebar-cta {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(400px 200px at 100% 0%, rgba(255, 255, 255, .15), transparent 60%),
    linear-gradient(135deg, var(--accent, #FF5E14) 0%, #E94C05 100%);
  border-radius: 16px;
  padding: 1.5rem 1.35rem;
  color: #fff;
  text-align: center;
  margin-top: 1.25rem;
}
.sidebar-cta__title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
}
.sidebar-cta__desc {
  font-size: .82rem;
  margin-top: .5rem;
  color: rgba(255, 255, 255, .9);
  line-height: 1.55;
}
.sidebar-cta__phone {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  background: #fff;
  color: var(--accent, #FF5E14);
  font-weight: 800;
  font-size: .95rem;
  padding: .7rem 1.1rem;
  border-radius: 9999px;
  transition: transform .2s ease;
}
.sidebar-cta__phone:hover { transform: translateY(-2px); }

/* ==========================================================
   [6] PAGINATION
   ========================================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}
.pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 .75rem;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 700;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: all .2s ease;
}
.pagination__link:hover {
  background: var(--brand, #055360);
  color: #fff;
  border-color: var(--brand, #055360);
}
.pagination__link--active {
  background: var(--brand, #055360);
  color: #fff;
  border-color: var(--brand, #055360);
  pointer-events: none;
}
.pagination__link--dots {
  pointer-events: none;
  background: transparent;
  border: none;
}

/* ==========================================================
   [7] RELATED POSTS HEADING
   ========================================================== */
.related-heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-deep, #022A31);
  display: flex;
  align-items: center;
  gap: .65rem;
  padding-bottom: .75rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e2e8f0;
  position: relative;
}
.related-heading::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 60px; height: 2px;
  background: var(--accent, #FF5E14);
}

/* ==========================================================
   [8] FILTER BAR (trang danh sách)
   ========================================================== */
.post-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 1rem;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 18px -12px rgba(5, 83, 96, .3);
}
.post-filter__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.post-filter__tab {
  padding: .5rem .9rem;
  font-size: .82rem;
  font-weight: 700;
  color: #475569;
  background: transparent;
  border-radius: 9999px;
  transition: all .2s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.post-filter__tab:hover {
  color: var(--brand, #055360);
  background: #E9F4F5;
}
.post-filter__tab--active,
.post-filter__tab--active:hover {
  background: var(--brand, #055360);
  color: #fff;
}
.post-filter__select {
  padding: .5rem 2rem .5rem .85rem;
  font-size: .82rem;
  font-weight: 600;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .6rem center;
  transition: all .2s ease;
}
.post-filter__select:focus { border-color: var(--brand, #055360); }

/* ==========================================================
   [9] POST GRID
   ========================================================== */
.post-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================
   [10] RESPONSIVE
   ========================================================== */
@media (max-width: 640px) {
  .post-detail-title { font-size: 1.5rem; }
  .post-content h2 { font-size: 1.2rem; }
  .post-content h3 { font-size: 1.05rem; }
  .post-author {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .post-author__avatar { margin: 0 auto; }
  .post-breadcrumb span.current { max-width: 180px; }
}