/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,300;8..144,400;8..144,500;8..144,700&display=swap');

/* CSS Variables for Premium Design System */
:root {
  --primary-color: #005781;
  --primary-dark: #003f5e;
  --primary-light: #e6f0f5;
  --secondary-color: #d26e4b;
  --secondary-light: #fdf3f0;
  --accent-color: #7a9c59;
  --alert-color: #b20000;
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  
  --font-sans: 'Roboto Flex', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-premium: 0 20px 25px -5px rgba(0, 87, 129, 0.05), 0 10px 10px -5px rgba(0, 87, 129, 0.02);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

/* Base Styles & Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

li {
  list-style: none;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding {
  padding: 80px 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 50px 0;
  }
}

/* Header */
header.main-header {
  background-color: var(--surface-color);
  box-shadow: var(--shadow-sm);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  width: auto;
  padding-top: 14px;
  padding-left: 4px;
}

.logo a {
  display: inline-block;
}

.logo-image {
  height: 72px;
  width: auto;
  display: block;
  transition: var(--transition-smooth);
}

.header-banner {
  display: block;
  line-height: 0;
}

.banner-image {
  height: 290px;
  width: auto;
  max-width: 960px;
  display: block;
  object-fit: contain;
  object-position: right top;
  transition: var(--transition-smooth);
}


/* Mobile responsive toggle button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  padding: 0 15px;
  align-items: center;
  justify-content: center;
}

/* Navigation Menu styling to match screenshot */
.header-bottom {
  background-color: #0073aa; /* Exact dark blue background from the screenshot */
  color: var(--surface-color);
  min-height: 46px;
  display: flex;
  align-items: center;
  position: relative;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  height: 46px;
}

.main-nav {
  display: flex;
  align-items: stretch;
}

.nav-list {
  display: flex;
  align-items: stretch;
}

.nav-item {
  display: flex;
  align-items: stretch;
  position: relative;
}

/* Dropdown Menu Styles */
.nav-item .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #0073aa;
  min-width: 220px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  list-style: none;
  margin: 0;
  padding: 8px 0;
  z-index: 1000;
  border-radius: 0 0 4px 4px;
  border-top: 2px solid #38a3d6;
}

.nav-item:hover .dropdown-menu {
  display: block;
}

.nav-item .dropdown-menu li {
  width: 100%;
}

.nav-item .dropdown-menu a {
  padding: 10px 20px;
  display: block;
  text-transform: none;
  font-weight: 500;
  font-size: 14px;
  color: #ffffff;
  white-space: nowrap;
  letter-spacing: normal;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-item .dropdown-menu li:last-child a {
  border-bottom: none;
}

.nav-item .dropdown-menu a:hover {
  background-color: #38a3d6;
  color: #ffffff;
}

.nav-item a {
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-weight: 700;
  font-size: 14px;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition-smooth);
}

/* Active tab style: solid sky blue background filling the height */
.nav-item.active a {
  background-color: #38a3d6; /* Sky blue background from screenshot */
  color: #ffffff;
}

.nav-item a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-item.active a:hover {
  background-color: #38a3d6;
}

/* Right side of Nav Bar (Search & Socials) */
.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-search {
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
}

.search-trigger {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.15); /* Dark background square */
  color: #ffffff;
  font-size: 16px;
  transition: var(--transition-smooth);
}

.search-trigger:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

/* Dropdown search form (hidden by default, toggled via JS) */
.nav-search-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #ffffff;
  box-shadow: var(--shadow-md);
  padding: 12px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  display: none;
  min-width: 250px;
  z-index: 100;
}

.nav-search.active .nav-search-dropdown {
  display: block;
}

.nav-search-dropdown form {
  display: flex;
  gap: 8px;
}

.nav-search-dropdown input {
  flex-grow: 1;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  color: var(--text-primary);
}

.nav-search-dropdown button {
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
}

