/* ==========================================================================
   Ecuador Noticias 360 — Editorial, Single Post, Sidebar, Categorías & Móvil
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CORRECCIONES GLOBALES DE CONTRASTE Y OVERFLOW EN PORTADA / LISTADOS
   -------------------------------------------------------------------------- */
html,
body,
#page,
.site {
    overflow-x: clip !important;
    max-width: 100% !important;
}

.e-con,
.e-con-inner,
.elementor-post,
.elementor-post__card,
.elementor-post__text {
    min-width: 0 !important;
    max-width: 100% !important;
}

.elementor-post__meta-data,
.elementor-post-date,
.elementor-post__meta-data span {
    color: #475569 !important; /* Ratio >= 7.1:1 sobre fondo blanco (WCAG AA/AAA) */
}

.elementor-element-fp_side_posts .elementor-post__text {
    min-width: 0 !important;
    max-width: 100%;
}

.elementor-element-fp_side_posts .elementor-post__title a,
.elementor-post__title a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 768px) {
    footer.elementor-28814 .elementor-element-ft_main_directory > .e-con-inner {
        flex-wrap: wrap !important;
    }
    .agy-trending-bar {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
}

/* Impedir que Auto Ads infle el header sticky/navegación */
header.elementor-28809 .google-auto-placed {
    display: none !important;
}

/* --------------------------------------------------------------------------
   2. FASE II — DISEÑO EDITORIAL DEL SINGLE POST (scoped a .single-post .elementor-28835)
   -------------------------------------------------------------------------- */
body.single-post .elementor-28835 .elementor-widget-theme-post-title h1.elementor-heading-title {
    font-size: clamp(1.625rem, 3vw, 2.25rem) !important;
    font-weight: 800 !important;
    line-height: 1.18 !important;
    letter-spacing: -0.02em !important;
    color: #0f172a !important;
    margin: 0 0 12px 0 !important;
}

body.single-post .elementor-28835 .elementor-widget-theme-post-featured-image img {
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
}

body.single-post .elementor-28835 .elementor-widget-theme-post-featured-image figcaption,
body.single-post .elementor-28835 .elementor-widget-theme-post-featured-image .wp-caption-text {
    font-size: 13px !important;
    line-height: 1.45 !important;
    color: #475569 !important;
    margin-top: 8px !important;
}

body.single-post .elementor-28835 .elementor-widget-theme-post-content > .elementor-widget-container > p,
body.single-post .elementor-28835 .elementor-widget-theme-post-content > .elementor-widget-container > ul li,
body.single-post .elementor-28835 .elementor-widget-theme-post-content > .elementor-widget-container > ol li {
    font-size: 17.5px !important;
    line-height: 1.72 !important;
    color: #1e293b !important;
}

body.single-post .elementor-28835 .elementor-widget-theme-post-content > .elementor-widget-container > p {
    margin-bottom: 1.25em !important;
}

@media (max-width: 768px) {
    body.single-post .elementor-28835 .elementor-widget-theme-post-content > .elementor-widget-container > p,
    body.single-post .elementor-28835 .elementor-widget-theme-post-content > .elementor-widget-container > ul li,
    body.single-post .elementor-28835 .elementor-widget-theme-post-content > .elementor-widget-container > ol li {
        font-size: 16.5px !important;
        line-height: 1.68 !important;
    }
}

body.single-post .elementor-28835 .elementor-widget-theme-post-content h2:not(.agy-lead-deck) {
    font-size: clamp(1.25rem, 2.2vw, 1.5rem) !important;
    font-weight: 800 !important;
    line-height: 1.28 !important;
    color: #0f172a !important;
    border-left: 4px solid #dc2626 !important;
    padding-left: 12px !important;
    margin: 1.5em 0 0.65em 0 !important;
}

body.single-post .elementor-28835 .elementor-widget-theme-post-content h3:not(.ec360-side-title):not(.elementor-post__title) {
    font-size: 1.16rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: #1e293b !important;
    margin: 1.25em 0 0.5em 0 !important;
}

body.single-post .elementor-28835 .elementor-widget-theme-post-content blockquote {
    margin: 1.4em 0 !important;
    padding: 14px 18px !important;
    background: #f8fafc !important;
    border-left: 4px solid #dc2626 !important;
    border-radius: 0 10px 10px 0 !important;
    color: #334155 !important;
    font-style: italic;
}

body.single-post .elementor-28835 .elementor-widget-theme-post-content a:focus-visible,
body.single-post .elementor-28835 .elementor-widget-theme-post-content button:focus-visible,
.ec360-cat-strip a:focus-visible {
    outline: 2px solid #dc2626 !important;
    outline-offset: 2px !important;
}

/* Breadcrumbs visibles */
.ec360-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    line-height: 1.4;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0 0 16px 0;
}

