/*
Theme Name: Pérez y Asociados
Template: twentytwentyfive
Description: Tema hijo de Twenty Twenty-Five para Estudio Pérez y Asociados. Colores, tipografías y espaciados en theme.json; acá solo van los componentes que los bloques no resuelven solos (tarjetas, íconos, reseñas, formulario).
Version: 1.0.0
Author: Open24
Author URI: https://open24.com.ar
Text Domain: perez
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
::selection { background: var(--wp--preset--color--celeste); color: var(--wp--preset--color--contrast); }
:focus-visible { outline: 2px solid var(--wp--preset--color--naranja); outline-offset: 3px; border-radius: 4px; }
img { height: auto; }
.screen-reader-text:focus { z-index: 100000; }

/* Íconos: <span class="ico" style="--i: var(--ico-phone)"> o clases ico-* con ::before */
.ico, .tiene-ico::before {
	display: inline-block; width: 1.25em; height: 1.25em; flex: none;
	background-color: currentColor;
	-webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
	vertical-align: -0.22em;
}
.tiene-ico::before { content: ""; margin-right: .5em; }
.i-impuestos { --i: var(--ico-receipt-text); }
.i-contabilidad { --i: var(--ico-chart-column); }
.i-laboral { --i: var(--ico-users); }
.i-sociedades { --i: var(--ico-building-2); }
.i-whatsapp { --i: var(--ico-whatsapp); }
.i-mail { --i: var(--ico-mail); }
.i-phone { --i: var(--ico-phone); }
.i-pin { --i: var(--ico-map-pin); }
.i-laptop { --i: var(--ico-laptop); }
.i-check { --i: var(--ico-check); }
.i-clock { --i: var(--ico-clock); }
.i-shield { --i: var(--ico-shield-check); }
.i-handshake { --i: var(--ico-handshake); }
.i-linkedin { --i: var(--ico-linkedin); }
.i-google { --i: var(--ico-google); }
.i-file-check { --i: var(--ico-file-check); }
.i-pregunta { --i: var(--ico-message-circle-question); }
.i-flecha { --i: var(--ico-arrow-right); }

/* ---------- Encabezado ---------- */
.encabezado {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255,255,255,.92);
	-webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid var(--wp--preset--color--borde);
}
.admin-bar .encabezado { top: 32px; }
@media (max-width: 782px) { .admin-bar .encabezado { top: 0; } }
.encabezado .wp-block-site-logo img { width: 200px; }
@media (max-width: 600px) { .encabezado .wp-block-site-logo img { width: 160px; } }
.encabezado .wp-block-navigation-item__content { padding: .35rem 0; position: relative; }
.encabezado .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content::after,
.encabezado .wp-block-navigation-item__content:hover::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
	background: var(--wp--preset--color--naranja); border-radius: 2px;
}
.encabezado .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--borde) !important; border-radius: 12px;
	box-shadow: var(--wp--custom--sombra); padding: .4rem 0 !important; min-width: 220px !important;
}
.encabezado .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .45rem 1rem; }
.encabezado .wp-block-navigation__submenu-container .wp-block-navigation-item__content::after { display: none; }
.btn-wa .wp-block-button__link { display: inline-flex; align-items: center; gap: .5rem; }
.btn-wa .wp-block-button__link::before {
	content: ""; width: 1.15em; height: 1.15em; background: currentColor;
	-webkit-mask: var(--ico-whatsapp) center / contain no-repeat; mask: var(--ico-whatsapp) center / contain no-repeat;
}
@media (max-width: 781px) { .encabezado .btn-wa { display: none; } }

