/*
Theme Name: Mirko Battipaglia
Theme URI: https://www.mirkobattipaglia.com
Author: Mirko Battipaglia
Description: Tema su misura per il sito di Mirko Battipaglia Hairstylist. Struttura, menu e colori del sito precedente; portfolio e saloni nativi, senza plugin.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: mirko-battipaglia
*/

/* ---------- Font (ospitati nel tema) ---------- */
@font-face { font-family: "Lato"; font-weight: 300; font-style: normal; font-display: swap; src: url("assets/fonts/lato-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/lato-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/lato-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/playfair-display-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 400; font-style: italic; font-display: swap; src: url("assets/fonts/playfair-display-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/playfair-display-latin-700-normal.woff2") format("woff2"); }

/* ---------- Colori e misure (dal tema precedente) ---------- */
:root {
	--gold: #b69e59;
	--gold-light: #d3bd83;
	--gold-dark: #8b732f;
	--ink: #000;
	--slate: #545f64;
	--mist: #97aab4;
	--line: #d8d8d8;
	--paper: #ededed;
	--dark: #1e2022;
	--footer: #212529;
	--muted: #72777e;
	--white: #fff;

	--serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--sans: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--wrap: 1140px;
	--wrap-narrow: 760px;
	--gap: clamp(1rem, 3vw, 2rem);
	--header-h: 84px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--slate); font: 400 1.0625rem/1.75 var(--sans); }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: .2em; }
a:hover, a:active { color: var(--gold-dark); }
:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0 0 .6em; color: var(--ink); line-height: 1.2; }
h1, h3 { font-family: var(--serif); font-weight: 400; }
h2, h4 { font-family: var(--sans); font-weight: 300; }
p { margin: 0 0 1.2em; }
.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: .5rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--white); padding: .6rem 1rem; }
.skip-link:focus { top: .5rem; color: var(--white); }
.wrap { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gap), var(--wrap-narrow)); }
.center { text-align: center; }

/* ---------- Barra in alto e testata ---------- */
.topbar { background: var(--dark); color: var(--white); }
.topbar__inner { display: flex; justify-content: flex-end; min-height: 38px; align-items: center; }
.social { display: flex; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.social a { display: grid; place-items: center; width: 36px; height: 36px; color: var(--gold-light); }
.social a:hover { color: var(--white); }

.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--header-h); }
.brand img { max-height: 56px; width: auto; }
.brand__text { font: 400 1.5rem/1 var(--serif); color: var(--ink); text-decoration: none; }
.site-nav .menu { display: flex; flex-wrap: wrap; gap: .25rem 2rem; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: block; padding: .5rem 0; color: var(--ink); font: 700 .75rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { color: var(--gold-dark); border-bottom-color: var(--gold); }

.nav-toggle { display: none; width: 44px; height: 44px; padding: 0; background: none; border: 1px solid var(--line); cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 20px; height: 2px; margin: auto; background: var(--ink); content: ""; position: relative; }
.nav-toggle__bars::before { top: -7px; position: absolute; left: 0; }
.nav-toggle__bars::after { top: 7px; position: absolute; left: 0; }

@media (max-width: 900px) {
	:root { --header-h: 68px; }
	.nav-toggle { display: block; }
	.site-nav { position: absolute; inset: 100% 0 auto 0; background: var(--white); border-bottom: 1px solid var(--line); display: none; }
	.site-nav.is-open { display: block; }
	.site-nav .menu { flex-direction: column; gap: 0; padding: .5rem var(--gap) 1rem; }
	.site-nav a { padding: .9rem 0; border-bottom: 1px solid var(--paper); }
}

/* ---------- Prima schermata ---------- */
.hero { position: relative; display: grid; align-items: center; min-height: clamp(420px, 78vh, 760px); background: var(--dark); color: var(--white); overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero__inner { position: relative; padding-block: 4rem 5rem; text-align: center; }
.hero__sub { margin: 0 0 1rem; color: var(--gold-light); font: 300 1.125rem/1 var(--sans); letter-spacing: .4em; text-indent: .4em; }
.hero__title { margin: 0 0 1.25rem; color: var(--white); font-size: clamp(2.75rem, 9vw, 6.5rem); line-height: 1.02; }
.hero__text { max-width: 36rem; margin: 0 auto 2rem; color: var(--paper); font-weight: 300; font-size: 1.1875rem; }

/* ---------- Pulsanti ---------- */
.button { display: inline-block; padding: .95rem 2.2rem; background: var(--gold); border: 1px solid var(--gold); color: var(--ink); font: 700 .75rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s; }
.button:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--white); }
.button--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.button--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.section--dark .button--ghost { color: var(--white); border-color: var(--white); }

/* ---------- Sezioni ---------- */
.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section--paper { background: var(--paper); }
.section--dark { background: var(--dark); color: var(--line); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark a { color: var(--gold-light); }
.section--dark a:hover { color: var(--white); }
.section__title { position: relative; margin: 0 0 clamp(2rem, 5vw, 3.5rem); padding-bottom: 1.25rem; text-align: center; font: 300 clamp(1.9rem, 5vw, 2.75rem)/1.15 var(--sans); letter-spacing: .12em; color: var(--ink); }
.section__title::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 64px; height: 2px; margin-left: -32px; background: var(--gold); }
.section--dark .section__title { color: var(--white); }

