/*
 * Colmagis authored customizations.
 *
 * Keep WPBakery-generated `_wpb_shortcodes_custom_css` out of this file.
 * Ownership and verification notes live in the repo README.md.
 */

/* --- Header social icons -------------------------------------------------
 * Salient's stock icon markup includes a hover "flip" duplicate (an ::after
 * copy of the glyph positioned just below it, meant to slide up on hover).
 * In the top nav these icons sit inside a full-height menu link rather than
 * Salient's own compact icon wrapper, so the duplicate is never clipped and
 * shows as a permanent ghost copy under each icon. Salient's own generated
 * salient-dynamic-styles.css sets `content: ""` on these same icons with
 * higher specificity (an id + a class) than a plain descendant selector can
 * beat, so !important is needed to actually win — matching specificity and
 * relying on source order is not reliable since that stylesheet can be
 * regenerated after ours. Drop the duplicate and use each platform's own
 * color instead of the inherited navy. */
#header-outer #social-in-menu .fa-youtube-play::after,
#header-outer #social-in-menu .icon-salient-spotify::after {
    content: none !important;
}

#header-outer #social-in-menu .fa-youtube-play {
    color: #ff0000;
}

#header-outer #social-in-menu .icon-salient-spotify {
    color: #1db954;
}

/* --- Shared list pages --------------------------------------------------- */

.colmagis-page-capacitaciones .date::first-letter,
.colmagis-page-comunicados .date::first-letter,
.colmagis-page-prensa .date::first-letter {
    text-transform: capitalize !important;
}

.colmagis-page-capacitaciones .meta-category,
.colmagis-page-comunicados .meta-category,
.colmagis-page-prensa .meta-category {
    display: none;
    visibility: hidden;
}

.colmagis-page-comunicados .post-area.featured_img_left .grav-wrap .text span {
    display: block;
}

.colmagis-page-comunicados .post-area.featured_img_left .grav-wrap .text span::first-letter {
    text-transform: uppercase;
}

/* --- Homepage featured posts ------------------------------------------ */

body.colmagis-page-inicio .post-area.auto_meta_overlaid_spaced .masonry-blog-item .article-content-wrap h3 a,
body.colmagis-page-inicio .post-area.auto_meta_overlaid_spaced .masonry-blog-item .article-content-wrap h3 a:hover {
    color: #16233a !important;
}

body.colmagis-page-inicio .post-area.auto_meta_overlaid_spaced .masonry-blog-item .article-content-wrap > .meta-category {
    display: none;
}

/* Width and color come from theme.css (token-driven, shared with the hover
 * grow effect); this just supplies the border style theme.css relies on and
 * the padding that makes room for it. */
body.colmagis-page-inicio .post-area.auto_meta_overlaid_spaced .masonry-blog-item .post-header {
    padding-left: 11px;
    border-left-style: solid;
}

/* Color, font-size and font-weight come from theme.css. */
body.colmagis-page-inicio .post-area.auto_meta_overlaid_spaced .masonry-blog-item .colmagis-featured-post-date {
    display: block;
    margin-top: 7px;
    letter-spacing: 0.01em;
    line-height: 1.3;
}

body.colmagis-page-inicio .post-area.auto_meta_overlaid_spaced .masonry-blog-item .colmagis-featured-post-date::first-letter {
    text-transform: uppercase;
}

body.colmagis-page-inicio .nectar_widget[data-style="featured-image-left"] .popular-featured-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.colmagis-page-inicio #accesos .post-date::first-letter {
    text-transform: uppercase;
}

body.colmagis-page-inicio #accesos .wpb_text_column h4 {
    display: flex;
    align-items: center;
    gap: 11px;
}

body.colmagis-page-inicio #accesos .wpb_text_column h4::after {
    width: 30px;
    height: 1px;
    background: var(--cm-accent);
    content: "";
}

/* Salient's counter numeral and hover arrow are not part of this design.
 * Row layout, the accent bar and hover live in theme.css. */
body.colmagis-page-inicio #accesos .nectar_widget[data-style="minimal-counter"] > li::before,
body.colmagis-page-inicio #accesos .nectar_widget[data-style="minimal-counter"] .arrow-circle {
    display: none !important;
}

@media (min-width: 691px) and (max-width: 999px) {
    body.colmagis-page-inicio .post-area.auto_meta_overlaid_spaced .masonry-blog-item,
    body.colmagis-page-inicio .post-area.auto_meta_overlaid_spaced .masonry-blog-item:nth-child(3n+1) {
        width: 100% !important;
    }

    body.colmagis-page-inicio .post-area.auto_meta_overlaid_spaced .masonry-blog-item .post-header h3.title {
        display: -webkit-box;
        overflow: hidden;
        font-size: 17px;
        line-height: 1.25;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    body.colmagis-page-inicio .post-area.auto_meta_overlaid_spaced .masonry-blog-item .meta-category {
        font-size: 11px;
        line-height: 1.2;
    }
}

@media (max-width: 690px) {
    body.colmagis-page-inicio .post-area.auto_meta_overlaid_spaced .masonry-blog-item,
    body.colmagis-page-inicio .post-area.auto_meta_overlaid_spaced .masonry-blog-item:nth-child(3n+1) {
        width: 100% !important;
    }

    body.colmagis-page-inicio .post-area.auto_meta_overlaid_spaced .masonry-blog-item .post-header h3.title,
    body.colmagis-page-inicio .post-area.auto_meta_overlaid_spaced .masonry-blog-item .post-header h3.title a {
        display: -webkit-box;
        overflow: hidden;
        font-size: 14px;
        line-height: 1.2;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    body.colmagis-page-inicio .post-area.auto_meta_overlaid_spaced .masonry-blog-item .meta-category {
        font-size: 10px;
        line-height: 1.2;
    }
}

/* --- Resoluciones landing category grid ------------------------------- */

@media (min-width: 691px) and (max-width: 999px) {
    body.colmagis-page-resoluciones .nectar-category-grid[data-columns][data-grid-spacing] .nectar-category-grid-item {
        padding-bottom: 120px !important;
    }

    body.colmagis-page-resoluciones .nectar-category-grid[data-alignment="top_left"] .content {
        top: 22px;
        left: 22px;
        width: calc(100% - 44px);
    }
}

@media (max-width: 690px) {
    body.colmagis-page-resoluciones .nectar-category-grid[data-grid-spacing] {
        margin-right: 0;
        margin-left: 0;
    }

    body.colmagis-page-resoluciones .nectar-category-grid[data-columns][data-grid-spacing] .nectar-category-grid-item {
        width: calc(50% - 16px) !important;
        padding-bottom: 100px !important;
        margin: 8px;
    }

    body.colmagis-page-resoluciones .nectar-category-grid[data-alignment="top_left"] .content {
        top: 12px;
        left: 12px;
        width: calc(100% - 24px);
    }

    body.colmagis-page-resoluciones .nectar-category-grid .nectar-category-grid-item .content .cat-heading {
        max-width: 100%;
        font-size: 17px;
        line-height: 1.15;
    }
}

/* --- Resoluciones category archives ----------------------------------- */

body.colmagis-resolution-archive .colmagis-resolution-index {
    padding-top: 54px;
}

body.colmagis-resolution-archive .colmagis-resolution-header {
    margin-bottom: 24px;
}

body.colmagis-resolution-archive .colmagis-resolution-header h1 {
    margin: 0 0 12px;
    color: var(--cm-text);
    font-size: 34px;
    line-height: 1.3;
}

body.colmagis-resolution-archive .colmagis-resolution-header__count {
    color: var(--cm-text-soft);
    font-size: 17px;
    font-weight: 400;
    white-space: nowrap;
}

body.colmagis-resolution-archive .colmagis-resolution-header__line {
    display: block;
    width: 190px;
    height: 1px;
    background: var(--cm-accent);
}

body.colmagis-resolution-archive .colmagis-resolution-item {
    position: relative;
    display: grid;
    overflow: hidden;
    grid-template-columns: minmax(0, 1fr);
    margin: 0 0 14px;
    padding: 20px 24px 20px 30px;
    color: var(--cm-text);
    background: var(--cm-surface);
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius-card);
    box-shadow: 0 1px 2px rgba(22, 35, 58, 0.05);
    transition: transform var(--cm-transition), box-shadow var(--cm-transition), border-color var(--cm-transition);
}

body.colmagis-resolution-archive .colmagis-resolution-item::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 5px;
    background: var(--cm-accent);
}

