/* ========================
   ESTILOS GERAIS
   ======================== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h2 {
    border-bottom: 2px solid #ccc;
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
    color: #333;
}

/* ========================
   SEÇÃO 1: CARROSSEL 1/1 + COMENTÁRIOS (DEFAULT: DESKTOP)
   ======================== */
.section-1 {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Carrossel Principal */
.carousel-container {
    flex: 1; 
    overflow: hidden;
    position: relative;
    max-width: 50%; /* Metade da seção */
}

.carousel-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 100%;
    box-sizing: border-box;
}

.carousel-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Área de Comentários */
.comments-area {
    flex: 1; 
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 50%; /* Metade da seção */
}

.comment-item {
    display: flex;
    gap: 10px;
    background-color: #fafafa;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
    align-items: center;
}

.comment-item img {
    width: 70px; /* Reduzido um pouco */
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

.comment-text {
    font-size: 0.9em;
    color: #555;
}

/* ========================
   SEÇÃO 2: GRID DE 4 IMAGENS
   ======================== */
.section-2-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Colunas no Desktop */
    gap: 10px;
}

.section-2-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

/* ========================
   SEÇÃO 3: CARROSSEL 4/4
   ======================== */
.section-3-carousel-container {
    overflow-x: scroll; /* Permite rolar em mobile */
    scroll-snap-type: x mandatory;
    padding-bottom: 10px; /* Espaço para a barra de rolagem */
}

.section-3-wrapper {
    display: flex;
    width: fit-content; /* Permite que o wrapper cresça */
}

.section-3-item {
    min-width: calc(100% / 4); /* 4 visíveis no Desktop */
    box-sizing: border-box;
    padding: 5px;
    scroll-snap-align: start;
}

.section-3-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
}

/* ========================
   SEÇÃO 4: VÍDEOS (ESTILO YOUTUBE)
   ======================== */
.section-4-videos {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Colunas no Desktop */
    gap: 20px;
}

.video-card .thumbnail {
    width: 100%;
    height: 150px;
    background-color: #333; 
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2em;
    border-radius: 8px 8px 0 0;
}

.video-info {
    padding: 10px;
}

.video-info h3 {
    font-size: 1em;
    margin: 0 0 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-info p {
    font-size: 0.8em;
    color: #606060;
    margin: 0;
}


/* ========================
   RESPONSIVIDADE (MOBILE)
   ======================== */

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    /* SEÇÃO 1: Empilha carrossel e comentários */
    .section-1 {
        flex-direction: column;
    }
    .carousel-container,
    .comments-area {
        max-width: 100%;
    }
    .comments-area {
        margin-top: 20px; /* Espaçamento após o carrossel */
    }

    /* SEÇÃO 2: 2 Colunas no Mobile */
    .section-2-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .section-2-grid img {
        height: 120px;
    }

    /* SEÇÃO 3: 2 Imagens visíveis no Mobile (usando scroll) */
    .section-3-item {
        min-width: calc(100% / 2); /* 2 visíveis */
    }

    /* SEÇÃO 4: 2 Colunas no Mobile */
    .section-4-videos {
        grid-template-columns: repeat(2, 1fr);
    }
    .video-card .thumbnail {
        height: 120px;
    }
    .video-info h3 {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    /* SEÇÃO 2 e 4: 1 Coluna em telas muito pequenas */
    .section-2-grid,
    .section-4-videos {
        grid-template-columns: 1fr;
    }

    /* SEÇÃO 3: 1 Imagem visível no Mobile muito pequeno (usando scroll) */
    .section-3-item {
        min-width: 100%; /* 1 visível */
    }
}