/*
Theme Name: Dicas e Turismo
Description: Tema do blog Dicas e Turismo: página inicial em 3 colunas, com os posts mais recentes em duas colunas (foto principal e resumo) e as categorias na coluna da direita.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Author: Franco Pieragnoli
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dicas-e-turismo
Tags: blog, three-columns, right-sidebar, grid-layout, featured-images, custom-menu
*/

:root {
	--bg: #f7f5f1;
	--surface: #ffffff;
	--ink: #1f2a2e;
	--muted: #5b6b70;
	--line: #e6e1d8;
	--brand: #0f6b6f;
	--brand-dark: #0b4f52;
	--accent: #d9692b;
	--footer-bg: #13393b;
	--footer-ink: #dbe7e6;
	--radius: 10px;
	--shadow: 0 1px 2px rgba(31, 42, 46, 0.06), 0 4px 14px rgba(31, 42, 46, 0.06);
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--gap: 28px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--brand);
}

a:hover {
	color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
}

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

.container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
}

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

.skip-link {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 100;
	background: var(--surface);
	padding: 8px 14px;
	border-radius: 6px;
}

.skip-link:focus {
	left: 8px;
}

/* Cabeçalho */

.site-header {
	background: var(--surface);
	border-bottom: 1px solid var(--line);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-top: 22px;
	padding-bottom: 22px;
}

.site-title {
	font-size: clamp(1.7rem, 4vw, 2.4rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
	color: var(--ink);
	text-decoration: none;
}

.site-title:hover {
	color: var(--brand);
}

.site-description {
	margin: 4px 0 0;
	color: var(--muted);
	font-size: 0.95rem;
}

.search-form {
	display: flex;
	gap: 6px;
	flex: 0 1 320px;
}

.search-form label {
	flex: 1;
}

.search-field {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	font: inherit;
	font-size: 0.95rem;
	background: var(--bg);
	color: var(--ink);
}

.search-submit {
	padding: 9px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--brand);
	color: #fff;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
}

.search-submit:hover {
	background: var(--brand-dark);
}

.main-nav {
	border-top: 1px solid var(--line);
}

.main-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 22px;
	margin: 0;
	padding: 10px 0;
	list-style: none;
}

.main-nav a {
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
}

/* Layout de 3 colunas: conteúdo ocupa 2, categorias ocupam 1 */

.layout {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--gap);
	padding-top: 36px;
	padding-bottom: 56px;
}

.content {
	grid-column: span 2;
	min-width: 0;
}

.sidebar {
	min-width: 0;
}

.section-title,
.archive-title {
	margin: 0 0 20px;
	font-size: 1.35rem;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.archive-header {
	margin-bottom: 8px;
}

.archive-description {
	color: var(--muted);
	margin-bottom: 20px;
}

/* Cards de posts */

.post-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--gap);
}

.card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
}

.card-media {
	display: block;
	aspect-ratio: 3 / 2;
	background: linear-gradient(135deg, var(--brand), var(--brand-dark));
	overflow: hidden;
}

.card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.card:hover .card-media img {
	transform: scale(1.03);
}

.card-media--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.85);
	font-weight: 800;
	font-size: 1.2rem;
	text-decoration: none;
}

.card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 20px 20px;
}

.card-category {
	align-self: flex-start;
	margin-bottom: 8px;
	color: var(--accent);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
}

.card-title {
	margin: 0 0 6px;
	font-size: 1.2rem;
	line-height: 1.3;
}

.card-title a {
	color: var(--ink);
	text-decoration: none;
}

.card-title a:hover {
	color: var(--brand);
}

.card-date {
	color: var(--muted);
	font-size: 0.85rem;
}

.card-excerpt {
	margin: 10px 0 14px;
	color: #3c4a4e;
	font-size: 0.96rem;
}

.card-more {
	margin-top: auto;
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
}

/* Paginação */

.pagination {
	margin-top: 36px;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.page-numbers {
	display: inline-block;
	min-width: 40px;
	padding: 8px 12px;
	border-radius: 8px;
	background: var(--surface);
	box-shadow: var(--shadow);
	text-align: center;
	text-decoration: none;
	font-weight: 600;
}

.page-numbers.current {
	background: var(--brand);
	color: #fff;
}

.page-numbers.dots {
	background: none;
	box-shadow: none;
}

/* Coluna de categorias */

.widget {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 20px 22px;
}

.widget-title {
	margin: 0 0 12px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--accent);
	font-size: 1.05rem;
	font-weight: 800;
}

