/*
Theme Name: Twenty Twenty-Five ACOR
Theme URI: https://cerrajerosalcorcon.co/
Description: Child theme de Twenty Twenty-Five para ACOR - Cerrajeros Alcorcón 24h. Optimizado para conversión móvil, llamadas de emergencia y SEO local en Alcorcón (Madrid).
Author: ACOR - Cerrajeros Alcorcón
Author URI: https://cerrajerosalcorcon.co/
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: acor
Tags: block-patterns, full-site-editing, locksmith, emergency, local-business
*/

/* =========================================================
   1. BASE — Mobile-first reset & smooth scrolling
   ========================================================= */
html { scroll-behavior: smooth; }

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	/* Padding-bottom para que la barra fija móvil no tape contenido */
	padding-bottom: 72px;
}

/* Desktop: la barra fija se oculta, no hace falta reservar espacio */
@media (min-width: 768px) {
	body { padding-bottom: 0; }
}

/* =========================================================
   2. STICKY BOTTOM CALL BAR — Solo móvil
   Barra fija de llamada de emergencia. Máxima prioridad
   de conversión: siempre visible mientras se desplaza.
   ========================================================= */
.acor-callbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	display: flex;
	align-items: stretch;
	justify-content: stretch;
	background: var(--wp--preset--color--primary, #0F172A);
	box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.25);
	border-top: 3px solid var(--wp--preset--color--accent, #F59E0B);
}