body.colmagis-resolution-archive .colmagis-resolution-item:hover,
body.colmagis-resolution-archive .colmagis-resolution-item:focus-within {
    transform: translateY(-2px);
    border-color: #d9cfbc;
    box-shadow: 0 10px 24px rgba(22, 35, 58, 0.12);
}

body.colmagis-resolution-archive .colmagis-resolution-item.has-post-thumbnail {
    min-height: 165px;
    grid-template-columns: 160px minmax(0, 1fr);
    column-gap: 20px;
}

body.colmagis-resolution-archive .colmagis-resolution-item__thumbnail {
    display: block;
    width: 160px;
    height: 165px;
    overflow: hidden;
    border-radius: 4px;
}

body.colmagis-resolution-archive .colmagis-resolution-item__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.colmagis-resolution-archive .colmagis-resolution-item__content {
    align-self: center;
    padding: 0;
}

body.colmagis-resolution-archive .colmagis-resolution-item__title {
    margin: 0;
    color: var(--cm-text);
    font-size: 22px;
    line-height: 34px;
}

body.colmagis-resolution-archive .colmagis-resolution-item__title a {
    color: inherit;
}

body.colmagis-resolution-archive .colmagis-resolution-item__title a:hover,
body.colmagis-resolution-archive .colmagis-resolution-item__title a:focus {
    color: var(--cm-link);
}

body.colmagis-resolution-archive .colmagis-resolution-item__meta {
    padding: 0;
    margin: 0 0 4px;
    color: var(--cm-text-soft);
    font-size: 13px;
    line-height: 18px;
}

body.colmagis-resolution-archive .colmagis-resolution-item__excerpt {
    padding: 0;
    margin: 0;
    color: var(--cm-text-soft);
    font-size: 14px;
    line-height: 22px;
}

body.colmagis-resolution-archive .colmagis-resolution-list__empty {
    padding: 10px 0 70px;
    color: var(--cm-text-soft);
    font-size: 17px;
}

body.colmagis-resolution-archive #pagination {
    padding-left: 0;
}

@media (max-width: 690px) {
    body.colmagis-resolution-archive .colmagis-resolution-index {
        padding-top: 34px;
    }

    body.colmagis-resolution-archive .colmagis-resolution-header {
        margin-bottom: 20px;
    }

    body.colmagis-resolution-archive .colmagis-resolution-header h1 {
        margin-bottom: 10px;
        font-size: 29px;
        line-height: 1.3;
    }

    body.colmagis-resolution-archive .colmagis-resolution-header__count {
        display: block;
        margin-top: 2px;
        font-size: 14px;
        line-height: 1.4;
    }

    body.colmagis-resolution-archive .colmagis-resolution-header__line {
        width: 100%;
        background: var(--cm-border);
    }

    body.colmagis-resolution-archive .colmagis-resolution-item,
    body.colmagis-resolution-archive .colmagis-resolution-item.has-post-thumbnail {
        min-height: 0;
        margin-bottom: 4px;
        grid-template-columns: minmax(0, 1fr);
    }

    body.colmagis-resolution-archive .colmagis-resolution-item.has-post-thumbnail {
        grid-template-columns: 54px minmax(0, 1fr);
        column-gap: 10px;
    }

    body.colmagis-resolution-archive .colmagis-resolution-item__thumbnail {
        width: 54px;
        height: 54px;
        margin-top: 12px;
        grid-column: 1;
        grid-row: 1;
    }

    body.colmagis-resolution-archive .colmagis-resolution-item__content {
        padding: 0;
    }

    body.colmagis-resolution-archive .colmagis-resolution-item.has-post-thumbnail .colmagis-resolution-item__content {
        display: contents;
    }

    body.colmagis-resolution-archive .colmagis-resolution-item.has-post-thumbnail .colmagis-resolution-item__title,
    body.colmagis-resolution-archive .colmagis-resolution-item.has-post-thumbnail .colmagis-resolution-item__meta {
        grid-column: 2;
    }

    body.colmagis-resolution-archive .colmagis-resolution-item.has-post-thumbnail .colmagis-resolution-item__title {
        align-self: end;
        padding-top: 9px;
    }

    body.colmagis-resolution-archive .colmagis-resolution-item.has-post-thumbnail .colmagis-resolution-item__meta {
        align-self: start;
        margin-bottom: 0;
    }

    body.colmagis-resolution-archive .colmagis-resolution-item.has-post-thumbnail .colmagis-resolution-item__excerpt {
        padding: 12px 0 18px;
        grid-column: 1 / -1;
    }

    body.colmagis-resolution-archive .colmagis-resolution-item__title {
        font-size: 17px;
        line-height: 1.35;
    }

    body.colmagis-resolution-archive .colmagis-resolution-item__meta {
        margin-bottom: 4px;
        font-size: 12px;
    }

    body.colmagis-resolution-archive .colmagis-resolution-item__excerpt {
        display: -webkit-box;
        overflow: hidden;
        font-size: 13px;
        line-height: 1.55;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }
}

/* --- Resoluciones post metadata ---------------------------------------- */

body.colmagis-single-resolution #single-below-header .meta-author,
body.colmagis-single-resolution #single-below-header .meta-comment-count,
body.colmagis-single-resolution #author-bio {
    display: none !important;
}

