/**
 * Theme Name: Dentissimo Child
 * Description: Rediseño editorial del Dr. Carlos Páez — cirugía oral y maxilofacial.
 * Author: Impulsia
 * Template: dentissimo
 * Version: 2.3.2
 * Tested up to: 6.9
 * Requires PHP: 8.1
 * Text Domain: dentissimo-child
 */

:root {
	--paez-navy: #052a3d;
	--paez-blue: #2165b6;
	--paez-bg: #fafaf8;
	--paez-text: #3a4750;
	--paez-line: #e3e7ea;
	--paez-white: #ffffff;
	--paez-tint: #eef3f8;
	--paez-muted: #5f6a73;
	--paez-display: "EB Garamond", Georgia, "Times New Roman", serif;
	--paez-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--paez-container: 1200px;
	--paez-gutter: clamp(20px, 4vw, 48px);
	--paez-section: clamp(64px, 8vw, 120px);
	--paez-radius: 0px;
	--paez-speed: 200ms;
}

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

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
	overflow-x: clip;
}

body {
	margin: 0;
	background: var(--paez-bg);
	color: var(--paez-text);
	font-family: var(--paez-body);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

body.nav-open {
	overflow: hidden;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.6em;
	color: var(--paez-navy);
	font-family: var(--paez-display);
	font-weight: 500;
	line-height: 1.04;
	letter-spacing: -0.015em;
}

h1 {
	font-size: clamp(2.65rem, 5.2vw, 4.4rem);
}

h2 {
	font-size: clamp(2rem, 3.7vw, 3.2rem);
}

h3 {
	font-size: clamp(1.45rem, 2.2vw, 2rem);
}

h4 {
	font-size: clamp(1.15rem, 1.6vw, 1.4rem);
}

p {
	margin: 0 0 1.1em;
}

a {
	color: var(--paez-blue);
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--paez-navy);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
	outline: 2px solid var(--paez-blue);
	outline-offset: 3px;
}

.container {
	width: min(100% - (2 * var(--paez-gutter)), var(--paez-container));
	margin-inline: auto;
}

.section {
	padding-block: var(--paez-section);
}

.eyebrow {
	margin: 0 0 1.1rem;
	color: var(--paez-blue);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	line-height: 1.4;
	text-transform: uppercase;
}

.icon {
	flex: 0 0 auto;
	vertical-align: -0.16em;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	min-height: 46px;
	padding: 0.8rem 1.25rem;
	border: 1px solid transparent;
	border-radius: var(--paez-radius);
	font-family: var(--paez-body);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color var(--paez-speed) ease, border-color var(--paez-speed) ease, color var(--paez-speed) ease;
}

.button--primary {
	background: var(--paez-navy);
	color: var(--paez-white);
}

.button--primary:hover,
.button--primary:focus-visible {
	background: var(--paez-blue);
	color: var(--paez-white);
}

.button--ghost {
	border-color: rgba(5, 42, 61, 0.25);
	background: transparent;
	color: var(--paez-navy);
}

.button--ghost:hover,
.button--ghost:focus-visible {
	border-color: var(--paez-navy);
	background: var(--paez-navy);
	color: var(--paez-white);
}

.button--light {
	background: var(--paez-white);
	color: var(--paez-navy);
}

.button--light:hover,
.button--light:focus-visible {
	background: var(--paez-tint);
	color: var(--paez-navy);
}

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

.skip-link:focus {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 9999;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	clip: auto;
	background: var(--paez-navy);
	color: var(--paez-white);
	font-weight: 700;
}

/* Header */
.topbar {
	background: var(--paez-navy);
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.7rem;
	letter-spacing: 0.02em;
}

.topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 36px;
}

.topbar__left,
.topbar__right {
	display: flex;
	align-items: center;
	gap: 1.4rem;
}

.topbar__item,
.topbar__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.topbar__link {
	color: rgba(255, 255, 255, 0.88);
	text-decoration: none;
}

