:root {
  --primary: #ea580c;
  --primary-hover: #c2410c;
  --primary-light: #ffedd5;
  --secondary: #b45309;
  --dark: #1c1917;
  --dark-surface: #292524;
  --gray-100: #f5f5f4;
  --gray-200: #e7e5e4;
  --gray-300: #d6d3d1;
  --gray-600: #57534e;
  --gray-800: #292524;
  --white: #ffffff;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--gray-100);
  color: var(--dark);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Announcement Bar */
.top-bar {
  background-color: var(--dark);
  color: #a8a29e;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid #44403c;
}
.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-links a {
  margin-left: 16px;
  color: #d6d3d1;
}
.top-links a:hover {
  color: var(--primary);
}

/* Header */
.site-header {
  background-color: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 20px;
}
.site-logo {
  display: flex;
  align-items: center;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--dark);
}
.logo-flame {
  font-size: 1.8rem;
  margin-right: 6px;
}
.logo-accent {
  color: var(--primary);
}

.header-search-form {
  flex: 1;
  max-width: 400px;
  display: flex;
  position: relative;
}
.header-search-form input {
  width: 100%;
  padding: 10px 42px 10px 16px;
  border-radius: 50px;
  border: 1px solid var(--gray-300);
  background-color: var(--gray-100);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
}
.header-search-form input:focus {
  border-color: var(--primary);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}
.header-search-form button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.main-nav ul {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 24px;
}
.main-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray-800);
  padding: 6px 0;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--primary);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

/* Tăng độ ưu tiên để không bị ghi đè bởi CSS của main-nav */
.nav-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--white);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 10px 0;
  min-width: 240px;
  display: none; /* Sẽ hoạt động bình thường */
  flex-direction: column;
  z-index: 200;
  border: 1px solid var(--gray-200);
}

.nav-dropdown:hover .dropdown-menu {
  display: flex;
}

.dropdown-menu li a {
  padding: 10px 18px;
  display: block;
  font-size: 0.9rem;
  color: var(--gray-800);
}

.dropdown-menu li a:hover {
  background-color: var(--primary-light);
  color: var(--primary-hover);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.mobile-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--dark);
  display: block;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #1c1917 0%, #292524 60%, #44403c 100%);
  color: var(--white);
  padding: 70px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-content {
  max-width: 800px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  background-color: var(--primary);
  color: var(--white);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -1px;
}
.hero p {
  font-size: 1.2rem;
  color: #d6d3d1;
  margin-bottom: 32px;
}
.hero-search-box {
  background: var(--white);
  border-radius: 50px;
  padding: 6px 8px;
  display: flex;
  max-width: 600px;
  margin: 0 auto 24px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
}
.hero-search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 20px;
  font-size: 1.05rem;
  border-radius: 50px;
}
.hero-search-box button {
  background-color: var(--primary);
  color: var(--white);
  border: none;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s;
}
.hero-search-box button:hover {
  background-color: var(--primary-hover);
}
.hero-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.9rem;
}
.hero-pills a {
  background: rgba(255,255,255,0.12);
  color: #e7e5e4;
  padding: 6px 14px;
  border-radius: 50px;
  transition: background 0.2s;
}
.hero-pills a:hover {
  background: var(--primary);
  color: var(--white);
}

/* Category Cards Grid */
.section-header {
  margin: 48px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.section-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark);
}
.section-header a {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
}
.section-header a:hover {
  text-decoration: underline;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}
.category-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.cat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}
.category-card h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: var(--dark);
}
.category-card p {
  color: var(--gray-600);
  font-size: 0.88rem;
  flex: 1;
  margin-bottom: 14px;
}
.cat-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

/* Recipe & Article Card Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
  margin-bottom: 50px;
}
.article-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-img-wrapper {
  position: relative;
  height: 200px;
  background-color: var(--dark-surface);
  overflow: hidden;
}
.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.article-card:hover .card-img {
  transform: scale(1.05);
}
.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(28, 25, 23, 0.85);
  backdrop-filter: blur(4px);
  color: var(--white);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.card-wood {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--primary);
  color: var(--white);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}
.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-bottom: 8px;
}
.card-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--dark);
}
.card-body h3 a:hover {
  color: var(--primary);
}
.card-summary {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 18px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  border-top: 1px solid var(--gray-200);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--gray-600);
}
.card-time {
  font-weight: 600;
  color: var(--dark);
}

/* Recipes Filter Layout */
.filter-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  margin-top: 32px;
}
.filter-sidebar {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  height: fit-content;
}
.filter-sidebar h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.reset-filter-btn {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}
.filter-group {
  margin-bottom: 22px;
}
.filter-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--gray-800);
}
.filter-group select, .filter-group input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  font-size: 0.9rem;
  background: var(--white);
  outline: none;
}
.filter-submit-btn {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}
.filter-submit-btn:hover {
  background: var(--primary-hover);
}

