/* ==========================================================================
   Guica Theme — Main Stylesheet
   ========================================================================== */

/* --- Custom Properties --- */
:root {
	--guica-brand: #D68359;
	--guica-brand-hover: #b96a45;
	--guica-brand-light: #faf0ea;
	--guica-text: #333;
	--guica-text-light: #666;
	--guica-bg: #fff;
	--guica-bg-alt: #f8f8f8;
	--guica-border: #e0e0e0;
	--guica-font: Tahoma, "Segoe UI", Geneva, Verdana, sans-serif;
	--guica-font-heading: "Montserrat", Tahoma, sans-serif;
	--guica-radius: 4px;
	--guica-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	--guica-header-height: 70px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--guica-font);
	font-size: 16px;
	line-height: 1.7;
	color: var(--guica-text);
	background: var(--guica-bg);
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--guica-brand);
	text-decoration: none;
	transition: color 0.2s;
}

a:hover,
a:focus {
	color: var(--guica-brand-hover);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--guica-font-heading);
	font-weight: 900;
	line-height: 1.2;
	color: var(--guica-text);
	margin: 0 0 0.5em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

/* --- Utilities --- */
.container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

.container--narrow {
	max-width: 780px;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link:focus {
	clip: auto !important;
	clip-path: none;
	display: block;
	height: auto;
	left: 5px;
	top: 5px;
	width: auto;
	z-index: 100000;
	padding: 0.75rem 1.25rem;
	background: var(--guica-brand);
	color: #fff;
	font-size: 0.875rem;
}

/* --- Header --- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--guica-bg);
	border-bottom: 3px solid var(--guica-brand);
	transition: box-shadow 0.3s;
}

.site-header.is-scrolled {
	box-shadow: var(--guica-shadow);
}

.site-header__inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--guica-header-height);
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
	margin-right: 1.5rem;
}

.site-branding .custom-logo-link img {
	max-height: 50px;
	width: auto;
}

.site-title {
	font-size: 1.25rem;
	margin: 0;
}

.site-title a {
	color: var(--guica-text);
}

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

.site-description {
	font-size: 0.8rem;
	color: var(--guica-text-light);
	margin: 0;
}

/* --- Navigation --- */
.main-navigation {
	margin-left: auto;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.25rem;
}

.main-navigation li a {
	display: block;
	padding: 0.5rem 0.75rem;
	font-family: var(--guica-font-heading);
	font-weight: 900;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--guica-text);
	border-radius: var(--guica-radius);
	transition: background 0.2s, color 0.2s;
	white-space: nowrap;
}

.main-navigation li a:hover,
.main-navigation li.current-menu-item > a,
.main-navigation li.current_page_item > a {
	background: var(--guica-brand);
	color: #fff;
}

.menu-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	flex-direction: column;
	gap: 5px;
}

.menu-toggle__bar {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--guica-text);
	transition: transform 0.3s, opacity 0.3s;
}

/* --- Mobile nav --- */
@media (max-width: 900px) {
	.menu-toggle {
		display: flex;
	}

	.main-navigation ul {
		display: none;
		flex-direction: column;
		position: absolute;
		top: var(--guica-header-height);
		left: 0;
		right: 0;
		background: var(--guica-bg);
		border-bottom: 3px solid var(--guica-brand);
		padding: 1rem 1.5rem;
		box-shadow: var(--guica-shadow);
	}

	.main-navigation.is-open ul {
		display: flex;
	}

	.main-navigation li a {
		padding: 0.75rem 0;
		font-size: 0.9rem;
	}

	/* Hamburger animation */
	.main-navigation.is-open .menu-toggle__bar:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}
	.main-navigation.is-open .menu-toggle__bar:nth-child(2) {
		opacity: 0;
	}
	.main-navigation.is-open .menu-toggle__bar:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}
}

/* --- Site content --- */
.site-content {
	padding: 2rem 0;
	min-height: calc(100vh - var(--guica-header-height) - 200px);
}

/* --- Hero (Homepage) --- */
.hero__inner {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 3rem;
	align-items: center;
	padding: 2rem 0;
}

.hero__content {
	font-size: 1.05rem;
}

.hero__photo img {
	width: 100%;
	object-fit: cover;
	border: 4px solid var(--guica-brand);
}

.hero__photo--round img {
	border-radius: 50%;
	aspect-ratio: 1;
}

.hero__photo--square img {
	border-radius: var(--guica-radius);
	aspect-ratio: 1;
}

.hero__photo--rectangle img {
	border-radius: var(--guica-radius);
	aspect-ratio: 3/4;
}

@media (max-width: 700px) {
	.hero__inner {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.hero__photo {
		order: -1;
		max-width: 200px;
		margin: 0 auto;
	}
}

/* --- Category Cards --- */
.category-cards {
	padding: 2rem 0 3rem;
}

.category-cards__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
}

