/* =============================================================================
   Sala de Entrevista — estilos del módulo
   -----------------------------------------------------------------------------
   Scopes:
     .sala-home   -> bloque inyectado en front-page.php, arriba del hero
     .sala-single -> página completa de la convocatoria
   ============================================================================= */

:root {
    --sala-red:        var(--red, #d3403d);
    --sala-red-dark:   var(--red-dark, #a71717);
    --sala-red-darker: var(--red-darker, #740607);
    --sala-black:      #0d0d0f;
    --sala-ink:        #151618;
    --sala-muted:      #64666b;
    --sala-line:       rgba(0,0,0,.08);
    --sala-white:      #fff;
    --sala-font:       var(--font-sans, 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, sans-serif);
}

/* ========================= HOME BLOCK ========================= */

.sala-home {
    position: relative;
    overflow: hidden;
    background: var(--sala-black);
    color: var(--sala-white);
    font-family: var(--sala-font);
    isolation: isolate;
}

.sala-home__bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 85% 50%, rgba(211,64,61,0.35), transparent 60%),
        radial-gradient(ellipse 50% 70% at 15% 100%, rgba(116,6,7,0.45), transparent 60%),
        linear-gradient(135deg, #0d0d0f 0%, #1a0708 55%, #2a0a0b 100%);
    z-index: -1;
}

.sala-home__bg::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 25% 30%, rgba(255,255,255,0.04) 1px, transparent 1px),
        radial-gradient(circle at 75% 70%, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 32px 32px, 48px 48px;
    pointer-events: none;
}

.sala-home__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px 0;
    display: grid;
    grid-template-columns: 1fr 420px;
    align-items: end;
    gap: 24px;
    min-height: 380px;
}

.sala-home__content {
    padding-bottom: 40px;
    max-width: 620px;
}

.sala-home__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #f4dcdc;
    backdrop-filter: blur(6px);
    background: rgba(255,255,255,0.04);
}

.sala-home__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--sala-red);
    box-shadow: 0 0 0 0 rgba(211,64,61,0.7);
    animation: salaPulse 2s infinite;
}

@keyframes salaPulse {
    0%   { box-shadow: 0 0 0 0    rgba(211,64,61,0.7); }
    70%  { box-shadow: 0 0 0 10px rgba(211,64,61,0);   }
    100% { box-shadow: 0 0 0 0    rgba(211,64,61,0);   }
}

