/**
 * Dekeratina.com — home.css v1.3
 * Portada dinámica. No modifica single.css ni el layout editorial aprobado.
 */

.dk-home-page .site-content {
	padding: 0;
	background: var(--dk-white);
}

.dk-home-page .site-content > .ast-container {
	display: block;
	width: 100%;
	max-width: none;
	padding: 0;
}

.dk-home-page #primary,
.dk-home-page .dk-home-main {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

.dk-home-page #secondary,
.dk-home-page .entry-header,
.dk-home-page .entry-title,
.dk-home-page .post-thumb {
	display: none;
}

.dk-home-container {
	width: min(calc(100% - 48px), 1180px);
	margin-inline: auto;
}

.dk-home-section {
	padding: clamp(68px, 8vw, 108px) 0;
}

.dk-home-page .dk-home-main p {
	font-size: 17px;
	line-height: 1.72;
}

.dk-home-section--white {
	background: var(--dk-white);
}

.dk-home-section--ivory {
	background: var(--dk-bg);
}

.dk-home-section--sage {
	background: var(--dk-sage-100);
}

.dk-home-eyebrow {
	margin: 0 0 12px !important;
	color: var(--dk-accent);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-transform: uppercase;
}

.dk-home-section-head {
	max-width: 760px;
	margin: 0 auto 34px;
	text-align: center;
}

.dk-home-section-head h2,
.dk-home-hair-path h2,
.dk-home-about h2 {
	margin: 0 0 14px;
	color: var(--dk-charcoal);
	font-family: var(--dk-font-display);
	font-size: clamp(2.2rem, 4vw, 3.35rem);
	font-weight: 600;
	line-height: 1.02;
	letter-spacing: -0.035em;
}

.dk-home-section-head > p:last-child {
	max-width: 680px;
	margin: 0 auto;
	color: var(--dk-text-muted);
	font-size: 1rem;
	line-height: 1.72;
}

.dk-home-section-head--split {
	display: flex;
	max-width: none;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
	text-align: left;
}

.dk-home-section-head--split > div {
	max-width: 720px;
}

.dk-home-section-head--split > div > p:last-child {
	margin: 0;
	color: var(--dk-text-muted);
	line-height: 1.72;
}

.dk-home-section-head--split h2 {
	margin-bottom: 12px;
}

.dk-home-text-link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--dk-primary);
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

.dk-home-text-link:hover,
.dk-home-text-link:focus-visible {
	color: var(--dk-accent);
}

/* Hero */
.dk-home-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	min-height: clamp(590px, 44vw, 720px);
	padding: clamp(78px, 8vw, 118px) 0 clamp(72px, 7vw, 104px);
	background: var(--dk-bg);
}

/*
 * En escritorio la imagen destacada de Inicio se convierte en el fondo
 * editorial del hero. La composición original deja aire a la izquierda para
 * el H1 y concentra el cabello a la derecha.
 */
.dk-home-hero::before {
	content: "";
	position: absolute;
	z-index: -2;
	inset: 0;
	background-color: var(--dk-bg);
	background-image:
		linear-gradient(
			90deg,
			rgba(248, 245, 239, 0.99) 0%,
			rgba(248, 245, 239, 0.97) 25%,
			rgba(248, 245, 239, 0.88) 39%,
			rgba(248, 245, 239, 0.53) 52%,
			rgba(248, 245, 239, 0.12) 67%,
			rgba(248, 245, 239, 0) 79%
		),
		var(--dk-home-hero-image, none);
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
}

/* Suaviza el borde inferior sin convertir la imagen en una tarjeta. */
.dk-home-hero::after {
	content: "";
	position: absolute;
	z-index: -1;
	right: 0;
	bottom: 0;
	left: 0;
	height: 24%;
	background: linear-gradient(180deg, rgba(248, 245, 239, 0), rgba(248, 245, 239, 0.16));
	pointer-events: none;
}

.dk-home-hero__inner {
	position: relative;
	z-index: 1;
	display: block;
}

.dk-home-hero__content {
	width: min(100%, 650px);
	max-width: 650px;
}