/* ---------- Testi lunghi ---------- */
.prose { font-size: 1.125rem; }
.prose > p:first-child { color: var(--ink); font: 400 1.375rem/1.6 var(--serif); }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose ul { columns: 3 11rem; column-gap: 2rem; list-style: none; padding: 0; text-align: center; }
.prose li { break-inside: avoid; margin-bottom: .35rem; }
.prose img { margin-inline: auto; }
.prose blockquote { margin: 2rem 0; padding-left: 1.5rem; border-left: 2px solid var(--gold); font: italic 400 1.25rem/1.6 var(--serif); color: var(--ink); }

/* ---------- Marchi ---------- */
.brands__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); margin: 0; padding: 0; list-style: none; align-items: center; }
.brands__list img { margin-inline: auto; max-height: 220px; width: auto; }

/* ---------- Portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.5rem; margin-bottom: 2rem; }
.filters__btn { padding: .5rem 0; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--slate); font: 700 .75rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.filters__btn:hover, .filters__btn[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--gold); }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 2.5rem; padding: 0; list-style: none; }
.grid__item[hidden] { display: none; }
.grid__item a { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper); }
.grid__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.grid__item a:hover img { transform: scale(1.04); }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 6px; } }

.lightbox { width: min(96vw, 1000px); max-height: 96vh; padding: 0; background: var(--dark); border: 0; color: var(--white); text-align: center; overflow: auto; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox__img { width: auto; max-height: 82vh; margin: 0 auto; }
.lightbox__more { display: inline-block; padding: 1rem; color: var(--gold-light); font-size: .875rem; }
.lightbox__close { position: absolute; top: .25rem; right: .5rem; width: 44px; height: 44px; background: rgba(0, 0, 0, .5); border: 0; color: var(--white); font-size: 2rem; line-height: 1; cursor: pointer; }

/* ---------- News ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap); margin-bottom: 2.5rem; }
.card { background: var(--white); }
.card__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card__body { padding: 1.25rem 1.5rem 1.5rem; }
.card__date { display: block; margin-bottom: .5rem; color: var(--gold-dark); font-size: .875rem; letter-spacing: .06em; }
.card__title { font-size: 1.375rem; }
.card__title a { text-decoration: none; }
.card__title a:hover { text-decoration: underline; }
.card p:last-child { margin-bottom: 0; }

/* ---------- Saloni ---------- */
.tabs__list { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 2rem; margin-bottom: 2.5rem; }
.tabs__tab { padding: .6rem 0; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--line); font: 700 .8125rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.tabs__tab:hover { color: var(--white); }
.tabs__tab[aria-selected="true"] { color: var(--white); border-bottom-color: var(--gold); }
.tabs__panel[hidden] { display: none; }
.salon { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--gap); align-items: start; }
.salon__info h3 { font-size: 1.75rem; }
.salon__map iframe { display: block; width: 100%; height: 360px; border: 0; background: var(--footer); }
@media (max-width: 800px) { .salon { grid-template-columns: 1fr; } }

/* ---------- Modulo ---------- */
.form__row { margin-bottom: 1.5rem; }
.form label { display: block; margin-bottom: .35rem; color: var(--ink); font-size: .875rem; letter-spacing: .06em; }
.form input[type="text"], .form input[type="email"], .form textarea { width: 100%; padding: .75rem .25rem; background: transparent; border: 0; border-bottom: 1px solid var(--slate); border-radius: 0; color: var(--ink); font: inherit; }
.form input:focus, .form textarea:focus { outline: 0; border-bottom: 2px solid var(--gold-dark); }
.form__check { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 2rem; }
.form__check input { margin-top: .45rem; width: 1.1rem; height: 1.1rem; accent-color: var(--gold-dark); }
.form__check label { margin: 0; font-size: .9375rem; letter-spacing: 0; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { margin: 0 0 2rem; padding: 1rem 1.25rem; border-left: 4px solid var(--gold); background: var(--white); color: var(--ink); }
.notice--err { border-left-color: #a33; }
.search { display: flex; gap: .5rem; justify-content: center; }
.search input { padding: .75rem; border: 1px solid var(--line); font: inherit; }

/* ---------- Articoli e pagine ---------- */
.entry-header { margin-bottom: 2rem; text-align: center; }
.entry-title { font-size: clamp(2rem, 5vw, 3rem); }
.entry-figure { margin: 0 0 2rem; }
.entry-figure img { margin-inline: auto; }
.tags { color: var(--muted); font-size: .9375rem; }
.pager, .post-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; font-size: .9375rem; }
.pager > * { flex: 1; }
.pager > :nth-child(2) { text-align: center; }
.pager > :last-child, .post-navigation .nav-next { text-align: right; }
.pagination { margin-top: 2rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1rem; }
.pagination .current { color: var(--ink); font-weight: 700; }
.comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.comments__list { padding-left: 1.2rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: .6rem; border: 1px solid var(--line); font: inherit; }

/* ---------- Piè di pagina ---------- */
.site-footer { background: var(--footer); color: var(--line); }
.site-footer__inner { display: grid; justify-items: center; gap: 1.25rem; padding-block: 3rem; text-align: center; }
.site-footer__logo img { max-height: 64px; width: auto; }
.site-footer a { color: var(--gold); }
.site-footer a:hover { color: var(--white); }
.site-footer .social a { color: var(--gold); }
.footer-nav .menu { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; margin: 0; padding: 0; list-style: none; font-size: .9375rem; }
.subfooter { background: var(--white); color: var(--muted); font-size: .75rem; line-height: 1.8; text-align: center; }
.subfooter p { margin: 0; padding: 1rem 0; }

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