.sala-home__title {
    margin: 18px 0 10px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.sala-home__entrevistado {
    margin: 0 0 10px;
    font-size: 17px;
    color: #f4dcdc;
    font-weight: 500;
}
.sala-home__entrevistado b { color: #fff; font-weight: 800; }

.sala-home__intro {
    margin: 0 0 24px;
    color: rgba(255,255,255,0.78);
    font-size: 15px;
    line-height: 1.55;
    max-width: 540px;
}

.sala-home__ctaRow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.sala-home__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    background: var(--sala-red);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.01em;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 8px 24px -6px rgba(211,64,61,0.55);
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.sala-home__cta:hover {
    background: var(--sala-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -6px rgba(211,64,61,0.7);
}
.sala-home__cta svg { width: 18px; height: 18px; }

.sala-home__timer {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.sala-home__timer svg { width: 16px; height: 16px; }

.sala-home__png {
    position: relative;
    height: 380px;
    align-self: end;
    display: flex;
    justify-content: flex-end;
}
.sala-home__png img {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: bottom right;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
}

@media (max-width: 900px) {
    .sala-home__inner {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 32px 20px 0;
        gap: 0;
    }
    .sala-home__content { padding-bottom: 20px; max-width: none; }
    .sala-home__png {
        height: 280px;
        justify-content: center;
    }
    .sala-home__png img { position: static; height: 100%; }
    .sala-home__title { font-size: clamp(28px, 8vw, 38px); }
}

/* ========================= SINGLE ========================= */

.sala-single {
    font-family: var(--sala-font);
    color: var(--sala-ink);
    background: #f7f7f8;
    min-height: 70vh;
}

.sala-single__hero {
    position: relative;
    overflow: hidden;
    background: var(--sala-black);
    color: #fff;
    isolation: isolate;
}
.sala-single__hero::before {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(ellipse 60% 80% at 85% 40%, rgba(211,64,61,0.35), transparent 60%),
        radial-gradient(ellipse 50% 70% at 15% 120%, rgba(116,6,7,0.45), transparent 60%),
        linear-gradient(135deg, #0d0d0f 0%, #1a0708 55%, #2a0a0b 100%);
}
.sala-single__hero.is-closed::before {
    background:
        radial-gradient(ellipse 50% 60% at 50% 50%, rgba(100,102,107,0.35), transparent 60%),
        linear-gradient(135deg, #0d0d0f 0%, #202124 100%);
}

.sala-single__hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 24px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 40px;
    min-height: 420px;
}
.sala-single__hero-copy {
    padding-bottom: 48px;
    min-width: 0;
}

.sala-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #f4dcdc;
    backdrop-filter: blur(6px);
    background: rgba(255,255,255,0.04);
}
.sala-eyebrow--closed {
    color: #c7c8cc;
    border-color: rgba(255,255,255,0.15);
}
.sala-eyebrow__dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--sala-red);
    box-shadow: 0 0 0 0 rgba(211,64,61,0.7);
    animation: salaPulse 2s infinite;
}
.sala-eyebrow--closed .sala-eyebrow__dot { background: #888; animation: none; }

.sala-single__title {
    margin: 18px 0 12px;
    font-size: clamp(30px, 4.6vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.sala-single__entrevistado {
    margin: 0 0 14px;
    font-size: 17px;
    color: #f4dcdc;
}
.sala-single__entrevistado b { color: #fff; font-weight: 800; }

.sala-single__intro {
    margin: 0;
    max-width: 560px;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255,255,255,0.82);
}

.sala-single__closed-note {
    margin-top: 18px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    max-width: 560px;
}

.sala-single__hero-png {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    max-width: 520px;
    max-height: 460px;
}
.sala-single__hero-png img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 460px;
    object-fit: contain;
    object-position: bottom right;
    filter: drop-shadow(0 22px 40px rgba(0,0,0,0.45));
}

@media (max-width: 900px) {
    .sala-single__hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 40px 20px 0;
        gap: 16px;
    }
    .sala-single__hero-copy { padding-bottom: 20px; }
    .sala-single__hero-png {
        max-width: 100%;
        max-height: 320px;
        justify-content: center;
    }
    .sala-single__hero-png img {
        max-height: 320px;
        object-position: bottom center;
    }
}

/* ---- BODY ---- */

.sala-single__body {
    padding: 48px 20px 72px;
}
.sala-single__body-inner {
    max-width: 820px;
    margin: 0 auto;
}

/* ---- FORM ---- */

.sala-form-wrap { margin-bottom: 40px; }

.sala-form {
    background: #fff;
    border: 1px solid var(--sala-line);
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 10px 30px -12px rgba(0,0,0,0.08);
}
.sala-form__label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sala-muted);
    margin-bottom: 8px;
}
.sala-form textarea {
    width: 100%;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    color: var(--sala-ink);
    background: #fafafb;
    border: 1px solid var(--sala-line);
    border-radius: 10px;
    padding: 14px 16px;
    resize: vertical;
    min-height: 84px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.sala-form textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--sala-red);
    box-shadow: 0 0 0 3px rgba(211,64,61,0.14);
}

