/* ========== PAGE LAYOUT ========== */
.page-main {
  min-height: 100vh;
  background: var(--bg-light);
}

.page-section {
  padding: 40px 2rem 80px;
}

.page-container {
  max-width: 800px;
  margin: 0 auto;
}

/* ========== MINI HERO ========== */
.mini-hero {
  position: relative;
  height: 260px;
  background: #000;
  overflow: hidden;
  padding: 0;
}

#mini-hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.mini-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.2) 100%);
  pointer-events: none;
}

.mini-hero-label {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 60px;
  z-index: 10;
  pointer-events: none;
}

.mini-hero-en {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 10px;
  color: #fff;
  text-shadow:
    0 0 15px rgba(255, 255, 255, 0.8),
    0 0 30px rgba(255, 255, 255, 0.5),
    0 0 50px rgba(255, 255, 255, 0.3);
}

/* ========== BREADCRUMB BAR ========== */
.breadcrumb-bar {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-bottom: 1px solid #eee;
  padding: 0.8rem 2rem;
}

.breadcrumb-bar .breadcrumb {
  margin: 0;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin: 0;
}

.breadcrumb li {
  color: var(--text-light);
}

.breadcrumb li::after {
  content: '>';
  margin-left: 0.5rem;
  color: #ccc;
}

.breadcrumb li:last-child::after {
  content: '';
}

.breadcrumb li:last-child {
  color: var(--text-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ========== PAGE HEADING ========== */
.page-heading {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-dark);
}

.page-heading-en {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  color: var(--primary);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  font-weight: 700;
}

/* ========== CATEGORY FILTER ========== */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.cat-tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.2s ease;
  background: var(--white);
}

.cat-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cat-tag.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* ========== NEWS LIST (on subpages) ========== */
.page-section .news-list {
  max-width: 100%;
}

.page-section .news-item {
  text-decoration: none;
}

/* ========== BLOG LIST ========== */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-list-item {
  display: flex;
  gap: 1.5rem;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 12px var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.blog-list-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(29, 158, 117, 0.15);
}

.blog-list-icon {
  width: 140px;
  min-height: 140px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2.5rem;
  overflow: hidden;
}

.blog-list-thumb {
  width: 140px;
  height: 140px;
  object-fit: cover;
  display: block;
}

.blog-list-body {
  padding: 1.2rem 1.5rem 1.2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.blog-list-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

.blog-list-date {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

.blog-list-cat {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
}

.blog-list-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.blog-list-excerpt {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== ARTICLE DETAIL ========== */
.article-detail {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 12px var(--shadow);
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.article-date {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
}

.article-category-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--primary-light);
  color: var(--white);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.article-category-badge:hover {
  background: var(--primary);
}

.article-title {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.5;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--bg-light);
  color: var(--text-dark);
}

.article-content {
  line-height: 2;
  color: var(--text-dark);
}

.article-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  padding-left: 0.8rem;
  border-left: 4px solid var(--primary);
  color: var(--text-dark);
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.5rem 0 0.8rem;
  color: var(--text-dark);
}

.article-content p {
  margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content pre {
  background: #1a1a1a;
  color: var(--primary-light);
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.article-content code {
  font-family: 'Courier New', monospace;
}

.article-content a {
  color: var(--primary);
  text-decoration: underline;
}

.article-content img {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  margin: 1rem auto !important;
}

.article-content span {
  overflow: visible !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
}

/* ========== PREV / NEXT NAV ========== */
.prev-next-nav {
  margin-bottom: 2rem;
}

.prev-next-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.prev-link,
.next-link {
  display: block;
  background: var(--white);
  border-radius: 10px;
  padding: 1.2rem;
  text-decoration: none;
  color: var(--text-dark);
  box-shadow: 0 2px 8px var(--shadow);
  transition: all 0.2s ease;
}

.prev-link:hover,
.next-link:hover {
  box-shadow: 0 4px 16px rgba(29, 158, 117, 0.15);
  transform: translateY(-2px);
}

.next-link {
  text-align: right;
}

.nav-direction {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.nav-date {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.3rem;
}

.nav-date .article-category-badge {
  margin-left: 0.5rem;
  font-size: 0.65rem;
}

.nav-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prev-link-empty,
.next-link-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: 10px;
  padding: 1.2rem;
  color: #ccc;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px var(--shadow);
}

/* ========== BACK TO LIST ========== */
.detail-back-nav {
  text-align: center;
}

.nav-button {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: var(--primary);
  color: var(--white);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.nav-button:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 15px rgba(29, 158, 117, 0.3);
}

/* ========== NO ARTICLES ========== */
.no-articles {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
  font-size: 1rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .mini-hero {
    height: 200px;
  }

  .mini-hero-en {
    font-size: 2rem;
    letter-spacing: 5px;
  }

  .mini-hero-label {
    padding-top: 55px;
  }

  .breadcrumb-bar {
    padding: 0.6rem 1rem;
  }

  .page-section {
    padding: 30px 1rem 60px;
  }

  .article-detail {
    padding: 1.5rem;
  }

  .article-title {
    font-size: 1.4rem;
  }

  .article-content h2 {
    font-size: 1.2rem;
  }

  .prev-next-links {
    grid-template-columns: 1fr;
  }

  .next-link {
    text-align: left;
  }

  .blog-list-item {
    flex-direction: column;
  }

  .blog-list-icon {
    width: 100%;
    min-height: 100px;
    height: 100px;
  }

  .blog-list-thumb {
    width: 100%;
    height: 100px;
  }

  .blog-list-body {
    padding: 1rem 1.2rem;
  }

  .breadcrumb li:last-child {
    max-width: 180px;
  }
}
