/*
Theme Name: Base Panamá
Theme URI: https://basepanama.com
Author: Base Panamá
Description: Lightweight trilingual magazine theme for basepanama.com — serif editorial look, no page builder.
Version: 1.0.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: basepanama
*/

/* ===== Reset e base ===== */
*, *::before, *::after { box-sizing: border-box; }
body {
	margin: 0;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 17.5px;
	line-height: 1.7;
	color: #1c2b39;
	background: #faf5ec;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #b3661f; text-decoration: none; }
a:hover { text-decoration: underline; }

:root {
	--navy: #0d3b66;
	--navy-2: #0a2f52;
	--accent: #f4a259;
	--accent-dark: #b3661f;
	--ink: #1c2b39;
	--muted: #5a6a76;
	--line: #e5dbc8;
	--card: #ffffff;
	--sand: #faf5ec;
	--sans: Helvetica, Arial, sans-serif;
	--maxw: 1140px;
	--radius: 12px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; }

/* ===== Header ===== */
.site-header {
	background: var(--navy);
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	min-height: 62px;
}
.site-logo--text { font-family: var(--sans); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.01em; color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.site-logo--text span { color: var(--accent); }
.logo-badge { border-radius: 50%; display: inline-block; }
.flogo--text { display: inline-flex; align-items: center; gap: 9px; }
.header-right { display: flex; align-items: center; gap: 16px; }
.lang-switch { font-family: var(--sans); font-size: 13px; color: #c6d4e2; display: flex; gap: 4px; align-items: center; }
.lang-switch a { color: #c6d4e2; padding: 3px 7px; border-radius: 6px; }
.lang-switch a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.lang-switch .on { color: var(--navy); background: var(--accent); font-weight: 700; }
.lang-switch .on:hover { color: var(--navy); background: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.site-nav a {
	color: #dbe5ee;
	font-family: var(--sans);
	font-size: 14.5px;
	font-weight: 500;
	padding: 8px 12px;
	border-radius: 8px;
	white-space: nowrap;
}
.site-nav a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.25); color: #fff; font-size: 21px; line-height: 1; padding: 5px 11px; border-radius: 8px; cursor: pointer; }

@media (max-width: 900px) {
	.nav-toggle { display: block; }
	.site-nav { display: none; width: 100%; padding-bottom: 14px; }
	.site-nav.open { display: flex; flex-direction: column; align-items: stretch; }
	.site-nav a { display: block; padding: 11px 10px; }
	.site-header .wrap { flex-wrap: wrap; }
}

/* ===== Hero (foto San Blas + véu navy) ===== */
.hero {
	background-color: var(--navy);
	background-size: cover;
	background-position: center 62%;
	color: #fff;
	padding: 84px 0 92px;
	position: relative;
	overflow: hidden;
}
.hero::after {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(100deg, rgba(7,30,53,.90) 0%, rgba(10,47,82,.72) 45%, rgba(10,47,82,.28) 100%);
	pointer-events: none;
}
@media (max-width: 700px) {
	.hero { padding: 60px 0 66px; }
	.hero::after { background: linear-gradient(180deg, rgba(7,30,53,.88) 0%, rgba(10,47,82,.55) 100%); }
}
.hero .wrap { position: relative; z-index: 1; }
.hero-kicker {
	display: inline-block;
	font-family: var(--sans);
	color: var(--accent);
	font-weight: 700;
	font-size: 12.5px;
	letter-spacing: 2.2px;
	text-transform: uppercase;
	margin-bottom: 14px;
}
.hero h1 { font-size: clamp(32px, 4.8vw, 50px); line-height: 1.12; margin: 0 0 18px; max-width: 760px; font-weight: 700; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p.sub { font-size: 19px; line-height: 1.55; color: #c9d7e4; max-width: 640px; margin: 0 0 28px; }
.btn {
	display: inline-block;
	font-family: var(--sans);
	background: var(--accent);
	color: #23150a;
	font-weight: 700;
	padding: 14px 26px;
	border-radius: 9px;
	font-size: 15.5px;
}
.btn:hover { background: #f8b478; text-decoration: none; }

/* ===== Seções ===== */
.section { padding: 52px 0; }
.section--alt { background: #f3ecdd; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section-head h2 { font-size: 27px; margin: 0; }
.section-head a.more { font-family: var(--sans); font-weight: 600; font-size: 14.5px; }

/* ===== Grid de posts ===== */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 980px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .15s ease, box-shadow .15s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(13,59,102,.10); }
.post-card a:first-child { aspect-ratio: 16/9; display: block; overflow: hidden; background: #efe7d7; }
.post-card .thumb { aspect-ratio: 16/9; object-fit: cover; width: 100%; display: block; }
.post-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.cat-pill {
	align-self: flex-start;
	font-family: var(--sans);
	background: rgba(244,162,89,.16);
	color: var(--accent-dark);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .8px;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 99px;
}
.post-card h3 { font-size: 19.5px; line-height: 1.32; margin: 0; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--accent-dark); text-decoration: none; }
.post-card p.excerpt { color: var(--muted); font-size: 15px; margin: 0; flex: 1; }
.post-meta { font-family: var(--sans); color: #8b97a2; font-size: 13px; display: flex; gap: 14px; align-items: center; }

/* Destaque */
.post-featured {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	margin-bottom: 28px;
}
.post-featured > a:first-child { display: block; overflow: hidden; background: #efe7d7; }
.post-featured .thumb { width: 100%; height: 100%; object-fit: cover; min-height: 300px; max-height: 500px; }
@media (max-width: 860px) { .post-featured { grid-template-columns: 1fr; } .post-featured > a:first-child { aspect-ratio: 16/9; } .post-featured .thumb { min-height: 0; } }
.post-featured .body { padding: 32px 34px; display: flex; flex-direction: column; gap: 13px; justify-content: center; }
.post-featured h3 { font-size: 28px; line-height: 1.25; margin: 0; }
.post-featured h3 a { color: var(--ink); }

/* ===== Artigo ===== */
.article-head { background: var(--navy); color: #fff; padding: 44px 0 38px; }
.article-head .crumbs { font-family: var(--sans); font-size: 13.5px; color: #8fa5b8; margin-bottom: 14px; }
.article-head .crumbs a { color: #c9d7e4; }
.article-head h1 { font-size: clamp(28px, 3.9vw, 42px); line-height: 1.18; margin: 0 0 16px; max-width: 880px; }
.article-head .post-meta { color: #c9d7e4; font-size: 14px; }

.article-cover { max-width: 880px; margin: -24px auto 0; padding: 0 22px; position: relative; z-index: 2; }
.article-cover img { border-radius: var(--radius); box-shadow: 0 16px 40px rgba(13,43,74,.20); width: 100%; }

.article-body {
	max-width: 740px;
	margin: 36px auto 0;
	padding: 0 22px 40px;
	font-size: 18px;
}
.article-body h2 { font-size: 27px; margin: 1.7em 0 .6em; line-height: 1.28; }
.article-body h3 { font-size: 21px; margin: 1.5em 0 .5em; }
.article-body p { margin: 0 0 1.15em; }
.article-body ul, .article-body ol { padding-left: 26px; margin: 0 0 1.2em; }
.article-body li { margin-bottom: .45em; }
.article-body img { border-radius: 10px; margin: 1.2em auto; }
.article-body strong { color: #0f2236; }
.article-body blockquote { border-left: 4px solid var(--accent); margin: 1.2em 0; padding: .4em 0 .4em 18px; color: var(--muted); font-style: italic; }
.article-body table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: 15.5px; font-family: var(--sans); }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.article-body th { background: #f3ecdd; }

/* Caixa-chave (números, avisos) */
.key-box {
	background: #fff;
	border: 2px solid var(--accent);
	border-radius: var(--radius);
	padding: 20px 24px;
	margin: 28px 0;
}
.key-box h3 { margin: 0 0 8px; font-size: 18px; }
.key-box p:last-child, .key-box ul:last-child { margin-bottom: 0; }

/* Caixa do autor */
.author-box { max-width: 740px; margin: 10px auto 0; padding: 0 22px; }
.author-box .inner {
	display: flex; gap: 18px; align-items: center;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 20px 24px;
}
.author-box img { width: 64px; height: 64px; border-radius: 50%; }
.author-box .name { font-weight: 700; }
.author-box .bio { color: var(--muted); font-size: 15px; margin-top: 2px; }

/* Relacionados */
.related { max-width: var(--maxw); margin: 0 auto; padding: 44px 22px 60px; }
.related h2 { font-size: 24px; margin: 0 0 22px; }

/* ===== Bandas de título ===== */
.page-title-band { background: var(--navy); color: #fff; padding: 38px 0; }
.page-title-band h1 { margin: 0 0 6px; font-size: clamp(26px, 3.6vw, 38px); }
.page-title-band p { margin: 0; color: #c9d7e4; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; font-family: var(--sans); }
.pagination .page-numbers {
	padding: 9px 15px; border: 1px solid var(--line); border-radius: 8px;
	background: var(--card); color: var(--ink); font-weight: 600; font-size: 15px;
}
.pagination .page-numbers.current { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Barra de assuntos */
.cat-filter { display: flex; gap: 10px; flex-wrap: wrap; padding: 18px 0 2px; font-family: var(--sans); }
.cat-filter .chip {
	display: inline-flex; align-items: center; gap: 7px;
	background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2);
	color: #e2ebf2; text-decoration: none; font-weight: 600; font-size: 14px;
	padding: 8px 14px; border-radius: 99px; transition: background .15s, border-color .15s, color .15s;
}
.cat-filter .chip span { background: rgba(255,255,255,.14); border-radius: 99px; padding: 1px 8px; font-size: 12px; }
.cat-filter .chip:hover { border-color: var(--accent); color: #fff; }
.cat-filter .chip--on { background: var(--accent); border-color: var(--accent); color: #23150a; }
.cat-filter .chip--on span { background: rgba(0,0,0,.15); }
@media (max-width: 560px) { .cat-filter .chip { font-size: 13px; padding: 7px 11px; } }

/* ===== Mosaico "Duas costas, uma base" ===== */
.mosaic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 980px) { .mosaic-grid { grid-template-columns: repeat(2, 1fr); } }
.mosaic-card {
	position: relative; border-radius: var(--radius); overflow: hidden;
	aspect-ratio: 4/3; background: #0a2f52;
}
.mosaic-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.mosaic-card:hover img { transform: scale(1.04); }
.mosaic-card figcaption {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 26px 14px 12px;
	background: linear-gradient(180deg, transparent, rgba(7,30,53,.85));
	color: #fff; font-family: var(--sans); font-size: 13.5px; font-weight: 700; letter-spacing: .3px;
}

/* ===== Cards de texto (por que este site) ===== */
.post-card.pad { padding: 20px 22px; }
.post-card.pad h3 { margin: 0 0 8px; font-size: 19px; }
.post-card.pad p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ===== Anúncios ===== */
.bp-ad { margin: 30px 0; text-align: center; }
.bp-ad::before {
	content: "Advertising";
	display: block; font-family: var(--sans);
	font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
	color: #a5a08f; margin-bottom: 6px;
}

/* ===== Footer ===== */
.site-footer { background: var(--navy); color: #a9bccb; padding: 50px 0 28px; margin-top: 60px; font-size: 15px; font-family: var(--sans); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
@media (max-width: 800px) { .site-footer .cols { grid-template-columns: 1fr; } }
.flogo--text { font-weight: 800; font-size: 1.15rem; color: #fff; margin-bottom: 10px; }
.flogo--text span { color: var(--accent); }
.site-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 12px; font-family: var(--sans); }
.site-footer a { color: #cddae5; }
.site-footer a:hover { color: var(--accent); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer .legal {
	border-top: 1px solid rgba(255,255,255,.1);
	margin-top: 36px; padding-top: 22px;
	display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
	font-size: 13.5px; color: #7f95a8;
}

/* ===== Util ===== */
.center { text-align: center; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
