/* Estilos limitados à área editorial EDUCO. */
/*
 * Sistema visual aprovado, adaptado da referência Modern News à identidade
 * EDUCO e aos componentes dinâmicos do tema WordPress.
 */

.educo-editorial {
    /* Respeita a raiz do visitante, com mínimo legível quando o tema pai usa 10px. */
    --educo-font-unit: max(16px, 1rem);
    --educo-navy: #132743;
    --educo-navy-deep: #0a1c33;
    --educo-blue: #1a3459;
    --educo-orange: #f58220;
    --educo-yellow: #fcd34d;
    --educo-bg: #f4f6f9;
    --educo-surface: #ffffff;
    --educo-text: #1e293b;
    --educo-muted: #64748b;
    --educo-border: #e2e8f0;
    --educo-focus: #00a8e8;
    --educo-shadow: none;
    --educo-radius: 0;
    --educo-container: 1120px;
    --category-clima: #f5a623;
    --category-energia: #f58220;
    --category-eficiencia: #3f7f3b;
    --category-educacao: #14546d;
    --category-comunicacao: #14857c;
}

.educo-editorial {
    color: var(--educo-text);
    background: var(--educo-bg);
    font-size: var(--educo-font-unit);
    font-family: "Plus Jakarta Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.educo-editorial a {
    color: var(--educo-navy-deep);
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.educo-editorial a:hover {
    color: var(--educo-orange);
}

.educo-editorial a:focus-visible, .educo-editorial button:focus-visible, .educo-editorial input:focus-visible, .educo-editorial textarea:focus-visible, .educo-editorial select:focus-visible {
    outline-color: var(--educo-focus);
}

.educo-editorial .site-header {
    color: var(--educo-navy-deep);
    background: #ffffff;
    border-bottom: 1px solid var(--educo-border);
    box-shadow: none;
}

.educo-editorial .header-main {
    min-height: 64px;
}

.educo-editorial .site-branding, .educo-editorial .site-branding:hover {
    color: var(--educo-navy-deep);
}

.educo-editorial .site-branding img {
    width: 38px;
    height: 38px;
}

.educo-editorial .brand-name {
    font-size: calc(0.98 * var(--educo-font-unit));
    letter-spacing: 0;
}

.educo-editorial .brand-tagline {
    color: var(--educo-muted);
    font-size: calc(0.64 * var(--educo-font-unit));
}

.educo-editorial .primary-navigation ul {
    gap: 16px;
}

.educo-editorial .primary-navigation a {
    position: relative;
    padding: 22px 0 19px;
    color: var(--educo-navy-deep);
    border-radius: 0;
    font-size: calc(0.7 * var(--educo-font-unit));
    letter-spacing: 0;
    text-transform: none;
}

.educo-editorial .primary-navigation a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--educo-orange);
    border-radius: 0;
    opacity: 0;
    transform: scaleX(0.5);
    transition: opacity 180ms ease, transform 180ms ease;
}

.educo-editorial .primary-navigation a:hover, .educo-editorial .primary-navigation .current-menu-item > a, .educo-editorial .primary-navigation .current_page_item > a {
    color: var(--educo-orange);
    background: transparent;
}

.educo-editorial .primary-navigation a:hover::after, .educo-editorial .primary-navigation .current-menu-item > a::after, .educo-editorial .primary-navigation .current_page_item > a::after {
    opacity: 1;
    transform: scaleX(1);
}

.educo-editorial .news-ticker {
    color: var(--educo-text);
    background: #ffffff;
    border-bottom: 1px solid var(--educo-border);
}

.educo-editorial .ticker-date {
    color: var(--educo-muted);
}

.educo-editorial .ticker-label {
    background: var(--educo-orange);
    border-radius: 0;
}

.educo-editorial .ticker-story {
    color: var(--educo-navy-deep);
}

.educo-editorial .ticker-story:hover {
    color: var(--educo-orange);
    text-decoration-color: var(--educo-orange);
}

.educo-editorial {
    padding-block: 28px 58px;
}

.educo-editorial .news-layout, .educo-editorial .single-layout {
    grid-template-columns: minmax(175px, 0.72fr) minmax(0, 2.2fr) minmax(205px, 0.82fr);
    gap: 18px;
}

.educo-editorial .content-panel, .educo-editorial .sidebar-panel, .educo-editorial .hero-story, .educo-editorial .post-card, .educo-editorial .archive-card, .educo-editorial .article-main {
    background: var(--educo-surface);
    border-color: var(--educo-border);
    border-radius: var(--educo-radius);
    box-shadow: var(--educo-shadow);
}

