/* ============================================================
   FKR Prime — Biblioteca Técnica de Artigos e Diagnósticos
   Estilos dedicados para a página artigos.php
   ============================================================ */

:root {
  --articles-ink: #101820;
  --articles-blue: #0758d3;
  --articles-blue-dark: #063b8c;
  --articles-cyan: #72d4f5;
  --articles-paper: #f4f7f8;
  --articles-white: #ffffff;
  --articles-line: #d5dde2;
  --articles-muted: #52606b;
  --articles-badge-bg: #eaf1fb;
  --articles-card-shadow: 0 4px 20px rgba(16, 24, 32, 0.05);
  --articles-card-shadow-hover: 0 16px 36px rgba(7, 88, 211, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.articles-page {
  background: var(--articles-paper);
  color: var(--articles-ink);
}

.articles-page main {
  font-family: "Plus Jakarta Sans", sans-serif;
}

.articles-page h1,
.articles-page h2,
.articles-page h3,
.articles-page h4 {
  font-family: "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.035em;
}

.articles-page img {
  display: block;
}

.articles-shell {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

/* ============================================================
   Navbar Integrada (Tema Escuro Oficial)
   ============================================================ */
.articles-page > header {
  background: rgba(16, 24, 32, 0.97) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 8px 30px rgba(4, 10, 16, 0.12);
}

.articles-page .nav-link {
  color: #c8d1d8;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
}

.articles-page .nav-link:hover,
.articles-page .nav-link.active {
  color: #ffffff !important;
}

.articles-page .nav-link.active {
  border-color: var(--articles-cyan) !important;
}

.articles-page .btn-cta-navbar {
  border-radius: 0.5rem;
  background: var(--articles-blue);
  box-shadow: none;
}

/* ============================================================
   Hero Artigos
   ============================================================ */
.articles-hero {
  position: relative;
  overflow: hidden;
  padding: 8.5rem 0 5rem;
  background:
    linear-gradient(90deg, rgba(7, 88, 211, 0.075) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(rgba(7, 88, 211, 0.075) 1px, transparent 1px) 0 0 / 72px 72px,
    var(--articles-paper);
}

.articles-hero::before {
  content: "FKR";
  position: absolute;
  right: -0.04em;
  bottom: -0.22em;
  color: rgba(7, 88, 211, 0.045);
  font-size: clamp(12rem, 28vw, 30rem);
  font-weight: 900;
  letter-spacing: -0.1em;
  line-height: 0.7;
  pointer-events: none;
}

.articles-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.articles-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.35rem;
  color: var(--articles-blue-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.articles-kicker span {
  width: 2.5rem;
  height: 3px;
  background: var(--articles-blue);
  border-radius: 2px;
}

.articles-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--articles-ink);
  font-size: clamp(2.35rem, 4.5vw, 4.4rem);
  font-weight: 800;
  line-height: 1.05;
}

.articles-lead {
  max-width: 650px;
  margin: 1.5rem 0 0;
  color: var(--articles-muted);
  font-size: clamp(0.98rem, 1.4vw, 1.14rem);
  line-height: 1.75;
}

.articles-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.articles-button {
  min-height: 3.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}

.articles-button:hover {
  transform: translateY(-2px);
}

.articles-button:focus-visible {
  outline: 3px solid var(--articles-cyan);
  outline-offset: 3px;
}

.articles-button--primary {
  background: var(--articles-blue);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(7, 88, 211, 0.2);
}

.articles-button--primary:hover {
  background: var(--articles-blue-dark);
}

.articles-button--secondary {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--articles-line);
  color: var(--articles-ink);
}

.articles-button--secondary:hover {
  border-color: var(--articles-blue);
  background: #ffffff;
}

.articles-hero__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--articles-line);
}

.articles-hero__facts div dt {
  color: var(--articles-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.articles-hero__facts div dd {
  margin: 0.25rem 0 0;
  color: var(--articles-ink);
  font-size: 1.1rem;
  font-weight: 800;
}

/* Visual do Hero */
.articles-hero__visual {
  display: grid;
  grid-template-columns: 1fr 0.6fr;
  min-height: 480px;
  overflow: hidden;
  background: var(--articles-ink);
  border-radius: 0.75rem;
  box-shadow: 18px 18px 0 var(--articles-blue);
}

.articles-hero__visual figure {
  position: relative;
  min-height: 480px;
  margin: 0;
  overflow: hidden;
}

.articles-hero__visual figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(7, 14, 20, 0.88));
}

.articles-hero__visual figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.articles-hero__visual figcaption {
  position: absolute;
  z-index: 1;
  right: 1.1rem;
  bottom: 1.1rem;
  left: 1.1rem;
  color: #ffffff;
  font-size: 0.78rem;
  line-height: 1.45;
}

