/* Webs de los negocios. Cada web define su color en :root: --accent, --on-accent
   (texto encima) y --link / --link-dark (enlaces legibles en claro y en oscuro). */
:root {
  --bg: #fbfaf7; --surface: #fff; --ink: #1d1d1b; --muted: #63615a; --line: #e6e2d9;
  --tint: color-mix(in srgb, var(--accent) 9%, var(--surface));
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161614; --surface: #1e1e1b; --ink: #ecebe6; --muted: #a6a39b; --line: #2f2e2a; --link: var(--link-dark); --tint: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 6vw, 2.75rem); margin: 0 0 0.4rem; }
h2 { font-size: 1.2rem; margin: 3rem 0 1rem; }
h3 { font-size: 1.05rem; margin: 0; }
.wrap { max-width: 46rem; margin: 0 auto; padding: 1.25rem 1.25rem 2rem; }
.skip { position: absolute; left: 0.5rem; top: -3rem; background: var(--surface); padding: 0.5rem 0.8rem; border-radius: 8px; }
.skip:focus { top: 0.5rem; }
.empty, .meta, .place { color: var(--muted); }
.meta { font-size: 0.9rem; margin: 0; }
.meta a { color: inherit; }
.lead { font-size: 1.12rem; }
.lead p { margin: 0.6rem 0; }
.more { margin: 1rem 0 0; font-weight: 600; }

/* ---------- navegación de la web ---------- */
.site-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding-bottom: 1.25rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.site-brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); font-weight: 700; text-decoration: none; }
.site-nav { display: flex; gap: 0.25rem; font-size: 0.95rem; }
.wrap > .site-nav { justify-content: flex-end; margin-bottom: 1rem; }
.site-nav a { padding: 0.3rem 0.75rem; border-radius: 999px; color: var(--ink); text-decoration: none; }
.site-nav a:hover { background: var(--tint); }
.site-nav a[aria-current="page"] { background: var(--tint); color: var(--link); font-weight: 600; }

