/*
Theme Name: Masajistas en Barcelona
Theme URI: https://masajistasenbarcelona.es
Description: Directorio de masajistas en Barcelona con mapa (Leaflet/OpenStreetMap), filtros por barrio y tipo de masaje, registro de profesionales desde el frontend y fichas reclamables.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: masajistas-bcn
*/

:root {
	--sand: #f7f1ea;
	--sand-2: #efe5d8;
	--paper: #ffffff;
	--ink: #1f2a2e;
	--ink-2: #47545a;
	--muted: #7a8589;
	--line: #e4d9cb;
	--terracotta: #c0582f;
	--terracotta-dark: #9c4321;
	--sea: #1d6a73;
	--sea-dark: #144d54;
	--ok: #2f7d4f;
	--error: #b3261e;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(31, 42, 46, .06), 0 8px 24px rgba(31, 42, 46, .07);
	--font-head: "Fraunces", Georgia, serif;
	--font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--sand);
	color: var(--ink);
	font: 16px/1.6 var(--font-body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sea); }
a:hover { color: var(--sea-dark); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.wrap--narrow { max-width: 820px; }
@media (min-width: 768px) { .wrap { padding: 0 28px; } }

.screen-reader-text, .skip-link:not(:focus) {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 9999; background: var(--paper); padding: 8px 14px; border-radius: 8px; }

/* Botones */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	padding: .7em 1.2em; border-radius: 999px; border: 2px solid transparent;
	font: 600 .95rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--terracotta); color: #fff; }
