/* ==========================================================================
   Oreo Engenharia — Blog Institucional (blog.css)
   Arquitetura de estilos estáticos, modulares e de alta performance
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HERO EDITORIAL & LISTAGEM
   -------------------------------------------------------------------------- */
.blog-hero {
  padding: 140px 0 60px;
  background: radial-gradient(circle at 80% 20%, rgba(217, 180, 60, 0.12) 0%, transparent 60%),
              linear-gradient(180deg, var(--navy) 0%, #0c1820 100%);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 12px 0 16px;
  max-width: 900px;
}

.blog-hero p.subtitle {
  font-size: 1.18rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
  max-width: 760px;
  margin: 0;
}

/* --------------------------------------------------------------------------
   2. FILTROS POR CATEGORIA (PILLS)
   -------------------------------------------------------------------------- */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  text-decoration: none;
}

.filter-btn:hover,
.filter-btn:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(217, 180, 60, 0.1);
  outline: none;
}

.filter-btn.active {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  box-shadow: 0 4px 14px rgba(217, 180, 60, 0.25);
}

/* --------------------------------------------------------------------------
   3. ARTIGO EM DESTAQUE (FEATURED POST)
   -------------------------------------------------------------------------- */
.featured-section {
  padding: 60px 0 40px;
}

.featured-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  background: var(--white);
  border: 1px solid rgba(16, 31, 41, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(16, 31, 41, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(16, 31, 41, 0.12);
}

.featured-photo {
  position: relative;
  overflow: hidden;
  min-height: 340px;
}

.featured-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card:hover .featured-photo img {
  transform: scale(1.05);
}

.featured-content {
  padding: 40px 36px 40px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 12px;
}

.post-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(217, 180, 60, 0.15);
  color: #8f6e0f;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 4px;
}

.featured-content h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 16px;
}

.featured-content h2 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.featured-content h2 a:hover {
  color: var(--gold);
}

.featured-content p {
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 24px;
}

/* --------------------------------------------------------------------------
   4. GRID DE ARTIGOS
   -------------------------------------------------------------------------- */
.blog-feed-section {
  padding: 40px 0 100px;
}

.feed-header {
  margin-bottom: 36px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid rgba(16, 31, 41, 0.08);
  padding-bottom: 16px;
}

.feed-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.article-card {
  background: var(--white);
  border: 1px solid rgba(16, 31, 41, 0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(16, 31, 41, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(16, 31, 41, 0.1);
}

.card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .card-thumb img {
  transform: scale(1.06);
}

.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-body .post-meta {
  margin-bottom: 10px;
}

.article-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy);
  margin: 0 0 12px;
}

.article-card h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-card h3 a:hover {
  color: var(--gold);
}

.article-card p {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 20px;
  flex-grow: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  margin-top: auto;
  transition: gap 0.2s ease, color 0.2s ease;
}

.card-link:hover {
  color: var(--sand);
  gap: 10px;
}

/* --------------------------------------------------------------------------
   5. PÁGINA INDIVIDUAL DO ARTIGO (LAYOUT EDITORIAL)
   -------------------------------------------------------------------------- */
.post-header-section {
  padding: 130px 0 40px;
  background: radial-gradient(circle at 90% 10%, rgba(217, 180, 60, 0.08) 0%, transparent 60%),
              linear-gradient(180deg, var(--navy) 0%, #0e1c25 100%);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--gold);
}

.breadcrumb span.sep {
  opacity: 0.4;
}

.post-header-content {
  max-width: 860px;
}

.post-header-content .post-badge {
  background: rgba(217, 180, 60, 0.2);
  color: var(--gold);
  margin-bottom: 16px;
}

.post-header-content h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--white);
}

.post-lead {
  font-size: 1.2rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 24px;
}

.post-header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.post-header-meta strong {
  color: var(--white);
}

/* Corpo Editorial do Post */
.post-body-section {
  padding: 50px 0 90px;
  background: #fbfcfb;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 50px;
  align-items: start;
}

.post-main {
  max-width: 780px;
}

/* Imagem de Capa do Artigo */
.post-cover {
  margin: 0 0 36px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(16, 31, 41, 0.08);
}

.post-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.post-cover figcaption {
  padding: 10px 16px;
  font-size: 0.85rem;
  color: #64748b;
  background: var(--white);
  border-top: 1px solid rgba(16, 31, 41, 0.06);
  font-style: italic;
}

/* Conteúdo Tipográfico */
.post-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #1e293b;
}

.post-content h2 {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--navy);
  margin: 44px 0 18px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(16, 31, 41, 0.06);
}

.post-content h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin: 32px 0 14px;
  line-height: 1.35;
}

.post-content p {
  margin: 0 0 22px;
}

.post-content ul,
.post-content ol {
  margin: 0 0 24px;
  padding-left: 26px;
}