.educo-editorial .sidebar-panel {
    overflow: hidden;
    border-top: 0;
    padding: 15px;
}

.educo-editorial .sidebar-panel::before {
    display: none;
}

.educo-editorial .sidebar-title, .educo-editorial .section-title {
    color: var(--educo-navy-deep);
    font-weight: 700;
}

.educo-editorial .section-title::after {
    border-radius: 0;
    background: linear-gradient(90deg, var(--educo-orange) 0 42px, var(--educo-border) 42px);
}

.educo-editorial .sidebar-title {
    font-size: calc(1 * var(--educo-font-unit));
}

.educo-editorial .compact-story, .educo-editorial .category-list li {
    border-color: var(--educo-border);
}

.educo-editorial .compact-story img, .educo-editorial .compact-placeholder {
    border-radius: 0;
}

.educo-editorial .compact-story {
    grid-template-columns: 72px 1fr;
    gap: 10px;
    padding-block: 11px;
}

.educo-editorial .compact-story img, .educo-editorial .compact-placeholder {
    width: 72px;
    height: 52px;
}

.educo-editorial .compact-story h3 {
    font-size: calc(0.77 * var(--educo-font-unit));
}

/* Notícias laterais aprovadas em pares de minicards. */
.educo-editorial .sidebar-panel > .compact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 9px;
}

.educo-editorial .sidebar-panel .compact-story, .educo-editorial .sidebar-panel .compact-story:first-child {
    display: block;
    min-width: 0;
    padding: 0 0 10px;
    border-top: 0;
    border-bottom: 1px solid var(--educo-border);
}

.educo-editorial .sidebar-panel .compact-story > a {
    display: block;
    margin-bottom: 7px;
}

