/* ============================================================
   RCAD v73 — Single article card + top-aligned sidebar
   ============================================================ */
body.single:not(.single-topic):not(.single-forum) {
    background: var(--rcad-bg, #f6f8fb) !important;
}

body.single:not(.single-topic):not(.single-forum) .rcad-single-layout-v73 {
    width: min(var(--site-width, 1380px), calc(100% - (var(--site-padding, 24px) * 2))) !important;
    max-width: var(--site-width, 1380px) !important;
    margin: 0 auto 44px !important; /* RCAD v396: sin hueco bajo breadcrumb */
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(320px, var(--sidebar-width, 320px)) !important;
    gap: 24px !important;
    align-items: start !important;
    box-sizing: border-box;
}

body.single:not(.single-topic):not(.single-forum) .rcad-single-main-v73 {
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.single:not(.single-topic):not(.single-forum) .rcad-article-card-v73 {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    background: #fff !important;
    border: 1px solid var(--rcad-border, #e3e8ef) !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 26px rgba(11, 42, 91, .055) !important;
}

body.single:not(.single-topic):not(.single-forum) .rcad-article-head-v73 {
    padding: 34px 38px 25px !important;
    background: #fff !important;
    border-bottom: 1px solid var(--rcad-border, #e3e8ef);
}

.rcad-article-kicker-v73 {
    display: inline-flex;
    margin: 0 0 10px;
    color: var(--rcad-link, #1769e0) !important;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.3;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: .01em;
}
.rcad-article-kicker-v73:hover { color: var(--rcad-accent, #ff8a00) !important; }

body.single:not(.single-topic):not(.single-forum) .rcad-article-title-v73 {
    max-width: 980px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--rcad-primary-strong, #071f45) !important;
    font-size: clamp(32px, 3.2vw, 48px) !important;
    font-weight: 520 !important;
    line-height: 1.12 !important;
    letter-spacing: -.025em !important;
    text-wrap: balance;
}

.rcad-article-meta-v73 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 0;
    color: var(--rcad-muted, #667085);
    font-size: 13px;
    line-height: 1.4;
}

.rcad-article-lead-v73 {
    max-width: 980px !important;
    margin: 19px 0 0 !important;
    color: var(--rcad-text-2, #344054) !important;
    font-size: clamp(16px, 1.45vw, 20px) !important;
    font-weight: 400 !important;
    line-height: 1.55 !important;
}

body.single:not(.single-topic):not(.single-forum) .rcad-article-body-v73 {
    padding: 18px 38px 38px !important;
    min-width: 0;
}

/* Breadcrumb/category modules are now part of the article card, never a detached page strip. */
body.single:not(.single-topic):not(.single-forum) .rcad-article-body-v73 .rcad-breadcrumb,
body.single:not(.single-topic):not(.single-forum) .rcad-article-body-v73 .rcad-breadcrumbs,
body.single:not(.single-topic):not(.single-forum) .rcad-article-body-v73 .rcad-cat-block {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
}

.rcad-article-featured-v73 {
    width: 100%;
    margin: 14px 0 18px !important;
    padding: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #f7f9fc;
}
.rcad-article-featured-v73 img {
    display: block;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* RCAD v330 — texto e imágenes del artículo comparten exactamente la misma columna de 800px. */
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > p,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > h1,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > h2,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > h3,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > h4,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > ul,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > ol,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > blockquote,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > .wp-block-image,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > figure.wp-block-image,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > .wp-block-image.alignwide,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > .wp-block-image.alignfull,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > figure.alignwide,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > figure.alignfull {
    width: 100% !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > .wp-block-image img,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > figure.wp-block-image img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
}

/* Sidebar begins at the exact same top edge as the article card. */
body.single:not(.single-topic):not(.single-forum) .rcad-single-layout-v73 > #secondary,
body.single:not(.single-topic):not(.single-forum) .rcad-single-layout-v73 > .entry-aside {
    display: block !important;
    align-self: start !important;
    position: relative;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
}
body.single:not(.single-topic):not(.single-forum) .rcad-single-layout-v73 > #secondary .widget-area-wrapper,
body.single:not(.single-topic):not(.single-forum) .rcad-single-layout-v73 > .entry-aside .widget-area-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}
body.single:not(.single-topic):not(.single-forum) .rcad-single-layout-v73 > #secondary .widget:first-child,
body.single:not(.single-topic):not(.single-forum) .rcad-single-layout-v73 > .entry-aside .widget:first-child,
body.single:not(.single-topic):not(.single-forum) .rcad-single-layout-v73 > #secondary .rcad-user-widget:first-child,
body.single:not(.single-topic):not(.single-forum) .rcad-single-layout-v73 > .entry-aside .rcad-user-widget:first-child {
    margin-top: 0 !important;
}

.rcad-single-comments-v73 {
    margin-top: 24px;
    padding: 28px 34px;
    background: #fff;
    border: 1px solid var(--rcad-border, #e3e8ef);
    border-radius: 14px;
}

@media (min-width: 992px) {
    body.single:not(.single-topic):not(.single-forum) .rcad-single-layout-v73 > #secondary .sticky,
    body.single:not(.single-topic):not(.single-forum) .rcad-single-layout-v73 > .entry-aside .sticky {
        position: sticky !important;
        top: 92px !important;
    }
}

@media (max-width: 1120px) and (min-width: 992px) {
    body.single:not(.single-topic):not(.single-forum) .rcad-single-layout-v73 {
        grid-template-columns: minmax(0, 1fr) 290px !important;
        gap: 22px !important;
    }
    body.single:not(.single-topic):not(.single-forum) .rcad-article-head-v73 { padding: 30px 30px 23px !important; }
    body.single:not(.single-topic):not(.single-forum) .rcad-article-body-v73 { padding: 16px 30px 32px !important; }
}

@media (max-width: 991px) {
    body.single:not(.single-topic):not(.single-forum) .rcad-single-layout-v73 {
        width: calc(100% - 28px) !important;
        margin: 0 auto 34px !important; /* RCAD v396: sin hueco bajo breadcrumb en tablet/móvil */
        display: block !important;
    }
    body.single:not(.single-topic):not(.single-forum) .rcad-single-layout-v73 > #secondary,
    body.single:not(.single-topic):not(.single-forum) .rcad-single-layout-v73 > .entry-aside {
        margin-top: 20px !important;
    }
}

@media (max-width: 640px) {
    body.single:not(.single-topic):not(.single-forum) .rcad-single-layout-v73 { width: calc(100% - 20px) !important; }
    body.single:not(.single-topic):not(.single-forum) .rcad-article-head-v73 { padding: 24px 20px 20px !important; }
    body.single:not(.single-topic):not(.single-forum) .rcad-article-body-v73 { padding: 14px 20px 26px !important; }
    body.single:not(.single-topic):not(.single-forum) .rcad-article-title-v73 { font-size: clamp(28px, 9vw, 36px) !important; }
    .rcad-article-lead-v73 { font-size: 16px !important; }
}

/* RCAD v331 — tablas alineadas con la columna de lectura de 800px. */
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > table,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > .wp-block-table,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > figure.wp-block-table {
    width: 100% !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > .wp-block-table > table,
body.single:not(.single-topic):not(.single-forum) .rcad-article-content-v73 > figure.wp-block-table > table {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* RCAD v333 — formulario de comentario abierto para invitados. */
body.single:not(.logged-in):not(.single-topic):not(.single-forum) .rcad-single-comments-v73 .comment-form-author,
body.single:not(.logged-in):not(.single-topic):not(.single-forum) .rcad-single-comments-v73 .comment-form-email,
body.single:not(.logged-in):not(.single-topic):not(.single-forum) .rcad-single-comments-v73 .comment-form-url,
body.single:not(.logged-in):not(.single-topic):not(.single-forum) .rcad-single-comments-v73 .comment-notes,
body.single:not(.logged-in):not(.single-topic):not(.single-forum) .rcad-single-comments-v73 .logged-in-as {
    display: none !important;
}
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 #comment {
    width: 100% !important;
    min-height: 150px !important;
    box-sizing: border-box !important;
    resize: vertical !important;
}

/* ============================================================
 * RCAD v334 — Comentarios de artículos alineados a 800 px.
 * Estilo RecursosCAD + formulario abierto para invitados.
 * ============================================================ */
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 {
    width: 100% !important;
    max-width: 800px !important;
    margin: 28px auto 0 !important;
    padding: 28px 30px 30px !important;
    box-sizing: border-box !important;
    border: 1px solid #dbe3ee !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 3px 14px rgba(7,27,70,.035) !important;
}
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 .comment-respond,
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 #respond,
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 #commentform {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 .comment-reply-title,
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 #reply-title {
    margin: 0 0 14px !important;
    color: #071b46 !important;
    font-size: 25px !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    letter-spacing: -.02em !important;
}
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 .comment-form-comment {
    margin: 0 0 14px !important;
}
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 .comment-form-comment label {
    display: block !important;
    margin: 0 0 7px !important;
    color: #334155 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 textarea#comment {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 150px !important;
    margin: 0 !important;
    padding: 14px 16px !important;
    border: 1px solid #cbd7e6 !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #071b46 !important;
    font: inherit !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
    box-shadow: inset 0 1px 2px rgba(7,27,70,.025) !important;
    outline: 0 !important;
}
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 textarea#comment:focus {
    border-color: #f6a800 !important;
    box-shadow: 0 0 0 3px rgba(246,168,0,.13) !important;
}
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 .form-submit {
    margin: 14px 0 0 !important;
}
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 #submit,
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 input[type="submit"].submit {
    min-height: 44px !important;
    padding: 0 20px !important;
    border: 1px solid #e89d00 !important;
    border-radius: 8px !important;
    background: #f6a800 !important;
    color: #071b46 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 42px !important;
    box-shadow: 0 3px 9px rgba(246,168,0,.16) !important;
    cursor: pointer !important;
}
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 #submit:hover,
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 input[type="submit"].submit:hover {
    background: #e99f00 !important;
    border-color: #dc9500 !important;
}
body.single:not(.logged-in):not(.single-topic):not(.single-forum) .rcad-single-comments-v73 .comment-form-cookies-consent {
    display: none !important;
}
body.single:not(.logged-in):not(.single-topic):not(.single-forum) .rcad-single-comments-v73 #commentform::before {
    content: "Escribe tu comentario. Al publicarlo te pediremos iniciar sesión o crear una cuenta gratuita.";
    display: block !important;
    margin: 0 0 12px !important;
    padding: 9px 11px !important;
    border-left: 3px solid #f6a800 !important;
    background: #fff9ec !important;
    color: #5b6472 !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
}
@media (max-width: 860px) {
    body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 {
        width: calc(100% - 24px) !important;
        padding: 22px 18px 24px !important;
    }
}

/* ============================================================
 * RCAD v335 — Comentarios: tarjeta exterior alineada con artículo,
 * formulario interior 800px y CTA con texto blanco.
 * ============================================================ */
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 {
    width: 100% !important;
    max-width: none !important;
    margin: 28px 0 0 !important;
    padding: 34px 36px 38px !important;
    box-sizing: border-box !important;
}
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 .comment-respond,
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 #respond,
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 #commentform,
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 .comment-reply-title,
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 #reply-title {
    width: 100% !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 #submit,
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 input[type="submit"].submit,
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 button[type="submit"] {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: #f6a800 !important;
}
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 #submit:hover,
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 input[type="submit"].submit:hover,
body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 button[type="submit"]:hover {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: #e99f00 !important;
}
@media (max-width: 860px) {
    body.single:not(.single-topic):not(.single-forum) .rcad-single-comments-v73 {
        width: 100% !important;
        padding: 24px 18px 28px !important;
    }
}
