﻿/* =============================================================
   REDACTAR — Fiel al diseño de la imagen de referencia
   ============================================================= */

:root {
    --rd-cream:   #faf8f4;
    --rd-border:  #e8e0d0;
    --rd-gold:    #b68a43;
    --rd-dark:    #1a1a1a;
    --rd-muted:   #6b6b6b;
    --rd-white:   #ffffff;
}

/* ── Página completa ─────────────────────────────────────────── */
.rd-page {
    min-height: 100vh;
    padding-top: var(--navbar-h, 72px);
}

/* ── Barra de créditos ───────────────────────────────────────── */
.rd-credits-bar {
    background: #fff;
    border-bottom: 1px solid var(--rd-border);
    padding: .6rem 0;
}
.rd-credits-bar__inner {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    color: var(--rd-muted);
}
.rd-credits-bar__inner svg { color: var(--rd-gold); flex-shrink: 0; }
.rd-credits-bar__inner strong { color: var(--rd-dark); }
.rd-credits-bar__warn { color: #d97706; }
.rd-credits-bar__cta {
    color: var(--rd-gold);
    font-weight: 700;
    text-decoration: none;
    margin-left: .25rem;
}
.rd-credits-bar__cta:hover { text-decoration: underline; }

/* ── Círculo flotante de créditos ────────────────────────────── */
.rd-credits-circle {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #203A43, #2e5f6e);
    color: #fff;
    box-shadow: 0 4px 14px rgba(32,58,67,.4);
    line-height: 1.15;
    z-index: 10;
    cursor: default;
}
.rd-credits-circle__num {
    font-size: 1rem;
    font-weight: 700;
}
.rd-credits-circle__label {
    font-size: .58rem;
    opacity: .9;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ── Secciones genéricas ─────────────────────────────────────── */
.rd-section { padding: 2.5rem 0; }
.rd-section--docs { padding-bottom: 1.5rem; }
.rd-section--bottom { padding-top: 2rem; padding-bottom: 3rem; }

/* ── Título con líneas decorativas ──────────────────────────── */
.rd-section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.rd-section-title__line {
    flex: 1;
    height: 1px;
    background: var(--rd-border);
}
.rd-section-title__text {
    font-family: 'Recoleta Black', Georgia, serif;
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 900;
    color: var(--rd-dark);
    white-space: nowrap;
    margin: 0;
}

/* ── Cuadrícula de documentos ────────────────────────────────── */
.rd-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .6rem;
}

.rd-card__icon img,
.rd-rule__icon img { transition: filter .18s; }
.rd-card:hover .rd-card__icon img,
.rd-rule:hover .rd-rule__icon img {
    filter: brightness(0) saturate(100%) invert(27%) sepia(40%) saturate(500%) hue-rotate(160deg) brightness(85%);
}

.rd-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: var(--rd-white);
    border: 1px solid var(--rd-border);
    border-radius: 8px;
    padding: .75rem .9rem;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s;
}
.rd-card:hover {
    border-color: var(--rd-gold);
    box-shadow: 0 2px 12px rgba(182, 138, 67,.13);
}
.rd-card--disabled {
    /*opacity: .4;*/
    pointer-events: none;
}
.rd-card--locked {
    /*opacity: .55;*/
    pointer-events: none;
    cursor: default;
    background: #fafafa;
    border-style: dashed;
}

.rd-card__icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 7px;
    background: var(--rd-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rd-gold);
}
.rd-card__icon img {
    width: 64px;
    height: 54px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}

.rd-card__body { flex: 1; min-width: 0; }
.rd-card__cat {
    font-size: .82rem;
    font-weight: 700;
    color: var(--rd-dark);
    line-height: 1.3;
}
.rd-card__var {
    font-size: .7rem;
    font-weight: 700;
    color: #7d7d7d;
    line-height: 1.3;
    margin-top: .1rem;
}
.rd-card__arrow { color: var(--rd-gold); flex-shrink: 0; }