.articles-hero__visual figcaption span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--articles-cyan);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.articles-hero__visual aside {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.4rem;
  color: #ffffff;
}

.articles-hero__visual aside > p {
  margin: 0 0 0.8rem;
  color: var(--articles-cyan);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.articles-hero__visual aside ul {
  margin: 0;
  padding: 0;
  border-top: 1px solid #3a4751;
  list-style: none;
}

.articles-hero__visual aside li {
  padding: 0.7rem 0;
  border-bottom: 1px solid #3a4751;
  color: #c8d3db;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
}

/* ============================================================
   Barra de Filtros e Busca Rápida
   ============================================================ */
.articles-filter {
  position: sticky;
  z-index: 30;
  top: 5rem;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--articles-line);
  backdrop-filter: blur(12px);
  padding: 0.85rem 0;
}

.articles-filter__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.articles-filter__status {
  margin: 0;
  color: var(--articles-muted);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.articles-filter__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.articles-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.articles-search-box i {
  position: absolute;
  left: 0.85rem;
  color: var(--articles-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.articles-search-input {
  width: 220px;
  height: 2.5rem;
  padding: 0.4rem 0.85rem 0.4rem 2.3rem;
  border: 1px solid var(--articles-line);
  border-radius: 0.5rem;
  background: #ffffff;
  color: var(--articles-ink);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 150ms ease, box-shadow 150ms ease, width 200ms ease;
}

.articles-search-input:focus {
  outline: none;
  width: 270px;
  border-color: var(--articles-blue);
  box-shadow: 0 0 0 3px rgba(7, 88, 211, 0.12);
}

.articles-filter__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.article-filter-btn {
  height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid var(--articles-line);
  border-radius: 0.5rem;
  background: #ffffff;
  color: var(--articles-ink);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 150ms ease;
}

.article-filter-btn:hover {
  border-color: var(--articles-blue);
  color: var(--articles-blue);
}

.article-filter-btn.active {
  background: var(--articles-ink);
  border-color: var(--articles-ink);
  color: #ffffff;
}

/* ============================================================
   Seção de Listagem e Cards
   ============================================================ */
.articles-section {
  padding: 4.5rem 0 5rem;
}

.articles-section__header {
  margin-bottom: 2.75rem;
}

.articles-section__number {
  margin: 0 0 0.5rem;
  color: var(--articles-blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.articles-section__title {
  margin: 0;
  color: var(--articles-ink);
  font-size: clamp(1.8rem, 3.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
  margin-bottom: 3.5rem;
}

/* Card Individual (Layout Técnico Limpo Sem Imagem Conforme PATTERNS.md) */
.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
  background: #ffffff;
  border: 1px solid var(--articles-line);
  border-radius: 0.75rem;
  box-shadow: var(--articles-card-shadow);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  overflow: hidden;
}

.article-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--articles-line);
  transition: background-color 220ms ease;
}

.article-card:hover {
  transform: translateY(-5px);
  border-color: var(--articles-blue);
  box-shadow: var(--articles-card-shadow-hover);
}

.article-card:hover::before {
  background: var(--articles-blue);
}

.article-card.hidden-by-filter {
  display: none !important;
}

/* Topo do Card */
.article-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #edf1f4;
}

.article-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-brand-badge--lg {
  background: #fee2e2;
  color: #991b1b;
}

.article-brand-badge--samsung {
  background: #dbeafe;
  color: #1e40af;
}

.article-brand-badge--midea {
  background: #cffafe;
  color: #155e75;
}

.article-brand-badge--preventiva {
  background: #d1fae5;
  color: #065f46;
}

.article-brand-badge--geral {
  background: #f1f5f9;
  color: #334155;
}

.article-card__meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--articles-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.article-card__meta i {
  color: var(--articles-blue);
}

/* Corpo do Card */
.article-card__body {
  margin-bottom: 1.75rem;
}

.article-card__title {
  margin: 0 0 0.85rem;
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.35;
}

.article-card__title a {
  color: var(--articles-ink);
  text-decoration: none;
  transition: color 150ms ease;
}

.article-card__title a:hover {
  color: var(--articles-blue);
}

.article-card__excerpt {
  margin: 0 0 1.25rem;
  color: var(--articles-muted);
  font-size: 0.86rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.article-tag {
  padding: 0.2rem 0.55rem;
  border-radius: 0.25rem;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Rodapé do Card */
.article-card__footer {
  padding-top: 1.25rem;
  border-top: 1px solid #edf1f4;
}

.article-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--articles-blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: gap 180ms ease, color 180ms ease;
}

.article-card__link i {
  font-size: 0.95rem;
  transition: transform 180ms ease;
}

.article-card:hover .article-card__link {
  color: var(--articles-blue-dark);
  gap: 0.75rem;
}

.article-card:hover .article-card__link i {
  transform: translateX(3px);
}

/* Estado Vazio */
.articles-empty {
  display: none;
  text-align: center;
  padding: 4.5rem 2rem;
  background: #ffffff;
  border: 1px dashed var(--articles-line);
  border-radius: 0.75rem;
  margin-bottom: 3.5rem;
}

.articles-empty.visible {
  display: block;
}

.articles-empty i {
  font-size: 3.5rem;
  color: var(--articles-blue);
  margin-bottom: 1rem;
}

.articles-empty h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--articles-ink);
}

.articles-empty p {
  margin: 0;
  color: var(--articles-muted);
  font-size: 0.88rem;
}

/* ============================================================
   Paginação Visual
   ============================================================ */
.articles-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-family: inherit;
}

