/*
Theme Name: EDELTORRE Consulting
Theme URI: https://edeltorre.com
Author: EDELTORRE LLC
Author URI: https://edeltorre.com
Description: Tema de bloques (Full Site Editing) para EDELTORRE Consulting Group. Estética «Luxury Corporate Minimalism»: landing page de conversión hacia la Consulta de Claridad, construida exclusivamente con bloques nativos y patrones reutilizables. Incluye modo diurno y nocturno.
Requires at least: 6.6
Requires PHP: 7.4
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: edeltorre-consulting
Tags: full-site-editing, block-patterns, block-styles, one-column, wide-blocks, custom-colors, custom-logo, editor-style, accessibility-ready
*/

/* -------------------------------------------------------------
   Índice
   00. Modo nocturno (valores de la paleta semántica)
   01. Base y accesibilidad
   02. Encabezado (sticky), navegación y selector de modo
   03. Estilos de bloque registrados (Etiqueta, Tarjeta, Marco dorado, Lista con guion)
   04. Botones
   05. Secciones oscuras
   06. Acentos editoriales
   07. Preguntas frecuentes (bloque Details)
   08. Pie de página
   09. Logotipos, iconos e imágenes
   10. Responsive (mobile first)
   11. Movimiento reducido

   Paleta semántica: los colores «base», «superficie», «contraste»,
   «texto-suave», «acento-texto» y «borde» cambian con el modo.
   Los colores de marca (ónix, champagne, bronce, marfil…) son fijos:
   las secciones negras se ven igual de día y de noche.
------------------------------------------------------------- */

/* 00. Modo nocturno ---------------------------------------- */
html[data-ed-modo="noche"] {
	color-scheme: dark;
}

html[data-ed-modo="noche"] body {
	--wp--preset--color--base: #171512;
	--wp--preset--color--superficie: #201E1A;
	--wp--preset--color--contraste: #F2EEE6;
	--wp--preset--color--texto-suave: #BDB7AC;
	--wp--preset--color--acento-texto: #C5A572;
	--wp--preset--color--borde: #3A352E;
}

/* Logotipos alternos según el modo */
.ed-solo-noche,
html[data-ed-modo="noche"] .ed-solo-dia {
	display: none;
}

html[data-ed-modo="noche"] .ed-solo-noche {
	display: block;
}

/* Las secciones negras se separan del fondo nocturno con un filete dorado muy tenue */
html[data-ed-modo="noche"] .alignfull.has-onyx-background-color {
	box-shadow: inset 0 1px 0 rgba(197, 165, 114, 0.16), inset 0 -1px 0 rgba(197, 165, 114, 0.16);
}

html[data-ed-modo="noche"] .wp-block-group.is-style-tarjeta.has-onyx-background-color {
	border-color: rgba(197, 165, 114, 0.35);
}

html[data-ed-modo="noche"] .wp-block-heading em {
	color: var(--wp--preset--color--champagne);
}

/* 01. Base y accesibilidad ---------------------------------- */
html {
	scroll-behavior: smooth;
}

body {
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

[id] {
	scroll-margin-top: 6.5rem;
}

.wp-site-blocks > main,
.wp-site-blocks > footer,
.wp-site-blocks > .wp-block-template-part:last-child {
	margin-block-start: 0;
}

:where(a, button, summary, input, select, textarea):focus-visible {
	outline: 2px solid var(--wp--preset--color--champagne);
	outline-offset: 3px;
	border-radius: 2px;
}

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

/* 02. Encabezado, navegación y selector de modo ------------- */
.ed-header {
	border-bottom: 1px solid var(--wp--preset--color--borde);
}

.wp-block-navigation .wp-block-navigation-item__content {
	padding-block: 0.6rem;
}

.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	min-width: 44px;
	min-height: 44px;
	justify-content: center;
	align-items: center;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
	gap: 1.25rem;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.75rem;
}

/* Selector de modo: el script lo convierte en <button aria-pressed>. Sin JavaScript se oculta. */
html:not([data-ed-modo]) .ed-toggle-modo {
	display: none;
}