.ec360-breadcrumbs a {
    color: #0f172a !important;
    font-weight: 700;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ec360-breadcrumbs a:hover {
    color: #dc2626 !important;
    text-decoration: underline !important;
}

.ec360-bc-sep {
    color: #64748b;
    font-weight: 700;
}

.ec360-bc-current {
    color: #334155;
    font-weight: 600;
}

/* Indicador COBERTURA EN VIVO (solo posts con etiqueta/meta verificada) */
.ec360-live-badge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    margin: 0 0 16px 0;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    border-radius: 8px;
    color: #991b1b;
    font-size: 13px;
}

.ec360-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #dc2626;
    display: inline-block;
    animation: ec360LivePulse 1.6s ease-in-out infinite;
}

@keyframes ec360LivePulse {
    0%, 100% { transform: scale(0.95); opacity: 0.75; }
    50% { transform: scale(1.15); opacity: 1; }
}

.ec360-live-time {
    color: #7f1d1d;
    font-weight: 500;
}

/* Etiquetas (#tag) con contraste, hover y focus accesible */
.agy-topic-chips .agy-tc-pill {
    color: #0f172a !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.agy-topic-chips .agy-tc-pill:hover,
.agy-topic-chips .agy-tc-pill:focus-visible {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

/* Tarjeta de Autor */
.ec360-post-footer-stack {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ec360-author-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #dc2626;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.ec360-author-avatar {
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    object-fit: cover;
    flex: 0 0 56px;
}

.ec360-author-kicker {
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #b91c1c;
    margin-bottom: 2px;
}

.ec360-author-name {
    display: block;
    font-size: 15.5px;
    margin-bottom: 4px;
}

.ec360-author-name a {
    color: #0f172a !important;
    text-decoration: none !important;
}

.ec360-author-name a:hover {
    color: #dc2626 !important;
    text-decoration: underline !important;
}

.ec360-author-bio {
    margin: 0 !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    color: #475569 !important;
}

/* Interlinking automático: "También en [Categoría]" */
.ec360-related-box {
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.ec360-rel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.ec360-rel-head h3 {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #0f172a !important;
}

.ec360-rel-all {
    font-size: 12.5px;
    font-weight: 700;
    color: #b91c1c !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.ec360-rel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 767px) {
    .ec360-rel-grid {
        grid-template-columns: 1fr;
    }
}

.ec360-rel-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.ec360-rel-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    overflow: hidden;
}

.ec360-rel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ec360-rel-title {
    margin: 0 !important;
    padding: 10px 12px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    line-height: 1.38 !important;
}

.ec360-rel-title a {
    color: #0f172a !important;
    text-decoration: none !important;
}

.ec360-rel-title a:hover {
    color: #dc2626 !important;
}

/* Caja final de Seguimiento y Alertas */
.ec360-follow-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-left: 4px solid #22c55e;
    border-radius: 12px;
    color: #ffffff;
}

.ec360-follow-copy strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 3px;
}

.ec360-follow-copy span {
    display: block;
    font-size: 13px;
    color: #cbd5e1;
}

.ec360-follow-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ec360-fbtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none !important;
    color: #ffffff !important;
}