.acor-callbar__link {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: 14px 16px;
	color: #fff !important;
	background: var(--wp--preset--color--alert, #DC2626);
	font-family: var(--wp--preset--font-family--chivo-mono, 'Chivo Mono', monospace);
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: 0.04em;
	text-decoration: none;
	text-transform: uppercase;
	line-height: 1.15;
	transition: background 160ms ease;
}

.acor-callbar__link:hover,
.acor-callbar__link:focus {
	background: #B91C1C;
	color: #fff !important;
}

.acor-callbar__icon {
	font-size: 1.3rem;
	line-height: 1;
	animation: acor-shake 2.2s infinite ease-in-out;
}

/* Ocultar barra fija en desktop */
@media (min-width: 768px) {
	.acor-callbar { display: none; }
}

/* =========================================================
   3. EMERGENCY CTA — Pulse / Glow animation
   Aplicable a cualquier botón con clase .is-style-emergency-cta
   ========================================================= */
.wp-block-button.is-style-emergency-cta .wp-block-button__link {
	background-color: var(--wp--preset--color--alert, #DC2626);
	color: #fff !important;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	border: 2px solid transparent;
	box-shadow: 0 0 0 rgba(220, 38, 38, 0.65);
	animation: acor-pulse 2s infinite;
	transition: transform 200ms ease, background-color 200ms ease;
}

.wp-block-button.is-style-emergency-cta .wp-block-button__link:hover {
	transform: translateY(-2px) scale(1.02);
	background-color: #B91C1C;
	animation: none;
}

@keyframes acor-pulse {
	0%   { box-shadow: 0 0 0 0    rgba(220, 38, 38, 0.65); }
	70%  { box-shadow: 0 0 0 16px rgba(220, 38, 38, 0);    }
	100% { box-shadow: 0 0 0 0    rgba(220, 38, 38, 0);    }
}

@keyframes acor-shake {
	0%, 100%    { transform: rotate(0deg); }
	10%, 30%    { transform: rotate(-12deg); }
	20%, 40%    { transform: rotate(12deg); }
	50%         { transform: rotate(0deg); }
}

/* Respetar preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {
	.wp-block-button.is-style-emergency-cta .wp-block-button__link,
	.acor-callbar__icon {
		animation: none !important;
	}
}

/* =========================================================
   4. LOCAL TRUST BADGES — Distintivos de confianza local
   ========================================================= */
.acor-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.acor-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	background: var(--wp--preset--color--base-light, #F8FAFC);
	color: var(--wp--preset--color--primary, #0F172A);
	border: 1px solid rgba(15, 23, 42, 0.12);
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
}

.acor-badge--urgent {
	background: var(--wp--preset--color--alert, #DC2626);
	color: #fff;
	border-color: transparent;
}

/* =========================================================
   5. SERVICE CARDS — Grid de servicios largo-tail
   ========================================================= */
.acor-service-card {
	background: #fff;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 12px;
	padding: 24px;
	height: 100%;
	transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.acor-service-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
	border-color: var(--wp--preset--color--secondary, #1E40AF);
}

.acor-service-card h3 {
	margin-top: 0.4em;
	color: var(--wp--preset--color--primary, #0F172A);
}

/* =========================================================
   6. 24/7 URGENCY STRIP — Franja superior de disponibilidad
   ========================================================= */
.acor-urgency-strip {
	background: var(--wp--preset--color--alert, #DC2626);
	color: #fff;
	text-align: center;
	padding: 8px 12px;
	font-weight: 700;
	font-size: 0.92rem;
	letter-spacing: 0.03em;
}

.acor-urgency-strip a {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* =========================================================
   7. NEIGHBORHOOD COVERAGE CHECKLIST
   ========================================================= */
.acor-hoods {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 10px 20px;
}

.acor-hoods li {
	position: relative;
	padding-left: 28px;
	line-height: 1.4;
	font-weight: 500;
	color: var(--wp--preset--color--text-dark, #0F172A);
}

.acor-hoods li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	background: var(--wp--preset--color--secondary, #1E40AF);
	color: #fff;
	border-radius: 50%;
	font-size: 0.75rem;
	font-weight: 800;
}

/* =========================================================
   8. FOCUS VISIBILITY — Accesibilidad
   ========================================================= */
a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent, #F59E0B);
	outline-offset: 2px;
}

/* =========================================================
   9. KICKER / EYEBROW — Etiqueta corta encima de títulos
   Estilo "sello" en Chivo Mono. Uso: <p class="acor-kicker">…</p>
   ========================================================= */
.acor-kicker {
	display: inline-block;
	font-family: var(--wp--preset--font-family--chivo-mono, 'Chivo Mono', monospace);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent, #F59E0B);
	padding: 4px 10px 3px;
	border: 1.5px solid currentColor;
	line-height: 1;
	margin: 0 0 1rem;
	position: relative;
}

.acor-kicker::before {
	content: "//";
	margin-right: 8px;
	opacity: 0.65;
}

/* =========================================================
   10. SECTION MARKER — Barra ámbar bajo títulos H2
   Se aplica automáticamente a H2 dentro de contenido.
   ========================================================= */
.acor-section-title,
.wp-block-post-content h2,
.wp-block-group h2 {
	position: relative;
}

.acor-section-title::after,
h2.acor-marker::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	background: var(--wp--preset--color--accent, #F59E0B);
	margin-top: 0.6rem;
	border-radius: 2px;
}

/* =========================================================
   11. FAQ TICKET — Preguntas frecuentes con microdata FAQPage
   Estilo tiquet troquelat: borde superior dashed + perforaciones
   circulares, con icono personalizado de candado antes de la Q.
   ========================================================= */
.acor-faq {
	max-width: 720px;
	margin: 3rem auto;
	padding: 0;
	color: var(--wp--preset--color--text-body, #1E293B);
	font-family: var(--wp--preset--font-family--familjen, 'Familjen Grotesk', sans-serif);
}

.acor-faq__title {
	font-family: var(--wp--preset--font-family--shoulders, 'Big Shoulders Display', sans-serif);
	font-size: clamp(2.2rem, 4vw, 2.9rem);
	font-weight: 800;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary, #0B192C);
	margin: 0 0 1.8rem;
	line-height: 0.95;
	position: relative;
	display: inline-block;
}

.acor-faq__title::after {
	content: "";
	display: block;
	width: 60px;
	height: 5px;
	background: var(--wp--preset--color--accent, #F59E0B);
	margin-top: 0.7rem;
	border-radius: 2px;
}

.acor-faq__kicker {
	display: block;
	font-family: var(--wp--preset--font-family--chivo-mono, 'Chivo Mono', monospace);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted, #475569);
	margin: 0 0 0.4rem;
}

.acor-faq__kicker::before {
	content: "// ";
	color: var(--wp--preset--color--accent, #F59E0B);
}

/* Tiquet troquelat */
.acor-faq__item {
	position: relative;
	background: var(--wp--preset--color--paper, #FDFCF8);
	border: 1px solid #E2E8F0;
	border-top: 2px dashed #94A3B8;
	padding: 1.5rem 1.5rem 1.4rem;
	margin-bottom: 1rem;
	border-radius: 4px;
	transition: border-color 200ms ease, transform 200ms ease;
}

.acor-faq__item:hover {
	border-color: var(--wp--preset--color--accent, #F59E0B);
	transform: translateX(2px);
}

/* Perforaciones tipo tiquet */
.acor-faq__item::before,
.acor-faq__item::after {
	content: "";
	position: absolute;
	top: -7px;
	width: 13px;
	height: 13px;
	background: var(--wp--preset--color--base-light, #F8FAFC);
	border: 1px solid #94A3B8;
	border-radius: 50%;
}

.acor-faq__item::before { left: 16px; }
.acor-faq__item::after  { right: 16px; }

/* Pregunta — con icono de candado dibujado en CSS puro */
.acor-faq__q {
	position: relative;
	font-family: var(--wp--preset--font-family--familjen, 'Familjen Grotesk', sans-serif);
	font-weight: 700;
	font-size: 1.08rem;
	color: var(--wp--preset--color--primary, #0B192C);
	margin: 0 0 0.9rem;
	padding-left: 2.3rem;
	line-height: 1.4;
	transition: color 200ms ease;
}

/* Arco superior del candado */
.acor-faq__q::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 0.15em;
	width: 13px;
	height: 10px;
	border: 2.5px solid currentColor;
	border-bottom: none;
	border-radius: 8px 8px 0 0;
	transition: border-color 200ms ease;
}

/* Cuerpo del candado */
.acor-faq__q::after {
	content: "";
	position: absolute;
	left: 0;
	top: 0.85em;
	width: 20px;
	height: 14px;
	background: currentColor;
	border-radius: 3px;
	transition: background 200ms ease;
}

/* Numeración monospace opcional (uso: data-num="01") */
.acor-faq__q[data-num]::before,
.acor-faq__q[data-num]::after { display: none; }

.acor-faq__q[data-num] {
	padding-left: 3.2rem;
}

.acor-faq__q[data-num]::before {
	content: attr(data-num);
	display: inline-block;
	position: absolute;
	left: 0;
	top: 0.05em;
	font-family: var(--wp--preset--font-family--chivo-mono, 'Chivo Mono', monospace);
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--wp--preset--color--accent, #F59E0B);
	letter-spacing: 0;
	background: none;
	border: none;
	width: auto;
	height: auto;
	border-radius: 0;
}

/* Hover global sobre la Q */
.acor-faq__item:hover .acor-faq__q,
.acor-faq__item:focus-within .acor-faq__q {
	color: var(--wp--preset--color--accent, #F59E0B);
}

/* Respuesta */
.acor-faq__a {
	margin-left: 2.3rem;
}

.acor-faq__a p {
	margin: 0;
	font-family: var(--wp--preset--font-family--familjen, 'Familjen Grotesk', sans-serif);
	font-weight: 400;
	color: var(--wp--preset--color--muted, #475569);
	font-size: 0.98rem;
	line-height: 1.65;
	max-width: 58ch;
}

/* Móvil */
@media (max-width: 600px) {
	.acor-faq { margin: 2rem auto; padding: 0 1rem; }
	.acor-faq__item { padding: 1.3rem 1.1rem 1.2rem; }
	.acor-faq__title { font-size: 1.9rem; }
	.acor-faq__q { padding-left: 2rem; font-size: 1rem; }
	.acor-faq__a { margin-left: 2rem; }
}

/* =========================================================
   12. HERO ENHANCEMENTS — Big Shoulders al máximo
   ========================================================= */
.wp-block-cover .wp-block-heading.has-xx-large-font-size {
	font-family: var(--wp--preset--font-family--shoulders, 'Big Shoulders Display', sans-serif);
	font-weight: 800;
	letter-spacing: 0.015em;
	text-transform: uppercase;
	line-height: 0.95;
}

/* =========================================================
   13b. SITE HEADER — Fondo Nit + logo + nav + call chip
   Override del header de TT5 vía parts/header.html
   ========================================================= */
.acor-site-header .wp-block-site-logo img {
	height: 44px;
	width: auto;
	max-width: 220px;
	display: block;
}

/* Navegación en fondo oscuro */
.acor-site-header .acor-nav a,
.acor-site-header .wp-block-navigation-item a {
	color: #F1F5F9 !important;
	font-family: var(--wp--preset--font-family--familjen, sans-serif);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.85rem;
	transition: color 160ms ease;
}
.acor-site-header .acor-nav a:hover,
.acor-site-header .wp-block-navigation-item a:hover {
	color: var(--wp--preset--color--accent, #F59E0B) !important;
}

/* Hamburger toggle en móvil */
.acor-site-header .wp-block-navigation__responsive-container-open,
.acor-site-header .wp-block-navigation__responsive-container-close {
	color: #F1F5F9;
}

/* Chip de teléfono en el header (uso: <a class="acor-header-phone">) */
.acor-header-phone {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 0.85rem;
	background: var(--wp--preset--color--alert, #DC2626);
	color: #fff !important;
	text-decoration: none !important;
	font-family: var(--wp--preset--font-family--chivo-mono, monospace);
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	border-radius: 8px;
	transition: background 200ms ease, transform 160ms ease;
	white-space: nowrap;
}
.acor-header-phone:hover {
	background: #B91C1C;
	color: #fff !important;
	transform: translateY(-1px);
}
.acor-header-phone__icon { font-size: 1.05rem; line-height: 1; }
.acor-header-phone__badge {
	background: var(--wp--preset--color--accent, #F59E0B);
	color: var(--wp--preset--color--primary, #0B192C);
	font-size: 0.68rem;
	padding: 3px 6px 2px;
	border-radius: 3px;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1;
}

/* Colapsar en móvil: mantener icono + badge, ocultar número */
@media (max-width: 620px) {
	.acor-header-phone__num { display: none; }
	.acor-header-phone { padding: 0.5rem 0.7rem; gap: 0.4rem; }
	.acor-site-header .wp-block-site-logo img { height: 36px; }
}

/* =========================================================
   13c. SITE FOOTER — Fondo Nit, 4 columnas, NAP + servicios + barrios
   Override del footer de TT5 vía parts/footer.html
   ========================================================= */
.acor-site-footer h4 {
	font-family: var(--wp--preset--font-family--shoulders, sans-serif) !important;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 1.05rem;
	color: var(--wp--preset--color--accent, #F59E0B) !important;
	margin: 0 0 0.9rem;
}
.acor-site-footer a {
	color: #F1F5F9;
	text-decoration: none;
	transition: color 160ms ease;
}
.acor-site-footer a:hover {
	color: var(--wp--preset--color--accent, #F59E0B);
}
.acor-site-footer .wp-block-list { padding-left: 0; list-style: none; }
.acor-site-footer .wp-block-list li { margin-bottom: 0.4rem; padding-left: 1rem; position: relative; }
.acor-site-footer .wp-block-list li::before {
	content: "→";
	position: absolute;
	left: 0;
	color: var(--wp--preset--color--accent, #F59E0B);
	font-family: var(--wp--preset--font-family--chivo-mono, monospace);
}
.acor-site-footer .acor-footer-sep {
	border: 0;
	border-top: 1px dashed rgba(203, 213, 225, 0.2);
	background: transparent;
}
.acor-site-footer .wp-block-site-logo img {
	max-width: 140px;
	height: auto;
	display: block;
}

/* =========================================================
   14. TICKET DIVIDER — Separador punteado reutilizable
   Uso: <hr class="acor-ticket-divider">
   ========================================================= */
.acor-ticket-divider {
	border: 0;
	height: 20px;
	background-image: radial-gradient(circle at 10px 10px, #CBD5E1 3px, transparent 3.5px);
	background-size: 20px 20px;
	background-repeat: repeat-x;
	background-position: 0 50%;
	margin: 2.5rem auto;
	max-width: 320px;
}
