/* ===================== Reset ===================== */

body {
    font-family: "Segoe UI", sans-serif;
    background-color: #eef1f5;
    color: #2c3e50;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===================== Sección Principal ===================== */
.comentarios-section {
    padding: 40px 20px;
    max-width: 1100px;
    margin: auto;
}

.comentarios-section h1 {
    margin-top: 90px;
    text-align: center;
    font-size: 32px;
    margin-bottom: 30px;
    color: #34495e;
    position: relative;
}

.comentarios-section h1::after {
    content: "";
    width: 70px;
    height: 3px;
    background-color: #1abc9c;
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
}

/* ===================== Formulario ===================== */
.form-section {
    max-width: 550px;
    margin: auto;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease-in-out;
}

.form-section h2 {
    text-align: center;
    margin-bottom: 15px;
    color: #2c3e50;
}

.form-section label {
    font-weight: 600;
    margin-top: 10px;
    display: block;
    font-size: 14px;
    color: #555;
}

.form-section input,
.form-section textarea,
.form-section select {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    transition: 0.2s;
    background: #fafafa;
}

.form-section input:focus,
.form-section textarea:focus,
.form-section select:focus {
    border-color: #1abc9c;
    background: white;
    outline: none;
}

.form-section textarea {
    resize: vertical;
    min-height: 90px;
}

.form-section button {
    margin-top: 18px;
    width: 100%;
    padding: 12px;
    border: none;
    background: linear-gradient(135deg, #1abc9c, #16a085);
    color: white;
    font-weight: bold;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.form-section button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(26, 188, 156, 0.4);
}

/* ===================== Contenedores de Recomendaciones y Quejas ===================== */
.comments-wrapper {
    display: flex;
    gap: 30px;
    justify-content: space-between;
    margin-top: 45px;
}

.comments-section {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    animation: fadeIn 0.7s;
}

.comments-section h2 {
    font-size: 22px;
    color: #2c3e50;
    border-left: 5px solid #1abc9c;
    padding-left: 10px;
    margin-bottom: 15px;
}

/* ===================== Contenedor de Comentarios ===================== */
.comment {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.comment:last-child {
    border-bottom: none;
}

.comment img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #1abc9c;
}

.comment-details {
    flex: 1;
}

.comment-details h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
    color: #2c3e50;
}

.comment-details span {
    font-size: 12px;
    color: #888;
}

.comment-details p {
    margin-top: 4px;
    font-size: 14px;
    color: #333;
}

/* ===================== Orden de comentarios: de más nuevo a más antiguo ===================== */
.comments-container {
    display: flex;
    flex-direction: column-reverse; /* Muestra los comentarios del más nuevo al más antiguo */
    gap: 15px;
}

/* ===================== Alertas ===================== */
.success,
.error {
    max-width: 500px;
    margin: 10px auto;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.success {
    background: #eafaf1;
    color: #1e8449;
    border: 1px solid #1abc9c;
}

.error {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #e74c3c;
}

/* ===================== Animaciones ===================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===================== Responsive ===================== */
@media (max-width: 768px) {
    .comentarios-section h1 {
        font-size: 28px;
    }

    .comments-wrapper {
        flex-direction: column; /* En pantallas más pequeñas, pone los contenedores uno debajo del otro */
        gap: 20px;
    }

    .comments-section {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 20px;
    }

    .comments-box {
        padding: 15px;
    }

    .comment img {
        width: 38px;
        height: 38px;
    }

    .comentarios-section h1 {
        font-size: 24px;
    }
}


/* Warnig */
.info-login {
    text-align: center;
    margin-top: 10px;
    padding: 12px;
    background: #ffe8cc;
    color: #a65a00;
    border-left: 4px solid #ffa733;
    font-size: 14px;
    border-radius: 4px;
}