/* ==================================================
   ESTILOS GENERALES DE KONTEXTO
================================================== */

:root {
    --navy: #0d2945;
    --navy-dark: #071c2b;
    --red: #c8102e;
    --red-dark: #a50d25;
    --amazon: #28734a;
    --amazon-light: #5c8f57;
    --amazon-pale: #edf4ed;
    --earth: #e8dfc9;
    --warm-white: #faf9f5;
    --white: #ffffff;
    --text: #173044;
    --gray: #657269;
    --light-gray: #f2f5f1;
    --border: #d9e2d8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--warm-white);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

button,
input {
    font: inherit;
}

.container {
    width: min(1500px, calc(100% - 48px));
    margin-inline: auto;
}


/* ==================================================
   BARRA SUPERIOR
================================================== */

.topbar {
    width: 100%;
    min-height: 46px;
    background: var(--navy);
    color: #ffffff;
}

.topbar__content {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.topbar__date {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

.topbar__links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.topbar__links a {
    color: #ffffff;
    font-size: 14px;
    transition: opacity 0.2s ease;
}

.topbar__links a:hover {
    opacity: 0.75;
}
.site-header{
    min-height: 150px !important;
}

.site-header__content{
    min-height: 150px !important;
    overflow: visible !important;
}

.site-logo{
    width: 700px !important;
    height: 130px !important;
    max-width: none !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.site-logo .logo-img{
    width: 280px !important;
    height: 200px !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block !important;
}

/* ==================================================
   ENCABEZADO PRINCIPAL
================================================== */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
}

.site-header__content {
    min-height: 136px;
    display: grid;
    grid-template-columns: 270px minmax(400px, 760px) 60px;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.site-logo {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -2px;
}

.site-logo__kon {
    color: var(--navy);
}

.site-logo__texto {
    color: var(--red);
}

.site-logo__domain {
    margin-left: 2px;
    color: var(--navy);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
}

.header-ad {
    min-height: 86px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8dde3;
    background: #f5f6f8;
    color: #677281;
    text-align: center;
}

.header-ad span {
    font-size: 13px;
    letter-spacing: 1.1px;
}

.header-ad strong {
    margin-top: 7px;
    color: #3f4d5d;
    font-size: 13px;
    font-weight: 500;
}

.search-button {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid #d9dfe5;
    border-radius: 50%;
    background: #ffffff;
    color: var(--navy);
    font-size: 16px;
    cursor: pointer;
    transition: 0.25s ease;
}

.search-button:hover {
    border-color: var(--navy);
    background: var(--navy);
    color: #ffffff;
}


/* ==================================================
   MENÚ PRINCIPAL
================================================== */

.main-nav {
    position: relative;
    z-index: 20;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e3e7eb;
}

.main-nav .container {
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav .container::-webkit-scrollbar {
    display: none;
}

.main-nav__list {
    min-height: 62px;
    display: flex;
    align-items: stretch;
    gap: 0;
    white-space: nowrap;
}

.main-nav__list li {
    display: flex;
    align-items: stretch;
}

.main-nav__list a {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 24px;
    color: var(--navy);
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.main-nav__list a:hover {
    color: var(--red);
}

.main-nav__list a.active {
    color: var(--red);
}

.main-nav__list a.active::after {
    content: "";
    position: absolute;
    right: 24px;
    bottom: 0;
    left: 24px;
    height: 3px;
    background: var(--red);
}


/* ==================================================
   CINTA DE ÚLTIMA HORA
================================================== */

.ticker {
    width: 100%;
    min-height: 62px;
    display: flex;
    overflow: hidden;
    background: var(--red);
    color: #ffffff;
}

.ticker__label {
    position: relative;
    z-index: 5;
    min-width: 245px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 0 25px;
    background: var(--red-dark);
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1.2px;
    white-space: nowrap;
}

.ticker__pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    animation: tickerPulse 1.5s infinite;
}

.ticker__viewport {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.ticker__track {
    width: max-content;
    display: flex;
    align-items: center;
    animation: tickerScroll 38s linear infinite;
    will-change: transform;
}

.ticker__group {
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
}

.ticker__item {
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    padding: 0 30px;
    border-right: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.ticker__up {
    color: #b9f37b;
    font-size: 12px;
    font-weight: 900;
}

.ticker:hover .ticker__track {
    animation-play-state: paused;
}

@keyframes tickerScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@keyframes tickerPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.65);
    }

    70% {
        box-shadow: 0 0 0 9px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}


/* ==================================================
   RESPONSIVO DEL ENCABEZADO Y MENÚ
================================================== */

@media (max-width: 1050px) {
    .site-header__content {
        grid-template-columns: 230px minmax(300px, 1fr) 52px;
        gap: 25px;
    }

    .site-logo {
        font-size: 37px;
    }

    .main-nav__list a {
        padding-inline: 18px;
        font-size: 14px;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 28px, 1500px);
    }

    .topbar__links {
        display: none;
    }

    .site-header__content {
        min-height: auto;
        grid-template-columns: 1fr 48px;
        gap: 15px;
        padding-block: 22px;
    }

    .site-logo {
        font-size: 34px;
    }

    .header-ad {
        grid-column: 1 / -1;
        grid-row: 2;
        min-height: 70px;
    }

    .search-button {
        width: 45px;
        height: 45px;
    }

    .main-nav__list {
        min-height: 54px;
    }

    .main-nav__list a {
        padding-inline: 15px;
        font-size: 13px;
    }

    .main-nav__list a.active::after {
        right: 15px;
        left: 15px;
    }

    .ticker {
        min-height: 50px;
    }

    .ticker__label {
        min-width: 145px;
        padding-inline: 14px;
        font-size: 11px;
    }

    .ticker__item {
        min-height: 50px;
        padding-inline: 20px;
        font-size: 12px;
    }
}


/* ==================================================
   CINTA HORIZONTAL DE NOTICIAS E INDICADORES
================================================== */

.ticker {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    background: var(--color-primary);
    color: #ffffff;
}

.ticker__label {
    position: relative;
    z-index: 5;
    flex: 0 0 auto;
    min-width: 215px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 26px;
    background: var(--color-primary-dark);
    box-shadow: 12px 0 22px rgba(0, 0, 0, 0.18);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1.2px;
    white-space: nowrap;
}

.ticker__pulse {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 rgba(255, 255, 255, 0.7);
    animation: tickerPulse 1.5s infinite;
}

.ticker__viewport {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.ticker__track {
    width: max-content;
    display: flex;
    align-items: center;
    animation: tickerScroll 38s linear infinite;
    will-change: transform;
}

.ticker__group {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.ticker__item {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    padding: 0 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 13px;
    white-space: nowrap;
}

.ticker__item strong {
    font-size: 12px;
    letter-spacing: 0.4px;
}

.ticker__news {
    min-width: 440px;
    font-weight: 700;
}

.ticker__news::before {
    content: "●";
    color: #ffffff;
    font-size: 8px;
}

.ticker__news:hover {
    text-decoration: underline;
}

.ticker__up {
    color: #b9f37b;
    font-size: 12px;
    font-weight: 900;
}

.ticker__down {
    color: #ffd0d0;
    font-size: 12px;
    font-weight: 900;
}

/* Se detiene cuando la persona coloca el mouse encima */
.ticker:hover .ticker__track {
    animation-play-state: paused;
}

@keyframes tickerScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@keyframes tickerPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

@media (max-width: 800px) {
    .ticker {
        min-height: 48px;
    }

    .ticker__label {
        min-width: 145px;
        padding-inline: 14px;
        font-size: 11px;
    }

    .ticker__item {
        min-height: 48px;
        padding-inline: 18px;
        font-size: 12px;
    }

    .ticker__news {
        min-width: 360px;
    }

    .ticker__track {
        animation-duration: 30s;
    }
}

@media (max-width: 560px) {
    .ticker__label {
        min-width: 118px;
        padding-inline: 10px;
        letter-spacing: 0.5px;
    }

    .ticker__pulse {
        width: 7px;
        height: 7px;
    }

    .ticker__news {
        min-width: 310px;
    }
}

/* Respeta a usuarios que desactivan las animaciones */
@media (prefers-reduced-motion: reduce) {
    .ticker__track,
    .ticker__pulse {
        animation: none;
    }

    .ticker__viewport {
        overflow-x: auto;
    }
}

/* ==================================================
   CORRECCIÓN DEFINITIVA: CINTA ÚLTIMA HORA
================================================== */

.ticker {
    width: 100%;
    min-height: 62px;
    display: flex !important;
    align-items: stretch;
    overflow: hidden;
    background: #c91f30 !important;
    color: #ffffff !important;
}

.ticker__label {
    position: relative;
    z-index: 10;
    min-width: 245px;
    min-height: 62px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 24px;
    background: #a91625 !important;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1.2px;
    white-space: nowrap;
}

.ticker__pulse {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #ffffff !important;
}

.ticker__viewport {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #c91f30 !important;
}

.ticker__track {
    width: max-content;
    display: flex;
    align-items: center;
    animation: tickerScroll 38s linear infinite;
}

.ticker__group {
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
}

.ticker__item {
    min-height: 62px;
    display: flex !important;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    padding: 0 30px;
    border-right: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff !important;
    background: transparent !important;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.ticker__item strong {
    color: #ffffff !important;
}

.ticker__up {
    color: #b9f37b !important;
    font-size: 12px;
    font-weight: 900;
}

.ticker__down {
    color: #ffd2d6 !important;
    font-size: 12px;
    font-weight: 900;
}

@keyframes tickerScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}
/*codigo para estructura regios*/

 /* ==================================================
   PÁGINA INTERIOR DE NOTICIA
================================================== */

.article-breadcrumb {
    padding: 17px 0;
    border-bottom: 1px solid #e4e8ed;
    background: #f7f8fa;
    color: #657080;
    font-size: 13px;
}

.article-breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 9px;
}

.article-breadcrumb a {
    color: #102846;
    font-weight: 700;
}

.article-breadcrumb a:hover {
    color: #d51f2f;
}

.article-page {
    padding: 58px 0 70px;
    background: #ffffff;
}

.article-layout {
    max-width: 1280px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 760px 320px;

    justify-content: space-between;

    gap: 110px;

    align-items: start;
}

.article-content {
    min-width: 0;
}

.article-header {
    padding-bottom: 30px;
    border-bottom: 1px solid #dde2e8;
}

.article-category {
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    margin-bottom: 20px;
    padding: 0 14px;
    border-left: 4px solid #d7192d;
    background: #f1f3f6;
    color: #102846;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.3px;
}

.article-title {
    max-width: 960px;
    margin: 0;
    color: #102846;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(38px, 5vw, 50px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -1.5px;
}

@media (max-width: 992px) {
    .article-title {
        font-size: 52px;
        line-height: 1.05;
    }
}
@media (max-width: 768px) {
    .article-title {
        font-size: 38px;
        line-height: 1.08;
        letter-spacing: -0.8px;
    }
}

.article-summary {
    max-width: 900px;
    margin: 25px 0 0;
    color: #505c6a;
    font-size: 20px;
    line-height: 1.55;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-top: 30px;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-author__avatar {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #102846;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.article-author div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.article-author strong {
    color: #172a42;
    font-size: 14px;
}

.article-author span {
    color: #7a8490;
    font-size: 12px;
}

.article-actions {
    display: flex;
    gap: 7px;
}

.article-actions button {
    width: 38px;
    height: 38px;
    border: 1px solid #d7dde4;
    border-radius: 50%;
    background: #ffffff;
    color: #102846;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.25s ease;
}

.article-actions button:hover {
    border-color: #102846;
    background: #102846;
    color: #ffffff;
}

.article-hero {
    margin: 35px 0 0;
}

.article-hero__media { position: relative; width: 100%; }
.index-header-layout .container{width:min(calc(100% - 32px),1600px);margin-inline:auto}
.index-header-layout .topbar__content{min-height:38px}.index-header-layout .topbar{min-height:38px;font-size:13px}
.index-header-layout .site-header{min-height:auto!important;background:#fff}
.index-header-layout .site-header__main{min-height:118px;display:grid;grid-template-columns:250px 1fr 250px;align-items:center;gap:30px}
.index-header-layout .site-logo{width:auto!important;height:auto!important;max-width:100%!important;display:flex!important}
.index-header-layout .site-logo .logo-img{width:min(280px,100%)!important;height:auto!important;max-height:130px!important;object-fit:contain!important}
.index-header-layout .header-ad{min-height:74px;display:flex!important;align-items:center;justify-content:center;border:1px solid #d8dde3;background:#f5f6f8;color:#677281;text-align:center;font-size:12px;line-height:1.8;letter-spacing:1px}
.index-header-layout .header-tools{display:flex;align-items:center;justify-content:flex-end;gap:12px}
.index-header-layout .search-button,.index-header-layout .menu-button{width:44px;height:44px;border:1px solid #d8dde3;border-radius:50%;background:#fff;color:#102846;font-size:20px}
.index-header-layout .menu-button{display:none}
.index-header-layout .main-nav{display:block;background:#fff;border-top:1px solid #d8dde3;border-bottom:1px solid #d8dde3}
.index-header-layout .main-nav__content{min-height:52px;display:flex;align-items:center;gap:28px;overflow-x:auto;white-space:nowrap}
.index-header-layout .main-nav a{position:relative;display:block;padding:0;color:#102846;font-size:14px;font-weight:700;text-transform:uppercase}
.index-header-layout .main-nav a.active{color:#c8102e}.index-header-layout .main-nav a.active::after{content:"";position:absolute;right:0;bottom:-18px;left:0;height:2px;background:#c8102e}
.article-detail-page .header-ad,.article-detail-page .topbar__links a:nth-child(n+2){display:flex!important}
@media(max-width:900px){.index-header-layout .site-header__main{grid-template-columns:210px 1fr auto}.index-header-layout .header-ad{min-height:60px}}
@media(max-width:700px){.index-header-layout .site-header__main{min-height:86px;grid-template-columns:1fr auto}.index-header-layout .header-ad{display:none!important}.index-header-layout .menu-button{display:inline-block}.index-header-layout .main-nav{display:none}.index-header-layout .main-nav.open{display:block}.index-header-layout .main-nav__content{display:grid;gap:0;padding-block:8px 18px}.index-header-layout .main-nav a{padding-block:12px;border-bottom:1px solid #d8dde3}.index-header-layout .main-nav a::after{display:none}.index-header-layout .topbar__links{display:none}}
.article-detail-page .container { width: min(1200px,calc(100% - 48px)); margin-inline: auto; }
.article-detail-page .site-header { min-height: auto !important; background: #fff; }
.article-detail-page .site-header__content { min-height: 150px !important; display: flex !important; align-items: center; justify-content: space-between; gap: 32px; }
.article-detail-page .site-logo { width: auto !important; height: auto !important; max-width: 360px !important; }
.article-detail-page .site-logo .logo-img { width: 310px !important; height: auto !important; max-width: 100% !important; max-height: 125px !important; object-fit: contain; }
.article-detail-page .header-ad, .article-detail-page .ticker { display: none !important; }
.article-detail-page .topbar__links a:nth-child(n+2) { display: none; }
.article-detail-page .main-nav { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.article-detail-page .main-nav > .container { min-height: 62px; display: flex; align-items: stretch; overflow-x: auto; white-space: nowrap; }
.article-detail-page .main-nav__list { min-height: 62px; display: flex; align-items: stretch; gap: 0; margin: 0; padding: 0; list-style: none; }
.article-detail-page .main-nav a { position: relative; display: flex; align-items: center; padding: 0 22px; color: var(--navy); font-size: 15px; font-weight: 800; text-transform: uppercase; }
.article-detail-page .main-nav a:hover, .article-detail-page .main-nav a.active { color: var(--red); }
.article-detail-page .main-nav a.active::after { content: ""; position: absolute; right: 22px; bottom: 0; left: 22px; height: 3px; background: var(--red); }
@media(max-width:760px){.article-detail-page .container{width:min(100% - 28px,1200px)}.article-detail-page .site-header__content{min-height:118px!important}.article-detail-page .site-logo .logo-img{width:255px!important;max-height:100px!important}.article-detail-page .main-nav a{padding:0 15px;font-size:13px}}
.cms-main-media-actions { display: none; position: absolute; z-index: 25; top: 18px; left: 18px; right: 18px; align-items: center; justify-content: space-between; gap: 12px; pointer-events: none; }
body.modo-edicion .cms-main-media-actions { display: flex; }
.cms-main-media-actions button { pointer-events: auto; min-height: 48px; padding: 11px 18px; border: 0; border-radius: 7px; color: #fff; font-weight: 800; cursor: pointer; box-shadow: 0 7px 20px rgba(0,0,0,.28); }
.cms-main-media-change { background: #1677ff; }
.cms-main-media-actions .cms-delete-main-image { margin-left: auto; background: #c8102e; }
body.modo-edicion .article-hero__media.cms-main-media-empty { min-height: 180px; display: grid; place-items: center; border: 2px dashed #a9bfd8; border-radius: 8px; background: #f4f8fc; }
body.modo-edicion .article-hero__media.cms-main-media-empty .cms-main-media-actions { position: static; display: flex; justify-content: center; padding: 22px; }
body.modo-edicion .article-hero__media.cms-main-media-empty .cms-delete-main-image { display: none !important; }
body.modo-edicion .article-hero__media.cms-main-media-empty::before { content: "Sin imagen principal"; position: absolute; top: 28px; color: #61748a; font-size: 14px; font-weight: 700; }
.cms-main-media-modal { display: none; position: fixed; z-index: 30000; inset: 0; place-items: center; padding: 20px; background: rgba(5,18,32,.72); }
.cms-main-media-modal.active { display: grid; }
.cms-main-media-modal__box { width: min(680px,100%); padding: 32px; border-radius: 14px; background: #fff; color: #102846; box-shadow: 0 25px 80px rgba(0,0,0,.34); }
.cms-main-media-modal__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.cms-main-media-modal__header h2 { margin: 0; font: 700 30px Georgia,"Times New Roman",serif; }
.cms-main-media-modal__close { border: 0; background: transparent; color: #071422; font-size: 30px; cursor: pointer; }
.cms-main-media-modal__choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cms-main-media-modal__choices button { min-height: 138px; border: 1px solid #cfd8e4; border-radius: 11px; background: #f7f9fb; color: #102846; font-size: 19px; font-weight: 800; cursor: pointer; }
.cms-main-media-modal__choices button:hover { border-color: #1677ff; background: #eef5ff; }
.cms-main-media-modal__video { display: none; grid-template-columns: 1fr auto auto; gap: 10px; margin-top: 18px; }
.cms-main-media-modal__video.active { display: grid; }
.cms-main-media-modal__video input { min-width: 0; padding: 12px; border: 1px solid #bcc8d5; border-radius: 5px; }
.cms-main-media-modal__video button { padding: 0 15px; border: 0; border-radius: 5px; background: #1677ff; color: #fff; font-weight: 800; cursor: pointer; }
.cms-main-media-modal__video .remove { background: #102846; }
@media(max-width:650px){.cms-main-media-actions{top:10px;left:10px;right:10px;align-items:stretch;flex-direction:column}.cms-main-media-actions button{width:100%;min-height:42px;padding:8px 12px}.cms-main-media-modal__choices{grid-template-columns:1fr}.cms-main-media-modal__choices button{min-height:90px}.cms-main-media-modal__video.active{grid-template-columns:1fr}.cms-main-media-modal__video button{min-height:44px}}
.article-hero__media iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #071422; }
.article-video { width: min(790px, 100%); margin: 35px auto 0; }
.article-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #071422; }
.article-content-media { position: relative; margin: 32px 0; }
.article-content-media img, .article-content-media iframe { display: block; width: 100%; }

/* La portada de video conserva exactamente el tamaño del titular principal. */
.main-story .cms-video-cover { height: 100%; min-height: 520px; }
.main-story .cms-video-cover img { height: 100%; min-height: 520px; object-fit: cover; }
.article-content-media img { max-height: 650px; object-fit: cover; }
.article-content-media iframe { aspect-ratio: 16 / 9; border: 0; background: #071422; }
.cms-multimedia-toolbar { display: none; margin: 24px auto; max-width: 790px; }
body.modo-edicion .cms-multimedia-toolbar { display: flex; }
.cms-multimedia-toolbar button { padding: 12px 18px; border: 0; border-radius: 6px; background: #1677ff; color: #fff; font-weight: 800; cursor: pointer; }
.cms-media-actions { display: none; position: absolute; z-index: 15; top: 10px; right: 10px; gap: 6px; padding: 7px; border-radius: 8px; background: rgba(7,20,34,.9); }
body.modo-edicion .cms-media-actions { display: flex; }
.cms-media-actions button { min-width: 36px; height: 36px; padding: 0 9px; border: 0; border-radius: 5px; background: #fff; color: #102846; cursor: pointer; font-weight: 800; }
.cms-media-actions .delete { background: #c8102e; color: #fff; }
.cms-media-modal { display: none; position: fixed; z-index: 20000; inset: 0; place-items: center; padding: 20px; background: rgba(5,18,32,.72); }
.cms-media-modal.active { display: grid; }
.cms-media-modal__box { width: min(560px,100%); padding: 28px; border-radius: 14px; background: #fff; box-shadow: 0 25px 80px rgba(0,0,0,.32); color: #102846; }
.cms-media-modal__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.cms-media-modal__header h2 { margin: 0; font: 700 26px Georgia,serif; }
.cms-media-modal__close { border: 0; background: transparent; font-size: 30px; cursor: pointer; }
.cms-media-modal__choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cms-media-modal__choices button { min-height: 110px; border: 1px solid #d6dee8; border-radius: 10px; background: #f7f9fb; color: #102846; cursor: pointer; font-size: 18px; font-weight: 800; }
.cms-media-modal__choices button:hover { border-color: #1677ff; background: #eef5ff; }
.cms-media-modal__video { display: none; gap: 10px; margin-top: 18px; }
.cms-media-modal__video.active { display: grid; grid-template-columns: 1fr auto; }
.cms-media-modal__video input { min-width: 0; padding: 12px; border: 1px solid #bcc8d5; }
.cms-media-modal__video button { border: 0; border-radius: 5px; padding: 0 16px; background: #1677ff; color: #fff; font-weight: 800; }
@media(max-width:600px){.cms-media-modal__choices{grid-template-columns:1fr}.cms-media-modal__video.active{grid-template-columns:1fr}.cms-media-modal__video button{min-height:44px}}
.cms-video-editor { display: none; gap: 10px; align-items: center; margin: 14px 0 0; padding: 14px; border: 1px solid #cfd7e2; background: #f7f9fb; }
body.modo-edicion .cms-video-editor { display: flex; }
.cms-video-editor input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #b9c4d1; }
.cms-video-editor button { padding: 10px 14px; border: 0; border-radius: 5px; background: #1677ff; color: #fff; font-weight: 800; cursor: pointer; }
.cms-video-editor .cms-use-image { background: #102846; }
@media (max-width: 600px) { .cms-video-editor { align-items: stretch; flex-direction: column; } }

.article-hero img {
    width: 100%;
    height: clamp(340px, 52vw, 630px);
    display: block;
    object-fit: cover;
}

.article-hero figcaption,
.article-inline-image figcaption {
    margin-top: 10px;
    color: #7a8490;
    font-size: 12px;
    line-height: 1.55;
}

.article-body {
    max-width: 790px;
    margin: 45px auto 0;
    color: #303b48;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.9;
}

.article-body p {
    margin: 0 0 25px;
}

.article-body .article-lead {
    color: #1d2d42;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.65;
}

.article-body h2 {
    margin: 48px 0 20px;
    color: #102846;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 28px;
    line-height: 1.25;
}

.article-quote {
    position: relative;
    margin: 45px 0;
    padding: 30px 35px 30px 40px;
    border-left: 5px solid #d7192d;
    background: #f5f7f9;
}

.article-quote::before {
    content: "“";
    position: absolute;
    top: 4px;
    left: 15px;
    color: rgba(215, 25, 45, 0.15);
    font-family: Georgia, serif;
    font-size: 90px;
    line-height: 1;
}

.article-quote p {
    position: relative;
    margin: 0;
    color: #102846;
    font-size: 24px;
    font-style: italic;
    font-weight: 700;
    line-height: 1.5;
}

.article-quote cite {
    display: block;
    margin-top: 18px;
    color: #6a7480;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
}

.article-inline-image {
    margin: 40px 0;
}

.article-inline-image img {
    width: 100%;
    max-height: 520px;
    display: block;
    object-fit: cover;
}

.article-footer {
    max-width: 790px;
    margin: 50px auto 0;
    padding-top: 30px;
    border-top: 1px solid #dde2e8;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.article-tags span {
    margin-right: 4px;
    color: #102846;
    font-size: 13px;
    font-weight: 900;
}

.article-tags a {
    padding: 7px 12px;
    border: 1px solid #d8dde4;
    border-radius: 2px;
    color: #596574;
    font-size: 12px;
    font-weight: 700;
}

.article-tags a:hover {
    border-color: #d7192d;
    color: #d7192d;
}

.article-share-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
}

.article-share-bottom strong {
    color: #102846;
    font-size: 14px;
}

.article-share-bottom div {
    display: flex;
    gap: 8px;
}

.article-share-bottom a {
    padding: 9px 13px;
    background: #102846;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
}

.article-share-bottom a:hover {
    background: #d7192d;
}

.footer-admin {
    color: #ffffff;
    text-decoration: none;
    margin-left: 12px;
    font-weight: 600;
}

.footer-admin:hover {
    color: #e21e2b;
    text-decoration: underline;
}

/* ==================================================
   BARRA LATERAL
================================================== */

.article-sidebar {
    position: sticky;
    top: 25px;
}

.sidebar-ad {
    min-height: 275px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 35px;
    background:
        linear-gradient(
            145deg,
            rgba(7, 27, 51, 0.98),
            rgba(18, 51, 86, 0.94)
        );
    color: #ffffff;
    text-align: center;
}

.sidebar-ad span {
    margin-bottom: 18px;
    color: #ffbdc5;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.8px;
}

.sidebar-ad strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 27px;
    line-height: 1.25;
}

.sidebar-ad p {
    margin: 16px 0 0;
    color: #d8e1eb;
    font-size: 13px;
    line-height: 1.65;
}

.sidebar-section {
    margin-top: 40px;
}

.sidebar-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    padding-bottom: 13px;
    border-bottom: 2px solid #102846;
}

.sidebar-heading span {
    width: 5px;
    height: 25px;
    background: #d7192d;
}

.sidebar-heading h2 {
    margin: 0;
    color: #102846;
    font-size: 20px;
}

.popular-news {
    display: grid;
    grid-template-columns: 45px 1fr;
    gap: 13px;
    padding: 20px 0;
    border-bottom: 1px solid #e0e5ea;
}

.popular-news__number {
    color: #d2d8df;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 35px;
    font-weight: 700;
    line-height: 1;
}

.popular-news__category {
    display: block;
    margin-bottom: 7px;
    color: #d7192d;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.8px;
}

.popular-news a {
    color: #1b2c42;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.popular-news a:hover {
    color: #d7192d;
}

.newsletter-box {
    margin-top: 40px;
    padding: 32px;
    border-top: 5px solid #d7192d;
    background: #f1f4f7;
}

.newsletter-box__label {
    color: #d7192d;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.2px;
}

.newsletter-box h2 {
    margin: 12px 0 10px;
    color: #102846;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    line-height: 1.25;
}

.newsletter-box p {
    margin: 0 0 20px;
    color: #657080;
    font-size: 13px;
    line-height: 1.55;
}

.newsletter-box form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-box input {
    width: 100%;
    height: 45px;
    padding: 0 14px;
    border: 1px solid #ced5dd;
    background: #ffffff;
    outline: none;
}

.newsletter-box input:focus {
    border-color: #102846;
}

.newsletter-box button {
    height: 45px;
    border: 0;
    background: #d7192d;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.6px;
    cursor: pointer;
}

.newsletter-box button:hover {
    background: #b61525;
}


/* ==================================================
   NOTICIAS RELACIONADAS
================================================== */

.related-section {
    padding: 65px 0 80px;
    border-top: 1px solid #e0e4e9;
    background: #f5f7f9;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 28px;
}

.section-heading > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-heading__line {
    width: 6px;
    height: 34px;
    background: #d7192d;
}

.section-heading h2 {
    margin: 0;
    color: #102846;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
}

.section-heading > a {
    color: #d7192d;
    font-size: 12px;
    font-weight: 900;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.related-card {
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 9px 25px rgba(18, 39, 63, 0.08);
}

.related-card > a {
    display: block;
    overflow: hidden;
}

.related-card img {
    width: 100%;
    height: 220px;
    display: block;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-card:hover img {
    transform: scale(1.035);
}

.related-card__content {
    padding: 25px;
}

.related-card__content > span {
    color: #d7192d;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
}

.related-card h3 {
    margin: 11px 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    line-height: 1.3;
}

.related-card h3 a {
    color: #102846;
}

.related-card h3 a:hover {
    color: #d7192d;
}

.related-card p {
    margin: 0;
    color: #697482;
    font-size: 13px;
    line-height: 1.65;
}


/* ==================================================
   UTILIDAD DE ACCESIBILIDAD
================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}


/* ==================================================
   RESPONSIVO
================================================== */

@media (max-width: 1050px) {
    .article-layout {
        grid-template-columns: minmax(0, 1fr) 285px;
        gap: 40px;
    }
}

@media (max-width: 880px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .sidebar-section,
    .newsletter-box {
        margin-top: 0;
    }

    .sidebar-ad {
        grid-column: 1 / -1;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .article-page {
        padding-top: 38px;
    }

    .article-title {
        font-size: 37px;
        letter-spacing: -0.7px;
    }

    .article-summary {
        font-size: 17px;
    }

    .article-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .article-hero img {
        height: 320px;
    }

    .article-body {
        font-size: 17px;
        line-height: 1.8;
    }

    .article-body .article-lead {
        font-size: 19px;
    }

    .article-body h2 {
        font-size: 24px;
    }

    .article-quote {
        padding: 28px 24px 28px 29px;
    }

    .article-quote p {
        font-size: 20px;
    }

    .article-share-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .article-sidebar {
        display: block;
    }

    .sidebar-section,
    .newsletter-box {
        margin-top: 35px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}


.logo{
    display:inline-flex;
    flex-direction:column;
    width:max-content;
}

.logo__name{
    font-family:Georgia,"Times New Roman",serif;
    font-size:clamp(34px,4vw,54px);
    font-weight:700;
    letter-spacing:-3px;
    line-height:.9;
}

.logo__name span{
    color:#bb1f2d;
}

.logo__tagline{
    font-size:11px;
    font-weight:700;
    letter-spacing:2px;
    margin-top:10px;
    text-transform:uppercase;
}


/* ==================================================
   FOOTER ORIGINAL DE KONTEXTO
================================================== */

.site-footer {
    padding-block: 48px 28px;
    background: #071422;
    color: #ffffff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 42px;
}

.footer-brand .logo {
    display: inline-flex;
    flex-direction: column;
    width: max-content;
}

/* TIPOGRAFIA EDITORIAL RESPONSIVE */
.article-title {
    max-width: 100%;
    font-size: clamp(2.35rem, 4.2vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.025em;
    text-transform: none;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.article-summary {
    max-width: 760px;
    font-size: clamp(1.05rem, 1.45vw, 1.35rem);
    line-height: 1.55;
}

.article-body {
    font-size: clamp(1rem, 1.15vw, 1.16rem);
    line-height: 1.78;
}

@media (max-width: 650px) {
    .article-title {
        font-size: clamp(2rem, 10vw, 2.65rem);
        line-height: 1.08;
    }
}

/* ==================================================
   IDENTIDAD REGIONAL AMAZÓNICA
   Mantiene el rojo y azul de Kontexto e incorpora
   verdes y tonos tierra como acentos editoriales.
================================================== */

.topbar {
    border-bottom: 3px solid var(--amazon);
}

.site-header,
.main-nav,
.hero-section,
.content-section,
.category-page,
.article-page {
    background-color: var(--warm-white);
}

.main-nav__list a:hover {
    color: var(--amazon);
}

.main-nav__list a.active {
    color: var(--red);
}

.article-breadcrumb,
.related-section {
    background: var(--amazon-pale);
}

.section-heading__line {
    background: var(--amazon);
}

.section-heading h1,
.section-heading h2,
.article-title,
.related-card h3 a {
    color: var(--navy);
}

.news-card,
.related-card,
.category-empty {
    border-bottom: 3px solid transparent;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.news-card:hover,
.related-card:hover {
    border-bottom-color: var(--amazon);
}

.category-empty {
    background: var(--amazon-pale) !important;
    border-color: var(--border) !important;
}

.site-footer {
    background: var(--navy-dark);
    border-top: 5px solid var(--amazon);
}

.footer-bottom {
    border-color: rgba(92, 143, 87, 0.45);
}

::selection {
    color: var(--white);
    background: var(--amazon);
}

body.modo-edicion .main-nav a[data-menu-clave] {
    cursor: text;
    outline: 1px dashed transparent;
    outline-offset: 5px;
    transition: outline-color 0.2s ease, background-color 0.2s ease;
}

body.modo-edicion .main-nav a[data-menu-clave]:hover,
body.modo-edicion .main-nav a[data-menu-clave]:focus {
    outline-color: #1677ff;
    background-color: rgba(22, 119, 255, 0.08);
}

.footer-brand .footer-logo {
    display: block;
    width: min(260px, 100%);
    height: auto;
    object-fit: contain;
}

.footer-brand .logo__name {
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(34px, 4vw, 54px);
    font-weight: 700;
    letter-spacing: -3px;
    line-height: 0.9;
}

.footer-brand .logo__name span {
    color: #bb1f2d;
}

.footer-brand .logo__tagline {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-brand p {
    max-width: 330px;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 14px;
    line-height: 1.8;
}

.footer-column h3 {
    margin-bottom: 16px;
    color: #ffffff;
    font-size: 15px;
    text-transform: uppercase;
}

.footer-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-column li + li {
    margin-top: 10px;
}

.footer-column a {
    display: inline-block;
    color: rgba(255, 255, 255, 0.68);
    font-size: 14px;
    text-decoration: none;
}

.footer-column a:hover {
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 42px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
}

@media (max-width: 800px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

/* ==================================================
   CORRECCIÓN DE SECCIONES ENCIMADAS EN EL INDEX
================================================== */

.section {
    position: relative;
    clear: both;
    width: 100%;
    height: auto !important;
    min-height: 0;
    margin-top: 70px;
    overflow: visible;
}

.section-heading {
    position: relative !important;
    inset: auto !important;
    z-index: 2;
    width: 100%;
    min-height: 50px;
    margin: 0 0 28px;
    padding: 0 0 12px;
    background: #ffffff;
    clear: both;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: auto;
    align-items: start;
    gap: 24px;
    width: 100%;
    height: auto !important;
    overflow: visible;
}

.news-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    padding-bottom: 24px;
    overflow: visible;
}

.news-card__image {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 16 / 10;
    margin-bottom: 16px;
    overflow: hidden;
}

.news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card h3 {
    position: static !important;
    height: auto !important;
    min-height: 0;
    margin: 7px 0 0;
    overflow: visible;
}

.news-card p {
    position: static !important;
    height: auto !important;
    margin: 12px 0 0;
    overflow: visible;
}

.news-card .story-meta {
    margin-top: auto;
    padding-top: 14px;
}

@media (max-width: 1100px) {
    .news-grid,
    .opinion-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .news-grid,
    .opinion-grid {
        grid-template-columns: 1fr;
    }
}

/* Deja una separación real entre una sección y la siguiente */
.section + .section {
    margin-top: 85px;
}

.opinion-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 24px;
    width: 100%;
    height: auto !important;
    overflow: visible;
}

.opinion-card {
    position: relative;
    height: auto !important;
    min-height: 265px;
    overflow: visible;
}

/* ==================================================
   BARRA DEL CMS VISUAL
================================================== */

.admin-bar {
    position: sticky;
    top: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-height: 58px;
    padding: 9px max(18px, calc((100% - 1280px) / 2));
    border-bottom: 3px solid var(--red);
    background:
        linear-gradient(100deg, var(--navy-dark) 0%, var(--navy) 72%, #17395e 100%);
    box-shadow: 0 8px 24px rgba(11, 32, 56, 0.2);
    color: var(--white);
    font-family: Arial, Helvetica, sans-serif;
}

.admin-bar::before {
    content: "MODO ADMINISTRADOR";
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    white-space: nowrap;
}

.admin-bar::after {
    content: "";
    position: absolute;
    left: max(18px, calc((100% - 1280px) / 2));
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #49d17d;
    box-shadow: 0 0 0 4px rgba(73, 209, 125, 0.15);
    transform: translateX(-18px);
}

.admin-bar button,
.admin-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.admin-bar #btn-editar {
    border-color: var(--red);
    background: var(--red);
    color: var(--white);
    box-shadow: 0 5px 14px rgba(201, 31, 48, 0.28);
}

.admin-bar #btn-editar:hover {
    border-color: #e02b3d;
    background: #e02b3d;
    transform: translateY(-1px);
}

.admin-bar #btn-guardar {
    border-color: rgba(255, 255, 255, 0.5);
    background: var(--white);
    color: var(--navy-dark);
}

.admin-bar #btn-guardar:not(:disabled):hover {
    border-color: var(--white);
    background: #eef4fa;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.14);
    transform: translateY(-1px);
}

.admin-bar #btn-guardar:disabled {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.48);
    cursor: not-allowed;
    box-shadow: none;
}

.admin-bar a {
    border-color: rgba(255, 255, 255, 0.32);
    background: transparent;
    color: var(--white);
}

.admin-bar a:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.admin-bar button:focus-visible,
.admin-bar a:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.65);
    outline-offset: 2px;
}

body.modo-edicion .admin-bar {
    box-shadow: 0 8px 26px rgba(11, 32, 56, 0.28);
}

body.modo-edicion .admin-bar #btn-editar {
    border-color: var(--white);
    background: var(--white);
    color: var(--navy-dark);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16);
}

@media (max-width: 700px) {
    .admin-bar {
        gap: 7px;
        min-height: 54px;
        padding: 8px 12px;
        overflow-x: auto;
    }

    .admin-bar::before,
    .admin-bar::after {
        display: none;
    }

    .admin-bar button,
    .admin-bar a {
        flex: 1 0 auto;
        min-height: 36px;
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* ==================================================
   INDICADORES VISUALES DEL MODO EDICIÓN
================================================== */

body.modo-edicion [data-posicion] {
    cursor: pointer;
    outline: 2px dashed transparent;
    outline-offset: -2px;
    transition:
        outline-color 0.2s ease,
        box-shadow 0.2s ease;
}

body.modo-edicion [data-posicion]:hover {
    outline-color: #1677ff;
    box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.1);
}

body.modo-edicion [data-posicion] img {
    cursor: pointer;
}

body.modo-edicion [contenteditable="true"]:focus {
    outline: 2px dashed #1677ff;
    outline-offset: 3px;
}

/* ==================================================
   AJUSTE GLOBAL DE ANCHO Y RESPONSIVE
================================================== */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

body {
    min-width: 0;
}

.container {
    width: min(1500px, calc(100% - 32px));
    max-width: 100%;
}

.topbar,
.site-header,
.main-nav,
.ticker,
main,
.site-footer {
    width: 100%;
    max-width: 100%;
}

.site-header__content,
.site-header__main,
.topbar__content,
.main-nav__content,
.hero-grid,
.content-layout,
.latest-strip,
.featured-layout,
.news-grid,
.opinion-grid,
.video-grid,
.newsletter__content,
.footer-grid,
.article-layout {
    min-width: 0;
    max-width: 100%;
}

.site-logo {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
}

.site-logo .logo-img {
    width: min(280px, 100%) !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 130px !important;
}

.hero-grid > *,
.content-layout > *,
.side-stories > *,
.news-grid > *,
.opinion-grid > *,
.video-grid > *,
.newsletter__content > *,
.footer-grid > *,
.article-layout > * {
    min-width: 0;
}

img,
video,
iframe {
    max-width: 100%;
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1500px);
    }

    .site-header,
    .site-header__content,
    .site-header__main {
        min-height: auto !important;
    }

    .site-logo .logo-img {
        width: min(250px, 100%) !important;
        max-height: 110px !important;
    }

    .footer-grid {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 20px, 1500px);
    }

    .site-logo .logo-img {
        width: min(235px, 100%) !important;
        max-height: 96px !important;
    }

    .footer-brand .footer-logo {
        width: min(230px, 100%);
    }
}

/* Logotipo principal con mayor presencia sin alterar la retícula del encabezado. */
.site-header .site-logo {
    overflow: visible !important;
}

.site-header .site-logo .logo-img {
    transform: none;
    transform-origin: left center;
    filter: drop-shadow(0 5px 10px rgba(16, 40, 70, 0.12));
}

@media (min-width: 1051px) {
    .index-header-layout .site-header__main {
        grid-template-columns: 340px minmax(0, 1fr) 250px;
    }

    .index-header-layout .site-logo .logo-img {
        width: 330px !important;
        max-width: 100% !important;
        max-height: 130px !important;
    }

    body.category-section.index-header-layout .site-logo .logo-img,
    body.article-detail-page.index-header-layout .site-logo .logo-img {
        width: 330px !important;
        max-width: 100% !important;
        max-height: 130px !important;
    }

    .index-header-layout .header-ad {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 1050px) {
    .site-header .site-logo .logo-img {
        transform: none;
    }
}

/* Todas las páginas usan el mismo encabezado, pero conservan el ancho editorial. */
.article-detail-page .header-ad {
    display: flex !important;
}

.category-section .category-breadcrumb > .container,
.category-section .category-page > .container,
.article-detail-page .article-page > .container {
    width: min(1200px, calc(100% - 80px)) !important;
    margin-inline: auto !important;
}

/* Respiración lateral uniforme para el menú en todas las páginas. */
.index-header-layout .main-nav__content {
    width: min(calc(100% - 80px), 1200px) !important;
    margin-inline: auto !important;
}

/* El primer bloque del index conserva el espacio editorial original. */
body.index-header-layout:not(.category-section) main {
    padding-top: 42px;
}

body.index-header-layout:not(.category-section) main > .container {
    width: min(calc(100% - 80px), 1200px) !important;
    margin-inline: auto !important;
}

@media (max-width: 700px) {
    .site-header .site-logo .logo-img {
        width: min(285px, calc(100vw - 88px)) !important;
        max-height: 112px !important;
        transform: none;
        filter: drop-shadow(0 4px 8px rgba(16, 40, 70, 0.1));
    }

    body.category-section.index-header-layout .site-logo .logo-img,
    body.article-detail-page.index-header-layout .site-logo .logo-img {
        width: min(285px, calc(100vw - 88px)) !important;
        max-height: 112px !important;
    }

    .category-section .category-breadcrumb > .container,
    .category-section .category-page > .container,
    .article-detail-page .article-page > .container {
        width: min(100% - 28px, 1200px) !important;
    }

    .index-header-layout .main-nav__content,
    body.index-header-layout:not(.category-section) main > .container {
        width: min(100% - 24px, 1200px) !important;
    }

    body.index-header-layout:not(.category-section) main {
        padding-top: 24px;
    }
}

@media (max-width: 390px) {
    .site-header .site-logo .logo-img {
        width: min(260px, calc(100vw - 78px)) !important;
        max-height: 102px !important;
    }


    body.category-section.index-header-layout .site-logo .logo-img,
    body.article-detail-page.index-header-layout .site-logo .logo-img {
        width: min(260px, calc(100vw - 78px)) !important;
        max-height: 102px !important;
    }
}

body.video-modal-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .cms-video-lightbox {
        padding: 14px !important;
    }

    .cms-video-lightbox__box {
        width: 100% !important;
        max-width: 100% !important;
    }

    .cms-video-lightbox iframe {
        width: 100% !important;
        aspect-ratio: 16 / 9;
        border-radius: 8px;
    }

    .cms-video-lightbox__close {
        position: fixed !important;
        top: 14px !important;
        right: 14px !important;
        bottom: auto !important;
        z-index: 2;
    }
}

/* Ajuste final de lectura para noticias */
.article-title {
    max-width: 100%;
    font-size: clamp(2.35rem, 4.2vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.025em;
    text-transform: none;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.article-summary {
    max-width: 760px;
    font-size: clamp(1.05rem, 1.45vw, 1.35rem);
    line-height: 1.55;
}

.article-body {
    font-size: clamp(1rem, 1.15vw, 1.16rem);
    line-height: 1.78;
}

@media (max-width: 650px) {
    .article-title {
        font-size: clamp(2rem, 10vw, 2.65rem);
        line-height: 1.08;
    }
}

/* ==================================================
   MARGEN LATERAL DE PAGINAS INTERNAS
================================================== */

.article-breadcrumb > .container,
.article-page > .article-layout,
.related-section > .container {
    width: min(1280px, calc(100% - 64px));
    max-width: 1280px;
    margin-inline: auto;
}

@media (max-width: 760px) {
    .article-breadcrumb > .container,
    .article-page > .article-layout,
    .related-section > .container {
        width: calc(100% - 24px);
    }
}

@media (max-width: 560px) {
    .article-breadcrumb > .container,
    .article-page > .article-layout,
    .related-section > .container {
        width: calc(100% - 20px);
    }
}
/* Publicidad editable del encabezado */
.header-ad {
    position: relative;
    overflow: hidden;
}

.cms-publicidad {
    position: relative;
    overflow: hidden;
}

.cms-publicidad > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.ad-box.cms-publicidad > img,
.category-sidebar-ad.cms-publicidad > img,
.sidebar-ad.cms-publicidad > img {
    position: absolute;
    inset: 0;
}

.cms-publicidad-placeholder {
    display: contents;
}

.news-grid.cms-newest-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-top: 0;
    margin-bottom: 32px;
}

.cms-newest-row .cms-video-cover,
.cms-newest-row .news-card__image {
    aspect-ratio: 16 / 9;
}

.cms-newest-row .cms-video-cover img,
.cms-newest-row .news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 900px) {
    .news-grid.cms-newest-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .news-grid.cms-newest-row {
        grid-template-columns: 1fr !important;
    }
}

.header-ad > img {
    width: 100%;
    height: 100%;
    min-height: 74px;
    display: block;
    object-fit: cover;
    object-position: center;
}

.cms-header-ad-edit {
    position: absolute;
    z-index: 20;
    top: 50%;
    left: 50%;
    display: none;
    min-height: 44px;
    padding: 11px 18px;
    transform: translate(-50%, -50%);
    border: 0;
    border-radius: 7px;
    background: #1677ff;
    color: #fff;
    font: inherit;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 50, 120, .25);
}

.cms-header-ad-delete {
    position: absolute;
    z-index: 20;
    top: calc(50% + 50px);
    left: 50%;
    display: none;
    min-height: 40px;
    padding: 9px 16px;
    transform: translate(-50%, -50%);
    border: 0;
    border-radius: 7px;
    background: #cf1234;
    color: #fff;
    font: inherit;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(120, 0, 25, .24);
}

body.modo-edicion .cms-header-ad-edit {
    display: block;
}

body.modo-edicion .cms-header-ad-delete {
    display: block;
}

.cms-header-ad-delete--unavailable {
    display: none !important;
}

body.modo-edicion .cms-header-ad::after {
    content: "";
    position: absolute;
    z-index: 10;
    inset: 0;
    border: 2px dashed #1677ff;
    background: rgba(22, 119, 255, .08);
    pointer-events: none;
}

body.modo-edicion .cms-publicidad::after {
    content: "";
    position: absolute;
    z-index: 10;
    inset: 0;
    border: 2px dashed #1677ff;
    background: rgba(22, 119, 255, .08);
    pointer-events: none;
}

@media (max-width: 700px) {
    body.modo-edicion .index-header-layout .site-header__main {
        grid-template-columns: 1fr auto;
        padding-block: 14px;
    }

    body.modo-edicion .index-header-layout .header-ad {
        width: 100%;
        min-height: 64px;
        display: flex !important;
        grid-column: 1 / -1;
        margin-top: 12px;
    }

    .header-ad > img {
        min-height: 64px;
    }
}
