/*
Theme Name: DFT — David Fernando Torres
Theme URI: https://davidfernandotorres.com
Description: Tema hijo de Twenty Twenty-Five para el sitio oficial del autor David Fernando Torres.
Author: eCloud4 / Rafael Plata
Template: twentytwentyfive
Version: 1.1.0
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dft
*/

/*
 * Design system: tokens en theme.json (colores, tipografía, espaciado,
 * radios/sombras/motion en settings.custom → var(--wp--custom--*)).
 * Este archivo solo define componentes y comportamiento que theme.json no cubre.
 */

/* ===== Base ===== */
h1, h2, h3 {
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

a {
	transition: color var(--wp--custom--motion--fast);
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-1);
	outline-offset: 2px;
}

::selection {
	background: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--contrast);
}

/* ===== Botones ===== */
.wp-block-button__link {
	transition: background-color var(--wp--custom--motion--fast), color var(--wp--custom--motion--fast), border-color var(--wp--custom--motion--fast), transform var(--wp--custom--motion--fast);
	min-height: 44px;
}

.wp-block-button__link:active {
	transform: translateY(1px);
}

.is-style-outline .wp-block-button__link {
	border-width: 1px;
}

/* ===== Formulario (Contact Form 7) ===== */
.wpcf7 form p {
	margin-bottom: 1.15rem;
}

.wpcf7 label {
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--wp--preset--color--contrast);
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	padding: 0.75rem 0.95rem;
	margin-top: 0.4rem;
	border: 1px solid #CFC8BA;
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-size: 1rem;
	transition: border-color var(--wp--custom--motion--fast), box-shadow var(--wp--custom--motion--fast);
}

.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--accent-1);
	box-shadow: 0 0 0 3px rgba(125, 95, 38, 0.18);
}

.wpcf7 textarea {
	min-height: 9rem;
	resize: vertical;
}

.wpcf7 input[type="submit"] {
	background: var(--wp--preset--color--accent-1);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 0.85rem 1.8rem;
	font: inherit;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	min-height: 44px;
	transition: background-color var(--wp--custom--motion--fast), transform var(--wp--custom--motion--fast);
}

.wpcf7 input[type="submit"]:hover,
.wpcf7 input[type="submit"]:focus-visible {
	background: var(--wp--preset--color--contrast);
}

.wpcf7 input[type="submit"]:active {
	transform: translateY(1px);
}

.wpcf7 form .wpcf7-response-output {
	border-radius: var(--wp--custom--radius--sm);
	padding: 0.75rem 1rem;
	margin: 1rem 0 0;
}

.wpcf7-not-valid-tip {
	font-size: 0.85rem;
}

/* ===== FAQ (details) ===== */
.wp-block-details {
	border: 1px solid #E4DFD4;
	border-radius: var(--wp--custom--radius--md);
	padding: 1rem 1.2rem;
	margin-bottom: 0.75rem;
	background: var(--wp--preset--color--surface);
	transition: border-color var(--wp--custom--motion--fast);
}

.wp-block-details[open] {
	border-color: var(--wp--preset--color--accent-1);
}

.wp-block-details summary {
	font-weight: 600;
	cursor: pointer;
}

.wp-block-details summary::marker {
	color: var(--wp--preset--color--accent-1);
}

/* ===== Imágenes ===== */
.wp-block-image img {
	max-width: 100%;
	height: auto;
}

.dft-portada img,
.wp-block-column .wp-block-image.has-custom-border img {
	box-shadow: var(--wp--custom--shadow--book);
	transition: transform var(--wp--custom--motion--base), box-shadow var(--wp--custom--motion--base);
}

.dft-portada a:hover img {
	transform: translateY(-4px);
	box-shadow: 0 32px 56px -22px rgba(23, 32, 41, 0.55);
}

/* ===== Superficies oscuras: links en dorado claro del logo ===== */
.has-contrast-background-color a:not(.wp-block-button__link) {
	color: #C8A45D;
}

.has-contrast-background-color a:not(.wp-block-button__link):hover {
	color: #FBFAF8;
}

/* ===== Móvil ===== */
@media (max-width: 781px) {
	.wp-block-columns {
		gap: 1.75rem;
	}

	.wp-block-cover {
		min-height: 72vh !important;
	}
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
