/* Comments Section */
.comments-section {
    padding: 6rem 0;
    background-color: #f5f5f5;
    /* Light gray to separate */
}

.comments-section .info-header {
    text-align: left;
}

.comments-section .line-decorator {
    background-color: #181818 !important;
    margin: 0 0 1rem 0 !important;
}

.comments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    grid-auto-flow: dense;
    /* Helps pack different sized items better */
}

/* Form occupies full width */
.comment-form {
    grid-column: 1 / -1;
    margin-bottom: 1.5rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

/* Dynamic Column Spanning */
.span-2 {
    grid-column: span 2;
}

.span-3 {
    grid-column: 1 / -1;
    /* Force Full Width */
}

@media (max-width: 1024px) {

    /* On smaller desktops/tablets, span-2 might take full width if grid is 2 cols */
    .comments-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        /* Slightly wider min to force 2 cols sooner */
    }
}

@media (max-width: 768px) {

    .span-2,
    .span-3 {
        grid-column: 1 / -1;
    }

    .comments-grid {
        display: flex;
        /* Flex stack on mobile is safer for variable heights */
        flex-direction: column;
    }
}

.comments-section .comments-subtitle {
    color: #444;
    /* Base grey */
    max-width: 100%;
    margin-bottom: 2rem;
    opacity: 1;
    text-align: left;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.comments-section .comments-subtitle #comment-context-label {
    color: #181818;
    font-weight: 700;
}


.comment-form h4 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: #181818;
    margin-bottom: 1rem;
    font-weight: 700;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-input-name {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}

.comment-input-name:focus {
    outline: none;
    border-color: #181818;
    background-color: #fafafa;
}

.comment-input-area {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    resize: vertical;
    min-height: 100px;
    transition: var(--transition);
}

.comment-input-area:focus {
    outline: none;
    border-color: #181818;
    background-color: #fafafa;
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.comment-feedback {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2e7d32;
    /* Verde sucesso */
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: right;
}

.comment-feedback.active {
    opacity: 1;
}

.btn-submit-comment {
    background-color: #181818;
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
}

.btn-submit-comment:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.comment-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    word-break: break-word;
    /* Ensure long text doesn't overflow */
}

.comment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #333 0%, #000 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    font-family: var(--font-body);
    /* Changed to fit user request: Space Grotesk */
}

.comment-meta {
    display: flex;
    flex-direction: column;
}

.comment-author {
    font-weight: 700;
    color: #181818;
    font-size: 0.95rem;
}

.comment-date {
    font-size: 0.75rem;
    color: #999;
}

.comment-text {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Pagination */
.comments-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
    background: #181818;
    color: #fff;
    border-color: #181818;
}

.page-btn.active {
    background: #181818;
    color: #fff;
    border-color: #181818;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}