/*
Theme Name: Malatesta
Theme URI: https://malatesta.red-icon.ch/
Author: Red Icon Communication
Author URI: https://red-icon.com/
Description: Tema custom per il sito del Dott. Francesco Malatesta, inizializzato dalla grafica HTML fornita.
Version: 0.1.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: malatesta
*/

:root {
	--malatesta-header-ink: rgba(255, 255, 255, 0.92);
	--malatesta-header-muted: rgba(255, 255, 255, 0.58);
	--malatesta-header-line: rgba(255, 255, 255, 0.15);
	--malatesta-header-bg: rgba(13, 19, 30, 0.44);
	--malatesta-header-panel: rgba(13, 19, 30, 0.82);
}

.malatesta-footer {
	border-top: 1px solid var(--border, rgba(15, 23, 42, 0.12));
	background: var(--background, #fff);
	color: var(--foreground, #101827);
}

.malatesta-footer a {
	color: inherit;
	text-decoration: none;
	transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.malatesta-footer a:hover,
.malatesta-footer a:focus-visible {
	color: var(--primary, #7b5d45);
}

.malatesta-footer__grid {
	display: grid;
	gap: 34px;
	padding-top: 80px;
	padding-bottom: 72px;
}

.malatesta-footer__name {
	margin: 0;
	font-family: "Cormorant Garamond", serif;
	font-size: clamp(2rem, 3vw, 3rem);
	font-weight: 400;
	line-height: 1;
}

.malatesta-footer__text,
.malatesta-footer__legal,
.malatesta-footer__micro {
	max-width: 34rem;
	margin: 14px 0 0;
	color: var(--muted-foreground, rgba(16, 24, 39, 0.62));
	font-size: 13px;
	line-height: 1.8;
}

.malatesta-footer__legal {
	margin-top: 24px;
	padding-top: 22px;
	border-top: 1px solid var(--border, rgba(15, 23, 42, 0.12));
	font-size: 12px;
}

.malatesta-footer__heading {
	margin: 0;
	color: var(--muted-foreground, rgba(16, 24, 39, 0.62));
	font-size: 10px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
}

.malatesta-footer__brand-social {
	margin-top: 32px;
	padding-top: 28px;
	border-top: 1px solid var(--border, rgba(15, 23, 42, 0.12));
}

.malatesta-footer__list,
.malatesta-footer__phones {
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.malatesta-footer__list {
	display: grid;
	gap: 8px;
	font-size: 14px;
	line-height: 1.35;
}

.malatesta-footer__phones {
	display: grid;
	gap: 10px;
	max-width: 24rem;
	font-size: 12px;
	line-height: 1.45;
}

.malatesta-footer__phones li {
	display: grid;
	gap: 2px;
}

.malatesta-footer__phones span {
	color: var(--muted-foreground, rgba(16, 24, 39, 0.62));
}

.malatesta-footer__socials {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
}

.malatesta-footer__socials a {
	display: inline-flex;
	width: 42px;
	height: 42px;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--border, rgba(15, 23, 42, 0.12));
	border-radius: 999px;
	background: color-mix(in oklab, var(--background, #fff) 84%, var(--foreground, #101827) 4%);
	color: var(--foreground, #101827);
}

.malatesta-footer__socials a:hover,
.malatesta-footer__socials a:focus-visible {
	background: var(--foreground, #101827);
	color: var(--background, #fff);
	transform: translateY(-1px);
}

.malatesta-footer__socials svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.malatesta-footer__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	margin-top: 24px;
	padding: 0 18px;
	border: 1px solid var(--border, rgba(15, 23, 42, 0.12));
	border-radius: 999px;
	font-size: 10px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.malatesta-footer__bottom {
	border-top: 1px solid var(--border, rgba(15, 23, 42, 0.12));
}

.malatesta-footer__bottom-inner {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 22px;
	padding-bottom: 22px;
	color: var(--muted-foreground, rgba(16, 24, 39, 0.62));
	font-size: 12px;
}

@media (min-width: 768px) {
	.malatesta-footer__grid {
		grid-template-columns: minmax(0, 6fr) minmax(0, 2.4fr) minmax(0, 3.6fr);
	}

	.malatesta-footer__bottom-inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

.malatesta-header {
	position: fixed;
	inset: 18px 0 auto;
	z-index: 80;
	pointer-events: none;
	color: var(--malatesta-header-ink);
}

.malatesta-header__inner {
	width: min(1180px, calc(100% - 40px));
	min-height: 72px;
	margin: 0 auto;
	padding: 0 18px 0 22px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 22px;
	border: 1px solid var(--malatesta-header-line);
	border-radius: 18px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035)), var(--malatesta-header-bg);
	box-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
	backdrop-filter: blur(18px) saturate(140%);
	-webkit-backdrop-filter: blur(18px) saturate(140%);
	pointer-events: auto;
}

.malatesta-header__brand {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
}

.malatesta-header__brand-name {
	font-family: "Cormorant Garamond", serif;
	font-size: 20px;
	font-weight: 400;
	line-height: 1;
}

.malatesta-header__brand-kicker {
	font-size: 9px;
	line-height: 1;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--malatesta-header-muted);
}

.malatesta-header__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
	flex: 1;
}

.malatesta-header__item {
	position: relative;
}

.malatesta-header__link {
	display: block;
	appearance: none;
	border: 0;
	background: transparent;
	color: rgba(255, 255, 255, 0.78);
	padding: 27px 10px;
	font: 300 12px/1 "Inter", sans-serif;
	letter-spacing: 0.075em;
	cursor: pointer;
	text-decoration: none;
	transition: color 180ms ease;
}

.malatesta-header__item:hover .malatesta-header__link,
.malatesta-header__item:focus-within .malatesta-header__link {
	color: #fff;
}

.malatesta-header__dropdown {
	position: absolute;
	top: calc(100% + 9px);
	left: 50%;
	width: 360px;
	padding: 18px 22px 22px;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 28px;
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
	backdrop-filter: blur(24px) saturate(160%);
	-webkit-backdrop-filter: blur(24px) saturate(160%);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 8px);
	transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.malatesta-header__item:hover .malatesta-header__dropdown,
.malatesta-header__item:focus-within .malatesta-header__dropdown {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}

.malatesta-header__dropdown-title {
	margin: 0 0 18px;
	padding: 0 0 16px;
	border-bottom: 1px solid rgba(15, 23, 42, 0.08);
	color: rgba(15, 23, 42, 0.66);
	font: 400 18px/1.25 "Cormorant Garamond", serif;
}

.malatesta-header__dropdown-list {
	display: grid;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.malatesta-header__dropdown-list a {
	position: relative;
	display: grid;
	gap: 4px;
	padding: 11px 12px 11px 30px;
	border-radius: 14px;
	color: rgba(15, 23, 42, 0.92);
	text-decoration: none;
	transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.malatesta-header__dropdown-list a::before {
	content: "";
	position: absolute;
	top: 18px;
	left: 12px;
	width: 5px;
	height: 5px;
	border-radius: 999px;
	background: color-mix(in oklab, var(--teal, #7dbdc3) 78%, white);
	transition: transform 180ms ease, background 180ms ease;
}

.malatesta-header__dropdown-link-title {
	font-family: "Cormorant Garamond", serif;
	font-size: 20px;
	line-height: 1.05;
}

.malatesta-header__dropdown-link-desc {
	color: rgba(15, 23, 42, 0.62);
	font-size: 13px;
	line-height: 1.35;
}

.malatesta-header__dropdown-list a:hover,
.malatesta-header__dropdown-list a:focus-visible {
	background: color-mix(in oklab, var(--primary, #8b6f54) 6%, transparent);
	color: var(--primary, #8b6f54);
	transform: translateX(2px);
}

.malatesta-header__dropdown-list a:hover::before,
.malatesta-header__dropdown-list a:focus-visible::before {
	transform: scale(1.5);
}

.malatesta-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.malatesta-header__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 0 16px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.07);
	color: #fff;
	text-decoration: none;
	font-size: 10.5px;
	font-weight: 300;
	line-height: 1;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
	white-space: nowrap;
}

.malatesta-header__cta:hover,
.malatesta-header__cta:focus-visible {
	background: rgba(255, 255, 255, 0.14);
	box-shadow: 0 0 30px rgba(255, 255, 255, 0.24);
	transform: translateY(-1px);
}

.malatesta-header__toggle {
	display: none;
	width: 42px;
	height: 42px;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 6px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
	cursor: pointer;
}

.malatesta-header__toggle span {
	width: 17px;
	height: 1px;
	background: currentColor;
}

.malatesta-mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 79;
	display: none;
	padding: 20px;
	background: rgba(5, 10, 18, 0.68);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	pointer-events: auto;
	opacity: 0;
	visibility: hidden;
	transition: opacity 220ms ease, visibility 220ms ease;
}

.malatesta-mobile-menu__panel {
	min-height: calc(100svh - 40px);
	padding: 24px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 22px;
	background: linear-gradient(180deg, rgba(20, 28, 42, 0.94), rgba(9, 15, 26, 0.96));
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
	overflow-y: auto;
}

.malatesta-mobile-menu__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 30px;
	color: rgba(255, 255, 255, 0.58);
	font-size: 10px;
	letter-spacing: 0.28em;
	text-transform: uppercase;
}

.malatesta-mobile-menu__close {
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 10px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	cursor: pointer;
}

.malatesta-mobile-menu__section {
	padding: 22px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.malatesta-mobile-menu__direct {
	display: block;
	padding: 22px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	color: #fff;
	font-family: "Cormorant Garamond", serif;
	font-size: 30px;
	line-height: 1;
	text-decoration: none;
}

.malatesta-mobile-menu__section p {
	margin: 0 0 12px;
	font-family: "Cormorant Garamond", serif;
	font-size: 30px;
	line-height: 1;
	color: #fff;
}

.malatesta-mobile-menu__section div {
	display: flex;
	flex-wrap: wrap;
	gap: 9px 14px;
}

.malatesta-mobile-menu__section a {
	display: grid;
	gap: 3px;
	color: rgba(255, 255, 255, 0.72);
	text-decoration: none;
	font-size: 13px;
	line-height: 1.2;
}

.malatesta-mobile-menu__section a span {
	color: rgba(255, 255, 255, 0.45);
	font-size: 11px;
	line-height: 1.3;
}

.malatesta-mobile-menu__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	margin-top: 24px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	text-decoration: none;
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.malatesta-menu-open {
	overflow: hidden;
}

.malatesta-menu-open .malatesta-mobile-menu {
	opacity: 1;
	visibility: visible;
}

@media (max-width: 1140px) {
	.malatesta-header__nav {
		display: none;
	}

	.malatesta-header__toggle {
		display: inline-flex;
	}

	.malatesta-mobile-menu {
		display: block;
	}
}

@media (max-width: 720px) {
	.malatesta-header {
		top: 12px;
	}

	.malatesta-header__inner {
		width: min(100% - 24px, 1180px);
		min-height: 64px;
		padding: 0 12px 0 16px;
		border-radius: 16px;
	}

	.malatesta-header__brand-kicker,
	.malatesta-header__cta {
		display: none;
	}

	.malatesta-header__brand-name {
		font-size: 19px;
	}

	.malatesta-mobile-menu {
		padding: 12px;
	}

	.malatesta-mobile-menu__panel {
		min-height: calc(100svh - 24px);
		padding: 22px;
		border-radius: 18px;
	}
}