body.colmagis-single-resolution #single-below-header .meta-date {
    display: inline-block;
    margin: 0;
    padding: 0 !important;
    border: 0;
}

body.colmagis-single-resolution #single-below-header .meta-date::first-letter {
    text-transform: uppercase;
}

/* --- Comunicados post metadata and paper surface ---------------------- */

body.colmagis-single-comunicado #single-below-header .meta-author,
body.colmagis-single-comunicado #single-below-header .meta-comment-count,
body.colmagis-single-comunicado #author-bio {
    display: none !important;
}

body.colmagis-single-comunicado #single-below-header .meta-date {
    display: inline-block;
    margin: 0;
    padding: 0 !important;
    border: 0;
}

body.colmagis-single-comunicado #single-below-header .meta-date::first-letter {
    text-transform: uppercase;
}

body.colmagis-single-comunicado .post-area .content-inner > .wpb_row > .row_col_wrap_12 > .wpb_column > .vc_column-inner {
    border: 1px solid var(--cm-border);
    background: #fff;
}

body.colmagis-single-comunicado .post-area .content-inner > .wpb_row > .row_col_wrap_12 > .wpb_column > .vc_column-inner > .wpb_wrapper {
    padding: 60px 72px;
}

body.colmagis-single-comunicado .post-area .content-inner {
    padding-bottom: 40px;
}

body.colmagis-single-comunicado .post-area .content-inner > .wpb_row,
body.colmagis-single-comunicado .post-area .content-inner > .wpb_row > .row_col_wrap_12 {
    height: auto !important;
    min-height: 0 !important;
}

body.colmagis-single-comunicado .post-area .content-inner > .wpb_row {
    margin-bottom: 0;
}

body.colmagis-single-comunicado .blog_next_prev_buttons {
    margin-top: 40px;
}

@media (min-width: 691px) and (max-width: 999px) {
    body.colmagis-single-comunicado .post-area .content-inner > .wpb_row > .row_col_wrap_12 > .wpb_column > .vc_column-inner > .wpb_wrapper {
        padding: 46px 48px;
    }
}

@media (max-width: 690px) {
    body.colmagis-single-comunicado .post-area .content-inner > .wpb_row > .row_col_wrap_12 > .wpb_column > .vc_column-inner > .wpb_wrapper {
        padding: 28px 24px;
    }

    body.colmagis-single-comunicado .post-area .content-inner {
        padding-bottom: 24px;
    }

    body.colmagis-single-comunicado .blog_next_prev_buttons {
        margin-top: 24px;
    }
}

/* --- Shared editorial post header -------------------------------------- */

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg {
    height: 220px !important;
    min-height: 220px !important;
    border-bottom: 1px solid var(--cm-border);
    background: #fff !important;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-wrap {
    height: 220px !important;
    min-height: 220px !important;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg .page-header-bg-image-wrap {
    display: none;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg .blog-title {
    width: 100%;
    color: var(--cm-text);
    text-align: left !important;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg > .container {
    max-width: 1000px;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg .blog-title .inner-wrap {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    width: 100%;
    column-gap: 10px;
    row-gap: 10px;
}

body:is(.colmagis-capacitacion-has-thumbnail, .colmagis-editorial-has-thumbnail) #page-header-bg .blog-title .inner-wrap {
    position: relative;
    min-height: 180px;
    padding-left: 252px;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) .colmagis-capacitacion-thumbnail {
    position: absolute;
    top: 2px;
    left: 0;
    width: 220px;
    height: 180px;
    overflow: hidden;
    border-radius: 5px;
    background: transparent;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) .colmagis-capacitacion-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) .colmagis-capacitacion-thumbnail__link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) .colmagis-capacitacion-thumbnail__link:focus-visible {
    outline: 2px solid var(--cm-accent);
    outline-offset: 3px;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg .blog-title .entry-title,
body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg .blog-title #single-below-header {
    flex: 0 0 100%;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg .blog-title .inner-wrap > a {
    position: relative;
    left: 0;
    flex: 0 0 auto;
    margin: 0 !important;
    color: var(--cm-accent);
    border-color: #d8bcc0;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg .blog-title .inner-wrap > a:hover,
body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg .blog-title .inner-wrap > a:focus {
    color: var(--cm-cream) !important;
    border-color: var(--cm-accent) !important;
    background-color: var(--cm-accent) !important;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg .blog-title .entry-title {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--cm-text) !important;
    font-size: clamp(28px, 2.2vw, 38px);
    line-height: 1.15;
    justify-self: stretch;
    text-align: left !important;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg #single-below-header {
    margin-top: 0;
    color: var(--cm-text-soft);
    text-align: left !important;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg #single-below-header .meta-author,
body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg #single-below-header .meta-comment-count {
    display: none !important;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg #single-below-header .meta-date {
    margin: 0;
    padding: 0 !important;
    border: 0;
    color: var(--cm-text-soft) !important;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg #single-below-header .meta-date::first-letter {
    text-transform: uppercase;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #ajax-content-wrap .container-wrap {
    padding-top: 18px !important;
}

body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #author-bio {
    display: none;
}

/* --- Previous / next post navigation ----------------------------------- */

body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] {
    background: #fff;
}

body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] .post-bg-img {
    display: none;
}

body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] ul .previous-post,
body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] ul .next-post {
    min-height: 132px;
    padding: 28px 6%;
    border-top: 1px solid var(--cm-border);
    background: var(--cm-surface-2);
}

body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] ul .previous-post {
    border-right: 1px solid var(--cm-border);
}

body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] ul .previous-post::after,
body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] ul .next-post::after,
body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] ul .previous-post:hover::after,
body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] ul .next-post:hover::after {
    background: transparent;
    opacity: 1;
}

body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] h3 {
    max-width: 520px;
    color: var(--cm-text);
    font-size: 18px;
    line-height: 1.3;
}

body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] .previous-post h3,
body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] .previous-post h3 span,
body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] .next-post h3,
body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] .next-post h3 span {
    color: var(--cm-text);
}

body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] .previous-post h3 > span:not(.text),
body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] .next-post h3 > span:not(.text) {
    margin-bottom: 6px;
    color: var(--cm-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] .colmagis-post-nav-date {
    display: block;
    margin-top: 7px;
    color: var(--cm-text-soft);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.3;
}

body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] .previous-post:hover h3,
body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] .next-post:hover h3 {
    transform: none;
}

@media (max-width: 690px) {
    body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] ul .previous-post,
    body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] ul .next-post {
        min-height: 112px;
        padding: 22px 24px;
        border-right: 0;
    }

    body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] ul .next-post {
        border-top: 1px solid var(--cm-border);
    }

    body.single-post .blog_next_prev_buttons[data-style="fullwidth_next_prev"] h3 {
        font-size: 16px;
    }
}

@media (min-width: 1000px) {
    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg #single-below-header {
        position: relative;
        top: -5px;
    }
}