/*
 * La imagen del shortcode permanece en el HTML para conservar accesibilidad y
 * para mostrarse debajo del texto en tablet/móvil. En escritorio la fotografía
 * ya vive como fondo del hero y esta copia visual se oculta.
 */
.dk-home-hero__media {
	display: none;
}

.dk-home-hero__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 64% center;
}

.dk-home-hero h1 {
	max-width: 650px;
	margin: 0 0 24px;
	color: var(--dk-charcoal);
	font-family: var(--dk-font-display);
	font-size: clamp(3.45rem, 6vw, 5.65rem);
	font-weight: 600;
	line-height: 0.91;
	letter-spacing: -0.052em;
	text-wrap: balance;
}

.dk-home-hero__lead {
	max-width: 610px;
	margin: 0;
	color: #48514b;
	font-size: clamp(1.05rem, 1.45vw, 1.2rem);
	line-height: 1.72;
}

.dk-home-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px 24px;
	margin-top: 34px;
}

.dk-home-hero__note {
	padding: 28px 28px 26px;
	border-top: 1px solid rgba(47, 73, 60, 0.22);
	border-bottom: 1px solid rgba(47, 73, 60, 0.22);
	color: var(--dk-text-muted);
}

.dk-home-hero__note-label {
	display: block;
	margin-bottom: 9px;
	color: var(--dk-primary);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.dk-home-hero__note p {
	margin: 0;
	font-size: 0.94rem;
	line-height: 1.65;
}

.dk-home-hero__content .dk-home-hero__note {
	max-width: 610px;
	margin-top: 34px;
	padding: 18px 0 0;
	border-bottom: 0;
}

/* Mapa de pilares */
.dk-home-pillar-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}

.dk-home-pillar-card,
.dk-home-page a.dk-home-pillar-card {
	display: flex;
	min-width: 0;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--dk-border);
	border-radius: 18px;
	background: var(--dk-white);
	color: var(--dk-text);
	text-decoration: none;
	box-shadow: none;
	transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.dk-home-pillar-card:hover,
.dk-home-pillar-card:focus-visible {
	border-color: rgba(183, 97, 85, 0.48);
	color: var(--dk-text);
	transform: translateY(-3px);
	box-shadow: 0 15px 34px rgba(36, 39, 36, 0.07);
}

.dk-home-pillar-card__media {
	position: relative;
	aspect-ratio: 16 / 8.2;
	overflow: hidden;
	background: var(--dk-sage-100);
}

.dk-home-pillar-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 260ms ease;
}

.dk-home-pillar-card:hover .dk-home-pillar-card__image {
	transform: scale(1.025);
}

.dk-home-pillar-card__media--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #edf2ed, #f7eee9);
}

.dk-home-pillar-card__media--placeholder span {
	color: rgba(47, 73, 60, 0.28);
	font-family: var(--dk-font-display);
	font-size: 4.6rem;
	font-weight: 600;
	line-height: 1;
}

.dk-home-pillar-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 24px 24px 25px;
}

.dk-home-pillar-card__body h3 {
	margin: 0 0 9px;
	color: var(--dk-charcoal);
	font-family: var(--dk-font-display);
	font-size: 1.65rem;
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.dk-home-pillar-card__body p {
	margin: 0 0 20px;
	color: var(--dk-text-muted);
	font-size: 0.88rem;
	line-height: 1.6;
}

.dk-home-pillar-card__cta {
	margin-top: auto;
	color: var(--dk-primary);
	font-size: 0.78rem;
	font-weight: 750;
}

.dk-home-pillar-card:hover .dk-home-pillar-card__cta {
	color: var(--dk-accent);
}

/* Tarjetas de guías */
.dk-home-guide-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.dk-home-guide-grid--latest {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dk-home-guide-card,
.dk-home-page a.dk-home-guide-card {
	display: flex;
	min-width: 0;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--dk-border);
	border-radius: 16px;
	background: var(--dk-white);
	color: var(--dk-text);
	text-decoration: none;
	box-shadow: none;
	transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.dk-home-guide-card:hover,
.dk-home-guide-card:focus-visible {
	border-color: rgba(183, 97, 85, 0.5);
	color: var(--dk-text);
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(36, 39, 36, 0.065);
}

.dk-home-guide-card__media {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--dk-sage-100);
}

.dk-home-guide-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 260ms ease;
}

