body {
    background-color: #0a192f;
    color: #e6f1ff;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

/* Efeito de expansão para os tópicos */
.topico-container {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.topico-container:hover {
    transform: translateY(-3px);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.topico-titulo {
    font-size: 16px;
    color: #ffd700;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
    font-weight: 500;
}

.topico-container:hover .topico-titulo {
    color: #fff;
}

.categoria-nome {
    background: linear-gradient(135deg, #1d552b 0%, #2a7a3f 100%);
    color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    height: auto;
    min-height: 50px;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.categoria-link:hover .categoria-nome {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #236934 0%, #318f4b 100%);
}

/* Opcional: adicionar um indicador visual de que é clicável */
.categoria-nome::after {
    content: '→';
    margin-left: 10px;
    opacity: 0;
    transition: all 0.3s ease;
}

.categoria-link:hover .categoria-nome::after {
    opacity: 1;
    transform: translateX(5px);
}

.info-publicacao {
    font-size: 13px;
    color: #8892b0;
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
}

.carousel {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.categoria-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 20px;
}

.aulas-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 50px auto;
  width: fit-content;
}

.modulo1 {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.produto {
  position: relative;
  width: 165px;
  height: auto;
  overflow: hidden;
  flex: 0 0 auto;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.produto img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.produto:hover .banner {
  transform: scale(1.05);
}

.produto:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.bloqueado-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 14px;
  pointer-events: none;
}

.bloqueado-overlay p {
  color: #ffd700;
  font-weight: 600;
  margin: 0;
  background-color: rgba(0, 0, 0, 0.8);
  padding: 8px 16px;
  border-radius: 20px;
  text-align: center;
  white-space: nowrap;
}

.aula-texto {
  margin: 0;
  padding-top: 0px;
  text-align: center;
  font-weight: bold;
  color: #ffd700;
  background: linear-gradient(135deg, #1d552b 0%, #2a7a3f 100%);
  padding: 8px;
  max-width: 100%;
  display: block;
  white-space: nowrap;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

#overlayAll {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

#popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  max-width: 960px;
  max-height: 720px;
  background-color: #1a2634;
  z-index: 1001;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  overflow-x: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#popup-content {
  position: relative;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

#popup-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  overflow-x: hidden;
}

#close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 5px 12px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

#close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.capa-container {
  border: 1px solid orange;
  width: 400px;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.capa-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Adicionando as alterações no final para organização */

/* Ajustes principais para responsividade */

/* Garantindo que o layout seja de uma coluna já abaixo de 768px */
@media (max-width: 768px) {
    .carousel {
        margin-left: 10px;
        margin-right: 10px;
    }

    .categoria-container {
        display: flex;
        flex-direction: column; /* Forçando exibição em coluna */
        width: 100%;
        margin-bottom: 20px;
    }

    .topico-container {
        width: 100%; /* Tópicos ocupam 100% da largura */
        margin-bottom: 15px;
    }

    .categoria-nome {
        width: 100%; /* Categoria também ocupa 100% da largura */
        text-align: center;
    }
}

/* Para telas menores que 600px, garantindo alinhamento em coluna */
@media (max-width: 600px) {
    .carousel {
        margin-left: 5px;
        margin-right: 5px;
    }

    .categoria-container {
        display: block;
        width: 100%; /* Ocupar 100% da largura */
    }

    .topico-container {
        width: 100%;
        margin-bottom: 15px;
    }

    .categoria-nome {
        width: 100%; /* Ocupar 100% da largura */
    }
}

/* Ajuste adicional para telas muito pequenas (menos de 480px) */
@media (max-width: 480px) {
    .categoria-container {
        flex-direction: column;
        width: 100%;
    }

    .topico-container {
        width: 100%; /* Sempre 100% em telas muito pequenas */
    }
}

/* Ajuste para o container principal */
.forum-grid, 
.modulo1,
.aulas-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Media query para dispositivos móveis */
@media screen and (max-width: 768px) {
    .forum-grid,
    .modulo1,
    .aulas-container {
        flex-direction: column;
    }

    .forum-grid > div,
    .modulo1 > div,
    .aulas-container > div {
        width: 100% !important;
        flex: none !important;
    }

    .produto {
        width: 100% !important;
        margin: 0 auto;
        max-width: 300px; /* opcional: define uma largura máxima para os cards */
    }
}

/* Layout padrão para desktop - 2 colunas */
.forum-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.categoria-container {
    width: calc(50% - 10px); /* 2 colunas com gap de 20px */
}

/* Media query para celular - 1 coluna */
@media screen and (max-width: 768px) {
    .categoria-container {
        width: 100%;
    }
}
