/* Estilos base */
:root {
  --primary-yellow: #fea700;
  --primary-blue: #0097ff;
  --dark-bg: #000000;
  --dark-gray: #1f1f1f;
  --medium-gray: #303030;
  --light-gray: #cccccc;
  --white: #ffffff;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  background-color: var(--dark-bg);
  color: var(--white);
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 0;
}

h1, h2, h3 {
  font-family: 'Orbitron', sans-serif;
  margin-top: 0;
}

/* Cabeçalho do blog */
.blog-header {
  background: linear-gradient(180deg, var(--dark-gray) 0%, var(--dark-bg) 100%);
  text-align: center;
  padding: 100px 20px 80px;
  position: relative;
  overflow: hidden;
}

.blog-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.blog-header h1 {
  font-size: 3.5rem;
  color: var(--primary-yellow);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.blog-header .subtitle {
  font-size: 1.3rem;
  color: var(--light-gray);
  max-width: 700px;
  margin: 0 auto 25px;
}

.header-highlight {
  background-color: rgba(0, 151, 255, 0.1);
  border-left: 4px solid var(--primary-blue);
  padding: 15px 20px;
  display: inline-block;
  margin-top: 20px;
}

.header-highlight p {
  font-size: 1.1rem;
  color: var(--primary-yellow);
  margin: 0;
  font-weight: 600;
}

/* Post em destaque */
.featured-post {
  background-color: var(--dark-gray);
  padding: 40px 0;
}

.featured-content {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}

.featured-text {
  flex: 1;
  min-width: 300px;
}

.featured-image {
  flex: 1;
  min-width: 300px;
}

.featured-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.featured-tag {
  display: inline-block;
  background-color: var(--primary-yellow);
  color: var(--dark-bg);
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.featured-text h2 {
  font-size: 2.2rem;
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.3;
}

.featured-text p {
  font-size: 1.1rem;
  color: var(--light-gray);
  margin-bottom: 30px;
}

.featured-button {
  display: inline-block;
  background-color: var(--primary-blue);
  color: white;
  padding: 12px 25px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.featured-button:hover {
  background-color: #0085e0;
  transform: translateY(-2px);
}

/* Seção de posts */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.section-header h2 {
  color: var(--primary-yellow);
  font-size: 1.8rem;
  text-transform: uppercase;
}

.filter-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  color: var(--light-gray);
  border: 1px solid var(--medium-gray);
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--primary-yellow);
  color: var(--dark-bg);
  border-color: var(--primary-yellow);
}

/* Grade de posts */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

/* Cartão de post */
.post {
  background-color: var(--medium-gray);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.4s, box-shadow 0.4s;
  position: relative;
}

.post:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(254, 167, 0, 0.2);
}

.post-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--primary-blue);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 1;
}

.post-image-container {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
  border-bottom: 2px solid var(--primary-yellow);
}

.post-image-container img,
.post-image-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.post-image-container:hover img,
.post-image-container:hover video {
  transform: scale(1.05);
}
.post-image-container video {
  object-fit: contain; /* Para vídeos, melhor não cortar */
  background-color: #000; /* Fundo preto para áreas não preenchidas */
}
.post-image-container:empty {
  background-color: var(--medium-gray);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-image-container:empty::before {
  content: "Sem imagem";
  color: var(--light-gray);
}
.post-content {
  padding: 20px;
}

.post h3 {
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.4;
}

.post-excerpt {
  font-size: 0.95rem;
  color: var(--light-gray);
  margin-bottom: 15px;
}

.post-meta {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--light-gray);
  margin-bottom: 15px;
}

.post-meta i {
  margin-right: 5px;
  color: var(--primary-yellow);
}

/* Paginação */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 50px;
}