.category-list,
.category-list ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.category-list ul {
	padding-left: 14px;
	border-left: 2px solid var(--line);
	margin: 2px 0 6px 4px;
}

.category-list li {
	padding: 3px 0;
	color: var(--muted);
	font-size: 0.93rem;
}

.category-list a {
	color: var(--ink);
	text-decoration: none;
}

.category-list a:hover {
	color: var(--brand);
	text-decoration: underline;
}

/* Post individual */

.entry {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: clamp(20px, 4vw, 40px);
}

.entry-categories a {
	color: var(--accent);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	margin-right: 10px;
}

.entry-title {
	margin: 8px 0 6px;
	font-size: clamp(1.7rem, 4vw, 2.3rem);
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.entry-meta {
	margin: 0 0 24px;
	color: var(--muted);
	font-size: 0.92rem;
}

.entry-thumbnail {
	margin: 0 0 24px;
}

.entry-thumbnail img {
	border-radius: 8px;
}

.entry-content {
	overflow-wrap: break-word;
}

.entry-content img {
	border-radius: 6px;
}

.entry-content iframe {
	max-width: 100%;
}

.entry-content h2,
.entry-content h3 {
	line-height: 1.3;
	margin-top: 1.6em;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
}

.entry-content td,
.entry-content th {
	padding: 6px 8px;
	border: 1px solid var(--line);
}

.entry-tags {
	margin-top: 28px;
	padding-top: 18px;
	border-top: 1px solid var(--line);
	font-size: 0.9rem;
}

.entry-tags span {
	font-weight: 700;
	margin-right: 4px;
}

.entry-tags a {
	display: inline-block;
	margin: 3px 2px;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--bg);
	text-decoration: none;
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--gap);
	margin-top: var(--gap);
}

.post-navigation a {
	display: block;
	height: 100%;
	padding: 16px 18px;
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	text-decoration: none;
}

.post-navigation .nav-next {
	text-align: right;
}

.nav-label {
	display: block;
	color: var(--muted);
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.nav-title {
	color: var(--ink);
	font-weight: 700;
}

/* Comentários */

.comments {
	margin-top: var(--gap);
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: clamp(20px, 4vw, 32px);
}

.comments-title,
.comment-reply-title {
	margin-top: 0;
	font-size: 1.2rem;
}

.comment-list {
	padding-left: 0;
	list-style: none;
}

.comment-list .children {
	list-style: none;
	padding-left: 20px;
	border-left: 2px solid var(--line);
}

.comment-body {
	padding: 14px 0;
	border-bottom: 1px solid var(--line);
}

.comment-form input:not([type="checkbox"]):not([type="submit"]),
.comment-form textarea {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--line);
	border-radius: 8px;
	font: inherit;
}

.comment-form .submit {
	padding: 10px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--brand);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* Rodapé */

.site-footer {
	background: var(--footer-bg);
	color: var(--footer-ink);
	padding-top: 44px;
}

.footer-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--gap);
}

.footer-title {
	margin: 0 0 12px;
	color: #fff;
	font-size: 0.95rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.site-footer a {
	color: var(--footer-ink);
	text-decoration: none;
}

.site-footer a:hover {
	color: #fff;
	text-decoration: underline;
}

.footer-list {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.93rem;
}

.footer-list li {
	padding: 3px 0;
}

.footer-tags .tag-cloud-link {
	display: inline-block;
	margin: 0 6px 6px 0;
	padding: 2px 10px;
	border: 1px solid rgba(219, 231, 230, 0.3);
	border-radius: 999px;
}

.footer-bottom {
	margin-top: 36px;
	padding-top: 18px;
	padding-bottom: 22px;
	border-top: 1px solid rgba(219, 231, 230, 0.18);
	font-size: 0.88rem;
}

.footer-bottom p {
	margin: 0;
}

/* Responsivo */

@media (max-width: 960px) {
	.layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.content {
		grid-column: auto;
	}

	.footer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	:root {
		--gap: 20px;
	}

	.header-inner {
		flex-direction: column;
		align-items: stretch;
	}

	.search-form {
		flex-basis: auto;
	}

	.post-grid,
	.post-navigation .nav-links,
	.footer-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.post-navigation .nav-next {
		text-align: left;
	}
}
