/*
Theme Name: Federica Petacchia
Theme URI: https://www.federicapetacchia.com
Description: Tema su misura per Federica Petacchia Studio (Landscape + Architecture). Replica il design del sito originale; compatibile con Polylang (EN/IT) e con l'editor a blocchi.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: federica-petacchia
License: GPL-2.0-or-later
*/

:root {
	--fp-ink: #1e2025;
	--fp-pink: #f0bbd7;
	--fp-white: #ffffff;
	--fp-muted: #5b5d63;
	--fp-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--fp-content: 860px;
	--fp-wide: 1260px;
	--fp-gap: 16px;
}

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

html { -webkit-text-size-adjust: 100%; }

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

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

a { color: inherit; }
a:hover { color: var(--fp-pink); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; margin: 0 0 .6em; letter-spacing: .01em; }
h1 { font-size: 30px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
p { margin: 0 0 1.1em; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 1000;
	background: #fff; padding: 8px 16px; left: 8px; top: 8px;
}

/* ---------- Header ---------- */
.site-header {
	position: relative;
	padding: 34px 16px 28px;
	text-align: center;
	background: var(--fp-white);
}
.site-branding a { text-decoration: none; color: var(--fp-ink); }
.site-title {
	display: block;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: .27em;
	margin-right: -.27em; /* compensa lo spazio finale */
	line-height: 1.4;
}
.site-tagline {
	display: block;
	font-size: 18px;
	line-height: 1.4;
}
.site-nav { margin-top: 22px; }
.site-nav ul {
	list-style: none; margin: 0; padding: 0;
	display: flex; justify-content: center; flex-wrap: wrap;
	gap: 6px 0;
}
.site-nav li a {
	display: block;
	min-width: 133px;
	padding: 4px 12px;
	font-size: 15px;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--fp-ink);
	transition: color .2s;
}
.site-nav li a:hover,
.site-nav li.current-menu-item > a,
.site-nav li.current_page_item > a,
.site-nav li.current-menu-ancestor > a,
.site-nav li.current_page_parent > a { color: var(--fp-pink); }

.fp-lang {
	position: absolute; right: 90px; top: 104px;
	display: flex; gap: 4px; font-size: 14px;
}
.fp-lang a, .fp-lang span {
	text-decoration: none; padding: 4px 8px; border: 1px solid transparent; text-transform: uppercase;
}
.fp-lang .is-current { border-color: var(--fp-ink); }

.menu-toggle {
	display: none;
	background: none; border: 0; cursor: pointer;
	margin: 18px auto 0; padding: 8px 12px;
	font: inherit; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--fp-ink);
}
.menu-toggle .bars { display: inline-block; width: 18px; height: 12px; position: relative; margin-right: 8px; vertical-align: -1px;
	border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.menu-toggle .bars::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 2px solid currentColor; }

/* ---------- Contenuto ---------- */
.site-main { padding: 50px 16px 90px; min-height: 40vh; }
.entry-content > * { max-width: var(--fp-content); margin-left: auto; margin-right: auto; }
.entry-content > .alignwide { max-width: var(--fp-wide); }
.entry-content > .alignfull { max-width: none; margin-left: -16px; margin-right: -16px; }
.entry-content > .fp-w-s { max-width: 730px; }
.entry-content > .fp-w-m { max-width: 980px; }
.entry-content > .fp-w-l { max-width: 1100px; }
.site-main:has(.entry-content > .alignfull:last-child) { padding-bottom: 0; }
.entry-content > .alignfull:last-child { margin-bottom: 0; }

.page-title, .entry-title { font-size: 20px; font-weight: 700; margin-bottom: 40px; }

/* Blocchi WordPress */
.wp-block-image { margin: 0 0 var(--fp-gap); }
.wp-block-image img { width: 100%; }
.wp-block-image figcaption, .wp-element-caption { font-size: 14px; color: var(--fp-muted); margin-top: 6px; }
.wp-block-columns { display: flex; gap: var(--fp-gap); margin-bottom: var(--fp-gap); }
.wp-block-column { flex: 1 1 0; min-width: 0; }
.wp-block-column > *:last-child { margin-bottom: 0; }
.wp-block-separator { border: 0; border-top: 1px solid var(--fp-ink); margin: 0 0 30px; }

