/*
Theme Name: TDF Portafolio Child
Theme URI: https://portafolio.tallerdefotografia.edu.pe
Author: Marketeándote
Description: Tema hijo de TDF Portafolio. Logos del Taller de Fotografía, páginas "Sobre este proyecto", "Para empresas" y "Contacto" armadas con secciones reutilizables (template-parts), formulario de contacto sin plugins y botón flotante de WhatsApp.
Template: tdf-portafolio
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: tdf-child
*/

/* Las variables (--navy, --orange, --purple...) y fuentes vienen del tema padre. */

/* =========================================================
   1. LOGOS
   ========================================================= */
.brand--img { display: inline-flex; align-items: center; line-height: 0; }
.site-header .brand--img img { height: 46px; width: auto; max-width: 220px; }
.footer-logo { display: inline-flex; line-height: 0; }
.footer-logo img { height: 58px; width: auto; max-width: 220px; }

@media (max-width: 900px) {
	.site-header .brand--img img { height: 38px; }
}

/* Menú activo */
.main-nav__list .current-menu-item > a,
.main-nav__list .current_page_item > a { color: var(--navy); }
.site-footer__menu .current-menu-item > a,
.site-footer__menu .current_page_item > a { color: var(--orange); }
.site-footer--light .site-footer__menu .current-menu-item > a { color: var(--purple); font-weight: 700; }

/* =========================================================
   2. UTILIDADES DE SECCIÓN
   ========================================================= */
.section--blanco { background: var(--white); }
.section--claro { background: var(--bg); }
.section--tight-top { padding-top: 0; }
.section--blanco + .section--blanco,
.section--claro + .section--claro { padding-top: 0; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn--light { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); }
.btn--light:hover { background: var(--white); color: var(--navy); }

.breadcrumb--light { color: rgba(255,255,255,.7); }
.breadcrumb--light a:hover { color: var(--orange); }

.photo-credit {
	display: inline-block; margin-top: 10px; font-size: 12px; color: var(--muted);
}
.photo-credit:hover { color: var(--purple); }

/* =========================================================
   3. PORTADA DE PÁGINA
   ========================================================= */
.page-hero {
	position: relative; overflow: hidden; display: flex; align-items: flex-end;
	min-height: clamp(380px, 44vw, 500px);
	background: var(--navy); color: var(--white);
}
.page-hero--compacta { min-height: clamp(300px, 32vw, 380px); }
.page-hero__media { position: absolute; inset: 0; }
.page-hero__media img, .page-hero__media .tdf-placeholder {
	width: 100%; height: 100%; object-fit: cover; object-position: center 40%;
}
.page-hero::after {
	content: ""; position: absolute; inset: 0;
	background:
		linear-gradient(90deg, var(--navy) 0%, rgba(0,0,54,.82) 38%, rgba(0,0,54,.3) 75%, rgba(0,0,54,.15) 100%),
		linear-gradient(0deg, rgba(0,0,54,.5) 0%, rgba(0,0,54,0) 40%);
}
.page-hero__inner { position: relative; z-index: 1; padding-top: 48px; padding-bottom: 56px; }
.page-hero__title { color: var(--white); font-size: clamp(28px, 4vw, 48px); max-width: 16ch; margin-bottom: 18px; }
.page-hero__text { max-width: 500px; color: rgba(255,255,255,.85); font-size: 16px; margin: 0; }
.photo-credit--hero {
	position: absolute; right: var(--gutter); bottom: 18px; z-index: 1;
	color: rgba(255,255,255,.7); margin: 0;
}
.photo-credit--hero:hover { color: var(--orange); }

/* =========================================================
   4. TEXTO + IMAGEN
   ========================================================= */
.split__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split--invertido .split__media { order: -1; }
.split__text .section-title { margin-bottom: 20px; }
.split__text > p { color: var(--text); max-width: 520px; }
.split__media { margin: 0; }
.split__media img, .split__media .tdf-placeholder {
	width: 100%; aspect-ratio: 4 / 5; object-fit: cover; height: auto;
}
.split__media .tdf-placeholder { height: auto; }

.check-list { list-style: none; margin: 24px 0 28px; padding: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .icon {
	flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%;
	background: var(--orange); color: var(--navy); stroke-width: 2.4;
}

/* =========================================================
   5. TARJETAS CON ICONO
   ========================================================= */
.feature-grid { display: grid; gap: 16px; }
.feature-grid--4 { grid-template-columns: repeat(4, 1fr); }
.feature-grid--3 { grid-template-columns: repeat(3, 1fr); }
.feature-grid--2 { grid-template-columns: repeat(2, 1fr); }
.feature {
	position: relative; padding: 32px 28px; background: var(--bg);
	border-top: 3px solid transparent; transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.section--claro .feature { background: var(--white); }
.feature:hover { border-top-color: var(--orange); transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,54,.08); }
.feature__icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 52px; height: 52px; border-radius: 50%; margin-bottom: 20px;
	background: var(--purple-10); color: var(--purple);
}
.feature__icon .icon { width: 24px; height: 24px; }
.feature__title { font-size: 14px; letter-spacing: .04em; margin-bottom: 10px; }
.feature__text { color: var(--muted); font-size: 14.5px; margin: 0; }