.pagination-btn {
  background-color: var(--medium-gray);
  color: var(--light-gray);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn.active, .pagination-btn:hover {
  background-color: var(--primary-yellow);
  color: var(--dark-bg);
}

.pagination-btn.next {
  width: auto;
  padding: 0 20px;
  border-radius: 20px;
}

/* Newsletter */
.newsletter {
  background-color: var(--dark-gray);
  padding: 60px 0;
  margin-top: 60px;
}

.newsletter-content {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  justify-content: space-between;
}

.newsletter-text h3 {
  color: var(--primary-yellow);
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.newsletter-text p {
  color: var(--light-gray);
  max-width: 400px;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.newsletter-form input {
  flex: 1;
  min-width: 250px;
  padding: 12px 15px;
  border: 1px solid var(--medium-gray);
  border-radius: 4px;
  background-color: #2a2a2a;
  color: white;
  font-family: 'Poppins', sans-serif;
}

.newsletter-form button {
  background-color: var(--primary-yellow);
  color: var(--dark-bg);
  border: none;
  padding: 12px 25px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.newsletter-form button:hover {
  background-color: #e69500;
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate {
  animation: fadeIn 0.8s ease forwards;
}

.featured-text.animate {
  animation: slideInLeft 0.8s ease forwards;
}

.featured-image.animate {
  animation: slideInRight 0.8s ease forwards;
}

/* Responsivo */
@media (max-width: 992px) {
  .blog-header h1 {
    font-size: 2.8rem;
  }

  .featured-text h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  .blog-header {
    padding: 80px 20px 60px;
  }

  .blog-header h1 {
    font-size: 2.2rem;
  }

  .blog-header .subtitle {
    font-size: 1.1rem;
  }

  .featured-content {
    flex-direction: column;
  }

  .featured-text, .featured-image {
    min-width: 100%;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .newsletter-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .newsletter-form {
    width: 100%;
  }

  .newsletter-form input {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .blog-header h1 {
    font-size: 1.8rem;
  }

  .post h3 {
    font-size: 1.1rem;
  }

  .pagination {
    gap: 5px;
  }

  .pagination-btn {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  .pagination-btn.next {
    padding: 0 15px;
  }
}
/* Adicionando media queries específicas para mobile */
@media (max-width: 480px) {
  /* Ajustes gerais */
  .container {
    padding: 40px 0;
    width: 95%;
  }

  /* Cabeçalho do blog */
  .blog-header {
    padding: 60px 15px 40px;
  }

  .blog-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  .blog-header .subtitle {
    font-size: 1rem;
    margin-bottom: 15px;
  }

  .header-highlight {
    padding: 10px 15px;
    margin-top: 15px;
  }

  .header-highlight p {
    font-size: 0.9rem;
  }

  /* Post em destaque */
  .featured-post {
    padding: 30px 0;
  }

  .featured-text h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
  }

  .featured-text p {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .featured-button {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  /* Seção de posts */
  .section-header h2 {
    font-size: 1.4rem;
  }

  .filter-options {
    gap: 8px;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  /* Grade de posts */
  .post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Cartão de post */
  .post-image-container {
    height: 180px;
  }

  .post-content {
    padding: 15px;
  }

  .post h3 {
    font-size: 1.2rem;
  }

  .post-excerpt {
    font-size: 0.9rem;
  }

  .post-meta {
    font-size: 0.8rem;
    gap: 10px;
  }

  /* Paginação */
  .pagination {
    margin-top: 30px;
    flex-wrap: wrap;
  }

  .pagination-btn {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  .pagination-btn.next {
    padding: 0 15px;
    margin-top: 10px;
    width: 100%;
    border-radius: 4px;
    height: 40px;
  }

  /* Newsletter */
  .newsletter {
    padding: 40px 0;
    margin-top: 40px;
  }

  .newsletter-text h3 {
    font-size: 1.4rem;
  }

  .newsletter-form {
    width: 100%;
  }

  .newsletter-form input {
    padding: 10px 15px;
  }

  .newsletter-form button {
    padding: 10px 20px;
    width: 100%;
    justify-content: center;
  }
}

/* Ajustes para telas muito pequenas (até 360px) */
@media (max-width: 360px) {
  .blog-header h1 {
    font-size: 1.6rem;
  }

  .featured-text h2 {
    font-size: 1.3rem;
  }

  .post-image-container {
    height: 160px;
  }

  .post h3 {
    font-size: 1.1rem;
  }
}

/* Melhorias para tablets em modo retrato */
@media (min-width: 481px) and (max-width: 768px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-text h2 {
    font-size: 1.6rem;
  }

  .newsletter-content {
    flex-direction: row;
  }

  .newsletter-form {
    flex: 1;
  }
}

/* Ajustes para orientação landscape em mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .blog-header {
    padding: 40px 20px;
  }

  .featured-content {
    flex-direction: row;
  }

  .post-image-container {
    height: 150px;
  }
}

/* Melhorias de toque para mobile */
@media (hover: none) {
  .post:hover {
    transform: none;
    box-shadow: none;
  }

  .featured-button:hover, 
  .filter-btn:hover, 
  .pagination-btn:hover, 
  .newsletter-form button:hover {
    transform: none;
  }
}

/* CORREÇÕES GLOBAIS PARA SCROLL HORIZONTAL */

/* 1. Regras básicas para prevenir overflow */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* 2. Container principal ajustado */
.container {
    width: 95%;
    max-width: 100vw;
    padding-left: 15px;
    padding-right: 15px;
    margin: 0 auto;
}

/* 3. Correções para o cabeçalho do blog */
.blog-header {
    padding: 80px 15px 60px;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.blog-header h1 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 4. Ajustes para o conteúdo em destaque */
.featured-content {
    width: 100%;
    box-sizing: border-box;
}

.featured-image img {
    max-width: 100%;
    height: auto;
}

/* 5. Grade de posts responsiva */
.post-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

/* 6. Cartão de post otimizado */
.post {
    max-width: 100%;
    margin: 0 auto;
}

.post-image-container {
    max-width: 100%;
}

/* 7. Paginação ajustada */
.pagination {
    flex-wrap: wrap;
    padding: 0 15px;
}

/* 8. Newsletter responsiva */
.newsletter-form {
    flex-direction: column;
    width: 100%;
}

.newsletter-form input,
.newsletter-form button {
    width: 100%;
    min-width: 0;
}

/* 9. Filtros responsivos */
.filter-options {
    justify-content: center;
    padding: 0 10px;
}

/* 10. Elementos de mídia */
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

/* 11. Textos longos */
h1, h2, h3, p, a, span {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* AJUSTES ESPECÍFICOS PARA MOBILE */

@media (max-width: 768px) {
    /* Ajustes para tablets */
    .blog-header {
        padding: 60px 15px 40px;
    }
    
    .featured-content {
        flex-direction: column;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    /* Ajustes para smartphones */
    .container {
        padding: 30px 10px;
    }
    
    .blog-header h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .filter-options {
        justify-content: flex-start;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .pagination-btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .pagination-btn.next {
        width: 100%;
        border-radius: 4px;
        margin-top: 10px;
    }
}

@media (max-width: 360px) {
    /* Ajustes para telas muito pequenas */
    .blog-header h1 {
        font-size: 1.5rem;
    }
    
    .featured-text h2 {
        font-size: 1.3rem;
    }
    
    .post h3 {
        font-size: 1.1rem;
    }
    
    .filter-btn {
        padding: 5px 10px;
    }
}

/* PREVENÇÃO PARA ELEMENTOS FLUTUANTES */

.float-element, .absolute-element, .fixed-element {
    max-width: 100vw;
    left: 0;
    right: 0;
}

/* CORREÇÃO PARA ANIMAÇÕES */

.animate, .fade-in, [class*="slide"] {
    max-width: 100%;
}

/* GARANTIA PARA ELEMENTOS FLEX */

.flex-container {
    flex-wrap: wrap;
}

/* BORDAS E SOMBRAS QUE PODEM CAUSAR OVERFLOW */

.box-shadow-element {
    box-shadow: none;
}

@media (min-width: 769px) {
    .box-shadow-element {
        box-shadow: 0 10px 25px rgba(254, 167, 0, 0.2);
    }
}