/* Bottoni (stile "outline" come nel sito originale) */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0; }
.entry-content .wp-block-buttons { justify-content: center; }
.wp-block-button__link, .fp-button, .fp-form button {
	display: inline-block;
	padding: 9px 30px;
	border: 1px solid var(--fp-ink);
	border-radius: 0;
	background: transparent;
	color: var(--fp-ink);
	font: 15px/1.5 var(--fp-font);
	letter-spacing: .06em;
	text-decoration: none;
	cursor: pointer;
	transition: background .2s, color .2s;
}
.wp-block-button__link:hover, .fp-button:hover { background: var(--fp-ink); color: #fff; }

/* Righe di immagini (gallerie progetto): altezza fissa + ritaglio */
.fp-row { align-items: stretch; margin-bottom: 18px; }
.fp-row .wp-block-image { margin: 0; height: 100%; }
.fp-row .wp-block-image a { display: block; height: 100%; }
.fp-row .wp-block-image img { height: 100%; object-fit: cover; }
.fp-row.fp-h-400 .wp-block-image { height: 396px; }
.fp-row.fp-h-450 .wp-block-image { height: 447px; }
.fp-row.fp-h-560 .wp-block-image { height: 557px; }
.fp-row.fp-h-620 .wp-block-image { height: 620px; }
.fp-row.fp-h-850 .wp-block-image { height: 854px; }
.fp-row.fp-gap-l { gap: 30px; }

.fp-page-heading { font-size: 20px; margin: 30px auto 40px; }
.entry-content > .fp-project-title { font-size: 16px; font-weight: 700; margin: 6px auto 22px; }
.fp-project-title a { text-decoration: none; }

/* Slideshow home */
.entry-content > .fp-slideshow.wp-block-gallery { display: block; position: relative; margin: 0 auto 28px; aspect-ratio: 1257 / 1131; overflow: hidden; }
/* ":not(#fp)" serve a superare la specificità degli stili delle gallerie di WordPress */
.fp-slideshow.wp-block-gallery.has-nested-images figure.wp-block-image:not(#fp) {
	position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
	opacity: 0; transition: opacity 1.2s ease;
}
.fp-slideshow.wp-block-gallery.has-nested-images figure.wp-block-image:not(#fp) img { width: 100%; height: 100%; object-fit: cover; }
.fp-slideshow.wp-block-gallery.has-nested-images figure.wp-block-image:not(#fp):first-child,
.fp-slideshow.wp-block-gallery.has-nested-images figure.wp-block-image:not(#fp).is-active { opacity: 1; }
.fp-slideshow.is-running.wp-block-gallery.has-nested-images figure.wp-block-image:not(#fp):first-child:not(.is-active) { opacity: 0; }

.entry-content > .fp-video { margin: 0 auto 44px; aspect-ratio: 729 / 456; overflow: hidden; }
.fp-video video { width: 100%; height: 100%; object-fit: cover; }

/* Servizi: card */
.entry-content .wp-block-columns.fp-cards { justify-content: center; gap: 31px; }
.entry-content .wp-block-columns.fp-cards > .wp-block-column { flex: 0 0 223px; text-align: center; }
.fp-cards .wp-block-image { height: 398px; margin-bottom: 14px; overflow: hidden; }
.fp-cards .wp-block-image a { display: block; height: 100%; }
.fp-cards .wp-block-image img { height: 100%; object-fit: cover; }
.fp-cards h2 { font-size: 18px; margin: 0 0 18px; }
.fp-cards .wp-block-buttons { margin: 0; justify-content: center; }

/* Servizi: tre colonne numerate */
.fp-steps { gap: 60px; text-align: center; }
.fp-steps .wp-block-column { font-size: 17px; line-height: 1.9; }
.fp-num {
	width: 84px; height: 84px; border-radius: 50%;
	background: var(--fp-pink); color: var(--fp-ink);
	display: flex; align-items: center; justify-content: center;
	margin: 0 auto 36px !important;
	font-size: 36px; font-weight: 700; line-height: 1;
}
.fp-steps h3 { font-size: 20px; min-height: 2.6em; margin-bottom: 40px; }

/* About */
.fp-about h2 { font-size: 30px; margin-bottom: 12px; }
.fp-about h3 { font-size: 16px; margin: 0; }
.fp-about p { font-size: 15.5px; line-height: 1.95; }
.fp-about .fp-li-logo { width: 104px; margin-bottom: 40px; }
.fp-about .fp-link a { text-transform: uppercase; letter-spacing: .06em; font-size: 15px; }
.entry-content .wp-block-columns.fp-about { gap: 60px; margin-bottom: 110px; align-items: center; }
.entry-content .wp-block-columns.fp-about.fp-w-l { align-items: flex-start; gap: 40px; }
.fp-banner.wp-block-image { margin-top: 40px; }
.fp-banner.wp-block-image img { height: 440px; object-fit: cover; }

/* Contatti */
.fp-contact { gap: 80px; }
.fp-contact h2 { font-size: 36px; font-weight: 400; margin-bottom: 70px; }
.fp-contact h3 { font-size: 22px; margin-bottom: 8px; }
.fp-contact p { margin-bottom: 6px; line-height: 1.6; }
.fp-form .fp-field { margin-bottom: 18px; }
.fp-form .fp-two { display: flex; gap: 18px; }
.fp-form .fp-two .fp-field { flex: 1; }
.fp-form label { display: block; font-size: 14px; margin-bottom: 4px; }
.fp-form input[type=text], .fp-form input[type=email], .fp-form textarea {
	width: 100%; border: 1px solid var(--fp-ink); border-radius: 0; padding: 9px 10px;
	font: 16px var(--fp-font); color: var(--fp-ink); background: #fff;
}
.fp-form textarea { height: 86px; resize: vertical; }
.fp-form .fp-actions { text-align: right; }
.fp-form button { background: var(--fp-ink); color: #fff; min-width: 117px; letter-spacing: 0; }
.fp-form button:hover { background: #000; }
.fp-form .fp-hp { position: absolute; left: -9999px; }
.fp-notice { padding: 10px 14px; margin-bottom: 18px; border: 1px solid var(--fp-ink); }
.fp-notice.is-error { border-color: #b3261e; color: #b3261e; }

/* News */
.fp-news-item { display: flex; gap: 60px; margin: 0 auto 70px; max-width: 980px; }
.fp-news-item .fp-news-img { flex: 0 0 330px; }
.fp-news-item .fp-news-img img { width: 100%; aspect-ratio: 330 / 232; object-fit: cover; }
.fp-news-item .fp-news-body { flex: 1; border-top: 1px solid var(--fp-ink); padding-top: 50px; margin-top: 26px; }
.fp-news-item h2 { font-size: 30px; font-weight: 400; margin-bottom: 14px; }
.fp-news-item h2 a { text-decoration: none; }
.fp-news-item .fp-news-excerpt { font-size: 14px; }
.single .entry-header { max-width: var(--fp-content); margin: 0 auto 30px; }
.single .entry-title { font-size: 30px; font-weight: 400; }
.single .post-thumbnail { max-width: var(--fp-content); margin: 0 auto 30px; }

/* ---------- Footer ---------- */
.site-footer {
	background: var(--fp-pink);
	color: var(--fp-white);
	text-align: center;
	padding: 10px 16px 30px;
	font-size: 14px;
	line-height: 1.6;
}
.site-footer a { color: var(--fp-white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--fp-white); }
.fp-social { display: flex; justify-content: center; gap: 10px; margin: 6px 0 8px; }
.fp-social a { display: block; width: 26px; height: 26px; }
.fp-social svg { width: 100%; height: 100%; fill: var(--fp-white); }
.site-footer .fp-address { margin: 0 0 30px; text-transform: none; }
.site-footer .fp-copy { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.fp-lang { position: static; justify-content: center; margin-top: 12px; }
}
@media (max-width: 800px) {
	.site-header { padding-top: 24px; }
	.site-title { font-size: 18px; letter-spacing: .28em; margin-right: -.28em; }
	.site-tagline { font-size: 15px; }
	.menu-toggle { display: inline-block; }
	.site-nav { display: none; margin-top: 10px; }
	.site-nav.is-open { display: block; }
	.site-nav ul { flex-direction: column; }
	.site-nav li a { padding: 8px; }

	.site-main { padding-top: 24px; }
	.wp-block-columns { flex-direction: column; gap: 14px; }
	.wp-block-column { flex-basis: auto !important; }
	.fp-row .wp-block-image, .fp-row[class*="fp-h-"] .wp-block-image { height: auto; }
	.fp-row .wp-block-image img { height: auto; }
	.entry-content .wp-block-columns.fp-cards > .wp-block-column { flex: 1 1 auto; max-width: 320px; width: 100%; margin: 0 auto; }
	.fp-cards .wp-block-image { height: auto; }
	.fp-steps { gap: 50px; }
	.fp-steps h3 { min-height: 0; margin-bottom: 16px; }
	.entry-content .wp-block-columns.fp-about { gap: 30px; margin-bottom: 60px; }
	.fp-banner.wp-block-image img { height: 260px; }
	.fp-contact { gap: 30px; }
	.fp-contact h2 { margin-bottom: 24px; }
	.fp-form .fp-two { flex-direction: column; gap: 0; }
	.fp-news-item { flex-direction: column; gap: 10px; }
	.fp-news-item .fp-news-img { flex: none; }
	.fp-news-item .fp-news-body { padding-top: 20px; }
	.site-footer .fp-address span { display: block; }
	.site-footer .fp-address .fp-sep { display: none; }
}