/* =========================================================
   6. PASOS
   ========================================================= */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; position: relative; }
.steps--3 { grid-template-columns: repeat(3, 1fr); }
.steps--4 { grid-template-columns: repeat(4, 1fr); }
.steps--2 { grid-template-columns: repeat(2, 1fr); }
.steps::before {
	content: ""; position: absolute; left: 0; right: 0; top: 26px; height: 1px; background: var(--line);
}
.step { position: relative; padding-right: 12px; }
.step__num {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	width: 54px; height: 54px; margin-bottom: 20px; border-radius: 50%;
	background: var(--navy); color: var(--orange);
	font-family: var(--font-title); font-size: 16px; letter-spacing: .04em;
	box-shadow: 0 0 0 8px var(--bg);
}
.section--blanco .step__num { box-shadow: 0 0 0 8px var(--white); }
.step__title { font-size: 14px; letter-spacing: .04em; margin-bottom: 8px; }
.step__text { color: var(--muted); font-size: 14.5px; margin: 0; }

/* =========================================================
   7. CIFRAS
   ========================================================= */
.stats { background: var(--navy); color: var(--white); padding: 56px 0; }
.stats__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { display: flex; flex-direction: column; gap: 8px; padding: 8px 32px; border-left: 1px solid rgba(255,255,255,.15); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__value { font-family: var(--font-title); font-size: clamp(30px, 4vw, 46px); line-height: 1; color: var(--orange); }
.stat__label { font-size: 14px; color: rgba(255,255,255,.78); }

/* =========================================================
   8. NOTA DESTACADA
   ========================================================= */
.callout {
	display: flex; gap: 20px; align-items: flex-start;
	padding: 28px 32px; background: var(--purple-10); border-left: 4px solid var(--purple);
}
.callout__icon { color: var(--purple); flex: none; }
.callout__icon .icon { width: 30px; height: 30px; }
.callout__title { font-size: 14px; letter-spacing: .06em; margin-bottom: 6px; color: var(--purple); }
.callout p { margin: 0; font-size: 15px; max-width: 860px; }

/* =========================================================
   9. PREGUNTAS FRECUENTES
   ========================================================= */
.faq { display: grid; grid-template-columns: 1fr 1.6fr; gap: 32px 72px; align-items: start; }
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
	display: flex; align-items: center; justify-content: space-between; gap: 20px;
	padding: 22px 0; cursor: pointer; list-style: none;
	font-size: 16px; font-weight: 700; color: var(--navy);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary .icon { flex: none; color: var(--orange); transition: transform .25s var(--ease); }
.faq__item[open] summary .icon { transform: rotate(45deg); }
.faq__item summary:hover { color: var(--purple); }
.faq__answer { padding: 0 40px 22px 0; color: var(--muted); }
.faq__answer p { margin: 0; }

/* =========================================================
   10. CONTACTO
   ========================================================= */
.contact__grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact__intro { color: var(--muted); margin: 16px 0 28px; max-width: 440px; }

.contact-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 20px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list__icon {
	flex: none; width: 44px; height: 44px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--navy); color: var(--orange);
}
.contact-list__icon .icon { width: 20px; height: 20px; }
.contact-list small {
	display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px;
}
.contact-list a { color: var(--navy); font-weight: 700; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--purple); }
.social--contact a { color: var(--navy); }
.social--contact a:hover { color: var(--orange); }

.contact__form { background: var(--white); padding: clamp(24px, 4vw, 44px); box-shadow: 0 20px 50px rgba(0,0,54,.08); border-top: 4px solid var(--orange); }
.contact__form-title { font-size: 18px; margin-bottom: 24px; }