/* ---------- Portada ---------- */
.portada-hero { position: relative; overflow: hidden; }
.portada-hero::before { /* cuadraditos del logo, decorativos */
	content: ""; position: absolute; z-index: 0; right: -60px; top: -40px; width: 340px; height: 340px; opacity: .55;
	background:
		linear-gradient(var(--wp--preset--color--celeste-suave) 0 0) 0 0 / 46% 46% no-repeat,
		linear-gradient(var(--wp--preset--color--celeste-suave) 0 0) 100% 100% / 46% 46% no-repeat;
	border-radius: 28px; transform: rotate(12deg); pointer-events: none;
}
.portada-hero > * { position: relative; z-index: 1; }
.kicker {
	display: inline-flex; align-items: center; gap: .5rem;
	font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	color: var(--wp--preset--color--naranja-oscuro);
}
.kicker::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: var(--wp--preset--color--naranja); }
.foto-hero img { border-radius: 28px; box-shadow: 0 20px 50px rgba(24,32,44,.16); aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; }
.foto-hero { position: relative; }
.foto-hero figcaption {
	position: absolute; left: 1rem; bottom: 1rem; margin: 0; padding: .55rem .9rem; border-radius: 12px;
	background: rgba(255,255,255,.94); color: var(--wp--preset--color--contrast); font-size: .9rem; font-weight: 600;
	box-shadow: var(--wp--custom--sombra);
}
.datos-rapidos { list-style: none; padding: 0 !important; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.datos-rapidos li { display: inline-flex; align-items: center; gap: .45rem; font-size: .95rem; color: var(--wp--preset--color--tinta-suave); }
.datos-rapidos li::before {
	content: ""; width: 1.1em; height: 1.1em; background: var(--wp--preset--color--naranja);
	-webkit-mask: var(--ico-check) center / contain no-repeat; mask: var(--ico-check) center / contain no-repeat;
}

/* Título de sección con barrita naranja, como el boceto */
.titulo-seccion { display: flex; align-items: center; gap: .7rem; }
.titulo-seccion::before { content: ""; width: 5px; height: .95em; border-radius: 3px; background: var(--wp--preset--color--naranja); flex: none; }
.has-text-align-center.titulo-seccion { justify-content: center; }

/* ---------- Tarjetas de servicio (toda la tarjeta es clickeable) ---------- */
.tarjetas { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem !important; }
@media (max-width: 1000px) { .tarjetas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tarjetas { grid-template-columns: 1fr; } }
.tarjeta {
	position: relative; background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--borde); border-radius: var(--wp--custom--radio);
	padding: 1.6rem 1.4rem 1.3rem !important; box-shadow: var(--wp--custom--sombra);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
	display: flex; flex-direction: column; gap: .6rem;
}
.tarjeta::before {
	content: ""; width: 54px; height: 54px; border-radius: 14px; flex: none;
	background: var(--wp--preset--color--celeste-suave);
}
.tarjeta::after { /* el ícono, encima del cuadrado celeste */
	content: ""; position: absolute; left: calc(1.4rem + 14px); top: calc(1.6rem + 14px); width: 26px; height: 26px;
	background: var(--wp--preset--color--naranja);
	-webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
.tarjeta h3 { margin: .4rem 0 0; font-size: 1.2rem; }
.tarjeta p { margin: 0; color: var(--wp--preset--color--tinta-suave); font-size: .97rem; }
.tarjeta h3 a { color: inherit; text-decoration: none; }
.tarjeta h3 a::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.tarjeta h3 a:focus-visible { outline: none; }
.tarjeta .ver-mas { margin-top: auto !important; padding-top: .4rem; font-weight: 700; color: var(--wp--preset--color--naranja-oscuro) !important; display: inline-flex; align-items: center; gap: .35rem; }
.tarjeta .ver-mas::after {
	content: ""; width: 1em; height: 1em; background: currentColor; transition: transform .2s ease;
	-webkit-mask: var(--ico-arrow-right) center / contain no-repeat; mask: var(--ico-arrow-right) center / contain no-repeat;
}
.tarjeta:hover { transform: translateY(-3px); border-color: var(--wp--preset--color--celeste); box-shadow: 0 2px 4px rgba(24,32,44,.05), 0 16px 36px rgba(24,32,44,.10); }
.tarjeta:hover .ver-mas::after { transform: translateX(3px); }
.tarjeta:focus-within { outline: 2px solid var(--wp--preset--color--naranja); outline-offset: 3px; }

/* ---------- Listas con tilde ---------- */
.lista-check { list-style: none; padding-left: 0 !important; }
.lista-check li { position: relative; padding-left: 2rem; margin: .55rem 0; }
.lista-check li::before {
	content: ""; position: absolute; left: 0; top: .2em; width: 1.3em; height: 1.3em; border-radius: 50%;
	background: var(--wp--preset--color--celeste-suave);
}
.lista-check li::after {
	content: ""; position: absolute; left: .27em; top: .47em; width: .78em; height: .78em; background: var(--wp--preset--color--naranja-oscuro);
	-webkit-mask: var(--ico-check) center / contain no-repeat; mask: var(--ico-check) center / contain no-repeat;
}

/* ---------- Pasos / cómo trabajamos ---------- */
.pasos { counter-reset: paso; }
.paso { counter-increment: paso; position: relative; padding-top: 3.2rem !important; }
.paso::before {
	content: counter(paso, decimal-leading-zero); position: absolute; top: 0; left: 0;
	font-family: var(--wp--preset--font-family--literata); font-size: 2rem; font-weight: 600; line-height: 1;
	color: var(--wp--preset--color--naranja);
}

/* ---------- Reseñas ---------- */
.resenas { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem !important; }
@media (max-width: 900px) { .resenas { grid-template-columns: 1fr; } }
.resena {
	background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--borde);
	border-radius: var(--wp--custom--radio); padding: 1.5rem !important; box-shadow: var(--wp--custom--sombra);
	display: flex; flex-direction: column; gap: .8rem; margin: 0 !important;
}
.resena .estrellas { display: block; width: 6.5rem; height: 1.2rem; background: #f4a51c;
	-webkit-mask: var(--ico-star-filled) 0 50% / 1.3rem 1.2rem repeat-x; mask: var(--ico-star-filled) 0 50% / 1.3rem 1.2rem repeat-x; }