.educo-editorial .sidebar-panel .compact-story img, .educo-editorial .sidebar-panel .compact-placeholder {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.educo-editorial .sidebar-panel .compact-story h3 {
    margin-bottom: 5px;
    font-size: calc(0.68 * var(--educo-font-unit));
    line-height: 1.32;
}

.educo-editorial .sidebar-panel .compact-story .story-date {
    font-size: calc(0.62 * var(--educo-font-unit));
}

.educo-editorial .hero-story {
    overflow: hidden;
    padding: 12px;
    border-top: 0;
}

.educo-editorial .hero-story::before {
    display: none;
}

.educo-editorial .post-image-link {
    border-radius: 0;
}

.educo-editorial .hero-story .post-image-link {
    border-radius: 0;
}

.educo-editorial .post-card {
    transition: none;
}

.educo-editorial .post-card:hover {
    box-shadow: none;
    transform: none;
}

.educo-editorial .post-card > .post-image-link {
    border-radius: 0;
}

.educo-editorial .post-category {
    --category-accent: var(--educo-orange);
    display: inline-block;
    padding: 0;
    color: var(--category-accent);
    background: transparent;
    line-height: 1.2;
}

.educo-editorial .post-category-clima {
    --category-accent: var(--category-clima);
}

.educo-editorial .post-category-energia {
    --category-accent: var(--category-energia);
}

.educo-editorial .post-category-eficiencia-energetica {
    --category-accent: var(--category-eficiencia);
    color: var(--category-accent);
}

.educo-editorial .post-category-educacao {
    --category-accent: var(--category-educacao);
    color: var(--category-accent);
}

.educo-editorial .post-category-comunicacao {
    --category-accent: var(--category-comunicacao);
    color: var(--category-accent);
}

/* Compatibilidade com categorias usadas antes da nova paleta editorial. */
.educo-editorial .post-category-ambiente {
    --category-accent: var(--category-eficiencia);
    color: var(--category-accent);
}

.educo-editorial .post-category-esg {
    --category-accent: var(--category-comunicacao);
    color: var(--category-accent);
}

.educo-editorial .story-summary {
    color: var(--educo-muted);
}

.educo-editorial .page-numbers {
    border-radius: 0;
    box-shadow: none;
}

.educo-editorial .page-numbers.current, .educo-editorial .page-numbers:hover {
    background: var(--educo-orange);
    border-color: var(--educo-orange);
}

.educo-editorial .advertising-slot {
    min-height: 104px;
    color: var(--educo-muted);
    background: #ffffff;
    border-color: var(--educo-border);
    border-radius: var(--educo-radius);
    box-shadow: none;
}

.educo-editorial .advertising-label {
    color: var(--educo-muted);
}

.educo-editorial .newsletter-panel {
    color: var(--educo-text);
    background: #ffffff;
    border-top: 0;
}

.educo-editorial .newsletter-panel::before {
    display: none;
}

.educo-editorial .newsletter-panel .sidebar-title {
    color: var(--educo-navy-deep);
}

.educo-editorial .newsletter-panel p {
    color: var(--educo-muted);
}

.educo-editorial .newsletter-status {
    color: var(--educo-text);
    background: #f8fafc;
}

.educo-editorial .breadcrumbs {
    color: var(--educo-muted);
}

.educo-editorial .article-main {
    overflow: hidden;
}

.educo-editorial .article-title {
    color: var(--educo-navy-deep);
    letter-spacing: -0.025em;
    font-size: clamp(calc(2 * var(--educo-font-unit)), 3.2vw, calc(2.55 * var(--educo-font-unit)));
}

.educo-editorial .article-main {
    padding: clamp(22px, 3.4vw, 34px);
}

.educo-editorial .article-content {
    font-size: calc(1 * var(--educo-font-unit));
}

.educo-editorial .article-featured img, .educo-editorial .article-featured .post-placeholder {
    border-radius: 0;
}

.educo-editorial .article-content blockquote {
    background: #f8fafc;
    border-left-color: var(--educo-orange);
    border-radius: 0;
}

.educo-editorial .post-navigation a {
    border-radius: 0;
}

.educo-editorial .site-footer {
    background: var(--educo-navy-deep);
    border-top: 0;
}

.educo-editorial .footer-bottom {
    background: #071426;
}

@media (max-width: 1080px) {
    .educo-editorial .news-layout, .educo-editorial .single-layout {
        grid-template-columns: minmax(0, 2fr) minmax(210px, 0.82fr);
    }

    .educo-editorial .news-layout > .sidebar-stack:first-child, .educo-editorial .single-layout > .sidebar-stack:first-child {
        display: none;
    }
}

@media (max-width: 820px) {
    .educo-editorial .menu-toggle {
        color: var(--educo-navy-deep);
        border-color: var(--educo-border);
        border-radius: 0;
    }

    .educo-editorial .primary-navigation ul {
        gap: 2px;
    }

    .educo-editorial .primary-navigation a {
        padding: 10px 4px;
        color: var(--educo-navy-deep);
    }

    .educo-editorial .primary-navigation a::after {
        right: auto;
        bottom: 4px;
        width: 42px;
    }

    .educo-editorial .news-layout, .educo-editorial .single-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .educo-editorial .news-layout > .sidebar-stack:last-child, .educo-editorial .single-layout > .sidebar-stack:last-child {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .educo-editorial .article-main {
        grid-row: 1;
    }
}

@media (max-width: 600px) {
    .educo-editorial .header-main {
        min-height: 68px;
    }

    .educo-editorial .site-branding img {
        width: 38px;
        height: 38px;
    }

    .educo-editorial .brand-name {
        font-size: calc(1 * var(--educo-font-unit));
    }

    .educo-editorial .hero-story {
        padding: 12px;
    }

    .educo-editorial .news-layout > .sidebar-stack:last-child, .educo-editorial .single-layout > .sidebar-stack:last-child {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Laterais mais legíveis em ecrãs largos. */
@media (min-width: 1081px) {
    .educo-editorial.home, .educo-editorial.single {
        --educo-container: 1360px;
    }

    .educo-editorial.home .news-layout, .educo-editorial.single .single-layout {
        grid-template-columns: minmax(230px, 1fr) minmax(0, 700px) minmax(230px, 1fr);
    }

    .educo-editorial.home .sidebar-panel .compact-story h3, .educo-editorial.single .sidebar-panel .compact-story h3 {
        font-size: calc(0.8 * var(--educo-font-unit));
    }
}

/* A leitura independente aplica-se apenas a ecrãs grandes e com altura suficiente. */
@media (min-width: 1200px) and (min-height: 700px) {
    .educo-editorial.single .article-main {
        max-height: calc(100vh - 180px);
        overflow-y: auto;
        scrollbar-gutter: stable;
    }

    .educo-editorial.single .article-main:focus-visible {
        outline: 3px solid var(--educo-focus);
        outline-offset: 2px;
    }
}

/* Datas e títulos dos minicards mantêm leitura confortável. */
.educo-editorial .post-meta,
.educo-editorial .sidebar-panel .compact-story .story-date {
    font-size: calc(0.8 * var(--educo-font-unit));
}
.educo-editorial .sidebar-panel .compact-story h3 {
    font-size: calc(0.85 * var(--educo-font-unit));
}
