/*
Theme Name: Externato O Pinguim
Theme URI: https://externatopinguim.com
Author: Externato O Pinguim
Description: Tema do Externato O Pinguim (Chaves) - creche, pré-escolar e 1.º ciclo.
Version: 1.1.0
Requires at least: 6.3
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: pinguim
*/

:root {
	--ice-50: #f0f9ff;
	--ice-100: #e0f2fe;
	--ice-200: #bae6fd;
	--ice-300: #7dd3fc;
	--blue-500: #0284c7;
	--blue-600: #0369a1;
	--blue-700: #075985;
	--navy: #0a3854;
	--orange: #ff922b;
	--orange-dark: #c2410c;
	--ink: #1e293b;
	--muted: #475569;
	--font-display: 'Fredoka', system-ui, sans-serif;
	--font-body: 'Nunito', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--ink);
	background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); }
a:hover { color: var(--orange-dark); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); line-height: 1.15; margin: 0 0 .6em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.icon { flex: none; }

:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 3px; }

.screen-reader-text {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: -999px; top: 0; z-index: 100;
	background: var(--navy); color: #fff; padding: .75rem 1rem;
}
.skip-link:focus { left: 0; }

.container { width: min(100% - 2.5rem, 70rem); margin-inline: auto; }
.container--narrow { width: min(100% - 2.5rem, 48rem); }
.section { padding: 4rem 0; }
.section--ice { background: var(--ice-50); border-block: 1px solid var(--ice-100); }
.section-head { max-width: 40rem; margin-bottom: 2.25rem; }
.section-head p { color: var(--muted); }
.section-more { margin-top: 2.25rem; }
.empty { color: var(--muted); padding: 2rem; border: 2px dashed var(--ice-200); border-radius: 1.25rem; text-align: center; }