.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form__field { display: grid; gap: 6px; }
.form__field label { font-size: 13px; font-weight: 700; color: var(--navy); }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form select, .form textarea {
	width: 100%; padding: 13px 14px; font: inherit; font-size: 15px; color: var(--navy);
	background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
	transition: border-color .2s, box-shadow .2s, background .2s;
}
.form textarea { resize: vertical; min-height: 140px; }
.form input:focus, .form select:focus, .form textarea:focus {
	outline: none; border-color: var(--purple); background: var(--white); box-shadow: 0 0 0 3px rgba(67,39,123,.12);
}
.form__check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.form__check input { margin-top: 3px; accent-color: var(--purple); width: 16px; height: 16px; flex: none; }
.form .btn { justify-self: start; }
.form__trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-notice { padding: 14px 18px; margin-bottom: 20px; font-size: 14.5px; border-left: 4px solid; }
.form-notice--ok { background: #eef8f0; border-color: #2e9e57; color: #1b5e34; }
.form-notice--error { background: #fdf1ec; border-color: var(--orange); color: #7a3a07; }

.contact-map { line-height: 0; background: var(--bg-alt); }
.contact-map iframe { width: 100%; height: 380px; border: 0; filter: grayscale(.4); }

/* =========================================================
   11. BOTÓN FLOTANTE DE WHATSAPP (efecto palpitante)
   ========================================================= */
.wa-float {
	--wa: #25D366;
	position: fixed; right: clamp(16px, 2.5vw, 28px); bottom: clamp(16px, 2.5vw, 28px); z-index: 900;
	width: 60px; height: 60px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--wa); color: var(--white);
	box-shadow: 0 10px 25px rgba(0,0,54,.28);
	transition: transform .25s var(--ease), background .25s;
	isolation: isolate;
}
/* Ondas que se expanden (latido) */
.wa-float::before,
.wa-float::after {
	content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%;
	background: var(--wa); opacity: .55;
	animation: wa-onda 2.2s cubic-bezier(.2, .6, .3, 1) infinite;
}
.wa-float::after { animation-delay: 1.1s; }
.wa-float .icon { width: 32px; height: 32px; animation: wa-latido 2.2s ease-in-out infinite; }
.wa-float:hover { transform: scale(1.08); color: var(--white); background: #1ebe5a; }
.wa-float:hover::before, .wa-float:hover::after { animation-play-state: paused; opacity: 0; }

@keyframes wa-onda {
	0%   { transform: scale(1);   opacity: .55; }
	100% { transform: scale(1.85); opacity: 0; }
}
@keyframes wa-latido {
	0%, 100% { transform: scale(1); }
	8%       { transform: scale(1.14); }
	16%      { transform: scale(1); }
	24%      { transform: scale(1.1); }
	32%      { transform: scale(1); }
}

/* Etiqueta al pasar el mouse */
.wa-float__label {
	position: absolute; right: calc(100% + 14px); top: 50%;
	transform: translate(8px, -50%); opacity: 0; pointer-events: none;
	padding: 8px 14px; white-space: nowrap; border-radius: var(--radius);
	background: var(--navy); color: var(--white); font-size: 13px;
	box-shadow: 0 8px 20px rgba(0,0,54,.2);
	transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.wa-float__label::after {
	content: ""; position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
	border: 6px solid transparent; border-left-color: var(--navy);
}
.wa-float:hover .wa-float__label,
.wa-float:focus-visible .wa-float__label { opacity: 1; transform: translate(0, -50%); }

/* Recordatorio solo visible para administradores */
.wa-float--config { --wa: #9aa0a6; }
.wa-float--config .wa-float__label { opacity: 1; transform: translate(0, -50%); }

/* Deja espacio para que el botón no tape el final del footer */
.site-footer { padding-bottom: 96px; }

/* =========================================================
   12. RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
	.feature-grid--4 { grid-template-columns: repeat(2, 1fr); }
	.steps--4 { grid-template-columns: repeat(2, 1fr); }
	.steps--4::before { display: none; }
}

@media (max-width: 900px) {
	.split__inner, .faq, .contact__grid { grid-template-columns: 1fr; }
	.split--invertido .split__media { order: 0; }
	.split__media img, .split__media .tdf-placeholder { aspect-ratio: 4 / 3; }
	.feature-grid--3 { grid-template-columns: repeat(2, 1fr); }
	.steps--3 { grid-template-columns: 1fr; }
	.steps::before { display: none; }
	.stats__grid { grid-template-columns: 1fr; gap: 24px; }
	.stat { border-left: 0; padding: 0; }
}

@media (max-width: 640px) {
	.feature-grid--4, .feature-grid--3, .feature-grid--2, .steps--4, .steps--2 { grid-template-columns: 1fr; }
	.form__row { grid-template-columns: 1fr; }
	.form .btn { justify-self: stretch; justify-content: center; }
	.callout { flex-direction: column; padding: 22px; }
	.page-hero::after { background: linear-gradient(180deg, rgba(0,0,54,.4) 0%, var(--navy) 88%); }
	.photo-credit--hero { display: none; }
	.footer-logo img { height: 48px; }
	.wa-float { width: 54px; height: 54px; }
	.wa-float .icon { width: 28px; height: 28px; }
	.wa-float__label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.wa-float::before, .wa-float::after, .wa-float .icon { animation: none !important; }
}
