﻿/* THIPHI Portal — tối thiểu, bổ sung Bootstrap (đen trắng) */
.portal-container {
  max-width: 1080px;
}
.portal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}
.portal-header-brand {
  flex: 0 0 auto;
  min-width: 0;
}
.portal-header-tagline {
  white-space: nowrap;
}
.portal-header-meta {
  flex: 1 1 auto;
  justify-content: center;
  gap: 0.75rem;
  min-width: 0;
  white-space: nowrap;
}
.portal-header-divider {
  width: 1px;
  height: 14px;
  background: #dee2e6;
  flex-shrink: 0;
}
.portal-header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.portal-header-nav {
  align-items: center;
  gap: 0.85rem;
  font-size: 0.8125rem;
  white-space: nowrap;
}
.portal-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}
@media (max-width: 991.98px) {
  .portal-header-meta {
    display: none !important;
  }
}
@media (max-width: 575.98px) {
  .portal-header-tagline {
    display: none;
  }
  .logo-mark {
    font-size: 1.5rem;
  }
}
.nav-categories {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-categories::-webkit-scrollbar {
  display: none;
}
.nav-home-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8e8e8;
  color: #9a9a9a;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-home-icon svg {
  width: 14px;
  height: 14px;
}
.nav-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s ease;
  pointer-events: none;
}
.nav-sticky.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nav-sticky-logo {
  letter-spacing: -0.04em;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  padding-right: 0.5rem;
  border-right: 1px solid #dee2e6;
}
.logo-mark {
  letter-spacing: -0.04em;
  font-size: 1.75rem;
}
.article-thumb {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.hero-img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  max-height: 300px;
}
#hero-section .hero-title {
  font-size: 1.35rem;
  line-height: 1.35;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
#hero-section .hero-summary {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#hero-section .hero-meta {
  font-size: 0.8125rem;
}
.news-content img {
  max-width: 100%;
  height: auto;
}
.news-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* Middle row — 3 cột kiểu VnExpress */
.middle-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.middle-card-head {
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}
.middle-card-title {
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 700;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.middle-card-comment {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 0.8125rem;
  font-weight: 400;
  color: #6c757d;
  margin-left: 0.15rem;
}
.middle-card-comment svg {
  flex-shrink: 0;
}
.middle-card-img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.middle-card-opinion .middle-card-title {
  margin-bottom: 0.5rem;
}
.middle-card-summary {
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Category page */
.nav-cat-active {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.category-page-title {
  letter-spacing: 0.02em;
}
.category-item-img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.category-item-img-skel {
  width: 100%;
  aspect-ratio: 16 / 10;
}
.category-item-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.category-item-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}
.category-item:last-child {
  border-bottom: 0 !important;
}

/* Skeleton loading */
@keyframes skel-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skel {
  background: linear-gradient(90deg, #ececec 0%, #f7f7f7 50%, #ececec 100%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
  border-radius: 2px;
}
.skel-line {
  height: 0.85rem;
  width: 100%;
}
.skel-line-lg { height: 1.35rem; }
.skel-line-md { height: 1.1rem; }
.skel-line-sm { width: 72%; }
.skel-line-xs { width: 42%; height: 0.7rem; }
.skel-hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 300px;
}
.skel-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 0.5rem;
}
.skel-middle-img {
  width: 100%;
  aspect-ratio: 16 / 10;
}
.skel-badge {
  width: 4.5rem;
  height: 1.25rem;
  margin-bottom: 0.5rem;
}
.skel-nav-pill {
  width: 4.5rem;
  height: 0.85rem;
  flex-shrink: 0;
}
.skel-middle-head {
  margin-bottom: 0.5rem;
}
.skel-fade-in {
  animation: skel-fade-in 0.35s ease;
}
@keyframes skel-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