.resena blockquote { margin: 0; padding: 0; border: 0; font-size: 1rem; line-height: 1.6; }
.resena blockquote p { margin: 0; }
.resena blockquote cite { display: block; margin-top: .9rem; font-style: normal; font-weight: 700; font-size: .95rem; color: var(--wp--preset--color--contrast); }
.resena blockquote cite span { display: block; font-weight: 500; color: var(--wp--preset--color--tinta-suave); font-size: .85rem; }
.fuente-google { display: inline-flex; align-items: center; gap: .5rem; }
.fuente-google::before { content: ""; width: 1.1em; height: 1.1em; background: currentColor;
	-webkit-mask: var(--ico-google) center / contain no-repeat; mask: var(--ico-google) center / contain no-repeat; }

/* ---------- Contacto ---------- */
.dato-contacto { display: flex; gap: .9rem; align-items: flex-start; margin: 0 0 1.1rem !important; }
.dato-contacto .ico { width: 1.35rem; height: 1.35rem; margin-top: .15rem; color: var(--wp--preset--color--naranja); }
.dato-contacto strong { display: block; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--wp--preset--color--tinta-suave); }
.dato-contacto a { color: var(--wp--preset--color--contrast); text-decoration: none; font-weight: 600; }
.dato-contacto a:hover { text-decoration: underline; }

