/* Carrossel Mobile - CSS para implementação no site 3azero.com */

/* Carrossel Mobile */
.carrossel-container {
    display: none;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.carrossel-wrapper {
    display: flex;
    transition: transform 0.3s ease;
    padding: 0;
}

.carrossel-slide {
    min-width: 100%;
    padding: 0;
    box-sizing: border-box;
}

.carrossel-card {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    overflow: hidden;
    margin: 0 10px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.carrossel-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.carrossel-card-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.carrossel-card-titulo {
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.carrossel-card-titulo a {
    color: white;
    text-decoration: none;
}

.carrossel-card-titulo a:hover {
    text-decoration: underline;
}

.carrossel-card-data {
    font-size: 12px;
    color: #a0a0a0;
    margin-bottom: 10px;
}

.carrossel-card-resumo {
    font-size: 14px;
    color: #ddd;
    line-height: 1.4;
    flex-grow: 1;
}

/* Indicadores do carrossel */
.carrossel-indicadores {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.indicador {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: background 0.3s ease;
}

.indicador.ativo {
    background: #ff4444;
}

/* Botões de navegação */
.carrossel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10;
}

.carrossel-nav:hover {
    background: rgba(0,0,0,0.7);
}

.carrossel-nav.prev {
    left: 10px;
}

.carrossel-nav.next {
    right: 10px;
}

/* Media Queries para ativar o carrossel no mobile */
@media (max-width: 768px) {
    .news-cards-grid.grid-layout-anexo2 {
        display: none !important;
    }
    .carrossel-container {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .carrossel-card-info {
        padding: 12px;
    }
    .carrossel-card img {
        height: 180px;
    }
    .carrossel-nav {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* Aplicar a cor de fundo do carrossel aos cards gerais */
.card {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.card:hover {
    background: rgba(255,255,255,0.1);
}

/* Estilos para single.php e category.php */
/* Bloco da matéria principal */
.article-content-wrapper {
    background: rgba(255,255,255,0.05);
    margin-bottom: 20px;
}

/* Bloco de relacionados (Leia Também) */
.news-block.related-articles-block {
    margin-bottom: 20px;
}

/* Bloco de relacionados (Sidebar) */
.article-sidebar .sidebar-relacionadas-header {
    margin-bottom: 10px;
}

.article-sidebar .sidebar-relacionadas-card {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    height: 80px;
    overflow: hidden;
    transition: background 0.3s ease, transform 0.3s ease; /* Adicionada transição para hover */
}

.article-sidebar .sidebar-relacionadas-card:hover {
    background: rgba(255,255,255,0.1); /* Cor de fundo no hover */
    transform: translateY(-3px); /* Animação de movimento no hover */
}

.article-sidebar .sidebar-relacionadas-img {
    flex-shrink: 0;
    width: 80px;
    height: 100%;
    margin-right: 5px; /* Reduzido o margin-right para aproximar o título */
    border-radius: 8px 0 0 8px;
    overflow: hidden;
}

.article-sidebar .sidebar-relacionadas-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px 0 0 8px;
}

.article-sidebar .sidebar-relacionadas-content {
    flex-grow: 1;
    font-size: 13px;
    line-height: 1.4;
    padding: 10px; /* Mantido padding para o conteúdo de texto */
}

.article-sidebar .sidebar-relacionadas-content a {
    color: white;
    text-decoration: none; /* Removido sublinhado padrão de links */
}

.article-sidebar .sidebar-relacionadas-content a:hover {
    text-decoration: none; /* Removido sublinhado ao passar o mouse */
}

/* Ajustes para links e títulos dentro desses blocos */
.article-content-wrapper a,
.news-block.related-articles-block a {
    color: white;
}

.article-content-wrapper h1, .article-content-wrapper h2, .article-content-wrapper h3, .article-content-wrapper h4, .article-content-wrapper h5, .article-content-wrapper h6,
.news-block.related-articles-block h2,
.article-sidebar h4 {
    color: white;
}

.article-content-wrapper p,
.news-block.related-articles-block p,
.article-sidebar .sidebar-relacionadas-content p {
    color: #ddd;
}

/* Aplica a todo o conteúdo principal da single, fixe uma largura máxima */
.single .article-content-wrapper {
  width: 100%;          /* ocupa 100% do pai */
  width: 768px;     /* largura máxima fixa (ajuste a gosto) */
  box-sizing: border-box; /* padding não estoura o width */
}

/* Se for o header da matéria */
.single .article-header-content,
.single .featured-image {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ───  MOBILE FIRST: 100% WIDTH + PADDING ─── */
@media (max-width: 768px) {
  /* Wrapper geral da single */
  .single .article-page-main,
  .single .article-content-wrapper,
  .single .article-header-content {
    width: 100% !important;
    max-width: 100% !important;     /* ocupa 100% da viewport */
    margin: 0 auto !important;       /* centraliza */

    box-sizing: border-box !important;
  }

  /* Grid passa a ser 1 coluna */
  .single .article-layout-container {
    display: block !important;
  }

  /* Assegura que a sidebar role pra baixo do conteúdo */
  .single .article-sidebar {
    width: 100% !important;
    margin-top: 30px !important;
  }

  /* Imagem destacada full width */
  .single .featured-image img {
    width: 100% !important;
    height: 100% !important;
  }

  /* Ajustes no título e subtítulo */
  .single .article-header-content h1 {
    font-size: 1.3em !important;
    line-height: 1.3 !important;
  }
  .single .article-subtitle {
    font-size: 1em !important;
  }

  /* Texto do artigo com line-height confortável */
  .single .article-body {
    padding: 16px !important;
  }
  .single .article-body p {
    font-size: 1em !important;
    line-height: 1.6 !important;
  }
  
  @media (max-width: 768px) {
  /* Títulos menores no mobile */
  .single .article-header-content h1 {
    font-size: 1.5em !important;    /* antes era ~1.8em, agora reduzimos */
    line-height: 1.2 !important;     /* ajusta a altura da linha */
    margin-top: 8px !important;      /* se quiser diminuir ainda */
    margin-bottom: 12px !important;
  }

  .single .article-header-content h2,
  .single .article-header-content h3 {
    font-size: 1.2em !important;    /* h2/h3 menores também */
    line-height: 1.3 !important;
    margin-bottom: 10px !important;
  }
  @media (min-width: 769px) {
  .single .featured-image img {
    height: 500px;   /* ajuste esse valor conforme preferir */
  }
}