@media (min-width: 691px) and (max-width: 999px) {
    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg,
    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-wrap {
        height: 195px !important;
        min-height: 195px !important;
        max-height: 195px !important;
    }

    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg {
        border-bottom: 0;
    }

    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg > .container {
        position: relative;
        top: -35px !important;
    }

    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg > .container {
        padding-right: 36px !important;
        padding-left: 36px !important;
    }

    body:is(.colmagis-capacitacion-has-thumbnail, .colmagis-editorial-has-thumbnail) #page-header-bg .blog-title .inner-wrap {
        min-height: 145px;
        padding-left: 236px;
        column-gap: 8px;
        row-gap: 6px;
    }

    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) .colmagis-capacitacion-thumbnail {
        width: 210px;
        height: 145px;
    }

    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg .blog-title .entry-title {
        font-size: 26px;
        line-height: 1.12;
    }

    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg #single-below-header {
        font-size: 13px;
        line-height: 20px;
    }
}

@media (max-width: 690px) {
    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg {
        height: 135px !important;
        min-height: 135px !important;
        max-height: 135px !important;
        border-bottom: 0;
    }

    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-wrap {
        height: 135px !important;
        min-height: 135px !important;
        max-height: 135px !important;
    }

    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg > .container {
        position: relative;
        top: -25px !important;
    }

    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg > .container {
        padding-right: 22.5px !important;
        padding-left: 22.5px !important;
    }

    body:is(.colmagis-capacitacion-has-thumbnail, .colmagis-editorial-has-thumbnail) #page-header-bg .blog-title .inner-wrap {
        min-height: 80px;
        padding-left: 0;
        column-gap: 6px;
        row-gap: 4px;
    }

    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) .colmagis-capacitacion-thumbnail {
        display: none;
    }

    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg .blog-title .inner-wrap > a {
        left: 0;
        padding: 2px 8px !important;
        font-size: 12px !important;
        line-height: 18px !important;
    }

    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg .blog-title .entry-title {
        font-size: 21px;
        line-height: 24px;
    }

    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #page-header-bg #single-below-header {
        font-size: 12px;
        line-height: 16px;
        white-space: nowrap;
    }

    body:is(.colmagis-single-capacitacion, .colmagis-single-editorial) #ajax-content-wrap .container-wrap {
        padding-top: 6px !important;
    }
}

/* --- Main navigation ---------------------------------------------------- */

#menu-item-498 .menu-title-text {
    white-space: nowrap;
}

/* --- Featured-image-left post lists ------------------------------------ */

.post-area.featured_img_left.span_12 .article-content-wrap .post-content-wrap {
    padding: 20px;
}

.post-area.featured_img_left .article-content-wrap .post-content-wrap {
    padding: 20px 0 20px 20px;
}

.post-area.featured_img_left.span_12 article {
    margin-bottom: 16px;
}

.post-area.featured_img_left .post-content-wrap .grav-wrap {
    margin-top: 4px;
}

.post-area.featured_img_left .article-content-wrap .post-featured-img-wrap {
    min-height: 165px;
}

.post-area.featured_img_left .post-content-wrap {
    display: flex;
    flex-direction: column;
}

.post-area.featured_img_left .post-content-wrap .post-header {
    order: 1;
    margin-bottom: 0;
}

.post-area.featured_img_left .post-content-wrap .grav-wrap {
    order: 2;
    margin-top: 0;
    margin-bottom: 14px;
}

.post-area.featured_img_left .post-content-wrap .excerpt {
    order: 3;
}

.post-area.featured_img_left .grav-wrap .text span {
    display: inline-block;
}

.post-area.featured_img_left .grav-wrap .text span::first-letter {
    text-transform: capitalize;
}

.post-area.featured_img_left h3.title {
    margin-bottom: 0;
}