.dk-home-guide-card:hover .dk-home-guide-card__image {
	transform: scale(1.025);
}

.dk-home-guide-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 19px 19px 20px;
}

.dk-home-guide-card__label {
	display: block;
	margin-bottom: 8px;
	color: var(--dk-accent);
	font-size: 0.66rem;
	font-weight: 800;
	letter-spacing: 0.11em;
	line-height: 1.2;
	text-transform: uppercase;
}

.dk-home-guide-card__title {
	margin: 0 0 9px;
	color: var(--dk-charcoal);
	font-family: var(--dk-font-display);
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.07;
	letter-spacing: -0.018em;
}

.dk-home-guide-card__excerpt {
	margin: 0 0 17px;
	color: var(--dk-text-muted);
	font-size: 0.8rem;
	line-height: 1.58;
}

.dk-home-guide-card__cta {
	margin-top: auto;
	color: var(--dk-primary);
	font-size: 0.76rem;
	font-weight: 750;
}

.dk-home-guide-card:hover .dk-home-guide-card__cta {
	color: var(--dk-accent);
}

/* Ruta según cabello */
.dk-home-hair-path__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(300px, 0.75fr);
	align-items: center;
	gap: clamp(42px, 7vw, 94px);
}

.dk-home-hair-path h2 {
	max-width: 720px;
	margin-bottom: 0;
}

.dk-home-hair-path__content {
	padding-left: 32px;
	border-left: 2px solid rgba(47, 73, 60, 0.16);
}

.dk-home-hair-path__content p {
	margin: 0 0 24px;
	color: #48514b;
	line-height: 1.72;
}

/* Clústeres que aparecerán solos cuando tengan suficiente contenido */
.dk-home-auto-clusters > .dk-home-cluster {
	padding: clamp(68px, 8vw, 108px) max(24px, calc((100vw - 1180px) / 2));
}

.dk-home-auto-clusters > .dk-home-cluster:nth-child(odd) {
	background: var(--dk-white);
}

.dk-home-auto-clusters > .dk-home-cluster:nth-child(even) {
	background: var(--dk-bg);
}

/* Cierre editorial */
.dk-home-about__inner {
	max-width: 860px;
}

.dk-home-about h2 {
	max-width: 780px;
}

.dk-home-about__inner > p:not(.dk-home-eyebrow) {
	max-width: 820px;
	color: #48514b;
	font-size: 1rem;
	line-height: 1.8;
}

.dk-home-about__inner > p:last-child {
	margin-bottom: 0;
}