.sala-form__foot {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.sala-form__counter {
    font-size: 13px;
    color: var(--sala-muted);
    font-variant-numeric: tabular-nums;
}
.sala-form__submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: var(--sala-red);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 6px 16px -6px rgba(211,64,61,0.55);
}
.sala-form__submit:hover:not(:disabled) {
    background: var(--sala-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -6px rgba(211,64,61,0.65);
}
.sala-form__submit:disabled { opacity: .65; cursor: not-allowed; }
.sala-form__submit svg { width: 15px; height: 15px; }

.sala-form__notice {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
}
.sala-form__notice[data-tone="error"]   { background: #fdecec; color: #a71717; }
.sala-form__notice[data-tone="success"] { background: #ecfaef; color: #1a7e27; }

.sala-form-disabled {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: #fff;
    border: 1px dashed var(--sala-line);
    border-radius: 12px;
    color: var(--sala-muted);
    font-size: 14px;
}
.sala-form-disabled svg { width: 20px; height: 20px; color: var(--sala-red); flex-shrink: 0; }
.sala-form-disabled a { color: var(--sala-red); font-weight: 700; text-decoration: none; }
.sala-form-disabled a:hover { text-decoration: underline; }

/* ---- LIST ---- */

.sala-list-header { margin-bottom: 18px; }
.sala-list-header h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 4px;
    color: var(--sala-ink);
}
.sala-list-count { color: var(--sala-muted); font-weight: 600; font-size: 16px; }
.sala-list-note {
    margin: 0;
    font-size: 13px;
    color: var(--sala-muted);
}

.sala-q-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sala-q-empty {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border: 1px dashed var(--sala-line);
    border-radius: 12px;
    color: var(--sala-muted);
    font-size: 14px;
}

.sala-q {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--sala-line);
    border-radius: 12px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    animation: salaQFadeIn 0.35s ease;
}
.sala-q:hover {
    border-color: rgba(0,0,0,0.12);
    box-shadow: 0 8px 22px -10px rgba(0,0,0,0.12);
}

@keyframes salaQFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* Destacada: sutilmente resaltada */
.sala-q--destacada {
    border-color: rgba(211,64,61,0.45);
    background: linear-gradient(180deg, #fffaf9 0%, #fff 100%);
    box-shadow: 0 6px 18px -10px rgba(211,64,61,0.35);
}

/* Membership hint en el borde izquierdo */
.sala-q[data-membership="black"] { border-left: 3px solid #111; }
.sala-q[data-membership="red"]   { border-left: 3px solid var(--sala-red); }

.sala-q__vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding-top: 4px;
}
.sala-q__like {
    width: 40px; height: 40px;
    background: #fafafb;
    border: 1px solid var(--sala-line);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--sala-muted);
    transition: all .15s ease;
}
.sala-q__like:hover {
    background: #fff;
    border-color: var(--sala-red);
    color: var(--sala-red);
    transform: translateY(-1px);
}
.sala-q__like.is-active {
    background: var(--sala-red);
    border-color: var(--sala-red);
    color: #fff;
    box-shadow: 0 4px 12px -4px rgba(211,64,61,0.5);
}
.sala-q__like svg { width: 18px; height: 18px; }
.sala-q__like.is-bumping { animation: salaLikePulse .35s ease; }
@keyframes salaLikePulse {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}
.sala-q__likes {
    font-weight: 700;
    font-size: 13px;
    color: var(--sala-ink);
    font-variant-numeric: tabular-nums;
}

.sala-q__body { min-width: 0; }

.sala-q__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.sala-q__avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.sala-q__avatar--fallback {
    background: linear-gradient(135deg, #e9eaec 0%, #d3d5d9 100%);
    color: var(--sala-ink);
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sala-q__meta-text {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--sala-muted);
}
.sala-q__author {
    color: var(--sala-ink);
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
}
.sala-q__author:hover { color: var(--sala-red); }
.sala-q__meta-text time { font-variant-numeric: tabular-nums; }

.sala-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.sala-badge--black { background: linear-gradient(135deg, #1a1a1c 0%, #333 100%); color: #fff; }
.sala-badge--red   { background: var(--sala-red); color: #fff; }
.sala-badge--featured {
    background: rgba(211,64,61,0.1);
    color: var(--sala-red-dark);
    border: 1px solid rgba(211,64,61,0.3);
}

.sala-q__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--sala-ink);
    word-wrap: break-word;
}

@media (max-width: 600px) {
    .sala-q {
        grid-template-columns: 48px 1fr;
        gap: 10px;
        padding: 14px;
    }
    .sala-q__like { width: 36px; height: 36px; }
    .sala-q__text { font-size: 14px; }
    .sala-list-header h2 { font-size: 19px; }
}