.form-contacto { display: grid; gap: 1rem; }
.form-contacto .fila { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-contacto .fila { grid-template-columns: 1fr; } }
.form-contacto label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.form-contacto label .opc { font-weight: 400; color: var(--wp--preset--color--tinta-suave); }
.form-contacto input[type=text], .form-contacto input[type=email], .form-contacto input[type=tel], .form-contacto select, .form-contacto textarea {
	width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; color: inherit;
	padding: .8rem 1rem; border: 1px solid #cfc8bf; border-radius: 12px; background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.form-contacto textarea { min-height: 140px; resize: vertical; }
.form-contacto :is(input, select, textarea):focus { outline: none; border-color: var(--wp--preset--color--naranja); box-shadow: 0 0 0 3px rgba(216,88,0,.15); }
.form-contacto .consentimiento { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--wp--preset--color--tinta-suave); }
.form-contacto .consentimiento input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--wp--preset--color--naranja-oscuro); }
.form-contacto button {
	justify-self: start; cursor: pointer; border: 0; font: inherit; font-weight: 700; font-size: 1rem;
	padding: .85rem 1.8rem; border-radius: 999px; color: #fff; background: var(--wp--preset--color--naranja-oscuro);
	transition: background .15s ease;
}
.form-contacto button:hover { background: var(--wp--preset--color--contrast); }
.form-contacto button[disabled] { opacity: .6; cursor: wait; }
.form-contacto .campo-trampa { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-aviso { padding: 1rem 1.2rem; border-radius: 12px; font-weight: 600; }
.form-aviso.ok { background: #e8f6ee; color: #145c32; border: 1px solid #b8e2c8; }
.form-aviso.error { background: #fdeeee; color: #8a1f1f; border: 1px solid #f1c4c4; }
.form-aviso:empty { display: none; }

/* ---------- Preguntas frecuentes ---------- */
.wp-block-details summary { cursor: pointer; font-weight: 700; list-style: none; position: relative; padding-right: 2rem; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+"; position: absolute; right: .2rem; top: -.1rem; font-size: 1.4rem; font-weight: 400; color: var(--wp--preset--color--naranja);
	transition: transform .2s ease;
}
.wp-block-details[open] summary::after { transform: rotate(45deg); }
.wp-block-details > :not(summary) { margin-top: .6rem; color: var(--wp--preset--color--tinta-suave); }

/* ---------- Páginas internas ---------- */
.cabecera-pagina { border-bottom: 1px solid var(--wp--preset--color--borde); }
.cabecera-pagina .yoast-breadcrumbs, .migas { font-size: .88rem; color: var(--wp--preset--color--tinta-suave); margin: 0; }
.migas a { color: inherit; text-decoration: none; }
.migas a:hover { color: var(--wp--preset--color--naranja-oscuro); text-decoration: underline; }
.respuesta-corta { font-size: var(--wp--preset--font-size--large); line-height: 1.55; color: var(--wp--preset--color--contrast); }
.caja-cta { border-radius: 24px; }
.actualizado { font-size: .88rem; color: var(--wp--preset--color--tinta-suave); }

/* Aviso en noticias viejas */
.aviso-historico {
	display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.2rem; margin: 0 0 2rem;
	border-radius: 14px; background: #fff7ec; border: 1px solid #f3d6ad; color: #6b3d00; font-size: .95rem;
}
.aviso-historico::before { content: ""; flex: none; width: 1.3rem; height: 1.3rem; margin-top: .1rem; background: currentColor;
	-webkit-mask: var(--ico-clock) center / contain no-repeat; mask: var(--ico-clock) center / contain no-repeat; }
.etiqueta-historico { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
	padding: .15rem .55rem; border-radius: 999px; background: #f1ece6; color: var(--wp--preset--color--tinta-suave); }

/* ---------- Pie ---------- */
.pie a { color: inherit; text-decoration: none; }
.pie a:hover { color: #fff; text-decoration: underline; }
.pie .wp-block-site-logo img { filter: brightness(0) invert(1); opacity: .95; }
.pie-lista { list-style: none; padding: 0 !important; margin: 0; }
.pie-lista li { margin: .45rem 0; }
.pie-lista .ico { margin-right: .5rem; color: var(--wp--preset--color--celeste); }

/* Botón flotante de WhatsApp (solo celular) */
.wa-flotante { position: fixed; right: 16px; bottom: 16px; z-index: 60; margin: 0 !important; }
.wa-flotante a {
	display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
	background: #1f9d55; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.22); font-size: 0;
}
.wa-flotante a::before { content: ""; width: 28px; height: 28px; background: #fff;
	-webkit-mask: var(--ico-whatsapp) center / contain no-repeat; mask: var(--ico-whatsapp) center / contain no-repeat; }
@media (min-width: 782px) { .wa-flotante { display: none; } }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Preguntas frecuentes (bloque FAQ de Yoast: genera el schema FAQPage) ---------- */
.schema-faq { border-top: 1px solid var(--wp--preset--color--borde); }
.schema-faq-section { padding: 1.1rem 0; border-bottom: 1px solid var(--wp--preset--color--borde); }
.schema-faq-question { display: flex; gap: .6rem; align-items: flex-start; font-size: 1.05rem; color: var(--wp--preset--color--contrast); }
.schema-faq-question::before { content: ""; flex: none; width: 1.2em; height: 1.2em; margin-top: .15em; background: var(--wp--preset--color--naranja);
	-webkit-mask: var(--ico-message-circle-question) center / contain no-repeat; mask: var(--ico-message-circle-question) center / contain no-repeat; }
.schema-faq-answer { margin: .45rem 0 0 1.8em; color: var(--wp--preset--color--tinta-suave); }
.tarjeta .ver-mas { align-self: flex-start; }

/* ---------- Ajustes tras la primera revisión ---------- */
/* Los grids no llevan el margen superior que WordPress pone entre bloques */
.tarjetas > *, .resenas > * { margin-block-start: 0 !important; }
/* Pasos en vertical (portada) */
.caja-pasos { background: var(--wp--preset--color--arena); border-radius: 24px; padding: clamp(1.5rem, 3vw, 2.25rem) !important; }
.caja-pasos > h3 { margin-top: 0; }
.pasos-vertical .paso { padding: 0 0 0 3.6rem !important; margin-top: 1.4rem !important; }
.pasos-vertical .paso::before { top: -.1rem; font-size: 1.9rem; }
.pasos-vertical .paso h3 { margin: 0 0 .25rem; font-size: 1.1rem; }
.pasos-vertical .paso p { margin: 0; color: var(--wp--preset--color--tinta-suave); }
/* Pasos en columnas (páginas internas) */
.pasos .paso p { color: var(--wp--preset--color--tinta-suave); }
/* Logo del pie: el PNG tiene fondo blanco, así que va sobre una placa blanca */
.pie .wp-block-site-logo img { filter: none; opacity: 1; }
.pie .wp-block-site-logo { display: inline-block; background: #fff; padding: .6rem .9rem; border-radius: 12px; }
/* Datos de contacto: aire entre el título y el primer dato */
.dato-contacto:first-of-type { margin-top: 1rem !important; }
/* El PNG del logo tiene fondo gris claro: se funde con el encabezado */
.encabezado .wp-block-site-logo img { mix-blend-mode: multiply; }