.ed-header .wp-block-button.ed-toggle-modo {
	flex: 0 0 auto;
}

.ed-toggle-modo .ed-toggle-modo-btn,
.ed-toggle-modo .wp-block-button__link {
	width: 48px;
	min-width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid var(--wp--preset--color--borde);
	border-radius: 4px;
	background: transparent;
	color: var(--wp--preset--color--contraste);
	font-size: 0;
	cursor: pointer;
}

.ed-toggle-modo .ed-toggle-modo-btn:hover {
	background: transparent;
	color: var(--wp--preset--color--acento-texto);
	border-color: var(--wp--preset--color--acento-texto);
}

.ed-icono-modo {
	display: block;
	width: 20px;
	height: 20px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

html[data-ed-modo="noche"] .ed-icono-modo {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4'/%3E%3C/svg%3E");
}

/* 03. Estilos de bloque registrados ------------------------- */

/* Párrafo › Etiqueta (texto superior de sección) */
.is-style-etiqueta {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	font-size: 0.75rem !important;
	font-weight: 700;
	letter-spacing: 0.24em;
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--wp--preset--color--acento-texto);
}

.is-style-etiqueta::before {
	content: "";
	flex: 0 0 2.5rem;
	height: 1px;
	background: currentColor;
}

.has-text-align-center.is-style-etiqueta {
	justify-content: center;
}

/* Grupo › Tarjeta */
.wp-block-group.is-style-tarjeta {
	border: 1px solid var(--wp--preset--color--borde);
	border-radius: 6px;
	height: 100%;
	box-sizing: border-box;
}

.wp-block-group.is-style-tarjeta.has-onyx-background-color {
	border-color: var(--wp--preset--color--onyx);
}

/* Imagen › Marco dorado */
.wp-block-image.is-style-marco-dorado {
	position: relative;
	isolation: isolate;
	margin: 1.125rem 1.125rem 0 0;
}

.wp-block-image.is-style-marco-dorado::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: -1.125rem;
	right: -1.125rem;
	width: 62%;
	height: 70%;
	border: 1px solid var(--wp--preset--color--champagne);
	border-radius: 6px;
}

.wp-block-image.is-style-marco-dorado img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

/* Lista › Lista con guion */
.is-style-lista-guion {
	list-style: none;
	padding-left: 0;
	display: grid;
	gap: 0.75rem;
}

.is-style-lista-guion li {
	display: flex;
	gap: 0.875rem;
	align-items: baseline;
}

.is-style-lista-guion li::before {
	content: "—";
	color: var(--wp--preset--color--bronze);
	flex: 0 0 auto;
}

/* 04. Botones ---------------------------------------------- */
.wp-block-button__link {
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, color 0.2s ease, filter 0.2s ease;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--contraste);
	border-color: var(--wp--preset--color--contraste);
	color: var(--wp--preset--color--base);
}

.has-onyx-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--ivory);
	border-color: var(--wp--preset--color--ivory);
	color: var(--wp--preset--color--onyx);
}

.wp-block-button__link.has-champagne-background-color:hover {
	filter: brightness(1.08);
}

/* 05. Secciones oscuras ------------------------------------ */
.has-onyx-background-color .is-style-etiqueta {
	color: var(--wp--preset--color--champagne);
}

.has-onyx-background-color .is-style-lista-guion li::before {
	color: var(--wp--preset--color--champagne);
}

.has-onyx-background-color a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--champagne);
}

.has-onyx-background-color a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--ivory);
}

.ed-fases {
	border-top: 1px solid rgba(197, 165, 114, 0.45);
	padding-top: var(--wp--preset--spacing--50);
}

/* 06. Acentos editoriales ---------------------------------- */
.ed-firma {
	border-top: 1px solid var(--wp--preset--color--borde);
}

.wp-block-heading em {
	font-style: italic;
	color: var(--wp--preset--color--bronze);
}

