/* ==========================
   SEÇÃO DE COMENTÁRIOS
========================== */
.comments-section {
    padding: 60px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin: 40px auto;
    max-width: 900px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.comments-section .section-title {
    font-size: 2rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #ff4e50, #fc913a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.comment-form .input-field {
    padding: 12px;
    border: none;
    border-radius: 12px;
    outline: none;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.2),
                inset -2px -2px 5px rgba(255,255,255,0.1);
    transition: 0.3s;
}

.comment-form .input-field:focus {
    background: rgba(255, 255, 255, 0.3);
}

.btn-submit {
    padding: 12px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    background: linear-gradient(90deg, #ff4e50, #fc913a);
    color: white;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0px 4px 15px rgba(255, 78, 80, 0.6);
}

/* LISTA DE COMENTÁRIOS */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
    text-align: left;
}

.comment {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: fadeIn 0.5s ease-in-out;
}

.comment img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff4e50;
}

.comment-content {
    flex: 1;
}

.comment-content strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #fff;
}

.comment-content p {
    margin: 5px 0;
    color: #ddd;
}

.comment-content small {
    font-size: 0.8rem;
    color: #bbb;
}

/* ANIMAÇÃO */
@keyframes fadeIn {
    from {opacity: 0; transform: translateY(10px);}
    to {opacity: 1; transform: translateY(0);}
}
.upload-box {
    border: 2px dashed #6c63ff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s ease;
    background: rgba(255,255,255,0.05);
    color: #ccc;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-box:hover {
    background: rgba(108, 99, 255, 0.1);
    border-color: #574bdb;
}

.upload-box.dragover {
    background: rgba(108, 99, 255, 0.2);
    border-color: #574bdb;
    color: #fff;
}

.preview-img {
    margin-top: 10px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #6c63ff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.rating {
    display: flex;
    justify-content: center;
    gap: 5px;
    font-size: 1.5rem;
    cursor: pointer;
}

.rating .star {
    color: #ccc;
    transition: color 0.2s;
}

.rating .star.hover,
.rating .star.selected {
    color: #FFD700; /* dourado */
}

.comment.reply {
    margin-left: 40px;
    border-left: 2px solid #ddd;
    padding-left: 10px;
}

.reply-link {
    display: inline-block;
    margin-top: 5px;
    font-size: 0.9em;
    color: #385898; /* Azul estilo Facebook */
    cursor: pointer;
    text-decoration: none;
}

.reply-link:hover {
    text-decoration: underline;
}

.replies {
    margin-left: 40px; /* aumenta o deslocamento a cada nível */
    margin-top: 10px;
    border-left: 1px solid #eee;
    padding-left: 10px;
}

.comment {
    margin-bottom: 15px;
    display: flex;
}

.comment img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

/* Responsividade para comentários com 1 nível */
@media (max-width: 768px) {
    .comment.reply {
        margin-left: 20px;
        border-left: 2px solid #ddd;
        padding-left: 10px;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .replies {
        margin-left: 20px;
        padding-left: 10px;
        border-left: 2px solid #ddd;
    }
    
    /* Garante que não haja aninhamento além do esperado */
    .replies .replies {
        display: none;
    }
}

/* Melhora visual dos comentários em mobile */
@media (max-width: 480px) {
    .comment {
        margin-bottom: 10px;
        padding: 10px;
    }
    
    .comment img {
        width: 36px;
        height: 36px;
    }
    
    .comment-content strong {
        font-size: 0.9rem;
    }
    
    .comment-content p {
        font-size: 0.85rem;
    }
    
    .comment-content small {
        font-size: 0.7rem;
    }
}