@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700;900&display=swap');

:root {
    --primary: #83E4D1;
    --primary-dark: #5ac2af;
    --accent: #ff9f1c;
    --accent-hover: #e38a15;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-main: #f4f6f9;
    --card-bg: #ffffff;
}

html {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: 'Nunito', Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-main);
    line-height: 1.6;
    letter-spacing: .5px;
}

main {
    flex: 1;
}

/* Shared base styles are defined globally */

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.hero-title {
    display: inline-block;
    border-bottom: 2px dashed rgba(255, 140, 0, 0.5);
    padding-bottom: 4px;
    font-size: clamp(22px, 5vw, 38px);
    color: #111;
    margin: 0 0 15px 0;
}

.hero-subtitle {
    font-size: clamp(15px, 3.5vw, 19px);
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Centralized scroll animations used */


.left-hidden {
    opacity: 0;
    transform: translateX(-80px);
    transition: all .8s ease;
}

.right-hidden {
    opacity: 0;
    transform: translateX(80px);
    transition: all .8s ease;
}

/* Aparición escalonada */

.hero-section {
    max-width: 900px;
    margin: 0 auto 40px auto;
    text-align: center;
    background: white;
    padding: 40px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .05);
    border-top: 8px solid var(--accent);
}

.faq-section {
    transition-delay: .2s;
}

.contact-form-section {
    transition-delay: .4s;
}

.direct-contact-section {
    transition-delay: .4s;
}

/* --- ESTILOS DE FORO --- */
.foro-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.foro-container h1 {
    font-size: clamp(22px, 5vw, 36px);
    color: var(--text-dark);
    margin-bottom: 10px;
    text-align: center;
}

.foro-container>p {
    text-align: center;
    color: var(--text-light);
    font-size: clamp(14px, 3.5vw, 18px);
    margin-bottom: 25px;
}

.foro-notice {
    background-color: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    color: #856404;
}

.foro-notice a {
    color: var(--accent-hover);
    font-weight: bold;
    text-decoration: underline;
}

.foro-threads {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.thread-card {
    background: var(--card-bg);
    padding: clamp(16px, 4vw, 25px);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border-left: 5px solid var(--accent);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.thread-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.thread-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.thread-tag {
    background-color: var(--primary);
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 15px;
    text-transform: uppercase;
}

.thread-meta {
    font-size: 13px;
    color: var(--text-light);
}

.thread-title {
    font-size: clamp(17px, 4vw, 22px);
    margin: 0 0 10px 0;
    color: var(--text-dark);
}

.thread-body {
    font-size: clamp(14px, 3.5vw, 16px);
    color: var(--text-light);
    margin: 0 0 15px 0;
}

.thread-footer {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #888;
    border-top: 1px solid #eee;
    padding-top: 12px;
    flex-wrap: wrap;
}

/* --- FORMULARIO DE NUEVO MENSAJE --- */
.new-thread-form {
    background: var(--card-bg);
    padding: clamp(16px, 4vw, 25px);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border-left: 5px solid var(--primary-dark);
    margin-bottom: 30px;
}

.new-thread-form h2 {
    font-size: clamp(18px, 4.5vw, 24px);
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-dark);
}

.form-control {
    font-family: inherit;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
    background-color: #fff;
    color: var(--text-dark);
}

.form-control:focus {
    border-color: var(--primary-dark);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

/* --- DETALLE DE PUBLICACION Y COMENTARIOS --- */
.thread-title-link {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.thread-title-link:hover {
    color: var(--accent-hover);
}

.btn-ver-conversacion {
    margin-left: auto;
    color: var(--accent-hover);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease;
}

.btn-ver-conversacion:hover {
    color: var(--accent);
    transform: translateX(3px);
}

.back-link-container {
    margin-bottom: 20px;
}

.btn-back {
    display: inline-block;
    padding: 8px 18px;
    background-color: transparent;
    border: 2px solid var(--text-light);
    color: var(--text-light);
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background-color: var(--text-light);
    color: white;
    transform: translateX(-3px);
}

.thread-card-detail {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border-left: 6px solid var(--accent);
    margin-bottom: 30px;
}

.thread-detail-title {
    font-size: 28px;
    margin: 15px 0;
    color: var(--text-dark);
    line-height: 1.3;
}

.thread-detail-body {
    font-size: 17px;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 20px;
}

/* --- SECCION COMENTARIOS --- */
.comments-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 30px;
}

.comments-section h2 {
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--text-dark);
    border-bottom: 2px solid var(--bg-main);
    padding-bottom: 10px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-card {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.comment-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.comment-left {
    flex-shrink: 0;
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-dark);
    border: 2px solid white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.comment-right {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 15px;
}

.comment-date {
    font-size: 12px;
    color: var(--text-light);
}

.comment-body {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    align-items: center;
}

.btn-like {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
    transition: all 0.2s ease;
}

.btn-like:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    color: var(--text-dark);
    transform: scale(1.05);
}

.btn-like.active {
    background: #fff5f5;
    border-color: #fed7d7;
    color: #e53e3e;
    font-weight: 700;
}

.btn-like.active:hover {
    background: #ffebeb;
    border-color: #feb2b2;
}

.btn-like-disabled {
    background: #f7fafc;
    border: 1px solid #edf2f7;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #cbd5e0;
}

.no-comments {
    color: var(--text-light);
    text-align: center;
    font-style: italic;
    padding: 20px 0;
}

/* --- FORMULARIO DE COMENTARIOS --- */
.comment-form-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.comment-form-section h3 {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-dark);
}

/* =============================================
   MODO OSCURO
   ============================================= */
body.dark-mode .thread-card:hover {
    background-color: #252542 !important;
}

body.dark-mode .thread-card:hover .thread-title-link {
    color: var(--accent, #ff9f1c) !important;
}

body.dark-mode .thread-footer {
    border-top-color: #2a2a40 !important;
}

body.dark-mode .comment-card {
    border-bottom-color: #2a2a40 !important;
}

body.dark-mode .btn-back:hover {
    background-color: var(--accent) !important;
    color: white !important;
    border-color: var(--accent) !important;
}

/* =============================================
   DISEÑO RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .support-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    main, .foro-container {
        padding: 16px 10px 70px;
        gap: 20px;
    }

    .hero-section {
        padding: 22px 14px;
        margin-bottom: 20px;
    }

    .thread-card-detail,
    .comments-section,
    .comment-form-section {
        padding: 16px 12px;
        border-radius: 14px;
    }

    .thread-detail-title {
        font-size: 20px;
    }

    .form-actions .btn {
        width: 100%;
    }
}

.hero-title:hover { cursor: pointer; color: var(--accent); transform: scale(1.02); transition: all 0.2s ease; }

