/*
Theme Name: CFEBM
Theme URI: https://cfebm.edu.fmop.tech
Author: Edugep Digital Solutions
Description: Tema institucional do Centro de Formação de Escolas do Barreiro e Moita.
Version: 1.3.0
Text Domain: cfebm
License: Proprietary
*/

:root { --cfebm-blue:#0964bb; --cfebm-green:#00a65a; --cfebm-yellow:#ffc400; --cfebm-ink:#202124; --cfebm-muted:#5e6873; --cfebm-width:1360px; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { display:flex; flex-direction:column; min-height:100vh; margin:0; background:#fff; color:var(--cfebm-ink); font-family:"Arial Narrow",Arial,sans-serif; font-size:16px; line-height:1.5; }
a { color:inherit; text-decoration:none; }
a:hover { text-decoration:underline; }
img { max-width:100%; height:auto; }
.cfebm-container { width:min(calc(100% - 64px),var(--cfebm-width)); margin:0 auto; }
.screen-reader-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link:focus { clip:auto; width:auto; height:auto; z-index:1000; top:12px; left:12px; padding:10px; background:#fff; color:#000; }

.site-header { flex:none; position:relative; z-index:10; background:#fff; border-bottom:1px solid #f0f0f0; }
.header-inner { min-height:118px; display:flex; align-items:center; gap:24px; }
.site-branding { flex:0 0 112px; }
.custom-logo-link,.custom-logo-link .custom-logo { display:block; }
.custom-logo { width:100px; max-height:94px; object-fit:contain; }
.main-navigation { flex:1; }
.main-navigation ul { display:flex; justify-content:flex-end; align-items:center; gap:27px; padding:0; margin:0; list-style:none; }
.main-navigation a { display:block; font-size:15px; font-weight:700; text-transform:uppercase; letter-spacing:-.2px; white-space:nowrap; }
.main-navigation .current-menu-item > a,.main-navigation .current_page_item > a,.main-navigation a:hover { color:var(--cfebm-blue); text-decoration:none; }
.menu-toggle { display:none; }
.search-toggle { width:37px; height:42px; flex:0 0 37px; padding:5px; border:0; background:transparent; color:var(--cfebm-blue); cursor:pointer; }
.search-toggle svg { width:28px; fill:none; stroke:currentColor; stroke-width:3; stroke-linecap:round; }
.login-link { display:inline-flex; align-items:center; justify-content:center; min-width:116px; min-height:38px; padding:7px 20px; background:var(--cfebm-yellow); color:#151515; font-size:16px; font-weight:700; text-transform:uppercase; }
.login-link:hover { background:#e7af00; text-decoration:none; }
.site-search { padding:14px 0 18px; border-top:1px solid #eee; }
.site-search .search-form { margin-left:auto; }

.site-main { flex:1 0 auto; min-height:420px; }
.entry-header,.entry-content { width:min(calc(100% - 64px),var(--cfebm-width)); margin-left:auto; margin-right:auto; }
.entry-header { margin-top:55px; }
.entry-title { color:var(--cfebm-blue); font-size:clamp(2rem,4vw,3.75rem); text-align:center; text-transform:uppercase; }
.entry-content { padding-bottom:70px; }
.entry-content > :first-child { margin-top:0; }
/* O Elementor controla a largura, as margens e o espaçamento das páginas que edita. */
.elementor-page .site-main { min-height:0; overflow:hidden; }
.elementor-page .entry-header { display:none; }
.elementor-page .entry-content { width:100%; max-width:none; margin:0; padding:0; }
.elementor-page .entry-content > .elementor { width:100%; }
/* Estrutura provisória da home importada; não deixa os contentores do Elementor ultrapassarem o ecrã. */
/* elementor-element-8148f84 é o hero (imagem fullwidth) — fica solto no fluxo do Elementor, encostado à navbar. */
.home .elementor-2 .elementor-element.elementor-element-a284757 { width:min(calc(100% - 64px),1080px) !important; margin:0 auto; }

/* Ícones SVG inline; herdam a cor do contexto. */
.cfebm-icon { width:1.15em; height:1.15em; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }

.site-footer { flex:none; background:var(--cfebm-blue); color:#fff; margin-top:70px; padding:64px 0 46px; }
.footer-grid { display:grid; grid-template-columns:1.75fr 1.1fr 1.15fr; gap:40px; align-items:start; }
.footer-brand { display:flex; align-items:center; min-height:160px; }
.footer-brand img { width:270px; }
.footer-title { margin:22px 0 10px; color:#fff; font-size:13px; font-weight:700; letter-spacing:.2px; text-transform:uppercase; }
.footer-title:first-child { margin-top:0; }
.footer-navigation ul { margin:0; padding:0; list-style:none; }
.footer-navigation li { margin:0 0 18px; }
.footer-navigation a { font-size:13px; font-weight:700; letter-spacing:.3px; text-transform:uppercase; }
.footer-contact p,.footer-contact address { margin:0 0 8px; font-size:14px; font-style:normal; }
.footer-line { display:flex; align-items:center; gap:10px; }
.footer-line .cfebm-icon { width:18px; height:18px; }
.social-menu { display:flex; gap:10px; margin:0; padding:0; list-style:none; }
.social-menu a { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border:1.5px solid #fff; border-radius:50%; color:#fff; }
.social-menu .cfebm-icon { width:14px; height:14px; }
.social-menu a:hover { background:#fff; color:var(--cfebm-blue); }
/* Logótipos de parceiros (widgets), alinhados à direita como no mockup. */
.footer-logos { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:12px; margin-top:34px; }
.footer-logo-item img { display:block; width:auto; height:42px; object-fit:contain; }

.back-to-top { position:fixed; right:24px; bottom:24px; z-index:90; display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; padding:0; border:0; border-radius:50%; background:#cfe0ef; color:var(--cfebm-blue); cursor:pointer; box-shadow:0 2px 6px rgba(0,0,0,.15); }
.back-to-top[hidden] { display:none; }
.back-to-top:hover { background:var(--cfebm-blue); color:#fff; }
.back-to-top .cfebm-icon { width:20px; height:20px; stroke-width:2; }

/* Listagens de artigos: blogue, arquivos e pesquisa. */
.post-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:34px; }
.post-card { display:flex; flex-direction:column; border:1px solid #e6ebf0; }
.post-card-media img { display:block; width:100%; aspect-ratio:16/9; object-fit:cover; }
.post-card-body { padding:20px 22px 24px; }
.post-card-title { margin:0 0 6px; font-size:20px; line-height:1.25; }
.post-card-title a:hover { color:var(--cfebm-blue); }
.entry-meta { margin:0 0 12px; color:var(--cfebm-muted); font-size:13px; }
.post-card-excerpt p { margin:0; }
.entry-thumbnail { margin:30px auto 0; }
.archive-description { color:var(--cfebm-muted); text-align:center; }
.pagination,.post-navigation { width:min(calc(100% - 64px),var(--cfebm-width)); margin:40px auto 0; }
.pagination .nav-links { display:flex; justify-content:center; gap:14px; }
.pagination .page-numbers { padding:6px 12px; border:1px solid #d7dee5; font-weight:700; }
.pagination .page-numbers.current { border-color:var(--cfebm-blue); background:var(--cfebm-blue); color:#fff; }
.post-navigation .nav-links { display:flex; justify-content:space-between; gap:24px; }
.post-navigation .nav-label { display:block; color:var(--cfebm-muted); font-size:13px; text-transform:uppercase; }
.search-form { display:flex; max-width:650px; }
.search-form input[type="search"] { width:100%; border:1px solid #c5d0d9; padding:11px 14px; font:inherit; }
.search-form input[type="submit"] { border:0; padding:0 20px; background:var(--cfebm-blue); color:#fff; font:inherit; font-weight:700; cursor:pointer; }
.error-404 .search-form { margin:24px 0; }
.button-primary { display:inline-flex; align-items:center; min-height:42px; padding:9px 22px; background:var(--cfebm-yellow); color:#151515; font-weight:700; text-transform:uppercase; }
.button-primary:hover { background:#e7af00; text-decoration:none; }

@media (max-width:1150px) { .header-inner { gap:16px; } .main-navigation ul { gap:16px; } .main-navigation a { font-size:13px; } .site-branding { flex-basis:90px; } .custom-logo { width:82px; } .login-link { min-width:92px; padding:7px 13px; } }
@media (max-width:860px) { .cfebm-container { width:min(calc(100% - 38px),var(--cfebm-width)); } .header-inner { min-height:84px; } .site-branding { flex:1; } .custom-logo { width:76px; max-height:68px; } .menu-toggle { display:flex; flex-direction:column; justify-content:center; gap:5px; width:42px; height:42px; padding:9px; border:0; background:transparent; cursor:pointer; } .menu-toggle span:not(.screen-reader-text) { display:block; width:24px; height:2px; background:var(--cfebm-blue); } .main-navigation { position:absolute; top:100%; right:0; left:0; display:none; padding:10px 19px 18px; background:#fff; border-top:1px solid #eee; box-shadow:0 8px 12px rgba(0,0,0,.06); } .menu-open .main-navigation { display:block; } .main-navigation ul { display:block; } .main-navigation li { border-bottom:1px solid #eee; } .main-navigation a { padding:12px 0; font-size:15px; } .search-toggle { flex-basis:32px; width:32px; } .login-link { min-width:75px; min-height:34px; font-size:13px; } .site-footer { padding:45px 0 34px; } .footer-grid { grid-template-columns:1fr 1fr; gap:35px; } .footer-brand { min-height:0; grid-column:1 / -1; } .footer-brand img { width:190px; } .footer-logos { justify-content:flex-start; margin-top:26px; } .post-list { gap:24px; } .pagination,.post-navigation { width:min(calc(100% - 38px),var(--cfebm-width)); } }
@media (max-width:520px) { .cfebm-container { width:min(calc(100% - 28px),var(--cfebm-width)); } .header-inner { gap:5px; } .custom-logo { width:60px; } .menu-toggle { width:37px; } .search-toggle { width:29px; padding:3px; } .search-toggle svg { width:24px; } .login-link { min-width:63px; padding:6px 9px; font-size:12px; } .footer-grid { grid-template-columns:1fr; gap:28px; } .footer-brand img { width:175px; } .back-to-top { right:14px; bottom:14px; width:40px; height:40px; } .post-list { grid-template-columns:1fr; } .post-navigation .nav-links { flex-direction:column; gap:14px; } .pagination,.post-navigation { width:min(calc(100% - 28px),var(--cfebm-width)); } .entry-header,.entry-content { width:min(calc(100% - 28px),var(--cfebm-width)); } .elementor-page .entry-content { width:100%; } .home .elementor-2 .elementor-element.elementor-element-a284757 { width:calc(100% - 28px) !important; margin-left:auto; margin-right:auto; } }