.category-card {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 120px;
	padding: 1.5rem;
	background: var(--guica-brand);
	color: #fff;
	border-radius: var(--guica-radius);
	text-align: center;
	transition: transform 0.2s, box-shadow 0.2s;
	flex: 0 1 calc(25% - 0.75rem);
	min-width: 200px;
}

.category-card:hover {
	color: #fff;
	transform: translateY(-3px);
	box-shadow: 0 4px 16px rgba(214, 131, 89, 0.35);
}

.category-card__title {
	font-family: var(--guica-font-heading);
	font-weight: 900;
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

/* Alternate card colors — auto-generated from brand color */
.category-card:nth-child(6n+1) { background: var(--guica-card-1); }
.category-card:nth-child(6n+2) { background: var(--guica-card-2); }
.category-card:nth-child(6n+3) { background: var(--guica-card-3); }
.category-card:nth-child(6n+4) { background: var(--guica-card-4); }
.category-card:nth-child(6n+5) { background: var(--guica-card-5); }
.category-card:nth-child(6n+6) { background: var(--guica-card-6); }

/* --- Latest posts (homepage) --- */
.latest-posts {
	padding: 1rem 0 3rem;
	border-top: 2px solid var(--guica-border);
}

.latest-posts__title {
	color: var(--guica-brand);
	margin-bottom: 1.5rem;
}

/* --- Page content --- */
.page-header {
	margin-bottom: 2rem;
}

.page-title,
.entry-title {
	color: var(--guica-brand);
}

.entry-header {
	margin-bottom: 1.5rem;
}

.entry-meta {
	font-size: 0.875rem;
	color: var(--guica-text-light);
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.entry-thumbnail {
	margin: 0 0 1.5rem;
}

.entry-thumbnail img {
	border-radius: var(--guica-radius);
}

.entry-content {
	line-height: 1.8;
}

.entry-content h2,
.entry-content h3 {
	margin-top: 1.5em;
}

.entry-content blockquote {
	border-left: 4px solid var(--guica-brand);
	margin: 1.5em 0;
	padding: 0.5em 1.5em;
	background: var(--guica-bg-alt);
	font-style: italic;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.5em;
}

.entry-footer {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--guica-border);
	font-size: 0.875rem;
	color: var(--guica-text-light);
	display: flex;
	gap: 1.5rem;
	flex-wrap: wrap;
}

/* --- Page posts section --- */
.page-posts {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 2px solid var(--guica-border);
}

.page-posts__title {
	margin-bottom: 1.5rem;
}

/* --- Post card --- */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.post-card {
	background: var(--guica-bg);
	border: 1px solid var(--guica-border);
	border-radius: var(--guica-radius);
	overflow: hidden;
	transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
	box-shadow: var(--guica-shadow);
	transform: translateY(-2px);
}

.post-card__thumbnail img {
	width: 100%;
	aspect-ratio: 16/9;
	object-fit: cover;
}

.post-card__body {
	padding: 1.25rem;
}

.post-card__title {
	font-size: 1.1rem;
	margin-bottom: 0.25rem;
}

.post-card__title a {
	color: var(--guica-text);
}

.post-card__title a:hover {
	color: var(--guica-brand);
}

.post-card__meta {
	font-size: 0.8rem;
	color: var(--guica-text-light);
	margin-bottom: 0.75rem;
}

.post-card__excerpt {
	font-size: 0.9rem;
	color: var(--guica-text-light);
	margin-bottom: 0.75rem;
}

.post-card__more {
	font-family: var(--guica-font-heading);
	font-weight: 900;
	font-size: 0.8rem;
	text-transform: uppercase;
	color: var(--guica-brand);
}

/* --- Post navigation --- */
.post-navigation {
	margin: 2rem 0;
	padding: 1.5rem 0;
	border-top: 1px solid var(--guica-border);
	border-bottom: 1px solid var(--guica-border);
}

.post-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	gap: 2rem;
}

.post-navigation .nav-subtitle {
	display: block;
	font-size: 0.75rem;
	color: var(--guica-text-light);
	text-transform: uppercase;
}

.post-navigation .nav-title {
	font-weight: 700;
}

/* --- Pagination --- */
.pagination,
.nav-links {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin: 2rem 0;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2rem;
	height: 2rem;
	padding: 0 0.5rem;
	border: 1px solid var(--guica-border);
	border-radius: var(--guica-radius);
	font-size: 0.875rem;
	color: var(--guica-text);
}

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

/* --- Comments --- */
.comments-area {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 2px solid var(--guica-border);
}

.comments-title {
	margin-bottom: 1.5rem;
}

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

.comment-list .comment {
	padding: 1rem 0;
	border-bottom: 1px solid var(--guica-border);
}

.comment-list .comment-author {
	font-weight: 700;
}

.comment-list .comment-metadata {
	font-size: 0.8rem;
	color: var(--guica-text-light);
}

.comment-respond {
	margin-top: 2rem;
}

.comment-form label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 700;
	font-size: 0.9rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--guica-border);
	border-radius: var(--guica-radius);
	font-family: var(--guica-font);
	font-size: 0.95rem;
	transition: border-color 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--guica-brand);
}