.btn--primary:hover { background: var(--terracotta-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--sand-2); color: var(--ink); }
.btn--wa { background: #1f9d55; color: #fff; }
.btn--wa:hover { background: #17803f; color: #fff; }
.btn--lg { padding: .9em 1.6em; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }

/* Cabecera */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1000; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__mark { color: var(--terracotta); display: flex; }
.brand__name { font: 700 1.15rem/1 var(--font-head); }
.brand__logo { max-height: 48px; width: auto; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav__list { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav__list a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav__list a:hover, .nav__list .current-menu-item a { color: var(--terracotta); }
.lang { display: flex; gap: 2px; list-style: none; margin: 0; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang a { display: block; padding: 4px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); text-decoration: none; }
.lang a:hover { color: var(--ink); }
.lang a[aria-current] { background: var(--ink); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
	position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); content: ""; transition: transform .2s;
}
.nav-toggle__bar { top: 21px; }
.nav-toggle__bar::before { left: 0; top: -7px; }
.nav-toggle__bar::after { left: 0; top: 7px; }
.nav-open .nav-toggle__bar { background: transparent; }
.nav-open .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.nav {
		display: none; position: absolute; top: 100%; left: 0; right: 0;
		flex-direction: column; align-items: stretch; gap: 12px;
		background: var(--paper); border-bottom: 1px solid var(--line); padding: 16px;
	}
	.nav-open .nav { display: flex; }
	.nav__list { flex-direction: column; gap: 4px; }
	.nav__list a { display: block; padding: 10px 0; }
	.lang { align-self: flex-start; }
}

/* Hero */
.hero {
	background:
		radial-gradient(1200px 400px at 85% -10%, rgba(192, 88, 47, .16), transparent 60%),
		radial-gradient(900px 400px at 0% 110%, rgba(29, 106, 115, .14), transparent 60%),
		var(--sand);
	padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
}
.hero__inner { max-width: 980px; }
.hero__title { max-width: 14ch; }
.hero__lead { font-size: 1.15rem; color: var(--ink-2); max-width: 58ch; margin: 0 0 28px; }
.hero__stats { color: var(--muted); font-size: .92rem; margin: 14px 0 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 600; color: var(--terracotta); margin: 0 0 12px; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow--light { color: #ffd9c7; }

/* Filtros */
.filters {
	display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
	background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 14px; box-shadow: var(--shadow);
}
.filters__field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 180px; font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.filters__field--grow { flex: 2 1 240px; }
.filters select, .filters input,
.reg input[type="text"], .reg input[type="email"], .reg input[type="password"], .reg input[type="tel"],
.reg input[type="url"], .reg input[type="number"], .reg select, .reg textarea {
	width: 100%; font: 400 1rem/1.4 var(--font-body); color: var(--ink);
	padding: .7em .8em; border: 1px solid var(--line); border-radius: 10px; background: #fff;
	text-transform: none; letter-spacing: 0;
}
.filters select:focus, .filters input:focus, .reg input:focus, .reg select:focus, .reg textarea:focus {
	outline: 2px solid var(--sea); outline-offset: 1px; border-color: transparent;
}
.filters .btn { flex: 0 0 auto; height: 46px; }
@media (max-width: 600px) { .filters .btn { width: 100%; } }

/* Secciones */
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section--tight { padding: 28px 0 64px; }
.section--alt { background: var(--sand-2); }
.section--map { padding-top: 0; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section__head h2 { margin: 0; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }

.page-head { padding: 40px 0 24px; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-head__intro { color: var(--ink-2); max-width: 70ch; margin-bottom: 20px; }

/* Mapas */
.map { width: 100%; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--sand-2); z-index: 1; }
.map--home { height: clamp(360px, 55vh, 560px); box-shadow: var(--shadow); }
.map--page { height: 72vh; min-height: 420px; }
.map--single { height: 300px; margin: 28px 0; }
.map--picker { height: 340px; margin-top: 12px; cursor: crosshair; }
.map--sticky { height: 360px; }
@media (min-width: 1024px) { .map--sticky { position: sticky; top: 88px; height: calc(100vh - 120px); } }

.pin span {
	display: block; width: 30px; height: 30px; margin: 2px auto 0;
	background: var(--sea); border: 3px solid #fff; border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.pin--featured span { background: var(--terracotta); }
.leaflet-container { font-family: var(--font-body); }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.popup { display: flex; flex-direction: column; gap: 2px; min-width: 170px; }
.popup__place { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.popup__title { font: 700 1rem/1.25 var(--font-head); color: var(--ink); }
.popup__price { color: var(--terracotta); font-weight: 600; font-size: .9rem; }
.popup__link { margin-top: 6px; font-weight: 600; }

/* Listado */
.listing { display: grid; gap: 24px; }
@media (min-width: 1024px) { .listing { grid-template-columns: 5fr 7fr; align-items: start; } }
.listing__count { color: var(--muted); margin: 0 0 14px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.card { background: var(--paper); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card.is-featured { border-color: rgba(192, 88, 47, .45); }
.card__media { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; background: linear-gradient(135deg, #e8d5c2, #cfe0df); text-decoration: none; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__initials { font: 700 2.4rem/1 var(--font-head); color: rgba(31, 42, 46, .55); }
.badge { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.badge--featured { background: var(--terracotta); color: #fff; }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card__place { margin: 0 0 4px; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.card__title { margin: 0 0 6px; font-size: 1.15rem; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--terracotta); }
.card__excerpt { margin: 0 0 12px; color: var(--ink-2); font-size: .92rem; }
.card__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card__price { font-weight: 600; color: var(--terracotta); }
.card__tag { font-size: .78rem; background: #e3efee; color: var(--sea-dark); padding: 3px 9px; border-radius: 999px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 12px; padding: 0; }
.chips li { font-size: .78rem; background: var(--sand); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; color: var(--ink-2); }
.chips a { color: inherit; text-decoration: none; }

.empty { background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); padding: 32px; text-align: center; }

.nav-links { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.page-numbers { padding: 8px 14px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Tiles de servicios */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); list-style: none; margin: 0; padding: 0; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 18px; background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); text-decoration: none; color: var(--ink); height: 100%; }
.tile:hover { border-color: var(--terracotta); color: var(--ink); }
.tile__name { font: 600 1.05rem/1.25 var(--font-head); }
.tile__count { font-size: .85rem; color: var(--muted); }

/* CTA */
.cta {
	display: grid; gap: 28px; align-items: center;
	background: linear-gradient(135deg, var(--sea-dark), var(--sea));
	color: #fff; border-radius: 22px; padding: clamp(28px, 5vw, 56px);
}
@media (min-width: 900px) { .cta { grid-template-columns: 1.2fr 1fr; } .cta .btn { grid-column: 1; justify-self: start; } }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .85); margin: 0; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 56px; background: rgba(255, 255, 255, .1); border-radius: 12px; }
.steps li::before {
	content: counter(s); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
	width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--sea-dark);
	display: grid; place-items: center; font-weight: 700;
}

/* Ficha */
.profile__head { background: var(--paper); border-bottom: 1px solid var(--line); padding: 36px 0; }
.profile__head-inner { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.profile__avatar { width: 120px; height: 120px; border-radius: 22px; overflow: hidden; flex: 0 0 auto; display: grid; place-items: center; background: linear-gradient(135deg, #e8d5c2, #cfe0df); }
.profile__avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile__title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 12px; }
.profile__body { display: grid; gap: 32px; padding-top: 36px; padding-bottom: 56px; }
@media (min-width: 900px) { .profile__body { grid-template-columns: 1fr 340px; align-items: start; } }
.prose { font-size: 1.05rem; color: var(--ink-2); }
.prose p { margin: 0 0 1em; }
.facts { display: grid; gap: 0; margin: 24px 0 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.facts div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.facts div:first-child { border-top: 0; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; }
.contact-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; box-shadow: var(--shadow); }
@media (min-width: 900px) { .contact-box { position: sticky; top: 92px; } }
.contact-box__title { font: 700 1.25rem/1 var(--font-head); margin: 0; }
.contact-box__price { font-size: 1.3rem; font-weight: 700; color: var(--terracotta); margin: 0; }
.contact-box__note, .contact-box__none { font-size: .82rem; color: var(--muted); margin: 4px 0 0; }
.claim { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; background: #fff7ef; border: 1px solid #f0d7c2; border-radius: var(--radius); padding: 16px 18px; }
.claim p { margin: 0; font-size: .9rem; color: var(--ink-2); flex: 1 1 280px; }

/* Avisos */
.notice { border-radius: 12px; padding: 14px 18px; margin: 0 0 20px; font-size: .95rem; }
.notice ul { margin: 0; padding-left: 18px; }
.notice--ok { background: #e7f4ec; color: var(--ok); }
.notice--info { background: #e6f0f1; color: var(--sea-dark); }
.notice--error { background: #fbe9e8; color: var(--error); }

/* Formulario de registro */
.reg { display: grid; gap: 22px; }
.reg__group { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); padding: 22px; margin: 0; display: grid; gap: 14px; min-width: 0; }
.reg__group--plain { background: transparent; border: 0; padding: 0; }
.reg__group legend { font: 700 1.2rem/1 var(--font-head); padding: 0 6px; }
.reg label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .92rem; }
.reg label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
.reg .check input { margin-top: 4px; accent-color: var(--terracotta); }
.reg__row { display: grid; gap: 14px; }
@media (min-width: 640px) { .reg__row { grid-template-columns: 1fr 1fr; } }
.reg__checks { display: grid; gap: 6px 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.reg__label { grid-column: 1 / -1; font-weight: 500; font-size: .92rem; }
.reg__hint, .reg__policy { margin: 0; color: var(--muted); font-size: .9rem; }
.reg__search { display: flex; gap: 10px; flex-wrap: wrap; }
.reg__search input { flex: 1 1 240px; width: auto !important; }
.reg__warn { color: var(--error); align-self: center; }
.reg__hp { position: absolute; left: -9999px; }
.reg__i18n { border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 12px; }
.reg__i18n[open] { padding-bottom: 16px; }
.reg__i18n summary { cursor: pointer; font-weight: 500; font-size: .92rem; color: var(--sea); }
.reg .btn--lg { justify-self: start; }

/* Blog / genéricas */
.post-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.post-item h2 a { color: var(--ink); text-decoration: none; }
.post-item__meta { color: var(--muted); font-size: .85rem; margin: 0 0 8px; }

/* Pie */
.site-footer { background: var(--ink); color: #cfd6d8; padding: 56px 0 24px; margin-top: 0; }
.site-footer a { color: #cfd6d8; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer__grid { display: grid; gap: 32px; }
@media (min-width: 800px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer__brand { font: 700 1.3rem/1 var(--font-head); color: #fff; margin: 0 0 10px; }
.site-footer__text { margin: 0 0 18px; max-width: 40ch; }
.site-footer__title { color: #fff; font-weight: 600; margin: 0 0 10px; }
.site-footer__links { list-style: none; margin: 0; padding: 0; columns: 2; font-size: .9rem; }
.site-footer__links li { margin-bottom: 6px; }
.site-footer__bottom { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 40px; padding-top: 20px; font-size: .85rem; }
.site-footer__legal { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