/* Social links on the nav bar */
.nav-socials {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-link {
  color: #ffffff;
  font-size: 14px;
  transition: var(--transition-smooth);
  opacity: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* Mobile responsive menu */
@media (max-width: 768px) {
  .header-banner {
    display: none;
  }

  .logo-image {
    height: 40px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #0073aa;
    box-shadow: var(--shadow-md);
    z-index: 1000;
  }

  .nav-list.active {
    display: flex;
  }

  .nav-item a {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* Hero / Mission Section styling to match screenshot */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  color: var(--surface-color);
  overflow: hidden;
  padding: 30px 0; /* Padding-top and padding-bottom 30px */
}

/* Remove the blue background overlay to display clean background image */
.hero::before {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.mission-box {
  background-color: rgba(6, 75, 108, 0.797); /* Exact color from original design */
  border-radius: 10px; /* Exact radius */
  padding: 25px; /* Exact padding */
  margin: 35px auto 0 auto; /* Exact margin */
  max-width: 900px; /* Aligns with column size medium-9 large-9 */
  width: 90%;
  color: #ffffff;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.mission-box h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  color: #ffffff;
}

.mission-box p {
  font-size: 15px;
  margin-bottom: 20px;
  line-height: 1.7;
  opacity: 0.95;
  text-align: justify;
}

.mission-box p:last-child {
  margin-bottom: 0;
}

/* General Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: var(--font-sans);
  border: none;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--surface-color);
  box-shadow: 0 4px 14px rgba(210, 110, 75, 0.3);
}

.btn-primary:hover {
  background-color: #be5d3c;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(210, 110, 75, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--surface-color);
  transform: translateY(-2px);
}

/* Content Split Sections */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 768px) {
  .split-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.split-text h2 {
  font-size: 32px;
  color: var(--primary-color);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 12px;
}

.split-text h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--secondary-color);
}

.split-text p {
  text-align: justify;
  margin-bottom: 16px;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.75;
}

.split-text ol {
  margin-left: 20px;
  margin-top: 20px;
}

.split-text li {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  list-style-type: decimal;
}

.split-image img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 100%;
}

/* Feature/Article Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

@media (max-width: 480px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background-color: var(--surface-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-premium);
  border-color: rgba(0, 87, 129, 0.2);
}

.card-img-wrapper {
  position: relative;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
}

.card-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: var(--primary-color);
  color: var(--surface-color);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 20px;
  z-index: 10;
}

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-excerpt {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
}

.card-author {
  font-weight: 500;
  color: var(--text-secondary);
}

/* Category Filter Tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 10px 24px;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-tab:hover,
.filter-tab.active {
  background-color: var(--primary-color);
  color: var(--surface-color);
  border-color: var(--primary-color);
}

/* Section CTA (Forum) */
.section-cta {
  padding: 80px 0;
  background-color: rgba(0, 87, 129, 0.087);
}

@media (max-width: 768px) {
  .section-cta {
    padding: 50px 0;
  }
}

.section-cta .split-text h2 span {
  font-size: 22px;
  font-weight: 500;
  display: block;
}

/* Section header dùng cho các trang chủ sections (icon + h2) */
.home-section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.home-section-header h2 {
  margin: 0;
}
.home-section-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}
.section-icon-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 12px;
}

/* Nội dung HTML từ admin WYSIWYG */
.section-rich-content p  { margin-bottom: 14px; line-height: 1.8; }
.section-rich-content h2,
.section-rich-content h3 { margin: 20px 0 10px; }
.section-rich-content ul,
.section-rich-content ol { padding-left: 22px; margin-bottom: 14px; }
.section-rich-content li { margin-bottom: 6px; }
.section-rich-content strong { color: var(--text-primary); }

