/* Phase 3 dynamic content */
.post-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e8edf3;
  overflow: hidden;
  transition: box-shadow .3s, transform .3s;
  position: relative;
}

.post-card:hover {
  box-shadow: 0 8px 30px rgba(39, 61, 78, .12);
  transform: translateY(-4px);
}

.post-card-img {
  display: block;
  height: 200px;
  overflow: hidden;
}

.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card h4 {
  font-size: 1.1rem;
}

.post-card h4 a {
  color: var(--heading-color, #273d4e);
  text-decoration: none;
}

.post-card h4 a:hover {
  color: var(--accent-color, #ff4a17);
}

#posts-swiper {
  padding-bottom: 2.5rem;
}

.header-search {
  margin-right: .5rem;
}

.header-search input {
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.1);
  color: #fff;
  padding: .35rem .75rem;
  font-size: .85rem;
  width: 140px;
}

.header-search input::placeholder {
  color: rgba(255,255,255,.6);
}

.product-card, .post-list-card {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .3s, transform .3s;
}

.product-card:hover, .post-list-card:hover {
  box-shadow: 0 10px 28px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

.product-card-img, .post-list-img {
  height: 220px;
  overflow: hidden;
  display: block;
  flex-shrink: 0;
}

.product-card-img img, .post-list-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-list-card .p-3 {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
}

.post-list-card h4 {
  font-size: 1.05rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.05em;
}

.post-list-card p {
  margin-bottom: 0;
}

.post-list-card p:last-child {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 6.4em;
}

.price-tag {
  color: var(--accent-color, #ff4a17);
  font-weight: 700;
  font-size: 1.1rem;
}

.price-old {
  text-decoration: line-through;
  color: #999;
  font-size: .9rem;
  margin-left: .5rem;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #273d4e, #1a2833);
  padding: 2rem 1rem;
}

.auth-card {
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.auth-card .logo {
  max-height: 56px;
  margin-bottom: 1rem;
}

.related-item {
  border: 1px solid #e8edf3;
  border-radius: 8px;
  padding: .75rem;
  margin-bottom: .75rem;
  display: flex;
  gap: .75rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.related-item:hover {
  border-color: var(--accent-color, #ff4a17);
}

.related-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
}

.img-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.search-result-item {
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.search-result-item:last-child {
  border-bottom: none;
}

.news-shell {
  max-width: 1200px;
  margin: 0 auto;
}

.toc-card,
.sidebar-card {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .05);
}

.toc-title,
.sidebar-title {
  font-weight: 800;
  color: #273d4e;
  margin-bottom: .9rem;
  font-size: 1.05rem;
}

.toc-link {
  display: block;
  padding: .45rem 0;
  color: #516170;
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: .75rem;
}

.toc-link:hover {
  color: var(--accent-color, #ff4a17);
  border-left-color: var(--accent-color, #ff4a17);
}

.toc-h3 {
  padding-left: 1.25rem;
  font-size: .95rem;
}

.news-hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 2rem;
}

.news-hero-main,
.news-hero-side,
.news-card,
.post-detail-panel,
.post-content-panel {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .05);
}

.news-hero-main {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.news-hero-main .news-image {
  height: 360px;
}

.news-image {
  display: block;
  width: 100%;
  overflow: hidden;
  background: #f8fafc;
}

.news-image img,
.news-card .news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.news-card .news-image {
  height: 220px;
}

.news-card-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  flex: 1;
}

.news-card-title,
.news-hero-title {
  color: #273d4e;
  text-decoration: none;
}

.news-card-title:hover,
.news-hero-title:hover {
  color: var(--accent-color, #ff4a17);
}

.news-hero-title {
  font-size: clamp(1.45rem, 2vw, 2.5rem);
  line-height: 1.2;
  font-weight: 800;
}

.news-hero-excerpt,
.news-card-excerpt {
  color: #516170;
  line-height: 1.7;
}

.news-card-title {
  font-size: 1.08rem;
  line-height: 1.45;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.1em;
}

.news-card-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 5.1em;
}

.news-hero-side {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-hero-side .news-side-item + .news-side-item {
  border-top: 1px solid #eef2f7;
  padding-top: 1rem;
  margin-top: 1rem;
}

.news-side-item {
  display: flex;
  gap: .9rem;
  text-decoration: none;
  color: inherit;
}

.news-side-item img {
  width: 88px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.news-side-item strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.post-detail-panel,
.post-content-panel {
  padding: 1.5rem;
}

.post-detail-hero {
  margin: 1.25rem 0 1.75rem;
}

.post-detail-hero img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: 16px;
}

.post-content {
  line-height: 1.95;
  font-size: 1.04rem;
  color: #2f3b45;
}

.post-content .post-content-block {
  margin-bottom: 1rem;
}

.post-content p {
  text-align: justify;
}

.post-content h2, .post-content h3, .post-content h4 {
  margin-top: 1.8rem;
  margin-bottom: .85rem;
  font-weight: 800;
  color: #273d4e;
}

.post-content ul,
.post-content ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

.post-content li {
  margin-bottom: .4rem;
}

.post-content blockquote {
  border-left: 4px solid var(--accent-color, #ff4a17);
  background: #fff8f5;
  padding: 1rem 1.25rem;
  border-radius: 0 12px 12px 0;
  font-style: italic;
}

.post-content .callout-box,
.post-content .highlight-box,
.post-content .note-box {
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin: 1rem 0;
  border: 1px solid transparent;
}

.post-content .callout-box {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
}

.post-content .highlight-box {
  background: #fff8eb;
  border-color: #fde68a;
  color: #7c2d12;
}

.post-content .callout-box strong,
.post-content .highlight-box strong {
  display: block;
  margin-bottom: .35rem;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  display: block;
  overflow-x: auto;
  border-radius: 12px;
  overflow: hidden;
}

.post-content table th,
.post-content table td {
  border: 1px solid #dfe7ef;
  padding: .75rem;
  background: #fff;
}

.post-content img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

.post-content .post-media-figure {
  margin: 1rem 0;
}

.post-content .post-media-figure img {
  display: block;
  margin: 0 auto;
}

.post-content .table-responsive {
  margin: 1rem 0;
}

@media (max-width: 991px) {
  .news-hero {
    grid-template-columns: 1fr;
  }

  .news-hero-main .news-image {
    height: 260px;
  }
}
