/*
Theme Name: ECT Portal
Theme URI: https://www.ect.ufrn.br
Author: ECT/UFRN
Description: Tema da Escola de Ciencias e Tecnologia da UFRN, com layout inspirado no portal IFRN e no site da SAB. Identidade azul UFRN/ECT, barra de acessibilidade (modo escuro e alto contraste), navegacao em mega-menu e rodape azul-marinho.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ect-portal
Tags: accessibility-ready, custom-menu, custom-logo, featured-images, rtl-language-support
*/

:root {
    --primary: #2d5696;
    --primary-500: #456eae;
    --primary-600: #244a82;
    --primary-650: #1e3d6b;
    --primary-800: #142a4d;
    --primary-900: #0b1b35;
    --primary-100: #e6ecf7;
    --primary-50: #f3f6fb;
    --navy: #0b1b35;
    --white: #ffffff;
    --bg: #ffffff;
    --bg-alt: #f2f5fa;
    --text: #2b3440;
    --muted: #5a6472;
    --border: #dbe2ee;
    --border-strong: #c3cfe4;
    --green: #0d9078;
    --green-100: #dff5f0;
    --yellow: #e9a319;
    --yellow-100: #fdf3dd;
    --blue-info: #1f71ad;
    --danger: #b3261e;
    --radius: 20px;
    --radius-sm: 8px;
    --radius-pill: 25px;
    --shadow: 0 2px 10px rgba(11, 27, 53, .08);
    --shadow-lg: 0 12px 32px rgba(11, 27, 53, .14);
    --font-sans: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --header-h: 68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--navy); }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

#conteudo { flex: 1 0 auto; }

img { max-width: 100%; height: auto; }

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-500); }

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .5em;
    line-height: 1.22;
    color: var(--primary-800);
    font-weight: 700;
}

.container { max-width: 1280px; margin: 0 auto; padding: 24px; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Barra do Governo ---------- */
/* ---------- Topbar ---------- */
.topbar {
    background: linear-gradient(100deg, var(--primary-650) 0%, var(--primary) 55%, var(--primary-600) 100%);
    color: #fff;
}
.topbar__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar__spacer { flex: 1 1 0; }
.topbar__brand { display: flex; align-items: center; justify-content: flex-start; gap: 14px; flex: 0 0 auto; min-width: 0; color: #fff; }
.topbar__brand img { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.12); object-fit: contain; flex-shrink: 0; }
.topbar__brand-text { line-height: 1.15; min-width: 0; }
.topbar__brand-text strong { display: block; font-size: 18px; font-weight: 800; letter-spacing: .3px; color: #fff; }
.topbar__brand-text u { display: block; text-decoration: none; font-size: 12.5px; opacity: 1; font-weight: 500; color: #fff; }
.topbar__actions { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: nowrap; }
@media (max-width: 1000px) {
    .topbar__inner { flex-wrap: wrap; row-gap: 10px; }
    .topbar__spacer { display: none; }
    .topbar__brand { flex: 1 1 100%; justify-content: center; text-align: center; }
    .topbar__brand-text { text-align: center; }
    .topbar__actions { flex: 1 1 100%; justify-content: center; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.25); }
}

.ctrl-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 25px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.ctrl-btn:hover { background: rgba(255,255,255,.14); }
.ctrl-btn--active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(255,255,255,.35); }

.social-row { display: flex; gap: 6px; }
.social-row a {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    color: #fff; font-size: 15px;
}
.social-row a:hover { background: #fff; color: var(--primary-650); }

/* ---------- Navegacao ---------- */
.mainnav { background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 200; }
.mainnav__inner { max-width: 1280px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; min-height: 58px; gap: 12px; }
.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; flex: 1 1 auto; gap: 2px; }
.mainnav ul li { position: relative; }
.mainnav ul a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 14px;
    color: var(--primary-800);
    font-size: 15px;
    font-weight: 600;
}
.mainnav ul a:hover, .mainnav ul li:hover > a { color: var(--primary); background: var(--primary-50); }
.mainnav ul ul {
    position: absolute;
    top: 100%; left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    align-items: stretch;
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s, visibility .2s;
    z-index: 300;
}
.mainnav ul li:hover > ul, .mainnav ul li:focus-within > ul { visibility: visible; opacity: 1; transform: translateY(0); }
.mainnav ul ul a { padding: 10px 16px; font-weight: 500; font-size: 14px; width: 100%; border-left: 3px solid transparent; }
.mainnav ul ul a:hover { background: var(--primary-50); border-left-color: var(--primary); }
.mainnav ul ul ul { top: 0; left: 100%; }
.mainnav ul li.is-flip > ul { left: auto; right: 0; }
.mainnav ul li.is-flip > ul ul { left: auto; right: 100%; }
.mainnav .menu-item-has-children > a::after {
    content: "\f107";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
    opacity: .7;
}

