/* ==========================================================================
   FitoApp — Google Material Design 3 News Portal Styles (css/noticias.css)
   Pure CSS • 100% Responsive (320px - 1440px) • Zero External Frameworks
   Integrated with tokens-m3.css and tailwind.min.css
   ========================================================================== */

/* 1. Article Typography & Prose Rhythm (Optimized for readability) */
.prose-noticia {
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 1.0625rem; /* 17px */
  line-height: 1.75;
  color: var(--md-sys-color-on-surface);
  max-width: 72ch; /* Optimal reading line length */
}

.prose-noticia p {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  letter-spacing: -0.005em;
}

.prose-noticia h2 {
  font-family: "Plus Jakarta Sans", Roboto, sans-serif;
  font-size: 1.5rem; /* 24px */
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--md-sys-color-on-surface);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prose-noticia h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.25em;
  background-color: var(--md-sys-color-primary);
  border-radius: 9999px;
  flex-shrink: 0;
}

.prose-noticia h3 {
  font-family: "Plus Jakarta Sans", Roboto, sans-serif;
  font-size: 1.25rem; /* 20px */
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--md-sys-color-on-surface);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose-noticia strong,
.prose-noticia b {
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
}

.prose-noticia ul,
.prose-noticia ol {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose-noticia ul {
  list-style-type: disc;
}

.prose-noticia ol {
  list-style-type: decimal;
}

.prose-noticia li {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.prose-noticia blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--md-sys-color-primary);
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: 0 16px 16px 0;
  font-style: italic;
  color: var(--md-sys-color-on-surface-variant);
}

.prose-noticia a {
  color: var(--md-sys-color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.prose-noticia a:hover {
  filter: brightness(1.2);
}

/* 2. Structured Agronomic Takeaway Box (AEO / Perplexity / Google AI Overviews) */
.m3-takeaway-box {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border: 1.5px solid color-mix(in srgb, var(--md-sys-color-primary) 35%, transparent);
  border-radius: 20px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--md-elev-1);
  position: relative;
  overflow: hidden;
}

.m3-takeaway-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background-color: var(--md-sys-color-primary);
}

.m3-takeaway-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--md-sys-color-primary);
  margin-bottom: 0.625rem;
}

.m3-takeaway-content {
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--md-sys-color-on-secondary-container);
}

/* 3. Live Quotes Widget (Related commodities & praças from exact_quotes) */
.m3-quotes-widget {
  background-color: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: var(--md-elev-1);
}

.m3-quotes-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.m3-quotes-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.5rem;
  border-radius: 12px;
  transition: background-color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
}

.m3-quotes-item:hover {
  background-color: var(--md-sys-color-surface-container-high);
  transform: translateX(2px);
}

.m3-quotes-price {
  font-family: "Roboto Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--md-sys-color-on-surface);
}

/* 4. WhatsApp Sharing Button & Floating Bar */
.m3-btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  background-color: #25D366;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.35);
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.m3-btn-whatsapp:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.45);
  color: #FFFFFF;
}

.m3-btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--md-sys-color-outline-variant);
  background-color: var(--md-sys-color-surface-container-lowest);
  color: var(--md-sys-color-on-surface);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.m3-btn-copy:hover {
  background-color: var(--md-sys-color-surface-container-high);
}

/* 5. Editorial Badge & Anti-Hallucination Stamp */
.m3-editorial-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 30%, transparent);
}

.m3-audit-box {
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin-top: 2rem;
  font-size: 0.8125rem;
  color: var(--md-sys-color-on-surface-variant);
}

/* 6. Category Navigation Tabs (Scrollable Mobile, Wrapping Desktop) */
.m3-category-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none; /* Firefox */
  -webkit-overflow-scrolling: touch;
}

.m3-category-tabs::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

/* 7. Hero News Card */
.m3-news-hero {
  background: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 24px;
  box-shadow: var(--md-elev-1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.m3-news-hero:hover {
  border-color: var(--md-sys-color-primary);
  box-shadow: var(--md-elev-2);
}

/* 8. Chronological News Card */
.m3-news-card {
  display: flex;
  flex-direction: column;
  background-color: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: var(--md-elev-1);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  height: 100%;
}

.m3-news-card:hover {
  transform: translateY(-2px);
  border-color: var(--md-sys-color-primary);
  box-shadow: var(--md-elev-2);
}

.m3-news-card-title {
  font-family: "Plus Jakarta Sans", Roboto, sans-serif;
  font-weight: 700;
  font-size: 1.125rem; /* 18px */
  line-height: 1.35;
  color: var(--md-sys-color-on-surface);
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
}

.m3-news-card:hover .m3-news-card-title {
  color: var(--md-sys-color-primary);
}

.m3-news-card-excerpt {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--md-sys-color-on-surface-variant);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
  flex: 1 1 auto;
}

/* 9. Breadcrumbs Navigation */
.m3-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 1.25rem;
}

.m3-breadcrumbs a {
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  transition: color 0.15s ease;
}

.m3-breadcrumbs a:hover {
  color: var(--md-sys-color-primary);
  text-decoration: underline;
}

.m3-breadcrumbs-sep {
  color: var(--md-sys-color-outline);
  opacity: 0.7;
}

/* 10. Print Stylesheet */
@media print {
  .m3-topbar,
  .m3-ticker,
  .m3-bottom-nav,
  .m3-btn-whatsapp,
  .m3-btn-copy,
  #sidebar-col,
  footer {
    display: none !important;
  }

  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 12pt;
  }

  .prose-noticia {
    max-width: 100% !important;
  }

  .m3-takeaway-box {
    border: 1pt solid #000000 !important;
    background: #F4F4F4 !important;
    color: #000000 !important;
  }
}