/* ---------- cabecera de la portada ---------- */
.avatar { flex: none; display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 22%; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 1.5rem; text-decoration: none; }
.avatar.sm { width: 2rem; height: 2rem; font-size: 0.8rem; border-radius: 8px; }
.hero { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: start; padding-top: 1.5rem; }
.hero-text h1 { margin-top: 0.1rem; }
.kicker { margin: 0; color: var(--link); font-weight: 650; font-size: 0.95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.25rem 0 0; }
.btn { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; padding: 0.55rem 1.15rem; border-radius: 999px; border: 2px solid var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 650; text-decoration: none; }
.btn:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; color: var(--link); border-color: color-mix(in srgb, var(--link) 45%, transparent); }
.btn.ghost:hover { background: var(--tint); filter: none; }
.btn .p-tel { font-weight: 500; opacity: 0.9; }
@media (max-width: 34rem) {
  .hero { grid-template-columns: 1fr; gap: 1rem; padding-top: 0.5rem; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* Tarjetas de horario, dirección, servicios… */
.info { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin-top: 2rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-top: 2rem; }
.info .card { margin-top: 0; }
.card h2 { font-size: 1rem; margin: 0 0 0.5rem; color: var(--muted); font-weight: 650; }
.card p { margin: 0.25rem 0; }
/* Horario: la semana, los días especiales y «abierto ahora» (lo pone hours.statusScript) */
.week { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.week th, .week td { text-align: left; vertical-align: top; padding: 0.2rem 0; }
.week th { font-weight: 600; padding-right: 1rem; white-space: nowrap; }
.week .closed td { color: var(--muted); }
.hours h3 { font-size: 0.9rem; margin: 0.9rem 0 0.2rem; color: var(--muted); }
.special { list-style: none; padding: 0; margin: 0; }
.special li { margin: 0.2rem 0; }
.hours .note { margin-top: 0.6rem; color: var(--muted); font-size: 0.95rem; }
.open-now { display: inline-flex; align-items: center; gap: 0.45rem; margin: 1rem 0 0; font-weight: 600; font-size: 0.95rem; color: var(--muted); }
.open-now::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: currentColor; }
.open-now.is-open { color: #1d7a3e; }
.card .open-now { margin: 0 0 0.6rem; }
@media (prefers-color-scheme: dark) { .open-now.is-open { color: #5fd08a; } }
.h-adr { margin: 0; }
.map { margin: 0.6rem 0 0; font-weight: 600; }
.contact { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.contact a { font-weight: 600; }

/* ---------- novedades ---------- */
.h-feed > h2, .events > h2 { padding-bottom: 0.6rem; border-bottom: 2px solid var(--ink); }
.entry { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.entry .meta a { text-decoration: none; }
.entry .meta a:hover { text-decoration: underline; }
.e-content p { margin: 0.35rem 0; }
.syndication, .reactions-count { margin: 0.4rem 0 0; font-size: 0.88rem; color: var(--muted); }
.syndication a { color: inherit; }
.reactions-count a { font-weight: 600; }
.photos { display: grid; gap: 0.5rem; margin: 0.8rem 0; }
.photos img { display: block; width: 100%; height: auto; border-radius: 10px; background: var(--line); }
.photos:not(.n1) { grid-template-columns: repeat(2, 1fr); }
.photos:not(.n1) img { aspect-ratio: 4 / 3; object-fit: cover; }
.photos.n3 img:first-child { grid-column: 1 / -1; }
main > .h-entry { padding-top: 0; border: 0; }
main > .h-entry .e-content { font-size: 1.15rem; }

/* ---------- agenda ---------- */
.event { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.event.has-photo { grid-template-columns: auto 1fr 6.5rem; }
.event h3 a { color: var(--ink); text-decoration: none; }
.event h3 a:hover { color: var(--link); text-decoration: underline; }
.event .meta { margin-top: 0.15rem; }
.event .p-summary { margin: 0.35rem 0 0; }
.event-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--line); }
.date-badge { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 3.4rem; height: 3.6rem; border-radius: 12px; background: var(--tint); color: var(--link); font-size: 0.78rem; font-weight: 650; text-transform: uppercase; line-height: 1.1; }
.date-badge b { font-size: 1.45rem; color: var(--ink); }
.events.past .event { opacity: 0.7; }
@media (max-width: 34rem) { .event.has-photo { grid-template-columns: auto 1fr; } .event.has-photo .event-thumb { grid-column: 2; max-width: 10rem; } }
.event-head { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; margin-bottom: 1.25rem; }
.event-head .date-badge { width: 4.2rem; height: 4.4rem; }
.event-head .date-badge b { font-size: 1.8rem; }
.event-full .when { font-size: 1.1rem; font-weight: 600; margin: 0; }
.event-full .when a { color: var(--ink); text-decoration: none; }
.event-full .place { margin: 0.2rem 0 0; }
.event-full .meta { margin-top: 1.5rem; }

/* ---------- Webmentions ---------- */
.mentions { margin-top: 2rem; }
.mentions h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.reactions { font-size: 0.92rem; color: var(--muted); margin: 0.3rem 0; }
.reactions a { text-decoration: none; }
.comment { border-left: 3px solid var(--accent); padding: 0.1rem 0 0.1rem 0.9rem; margin: 0.9rem 0; }
.comment .p-content p { margin: 0.3rem 0; }

/* ---------- pie ---------- */
.foot { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.foot p { margin: 0.4rem 0; }
.foot a { color: inherit; }
.network { margin-top: 1rem !important; font-size: 0.85rem; }
.legal-links { font-size: 0.85rem; }
.webring { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.75rem; align-items: center; margin: 0 0 1.5rem; padding: 0.8rem 1rem; border-radius: var(--radius); background: var(--tint); }
.webring a { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.3; }
.webring a:hover { color: var(--link); }
.webring small { font-weight: 400; color: var(--muted); font-size: 0.78rem; }
.webring .hub { text-align: center; }
.webring .next a { text-align: right; }
@media (max-width: 34rem) { .webring { grid-template-columns: 1fr 1fr; } .webring .hub { grid-column: 1 / -1; grid-row: 1; } }

/* ---------- plantillas (clase t-<plantilla> en <body>) ---------- */

/* Profesional: cabecera centrada con los botones de contacto */
.pro-hero { text-align: center; padding: 2.5rem 1.25rem; border-radius: 20px; background: var(--tint); margin-top: 0.5rem; }
.pro-hero .avatar { margin: 0 auto 1rem; }
.pro-hero .actions { justify-content: center; }
.area, .pro-hero .place { color: var(--muted); margin: 0.4rem 0 0; }
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.4rem 1.5rem; }
.services li { padding-left: 1.5rem; position: relative; }
.services li::before { content: "✓"; position: absolute; left: 0; color: var(--link); font-weight: 700; }
.about h2 { margin-top: 2.5rem; }

/* Personal y Artista: una persona; cabecera sencilla */
.person { padding-top: 1.5rem; }
.person .avatar { width: 3.5rem; height: 3.5rem; font-size: 1.2rem; border-radius: 50%; margin-bottom: 1.25rem; }
.person .kicker { font-style: italic; font-weight: 400; font-size: 1.05rem; }
.links { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 0; }
.links a { padding: 0.2rem 0.75rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.92rem; text-decoration: none; }
.links a:hover { border-color: var(--link); }
.t-personal { font-family: Charter, "Iowan Old Style", Georgia, serif; }
.t-personal .wrap { max-width: 40rem; }
.t-personal .h-feed > h2, .t-personal .events > h2 { border-bottom-width: 1px; }

/* Artista: galería en mosaico */
.t-artista .wrap { max-width: 64rem; }
.t-artista .person .lead { max-width: 40rem; }
.gallery { column-width: 15rem; column-gap: 0.75rem; margin: 1rem 0; }
.gallery figure { margin: 0 0 0.75rem; break-inside: avoid; }
.gallery img { display: block; width: 100%; height: auto; border-radius: 8px; background: var(--line); transition: opacity 0.15s; }
.gallery a:hover img { opacity: 0.88; }
.gallery figcaption { color: var(--muted); font-size: 0.82rem; padding-top: 0.3rem; }
/* Con la galería encima, las fotos de cada publicación ya se ven allí */
.gallery-section ~ .h-feed .photos { display: none; }

/* Entidad: la agenda manda */
.join { background: var(--tint); border-color: transparent; }
.contact-card { margin-top: 3rem; }
.contact-card h2 { margin-top: 0; }

/* Aviso legal y privacidad */
.legal h2 { font-size: 1.15rem; margin: 2rem 0 0.4rem; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.25rem; margin: 1.25rem 0; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.legal dt { font-weight: 650; }
.legal dd { margin: 0; overflow-wrap: anywhere; }
.legal li { margin: 0.5rem 0; }
.legal .meta { margin-top: 2rem; }
@media (max-width: 30rem) { .legal dl { grid-template-columns: 1fr; } .legal dd { margin-bottom: 0.5rem; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Tipos de publicación */
.entry .p-name { margin: 0.2rem 0 0.4rem; }
.entry h3.p-name { font-size: 1.2rem; }
.entry h3.p-name a { color: inherit; text-decoration: none; }
.entry h3.p-name a:hover { text-decoration: underline; }
.entry .p-summary { margin: 0.3rem 0; }
.entry .more, .events .more { margin: 0.4rem 0 0; }
.cite { margin: 0.4rem 0; color: var(--muted); }
.cite a { overflow-wrap: anywhere; }
.cite.bookmark { padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: 8px; color: inherit; }
.cite.bookmark a { font-weight: 600; }
.cite.bookmark small { display: block; color: var(--muted); }
.entry.is-like { padding: 0.6rem 0; }
.entry.is-like .cite { margin: 0; }
.entry.is-article > h1.p-name { margin-bottom: 0.3rem; }

/* Bloques de texto y artículos (Markdown) */
.prose { line-height: 1.65; }
.prose h2 { margin: 1.8rem 0 0.6rem; }
.prose h3 { margin: 1.4rem 0 0.4rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin: 0.2rem 0; }
.prose blockquote { margin: 1rem 0; padding: 0.1rem 1rem; border-left: 3px solid var(--accent); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
section.text { margin-top: 2rem; }
.dated { margin-top: 2.5rem; color: var(--muted); }