/* Search Bar & Active Filters Bar */
.results-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.results-count {
  font-size: 1.1rem;
  font-weight: 700;
}
.sort-controls select {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  font-size: 0.9rem;
  background: var(--white);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0;
}
.pagination a, .pagination span {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--gray-300);
  font-weight: 600;
  font-size: 0.9rem;
}
.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.pagination .active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Single Recipe Article Page */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumbs a:hover {
  color: var(--primary);
}

.recipe-header {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.recipe-title {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.recipe-byline {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.recipe-lead-summary {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--gray-800);
  margin-bottom: 30px;
}

.pitmaster-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  background: var(--gray-100);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  margin-bottom: 24px;
}
.spec-box {
  text-align: center;
}
.spec-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--gray-600);
  font-weight: 700;
  margin-bottom: 4px;
}
.spec-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dark);
}

.recipe-actions {
  display: flex;
  gap: 12px;
}
.action-btn {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.action-btn-primary {
  background: var(--primary);
  color: var(--white);
}
.action-btn-primary:hover {
  background: var(--primary-hover);
}
.action-btn-secondary {
  background: var(--gray-200);
  color: var(--dark);
}
.action-btn-secondary:hover {
  background: var(--gray-300);
}

/* Recipe Content Layout */
.recipe-content-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 36px;
  margin-bottom: 60px;
}
.recipe-card-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  margin-bottom: 36px;
}
.recipe-card-box h2 {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 10px;
}

/* Interactive Ingredients List */
.ingredients-list {
  list-style: none;
}
.ingredient-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1.05rem;
}
.ingredient-item input[type="checkbox"] {
  margin-top: 5px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}
.ingredient-item.checked span {
  text-decoration: line-through;
  color: #a8a29e;
}

/* Instructions Steps */
.instructions-list {
  list-style: none;
  counter-reset: step-counter;
}
.instruction-step {
  position: relative;
  padding-left: 56px;
  margin-bottom: 26px;
}
.instruction-step::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}
.instruction-step p {
  font-size: 1.05rem;
  line-height: 1.65;
}

/* Sidebar Widgets */
.recipe-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sidebar-box {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.sidebar-box h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 10px;
}
.nutrition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.nutrition-item {
  background: var(--gray-100);
  padding: 10px;
  border-radius: var(--radius-sm);
  text-align: center;
}
.nutrition-item .val {
  display: block;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--dark);
}
.nutrition-item .label {
  font-size: 0.75rem;
  color: var(--gray-600);
  text-transform: uppercase;
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 0;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--dark);
}
.faq-question:hover {
  color: var(--primary);
}
.faq-answer {
  display: none;
  padding-top: 10px;
  color: var(--gray-600);
  line-height: 1.6;
}
.faq-item.open .faq-answer {
  display: block;
}
.faq-icon {
  font-size: 1.2rem;
  transition: transform 0.2s;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: #d6d3d1;
  padding: 60px 0 30px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-logo {
  display: flex;
  align-items: center;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 16px;
}
.about-col p {
  color: #a8a29e;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.footer-col h4 {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 10px;
}
.footer-col a {
  color: #a8a29e;
  font-size: 0.9rem;
}
.footer-col a:hover {
  color: var(--primary);
}
.newsletter-form input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #44403c;
  background: #292524;
  color: var(--white);
  margin-bottom: 8px;
  outline: none;
}
.newsletter-form button {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
}
.footer-admin-link {
  margin-top: 14px;
  font-size: 0.8rem;
  color: #78716c;
}
.footer-admin-link a {
  color: #78716c;
}

/* Print Stylesheet */
@media print {
  .site-header, .top-bar, .site-footer, .recipe-actions, .recipe-sidebar, .newsletter-form, .breadcrumbs {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .recipe-content-layout {
    display: block !important;
  }
  .recipe-header, .recipe-card-box {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .header-search-form { display: none; }
  .mobile-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 16px; }
  .filter-layout { grid-template-columns: 1fr; }
  .recipe-content-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
}
