:root {
    --bg-card: #ffffff;
    --bg-main: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --accent-blue: #2563eb;
}

body, h1, h2, h3, h4, h5 {
    font-family: "Poppins", sans-serif;
}

body {
    font-size: 16px;
}

/* ── Foto de perfil / cabecera ── */
.profile-header {
    display: flex;
    align-items: center;
    gap: 40px;
}

.profile-text {
    flex: 1;
}

.profile-image {
    flex-shrink: 0;
}

.profile-photo {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

@media (max-width: 992px) {
    .profile-header {
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
    }

    .profile-photo {
        width: 160px;
        height: 160px;
    }
}

/* ── Sección genérica ── */
section {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

/* ── Sección de Comentarios ── */
.comment-form {
    display: block;
    margin-bottom: 24px;
}

.comment-label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.comment-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: -6px;
    margin-bottom: 12px;
}

.comment-textarea {
    width: 100%;
    min-height: 90px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    color: var(--text-primary);
    background-color: var(--bg-card);
    margin-bottom: 8px;
    box-sizing: border-box;
}

.comment-textarea:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.comment-textarea[aria-invalid="true"] {
    border-color: #dc2626;
    outline: 2px solid #dc2626;
}

.comment-error {
    color: #dc2626;
    font-size: 0.85rem;
    margin-bottom: 12px;
    display: none;
}

.comment-error[aria-hidden="false"] {
    display: block;
}

.comment-submit-container {
    text-align: right;
}

.comment-submit {
    background-color: var(--accent-blue);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.comment-submit:hover {
    background-color: #1d4ed8;
}

.comment-submit:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.comments-list {
    display: block;
}

.comment-item {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 600;
}

.comment-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin: 0;
}

.no-comments {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 16px 0;
    margin: 0;
}

/* ── Responsivo ── */
@media (max-width: 600px) {
    .comment-submit-container {
        text-align: left;
    }

    .comment-submit {
        width: 100%;
    }

    section {
        padding: 20px 16px;
    }
}
