/* ============================================
   BLOG - CSS ESPECÍFICO
   ============================================ */

/* ============================================
   VARIÁVEIS CSS
   ============================================ */
:root {
  --primary-color: #2A7DE1;
  --secondary-color: #6bdad5;
  --dark-bg: #0F2C3E;
  --darker-bg: #000F18;
  --darkest-bg: #080D16;
  --text-white: #FFFFFF;
  --text-light: rgba(255, 255, 255, 0.80);
  --border-color: rgba(42, 125, 225, 0.20);
  --font-family: "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --container-max-width: 1250px;
  --spacing-sm: 15px;
  --spacing-md: 20px;
  --spacing-lg: 40px;
  --border-radius: 10px;
  --badge-bg: rgba(22, 112, 202, 0.20);
}

/* ============================================
   FONTE GLOBAL - MULISH
   ============================================ */
.blog-page-section,
.blog-page-section *,
.blog-page-section h1,
.blog-page-section h2,
.blog-page-section h3,
.blog-page-section h4,
.blog-page-section h5,
.blog-page-section h6,
.blog-page-section p,
.blog-page-section span,
.blog-page-section a,
.blog-page-section div,
.single-post-section,
.single-post-section *,
.single-post-section h1,
.single-post-section h2,
.single-post-section h3,
.single-post-section h4,
.single-post-section h5,
.single-post-section h6,
.single-post-section p,
.single-post-section span,
.single-post-section a,
.single-post-section div {
  font-family: var(--font-family) !important;
}

/* ============================================
   SEÇÃO DE BLOG
   ============================================ */
.blog-page-section {
  background: var(--darker-bg) url('../../uploads/Group-6-17.png') no-repeat center;
  background-size: cover;
  position: relative;
  padding: 150px 0 80px;
  overflow: hidden;
  z-index: 1;
}

.blog-page-section .container.sized {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 15px;
}

/* ============================================
   HEADER DA PÁGINA DE BLOG
   ============================================ */
.blog-page-header {
  text-align: center;
  margin-bottom: 35px;
}

.blog-page-header .section-badge {
  display: inline-block;
  padding: 5px 15px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-bg);
  border-radius: var(--border-radius);
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  color: var(--text-white);
  margin-bottom: var(--spacing-md);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.blog-page-title {
  font-family: var(--font-family);
  font-size: 40px;
  line-height: 44px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 15px;
  text-align: center;
}

.blog-page-description {
  font-family: var(--font-family);
  font-size: 18px;
  line-height: 27px;
  color: rgba(255, 255, 255, 0.80);
  margin-bottom: 35px;
  text-align: center;
}

/* ============================================
   CARDS DE BLOG (Reutilizando estilos da home)
   ============================================ */
.blog-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  max-width: 100%;
}