@media (min-width: 1000px) {
    .post-area.featured_img_left .article-content-wrap .post-featured-img-wrap {
        width: 160px;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .post-area.featured_img_left .article-content-wrap .post-content-wrap {
        width: calc(100% - 160px);
        left: 160px;
    }

    .post-area.featured_img_left .article-content-wrap {
        min-height: 160px;
    }
}

@media (max-width: 999px) {
    .post-area.featured_img_left .article-content-wrap {
        display: grid;
        grid-template-columns: 70px minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        column-gap: 15px;
        align-items: start;
    }

    .post-area.featured_img_left .article-content-wrap .post-featured-img-wrap {
        grid-column: 1;
        grid-row: 1 / 3;
        width: 70px !important;
        height: 100% !important;
        min-height: 70px !important;
        max-width: 70px !important;
        max-height: none !important;
        aspect-ratio: auto;
        align-self: stretch !important;
        border-radius: 5px;
    }

    .post-area.featured_img_left .post-featured-img-wrap > a,
    .post-area.featured_img_left .post-featured-img-wrap .post-featured-img,
    .post-area.featured_img_left .post-featured-img-wrap img {
        width: 100%;
        height: 100%;
    }

    .post-area.featured_img_left .post-featured-img-wrap img {
        object-fit: cover;
    }

    .post-area.featured_img_left .article-content-wrap .post-content-wrap {
        display: contents;
    }

    .post-area.featured_img_left .post-content-wrap .post-header {
        grid-column: 2;
        grid-row: 1;
    }

    .post-area.featured_img_left .post-content-wrap .grav-wrap {
        grid-column: 2;
        grid-row: 2;
        margin: 0;
    }

    .post-area.featured_img_left .post-content-wrap .excerpt {
        grid-column: 1 / -1;
        grid-row: 3;
        margin-top: 10px;
    }

    .post-area.featured_img_left .article-content-wrap:not(:has(.post-featured-img-wrap)) .post-header,
    .post-area.featured_img_left .article-content-wrap:not(:has(.post-featured-img-wrap)) .grav-wrap,
    .post-area.featured_img_left .article-content-wrap:not(:has(.post-featured-img-wrap)) .excerpt {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .post-area.featured_img_left .article-content-wrap {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .post-area.featured_img_left .article-content-wrap .post-featured-img-wrap {
        width: 56px !important;
        min-height: 56px !important;
        max-width: 56px !important;
    }

    .post-area.featured_img_left .post-content-wrap h3.title {
        font-size: 16px;
        line-height: 21px;
    }

    .post-area.featured_img_left .grav-wrap .text span {
        font-size: 12px;
        line-height: 16px;
    }

    .post-area.featured_img_left .post-content-wrap .excerpt {
        font-size: 13px;
        line-height: 18px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Podcast-style surfaces for the two primary editorial lists. Every viewport
 * remains a single-column list of horizontal cards. */
body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article {
    overflow: hidden;
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius-card);
    background: var(--cm-cream);
    box-shadow: var(--cm-shadow-card);
    transition: transform var(--cm-transition), box-shadow var(--cm-transition);
}

body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article:hover {
    transform: translateY(-4px);
    box-shadow: var(--cm-shadow-card-hover);
}

@media (min-width: 1000px) {
    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .posts-container {
        display: block;
    }

    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article {
        margin-bottom: 20px !important;
    }

    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article.has-post-thumbnail .article-content-wrap {
        display: grid !important;
        grid-template-columns: 240px minmax(0, 1fr);
        grid-template-rows: minmax(220px, auto) !important;
        min-height: 220px;
        background: var(--cm-cream);
    }

    body.colmagis-page-comunicados .post-area.featured_img_left article:not(.has-post-thumbnail) .article-content-wrap {
        display: block !important;
    }

    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article.has-post-thumbnail .post-featured-img-wrap {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        grid-column: 1;
        grid-row: 1;
        width: 100% !important;
        max-width: none;
        height: 100% !important;
        min-height: 220px;
        overflow: hidden;
        aspect-ratio: auto;
    }

    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .post-featured-img-wrap > a,
    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .post-featured-img-wrap .post-featured-img,
    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .post-featured-img-wrap img {
        display: block;
        width: 100%;
        height: 100%;
    }

    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .post-featured-img-wrap img {
        object-fit: cover;
        transition: transform 500ms ease;
    }

    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article:hover .post-featured-img-wrap img {
        transform: scale(1.025);
    }

    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article .post-content-wrap {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        display: flex;
        justify-content: center;
        grid-column: 2;
        grid-row: 1;
        width: 100% !important;
        min-height: 220px;
        padding: 28px 32px 28px 49px !important;
        background: var(--cm-cream);
    }

    body.colmagis-page-comunicados .post-area.featured_img_left article:not(.has-post-thumbnail) .post-content-wrap {
        grid-column: auto;
        grid-row: auto;
        min-height: 180px;
    }

    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article .post-content-wrap::before {
        position: absolute;
        top: 28px;
        bottom: 28px;
        left: 32px;
        width: var(--cm-accent-bar);
        background: var(--cm-accent);
        content: "";
        transition: width var(--cm-transition);
    }

    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article:hover .post-content-wrap::before {
        width: 5px;
    }

    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left h3.title {
        display: -webkit-box;
        overflow: hidden;
        font-family: var(--cm-font-serif);
        font-size: 19px;
        font-weight: 600;
        line-height: 1.32;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .grav-wrap {
        margin: 8px 0 0;
    }

    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .excerpt {
        display: -webkit-box;
        overflow: hidden;
        margin-top: 14px;
        color: var(--cm-text-soft);
        font-size: 14px;
        line-height: 1.55;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }
}

/* Comunicado rows without a featured image use the full content width. */
.colmagis-page-comunicados .post-area.featured_img_left article:not(.has-post-thumbnail) .post-featured-img-wrap {
    display: none !important;
}

.colmagis-page-comunicados .post-area.featured_img_left article:not(.has-post-thumbnail) .article-content-wrap {
    min-height: 0;
}

.colmagis-page-comunicados .post-area.featured_img_left article:not(.has-post-thumbnail) .post-content-wrap {
    left: 0;
    width: 100%;
    padding: 18px 20px;
}

@media (max-width: 999px) {
    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article .article-content-wrap {
        padding: 18px;
    }

    .colmagis-page-comunicados .post-area.featured_img_left article:not(.has-post-thumbnail) .article-content-wrap {
        grid-template-columns: minmax(0, 1fr);
    }

    .colmagis-page-comunicados .post-area.featured_img_left article:not(.has-post-thumbnail) .post-header,
    .colmagis-page-comunicados .post-area.featured_img_left article:not(.has-post-thumbnail) .grav-wrap,
    .colmagis-page-comunicados .post-area.featured_img_left article:not(.has-post-thumbnail) .excerpt {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article .article-content-wrap {
        padding: 14px;
    }
}

/* --- Search results ----------------------------------------------------- */

body.search-results {
    overflow: visible;
}

body.search-results .colmagis-search-page .main-content {
    /* Reserve room for the fixed search controls and its result-list gap. */
    padding-top: 141px;
    padding-bottom: 72px;
}

.colmagis-search-tools,
.colmagis-search-results,
.colmagis-search-pagination,
.colmagis-search-controls {
    max-width: 860px;
    margin-right: auto;
    margin-left: auto;
}

.colmagis-search-controls-band {
    position: fixed;
    top: 121px;
    right: 0;
    left: 0;
    z-index: 20;
    border-bottom: 1px solid var(--cm-rule);
    background: #fff;
}

@media (min-width: 1000px) {
    /* Cover the space exposed when Salient condenses the fixed header. */
    .colmagis-search-controls-band::before {
        position: absolute;
        top: -32px;
        right: 0;
        left: 0;
        height: 32px;
        background: #fff;
        content: "";
        pointer-events: none;
    }
}

body.admin-bar .colmagis-search-controls-band {
    top: 153px;
}

.colmagis-search-controls {
    padding: 8px 0 12px;
}

.colmagis-search-tools {
    margin-bottom: 10px;
}

.colmagis-search-tools form {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 1px solid var(--cm-border);
    border-radius: 4px;
    background: #fff;
}

.colmagis-search-tools input[type="text"],
.colmagis-search-tools input[type="search"] {
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 16px;
    border: 0;
    background: transparent;
    font-size: 17px;
    line-height: 48px;
}

.colmagis-search-tools button[type="submit"],
.colmagis-search-tools input[type="submit"] {
    flex: 0 0 auto;
    min-width: 104px;
    height: 48px;
    margin: 0;
    border-radius: 0 3px 3px 0;
}

body.search-results .colmagis-search-results article.colmagis-search-result {
    position: relative;
    display: block;
    left: auto;
    top: auto;
    width: 100%;
    opacity: 1 !important;
    transform: none;
    padding: 0 0 28px;
    margin: 0 0 28px;
    border-bottom: 1px solid var(--cm-rule);
}

.colmagis-search-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin: 0;
    color: var(--cm-text-soft);
}

.colmagis-search-summary__range {
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.45;
}

.colmagis-search-summary__types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.colmagis-search-summary__types li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid var(--cm-border);
    border-radius: 4px;
    background: #fff;
    color: var(--cm-text);
    font-size: 13px;
    line-height: 18px;
}

.colmagis-search-summary__types strong {
    color: var(--cm-link);
    font-weight: 700;
}

body.search-results .colmagis-search-results article.colmagis-search-result::before {
    display: none !important;
    content: none !important;
}

body.search-results .colmagis-search-results article.colmagis-search-result:last-child {
    border-bottom: 0;
}

.colmagis-search-result__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 7px;
    color: var(--cm-text-soft);
    font-size: 13px;
    line-height: 18px;
}

.colmagis-search-result__meta span + span::before {
    content: "·";
    margin-right: 8px;
    color: var(--cm-text-mute);
}

.colmagis-search-result__type {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.colmagis-search-result__title {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.28;
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: break-word;
}

body .colmagis-search-results .colmagis-search-result__title a {
    color: var(--cm-link);
    overflow-wrap: anywhere;
    word-break: break-word;
}

body .colmagis-search-results .colmagis-search-result__title a:hover {
    color: var(--cm-navy);
    text-decoration: underline;
}

.colmagis-search-result__excerpt {
    max-width: 760px;
    margin: 0 0 7px;
    color: var(--cm-text);
    font-size: 16px;
    line-height: 1.62;
    overflow-wrap: anywhere;
}

.colmagis-search-result__excerpt .wpfts-smart-excerpt {
    margin: 0;
}

.colmagis-search-result__excerpt b,
.colmagis-search-result__excerpt strong {
    font-weight: 700;
    background: #fff4c2;
}

.colmagis-search-result__excerpt .wpfts-bottom-row {
    display: none;
}

.colmagis-search-result__url {
    display: inline-block;
    max-width: 100%;
    color: #2e7d32;
    font-size: 13px;
    line-height: 18px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.colmagis-search-empty {
    max-width: 680px;
}

.colmagis-search-empty h2 {
    margin-bottom: 8px;
    font-size: 25px;
    line-height: 1.3;
}

/* Salient switches to its compact header below 1000px. */
@media (max-width: 999px) {
    body.search-results .colmagis-search-page .main-content {
        padding-top: 184px;
        padding-bottom: 52px;
    }

    .colmagis-search-controls-band {
        top: 64px;
    }

    body.admin-bar .colmagis-search-controls-band {
        top: 110px;
    }

    .colmagis-search-controls {
        padding: 8px 0 12px;
    }

    .colmagis-search-tools form {
        gap: 0;
    }

    .colmagis-search-tools button[type="submit"],
    .colmagis-search-tools input[type="submit"] {
        min-width: 96px;
        border-radius: 0 3px 3px 0;
    }

    .colmagis-search-tools input[type="text"],
    .colmagis-search-tools input[type="search"] {
        min-width: 0;
        height: 44px;
        padding: 0 12px;
        font-size: 16px;
        line-height: 44px;
    }

    .colmagis-search-tools button[type="submit"],
    .colmagis-search-tools input[type="submit"] {
        height: 44px;
    }

    .colmagis-search-summary {
        align-items: flex-start;
        gap: 8px;
    }

    .colmagis-search-summary__range {
        width: 100%;
    }

    .colmagis-search-summary__types {
        flex-wrap: nowrap;
        max-width: 100%;
        padding-bottom: 2px;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .colmagis-search-summary__types li {
        flex: 0 0 auto;
    }

    body.search-results .colmagis-search-results article.colmagis-search-result {
        padding-bottom: 24px;
        margin-bottom: 24px;
    }

    .colmagis-search-result__title {
        font-size: 20px;
        line-height: 1.32;
    }

    .colmagis-search-result__excerpt {
        font-size: 15px;
        line-height: 1.55;
    }
}

/* --- Beneficios ----------------------------------------------------------
 * cm-benefit-card sits on the WPBakery *column* (not the row), because a
 * category can be full-width alone or paired two-up as two 1/2-width
 * columns in one shared row (e.g. Seguros | Sistemas de urgencias médicas).
 * The column is the actual single-category boundary either way; the row is
 * just a layout wrapper (cm-benefit-row) that groups one or two columns and
 * adds the gap between rows. cm-benefit-card__header sits on the heading's
 * vc_row_inner, nested inside the column, one per category.
 *
 * Both classes are set directly in the page builder via each element's
 * extra-class field, not inferred from DOM position — added there alongside
 * this CSS so the two stay in sync. Gotcha: WPBakery's vc_row/vc_row_inner
 * shortcodes take a plain `class="..."` param and render it as-is, but
 * vc_column ignores that param — it needs `el_class="..."` instead. Using
 * the wrong one on a column silently drops the class with no error.
 *
 * WPBakery still renders the heading color inline on the h3 (directly on
 * some categories, via a nested <span> on others) and gives the header row
 * a navy background from its own auto-generated vc_custom_* class; both
 * are overridden here. Restyled as a bordered card with a bordó dot bullet
 * and serif heading, matching the editorial card treatment used elsewhere
 * on the site. Adding a new category just needs cm-benefit-card (el_class,
 * on its column) and cm-benefit-card__header (class, on its heading's
 * vc_row_inner) set in the builder — no CSS changes required. */

/* Page title, added directly in the page builder (no theme page-header
 * module is enabled on this site) as an h2 + WPBakery's native "Divider"
 * element (Small Line, extra-color-1) — the same two elements Comunicados
 * and Capacitaciones use for their own titles, unstyled by any custom CSS
 * on those pages. Reusing the native divider shortcode here, rather than a
 * lookalike built from scratch, is what keeps this pixel-identical to the
 * other two instead of drifting. Only the subtitle line below the divider
 * is custom — no other page on the site has one. */
.colmagis-page-beneficios .cm-benefit-intro {
    margin-bottom: var(--cm-space-3) !important;
}

.colmagis-page-beneficios .cm-benefit-intro h3 {
    color: var(--cm-text-soft) !important;
    font-family: var(--cm-font-sans) !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    margin: 0 !important;
}

/* Salient's data-shadow="medium_depth" column setting (present on the intro
 * and every category column) renders a heavy 0/30px/60px drop-shadow via an
 * absolutely-positioned .column-bg-overlay-wrap layer — independent of any
 * box-shadow set directly on the column. Left alone it floats the intro
 * text in its own phantom card and doubles up with cm-benefit-card's own
 * shadow. Neutralized wholesale rather than per-column so new categories
 * don't need to remember to turn it off individually. */
.colmagis-page-beneficios .column-bg-overlay-wrap {
    box-shadow: none !important;
}

/* padding-left/right: 0 strips Salient's grid-system 1% column gutter (see
 * the header rule below for why that gutter is a problem here). Safe to
 * drop entirely — every child (header, body rows) already carries its own
 * explicit padding, none of them lean on the column's own inset. */
.colmagis-page-beneficios .cm-benefit-card {
    background: var(--cm-surface);
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius-card);
    box-shadow: 0 1px 2px rgba(22, 35, 58, 0.05);
    overflow: hidden;
    margin-bottom: var(--cm-space-4) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Paired categories share a row as two 1/2-width columns (vc_col-sm-6) with
 * zero gap between them by default — Salient's column flexbox has no shrink
 * slack, so a plain margin/gap here overflows the row and wraps the second
 * column onto its own line instead of leaving a gap. Reducing each column's
 * own width to make room, then filling the freed space with margin on the
 * first column, keeps the pair's combined width unchanged. */
.colmagis-page-beneficios .cm-benefit-card.vc_col-sm-6 {
    width: calc(50% - 12px) !important;
}

.colmagis-page-beneficios .cm-benefit-card.vc_col-sm-6:first-of-type {
    margin-right: 24px !important;
}

.colmagis-page-beneficios .cm-benefit-card__header {
    background: var(--cm-cream) !important;
    border-bottom: 1px solid var(--cm-rule);
    padding: var(--cm-space-2) var(--cm-space-3) !important;
}

.colmagis-page-beneficios .cm-benefit-card__header h3,
.colmagis-page-beneficios .cm-benefit-card__header h3 span {
    color: var(--cm-navy) !important;
    font-family: var(--cm-font-serif);
    font-weight: 600;
    font-size: 1.3em;
    text-align: left !important;
    margin: 0;
}

/* Turns the category's font-icon glyph into the bordó dot bullet, keeping
 * its original position in the text flow instead of adding a pseudo-element
 * (avoids fighting the &nbsp;&nbsp; spacing baked into the row content). */
.colmagis-page-beneficios .cm-benefit-card__header h3 i {
    display: inline-block;
    width: 8px;
    height: 8px;
    font-size: 0;
    line-height: 0;
    border-radius: 50%;
    background: var(--cm-accent);
    vertical-align: middle;
    margin-right: 4px;
}

.colmagis-page-beneficios .cm-benefit-card .wpb_wrapper > .inner_row:not(.cm-benefit-card__header) {
    padding: var(--cm-space-2) var(--cm-space-3) !important;
}

/* --- Editorial cards → align Comunicados/Capacitaciones with the card mockup -
 * Refines the featured_img_left treatment above toward the approved design:
 * white card surface, a full-height bordó spine flush to the card edge, a kicker
 * pill + date above the title, and a "Leer más" affordance. Scoped to the two
 * editorial pages and appended last so it wins the cascade. Tokens only. */

body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article {
    position: relative;
    background: var(--cm-surface);
    box-shadow: 0 1px 2px rgba(22, 35, 58, 0.05);
}

body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article:hover {
    border-color: #d9cfbc;
    box-shadow: 0 14px 34px rgba(22, 35, 58, 0.14);
}

/* Full-height bordó spine flush to the card's left edge (clipped to the card
 * radius by the article's own overflow:hidden). Replaces the inset spine. */
body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 3;
    width: 5px;
    background: var(--cm-accent);
    transition: width var(--cm-transition);
}

body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article:hover::before {
    width: 7px;
}

/* Retire the old inner (inset) spine so there is only one. */
body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article .post-content-wrap::before {
    display: none;
}

/* White text panel to match the card surface. */
body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article .post-content-wrap,
body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article.has-post-thumbnail .article-content-wrap {
    background: var(--cm-surface);
}

/* Date row, sitting above the title. */
body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .post-content-wrap .grav-wrap {
    display: flex;
    align-items: center;
    order: 1;
    margin: 0 0 12px;
}

/* Title below the date row, larger serif in institutional navy. */
body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .post-content-wrap .post-header {
    order: 2;
}

body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left h3.title,
body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left h3.title a {
    color: var(--cm-navy);
}

body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left h3.title {
    margin: 0;
    font-size: 22px;
    line-height: 1.25;
}

body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .post-content-wrap .excerpt {
    order: 3;
}

/* "Leer más" affordance with a short accent bar that grows on hover. */
body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .post-content-wrap::after {
    order: 4;
    margin-top: 16px;
    padding-left: 32px;
    color: var(--cm-link);
    font-family: var(--cm-font-sans);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    background: linear-gradient(var(--cm-accent) 0 0) left center / 22px 2px no-repeat;
    content: "Leer más";
    transition: background-size var(--cm-transition);
}

body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left article:hover .post-content-wrap::after {
    background-size: 34px 2px;
}

/* Mobile: keep the same meta-above-title order inside the grid. */
@media (max-width: 999px) {
    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .post-content-wrap .post-header {
        grid-row: 2;
    }

    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .post-content-wrap .grav-wrap {
        grid-row: 1;
    }

    /* Thumbnail as a fixed square "stamp" beside the date and title, instead
     * of the generic list's full-height stretch (which squeezes wide
     * source graphics into an unreadable vertical sliver). Sized to contain a
     * two-line title so the text column doesn't spill below the stamp. One
     * size covers every mobile width so it never depends on the generic
     * 70px/56px steps. */
    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .article-content-wrap {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .article-content-wrap .post-featured-img-wrap {
        align-self: start !important;
        width: 72px !important;
        height: 72px !important;
        min-height: 72px !important;
        max-width: 72px !important;
        aspect-ratio: 1 / 1 !important;
        border-radius: 6px;
    }

    /* Close the gap between the date and the title so the pair reads as one
     * compact block, roughly the height of the stamp beside it. */
    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .post-content-wrap .grav-wrap {
        margin: 0 0 3px;
    }

    /* post-content-wrap is display:contents in the grid here; its ::after would
     * place unpredictably, so drop the read-more affordance on small screens. */
    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left .post-content-wrap::after {
        display: none;
    }
}

/* Phone: the 22px serif title wraps to three lines next to the stamp — step
 * it down so two lines fit and the card reads as a compact list row. */
@media (max-width: 600px) {
    body:is(.colmagis-page-comunicados, .colmagis-page-capacitaciones) .post-area.featured_img_left h3.title {
        font-size: 17px;
        line-height: 1.35;
    }
}

/* --- Footer redesign: 3-column layout, logo, social icons, off-canvas fix -
 * The footer widget areas were restructured to 3 columns (institution/logo,
 * menu, sedes) via Salient's own Footer Columns option — no CSS needed for
 * that part; it lives in the Salient options and the widget assignments,
 * not here. The rules below style what was added on top of that: the logo
 * image widget, a Gutenberg Social Icons block dropped into Footer Area 1,
 * and a gap in Salient's off-canvas template that let two copies of the
 * mobile menu render at once below 1000px.
 */

/* Footer logo: invert the black/transparent SVG to white for the dark
 * footer background, and size it up from the widget's tiny default. */
#footer-widgets .widget_media_image img {
    filter: brightness(0) invert(1) !important;
    width: 330px !important;
    height: auto !important;
    max-width: none !important;
}

/* Balance the three footer columns (logo, MENÚ, SEDES) so the gap between
 * logo and MENÚ matches the gap between MENÚ and SEDES, and SEDES sits
 * further right instead of hugging the middle column. Desktop only —
 * Salient stacks these to one column below 1000px. */
@media (min-width: 1000px) {
    #footer-widgets .container .row {
        display: flex !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
    }

    #footer-widgets .container .row > .col {
        width: auto !important;
        max-width: none !important;
        float: none !important;
        flex: 0 0 auto !important;
    }
}

/* Footer section headings (MENÚ, SEDE ROSARIO, SEDE TRIBUNALES, SEDE VENADO
 * TUERTO) default to Salient's muted secondary-font-color; make them white
 * to match the rest of the footer text. */
#footer-widgets h4 {
    color: #ffffff !important;
}

/* Social icons (Gutenberg Social Icons block in Footer Area 1): style as
 * white-outline circles instead of the block's default colored-square look,
 * ordered Instagram → YouTube → Spotify regardless of the order they were
 * added in the block editor. */
#footer-widgets #block-3 ul.wp-block-social-links {
    display: flex !important;
    gap: 12px !important;
    margin: 20px 0 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

#footer-widgets #block-3 .wp-social-link {
    width: 40px !important;
    height: 40px !important;
    border: 1.5px solid #ffffff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: transparent !important;
    transition: background-color .25s ease !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    /* Flex items default to min-height/min-width:auto, which let the
     * Instagram icon's slightly taller intrinsic content box overflow its
     * circle and throw off vertical centering (YouTube/Spotify were fine).
     * Force the min back to 0 so the explicit 40px size always wins. */
    min-height: 0 !important;
    min-width: 0 !important;
}

#footer-widgets #block-3 .wp-social-link a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #ffffff !important;
    min-height: 0 !important;
    min-width: 0 !important;
}