@media (max-width: 980px) {
	.dk-home-hero {
		min-height: 0;
	}

	.dk-home-hero::before {
		background-image: none;
	}

	.dk-home-hero::after {
		display: none;
	}

	.dk-home-hero__inner {
		display: grid;
		grid-template-columns: 1fr;
		gap: 38px;
	}

	.dk-home-hero__content {
		width: 100%;
		max-width: 820px;
	}

	.dk-home-hero__media {
		display: block;
		width: min(100%, 820px);
		margin: 0;
		aspect-ratio: 1200 / 751;
		overflow: hidden;
		border-radius: 20px;
		background: #eee8df;
		box-shadow: 0 20px 48px rgba(36, 39, 36, 0.08);
	}

	.dk-home-hero__note {
		max-width: 620px;
	}

	.dk-home-pillar-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.dk-home-guide-grid,
	.dk-home-guide-grid--latest {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	.dk-home-container {
		width: min(calc(100% - 24px), 1180px);
	}

	.dk-home-section {
		padding: 58px 0;
	}
	
	.dk-home-page .dk-home-main p {
	font-size: 16px;
}

	.dk-home-hero {
		padding: 62px 0 64px;
	}

	.dk-home-hero__inner {
		gap: 34px;
	}

	.dk-home-hero__media {
		width: 100vw;
		max-width: none;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		border-radius: 0;
		box-shadow: none;
	}

	.dk-home-hero__image {
		width: 100%;
		height: 100%;
	}

	.dk-home-hero h1 {
		font-size: clamp(2.8rem, 14vw, 4rem);
		line-height: 0.94;
		text-wrap: wrap;
	}

	.dk-home-hero__lead {
		font-size: 1rem;
	}

	.dk-home-hero__actions {
		align-items: flex-start;
		flex-direction: column;
		gap: 18px;
	}

	.dk-home-hero__note {
		padding: 22px 0;
	}

	.dk-home-section-head,
	.dk-home-section-head--split {
		margin-bottom: 26px;
		text-align: left;
	}

	.dk-home-section-head--split {
		align-items: flex-start;
		flex-direction: column;
		gap: 18px;
	}

	.dk-home-section-head > p:last-child {
		margin: 0;
	}

	.dk-home-section-head h2,
	.dk-home-hair-path h2,
	.dk-home-about h2 {
		font-size: 2.15rem;
		line-height: 1.02;
	}

	.dk-home-pillar-grid,
	.dk-home-guide-grid,
	.dk-home-guide-grid--latest {
		grid-template-columns: 1fr;
	}

	.dk-home-pillar-card__media {
		aspect-ratio: 16 / 8.6;
	}

	.dk-home-hair-path__inner {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.dk-home-hair-path__content {
		padding: 24px 0 0;
		border-top: 1px solid rgba(47, 73, 60, 0.18);
		border-left: 0;
	}

	.dk-home-auto-clusters > .dk-home-cluster {
		padding: 58px 12px;
	}
}

/* ---------- Home editable desde Gutenberg (v1.9.2) ---------- */
.dk-home-page .dk-home-main > .wp-block-group,
.dk-home-page .dk-home-main .wp-block-group {
	margin-top: 0;
	margin-bottom: 0;
}

.dk-home-page .dk-home-main .wp-block-shortcode {
	margin: 0;
}

/* Los botones nativos de Gutenberg reproducen los botones del diseño original. */
.dk-home-page .dk-home-hero__actions .wp-block-button__link,
.dk-home-page .dk-home-hair-path__content .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 22px;
	border: 1px solid var(--dk-primary);
	border-radius: var(--dk-radius-pill);
	background: var(--dk-primary);
	color: var(--dk-white);
	font-family: var(--dk-font-body);
	font-size: 0.95rem;
	font-weight: 650;
	line-height: 1.2;
	text-decoration: none;
	transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.dk-home-page .dk-home-hero__actions .wp-block-button__link:hover,
.dk-home-page .dk-home-hero__actions .wp-block-button__link:focus-visible,
.dk-home-page .dk-home-hair-path__content .wp-block-button__link:hover,
.dk-home-page .dk-home-hair-path__content .wp-block-button__link:focus-visible {
	background: var(--dk-primary-hover);
	border-color: var(--dk-primary-hover);
	color: var(--dk-white);
	transform: translateY(-1px);
}

.dk-home-page .dk-home-hero__actions .dk-home-button-secondary .wp-block-button__link {
	min-height: auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--dk-primary);
	font-size: 0.9rem;
	font-weight: 700;
	white-space: nowrap;
}

.dk-home-page .dk-home-hero__actions .dk-home-button-secondary .wp-block-button__link:hover,
.dk-home-page .dk-home-hero__actions .dk-home-button-secondary .wp-block-button__link:focus-visible {
	background: transparent;
	color: var(--dk-accent);
	transform: none;
}

.dk-home-page .dk-home-hair-path__content .dk-home-secondary-button .wp-block-button__link {
	background: transparent;
	color: var(--dk-primary);
}

.dk-home-page .dk-home-hair-path__content .dk-home-secondary-button .wp-block-button__link:hover,
.dk-home-page .dk-home-hair-path__content .dk-home-secondary-button .wp-block-button__link:focus-visible {
	background: var(--dk-white);
	color: var(--dk-primary-hover);
}

.dk-home-hero__media--placeholder {
	min-height: 360px;
}