.blog-card {
  background: #0D1722;
  border: 1px solid rgba(42, 125, 225, 0.20);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  max-width: 420px;
  max-height: 420px;
  width: 100%;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.blog-card-image {
  width: 100%;
  max-height: 160px;
  height: auto;
  overflow: hidden;
  flex-shrink: 0;
}

.blog-card-image a {
  display: block;
  width: 100%;
  height: 100%;
}

.blog-card-image img {
  width: 100%;
  max-height: 160px;
  height: auto;
  object-fit: cover;
}

.blog-card-content {
  padding: 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.blog-card-title {
  font-family: var(--font-family);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  line-height: 22px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-white);
}

.blog-card-title a {
  color: var(--text-white);
  text-decoration: none;
  transition: all 0.3s ease;
}

.blog-card-title a:hover {
  opacity: 0.8;
}

.blog-card-excerpt {
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 21px;
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-card-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  align-items: center;
}

.blog-card-reading-time,
.blog-card-author {
  font-family: var(--font-family);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 18px;
  color: var(--text-light);
}

.blog-card-reading-time span,
.blog-card-author span {
  font-size: 12px;
  line-height: 18px;
}

.blog-card-icon {
  width: 12px;
  height: 12px;
  object-fit: contain;
  flex-shrink: 0;
}

.blog-card-read-more {
  font-family: var(--font-family);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  font-size: 12px;
  line-height: 18px;
  color: #1670CA;
  background-color: rgba(22, 112, 202, 0.20);
  border: 1px solid rgba(22, 112, 202, 0.20);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  margin-left: auto;
}

.blog-card-read-more:hover {
  background-color: rgba(22, 112, 202, 0.30);
}

.blog-card-read-more span {
  color: #1670CA;
}

.blog-card-read-more-icon {
  width: 11px;
  height: 11px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ============================================
   SINGLE POST - Página Individual
   ============================================ */
.single-post-section {
  background: var(--darker-bg);
  padding: 150px 0 80px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  min-height: calc(100vh - 300px); /* 100vh menos altura aproximada do footer (~300px) */
  display: flex;
  align-items: flex-start;
}

.single-post-section .container.sized {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
  flex: 1;
}

.single-post-wrapper {
  width: 100%;
  max-width: 100%;
}

/* Coluna Esquerda: Conteúdo */
.single-post-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.single-post-content .blog-card-meta {
  margin-top: 0;
  margin-bottom: 0;
}

.single-post-title {
  font-family: var(--font-family);
  font-size: 40px;
  font-weight: 700;
  line-height: 44px;
  color: var(--text-white);
  margin: 0;
  margin-bottom: var(--spacing-md);
}

.single-post-text {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 24px;
  color: var(--text-light);
  width: 100%;
  min-height: 50px; /* Garantir que o container tenha altura mínima */
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
  overflow: hidden; /* Conter o float da imagem */
}

.single-post-text p {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 24px;
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
  display: block;
}

.single-post-text p:first-child {
  margin-top: 0;
}

.single-post-text p:last-child {
  margin-bottom: 0;
}

.single-post-text h1,
.single-post-text h2,
.single-post-text h3,
.single-post-text h4,
.single-post-text h5,
.single-post-text h6 {
  font-family: var(--font-family);
  color: var(--text-white);
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.single-post-text a {
  color: #1670CA;
  text-decoration: none;
  transition: all 0.3s ease;
}

.single-post-text a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.single-post-text ul,
.single-post-text ol {
  margin-left: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  color: var(--text-light);
}

.single-post-text li {
  margin-bottom: 8px;
  color: var(--text-light);
}

.single-post-text img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin: var(--spacing-md) 0;
}

.single-post-text blockquote {
  border-left: 3px solid #1670CA;
  padding-left: var(--spacing-md);
  margin: var(--spacing-md) 0;
  color: var(--text-light);
  font-style: italic;
}

/* Garantir que todo o conteúdo seja visível */
.single-post-text * {
  color: inherit;
}

.single-post-text > p,
.single-post-text > div,
.single-post-text > h1,
.single-post-text > h2,
.single-post-text > h3,
.single-post-text > h4,
.single-post-text > h5,
.single-post-text > h6,
.single-post-text > ul,
.single-post-text > ol,
.single-post-text > blockquote {
  display: block;
  margin-bottom: var(--spacing-md);
}

.single-post-text > *:last-child {
  margin-bottom: 0;
}

/* Garantir que elementos inline dentro do conteúdo funcionem */
.single-post-text span,
.single-post-text strong,
.single-post-text em,
.single-post-text a,
.single-post-text code {
  display: inline;
}

/* Imagem flutuante dentro do conteúdo */
.single-post-image {
  float: right;
  width: 45%;
  max-width: 500px;
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  overflow: hidden;
}

.single-post-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: var(--border-radius);
}

/* ============================================
   RESPONSIVE - Media Queries
   ============================================ */

@media (max-width: 991px) {
  .blog-page-section {
    padding: var(--spacing-lg) 0;
  }
  
  .blog-page-title {
    font-size: 32px;
    line-height: 36px;
  }
  
  .blog-page-description {
    font-size: 16px;
    line-height: 24px;
  }
  
  .blog-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }
  
  .blog-card {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .blog-page-section {
    padding: 150px 0 var(--spacing-lg) 0;
  }
  
  .blog-cards {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .blog-card {
    max-width: 100%;
  }
  
  .blog-page-title {
    font-size: 28px;
    line-height: 32px;
  }
  
  .blog-page-description {
    font-size: 16px;
    line-height: 24px;
  }
  
  /* Single Post Responsive */
  .single-post-section {
    padding: 150px 0 60px;
    min-height: calc(100vh - 350px); /* No mobile o footer pode ser maior devido ao layout em coluna única */
  }
  
  .single-post-image {
    float: none;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-bottom: var(--spacing-md);
  }
  
  .single-post-title {
    font-size: 32px;
    line-height: 36px;
  }
  
  .single-post-text {
    font-size: 15px;
    line-height: 23px;
  }
  
  .single-post-text p {
    font-size: 15px;
    line-height: 23px;
  }
}