.topbar__link:hover {
	color: var(--paez-white);
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 60;
	border-bottom: 1px solid var(--paez-line);
	background: rgba(250, 250, 248, 0.94);
	backdrop-filter: blur(14px);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	min-height: 88px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	color: var(--paez-navy);
	line-height: 1;
	text-decoration: none;
}

.brand:hover {
	color: var(--paez-navy);
}

.brand__mark {
	width: 48px;
	height: 48px;
	flex: 0 0 auto;
	object-fit: contain;
}

.brand__text {
	display: flex;
	flex-direction: column;
}

.brand__name {
	font-family: var(--paez-display);
	font-size: clamp(1.35rem, 2vw, 1.55rem);
	font-weight: 600;
	letter-spacing: 0.01em;
}

.brand__sub {
	margin-top: 0.35rem;
	color: var(--paez-text);
	font-size: 0.52rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.brand--footer {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
}

.brand__logo {
	display: block;
	width: 210px;
	max-width: 100%;
	height: auto;
}

.brand__sub--footer {
	display: block;
	margin-top: 0;
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.52rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

/* Page-load logo animation */
.site-loader {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--paez-navy);
	color: var(--paez-white);
	animation: paez-loader-auto-hide 0ms 3400ms forwards;
}

.site-loader.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.site-loader__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.site-loader__mark {
	width: 100px;
	height: 100px;
	object-fit: contain;
	animation: paez-loader-mark 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.site-loader__name {
	font-family: var(--paez-display);
	font-size: 1.5rem;
	letter-spacing: 0.02em;
}

.site-loader__line {
	width: 120px;
	height: 1px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.2);
}

.site-loader__line::after {
	display: block;
	width: 100%;
	height: 100%;
	background: var(--paez-blue);
	content: "";
	transform-origin: 0 50%;
	animation: paez-loader-line 1s 0.15s ease both;
}

.site-loader.is-hidden .site-loader__inner {
	animation: paez-loader-out 500ms ease both;
}

@keyframes paez-loader-mark {
	from {
		opacity: 0;
		transform: scale(0.72) rotate(-7deg);
	}
	to {
		opacity: 1;
		transform: scale(1) rotate(0);
	}
}

@keyframes paez-loader-line {
	from {
		transform: scaleX(0);
	}
	to {
		transform: scaleX(1);
	}
}

@keyframes paez-loader-auto-hide {
	to {
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
	}
}

@keyframes paez-loader-out {
	to {
		opacity: 0;
		transform: translateY(-10px);
	}
}

.main-nav__list,
.mobile-nav__list {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-nav a {
	color: var(--paez-text);
	font-size: 0.69rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-decoration: none;
	text-transform: uppercase;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
	color: var(--paez-blue);
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.nav-toggle {
	display: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--paez-line);
	background: transparent;
	color: var(--paez-navy);
	cursor: pointer;
}

.nav-toggle span {
	display: block;
	width: 19px;
	height: 1.5px;
	margin: 4px auto;
	background: currentColor;
}

.mobile-nav {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	flex-direction: column;
	gap: 2rem;
	padding: 1.25rem var(--paez-gutter) 2rem;
	overflow-y: auto;
	background: var(--paez-bg);
}

.mobile-nav[hidden] {
	display: none;
}

.mobile-nav__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.mobile-nav__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--paez-line);
	background: transparent;
	color: var(--paez-navy);
	cursor: pointer;
}

.mobile-nav__list {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
	width: 100%;
}

.mobile-nav__list .menu-item {
	width: 100%;
	border-bottom: 1px solid var(--paez-line);
}

.mobile-nav__list a {
	display: block;
	padding: 1.05rem 0;
	color: var(--paez-navy);
	font-family: var(--paez-display);
	font-size: 1.8rem;
	line-height: 1;
	text-decoration: none;
}

.mobile-nav__contact {
	color: var(--paez-muted);
	font-size: 0.9rem;
}

.mobile-nav__contact a {
	color: var(--paez-navy);
}

/* Main */
.site-main {
	display: block;
}

.hero {
	padding-block: clamp(48px, 6vw, 84px);
}

.hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	align-items: center;
	gap: clamp(2rem, 5vw, 5rem);
}

