/* =========================================================
   Directorio — Estilos públicos
   Mobile-first · variables CSS · modo oscuro · sin dependencias
   ========================================================= */
:root {
  --navy: #05305c;
  --navy-2: #123d82;
  --yellow: #fcd116;
  --yellow-2: #ffe066;
  --red: #dc1e28;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --text: #121826;
  --muted: #5b6475;
  --border: #dfe3ec;
  --primary: var(--navy);
  --primary-ink: #ffffff;
  --accent: var(--yellow);
  --accent-ink: #1a1400;
  --ok: #157f3b;
  --warn: #9a6400;
  --error: #b42318;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .12);
  --wrap: 1200px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1224;
    --surface: #111b33;
    --surface-2: #17233f;
    --text: #e8ecf5;
    --muted: #a3adc2;
    --border: #24314f;
    --primary: #4d8bff;
    --primary-ink: #04122b;
    --ok: #4ade80;
    --warn: #fbbf24;
    --error: #f87171;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { margin: 0; font: 400 16px/1.6 var(--font); color: var(--text); background: var(--bg); text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); font-weight: 800; }
h2, .h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem); font-weight: 750; }
.h3 { font-size: 1.25rem; font-weight: 700; }
.h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 860px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip-link:focus { top: 8px; }

/* ---------- Cabecera: logo centrado ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header::before { content: ""; display: block; height: 5px; background: var(--flag, linear-gradient(90deg, var(--yellow) 0 50%, var(--navy-2) 50% 75%, var(--red) 75%)); }
.brand { display: flex; flex-direction: column; align-items: center; padding: 18px 0 10px; text-align: center; }
.logo { display: inline-block; border-radius: 14px; }
.logo img { width: clamp(200px, 34vw, 300px); height: auto; }
.footer-logo { width: 180px; height: auto; }
@media (prefers-color-scheme: dark) { .logo, .footer-logo { background: #fff; padding: 8px 14px; border-radius: 14px; } .footer-logo { padding: 6px 10px; } }
.tagline { margin: 6px 0 0; color: var(--muted); font-size: .9rem; }

/* ---------- Menú ---------- */
.main-nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.6) blur(10px); -webkit-backdrop-filter: saturate(1.6) blur(10px); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; justify-content: center; }
.main-nav ul { list-style: none; margin: 0; padding: 6px 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: center; }
.main-nav a { display: inline-block; padding: 8px 14px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.main-nav a:hover { background: var(--surface-2); }
.main-nav a[aria-current="page"] { background: var(--surface-2); color: var(--primary); }
.main-nav a.btn-accent { color: var(--accent-ink); background: var(--accent); }
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .nav-inner { justify-content: flex-start; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: 600 .95rem var(--font); cursor: pointer; }
  .bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -6px; } .bars::after { top: 6px; }
  .main-nav ul { display: none; flex-direction: column; align-items: stretch; width: 100%; padding-bottom: 12px; }
  .main-nav.open ul { display: flex; }
  .nav-inner { flex-direction: column; }
  .main-nav a { display: block; }
}

