/* ==========================================================================
   YHCT SEO STYLESHEET - Tối ưu Core Web Vitals, Load Tức Thì (<5ms), Chuẩn Y Khoa
   ========================================================================== */

:root {
  --primary: #1a5632;
  --primary-hover: #134226;
  --primary-light: #eaf5ed;
  --primary-border: #c2e2cc;
  --accent: #b45309;
  --accent-light: #fef3c7;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --font-base: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.68;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* Header & Nav */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.95);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.15rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--primary);
}

.site-menu-btn {
  display: none;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.site-menu-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
}

@media (max-width: 768px) {
  .site-menu-btn {
    display: inline-flex;
  }
  .site-header .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 2px solid var(--primary);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    flex-direction: column;
    padding: 14px 20px;
    gap: 8px;
    z-index: 999;
  }
  .site-header.menu-open .nav-links {
    display: flex;
  }
  .site-header .nav-links li {
    width: 100%;
  }
  .site-header .nav-links a {
    display: flex;
    align-items: center;
    padding: 11px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
  }
  .site-header .nav-links a:hover {
    background: var(--primary-light);
    border-color: var(--primary-border);
    color: var(--primary);
  }
  .site-header .nav-links .btn-app-main {
    background: var(--primary) !important;
    color: #ffffff !important;
    justify-content: center;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(26, 86, 50, 0.25);
  }
  .logo-area {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .logo-icon {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
}

.btn-app-main {
  background: var(--primary);
  color: #ffffff !important;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(26, 86, 50, 0.2);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-app-main:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Breadcrumbs */
.breadcrumb-container {
  max-width: 960px;
  margin: 16px auto 0;
  padding: 0 20px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 0.88rem;
  color: var(--text-muted);
}

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

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

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

/* Main Container */
.main-container {
  max-width: 960px;
  margin: 20px auto 40px;
  padding: 0 20px;
}

/* Article Card */
.article-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 36px;
}

@media (max-width: 640px) {
  .article-card {
    padding: 20px;
  }
}

/* Article Header */
.badge-group {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.badge-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid #fde68a;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
  margin-left: 6px;
}

h1.article-title {
  font-size: 1.85rem;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.article-subtitle {
  font-size: 1.15rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 24px;
}

/* AI / Quick Summary Box for Google Gemini & Featured Snippet */
.quick-summary-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #e6f7ec 100%);
  border: 1px solid #bbf7d0;
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-bottom: 30px;
}

.quick-summary-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-summary-list {
  list-style: none;
  font-size: 0.95rem;
}

.quick-summary-list li {
  margin-bottom: 6px;
}

.quick-summary-list strong {
  color: #14532d;
}

/* Section styling */
.content-section {
  margin-bottom: 28px;
}

.content-section h2 {
  font-size: 1.25rem;
  color: #0f172a;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border-light);
}

.section-body {
  font-size: 1.02rem;
  color: #334155;
  white-space: pre-line;
}

.recipe-box {
  background: #fdfbf7;
  border: 1px solid #fed7aa;
  border-left: 4px solid #f97316;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-family: inherit;
  font-size: 1rem;
}

/* Interactive Actions Bar */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-main);
  transition: all 0.15s ease;
}

.btn-action:hover {
  background: var(--bg);
  border-color: var(--text-light);
}

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

.btn-action-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Related items list */
.related-box {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 36px;
  border: 1px solid var(--border);
}

.related-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.related-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s, border-color 0.15s;
}

.related-item:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.related-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
}

.related-item-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Medical Disclaimer (Google E-E-A-T) */
.disclaimer-box {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: #92400e;
  margin-top: 30px;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 30px 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 12px;
  list-style: none;
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Category Index Page Specific */
.category-search-bar {
  margin: 20px 0;
  display: flex;
  gap: 10px;
}

.category-search-input {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.category-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 50, 0.1);
}

.category-group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.category-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.category-group-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

.category-group-count {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.category-item-list {
  list-style: none;
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.category-item-list a {
  color: var(--text-main);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: block;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.category-item-list a:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

/* Prompt Box (Hiển thị khi chưa tìm kiếm) */
.category-prompt-box {
  background: #ffffff;
  border: 1px dashed var(--primary-border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  margin: 20px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.prompt-icon {
  font-size: 42px;
  margin-bottom: 12px;
}

.prompt-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.prompt-desc {
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 20px auto;
  line-height: 1.5;
  font-size: 0.95rem;
}

.prompt-chips-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 10px;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 700px;
  margin: 0 auto;
}

.prompt-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.prompt-chip:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
  transform: translateY(-1px);
}

/* Kết quả tìm kiếm đếm số lượng */
.search-results-counter {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 0.95rem;
}

.search-results-counter.match-found {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.search-results-counter.no-match {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* Anti-Scraping & Copy Protection */
.prevent-bulk-copy {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.recipe-box {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Herb Link within Recipe Details */
.herb-link {
  color: #0d9488;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #99f6e4;
  transition: all 0.2s ease;
  padding: 1px 4px;
  border-radius: 4px;
  display: inline;
}

.herb-link:hover {
  color: #0f766e;
  background-color: #ccfbf1;
  text-decoration-color: #0f766e;
}

/* App Download Banner & Buttons */
.btn-download-app {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  color: #ffffff !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3) !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
}

.btn-download-app:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.4) !important;
}

.app-download-card {
  margin: 24px 0 16px 0;
  padding: 18px 22px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid #334155;
  border-radius: 14px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.app-download-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-download-icon {
  font-size: 32px;
  line-height: 1;
}

.app-download-info h3 {
  margin: 0 0 4px 0;
  font-size: 1.05rem;
  color: #38bdf8;
  font-weight: 700;
}

.app-download-info p {
  margin: 0;
  font-size: 0.86rem;
  color: #cbd5e1;
  max-width: 520px;
  line-height: 1.4;
}

.btn-download-app-cta {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-download-app-cta:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.4);
}

.footer-social-links a {
  transition: transform 0.2s, opacity 0.2s;
}

.footer-social-links a:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

/* Print Optimization */
@media print {
  .site-header, .action-bar, .app-download-card, .related-box, .site-footer, .breadcrumb-container {
    display: none !important;
  }
  .article-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
}