/* Busca na navegacao */
.nav-search { margin-left: auto; display: flex; align-items: center; }
.nav-search form { position: relative; }
.nav-search input {
    height: 38px;
    width: 220px;
    border: 1px solid var(--border-strong);
    border-radius: 25px;
    padding: 0 40px 0 16px;
    font: inherit;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: width .25s, border-color .25s;
}
.nav-search input:focus { width: 280px; border-color: var(--primary); }
.nav-search button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font-size: 15px;
    padding: 6px 10px;
}

/* Busca compacta: abaixo de 1000px vira apenas um ícone */
.nav-search__toggle { display: none; }
@media (max-width: 1000px) {
    .nav-search__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border: 1px solid var(--border-strong);
        border-radius: 50%;
        background: transparent;
        color: var(--primary);
        cursor: pointer;
        font-size: 15px;
    }
    .nav-search form { display: none; }
    .nav-search.is-open .nav-search__toggle { display: none; }
    .nav-search.is-open form { display: block; }
}

/* Hamburger mobile */
.nav-toggle { display: none; }
.ect-menu-toggle { display: none; }
.nav-toggle {
    place-items: center;
    width: 42px; height: 42px;
    margin-right: auto;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 20px;
    color: var(--primary);
}

/* Busca no mobile (fora do menu) */
.mainnav__search { display: none; position: relative; }
.mainnav__search input:focus { outline: none; }