/* ---------- Scroll horizontal de noticias ---------- */
.ticker { background: var(--navy); color: #fff; }
.ticker-inner { display: flex; align-items: center; gap: 12px; min-height: 46px; }
.ticker-label { flex: none; background: var(--yellow); color: var(--accent-ink); font-weight: 800; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px; border-radius: 6px; }
.ticker-viewport { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { list-style: none; margin: 0; padding: 0; display: flex; width: max-content; animation: ticker var(--ticker-duration, 60s) linear infinite; }
.ticker-viewport:hover .ticker-track, .ticker-viewport:focus-within .ticker-track, .ticker.paused .ticker-track { animation-play-state: paused; }
.ticker-track li { white-space: nowrap; padding-right: 22px; }
.ticker-track li::after { content: "•"; color: var(--yellow); margin-left: 22px; }
.ticker-track a { color: #fff; text-decoration: none; font-size: .95rem; }
.ticker-track a:hover { text-decoration: underline; }
.ticker-src { display: inline-block; margin-right: 8px; color: var(--yellow-2); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.ticker-pause { flex: none; background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 6px; width: 32px; height: 28px; cursor: pointer; font-size: .7rem; }
.ticker-empty { margin: 0; opacity: .85; font-size: .95rem; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* El ticker se mueve siempre de derecha a izquierda. Si el sistema pide reducir el movimiento,
   app.js lo hace más lento; el botón de pausa está siempre disponible. */
@media (prefers-reduced-motion: reduce) {
  /* Excepción a la regla global que acorta las animaciones a 0,01 ms */
  .ticker-track { animation-duration: var(--ticker-duration, 60s) !important; }
}
.more-news { text-align: center; margin: 0; padding: 10px 0; background: var(--surface); }
.more-news a { font-weight: 700; }

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

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s; }
.btn:hover { box-shadow: var(--shadow); transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-danger { color: var(--error); }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.4rem; line-height: 1; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: clamp(32px, 6vw, 72px) 0; text-align: center; background:
  radial-gradient(1000px 300px at 50% -40%, color-mix(in srgb, var(--yellow) 35%, transparent), transparent 70%),
  radial-gradient(600px 240px at 90% 120%, color-mix(in srgb, var(--red) 14%, transparent), transparent 70%); }
.lead { font-size: clamp(1rem, .95rem + .4vw, 1.2rem); color: var(--muted); max-width: 680px; margin-inline: auto; }
.search-bar { display: grid; grid-template-columns: 1fr; gap: 8px; max-width: 760px; margin: 24px auto 0; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); }
.search-bar input { border: 0; background: var(--surface-2); border-radius: 14px; padding: 14px 16px; font: inherit; color: var(--text); min-width: 0; }
.search-bar .btn { border-radius: 14px; padding: 14px 24px; }
@media (min-width: 680px) { .search-bar { grid-template-columns: 2fr 1fr auto; } }
.search-bar.inline { margin: 0 0 20px; box-shadow: var(--shadow); }

/* ---------- Secciones ---------- */
.section { padding: clamp(28px, 4vw, 48px) 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.link-more { font-weight: 700; text-decoration: none; }
.page { padding: 20px 0 48px; }
.page-head { margin: 12px 0 20px; }
.page-head h1 small { font-weight: 500; color: var(--muted); font-size: .6em; }
.block { margin: 28px 0; }

/* ---------- Categorías ---------- */
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.cat-tile { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; height: 100%; }
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.cat-ico { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: hsl(var(--hue) 70% 30%); background: hsl(var(--hue) 85% 92%); }
@media (prefers-color-scheme: dark) { .cat-ico { color: hsl(var(--hue) 85% 85%); background: hsl(var(--hue) 40% 22%); } }
.cat-name { font-weight: 700; line-height: 1.3; }
.cat-count { color: var(--muted); font-weight: 600; }
.cat-columns { columns: 3 280px; column-gap: 24px; }
.cat-col { break-inside: avoid; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.cat-col ul { margin: 0; padding-left: 18px; }
.cat-col a { text-decoration: none; }
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.chip { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); font-weight: 600; font-size: .92rem; }
.chip span { color: var(--muted); }
.chip:hover { border-color: var(--primary); }
.chip-list.small .chip { padding: 4px 10px; font-size: .82rem; font-weight: 500; }
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.filter-bar select { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }

/* ---------- Tarjetas de negocio ---------- */
.biz-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.biz-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: transform .15s, box-shadow .15s; height: 100%; position: relative; }
.biz-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.biz-card.is-featured { border-color: color-mix(in srgb, var(--yellow) 70%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--yellow) 50%, transparent), var(--shadow); }
.biz-link { display: flex; gap: 14px; padding: 16px; color: inherit; text-decoration: none; height: 100%; }
.biz-logo { flex: none; width: 72px; height: 72px; border-radius: 14px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; border: 1px solid var(--border); }
.biz-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.biz-logo.lg { width: 120px; height: 120px; border-radius: 20px; }
.monogram { font-weight: 800; font-size: 1.4rem; color: var(--primary); }
.biz-body { min-width: 0; }
.biz-body h3 { font-size: 1.05rem; margin: 0 0 2px; }
.biz-cat { margin: 0; font-size: .85rem; color: var(--primary); font-weight: 600; }
.biz-loc { margin: 2px 0 4px; font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.biz-desc { margin: 0; font-size: .88rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge { display: inline-block; background: var(--yellow); color: var(--accent-ink); font-weight: 800; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; margin-bottom: 4px; }

/* ---------- Carrusel destacados ---------- */
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 340px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.carousel-item { scroll-snap-align: start; }
.carousel-ctrl { display: flex; gap: 8px; }
.featured { background: linear-gradient(180deg, color-mix(in srgb, var(--yellow) 12%, transparent), transparent); }

/* ---------- Ficha ---------- */
.biz-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin: 16px 0 24px; }
.biz-head h1 { margin-bottom: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.biz-columns { display: grid; gap: 20px; }
@media (min-width: 900px) { .biz-columns { grid-template-columns: 1fr 340px; align-items: start; } .biz-side { position: sticky; top: 72px; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin: 0 0 16px; }
.prose { max-width: 70ch; }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); margin: 0 0 16px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 3/2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.contact-list { margin: 0 0 16px; }
.contact-list dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 10px; }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
.social-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.social-list a { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .9rem; }

/* ---------- Noticias ---------- */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.news-item time { font-size: .82rem; color: var(--muted); }
.news-item h2 { margin: 4px 0; }
.news-item h2 a { text-decoration: none; color: var(--text); }
.news-item h2 a:hover { color: var(--primary); text-decoration: underline; }
.news-src { margin: 0; font-size: .85rem; color: var(--primary); font-weight: 600; }

/* ---------- Paginación ---------- */
.pagination ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 0; margin: 28px 0 0; }
.pagination a, .pagination span { display: inline-block; min-width: 40px; padding: 8px 12px; text-align: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; font-weight: 600; }
.pagination [aria-current] { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.pagination .gap { padding: 8px 4px; color: var(--muted); }

/* ---------- Formularios ---------- */
.form fieldset { border: 1px solid var(--border); }
.form legend { font-weight: 800; font-size: 1.05rem; padding: 0 6px; }
.field { margin-bottom: 14px; }
.field label, .field > span { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.field input:not([type=checkbox]):not([type=file]), .field select, .field textarea, .inline-form input, .inline-form select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; transition: border-color .12s, box-shadow .12s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); outline: none; }
[aria-invalid="true"] { border-color: var(--error) !important; }
.field-error { color: var(--error); font-size: .85rem; margin: 4px 0 0; }
.hint { color: var(--muted); font-size: .84rem; margin: 4px 0 0; }
.req { color: var(--red); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.check.big { padding: 14px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--yellow) 18%, var(--surface)); }
.featured-offer { border-color: color-mix(in srgb, var(--yellow) 80%, var(--border)) !important; }
.upload-preview { width: 120px; height: 90px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 6px; }
.grid-2, .grid-3 { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.align-end { align-items: end; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 35%); z-index: 5; }
.hp { position: absolute; left: -9999px; }
.auth { display: grid; place-items: center; min-height: 55vh; }
.auth-card { width: min(100%, 420px); }

/* ---------- Alertas / píldoras ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 12px 0; border: 1px solid; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert-ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.alert-warn { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.alert-error { background: color-mix(in srgb, var(--error) 10%, var(--surface)); border-color: color-mix(in srgb, var(--error) 40%, transparent); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.pill-ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill-warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.pill-gold { background: var(--yellow); color: var(--accent-ink); }
.status-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 16px; }
.stat { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.stat-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.stat-num { font-size: 1.8rem; font-weight: 800; }

/* ---------- Pago ---------- */
.pay-card { text-align: center; max-width: 560px; margin: 0 auto; }
.benefits { text-align: left; max-width: 420px; margin: 0 auto 12px; }
.price { font-size: 1rem; color: var(--muted); }
.price span { font-size: 2.6rem; font-weight: 800; color: var(--text); }
.paypal-box { max-width: 360px; margin: 16px auto; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.inline { display: inline; }

/* ---------- CTA / vacío ---------- */
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(24px, 4vw, 40px); border-radius: 24px; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; }
.cta-inner h2 { color: #fff; }
.cta-inner p { margin: 0; opacity: .92; max-width: 640px; }
.empty { text-align: center; padding: 40px 20px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }

/* ---------- Pie ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 40px; padding: 36px 0 16px; font-size: .92rem; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-grid h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 6px 0; }
.footer-grid a { color: var(--text); text-decoration: none; }
.footer-grid a:hover { color: var(--primary); text-decoration: underline; }
.footer-logo { margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 14px; color: var(--muted); font-size: .85rem; text-align: center; }

/* ---------- Idiomas ---------- */
.lang-switch { display: flex; justify-content: flex-end; }
.lang-switch ul { list-style: none; display: flex; gap: 2px; margin: 8px 0 0; padding: 2px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.lang-switch a { display: inline-block; min-width: 34px; padding: 3px 8px; border-radius: 999px; text-align: center; text-decoration: none; font-size: .78rem; font-weight: 700; color: var(--muted); }
.lang-switch a:hover { color: var(--text); background: var(--surface-2); }
.lang-switch a[aria-current] { background: var(--primary); color: var(--primary-ink); }
.translations { border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 14px; }
.translations summary { cursor: pointer; font-weight: 700; }
.translations[open] summary { margin-bottom: 8px; }

.translations summary .click-here { margin-left: 6px; color: var(--primary); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.translations summary:hover .click-here { text-decoration-thickness: 2px; }

.translations .hint-gap { margin-bottom: 1.6em; } /* una línea de espacio bajo la nota */

/* Locales adicionales */
.loc-row { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 12px; background: var(--bg, transparent); }
.loc-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.locations-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.locations-list li { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.locations-list .loc-name { font-weight: 700; display: block; margin-bottom: 2px; }
.locations-list .loc-links { margin-top: 6px; display: flex; gap: 12px; flex-wrap: wrap; font-size: .92em; }
.loc-count { font-size: .85em; color: var(--muted, #666); }
.locations-list .loc-desc, .locations-list .loc-hours { margin: 8px 0 0; font-size: .94em; }
.loc-hours strong { font-weight: 600; }

/* Negocios itinerantes y agenda de ferias */
.pill-itinerant { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #fff4c2; color: #6b5200; letter-spacing: .02em; }
.biz-card .pill-itinerant { margin-bottom: 4px; }
.btn-whatsapp { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.btn-whatsapp:hover { background: #17824a; color: #fff; }
.event-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.event-grid { grid-template-columns: 1fr; } /* una feria debajo de la otra, siempre a todo lo ancho */
.event-item { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: start; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface, #fff); }
.event-item > div { display: grid; gap: 2px; min-width: 0; }
.event-item .loc-links { margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; font-size: .92em; }
.event-date { font-weight: 800; color: var(--primary); font-size: .9rem; line-height: 1.25; }
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 16px; }
.filter-bar select { max-width: 100%; }
@media (max-width: 480px) { .event-item { grid-template-columns: 1fr; gap: 4px; } }
@media (prefers-color-scheme: dark) { .pill-itinerant { background: #4a3c00; color: #ffe27a; } }

/* Captura del sitio web: tamaño completo 600x400, enlazada */
.site-preview { margin: 0 0 16px; max-width: 600px; }
.site-preview img { display: block; width: 100%; max-width: 600px; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: top center; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); }
.site-preview-link { display: block; text-decoration: none; color: var(--primary); }
.site-preview-link img { transition: box-shadow .2s, transform .2s; }
.site-preview-link:hover img, .site-preview-link:focus-visible img { box-shadow: 0 8px 24px rgba(5, 48, 92, .18); transform: translateY(-2px); }
.site-preview-cap { display: block; margin-top: 8px; font-weight: 600; font-size: .95rem; overflow-wrap: anywhere; }
.site-preview-link:hover .site-preview-cap { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .site-preview-link img { transition: none; } .site-preview-link:hover img { transform: none; } }

/* Mostrar / ocultar contraseña */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 48px; }
.pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.pw-toggle:hover { color: var(--primary); background: var(--surface-2); }
.pw-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.pw-toggle[aria-pressed="true"] { color: var(--primary); }
/* Ocultar el ojo nativo de Edge para no duplicarlo */
.pw-wrap input::-ms-reveal, .pw-wrap input::-ms-clear { display: none; }

/* Nota al final de «Su cuenta» (inscripción) */
.account-note { margin: 4px 0 0; }

/* Términos de Uso y Política de Privacidad */
.legal { padding: clamp(20px, 4vw, 40px); }
.legal .page-head { text-align: left; margin-bottom: 8px; }
.legal-body h2 { font-size: 1.15rem; margin: 1.8em 0 .5em; scroll-margin-top: 16px; }
.legal-body p, .legal-body li { line-height: 1.65; }
.legal-body ul { padding-left: 1.3em; }
.legal-body li + li { margin-top: .35em; }
.legal-links-note { margin: 0 0 8px; }
.footer-legal { margin-top: 6px; font-size: .9rem; }
.footer-legal a { color: inherit; }
.legal-settings { border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin: 12px 0; }

/* Avisos a los dueños */
.pill-danger { background: color-mix(in srgb, var(--error) 14%, transparent); color: var(--error); }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); text-decoration: underline; cursor: pointer; font: inherit; }
.notice-action.is-focus { outline: 3px solid var(--yellow); outline-offset: 2px; }
.notice-action h2 { margin-top: 0; }
.notice-changes { margin-top: 14px; }
.notice-changes summary { cursor: pointer; font-weight: 600; }
.notice-optout { margin: 16px 0 0; text-align: center; }
.notice-box .grid-3 { align-items: end; }
.notice-bulk { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }

.footer-social { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 12px 0 0; }
.footer-social a { font-weight: 600; }

/* ---------- Blog ---------- */
.blog-head h1 small { display: block; margin-top: 4px; }
.blog-head .lead { margin-inline: 0; }
.blog-cats { margin: 0 0 20px; }
.blog-cats .chip[aria-current] { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.blog-cats .chip[aria-current] span { color: inherit; opacity: .8; }
.post-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .15s, box-shadow .15s; height: 100%; }
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.post-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.post-thumb { aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb-ph { display: grid; place-items: center; height: 100%; font-size: 3rem; font-weight: 800; color: var(--primary); background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, var(--surface)), color-mix(in srgb, var(--accent) 22%, var(--surface))); }
.post-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.post-body h3 { font-size: 1.15rem; margin: 0; }
.post-link:hover h3 { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.post-cat { margin: 0; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); }
.post-cat a { text-decoration: none; }
.post-sum { margin: 0; color: var(--muted); font-size: .95rem; }
.post-meta { margin: auto 0 0; color: var(--muted); font-size: .84rem; }
.post-hero { margin-bottom: 18px; }
@media (min-width: 820px) {
  .post-hero .post-link { flex-direction: row; }
  .post-hero .post-thumb { flex: 0 0 58%; aspect-ratio: 16/10; }
  .post-hero .post-body { padding: 26px 28px; justify-content: center; }
  .post-hero .post-body h3 { font-size: clamp(1.4rem, 1rem + 1.2vw, 2rem); }
  .post-hero .post-meta { margin-top: 8px; }
}

.post { max-width: 780px; margin: 0 auto; }
.post-header { margin: 8px 0 20px; }
.post-header h1 { margin: 6px 0 10px; }
.post-lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); color: var(--muted); margin: 0 0 12px; }
.post-header .post-meta { margin: 0; }
.post-cover { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; }
.post-cover img { width: 100%; max-height: 520px; object-fit: cover; }
.blog-body { font-size: 1.07rem; line-height: 1.75; overflow-wrap: break-word; }
.blog-body > :first-child { margin-top: 0; }
.blog-body h2 { font-size: 1.5rem; margin: 1.6em 0 .5em; }
.blog-body h3 { font-size: 1.2rem; margin: 1.4em 0 .4em; }
.blog-body p, .blog-body ul, .blog-body ol { margin: 0 0 1.1em; }
.blog-body li { margin-bottom: .3em; }
.blog-body blockquote { margin: 1.4em 0; padding: 6px 0 6px 20px; border-left: 4px solid var(--accent); font-size: 1.12em; font-style: italic; color: var(--text); }
.blog-body figure { margin: 1.6em 0; }
.blog-body figure img { border-radius: var(--radius-sm); margin-inline: auto; }
.blog-body figcaption, .post-gallery figcaption { color: var(--muted); font-size: .88rem; text-align: center; margin-top: 6px; }
.blog-body hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.blog-video { position: relative; aspect-ratio: 16/9; margin: 1.6em 0; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.blog-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post-gallery { margin-top: 24px; }
.post-gallery figure { aspect-ratio: auto; }
.post-gallery figure a { display: block; aspect-ratio: 3/2; }
.post-gallery figcaption { padding: 0 8px 8px; }
.post-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 24px 0 8px; padding-top: 16px; border-top: 1px solid var(--border); font-size: .9rem; }
.post-share span { font-weight: 700; }
.post-share a { padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; font-weight: 600; }
.post-share a:hover { border-color: var(--primary); }
.post-comments { max-width: 780px; margin-inline: auto; }
.comment-list { list-style: none; margin: 0 0 20px; padding: 0; }
.comment { padding: 16px 0; border-bottom: 1px solid var(--border); }
.comment-head { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; flex-wrap: wrap; }
.comment-head time { color: var(--muted); font-size: .85rem; }
.comment-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--primary); font-weight: 800; font-size: .8rem; }
.comment-text { overflow-wrap: anywhere; }
.comment-reply { margin: 12px 0 0 22px; padding: 10px 14px; border-left: 3px solid var(--primary); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.comment-form { margin-top: 12px; }
.home-blog .post-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.post-wide { max-width: 980px; margin-inline: auto; }
.footer-text { color: var(--muted); }
.footer-contact li { overflow-wrap: anywhere; }

/* ---------- Ferias de la comunidad (Admin › Ferias) ---------- */
.fair-section { margin-bottom: 28px; }
.fair-item { border-left: 4px solid var(--accent); grid-template-columns: 128px 1fr; }
@media (max-width: 480px) { .fair-item { grid-template-columns: 1fr; } }
.fair-item .event-date { display: grid; gap: 4px; align-content: start; }
.fair-name { font-size: 1.05rem; }
.fair-desc { margin: 4px 0 2px; }
.fair-item.is-tentative .event-date time { color: var(--muted); opacity: .85; }
.fair-tentative { display: inline-block; justify-self: start; font-size: .72rem; font-weight: 600; font-style: italic; letter-spacing: .02em; color: var(--muted); opacity: .8; border: 1px dashed color-mix(in srgb, var(--muted) 50%, transparent); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.fair-biz-head { margin-top: 8px; }

/* ---------- Blog: HTML ampliado ---------- */
.blog-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95em; }
@media (max-width: 640px) { .blog-body table { display: block; overflow-x: auto; } }
.blog-body th, .blog-body td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.blog-body th { background: var(--surface-2); font-weight: 700; }
.blog-body caption { caption-side: bottom; color: var(--muted); font-size: .88em; padding-top: 6px; }
.blog-body pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; font-size: .9em; line-height: 1.5; }
.blog-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.blog-body :not(pre) > code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.blog-body iframe, .blog-body video { max-width: 100%; border: 0; border-radius: var(--radius-sm); }
.blog-body audio { width: 100%; }
.blog-body details { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 14px; margin: 1em 0; }
.blog-body summary { cursor: pointer; font-weight: 700; }
.blog-body mark { background: color-mix(in srgb, var(--accent) 45%, transparent); color: inherit; padding: 0 2px; }
.blog-body dl dt { font-weight: 700; }
.blog-body dl dd { margin: 0 0 .6em 1.2em; }

/* ---------- Banners publicitarios ---------- */
.bnr { margin: 18px 0; }
.bnr-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bnr-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); opacity: .8; }
.bnr-box { width: 100%; max-width: var(--bnr-w, 728px); }
.bnr-slide[hidden] { display: none; }
.bnr-slide a, .bnr-slide picture { display: block; }
.bnr-slide img { width: 100%; height: auto; border-radius: 6px; margin: 0 auto; }
.bnr-html { margin: 0 auto; overflow: hidden; }
.bnr-html iframe, .bnr-html img { max-width: 100%; }
.bnr-bottom { margin: 36px 0 0; }
.bnr-bottom + .site-footer { margin-top: 24px; }
@media (prefers-reduced-motion: no-preference) { .bnr-slide.is-in { animation: bnr-in .4s ease; } }
@keyframes bnr-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Página de contacto ---------- */
.contact-page .page-head { text-align: center; }
.contact-intro { margin-inline: auto; max-width: 760px; }
.contact-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 760px); justify-content: center; align-items: start; }
@media (min-width: 720px) {
  .contact-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 24px; align-items: start; }
  .contact-side > h2 { grid-column: 1 / -1; }
  .contact-side > .contact-list, .contact-side > .social-list { grid-column: 1; }
  .contact-side > .contact-map { grid-column: 2; grid-row: 2 / span 2; margin-top: 0; }
}
.cf-grid { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cf-grid { grid-template-columns: 1fr 1fr; } .cf-grid .cf-full { grid-column: 1 / -1; } }
.contact-form fieldset.cf-choices { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.cf-choices legend { font-weight: 600; font-size: .92rem; margin-bottom: 4px; padding: 0; }
.cf-choices .check { margin: 4px 0; }
.contact-form .field-error { margin-top: 4px; }
.contact-side .contact-list { margin: 0 0 12px; }
.contact-map { margin: 12px 0; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4/3; border: 1px solid var(--border); }
.contact-map iframe { width: 100%; height: 100%; border: 0; }
