/* =========================================================
   PoultryRates.today - Production Stylesheet
   Clean, Fast, Mobile-First Utility Design
   Zero heavy frameworks. Highly optimized for Core Web Vitals.
   ========================================================= */

:root {
  --primary: #166534;
  --primary-hover: #14532d;
  --primary-light: #f0fdf4;
  --primary-border: #bbf7d0;
  --accent: #d97706;
  --accent-light: #fffbeb;
  --accent-border: #fde68a;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-alt: #f1f5f9;
  --border: #e2e8f0;
  --border-dark: #cbd5e1;
  --success: #15803d;
  --success-bg: #dcfce7;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --neutral-bg: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 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.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --radius: 8px;
  --radius-lg: 12px;
  --max-w: 1200px;
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

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

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Header & Navbar */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand-link:hover {
  text-decoration: none;
}
.brand-link .dot-today {
  color: var(--accent);
}
.brand-badge {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: all 0.15s ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background-color: var(--primary-light);
  text-decoration: none;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-main);
}
.mobile-menu-btn:focus {
  outline: 2px solid var(--primary);
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  z-index: 100;
}
.mobile-drawer.open {
  display: block;
}
.drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 320px;
  height: 100%;
  background-color: #ffffff;
  padding: 1.5rem;
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}
.drawer-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}
.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.drawer-nav .nav-link {
  font-size: 1.1rem;
  padding: 10px 12px;
}

/* Hero & Announcement Bar */
.top-notice-bar {
  background: linear-gradient(90deg, #14532d, #166534);
  color: #f0fdf4;
  padding: 6px 0;
  font-size: 0.82rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.notice-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #4ade80;
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-section {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 2rem 0 1.5rem;
}
.hero-title {
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}
.hero-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 780px;
  margin-bottom: 1.25rem;
}
.hero-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background-color: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text-muted);
}
.meta-item strong {
  color: var(--text-main);
}
.badge-source {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Rate Cards Grid */
.rate-cards-section {
  padding: 2rem 0;
}
.section-heading {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.rate-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}
.rate-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-dark);
}
.rate-card.featured {
  border-top: 4px solid var(--primary);
}
.card-type {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}
.card-price {
  font-size: 1.95rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}
.card-price small {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 0.65rem;
  font-size: 0.82rem;
}
.change-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
}
.change-positive {
  background-color: var(--danger-bg);
  color: var(--danger);
}
.change-negative {
  background-color: var(--success-bg);
  color: var(--success);
}
.change-neutral {
  background-color: var(--neutral-bg);
  color: var(--text-light);
}

/* Rate Table */
.table-section {
  padding: 1rem 0 2.5rem;
}
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.search-box-wrap {
  position: relative;
  width: 100%;
  max-width: 320px;
}
.search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  font-size: 0.92rem;
  outline: none;
}
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.12);
}
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.rate-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
  min-width: 680px;
}
.rate-table th {
  background-color: #f8fafc;
  color: var(--text-main);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.rate-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}
.rate-table tbody tr:last-child td {
  border-bottom: none;
}
.rate-table tbody tr:hover {
  background-color: #fbfcfe;
}
.city-cell {
  font-weight: 700;
}
.city-cell a {
  color: var(--text-main);
}
.city-cell a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.province-tag {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: normal;
  display: block;
}
.table-action-btn {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  padding: 4px 10px;
  border-radius: var(--radius);
  white-space: nowrap;
}
.table-action-btn:hover {
  background: var(--primary);
  color: #ffffff;
  text-decoration: none;
}

/* Informational Content Boxes */
.info-card {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.info-card h2, .info-card h3 {
  color: var(--text-main);
  margin-bottom: 0.75rem;
}
.info-card p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.info-card ul, .info-card ol {
  padding-left: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.info-card li {
  margin-bottom: 0.5rem;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-question:hover {
  background-color: #f8fafc;
}
.faq-answer {
  display: none;
  padding: 0 1.25rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.faq-item.open .faq-answer {
  display: block;
}
.faq-icon {
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* Disclaimer Box */
.disclaimer-box {
  background-color: #fffbeb;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  color: #78350f;
  margin: 1.5rem 0;
}
.disclaimer-box strong {
  color: #92400e;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}
.breadcrumbs a {
  color: var(--text-muted);
}
.breadcrumbs span.current {
  color: var(--primary);
  font-weight: 600;
}

/* City Page Specific */
.city-header-wrap {
  padding: 1.5rem 0 1rem;
}
.history-chart-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  margin-top: 1rem;
}

/* Related Cities Grid */
.related-cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.related-city-chip {
  display: block;
  padding: 8px 12px;
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-main);
  transition: all 0.15s ease;
}
.related-city-chip:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
  text-decoration: none;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.blog-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.blog-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}
.blog-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}
.blog-card-title a {
  color: var(--text-main);
}
.blog-card-title a:hover {
  color: var(--primary);
}
.blog-card-excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex: 1;
}
.read-more-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
}

/* Single Post Page */
.post-header {
  margin-bottom: 1.5rem;
}
.post-title {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}
.post-meta-details {
  display: flex;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}
.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-main);
}
.article-body p {
  margin-bottom: 1.25rem;
}
.article-body h2, .article-body h3, .article-body h4 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

/* Contact Grid */
.contact-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.contact-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background-color: #0f172a;
  color: #cbd5e1;
  padding: 2.5rem 0 1.5rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand h4 {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.footer-links-col h5 {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.footer-links-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-links-col a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links-col a:hover {
  color: #ffffff;
}
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: #64748b;
}

/* Feature Grid & Informational Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.feature-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.75rem;
}
.feature-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.feature-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}
.feature-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.yield-table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.yield-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}
.yield-table th {
  background: #f8fafc;
  color: var(--text-main);
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
}
.yield-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.yield-table tr:last-child td {
  border-bottom: none;
}
.yield-table tr:hover {
  background: #f8fafc;
}
.tip-box {
  background: #fffbeb;
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.25rem 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #78350f;
}
.tip-box strong {
  color: #92400e;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .hero-title {
    font-size: 1.65rem;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .hero-meta-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .post-title {
    font-size: 1.7rem;
  }
  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box-wrap {
    max-width: 100%;
  }
}