.articles-page-link {
  min-width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.85rem;
  border: 1px solid var(--articles-line);
  border-radius: 0.5rem;
  background: #ffffff;
  color: var(--articles-ink);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 150ms ease;
}

.articles-page-link:hover:not(.disabled):not(.active) {
  border-color: var(--articles-blue);
  color: var(--articles-blue);
  background: #ffffff;
}

.articles-page-link.active {
  background: var(--articles-blue);
  border-color: var(--articles-blue);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(7, 88, 211, 0.25);
}

.articles-page-link.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--articles-paper);
}

/* ============================================================
   Card CTA WhatsApp (Conversão Máxima — Sem Email)
   ============================================================ */
.articles-cta {
  padding: 4.5rem 0 5.5rem;
  background: #ffffff;
  border-top: 1px solid var(--articles-line);
}

.articles-cta__box {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 5vw, 4rem);
  background: linear-gradient(135deg, #101820 0%, #063b8c 65%, #0758d3 100%);
  border-radius: 1rem;
  color: #ffffff;
  box-shadow: 0 20px 40px rgba(7, 88, 211, 0.15);
}

.articles-cta__box::after {
  content: "FKR";
  position: absolute;
  right: -0.05em;
  bottom: -0.25em;
  font-size: clamp(8rem, 16vw, 18rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  color: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  line-height: 0.8;
}

.articles-cta__inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.articles-cta__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.95rem;
  border-radius: 9999px;
  background: rgba(114, 212, 245, 0.16);
  border: 1px solid rgba(114, 212, 245, 0.35);
  color: var(--articles-cyan);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.articles-cta__title {
  margin: 0 0 1rem;
  color: #ffffff;
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
}

.articles-cta__desc {
  margin: 0 0 2rem;
  color: #c8d7e6;
  font-size: clamp(0.92rem, 1.3vw, 1.05rem);
  line-height: 1.7;
}

.articles-cta__button {
  min-height: 3.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.95rem 2rem;
  border-radius: 0.5rem;
  background: #25d366;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.3);
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.articles-cta__button i {
  font-size: 1.35rem;
}

.articles-cta__button:hover {
  background: #20bd5a;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 36px rgba(37, 211, 102, 0.4);
}

.articles-cta__button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

/* ============================================================
   Animações Reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 550ms cubic-bezier(0.16, 1, 0.3, 1), transform 550ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }

/* ============================================================
   Responsividade
   ============================================================ */
@media (max-width: 991px) {
  .articles-hero__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .articles-hero__visual {
    max-width: 600px;
  }

  .articles-filter__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .articles-filter__controls {
    justify-content: space-between;
  }

  .articles-search-input {
    width: 100%;
  }

  .articles-search-box {
    flex: 1;
  }
}

@media (max-width: 640px) {
  .articles-hero {
    padding: 7rem 0 3.5rem;
  }

  .articles-hero__visual {
    grid-template-columns: 1fr;
    min-height: auto;
    box-shadow: 10px 10px 0 var(--articles-blue);
  }

  .articles-hero__visual figure {
    min-height: 280px;
  }

  .articles-hero__visual aside {
    padding: 1.25rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .articles-actions {
    flex-direction: column;
  }

  .articles-button {
    width: 100%;
  }

  .articles-filter__controls {
    flex-direction: column;
    align-items: stretch;
  }

  .articles-filter__buttons {
    justify-content: flex-start;
  }

  .articles-cta__box {
    padding: 2rem 1.25rem;
  }

  .articles-cta__button {
    width: 100%;
    font-size: 0.85rem;
  }
}
