/* ==========================================================================
   TIGER888 Blog & Article View Styles
   Matches dark crimson (#0c0303 / #240909 / #551515) + electric blue (#51b0ff)
   ========================================================================== */

/* Hero / Header Banner */
.blog-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 12% 0%, rgba(81, 176, 255, 0.22), transparent 52%),
    radial-gradient(circle at 88% 100%, rgba(245, 158, 11, 0.14), transparent 48%),
    linear-gradient(135deg, #102993 0%, #1a070c 52%, #240909 100%);
  border: 1px solid rgba(81, 176, 255, 0.28);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Breadcrumb */
.blog-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  color: #a3a3a3;
}

.blog-breadcrumb a {
  color: #b8c4d9;
  transition: color 0.18s ease;
}

.blog-breadcrumb a:hover {
  color: #51b0ff;
}

.blog-breadcrumb .crumb-sep {
  color: rgba(255, 255, 255, 0.28);
  user-select: none;
}

.blog-breadcrumb .crumb-current {
  color: #ececec;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 28rem;
}

/* Filter Bar & Category Pills */
.blog-filter-panel {
  background: linear-gradient(180deg, rgba(36, 9, 9, 0.92) 0%, rgba(20, 5, 5, 0.96) 100%);
  border: 1px solid rgba(85, 21, 21, 0.95);
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
}

.blog-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  color: #d4d4d4;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.blog-cat-pill:hover {
  color: #ffffff;
  border-color: rgba(81, 176, 255, 0.55);
  background: rgba(81, 176, 255, 0.12);
}

.blog-cat-pill.is-active {
  color: #ffffff;
  background: linear-gradient(180deg, #5ab6ff 0%, #3668ee 100%);
  border-color: rgba(125, 200, 255, 0.75);
  box-shadow: 0 3px 12px rgba(64, 150, 255, 0.38);
}

.blog-cat-pill .pill-count {
  font-size: 0.7rem;
  padding: 0.08rem 0.42rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.3);
  color: inherit;
}

/* Article Card */
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(180deg, #240909 0%, #160505 100%);
  border: 1px solid rgba(85, 21, 21, 0.95);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.42);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.24s ease, box-shadow 0.24s ease;
  content-visibility: auto;
  contain-intrinsic-size: 420px;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(81, 176, 255, 0.65);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(81, 176, 255, 0.2);
}

.blog-card-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #120404;
}

.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.blog-card:hover .blog-card-thumb img {
  transform: scale(1.06);
}

.blog-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(12, 3, 3, 0.72) 100%);
  pointer-events: none;
}

.blog-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(16, 41, 147, 0.92), rgba(54, 88, 234, 0.92));
  border: 1px solid rgba(125, 200, 255, 0.45);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.blog-card-title {
  font-family: 'Kanit', 'Noto Sans Thai', sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
  color: #f3f4f6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-title a {
  color: inherit;
  transition: color 0.18s ease;
}

.blog-card:hover .blog-card-title a {
  color: #62bcff;
}

.blog-card-excerpt {
  font-size: 0.84rem;
  line-height: 1.65;
  color: #a6a6a6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: #93c5fd;
  background: rgba(81, 176, 255, 0.1);
  border: 1px solid rgba(81, 176, 255, 0.22);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.blog-tag-chip:hover {
  color: #ffffff;
  background: rgba(81, 176, 255, 0.24);
  border-color: rgba(81, 176, 255, 0.55);
}

/* ==========================================================================
   Article Reader View (view.php)
   ========================================================================== */
.article-reader-shell {
  background: linear-gradient(180deg, #1b0707 0%, #120404 100%);
  border: 1px solid rgba(85, 21, 21, 0.95);
  border-radius: 1.25rem;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}

.article-featured-figure {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c0303;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.article-featured-figure img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

/* Rich WYSIWYG Prose Typography */
.blog-prose {
  color: #d8d8d8;
  font-size: 1rem;
  line-height: 1.85;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.blog-prose > *:first-child {
  margin-top: 0;
}

.blog-prose > *:last-child {
  margin-bottom: 0;
}

.blog-prose h1,
.blog-prose h2,
.blog-prose h3,
.blog-prose h4 {
  font-family: 'Kanit', 'Noto Sans Thai', sans-serif;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 1.85rem;
  margin-bottom: 0.75rem;
}

.blog-prose h2 {
  font-size: 1.45rem;
  padding-left: 0.85rem;
  border-left: 3px solid #51b0ff;
}

.blog-prose h3 {
  font-size: 1.22rem;
  color: #e6f2ff;
}

.blog-prose h4 {
  font-size: 1.06rem;
}

.blog-prose p {
  margin-bottom: 1.15rem;
}

.blog-prose a {
  color: #51b0ff;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}

.blog-prose a:hover {
  color: #93d0ff;
}

.blog-prose strong,
.blog-prose b {
  color: #ffffff;
  font-weight: 700;
}

.blog-prose ul,
.blog-prose ol {
  margin: 1rem 0 1.25rem 1.4rem;
  padding-left: 0.25rem;
}

.blog-prose ul {
  list-style: disc;
}

.blog-prose ol {
  list-style: decimal;
}

.blog-prose li {
  margin-bottom: 0.45rem;
}

.blog-prose li::marker {
  color: #51b0ff;
}

.blog-prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #51b0ff;
  border-radius: 0 0.75rem 0.75rem 0;
  background: rgba(16, 41, 147, 0.18);
  color: #e5e7eb;
  font-style: italic;
}

.blog-prose img {
  max-width: 100%;
  height: auto !important;
  border-radius: 0.85rem;
  margin: 1.35rem auto;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.blog-prose iframe,
.blog-prose video {
  max-width: 100%;
  border-radius: 0.85rem;
  margin: 1.25rem auto;
  display: block;
}

.blog-prose .blog-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.4rem 0;
  border-radius: 0.75rem;
  border: 1px solid rgba(85, 21, 21, 0.9);
}

.blog-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.blog-prose th,
.blog-prose td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.blog-prose th {
  background: rgba(16, 41, 147, 0.35);
  color: #ffffff;
  font-weight: 600;
}

.blog-prose tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.blog-prose code {
  font-size: 0.88em;
  padding: 0.15rem 0.4rem;
  border-radius: 0.35rem;
  background: rgba(81, 176, 255, 0.12);
  color: #93d0ff;
}

.blog-prose pre {
  margin: 1.25rem 0;
  padding: 1rem 1.2rem;
  border-radius: 0.75rem;
  background: #0a0202;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow-x: auto;
}

.blog-prose pre code {
  background: transparent;
  padding: 0;
  color: #e5e7eb;
}

.blog-prose hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 1.75rem 0;
}

/* Prev / Next Navigation Cards */
.article-nav-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.15rem;
  border-radius: 0.9rem;
  background: rgba(36, 9, 9, 0.75);
  border: 1px solid rgba(85, 21, 21, 0.9);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.article-nav-card:hover {
  border-color: rgba(81, 176, 255, 0.65);
  background: rgba(61, 15, 15, 0.85);
  transform: translateY(-2px);
}

/* Share Buttons */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.25rem;
  padding: 0 0.85rem;
  border-radius: 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #ececec;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  cursor: pointer;
}

.share-btn:hover {
  color: #ffffff;
  background: rgba(81, 176, 255, 0.18);
  border-color: rgba(81, 176, 255, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .blog-card,
  .blog-card-thumb img,
  .article-nav-card {
    transition: none;
  }
  .blog-card:hover,
  .article-nav-card:hover {
    transform: none;
  }
  .blog-card:hover .blog-card-thumb img {
    transform: none;
  }
}