/* ---------- Botoes ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font: inherit; font-weight: 700; font-size: 15px;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--primary-650); border-color: var(--primary-650); color: #fff; }
.btn--outline { background: transparent; color: var(--primary); }
.btn--outline:hover { background: var(--primary); color: #fff; }
.btn--lg { padding: 16px 34px; border-radius: 12px; font-size: 16px; }
.events-all { text-align: center; }

/* ---------- Section header ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 22px; }
.section-head h2 { font-size: 2rem; font-weight: 800; margin: 0; position: relative; padding-bottom: 10px; }
.section-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 3px; background: var(--primary); }
.section-head .btn { flex-shrink: 0; padding: 9px 20px; border-width: 1.5px; font-size: 14px; }

.section { padding: 16px 24px; }
.section--alt { background: var(--bg-alt); }
.section--dark {
    background: linear-gradient(160deg, var(--navy) 0%, var(--primary-800) 100%);
    color: #cfe0f7;
}
.section--dark .section-head h2 { color: #fff; }
.section--dark .section-head h2::after { background: var(--yellow); }
.section--dark .btn--outline { color: #fff; border-color: rgba(255,255,255,.6); }
.section--dark .btn--outline:hover { background: #fff; color: var(--navy); border-color: #fff; }

/* ---------- Hero ---------- */
.hero-page {
    background: linear-gradient(100deg, var(--primary-800) 0%, var(--primary) 60%, var(--primary-500) 100%);
    color: #fff;
    padding: 16px 0;
}
.hero-page .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.hero-page__head { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; width: 100%; }
.hero-page h1 { color: #fff; font-size: 2.4rem; font-weight: 800; margin: 0; }
.hero-page .crumb a { color: #cfe0f7; }
.hero-page .crumb a:hover { color: #fff; }

/* ---------- Hero carousel ---------- */
.hero {
    position: relative;
    background: var(--navy);
    min-height: 480px;
    overflow: hidden;
}
.hero .slides { position: relative; height: 100%; min-height: 480px; }
.hero .slide {
    position: absolute; inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .8s, visibility .8s;
    display: flex;
    align-items: flex-end;
}
.hero .slide.is-active { opacity: 1; visibility: visible; }
.hero .slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,27,53,.25) 0%, rgba(11,27,53,.55) 45%, rgba(11,27,53,.88) 100%); }
.hero .slide__content { position: relative; z-index: 2; max-width: 760px; padding: 48px 24px 56px; }
.hero .slide__title { color: #fff; font-size: clamp(1.6rem, 3.2vw, 2.6rem); font-weight: 800; margin: 0 0 10px; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.hero .slide__title a { color: #fff; }
.hero .slide__title a:hover { color: var(--yellow); }
.hero .slide__excerpt { color: #e6eefb; font-size: 1.05rem; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.hero .slide__excerpt p { margin: 0; }
.hero .arrows { position: absolute; right: 24px; bottom: 34px; z-index: 5; display: flex; gap: 8px; }
.hero .arrows button {
    width: 46px; height: 46px;
    border: 2px solid rgba(255,255,255,.6);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background .2s;
}
.hero .arrows button:hover { background: #fff; color: var(--navy); }
.hero .dots { position: absolute; left: 24px; bottom: 40px; z-index: 5; display: flex; gap: 8px; }
.hero .dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; transition: background .2s, transform .2s; }
.hero .dots span.is-active { background: #fff; transform: scale(1.25); }

/* ---------- Banner informativo ---------- */
.info-banner {
    background: linear-gradient(90deg, var(--green) 0%, #0d9068 100%);
    color: #fff;
    text-align: center;
    padding: 12px 16px;
    position: relative;
}
.info-banner h5 { color: #fff; margin: 0; font-size: 1rem; font-weight: 700; }
.info-banner a { color: #fff; }
.info-banner a:hover { text-decoration: underline; }
.info-banner .close { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #fff; cursor: pointer; font-size: 18px; }

/* ---------- Atalhos ---------- */
.shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.shortcut {
    display: flex; align-items: center; gap: 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    min-height: 92px;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.shortcut:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.shortcut i { font-size: 22px; color: var(--primary); width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-100); flex-shrink: 0; }
.shortcut strong { display: block; font-size: 15px; color: var(--primary-800); line-height: 1.25; }
.shortcut small { color: var(--muted); font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- News grid / cards ---------- */
.cards-grid { display: grid; gap: 20px; }
.cards-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cards-grid--2 { grid-template-columns: repeat(2, 1fr); }

.card-news {
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    min-width: 0;
}
.card-news:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-news__media { aspect-ratio: 16 / 7.5; overflow: hidden; }
.card-news__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card-news:hover .card-news__media img { transform: scale(1.06); }
.card-news__body { padding: clamp(10px, 1.2vw, 14px); display: flex; flex-direction: column; gap: clamp(4px, 0.8vw, 6px); flex: 1; min-width: 0; }
.card-news__date { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.card-news__title { font-size: clamp(0.95rem, 1.35vw, 1.08rem); font-weight: 700; line-height: 1.3; color: var(--primary-800); }
.card-news__title a { color: inherit; }
.card-news__title a:hover { color: var(--primary); }
.card-news__text {
    color: var(--muted); font-size: 13.5px; line-height: 1.45; margin: 4px 0;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-news__more { margin-top: auto; align-self: flex-start; color: var(--primary); font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.card-news__more i { transition: transform .2s; font-size: 12px; }
.card-news__more:hover { text-decoration: underline; }
.card-news__more:hover i { transform: translateX(3px); }

/* ---------- Listas / items ---------- */
.items { display: grid; gap: 16px; }
.items li { list-style: none; }
.item-row {
    display: flex; align-items: center; gap: 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    transition: border-color .2s, box-shadow .2s;
    flex-wrap: wrap;
}
.item-row:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.item-row__title { flex: 1; min-width: 220px; font-weight: 600; color: var(--primary-800); }
.item-row__title a { color: inherit; }
.item-row__title a:hover { color: var(--primary); }
.item-row__meta { font-size: 13.5px; color: var(--muted); }

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 25px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.badge--open { background: var(--green-100); color: var(--green); }
.badge--closed { background: var(--yellow-100); color: #8a6a00; }
.badge--ongoing { background: var(--primary-100); color: var(--primary); }
.badge--end { background: #eee; color: var(--muted); }

/* ---------- Events / calendar icon ---------- */
.events-column { display: flex; flex-direction: column; gap: 18px; }
.event-card { display: flex; gap: clamp(12px, 1.4vw, 16px); align-items: flex-start; min-width: 0; }
.calendar-icon {
    flex-shrink: 0;
    width: 85px;
    text-align: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #fff;
    border: 1px solid var(--border);
}
.calendar-icon strong { display: block; background: var(--primary); color: #fff; font-size: 12px; text-transform: uppercase; padding: 4px 0; letter-spacing: .3px; white-space: nowrap; }
.calendar-icon span { display: block; font-size: 24px; font-weight: 800; color: var(--primary-800); padding: 6px 0; }
.event-card__body { min-width: 0; }
.event-card__body .event-link { font-weight: 700; color: var(--primary-800); font-size: clamp(0.93rem, 1.3vw, 1.02rem); line-height: 1.25; overflow-wrap: break-word; }
.event-card__body .event-link a { color: inherit; }
.event-card__body .event-link a:hover { color: var(--primary); }
.event-card__body .event-loc { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.event-card__body .event-loc i { color: var(--primary); margin-right: 5px; }

/* Aside estreito: encolhe ícone do calendário e paddings para o texto respirar */
.layout-home > aside { container-type: inline-size; }
@container (max-width: 300px) {
    .widget-box { padding: 16px; }
    .event-card { gap: 10px; }
    .calendar-icon { width: 66px; }
    .calendar-icon strong { font-size: 9px; }
    .calendar-icon span { font-size: 20px; padding: 5px 0; }
}

/* ---------- Videos ---------- */
.videos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.video-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}
.video-card iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Stats (SAB touch) ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; text-align: center; }
.stat { padding: 26px 18px; border-radius: var(--radius); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); }
.stat i { font-size: 30px; color: var(--yellow); margin-bottom: 8px; }
.stat strong { display: block; font-size: 2rem; font-weight: 800; color: #fff; }
.stat span { font-size: 14px; color: #cfe0f7; }

/* ---------- Tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tabs .tab {
    padding: 10px 20px;
    border: 1.5px solid var(--border-strong);
    border-radius: 25px;
    background: #fff;
    color: var(--primary-800);
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.tabs .tab.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tabpanel { display: none; }
.tabpanel.is-active { display: block; animation: fadeIn .35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; min-width: 640px; }
table.data th, table.data td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
table.data thead th { background: var(--primary); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .2px; }
table.data tbody tr:nth-child(even) { background: var(--primary-50); }
table.data tbody tr:hover { background: var(--primary-100); }
table.data tbody td a { font-weight: 600; }

/* ---------- Acordeao FAQ ---------- */
.faq-search { width: 100%; max-width: 520px; margin-bottom: 26px; position: relative; }
.faq-search input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border-strong);
    border-radius: 25px;
    padding: 0 46px 0 18px;
    font: inherit; font-size: 15px;
    outline: none;
}
.faq-search i { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--primary); }
.accordion { display: flex; flex-direction: column; gap: 12px; }
.acc-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.acc-head {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 20px;
    background: var(--primary);
    color: #fff;
    border: 0;
    font: inherit;
    font-weight: 700;
    font-size: 15.5px;
    text-align: left;
    cursor: pointer;
}
.acc-head i { transition: transform .25s; }
.acc-item.is-open .acc-head i { transform: rotate(180deg); }
.acc-body { display: none; padding: 18px 20px; }
.acc-item.is-open .acc-body { display: block; }
.acc-group { border-top: 1px dashed var(--border); padding-top: 14px; margin-top: 14px; }

/* ---------- Paginacao ---------- */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 34px 0; flex-wrap: wrap; }
.pagination .page-numbers {
    min-width: 42px; height: 42px;
    display: grid; place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 0 12px;
    color: var(--primary-800);
    font-weight: 600;
    transition: background .2s, color .2s;
}
.pagination .page-numbers:hover, .pagination .page-numbers.current { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Breadcrumb ---------- */
.crumb { font-size: 14px; color: #cfe0f7; display: flex; flex-wrap: wrap; gap: 8px; }
.crumb a { color: #cfe0f7; }
.crumb a:hover { color: #fff; text-decoration: underline; }
.crumb .sep { opacity: .7; }
.crumb [aria-current="page"] { color: #fff; }

/* ---------- Layout de artigo/pagina ---------- */
.article { max-width: 100%; }
.article-title { font-size: 2rem; font-weight: 800; color: var(--primary-800); }
.post-meta { color: var(--muted); font-size: 14px; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.post-meta i { color: var(--primary); }
.post-meta a { color: var(--primary); }
.post-meta__author, .post-meta__date, .post-meta__reading { display: inline-flex; align-items: center; gap: 7px; }
.post-meta__author { font-size: 15px; font-weight: 700; color: #fff; background: var(--primary-800); padding: 5px 14px; border-radius: 999px; }
.post-meta__author i { color: #fff; }
.post-meta__author a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.post-meta__author a:hover { color: var(--yellow); }
.article-content { font-size: 1.02rem; text-align: justify; }
.article-content blockquote { border-left: 4px solid var(--primary); margin: 22px 0; padding: 8px 22px; background: var(--primary-50); }
.article-content h2, .article-content h3 { margin-top: 1.4em; }
.article-content table { width: 100%; border-collapse: collapse; margin: 22px 0; }
.article-content table th, .article-content table td { border: 1px solid var(--border-strong); padding: 10px 14px; }
.article-content table thead th { background: var(--primary-100); }
.article-content img { border-radius: var(--radius-sm); max-width: 100%; height: auto; }
.article-content img.alignleft, .article-content .alignleft img { float: left; margin: 6px 22px 12px 0; max-width: 50%; }
.article-content img.alignright, .article-content .alignright img { float: right; margin: 6px 0 12px 22px; max-width: 50%; }
.article-content .aligncenter { display: block; margin-left: auto; margin-right: auto; clear: both; }
.article-content figure { margin: 22px 0; }
.article-content figure img { margin: 0 auto; }
.article-content a:hover { text-decoration: underline; }
.article-content .alert, .article-content .wp-block-alert {
    background: var(--primary-50);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    margin: 20px 0;
}
.article-content .wp-caption { max-width: 100% !important; }
.wp-caption-text, figcaption { color: var(--muted); font-size: 13.5px; text-align: center; padding: 6px 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 22px 0; }
.gallery a { display: block; border-radius: var(--radius-sm); overflow: hidden; }
.gallery a img { transition: transform .3s; }
.gallery a:hover img { transform: scale(1.06); }

/* ---------- Tags ---------- */
.tags-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.tags-row a {
    padding: 6px 16px;
    background: var(--primary-100);
    color: var(--primary);
    border-radius: 25px;
    font-size: 13.5px;
    font-weight: 600;
}
.tags-row a:hover { background: var(--primary); color: #fff; }

/* ---------- Formularios ---------- */
.form-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 13px; font-weight: 700; color: var(--muted); }
.field input, .field select {
    height: 46px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    font: inherit; font-size: 15px;
    background: #fff;
    color: var(--text);
    outline: none;
    min-width: 220px;
}
.field input:focus, .field select:focus { border-color: var(--primary); }
.field--grow { flex: 1; }
.field--grow input { width: 100%; }

/* ---------- Servidores ---------- */
.members-list { display: flex; flex-direction: column; gap: 12px; }
.membro {
    display: flex; align-items: center; gap: 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}
.membro__nome { font-weight: 700; color: var(--primary-800); flex: 1; min-width: 200px; }
.membro__detalhes { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.membro__detalhes a { color: var(--primary); }
.membro__detalhes svg { width: 20px; height: 20px; }

/* ---------- Sidebar home ---------- */
.layout-home { display: grid; grid-template-columns: minmax(0, 1fr) clamp(240px, 25vw, 360px); gap: clamp(24px, 3vw, 40px); align-items: start; }
.widget-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 22px; }
.widget-box h3 { font-size: 1.15rem; border-bottom: 3px solid var(--primary); padding-bottom: 8px; margin-bottom: 16px; }

/* ---------- Feed do Instagram (slider estilo antigo) ---------- */
.widget-box .fts-instagram-profile-wrap { padding: 0; margin: 0; }
.widget-box .fts-instagram-profile-wrap .fts-profile-pic {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px 0;
    max-height: none;
    max-width: none;
    position: relative;
}
.widget-box .fts-instagram-profile-wrap .fts-profile-pic img {
    max-width: 60px !important;
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    flex: 0 0 auto;
}
.widget-box .fts-instagram-profile-wrap .profile-insta-name {
    position: static;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-800);
    text-decoration: none;
}
.widget-box .fts-instagram-profile-wrap .profile-insta-name:hover { text-decoration: underline; }
.widget-box .fts-instagram-profile-wrap .fts-profile-name-wrap { font-size: 16px; margin-bottom: 0; letter-spacing: 2px; line-height: 28px; text-align: center; }
.widget-box .fts-instagram-profile-wrap .fts-profile-description { font-size: 15px; line-height: 22px; text-align: justify; }

.widget-box [id^="feed_dynamic_class"][id$="business"] {
    position: relative; overflow: hidden; display: block !important;
}
.slider-track { display: flex; transition: transform 0.5s ease; }
.widget-box [id^="feed_dynamic_class"][id$="business"] .slicker-instagram-placeholder {
    min-width: 100% !important;
    margin: 0 !important;
    aspect-ratio: 4 / 5;
    height: auto !important;
    background-size: cover !important;
    background-position: center !important;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
}
.widget-box .slider-btn { display: flex; }
.widget-box .slider-btn,
[id^="feed_dynamic_class"][id$="business"] .slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6); color: #fff; border: none;
    width: 40px; height: 40px; cursor: pointer; z-index: 9999;
    font-size: 22px; border-radius: 50%;
    align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}
.widget-box [id^="feed_dynamic_class"][id$="business"]:hover .slider-btn,
[id^="feed_dynamic_class"][id$="business"]:hover .slider-btn { opacity: 1; visibility: visible; }
.slider-btn:hover { background: rgba(0, 0, 0, 0.85); transform: translateY(-50%) scale(1.08); }
.slider-prev { left: 10px; }
.slider-next { right: 10px; }
.widget-box .fts-share-wrap,
.widget-box .slicker-instagram-placeholder .inline-block,
.widget-box [id^="feed_dynamic_class"][id$="business"] .slicker-instaG-backg-link,
.widget-box [id^="feed_dynamic_class"][id$="business"] .slicker-date { display: none !important; }

/* ---------- Rodape ---------- */
.footer {
    background: linear-gradient(165deg, var(--navy) 0%, var(--primary-800) 75%, var(--primary-650) 100%);
    color: #cddcf4;
}
.footer__top { max-width: 1280px; margin: 0 auto; padding: 52px 24px 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; }
.footer h3 { color: #fff; font-size: 1rem; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; margin-bottom: 16px; position: relative; padding-bottom: 8px; }
.footer h3::after { content: ""; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; border-radius: 2px; background: var(--yellow); }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer ul li::before { content: "\f105"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 12px; color: var(--yellow); margin-right: 10px; }
.footer a { color: #cddcf4; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__bar {
    border-top: 1px solid rgba(255,255,255,.14);
    max-width: 1280px; margin: 0 auto;
    padding: 26px 24px 30px;
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.footer__bar img { width: 46px; height: 46px; border-radius: 50%; }
.footer__brand strong { display: block; color: #fff; font-size: 15px; }
.footer__brand span { font-size: 13px; color: #9db6df; }
.footer__copy { margin-left: auto; font-size: 13.5px; color: #9db6df; }
.footer__copy i { color: var(--yellow); }

.back-to-top {
    position: fixed;
    right: 22px; bottom: 22px;
    width: 46px; height: 46px;
    border: 0; border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s, transform .25s, visibility .25s, background .2s;
    z-index: 150;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--primary-650); }

/* ---------- Accesibilidade ---------- */
.acc-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
@media (max-width: 991px) {
    .cards-grid--3, .videos-grid { grid-template-columns: repeat(2, 1fr); }
    .footer__top { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
    .layout-home { grid-template-columns: 1fr; }
    .layout-home > aside { padding-top: 0; }
}
@media (max-width: 767px) {
    .cards-grid--3, .videos-grid { grid-template-columns: 1fr; }
    .cards-grid--2 { gap: 14px; }
    .footer__top { grid-template-columns: 1fr; }
    .topbar__inner { padding: 12px 16px; }
    .topbar__brand { flex: 1 1 100%; justify-content: center; text-align: center; }
    .topbar__brand-text { text-align: center; }
    .topbar__actions .ctrl-btn { width: 38px; height: 38px; padding: 0; border-radius: 50%; justify-content: center; gap: 0; font-size: 15px; }
    .topbar__actions .ctrl-btn span { display: none; }
    .nav-search { display: none; }
    .nav-toggle { display: grid; }
    .mainnav__search { display: flex; }
    .mainnav__search input {
        width: 250px; padding: 10px 34px 10px 12px;
        border: 1px solid var(--border-strong);
        border-radius: var(--radius-sm);
        background: var(--primary-50);
        font: inherit; font-size: 14px;
    }
    .mainnav__search button {
        position: absolute; right: 4px; top: 50%;
        transform: translateY(-50%);
        border: 0; background: transparent;
        color: var(--primary); font-size: 15px;
        cursor: pointer; padding: 6px;
    }
    .mainnav ul { display: none; }
    .mainnav__inner:has(.ect-menu-toggle:checked) > ul { display: flex; flex-direction: column; align-items: stretch; width: 100%; }
    .mainnav__inner { flex-wrap: wrap; padding: 10px 16px; }
    .mainnav ul a { width: 100%; padding: 12px 8px; }
    .mainnav ul ul { position: static; box-shadow: none; border: 0; border-left: 3px solid var(--primary-100); visibility: visible; opacity: 1; transform: none; margin-left: 12px; }
    .section { padding: 38px 12px; }
    .hero, .hero .slides { min-height: 380px; }
}

/* ---------- Modo escuro ---------- */
html.darkMode body {
    --bg: #202124;
    --bg-alt: #2a2d33;
    --text: #e8eaed;
    --muted: #b7bcc4;
    --border: #33363d;
    --border-strong: #44474f;
    --primary-100: #243150;
    --primary-50: #262f45;
    --primary-800: #d9e2f2;
    --white: #202124;
    background: var(--bg);
    color: var(--text);
}
html.darkMode body .mainnav, html.darkMode body .card-news, html.darkMode body .item-row, html.darkMode body .widget-box,
html.darkMode body .acc-item, html.darkMode body .calendar-icon, html.darkMode body .video-card, html.darkMode body .table-wrap,
html.darkMode body .shortcut, html.darkMode body .membro, html.darkMode body table.data { background: #2a2d33; }
html.darkMode body .card-news { background: #202124; }
html.darkMode body .mainnav { border-color: var(--border); }
html.darkMode body .mainnav ul a { color: var(--primary-800); }
html.darkMode body .mainnav ul a:hover, html.darkMode body .mainnav ul li:hover > a { background: #33363d; }
html.darkMode body .mainnav ul ul { background: #2a2d33; }
html.darkMode body .hero-page { background: linear-gradient(100deg, #10121a 0%, var(--primary-650) 60%, var(--navy) 100%); }
html.darkMode body .section--alt { background: #2a2d33; }
html.darkMode body .footer, html.darkMode body .section--dark { background: linear-gradient(165deg, #10121a 0%, #1a2030 100%); }
html.darkMode body table.data thead th { background: var(--primary-650); }
html.darkMode body table.data tbody tr:nth-child(even) { background: #33363d; }
html.darkMode body .table.data tbody tr:hover { background: #3a3d45; }
html.darkMode body .faq-search input, html.darkMode body .field input, html.darkMode body .field select, html.darkMode body .nav-search input { background: #2a2d33; color: var(--text); border-color: var(--border-strong); }
html.darkMode body .nav-search__toggle { color: var(--text); border-color: var(--border-strong); }
html.darkMode body .article-content blockquote { background: #2a2d33; }
html.darkMode body .acc-head { background: var(--primary-650); }

/* ---------- Alto contraste ---------- */
html.highContrast body {
    --bg: #000;
    --bg-alt: #000;
    --text: #fff;
    --muted: #fff;
    --border: #fff;
    --border-strong: #fff;
    --primary: #5b9bff;
    --primary-500: #5b9bff;
    --primary-600: #fff;
    --primary-650: #fff;
    --primary-800: #fff;
    --primary-900: #000;
    --primary-100: #000;
    --primary-50: #000;
    background: #000;
    color: #fff;
}
html.highContrast body a { color: #5b9bff; }
html.highContrast body h1, html.highContrast body h2, html.highContrast body h3, html.highContrast body h4, html.highContrast body h5, html.highContrast body h6 { color: #fff; }
html.highContrast body .topbar { background: #000; border-bottom: 2px solid #fff; }
html.highContrast body .mainnav, html.highContrast body .card-news, html.highContrast body .item-row, html.highContrast body .widget-box,
html.highContrast body .acc-item, html.highContrast body .calendar-icon, html.highContrast body .table-wrap, html.highContrast body table.data,
html.highContrast body .shortcut, html.highContrast body .membro { background: #000; border-color: #fff; box-shadow: none; }
html.highContrast body .card-news__media img, html.highContrast body .video-card { filter: grayscale(20%); }
html.highContrast body .hero-page { background: #000; }
html.highContrast body .section--alt { background: #000; }
html.highContrast body .footer, html.highContrast body .section--dark, html.highContrast body .stat { background: #000; border: 1px solid #fff; }
html.highContrast body .btn { background: #5b9bff; border-color: #5b9bff; color: #000; }
html.highContrast body .btn--outline { background: transparent; color: #5b9bff; }
html.highContrast body .tabs .tab { background: #000; color: #fff; border-color: #fff; }
html.highContrast body .tabs .tab.is-active { background: #5b9bff; color: #000; border-color: #5b9bff; }
html.highContrast body table.data thead th { background: #fff; color: #000; }
html.highContrast body .acc-head, html.highContrast body .calendar-icon strong { background: #5b9bff; color: #000; }
html.highContrast body .faq-search input, html.highContrast body .field input, html.highContrast body .field select { background: #000; color: #fff; border-color: #fff; }
html.highContrast body .nav-search__toggle { color: #fff; border-color: #fff; }
html.highContrast body .nav-search input { background: #000; color: #fff; }
html.highContrast body .gallery a { border: 1px solid #fff; }
html.highContrast body .tags-row a { background: #000; color: #5b9bff; border: 1px solid #5b9bff; }
html.highContrast body .stat strong, html.highContrast body .stat span { color: #fff; }
html.highContrast body .badge--open { background: #000; color: #5b9bff; border: 1px solid #5b9bff; }
html.highContrast body .badge--closed, html.highContrast body .badge--ongoing, html.highContrast body .badge--end { background: #000; color: #fff; border: 1px solid #fff; }

/* ---------- VLibras (widget de acessibilidade) ---------- */
/* O widget real é position:fixed; o contêiner injetado no fim do <body>
   não pode ocupar espaço no fluxo (aparecia abaixo do rodapé) nem estourar
   a largura da página. Ancorado no canto inferior direito. */
#vlibras-access-wrapper,
body > div:has(> [vw]),
body > div:has(> div[vw]) {
    position: fixed !important;
    top: auto !important;
    left: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    z-index: 2147483000;
}