/* ── Botón informar error ────────────────────────────────────── */
.rd-report-wrap {
    display: flex;
    justify-content: center;
    padding: .5rem 1rem 3.5rem;
}
.rd-report {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--rd-white);
    border: 1.5px solid var(--rd-border);
    border-radius: 12px;
    text-decoration: none;
    max-width: 420px;
    width: 100%;
    transition: border-color .2s, box-shadow .2s, transform .15s;
}
.rd-report:hover {
    border-color: var(--rd-gold);
    box-shadow: 0 4px 20px rgba(182,138,67,.14);
    transform: translateY(-2px);
}
.rd-report__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #fff0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
}
.rd-report__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.rd-report__title {
    font-size: .88rem;
    font-weight: 700;
    color: var(--rd-dark);
    line-height: 1.3;
}
.rd-report__desc {
    font-size: .74rem;
    color: var(--rd-muted);
    line-height: 1.4;
}
.rd-report__arrow {
    flex-shrink: 0;
    color: var(--rd-gold);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .2s, transform .2s;
}
.rd-report:hover .rd-report__arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ── Barra de características ────────────────────────────────── */
.rd-features {
    padding: 0 0 2rem;
}
.rd-features__bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: var(--rd-white);
    border: 1px solid var(--rd-border);
    border-radius: 12px;
    padding: 1.5rem 0;
    width: 100%;
}

.rd-feat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    gap: .3rem;
}
.rd-feat__sep {
    width: 1px;
    background: var(--rd-border);
    align-self: stretch;
    margin: .25rem 0;
}
.rd-feat__icon {
    width: 65px;
    height: 45px;
    border-radius: 8px;
    background: var(--rd-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rd-gold);
    margin-bottom: .2rem;
}
.rd-feat__icon img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}
.rd-feat__title {
    font-size: .78rem;
    font-weight: 700;
    color: var(--rd-dark);
    line-height: 1.3;
}
.rd-feat__desc {
    font-size: .68rem;
    color: var(--rd-muted);
    line-height: 1.5;
}

/* ── Sección inferior: 2 columnas ───────────────────────────── */
.rd-bottom {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: stretch;
}

.rd-rules {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    justify-content: space-between;
}

/* Reglas */

.rd-rule {
    flex: 1;
    display: flex;
    align-items: center;
    gap: .7rem;
    width: 100%;
    background: var(--rd-white);
    border: 1px solid var(--rd-border);
    border-radius: 7px;
    padding: .7rem .85rem;
    cursor: pointer;
    text-align: left;
    transition: border-color .18s;
}
.rd-rule:hover { border-color: var(--rd-gold); }

.rd-rule__icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rd-rule__icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}
.rd-rule__label {
    flex: 1;
    font-size: .78rem;
    font-weight: 600;
    color: var(--rd-dark);
    line-height: 1.35;
}
.rd-rule__arrow { color: var(--rd-gold); flex-shrink: 0; }

/* Pasos */
.rd-steps__title {
    font-family: 'Droid Serif', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--rd-dark);
    margin: 0 0 1.75rem;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: .5rem;
    justify-content: center;
    text-align: center;
}
.rd-steps__title em {
    font-style: italic;
    color: var(--rd-dark);
}
.rd-steps__dash {
    color: var(--rd-gold);
}

.rd-steps__img-wrap {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    line-height: 0;
}
.rd-steps__img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}

.rd-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0;
}

/* Wrap del número + línea punteada */
.rd-step__num-wrap {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 36px;
    margin-top: 22px;
}

.rd-step__num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eeeeee;
    color: var(--rd-gold);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rd-step__connector {
    width: 1px;
    flex: 1;
    min-height: 40px;
    border-left: 2px dashed var(--rd-border);
    margin: 4px 0;
}

.rd-step__icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rd-step__icon img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.rd-step__body {
    padding-top: .4rem;
    padding-bottom: 1.5rem;
    flex: 1;
}
.rd-step__title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--rd-dark);
    margin-bottom: .3rem;
}
.rd-step__desc {
    font-size: .78rem;
    color: var(--rd-muted);
    line-height: 1.6;
}

/* ── Modal ───────────────────────────────────────────────────── */
.rd-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.rd-modal.is-open { display: flex; }

.rd-modal__box {
    background: var(--rd-white);
    border-radius: 16px;
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,.2);
    position: relative;
    z-index: 1001;
    overflow: hidden;
}

/* Botón cerrar esquina superior derecha */
.rd-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--rd-muted);
    padding: .3rem;
    border-radius: 6px;
    z-index: 2;
}
.rd-modal__close:hover { background: #f3f4f6; }

/* Hero: icono + título + subtítulo */
.rd-modal__hero {
    padding: 1.75rem 2rem 1rem;
    border-bottom: 1px solid var(--rd-border);
}
.rd-modal__hero-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    margin-bottom: .5rem;
}
.rd-modal__icon-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.rd-modal__icon-wrap img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}
.rd-modal__title {
    font-size: 1.05rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--rd-dark);
    margin: 0;
    line-height: 1.2;
}
.rd-modal__subtitle {
    font-size: .8rem;
    color: var(--rd-muted);
    line-height: 1.55;
    margin: 0;
    text-align: center;
}

