/* Creador de Nichos. Fondo blanco dominante (los anuncios de AdSense son blancos); colores del nicho en variables. */
:root {
	--ink: #0d2233; --accent: #1c5d63; --cta: #b8741f; --cta-2: #e0a04a; --sand: #f3ead9;
	--paper: #fbf8f2; --line: #e5dccb; --text: #1d2b36; --muted: #586a77; --ok: #1f7a4d; --bad: #a23b1f;
	--radius: 16px; --shadow: 0 1px 2px rgba(13,34,51,.06), 0 8px 24px rgba(13,34,51,.06);
	--font-head: 'Fraunces', Georgia, serif; --font-body: 'Public Sans', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--text); font: 17px/1.6 var(--font-body); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
h1, h2, h3, .h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 4vw, 46px); }
h2 { font-size: clamp(23px, 2.6vw, 30px); margin-top: 1.6em; }
h3, .h3 { font-size: 19px; }
p { margin: 0 0 1em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.lead { font-size: 19px; color: var(--muted); max-width: 680px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cta); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 99; }

/* Botones tipo píldora */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent; font: 700 15px/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn--cta { background: var(--cta); color: #fff; }
.btn--cta:hover { background: var(--cta-2); color: var(--ink); }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); }
.btn--sm { padding: 8px 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Cabecera y pie */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.site-header__in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { text-decoration: none; color: var(--ink); font: 700 21px var(--font-head); }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.site-footer { margin-top: 64px; background: var(--paper); border-top: 1px solid var(--line); padding: 40px 0 20px; font-size: 15px; }
.site-footer__in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer__legal { margin-top: 24px; font-size: 13px; }

/* Hero */
.hero { padding: 40px 0 36px; }
.hero--soft { background: linear-gradient(180deg, var(--paper), #fff); border-bottom: 1px solid var(--line); }
.hero--dark { background: var(--ink); color: #d5e0e6; padding: 56px 0; }
.hero--dark h1 { color: #fff; }
.hero--dark .lead { color: #c9d6dd; }
.hero__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 18px 0 0; }
.stats strong { color: #fff; }
.banner { background: var(--sand); color: var(--ink); font-weight: 600; font-size: 15px; padding: 10px 0; text-align: center; }

/* Migas */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 14px 0 0; margin: 0; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: '›'; margin-right: 6px; }
.crumbs a { color: var(--muted); }

/* Maquetación con lateral */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; margin-top: 28px; }
.layout__side { display: flex; flex-direction: column; gap: 20px; }
.layout__side .calc { position: sticky; top: 90px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Tarjetas */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.note { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 14px; color: var(--muted); }
.listing { display: flex; gap: 18px; }
.listing__photo { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; flex: none; background: var(--sand); }
.listing__body { min-width: 0; flex: 1; }
.listing__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.listing__rank { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sand); color: var(--ink); font-weight: 700; font-size: 14px; }
.listing__name { margin: 0; font-size: 20px; }
.listing__name a { color: var(--ink); text-decoration: none; }
.listing__meta { font-size: 15px; color: var(--muted); margin: 4px 0 8px; }
.listing__meta strong { color: var(--ink); }
.listing__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.listing__summary { font-size: 15px; }
.listing__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #e8f1f1; color: var(--accent); font-size: 12px; font-weight: 700; }
.badge--ok { background: #e3f3ea; color: var(--ok); }
.badge--fee { background: var(--sand); color: var(--ink); }
.badge--muted { background: #eef0f2; color: var(--muted); }
.badge--sponsored { background: #fff4e0; color: #8a5a12; }
.service-card { text-decoration: none; color: var(--text); display: block; transition: border-color .15s ease; }
.service-card:hover { border-color: var(--accent); }
.service-card .link { color: var(--accent); font-weight: 700; font-size: 14px; }
.post-card { text-decoration: none; color: var(--text); display: block; }
.price { background: var(--paper); }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); }
.facts li:first-child { border-top: 0; }
.facts span { color: var(--muted); }
.praised { color: var(--ok); }
.criticised { color: var(--bad); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }

/* Listas de enlaces (ciudades, barrios) */
.linkgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 20px; }
.linkgrid--small { grid-template-columns: repeat(4, minmax(0, 1fr)); font-size: 15px; }
.is-collapsed > .is-more { display: none; }
.more-btn { margin-top: 14px; }

/* Filtros */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 999px; padding: 6px 14px; font: 600 14px var(--font-body); cursor: pointer; }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Calculadora */
.calc { background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.calc__title { font: 700 20px var(--font-head); color: var(--ink); margin-bottom: 14px; }
.calc__msg { font-weight: 600; color: var(--ink); }
.calc__legal { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.calc__error { color: var(--bad); font-size: 14px; margin: 10px 0 0; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.field input, .field select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: 16px var(--font-body); background: #fff; }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hp { position: absolute !important; left: -9999px !important; }
.result { font: 700 30px var(--font-head); color: var(--ink); }

/* FAQ: plegada para el usuario, entera en el HTML */
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.faq details p { margin: 10px 0 0; }

/* Ficha */
.firm-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin-top: 18px; align-items: start; }
.gallery { display: grid; gap: 8px; border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.gallery--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery--3 img:first-child { grid-row: 1 / 3; aspect-ratio: auto; }
.gallery--2 { grid-template-columns: 1fr 1fr; }

/* Guías */
.toc ol { margin: 0; padding-left: 20px; }
.content { max-width: 760px; }
.content img { border-radius: 12px; }
.cta-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: var(--paper); margin: 32px 0; }
.byline { font-size: 14px; }

/* Anuncios: tamaño reservado para no mover la página */
.ad { margin: 24px 0; background: #fff; }

/* Botón de chat */
.chat { position: fixed; right: 18px; bottom: 18px; z-index: 40; }
.chat__bubble { list-style: none; cursor: pointer; width: 60px; height: 60px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); position: relative; }
.chat__bubble::-webkit-details-marker { display: none; }
.chat__bubble img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.chat__icon { color: #fff; font: 700 26px var(--font-head); }
.chat__dot { position: absolute; right: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #2ecc71; border: 2px solid #fff; }
.chat__panel { position: absolute; right: 0; bottom: 72px; width: 290px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.chat__msg { background: var(--paper); border-radius: 12px; padding: 10px 12px; }
.chat__form { display: grid; gap: 8px; }
.chat__form input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: 15px var(--font-body); }

/* Cookies */
.cookies { position: fixed; left: 18px; bottom: 18px; z-index: 41; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cookies[hidden] { display: none; }
.cookies p { margin: 0 0 4px; flex: 1 1 100%; }

/* Gracias y 404 */
.thanks, .notfound { padding: 40px 0; }

@media (max-width: 960px) {
	.layout, .hero__grid, .firm-head { grid-template-columns: 1fr; }
	.layout__side .calc { position: static; }
	.grid--3 { grid-template-columns: 1fr 1fr; }
	.linkgrid { grid-template-columns: 1fr 1fr; }
	.linkgrid--small { grid-template-columns: 1fr 1fr 1fr; }
	.site-footer__in { grid-template-columns: 1fr; }
	.nav { display: none; }
}
@media (max-width: 600px) {
	.grid--2, .grid--3 { grid-template-columns: 1fr; }
	.listing { flex-direction: column; }
	.listing__photo { width: 100%; height: 180px; }
	.linkgrid--small { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