.ec360-fbtn--wa { background: #16a34a; }
.ec360-fbtn--wa:hover { background: #15803d; }
.ec360-fbtn--tg { background: #0284c7; }
.ec360-fbtn--rss { background: #334155; border: 1px solid rgba(255, 255, 255, 0.2); }
.ec360-fbtn--cat { background: #dc2626; }
.ec360-fbtn--cat:hover { background: #b91c1c; }

/* --------------------------------------------------------------------------
   3. FASE III — TARJETAS EDITORIALES DEL SIDEBAR
   -------------------------------------------------------------------------- */
.ec360-side-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 18px;
}

.ec360-side-card {
    border-radius: 14px;
    padding: 18px 16px;
    color: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
    box-sizing: border-box;
}

.ec360-side-wa {
    background: linear-gradient(155deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid #334155;
    border-top: 4px solid #22c55e;
}

.ec360-side-mt {
    background: linear-gradient(155deg, #111827 0%, #1f2937 100%);
    border: 1px solid #374151;
    border-top: 4px solid #dc2626;
}

.ec360-side-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.ec360-side-ico {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.ec360-side-ico--wa { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.ec360-side-ico--red { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); }

.ec360-side-eyebrow {
    display: block;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.ec360-side-eyebrow--green { color: #86efac; }
.ec360-side-eyebrow--red { color: #fca5a5; }

.ec360-side-title {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    color: #ffffff !important;
}

.ec360-side-desc {
    margin: 0 0 12px 0 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #cbd5e1 !important;
}

.ec360-side-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.ec360-side-chips span {
    font-size: 11px;
    font-weight: 700;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 3px 9px;
    border-radius: 999px;
}

.ec360-side-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 800;
    text-decoration: none !important;
    box-sizing: border-box;
}

.ec360-side-cta--green { background: #22c55e; color: #052e16 !important; }
.ec360-side-cta--green:hover { background: #4ade80; }
.ec360-side-cta--red { background: #dc2626; color: #ffffff !important; }
.ec360-side-cta--red:hover { background: #ef4444; }

.ec360-side-nets {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ec360-side-nets > span {
    font-size: 11.5px;
    font-weight: 600;
    color: #94a3b8;
}

.ec360-side-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ec360-side-icons a {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

.ec360-side-icons a:hover {
    background: #22c55e;
    color: #052e16 !important;
}

/* --------------------------------------------------------------------------
   4. FASE IV — CINTILLO SOCIAL EN CATEGORÍAS (fuera y antes de .ast-row)
   -------------------------------------------------------------------------- */
.ec360-cat-strip {
    grid-column: 1 / -1;
    align-self: start;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 22px 0;
    padding: 14px 18px;
    border-radius: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.ec360-cat-strip-copy {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 280px;
    min-width: 0;
}

.ec360-cat-wa-badge {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: #16a34a;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ec360-cat-wa-badge svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
    display: block;
}

.ec360-cat-strip-text strong {
    display: block;
    font-size: 14.5px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

.ec360-cat-strip-text small {
    display: block;
    font-size: 12.5px;
    color: #334155;
    line-height: 1.4;
}

.ec360-cat-strip-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ec360-cat-btn-wa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    border-radius: 999px;
    background: #15803d;
    color: #ffffff !important;
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none !important;
}

.ec360-cat-btn-wa:hover {
    background: #166534;
    color: #ffffff !important;
}

.ec360-cat-net-ico {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

.ec360-cat-net-ico svg {
    fill: currentColor;
    display: block;
}

.ec360-cat-net-ico:hover {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   5. FASE V — HEADER, MENÚ MÓVIL Y DRAWER (selector estricto nav.elementor-nav-menu--dropdown.elementor-nav-menu__container)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    header.elementor-28809 .elementor-element-hdr_nav_widget {
        width: 100% !important;
    }
    header.elementor-28809 .elementor-element-hdr_navmenu_bar {
        position: relative !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    header.elementor-28809 .elementor-element-hdr_nav_widget .elementor-menu-toggle {
        margin: 6px auto !important;
        padding: 8px 14px !important;
    }
    header.elementor-28809 nav.elementor-nav-menu--dropdown.elementor-nav-menu__container {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        margin-top: 0 !important;
        background: #0f172a !important;
        border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.35) !important;
        z-index: 9995 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: none !important;
        transition: opacity 0.2s ease, max-height 0.25s ease !important;
    }
    header.elementor-28809 .elementor-menu-toggle.elementor-active ~ nav.elementor-nav-menu--dropdown.elementor-nav-menu__container {
        max-height: calc(100vh - var(--ec360-hdr-h, 110px)) !important;
        overflow-y: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        padding: 8px 0 14px !important;
    }
    header.elementor-28809 nav.elementor-nav-menu--dropdown.elementor-nav-menu__container .elementor-item {
        color: #f8fafc !important;
        padding: 11px 20px !important;
        font-size: 14.5px !important;
        font-weight: 700 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }
    header.elementor-28809 nav.elementor-nav-menu--dropdown.elementor-nav-menu__container .elementor-item:hover,
    header.elementor-28809 nav.elementor-nav-menu--dropdown.elementor-nav-menu__container .elementor-item.elementor-item-active {
        background: #dc2626 !important;
        color: #ffffff !important;
    }
}

@media (max-width: 768px) {
    /* Header sticky móvil compacto: ocupa espacio en flujo inicial (CLS 0) y se fija al hacer scroll */
    header.elementor-28809 {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 9990 !important;
        background: #ffffff !important;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12) !important;
    }
    body.admin-bar header.elementor-28809 {
        top: 46px !important;
    }

    /* Compactar topbar y masthead en móvil para reducir altura total del header */
    header.elementor-28809 .elementor-element-hdr_topbar {
        display: none !important;
    }
    header.elementor-28809 .elementor-element-hdr_masthead {
        --padding-top: 8px !important;
        --padding-bottom: 8px !important;
        --padding-left: 12px !important;
        --padding-right: 12px !important;
        --gap: 6px !important;
        --row-gap: 4px !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    header.elementor-28809 .elementor-element-hdr_mast_left {
        display: none !important;
    }
    header.elementor-28809 .elementor-element-hdr_mast_center {
        width: auto !important;
        flex: 1 1 auto !important;
        align-items: flex-start !important;
    }
    header.elementor-28809 .elementor-element-hdr_mast_center .e-con-inner {
        padding: 0 !important;
    }
    header.elementor-28809 .elementor-element-hdr_brand_logo {
        text-align: left !important;
    }
    header.elementor-28809 .elementor-element-hdr_brand_logo img {
        width: 185px !important;
        max-width: 100% !important;
        height: auto !important;
    }
    header.elementor-28809 .elementor-element-hdr_mast_right {
        width: auto !important;
        flex: 0 0 auto !important;
        --gap: 0px !important;
        --row-gap: 0px !important;
    }
    header.elementor-28809 .elementor-element-hdr_mast_right .e-con-inner {
        padding: 0 !important;
    }
    header.elementor-28809 .elementor-element-hdr_btn_breaking .elementor-button {
        padding: 7px 10px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }
}