#footer-widgets #block-3 .wp-social-link svg {
    width: 20px !important;
    height: 20px !important;
    fill: #ffffff !important;
    flex-shrink: 0 !important;
}

#footer-widgets #block-3 .wp-social-link:hover {
    background-color: #ffffff !important;
}

#footer-widgets #block-3 .wp-social-link:hover a,
#footer-widgets #block-3 .wp-social-link:hover svg {
    color: #1F1F1F !important;
    fill: #1F1F1F !important;
}

/* Instagram's icon still sits 2px high inside its circle even with the
 * min-height fix above — nudge it down to match the other two. */
#footer-widgets #block-3 .wp-social-link-instagram svg {
    position: relative !important;
    top: 2px !important;
}

#footer-widgets #block-3 .wp-social-link-instagram { order: 1 !important; }
#footer-widgets #block-3 .wp-social-link-youtube   { order: 2 !important; }
#footer-widgets #block-3 .wp-social-link-spotify   { order: 3 !important; }

/* Same reordering for the off-canvas (mobile menu) social icons, which use
 * Salient's own icon-font markup rather than the Gutenberg block. */
#slide-out-widget-area .off-canvas-social-links li:has(.fa-instagram) { order: 1 !important; }
#slide-out-widget-area .off-canvas-social-links li:has(.fa-youtube-play) { order: 2 !important; }
#slide-out-widget-area .off-canvas-social-links li:has(.icon-salient-spotify) { order: 3 !important; }