/* Botões */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	padding: .75rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
	font: 600 1rem/1.2 var(--font-display); text-decoration: none; cursor: pointer;
	transition: background-color .2s, border-color .2s, color .2s;
}
.btn--primary { background: var(--orange); color: var(--navy); box-shadow: 0 4px 0 #d9730d; }
.btn--primary:hover { background: #ffa94d; color: var(--navy); }
.btn--ghost { background: #fff; color: var(--navy); border-color: var(--ice-200); }
.btn--ghost:hover { background: var(--ice-100); border-color: var(--ice-300); color: var(--navy); }
.btn--dark { background: var(--blue-600); color: #fff; }
.btn--dark:hover { background: var(--blue-700); color: #fff; }

/* Cabeçalho */
.site-header {
	position: sticky; top: 0; z-index: 40;
	background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
	border-bottom: 3px solid var(--ice-200);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.5rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand-mark {
	width: 3.25rem; height: 3.25rem; border-radius: 50%; padding: .2rem;
	background: var(--ice-100); border: 2px solid var(--ice-300); flex: none;
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 600 1.4rem var(--font-display); color: var(--navy); }
.brand-name b { color: var(--orange-dark); font-weight: 700; }
.brand-place { font-size: .8rem; font-weight: 700; color: var(--blue-600); margin-top: .2rem; }

.nav-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 2.75rem; height: 2.75rem; border: 2px solid var(--ice-200); border-radius: .75rem;
	background: #fff; cursor: pointer; color: var(--navy);
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
	display: block; width: 1.25rem; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-nav {
	display: none; position: absolute; left: 0; right: 0; top: 100%;
	background: #fff; border-bottom: 3px solid var(--ice-200); padding: 1rem 1.25rem 1.5rem;
}
.site-nav.is-open { display: block; }
.menu { list-style: none; margin: 0 0 1rem; padding: 0; }
.menu a {
	display: block; padding: .65rem 1rem; border-radius: 999px;
	font-weight: 700; color: #334155; text-decoration: none;
}
.menu a:hover, .menu a[aria-current="page"], .menu .current-menu-item > a { background: var(--ice-100); color: var(--blue-700); }
.nav-cta { width: 100%; }
.menu li { position: relative; }
.menu li.is-current-parent > a, .menu .current-menu-ancestor > a { background: var(--ice-100); color: var(--blue-700); }
.sub-menu, .menu .sub-menu { list-style: none; margin: 0; padding: 0 0 0 1rem; }

@media (min-width: 900px) {
	.nav-toggle { display: none; }
	.site-nav { display: flex; position: static; align-items: center; gap: 1rem; border: 0; padding: 0; background: none; }
	.menu { display: flex; gap: .25rem; margin: 0; }
	.menu .sub-menu {
		display: none; position: absolute; top: 100%; left: 0; min-width: 13.5rem; z-index: 10;
		background: #fff; border: 2px solid var(--ice-200); border-radius: 1rem; padding: .4rem;
		box-shadow: 0 12px 28px rgba(10, 56, 84, .18);
	}
	.menu li:hover > .sub-menu, .menu li:focus-within > .sub-menu { display: block; }
	.nav-cta { width: auto; padding: .6rem 1.25rem; }
}

/* Topo da página inicial */
.hero {
	position: relative; overflow: hidden;
	background: linear-gradient(180deg, #9bdcfb 0%, #e0f2fe 60%, #fff 100%);
	padding: 2.6rem 0 6rem;
}
.scene { position: absolute; left: 0; bottom: 0; width: 100%; height: 42%; z-index: 0; }
.hero-grid { position: relative; z-index: 2; display: grid; gap: 1.5rem; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chips span { background: #ffd43b; color: var(--navy); font: 600 .9rem var(--font-display); padding: .3rem .9rem; border-radius: 999px; }
.hero h1 { font-size: clamp(2.2rem, 6.5vw, 3.8rem); margin-bottom: 1rem; }
.lead { font-size: 1.15rem; font-weight: 600; max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.3rem; }
.hero-actions--center { justify-content: center; }
.score { margin-top: 1.1rem; font-weight: 800; color: var(--navy); font-size: .95rem; }

.mascot { position: relative; width: min(21rem, 86%); margin: .5rem auto 0; }
.mascot > svg { width: 100%; display: block; filter: drop-shadow(0 14px 18px rgba(10, 56, 84, .22)); }
.mbtn { position: absolute; left: 4%; bottom: 2%; width: 34%; background: none; border: 0; padding: 0; cursor: pointer; transform-origin: 50% 100%; }
.mbtn svg { width: 100%; display: block; }
.mbtn.hop { animation: pg-hop .5s; }
.bubble {
	position: absolute; right: 0; top: -1.2rem; max-width: 13rem; margin: 0;
	background: #fff; color: var(--ink); border: 2px solid var(--ice-200);
	border-radius: 1.1rem 1.1rem 1.1rem .2rem; padding: .55rem .9rem;
	font-weight: 700; font-size: .92rem; line-height: 1.35; box-shadow: 0 8px 20px rgba(10, 56, 84, .15);
}
@keyframes pg-hop { 35% { transform: translateY(-1.1rem) rotate(-6deg); } 70% { transform: translateY(0) rotate(4deg); } }

.flakes { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.fl {
	position: absolute; top: -2rem; width: 2.6rem; height: 2.6rem; border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .75); color: #0284c7; font-size: 1.5rem; line-height: 1;
	cursor: pointer; pointer-events: auto; animation: pg-fall linear forwards;
}
.fl.pop { animation: pg-pop .3s forwards; }
@keyframes pg-fall { to { transform: translateY(34rem) rotate(200deg); } }
@keyframes pg-pop { to { transform: scale(1.9); opacity: 0; } }

@media (min-width: 900px) {
	.hero { padding: 4.5rem 0 8rem; }
	.hero-grid { grid-template-columns: 1.15fr 1fr; }
	.scene { height: 50%; }
}

/* Topo das páginas interiores */
.page-hero {
	position: relative; overflow: hidden;
	background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 60%, #fff 100%);
	padding: 3.5rem 0 5.5rem;
}
.page-hero .scene { height: 70%; }
.page-hero-inner { position: relative; z-index: 2; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: .5rem; }
.page-hero .lead { font-size: 1.15rem; font-weight: 600; color: #334155; max-width: 36rem; margin: 0; }

/* Notícias */
.card-grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.card { background: #fff; border: 2px solid var(--ice-200); border-radius: 1.25rem; overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s; }
.card:hover { border-color: var(--ice-300); }
.card-media { display: block; aspect-ratio: 3 / 2; background: var(--ice-100); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.card-placeholder svg { width: 5rem; opacity: .85; }
.card-body { padding: 1.25rem 1.4rem 1.5rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .875rem; font-weight: 700; color: var(--muted); margin-bottom: .5rem; }
.card-cat { color: var(--orange-dark); }
.card-title { margin-bottom: .5rem; }
.card-title a { color: var(--navy); text-decoration: none; }
.card-title a:hover { color: var(--orange-dark); }
.card-body p:last-child { margin-bottom: 0; color: var(--muted); font-size: 1rem; }

/* Níveis de ensino */
.lv { display: grid; gap: 1.2rem; }
.lc { border-radius: 1.75rem; padding: 1.8rem 1.6rem; transition: transform .2s; }
.lc:hover { transform: translateY(-4px); }
.lc:nth-child(1) { background: #fff3bf; }
.lc:nth-child(2) { background: #d7f0ff; }
.lc:nth-child(3) { background: #ffe3c4; }
.age { display: block; font: 600 2.1rem/1.05 var(--font-display); color: var(--navy); }
.lc h3 { margin: .2rem 0 .4rem; color: var(--orange-dark); }
.lc p { margin: 0; }
@media (min-width: 800px) { .lv { grid-template-columns: repeat(3, 1fr); } }

/* Separadores, ementa, tabela */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.tab { border: 2px solid var(--ice-200); background: #fff; color: var(--navy); border-radius: 999px; padding: .55rem 1.2rem; font: 600 1rem var(--font-display); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.tp[hidden] { display: none; }
.tp h3 { margin: 0 0 .8rem; }
.pn { background: #fff; border: 2px solid var(--ice-200); border-radius: 1.75rem; padding: 1.6rem; }
.pn h3 { font-size: 1.5rem; }
.pn p { color: var(--muted); margin: 0; font-size: 1.08rem; }
.bar { height: .55rem; background: var(--ice-100); border-radius: 9px; margin-top: 1.2rem; overflow: hidden; }
.bar i { display: block; height: 100%; width: 25%; background: var(--orange); border-radius: 9px; transition: width .35s; }
.muted { color: var(--muted); }
.meals { display: grid; gap: .9rem; margin-top: 1rem; }
@media (min-width: 700px) { .meals { grid-template-columns: repeat(3, 1fr); } }
.meal { background: #fff; border: 2px solid var(--ice-200); border-radius: 1.25rem; padding: 1.1rem 1.2rem; }
.meal--full { grid-column: 1 / -1; }
.meal small { display: block; font-weight: 800; color: var(--orange-dark); text-transform: uppercase; font-size: .78rem; }
.meal b { font: 600 1.15rem/1.3 var(--font-display); color: var(--navy); }
.tw { border: 2px solid var(--ice-200); border-radius: 1rem; overflow: hidden; margin-bottom: 1.4rem; }
.tbl { width: 100%; border-collapse: collapse; background: #fff; }
.tbl th, .tbl td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--ice-100); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { background: var(--ice-100); color: var(--navy); font-family: var(--font-display); }
.doc-note { margin-top: 1.6rem; }
.intro { margin-bottom: 1.6rem; }

/* Faixa final */
.cta { background: linear-gradient(135deg, #0369a1, #0a3854); color: #e0f2fe; text-align: center; border-radius: 2rem; padding: 3rem 1.5rem; }
.cta h2 { color: #fff; }
.cta p { max-width: 34rem; margin-inline: auto; }

/* Perguntas dos pais (bloco "Detalhes" do editor) */
.wp-block-details { background: #fff; border: 2px solid var(--ice-200); border-radius: 1.1rem; margin: 0 0 .8rem; padding: 0 1.3rem; }
.wp-block-details summary { cursor: pointer; padding: 1rem 0; font: 600 1.12rem var(--font-display); color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--orange-dark); }
.wp-block-details[open] summary::after { content: "\2013"; }
.wp-block-details > *:not(summary) { color: var(--muted); margin: 0 0 1rem; }

.social { text-align: center; max-width: 36rem; }
.social p { color: var(--muted); }

/* Escola */
.story { display: grid; gap: 2.5rem; align-items: center; }
.story-media img { width: 100%; border-radius: 2rem; box-shadow: 0 20px 40px -20px rgba(10, 56, 84, .35); }
.story-igloo { background: var(--ice-100); border-radius: 2rem; padding: 3rem; }
.story-text .entry-content p { color: var(--muted); }
@media (min-width: 900px) { .story { grid-template-columns: 1fr 1fr; gap: 4rem; } }

.team-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.team { background: #fff; border: 2px solid var(--ice-100); border-top-width: 6px; border-radius: 1.25rem; padding: 1.5rem; }
.team--orange { border-top-color: var(--orange); }
.team--blue { border-top-color: #38bdf8; }
.team--green { border-top-color: #34d399; }
.team--purple { border-top-color: #c084fc; }
.team-desc { font-size: .95rem; color: var(--muted); }
.team ul { list-style: none; margin: 0; padding: .75rem 0 0; border-top: 1px solid var(--ice-100); font-weight: 700; }


/* Documentos */
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.doc {
	display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem;
	background: #fff; border: 2px solid var(--ice-200); border-radius: 1rem;
	text-decoration: none; color: inherit; transition: border-color .2s;
}
.doc:hover { border-color: var(--orange); }
.doc-icon { display: flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: .9rem; background: #fee2e2; color: #b91c1c; flex: none; }
.doc-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.doc-title { font: 600 1.15rem/1.3 var(--font-display); color: var(--navy); }
.doc-meta { display: flex; align-items: center; gap: .4rem; font-size: .875rem; font-weight: 600; color: var(--muted); }
.doc-action { display: flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: .75rem; background: var(--ice-100); color: var(--blue-700); flex: none; }
.doc:hover .doc-action { background: var(--orange); color: var(--navy); }

/* Conteúdo escrito no editor */
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content img { border-radius: 1rem; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--ice-200); padding: .5rem .75rem; text-align: left; }
.single-media { margin-bottom: 1.5rem; }
.single-media img { width: 100%; border-radius: 1.5rem; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; }

.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.pagination .page-numbers {
	padding: .5rem 1rem; border: 2px solid var(--ice-200); border-radius: 999px;
	text-decoration: none; font-weight: 700; color: var(--navy);
}
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--ice-100); }

/* Rodapé */
.site-footer { background: var(--navy); color: #cbd5e1; border-top: 6px solid var(--orange); padding-top: 3rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--orange); }
.footer-grid { display: grid; gap: 2rem; }
.footer-title { font: 600 1.4rem var(--font-display); color: #fff; margin-bottom: .5rem; }
.footer-title b { color: var(--orange); font-weight: 700; }
.footer-social { display: flex; gap: 1rem; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.contact-list li { display: flex; align-items: flex-start; gap: .75rem; }
.contact-list .icon { margin-top: .3rem; color: var(--ice-300); }
.footer-bottom {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem;
	margin-top: 2.5rem; padding: 1.25rem 0; border-top: 1px solid rgba(186, 230, 253, .2); font-size: .9rem;
}
.footer-admin { color: #94a3b8 !important; text-decoration: none; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* Janela da Mensagem da Direção */
dialog.modal {
	border: 0; border-radius: 1.75rem; padding: 0; color: var(--ink);
	width: min(100% - 2rem, 40rem); max-height: 88vh;
	box-shadow: 0 30px 60px -20px rgba(10, 56, 84, .5);
}
dialog.modal::backdrop { background: rgba(10, 56, 84, .6); }
.modal-body { position: relative; padding: 2.25rem 2rem 2rem; max-height: 88vh; overflow-y: auto; }
.modal-body h2 { font-size: 1.9rem; padding-right: 2.5rem; }
.modal-text { color: var(--muted); margin-bottom: 1rem; }
.modal-sign { padding-top: 1rem; border-top: 1px solid var(--ice-100); color: var(--navy); }
.modal-close {
	position: absolute; top: .9rem; right: .9rem; width: 2.5rem; height: 2.5rem; display: flex;
	align-items: center; justify-content: center; border: 0; border-radius: 50%;
	background: var(--ice-100); color: var(--navy); cursor: pointer;
}
.modal-close:hover { background: var(--ice-200); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.mbtn.hop { animation: none; }
	.flakes { display: none; }
	* { transition: none !important; }
}