.comment-form .form-submit .submit {
	display: inline-block;
	padding: 0.6rem 1.5rem;
	background: var(--guica-brand);
	color: #fff;
	border: none;
	border-radius: var(--guica-radius);
	font-family: var(--guica-font-heading);
	font-weight: 900;
	font-size: 0.9rem;
	cursor: pointer;
	transition: background 0.2s;
}

.comment-form .form-submit .submit:hover {
	background: var(--guica-brand-hover);
}

/* --- Contact form --- */
.contact-form-wrapper {
	margin-top: 2rem;
}

.contact-form__notice {
	padding: 1rem;
	border-radius: var(--guica-radius);
	margin-bottom: 1.5rem;
	font-weight: 700;
}

.contact-form__notice--success {
	background: #e8f5e9;
	color: #2e7d32;
	border: 1px solid #a5d6a7;
}

.contact-form__notice--error {
	background: #fbe9e7;
	color: #c62828;
	border: 1px solid #ef9a9a;
}

.contact-form__hp {
	position: absolute;
	left: -9999px;
}

.contact-form__field {
	margin-bottom: 1.25rem;
}

.contact-form__field label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 700;
	font-size: 0.9rem;
}

.contact-form__field .required {
	color: var(--guica-brand);
}

.contact-form__field input,
.contact-form__field textarea {
	width: 100%;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--guica-border);
	border-radius: var(--guica-radius);
	font-family: var(--guica-font);
	font-size: 0.95rem;
	transition: border-color 0.2s;
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
	outline: none;
	border-color: var(--guica-brand);
}

.contact-form__submit {
	display: inline-block;
	padding: 0.7rem 2rem;
	background: var(--guica-brand);
	color: #fff;
	border: none;
	border-radius: var(--guica-radius);
	font-family: var(--guica-font-heading);
	font-weight: 900;
	font-size: 0.95rem;
	cursor: pointer;
	transition: background 0.2s;
}

.contact-form__submit:hover {
	background: var(--guica-brand-hover);
}

/* Contact Form 7 compatibility */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="url"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
	width: 100%;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--guica-border);
	border-radius: var(--guica-radius);
	font-family: var(--guica-font);
	font-size: 0.95rem;
}

.wpcf7 input[type="submit"] {
	display: inline-block;
	padding: 0.7rem 2rem;
	background: var(--guica-brand);
	color: #fff;
	border: none;
	border-radius: var(--guica-radius);
	font-family: var(--guica-font-heading);
	font-weight: 900;
	font-size: 0.95rem;
	cursor: pointer;
	transition: background 0.2s;
}

.wpcf7 input[type="submit"]:hover {
	background: var(--guica-brand-hover);
}

/* --- Sites amis --- */
.sites-amis {
	background: var(--guica-brand-light);
	border-top: 3px solid var(--guica-brand);
	padding: 2rem 0;
}

.sites-amis__inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1.5rem;
	text-align: center;
}

.sites-amis__title {
	font-size: 1.2rem;
	color: var(--guica-brand);
	margin-bottom: 1rem;
}

.sites-amis__list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
}

.sites-amis__list a {
	color: var(--guica-text);
	font-weight: 700;
	font-size: 0.9rem;
}

.sites-amis__list a:hover {
	color: var(--guica-brand);
}

/* --- Footer --- */
.site-footer {
	background: var(--guica-text);
	color: #ccc;
	padding: 1.5rem 0;
	text-align: center;
	font-size: 0.85rem;
}

.site-footer__inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

.site-footer a {
	color: var(--guica-brand);
}

/* --- 404 --- */
.error-404 {
	text-align: center;
	padding: 3rem 0;
}

.error-404 .search-form {
	max-width: 400px;
	margin: 2rem auto 0;
	display: flex;
	gap: 0.5rem;
}

.error-404 .search-field {
	flex: 1;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--guica-border);
	border-radius: var(--guica-radius);
	font-family: var(--guica-font);
	font-size: 0.95rem;
}

.error-404 .search-submit {
	padding: 0.6rem 1.25rem;
	background: var(--guica-brand);
	color: #fff;
	border: none;
	border-radius: var(--guica-radius);
	font-family: var(--guica-font-heading);
	font-weight: 900;
	cursor: pointer;
}

/* --- No results --- */
.no-results {
	text-align: center;
	padding: 3rem 0;
}

/* --- Updated time hidden by default --- */
.updated:not(.published) {
	display: none;
}

/* --- Archive description --- */
.archive-description {
	margin-bottom: 2rem;
	font-size: 1.05rem;
	color: var(--guica-text-light);
}

/* --- WordPress alignment classes --- */
.alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin: 1em auto;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text {
	font-size: 0.85rem;
	color: var(--guica-text-light);
	text-align: center;
	padding: 0.5em 0;
}

/* --- Page links --- */
.page-links {
	margin: 1.5em 0;
	font-weight: 700;
}