/* Salient's off-canvas template renders two copies of the mobile menu — one
 * tagged .mobile-only, one not — and hides the .mobile-only one at desktop
 * widths (>=1000px) but never hides the other one below that, so both
 * rendered stacked on tablet/mobile. Add the missing inverse rule. */
@media only screen and (max-width: 999px) {
    #slide-out-widget-area .off-canvas-menu-container:not(.mobile-only) {
        display: none !important;
    }
}

/* --- Autoridades ------------------------------------------------------
 * Council/board roster, built with WPBakery rows/columns (like Beneficios):
 * cm-authority-section is the outer vc_row per council group, cm-authority-row
 * is a vc_row_inner holding one (single) or two (--pair, vc_column_inner
 * width="1/2") role/name blocks. Column side-by-side layout and gutters come
 * from Salient's own grid — no custom flexbox needed here, only spacing,
 * type and centering. cm-authority-section--shaded gets the same grey band
 * treatment as other secondary content on the site (--cm-surface-2),
 * stretched edge-to-edge via the 100vw technique since these are plain
 * (non-stretch) rows. Tokens only. */

.colmagis-page-autoridades .cm-authority-section {
    padding: var(--cm-space-6) var(--cm-page-gutter);
}

.colmagis-page-autoridades .cm-authority-section--shaded {
    background: var(--cm-surface-2);
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.colmagis-page-autoridades .cm-authority-title {
    color: var(--cm-navy) !important;
    font-family: var(--cm-font-serif);
    font-weight: 600;
    font-size: 1.5em;
    margin: 0 0 var(--cm-space-3) !important;
    max-width: var(--cm-content-max);
    margin-left: auto !important;
    margin-right: auto !important;
    padding-bottom: var(--cm-space-2);
    border-bottom: 1px solid var(--cm-rule);
}

.colmagis-page-autoridades .cm-authority-row {
    max-width: var(--cm-content-max);
    margin: var(--cm-space-2) auto var(--cm-space-6);
}

.colmagis-page-autoridades .cm-authority-row:last-child {
    margin-bottom: 0;
}

/* Salient sets text-align:left on .wpb_wrapper/.wpb_column directly, which
 * out-specifies a plain `text-align: center` on the row — every level down
 * to the text elements themselves needs the override. */
.colmagis-page-autoridades .cm-authority-row,
.colmagis-page-autoridades .cm-authority-row .wpb_column,
.colmagis-page-autoridades .cm-authority-row .wpb_wrapper,
.colmagis-page-autoridades .cm-authority-role,
.colmagis-page-autoridades .cm-authority-name,
.colmagis-page-autoridades .cm-authority-list,
.colmagis-page-autoridades .cm-authority-list li {
    text-align: center !important;
}

/* Widens Salient's default 1% column gutter into real breathing room
 * between the two role/name blocks, matching the mockup's generous gap. */
.colmagis-page-autoridades .cm-authority-row--pair .wpb_column {
    padding-left: var(--cm-space-4) !important;
    padding-right: var(--cm-space-4) !important;
}

.colmagis-page-autoridades .cm-authority-role {
    color: var(--cm-accent) !important;
    font-family: var(--cm-font-serif);
    font-style: italic;
    font-size: 15px;
    line-height: 1.2 !important;
    margin: 0 0 2px !important;
    padding: 0 !important;
}

.colmagis-page-autoridades .cm-authority-name {
    color: var(--cm-navy) !important;
    font-family: var(--cm-font-sans);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.colmagis-page-autoridades .cm-authority-name--lg {
    font-family: var(--cm-font-serif) !important;
    font-size: 26px !important;
    font-weight: 600 !important;
}

.colmagis-page-autoridades .cm-authority-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.colmagis-page-autoridades .cm-authority-list li {
    color: var(--cm-navy);
    font-family: var(--cm-font-sans);
    font-size: 1em;
    line-height: 1.9;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.colmagis-page-autoridades .cm-authority-list li::marker {
    content: "";
}

/* --- Podcast --------------------------------------------------------------
 * Unlike Comunicados/Beneficios/Autoridades, this page's content top padding
 * isn't disabled at the page-builder level, so Salient adds its default
 * ~38px .main-content padding-top above the h1 -- pulling the title much
 * further from the menu than every other page. Zeroed here to match. */
.colmagis-page-podcast .container.main-content {
    padding-top: 0 !important;
}