.has-onyx-background-color .wp-block-heading em {
	color: var(--wp--preset--color--champagne);
}

/* 07. Preguntas frecuentes --------------------------------- */
.ed-faq {
	border-top: 1px solid var(--wp--preset--color--borde);
}

.ed-faq .wp-block-details {
	margin-block-start: 0;
}

.wp-block-details summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem;
	min-height: 44px;
	padding-block: 1.4rem;
	cursor: pointer;
	list-style: none;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	line-height: 1.4;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "+";
	flex: 0 0 auto;
	font-size: 1.625rem;
	font-weight: 400;
	line-height: 1;
	color: var(--wp--preset--color--acento-texto);
	transition: transform 0.2s ease;
}

.wp-block-details[open] summary::after {
	transform: rotate(45deg);
}

.wp-block-details > :not(summary) {
	margin-block-start: 0;
	padding-bottom: 1.5rem;
	padding-right: 2.5rem;
	color: var(--wp--preset--color--texto-suave);
}

/* 08. Pie de página ---------------------------------------- */
.ed-footer a {
	color: var(--wp--preset--color--mist);
	text-decoration: none;
}

.ed-footer a:hover {
	color: var(--wp--preset--color--champagne);
	text-decoration: underline;
}

.ed-footer .ed-footer-titulo {
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--wp--preset--color--ivory);
}

.ed-footer .ed-footer-legal {
	border-top: 1px solid rgba(247, 245, 240, 0.12);
	padding-top: var(--wp--preset--spacing--40);
}

/* 09. Logotipos, iconos e imágenes ------------------------- */
.wp-block-image.ed-logo,
.wp-block-image.ed-logo-pie,
.wp-block-image.ed-emblema {
	margin: 0;
}

.wp-block-image.ed-logo img,
.wp-block-image.ed-logo-pie img,
.wp-block-image.ed-emblema img {
	border-radius: 0;
	height: auto;
}

/* Los logotipos diurno y nocturno comparten tamaño y proporción (700 × 238). */
.wp-block-image.ed-logo img {
	width: 160px;
	aspect-ratio: 700 / 238;
}

.wp-block-image.ed-logo a:focus-visible {
	outline-offset: 6px;
}

.wp-block-image.ed-logo-pie img {
	width: 168px;
	aspect-ratio: 640 / 668;
}

.wp-block-image.ed-emblema img {
	width: 76px;
	aspect-ratio: 320 / 313;
}

.wp-block-image.ed-icono {
	flex: 0 0 auto;
	margin: 0;
}

.wp-block-image.ed-icono img {
	width: 28px;
	height: 28px;
	border-radius: 0;
}

.wp-block-image.ed-avatar img {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	object-fit: cover;
}

.ed-retrato img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

/* 10. Responsive ------------------------------------------- */

/* Móvil: el botón de agendar ocupa su propia fila, siempre visible. */
.ed-header .wp-block-buttons {
	flex-basis: 100%;
	flex-wrap: nowrap;
}

.ed-header .wp-block-buttons .wp-block-button {
	flex: 1 1 auto;
}

.ed-header .wp-block-buttons .wp-block-button:not(.ed-toggle-modo) .wp-block-button__link {
	width: 100%;
	padding-top: 0.7rem;
	padding-bottom: 0.7rem;
}

@media (min-width: 600px) {
	.wp-site-blocks > header.wp-block-template-part {
		position: sticky;
		top: var(--wp-admin--admin-bar--height, 0px);
		z-index: 50;
	}

	.wp-block-image.ed-logo img {
		width: 200px;
	}

	.ed-header .wp-block-buttons {
		flex-basis: auto;
	}

	.ed-header .wp-block-buttons .wp-block-button:not(.ed-toggle-modo) .wp-block-button__link {
		width: auto;
	}
}

@media (max-width: 781px) {
	.wp-block-image.is-style-marco-dorado {
		max-width: 30rem;
	}
}

/* 11. Movimiento reducido ---------------------------------- */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
	}
}