/* Cuerpo scrolleable */
.rd-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 2rem;
}
.rd-modal__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.rd-modal__list li {
    font-size: .82rem;
    color: var(--rd-dark);
    line-height: 1.6;
    padding-left: 1.1rem;
    position: relative;
}
.rd-modal__list li::before {
    content: '▪';
    position: absolute;
    left: 0;
    color: var(--rd-gold);
    font-size: .7rem;
    top: .2rem;
}

/* Footer: checkbox + botón */
.rd-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 2rem;
    border-top: 1px solid var(--rd-border);
    background: var(--rd-white);
}
.rd-modal__check-label {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .78rem;
    color: var(--rd-muted);
    cursor: pointer;
    line-height: 1.4;
}
.rd-modal__check {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    accent-color: var(--rd-gold);
    margin-top: 1px;
    cursor: pointer;
}
.rd-modal__submit {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: var(--rd-gold);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .6rem 1.25rem;
    font-size: .84rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity .18s;
    flex-shrink: 0;
}
.rd-modal__submit:hover { opacity: .88; }
.rd-modal__submit:disabled { opacity: .45; cursor: not-allowed; }

.rd-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 999;
}
.rd-overlay.is-open { display: block; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 860px) {
    .rd-grid { grid-template-columns: repeat(2, 1fr); }
    .rd-bottom { grid-template-columns: 1fr; }
    .rd-credits-circle { width: 58px; height: 58px; top: .8rem; right: .75rem; }
    .rd-credits-circle__num { font-size: .88rem; }
}
@media (max-width: 600px) {
    /* En móvil: sale del flujo absoluto y aparece al lado derecho del título */
    .rd-credits-circle {
        position: static;
        width: 52px;
        height: 52px;
        flex-shrink: 0;
        box-shadow: 0 2px 8px rgba(32,58,67,.3);
    }
    .rd-credits-circle__num   { font-size: .82rem; }
    .rd-credits-circle__label { font-size: .5rem; }
}
@media (max-width: 560px) {
    .rd-grid { grid-template-columns: 1fr; }
    .rd-features__bar { flex-direction: column; align-items: stretch; }
    .rd-feat__sep { width: 100%; height: 1px; align-self: auto; }
    .rd-feat { flex-direction: row; text-align: left; padding: .6rem 0; gap: .75rem; }
    .rd-feat__icon { flex-shrink: 0; }
    .rd-section-title__text { font-size: .95rem; white-space: normal; text-align: center; }
}

/* ── Aviso inline de mantenimiento ───────────────────────── */
.rd-maint-notice {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fffbeb;
    border: 1.5px solid #fcd34d;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: .5rem;
}
.rd-maint-notice__icon {
    color: #b45309;
    flex-shrink: 0;
    margin-top: .1rem;
}
.rd-maint-notice__title {
    font-weight: 700;
    font-size: .92rem;
    color: #78350f;
    margin-bottom: .3rem;
}
.rd-maint-notice__msg {
    font-size: .85rem;
    color: #92400e;
    line-height: 1.6;
}

/* ── Sección de categoría ─────────────────────────────────── */
.rd-cat-section { margin-bottom: 3rem; }

.rd-cat-heading {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1.5rem;
}
.rd-cat-heading__line { display: none; }
.rd-cat-heading__accent {
    width: 4px;
    height: 1.6rem;
    border-radius: 99px;
    background: var(--rd-gold);
    flex-shrink: 0;
}
.rd-cat-heading__text {
    font-family: 'Droid Serif', Georgia, serif;
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 700;
    color: var(--rd-dark);
    margin: 0;
}

.rd-grid--mb { margin-bottom: 1.5rem; }

/* ── Sub-encabezado de subcategoría ──────────────────────── */
.rd-subcat-heading {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .9rem;
    margin-top: .1rem;
}
.rd-subcat-heading__line { display: none; }
.rd-subcat-heading__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--rd-gold);
    opacity: .7;
    flex-shrink: 0;
}
.rd-subcat-heading__text {
    font-size: .7rem;
    font-weight: 700;
    color: var(--rd-muted);
    text-transform: uppercase;
    letter-spacing: .09em;
}