.hero__subtitle {
	max-width: 54ch;
	color: var(--paez-text);
	font-size: clamp(1rem, 1.3vw, 1.15rem);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.8rem;
}

.hero__media {
	min-width: 0;
}

.hero__image {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.page-header {
	margin-bottom: 2rem;
}

.post-list {
	display: grid;
	gap: 1.5rem;
}

.post-card {
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--paez-line);
}

.post-card h2 {
	font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.prose {
	max-width: 72ch;
}

.prose h2,
.prose h3 {
	margin-top: 2.2em;
}

.prose img {
	display: block;
	margin-block: 2rem;
}

/* Footer */
.site-footer {
	padding-top: clamp(56px, 7vw, 90px);
	background: var(--paez-navy);
	color: rgba(255, 255, 255, 0.68);
}

.site-footer .brand,
.site-footer .brand:hover {
	color: var(--paez-white);
}

.site-footer .brand__sub {
	color: rgba(255, 255, 255, 0.6);
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.3fr 1fr 1fr 1fr;
	gap: clamp(2rem, 4vw, 4rem);
	padding-bottom: clamp(48px, 6vw, 80px);
}

.footer-col h2 {
	margin-bottom: 1.1rem;
	color: var(--paez-white);
	font-family: var(--paez-body);
	font-size: 0.64rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.footer-col p,
.footer-col li {
	font-size: 0.88rem;
	line-height: 1.7;
}

.footer-col ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-col a {
	color: rgba(255, 255, 255, 0.82);
	text-decoration: none;
}

.footer-col a:hover {
	color: var(--paez-white);
}

.footer-legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	font-size: 0.7rem;
}

.footer-legal p {
	margin: 0;
}

.footer-legal nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-legal a {
	color: rgba(255, 255, 255, 0.72);
	text-decoration: none;
}

.footer-legal a:hover {
	color: var(--paez-white);
}

/* Mobile fixed bar */
.mobile-bar {
	display: none;
}

/* Responsive */
@media (max-width: 1024px) {
	.main-nav,
	.site-header__actions .button {
		display: none;
	}

	.nav-toggle {
		display: inline-block;
	}

	.footer-grid {
		grid-template-columns: 1.2fr 1fr 1fr;
	}

	.footer-grid > :last-child {
		grid-column: 1 / -1;
	}
}

@media (max-width: 768px) {
	.topbar {
		display: none;
	}

	.site-header__inner {
		min-height: 72px;
	}

	.brand__mark {
		width: 40px;
		height: 40px;
	}

	.brand__name {
		font-size: 1.25rem;
	}

	.brand__sub {
		font-size: 0.48rem;
	}

	.brand__logo {
		width: 180px;
	}

	.hero__grid {
		grid-template-columns: 1fr;
	}

	.hero {
		padding-block: 28px 56px;
	}

	.hero__grid {
		gap: 1.5rem;
	}

	.hero__media {
		order: -1;
	}

	.hero__image {
		aspect-ratio: 16 / 10;
	}

	.hero__actions {
		margin-top: 1.25rem;
	}

	.footer-grid {
		grid-template-columns: 1fr;
	}

	.footer-grid > :last-child {
		grid-column: auto;
	}

	.footer-legal {
		flex-direction: column;
		align-items: flex-start;
	}

	body {
		padding-bottom: 64px;
	}

	.mobile-bar {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 80;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1px;
		background: var(--paez-line);
		box-shadow: 0 -8px 24px rgba(5, 42, 61, 0.12);
	}

	.mobile-bar__button {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 0.5rem;
		min-height: 64px;
		padding: 0.75rem 1rem;
		font-size: 0.72rem;
		font-weight: 700;
		letter-spacing: 0.06em;
		text-decoration: none;
		text-transform: uppercase;
	}

	.mobile-bar__button--whatsapp {
		background: var(--paez-white);
		color: var(--paez-navy);
	}

	.mobile-bar__button--agenda {
		background: var(--paez-navy);
		color: var(--paez-white);
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.site-loader {
		display: none !important;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