.post-content li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.post-content strong {
  color: var(--navy);
  font-weight: 600;
}

.post-content a {
  color: #0284c7;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.post-content a:hover {
  color: var(--gold);
}

/* Caixas de Destaque Técnico */
.callout-box {
  background: rgba(217, 180, 60, 0.08);
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 20px 24px;
  margin: 32px 0;
}

.callout-box strong.callout-title {
  display: block;
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 8px;
}

.callout-box p:last-child {
  margin-bottom: 0;
}

/* Tabelas Técnicas Comparativas */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 36px 0;
  border: 1px solid rgba(16, 31, 41, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(16, 31, 41, 0.03);
}

.tech-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.tech-table th {
  background: var(--navy);
  color: var(--white);
  padding: 14px 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tech-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(16, 31, 41, 0.08);
  color: #334155;
}

.tech-table tr:nth-child(even) td {
  background: rgba(16, 31, 41, 0.02);
}

.tech-table tr:hover td {
  background: rgba(217, 180, 60, 0.08);
}

/* --------------------------------------------------------------------------
   6. BLOCO DE AUTORIA CORPORATIVA & COMPARTILHAMENTO
   -------------------------------------------------------------------------- */
.author-card {
  background: var(--white);
  border: 1px solid rgba(16, 31, 41, 0.08);
  border-radius: 12px;
  padding: 28px;
  margin-top: 50px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
  box-shadow: 0 4px 16px rgba(16, 31, 41, 0.04);
}

.author-badge-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gold);
}

.author-badge-icon img {
  width: 44px;
  height: auto;
}

.author-info h3 {
  font-size: 1.2rem;
  color: var(--navy);
  margin: 0 0 6px;
}

.author-info p {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.55;
  margin: 0;
}

/* Compartilhamento Social Estático */
.share-bar {
  margin-top: 36px;
  padding: 20px 0;
  border-top: 1px solid rgba(16, 31, 41, 0.08);
  border-bottom: 1px solid rgba(16, 31, 41, 0.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.share-bar span {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
}

.share-buttons {
  display: flex;
  gap: 10px;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-share.whatsapp {
  background: #25D366;
  color: #ffffff;
}

.btn-share.whatsapp:hover {
  background: #1eb956;
}

.btn-share.linkedin {
  background: #0077B5;
  color: #ffffff;
}

.btn-share.linkedin:hover {
  background: #005f93;
}

.btn-share.copy {
  background: var(--paper);
  color: var(--navy);
  border-color: rgba(16, 31, 41, 0.15);
}

.btn-share.copy:hover {
  background: #e2e8f0;
}

/* CTA Contextual do Post */
.post-cta {
  background: linear-gradient(135deg, var(--navy) 0%, #0d1a22 100%);
  color: var(--white);
  border-radius: 12px;
  padding: 36px;
  margin-top: 48px;
  border: 1px solid rgba(217, 180, 60, 0.3);
  box-shadow: 0 12px 30px rgba(16, 31, 41, 0.15);
}

.post-cta h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 12px;
}

.post-cta p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 24px;
}

/* --------------------------------------------------------------------------
   7. SIDEBAR DO ARTIGO (TABLE OF CONTENTS + CONTATO RÁPIDO)
   -------------------------------------------------------------------------- */
.post-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--white);
  border: 1px solid rgba(16, 31, 41, 0.08);
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 4px 14px rgba(16, 31, 41, 0.03);
}

.sidebar-widget h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 10px;
}

.toc-list a {
  font-size: 0.9rem;
  color: #475569;
  text-decoration: none;
  line-height: 1.45;
  display: block;
  transition: color 0.2s;
}

.toc-list a:hover {
  color: var(--gold);
  padding-left: 4px;
}

.sidebar-contact {
  background: linear-gradient(135deg, var(--navy) 0%, #162a37 100%);
  color: var(--white);
}

.sidebar-contact h4 {
  color: var(--white);
}

.sidebar-contact p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.55;
  margin: 0 0 18px;
}

/* --------------------------------------------------------------------------
   8. ARTIGOS RELACIONADOS
   -------------------------------------------------------------------------- */
.related-section {
  padding: 60px 0 100px;
  background: #f1f5f4;
  border-top: 1px solid rgba(16, 31, 41, 0.08);
}

.related-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 32px;
}

/* --------------------------------------------------------------------------
   9. RESPONSIVIDADE
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
  .featured-content {
    padding: 28px 24px 32px;
  }
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .post-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .post-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 110px 0 40px;
  }
  .post-header-section {
    padding: 110px 0 32px;
  }
  .article-grid {
    grid-template-columns: 1fr;
  }
  .author-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .author-badge-icon {
    margin: 0 auto;
  }
  .share-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