/* Section Thành công */
.section-success {
  background: linear-gradient(135deg, #f0f7f4 0%, #e8f4fd 100%);
}
.section-knowledge {
  background: var(--surface-color);
}

/* Alert / Red Button */
.btn-alert {
  background-color: var(--alert-color);
  color: var(--surface-color);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  padding: 16px 32px;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(178, 0, 0, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-alert:hover {
  background-color: #900000;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(178, 0, 0, 0.45);
  color: #fff;
}

/* Statistics Widgets Section */
.footer-stats {
  background: #ffffff url('https://kidney-forum.wiki/wp-content/uploads/2024/08/bg-page.jpg') repeat;
  padding: 70px 0;
  border-top: 1px solid var(--border-color);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.stat-icon-img-wrap {
  width: 100px;
  height: 100px;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.stat-number {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--primary-color);
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Footer */
.footer-bottom {
  background-color: #ffffff;
  color: var(--text-secondary);
  padding: 50px 0 0 0;
  font-size: 14px;
  border-top: 3px solid var(--primary-color);
}

.footer-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
  padding-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.footer-copyright p {
  margin-bottom: 6px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.footer-copyright a {
  color: var(--primary-color);
}

.footer-social-circles {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* Colored brand circles */
.social-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition-smooth);
}

.social-circle:hover {
  transform: translateY(-3px) scale(1.1);
  opacity: 0.9;
}

.social-circle.facebook  { background-color: #1877f2; }
.social-circle.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-circle.tiktok    { background-color: #010101; }
.social-circle.twitter   { background-color: #000000; }
.social-circle.pinterest { background-color: #e60023; }
.social-circle.rss       { background-color: #f26522; }
.social-circle.youtube   { background-color: #ff0000; }

/* Absolute bottom bar */
.footer-abs {
  background-color: var(--primary-color);
  padding: 16px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
}

/* XenForo Mockup Forum Styles */
.forum-header {
  background-color: var(--surface-color);
  padding: 30px 0;
  border-bottom: 1px solid var(--border-color);
}

.forum-header-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 10px;
}

.forum-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.forum-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.forum-wrapper {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.forum-category {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.category-header {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  padding: 16px 24px;
  font-weight: 700;
  font-size: 18px;
  border-bottom: 1px solid var(--border-color);
}

.forum-node {
  display: block;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.forum-node:last-child {
  border-bottom: none;
}

@media (max-width: 992px) {
  .forum-node {
    padding: 16px;
  }
}

.node-icon {
  display: none !important;
}

.node-main h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.node-main h3 a:hover {
  color: var(--primary-color);
}

.node-main p {
  color: var(--text-secondary);
  font-size: 14px;
}

.node-stats {
  font-size: 13px;
  color: var(--text-secondary);
}

.node-stats span {
  display: block;
}

.node-lastpost {
  font-size: 13px;
}

.lastpost-title {
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.lastpost-meta {
  color: var(--text-muted);
}

/* Sub-category tags */
.sub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.sub-tag {
  display: inline-block;
  background-color: var(--primary-light);
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.sub-tag:hover {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* Detail Article View */
.article-wrapper {
  background-color: var(--surface-color);
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  margin-top: 40px;
  border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .article-wrapper {
    padding: 24px;
  }
}

.article-header {
  text-align: center;
  margin-bottom: 30px;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 12px;
}

.article-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-body h2 {
  color: var(--primary-color);
  margin-top: 30px;
  margin-bottom: 16px;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body img {
  border-radius: var(--radius-sm);
  margin: 30px auto;
  box-shadow: var(--shadow-md);
}

.article-body ul, .article-body ol {
  margin-left: 24px;
  margin-bottom: 20px;
}

.article-body li {
  margin-bottom: 8px;
  list-style: inherit;
}

/* FontAwesome local fallback classes (since we use text icons or simple SVG/CSS shapes) */
.icon-search::before { content: "🔍"; }
.icon-user::before { content: "👤"; }
.icon-facebook::before { content: "📘"; }
.icon-instagram::before { content: "📸"; }
.icon-twitter::before { content: "🐦"; }
.icon-envelop::before { content: "✉️"; }
.icon-feed::before { content: "📡"; }
.icon-tiktok::before { content: "🎵"; }
.icon-youtube::before { content: "📺"; }
.icon-pinterest::before { content: "📌"; }

/* ── Forum page: two-column layout ─────────────────────────────────────── */
.forum-page-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.forum-main-col {
  flex: 1;
  min-width: 0;
}

/* ── Social sharing sidebar ─────────────────────────────────────────────── */
.forum-share-sidebar {
  flex-shrink: 0;
  width: 260px;
  position: sticky;
  top: 90px;
}
.share-box {
  background: #fff;
  border: 1px solid #dde8f0;
  border-radius: 12px;
  padding: 20px 16px;
  box-shadow: 0 2px 12px rgba(26,92,122,.10);
}
.share-box-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .07em;
  color: #fff;
  background: var(--primary-color, #1a5c7a);
  text-align: center;
  border-radius: 8px;
  padding: 8px 0;
  margin-bottom: 16px;
}
.share-icons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  justify-items: center;
}
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  font-size: 18px;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}
.share-btn:hover { opacity: .85; transform: translateY(-2px); }
.share-btn.facebook  { background: #1877f2; }
.share-btn.twitter   { background: #000; }
.share-btn.reddit    { background: #ff4500; }
.share-btn.pinterest { background: #e60023; }
.share-btn.tumblr    { background: #35465c; }
.share-btn.whatsapp  { background: #25d366; }
.share-btn.email     { background: #6c757d; }
.share-btn.copy-link { background: #1a5c7a; }
.copy-toast {
  display: none;
  text-align: center;
  font-size: 12px;
  color: #1a5c7a;
  margin-top: 12px;
  background: #eef5fb;
  border-radius: 6px;
  padding: 5px 0;
}
.copy-toast.show { display: block; }

/* ── Stats bar "Xem toàn bộ" link ──────────────────────────────────────── */
.forum-stats-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.stats-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
}
.stats-right {
  display: flex;
  align-items: center;
}
.stats-view-all,
.stats-view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 14px;
  background: var(--primary-color, #1a5c7a);
  color: #fff !important;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.stats-view-all:hover,
.stats-view-all-link:hover { background: var(--primary-dark, #154a62); }

@media (max-width: 960px) {
  .forum-page-layout { flex-direction: column; }
  .forum-share-sidebar { width: 100%; position: static; }
  .share-icons { grid-template-columns: repeat(4, 52px); }
}

/* ── CancerQA Page: two-column layout ───────────────────────────────── */
.qa-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.qa-main {
  flex: 1;
  min-width: 0;
}

/* QA list items */
.qa-list {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.qa-item {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background .15s;
}
.qa-item:last-child { border-bottom: none; }
.qa-item:hover { background: var(--primary-light); }
.qa-item-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.qa-item-main { flex: 1; min-width: 0; }
.qa-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.qa-item-author { font-weight: 600; color: var(--text-primary); }
.qa-item-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
}
.qa-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}
.qa-item-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-secondary);
}
.qa-item-stats i { margin-right: 4px; }
.qa-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ── QA Sidebar (Spotlight / Tiêu Điểm) ─────────────────────────────── */
.qa-sidebar {
  flex-shrink: 0;
  width: 280px;
  position: sticky;
  top: 90px;
}
.sidebar-box {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sidebar-box-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #fff;
  background: var(--primary-color);
  text-align: center;
  padding: 10px 16px;
  text-transform: uppercase;
  line-height: 1.4;
}
.sidebar-spotlight-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 520px;
  overflow-y: auto;
}
.sidebar-spotlight-list li {
  border-bottom: 1px solid var(--border-color);
}
.sidebar-spotlight-list li:last-child { border-bottom: none; }
.sidebar-spotlight-list a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.45;
  transition: background .15s, color .15s;
}
.sidebar-spotlight-list a i {
  flex-shrink: 0;
  color: var(--primary-color);
  font-size: 11px;
  margin-top: 3px;
}
.sidebar-spotlight-list a:hover {
  background: var(--primary-light);
  color: var(--primary-color);
}
.spotlight-loading,
.spotlight-empty {
  padding: 14px 16px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

/* ── QA Detail: related questions grid (bottom of page) ─────────────── */
.detail-related-box {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-top: 40px;
}
.detail-related-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #fff;
  background: var(--primary-color);
  text-align: center;
  padding: 10px 16px;
  text-transform: uppercase;
}
.detail-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  padding: 16px;
}
.detail-related-grid .spotlight-loading,
.detail-related-grid .spotlight-empty {
  grid-column: 1 / -1;
}
.detail-related-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13.5px;
  line-height: 1.45;
  transition: background .15s, color .15s, border-color .15s;
}
.detail-related-card i.fa-chevron-right {
  flex-shrink: 0;
  color: var(--primary-color);
  font-size: 11px;
  margin-top: 3px;
}
.detail-related-card:hover {
  background: var(--primary-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
}
@media (max-width: 600px) {
  .detail-related-grid { grid-template-columns: 1fr; }
}

/* Sidebar Categories List */
.sidebar-categories-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-categories-list li {
  margin-bottom: 4px;
}
.sidebar-cat-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-primary);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s;
}
.sidebar-cat-link i {
  color: var(--primary-color);
  opacity: 0.8;
}
.sidebar-cat-link span {
  font-weight: 400;
  color: inherit;
}
.sidebar-cat-link.active span {
  font-weight: 700;
  color: var(--primary-color);
}
.sidebar-cat-link.active i {
  opacity: 1;
}
.sidebar-cat-link:hover {
  background: var(--primary-light);
}

/* ── QA Pagination ───────────────────────────────────────────────────── */
.qa-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
  justify-content: center;
}
.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface-color);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.page-btn:hover { background: var(--primary-light); border-color: var(--primary-color); color: var(--primary-color); }
.page-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* ── QA Detail View ──────────────────────────────────────────────────── */
.detail-question-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.detail-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
}
.detail-title-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.detail-author-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.detail-author-name { font-weight: 700; color: var(--text-primary); }
.detail-author-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); display: inline-block; }
.detail-content {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-primary);
  white-space: pre-wrap;
  margin-bottom: 20px;
}
.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-reply, .btn-heart, .btn-report {
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
}
.btn-reply:hover { background: var(--primary-light); }
.btn-heart:hover { background: #fff0f0; }
.btn-report { color: var(--text-muted); font-size: 12px; }
.answer-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.answer-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.answer-body { flex: 1; min-width: 0; }
.answer-author { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.answer-content { font-size: 14px; line-height: 1.65; color: var(--text-primary); white-space: pre-wrap; }
.answer-date { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.replies-container { margin-top: 12px; border-top: 1px solid var(--border-color); padding-top: 12px; }
.reply-card { display: flex; gap: 10px; margin-bottom: 10px; }
.reply-card:last-child { margin-bottom: 0; }
.reply-icon { flex-shrink: 0; color: var(--text-muted); font-size: 14px; margin-top: 2px; }
.reply-body { flex: 1; background: var(--bg-color); border-radius: 8px; padding: 10px 14px; }
.reply-author { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.reply-content { font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.reply-date { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

@media (max-width: 960px) {
  .qa-layout { flex-direction: column; }
  .qa-sidebar { width: 100%; position: static; }
  .sidebar-spotlight-list { max-height: none; }
}

/* Subtle highlights for category keywords */
.category-keyword {
  color: var(--text-secondary);
  font-weight: 600;
}

/* ── MEMBER HEADER STYLES ─────────────────────────────────────────────────── */
.nav-member {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 15px;
}

.member-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition-smooth);
}

.member-profile:hover {
  background-color: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.member-welcome {
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-member-logout {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  opacity: 0.8;
  transition: var(--transition-smooth);
}

.btn-member-logout:hover {
  opacity: 1;
  color: var(--secondary-color);
  transform: scale(1.1);
}

.btn-member-login {
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.btn-member-login:hover {
  color: var(--primary-light);
  background-color: rgba(255, 255, 255, 0.08);
}

.btn-member-register {
  color: #ffffff;
  background-color: var(--secondary-color);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.btn-member-register:hover {
  background-color: #bf5d3b;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Desktop hidden rules */
.nav-item-mobile-only {
  display: none;
}

/* Responsive mobile layout styling */
@media (max-width: 768px) {
  /* Hide desktop socials and auth in mobile header bar */
  .nav-right .nav-socials,
  .nav-right .nav-member {
    display: none !important;
  }
  
  /* Mobile-only menu items inside navigation drawer */
  .nav-item-mobile-only {
    display: block !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .member-mobile-item {
    padding: 15px 24px;
  }
  
  .nav-member-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  
  .nav-member-mobile .member-profile {
    width: 100%;
    justify-content: space-between;
    background-color: rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
  }
  
  .nav-member-mobile .btn-member-login,
  .nav-member-mobile .btn-member-register {
    margin: 4px 0;
  }
  
  .socials-mobile-item {
    padding: 15px 24px;
  }
  
  .nav-socials-mobile {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  
  .nav-socials-mobile .social-link {
    color: #ffffff;
    font-size: 18px;
    opacity: 0.8;
    transition: opacity 0.2s;
  }
  
  .nav-socials-mobile .social-link:hover {
    opacity: 1;
  }

  /* Categories Grid/Pills on mobile */
  .sidebar-categories-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    max-height: none !important;
    overflow-y: visible !important;
    padding: 12px 10px !important;
    margin: 0 !important;
  }
  
  .sidebar-categories-list li {
    margin-bottom: 0 !important;
  }
  
  .sidebar-cat-link {
    background: var(--bg-color, #f8fafc) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
  }
  
  .sidebar-cat-link i {
    display: none !important; /* Hide folder icon in pill view */
  }
  
  .sidebar-cat-link span {
    font-weight: 500 !important;
    color: var(--text-primary) !important;
  }
  
  .sidebar-cat-link.active {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
  }
  
  .sidebar-cat-link.active span {
    color: #ffffff !important;
    font-weight: 600 !important;
  }
  
  .sidebar-cat-link:hover {
    background: var(--primary-light) !important;
  }

  /* Reduced paddings for cards & headers on mobile */
  .detail-question-card {
    padding: 16px !important;
  }
  
  .answer-card {
    padding: 14px !important;
  }
  
  .category-header-block {
    padding: 14px !important;
  }
  
  .category-header-block h1 {
    font-size: 20px !important;
  }
  
  .qa-item {
    padding: 12px 14px !important;
  }
  
  .qa-item-title {
    font-size: 14.5px !important;
  }
  
  .mission-box h2 {
    font-size: 20px !important;
  }
}

/* ── PREMIUM MEMBER AUTH PAGES ───────────────────────────────────────────── */
.auth-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  padding: 40px 20px;
}

.auth-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-premium);
  padding: 44px 40px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  animation: authFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transition: var(--transition-smooth);
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header {
  margin-bottom: 30px;
}

.auth-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 16px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
  font-family: var(--font-sans);
}

.auth-subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
}

.auth-form {
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon-wrapper > i:first-child {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 14px;
  pointer-events: none;
  z-index: 2;
}

.password-toggle-btn, .pwd-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 15px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: color 0.2s ease;
}

.password-toggle-btn:hover, .pwd-toggle:hover {
  color: var(--primary-color);
}

.form-input {
  width: 100%;
  padding: 12px 42px 12px 40px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 87, 129, 0.15);
}

.btn-auth-submit {
  width: 100%;
  padding: 13px;
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-auth-submit:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-footer {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 13.5px;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--primary-color);
  font-weight: 600;
}

.auth-footer a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.auth-message {
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
  animation: authShake 0.4s ease-in-out;
}

.auth-message.error {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fee2e2;
}

.auth-message.success {
  background-color: #f0fdf4;
  color: #15803d;
  border: 1px solid #dcfce7;
}

@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ── Q&A POST & COMMENT AESTHETICS ───────────────────────────────────────── */
.post-header-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.post-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-color);
  border: 2px solid var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.post-author-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.post-author-name {
  font-weight: 700;
  color: #005781;
  font-size: 14.5px;
}

.post-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.reply-to-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--primary-light);
  border-radius: 6px;
  padding: 4px 10px;
  margin: -6px 0 4px;
  width: fit-content;
}

.reply-to-tag b {
  color: var(--primary-color, var(--primary, #005781));
}

.post-content-body {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 18px;
  white-space: pre-wrap;
  text-align: justify;
}

.post-content-body ul,
.post-content-body ol {
  margin: 8px 0 8px 22px;
  white-space: normal;
}

.post-content-body li {
  margin-bottom: 4px;
}

.post-content-body a {
  color: var(--primary-color, var(--primary, #005781));
  text-decoration: underline;
}

.post-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.post-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-action-btn {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: auto;
  height: 34px;
  padding: 0 12px;
  border-radius: 17px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.post-action-btn:hover {
  background: var(--primary-light);
  color: var(--primary-color);
  border-color: rgba(0, 87, 129, 0.2);
}

.post-action-btn.active {
  background: var(--primary-color);
  color: #ffffff !important;
  border-color: var(--primary-color);
}

.post-action-btn.love-btn:hover {
  background: #fdf2f2;
  color: #e11d48;
  border-color: #fecaca;
}

.post-action-btn.love-btn.active {
  background: #e11d48;
  border-color: #e11d48;
  color: #ffffff !important;
}

.post-action-btn.dislike-btn:hover {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

.post-action-btn.dislike-btn.active {
  background: #991b1b;
  border-color: #991b1b;
  color: #ffffff !important;
}

.post-actions-right {
  display: flex;
  align-items: center;
}

.btn-comment-reply {
  background: var(--primary-light);
  color: var(--primary-color);
  border: 1px solid rgba(0, 87, 129, 0.15);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-comment-reply:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

/* Reply Form Aesthetics */
.reply-form-container {
  margin-top: 14px;
  padding: 14px;
  background: var(--bg-color);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  animation: replyFormSlide 0.3s ease-out;
}

@keyframes replyFormSlide {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.reply-form-box {
  width: 100%;
}

.reply-form-box textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  resize: vertical;
  background: #ffffff;
  transition: var(--transition-smooth);
  margin-bottom: 10px;
  box-sizing: border-box;
}

.reply-form-box textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 87, 129, 0.1);
}

.reply-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.reply-form-actions button {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-submit-reply {
  background: var(--primary-color);
  color: #ffffff;
  border: none;
}

.btn-submit-reply:hover {
  background: var(--primary-dark);
}

.btn-cancel-reply {
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-cancel-reply:hover {
  background: #f1f5f9;
}

.comment-group {
  margin-bottom: 10px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.comment-group .answer-card {
  border: none;
  padding: 0;
  box-shadow: none;
}

.comment-group .replies-container {
  margin-top: 18px;
  margin-left: 20px;
  padding-left: 20px;
  border-left: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.comment-group .replies-container .answer-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
}

/* Premium Toast */
.premium-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 9999;
}

.premium-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ── Sidebar Categories List & Scrollbar ───────────────────────────────── */
.sidebar-categories-list::-webkit-scrollbar {
  width: 5px;
}
.sidebar-categories-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.sidebar-categories-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.sidebar-categories-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.sidebar-cat-link:hover {
  background: var(--primary-light) !important;
  color: var(--primary-color) !important;
}

.sidebar-cat-link.active {
  background: var(--primary-light) !important;
  color: var(--primary-color) !important;
  font-weight: 700 !important;
}

/* ── Parent Category Sub-Categories Grid ────────────────────────────── */
.sub-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.sub-cat-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  transition: all 0.2s ease;
}

.sub-cat-chip:hover {
  background: var(--primary-color, #005781);
  color: #ffffff;
  border-color: var(--primary-color, #005781);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 87, 129, 0.15);
}

.sub-cat-chip i {
  font-size: 11px;
  opacity: 0.6;
}

/* ============================================================
   ACCOUNT / PROFILE PAGE STYLES (#/tai-khoan)
   ============================================================ */
.account-container {
  max-width: 1140px;
  margin: 24px auto 40px;
  padding: 0 16px;
}

.account-breadcrumb {
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-muted, #64748b);
}

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

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

.account-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* Left Sidebar Tabs */
.account-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  padding: 8px 0;
  overflow: hidden;
}

.account-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  border-left: 4px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.account-nav-item:hover {
  background: #f8fafc;
  color: var(--primary-color, #005781);
}

.account-nav-item.active {
  background: #f0f7ff;
  color: var(--primary-color, #005781);
  border-left-color: var(--primary-color, #005781);
}

.account-nav-item i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

/* Right Main Content Panel */
.account-main {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  padding: 28px 32px;
}

.account-header-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-color, #005781);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-color, #005781);
}

.account-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color, #005781);
  margin: 24px 0 16px;
}

.account-form-group {
  margin-bottom: 20px;
}

.account-form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.account-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.account-input {
  width: 100%;
  padding: 12px 40px 12px 14px;
  font-size: 14.5px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #ffffff;
  color: #1e293b;
  font-family: inherit;
}

.account-input[readonly] {
  background: #f8fafc;
  color: #64748b;
  cursor: not-allowed;
}

.account-input:focus:not([readonly]) {
  border-color: var(--primary-color, #005781);
  box-shadow: 0 0 0 3px rgba(0, 87, 129, 0.12);
}

.account-input-icon {
  position: absolute;
  right: 14px;
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
}

.account-btn-save {
  background: var(--primary-color, #005781);
  color: #ffffff;
  border: none;
  padding: 10px 32px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.account-btn-save:hover {
  background: #004263;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 87, 129, 0.25);
}

@media (max-width: 768px) {
  .account-layout {
    flex-direction: column;
  }
  .account-sidebar {
    width: 100%;
  }
  .account-main {
    padding: 20px 16px;
  }
}

/* ============================================================
   WYSIWYG RICH TEXT EDITOR STYLES
   ============================================================ */
.rich-editor-wrap {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-top: 6px;
}
.rich-editor-wrap:focus-within {
  border-color: #005781;
  box-shadow: 0 0 0 3px rgba(0, 87, 129, 0.12);
}
.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.rich-editor-toolbar .editor-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  cursor: pointer;
  font-size: 13.5px;
  transition: all 0.15s ease;
}
.rich-editor-toolbar .editor-btn:hover {
  background: #e2e8f0;
  color: #005781;
}
.rich-editor-toolbar .editor-btn:active {
  background: #cbd5e1;
}
.rich-editor-toolbar .editor-select-block {
  height: 32px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 13px;
  color: #334155;
  background: #fff;
  cursor: pointer;
  outline: none;
}
.rich-editor-toolbar .toolbar-divider {
  width: 1px;
  height: 20px;
  background: #cbd5e1;
  margin: 0 4px;
}
.rich-editor-toolbar .editor-color-btn {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.rich-editor-toolbar .editor-color-btn:hover {
  background: #e2e8f0;
}
.rich-editor-toolbar .editor-color-btn input[type="color"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.rich-editor-content {
  min-height: 200px;
  max-height: 500px;
  overflow-y: auto;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.6;
  color: #1e293b;
  outline: none;
  background: #ffffff;
}
.rich-editor-content[contenteditable="true"]:empty:before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
  display: block;
}
.rich-editor-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: #005781;
  margin: 12px 0 8px;
}
.rich-editor-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 10px 0 6px;
}
.rich-editor-content blockquote {
  border-left: 4px solid #005781;
  background: #f0f7ff;
  padding: 10px 14px;
  margin: 10px 0;
  color: #334155;
  font-style: italic;
  border-radius: 0 6px 6px 0;
}
.rich-editor-content ul, .rich-editor-content ol {
  padding-left: 24px;
  margin: 8px 0;
}

/* ─── CUSTOM BEAUTIFUL POPUP MODAL (CONFIRM / ALERT) ─── */
@keyframes customModalFade {
  from { opacity: 0; transform: scale(0.93) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.custom-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  font-family: var(--font, sans-serif);
  padding: 16px;
}
.custom-modal-box {
  background: #ffffff;
  border-radius: 14px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  animation: customModalFade 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  border: 1px solid #e2e8f0;
}
.custom-modal-header {
  padding: 22px 24px 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.custom-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.custom-modal-icon.icon-danger {
  background: #fef2f2;
  color: #ef4444;
}
.custom-modal-icon.icon-warning {
  background: #fefce8;
  color: #ca8a04;
}
.custom-modal-icon.icon-info {
  background: #f0f7ff;
  color: #005781;
}
.custom-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}
.custom-modal-body {
  padding: 8px 24px 22px;
  font-size: 14.5px;
  line-height: 1.6;
  color: #334155;
}
.custom-modal-footer {
  padding: 14px 24px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.custom-modal-btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.custom-modal-btn-cancel {
  background: #ffffff;
  color: #64748b;
  border: 1px solid #cbd5e1;
}
.custom-modal-btn-cancel:hover {
  background: #f1f5f9;
  color: #334155;
}
.custom-modal-btn-confirm {
  background: #005781;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 87, 129, 0.25);
}
.custom-modal-btn-confirm:hover {
  background: #004263;
  transform: translateY(-1px);
}
.custom-modal-btn-confirm.danger-btn {
  background: #dc2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}
.custom-modal-btn-confirm.danger-btn:hover {
  background: #b91c1c;
}

/* Long List of Cancer Categories */
.cancer-categories-list-card {
  background: var(--surface-color, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.cancer-categories-header {
  background: linear-gradient(135deg, #005781 0%, #003f5e 100%);
  color: #ffffff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cancer-categories-header h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cancer-categories-header .count-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.cancer-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 20px;
  background: #f8fafc;
}

.cancer-cat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  color: #1e293b;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.cancer-cat-item:hover {
  border-color: #005781;
  background: #f0f7fa;
  color: #005781;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 87, 129, 0.12);
}

.cancer-cat-item .cat-icon {
  display: none !important;
}

.cancer-cat-item .cat-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cancer-cat-item .cat-count {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.cancer-cat-item:hover .cat-count {
  background: #e0f2fe;
  color: #0369a1;
}

.cancer-cat-item .cat-arrow {
  font-size: 12px;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.cancer-cat-item:hover .cat-arrow {
  color: #005781;
  transform: translateX(4px);
}

@media (max-width: 640px) {
  .cancer-categories-grid {
    grid-template-columns: 1fr;
    padding: 14px;
    gap: 10px;
  }
}
