/* Ayto – Diseño · marco de página municipal.
   Todo va con prefijo .ayto- y sin !important. */

:root {
	--ayto-color: #8a1c3a;
	--ayto-color-oscuro: color-mix(in srgb, var(--ayto-color) 78%, #000);
	--ayto-color-claro: color-mix(in srgb, var(--ayto-color) 10%, #fff);
	--ayto-texto: #2b2b2b;
	--ayto-texto-suave: #595959;
	--ayto-borde: #d4d4d4;
	--ayto-fondo-suave: #f4f5f7;
	--ayto-ancho: 1180px;
	--ayto-radio: 4px;
	--ayto-fuente: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
	--ayto-fuente-titulos: Georgia, "Times New Roman", serif;
}

body.ayto {
	margin: 0;
	background: #fff;
	color: var(--ayto-texto);
	font-family: var(--ayto-fuente);
	font-size: 17px;
	line-height: 1.55;
	-webkit-text-size-adjust: 100%;
}
body.ayto *, body.ayto *::before, body.ayto *::after { box-sizing: border-box; }
body.ayto img { max-width: 100%; height: auto; }
body.ayto a { color: var(--ayto-color); text-underline-offset: .15em; }
body.ayto a:hover { color: var(--ayto-color-oscuro); }
body.ayto :focus-visible { outline: 3px solid color-mix(in srgb, var(--ayto-color) 55%, #fff); outline-offset: 2px; }
body.ayto h1, body.ayto h2, body.ayto h3 { line-height: 1.2; color: #1f1f1f; }
body.ayto h1 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin: .2em 0 .6em; }

.ayto-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ayto-saltar { position: absolute; left: 8px; top: -60px; z-index: 1000; background: #fff; color: var(--ayto-color); padding: 10px 16px; border: 2px solid var(--ayto-color); border-radius: var(--ayto-radio); font-weight: 700; }
.ayto-saltar:focus { top: 8px; }

.ayto-contenedor { max-width: var(--ayto-ancho); margin: 0 auto; padding-left: 16px; padding-right: 16px; }

/* Cabecera */
.ayto-cabecera { border-bottom: 1px solid #e3e3e3; background: #fff; }
.ayto-franja { background: #f7f7f7; font-size: 13px; color: var(--ayto-texto-suave); }
.ayto-franja .ayto-contenedor { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.ayto-buscar { display: flex; }
.ayto-buscar input { width: 160px; padding: 4px 8px; font: inherit; border: 1px solid var(--ayto-borde); border-right: 0; border-radius: var(--ayto-radio) 0 0 var(--ayto-radio); }
.ayto-buscar button { display: inline-grid; place-items: center; width: 32px; border: 1px solid var(--ayto-borde); background: #fff; color: var(--ayto-texto); border-radius: 0 var(--ayto-radio) var(--ayto-radio) 0; cursor: pointer; }
.ayto-barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.ayto-marca { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ayto-texto); }
.ayto-marca img { display: block; height: 56px; width: auto; }
.ayto-marca-texto { font-weight: 700; font-size: 1.35rem; color: var(--ayto-color); }
.ayto-marca-sitio { border-left: 2px solid var(--ayto-borde); padding-left: 14px; font-weight: 600; color: var(--ayto-texto-suave); }
.ayto-menu-boton { display: none; }
.ayto-menu { display: flex; flex-wrap: wrap; gap: 4px 22px; list-style: none; margin: 0; padding: 0; font-weight: 700; font-size: 15px; }
.ayto-menu a { display: inline-block; padding: 6px 0; text-decoration: none; color: var(--ayto-texto); border-bottom: 3px solid transparent; }
.ayto-menu a:hover, .ayto-menu .current-menu-item > a, .ayto-menu .current-menu-ancestor > a, .ayto-menu a[aria-current] { color: var(--ayto-color); border-bottom-color: var(--ayto-color); }
.ayto-menu .sub-menu { list-style: none; margin: 0; padding: 0 0 0 12px; font-weight: 400; }

.ayto-migas { font-size: 14px; color: var(--ayto-texto-suave); }
.ayto-migas ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 8px 0 10px; }
.ayto-migas li + li::before { content: "›"; margin: 0 8px; color: #999; }
.ayto-migas a { text-decoration: none; }

/* Cabecera grande */
.ayto-heroe {
	background:
		linear-gradient(rgba(35, 10, 18, .55), rgba(35, 10, 18, .55)),
		var(--ayto-heroe-imagen, linear-gradient(120deg, #6b4a3a, #a0785a 45%, #3e2a22));
	background-size: cover;
	background-position: center;
	color: #fff;
	text-align: center;
	padding: clamp(36px, 7vw, 64px) 0;
}
.ayto-heroe-titulo { font-family: var(--ayto-fuente-titulos); font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 700; line-height: 1.1; margin: 0; text-wrap: balance; }
.ayto-heroe-subtitulo { margin: 10px 0 0; font-weight: 700; font-size: clamp(1rem, 2.4vw, 1.25rem); }

/* Contenido */
.ayto-principal { display: block; min-height: 50vh; outline: none; }
.ayto-contenido { padding-top: 24px; padding-bottom: 48px; }
.ayto-articulo { max-width: 820px; }
.ayto-texto > * + * { margin-top: 1em; }
.ayto-fecha { color: var(--ayto-texto-suave); margin-top: -.6em; }
.ayto-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.ayto-lista a { font-weight: 700; font-size: 1.1rem; }
.ayto-lista p { margin: 4px 0 0; color: var(--ayto-texto-suave); }

body.ayto .ayto-boton, body.ayto .wp-block-button__link {
	display: inline-flex; align-items: center; gap: 8px;
	background: var(--ayto-color); color: #fff; border: 0; border-radius: var(--ayto-radio);
	padding: 10px 20px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
body.ayto .ayto-boton:hover, body.ayto .wp-block-button__link:hover { background: var(--ayto-color-oscuro); color: #fff; }
body.ayto .ayto-boton-secundario { background: #fff; color: var(--ayto-color); border: 1px solid var(--ayto-color); }
body.ayto .ayto-boton-secundario:hover { background: var(--ayto-color-claro); color: var(--ayto-color-oscuro); }

/* Compartir */
.ayto-compartir { margin: 28px 0 0; padding-top: 16px; border-top: 1px solid #e5e5e5; }
.ayto-compartir-titulo { font-weight: 700; margin: 0 0 8px; }
.ayto-compartir ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ayto-compartir a, .ayto-copiar {
	display: inline-block; padding: 6px 12px; border: 1px solid var(--ayto-borde); border-radius: 999px;
	background: #fff; color: var(--ayto-texto); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer;
}
.ayto-compartir a:hover, .ayto-copiar:hover { border-color: var(--ayto-color); color: var(--ayto-color); }
.ayto-compartir-estado { min-height: 1.4em; margin: 6px 0 0; font-size: 14px; color: #1e6b34; }

/* Paginación */
body.ayto .nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
body.ayto .page-numbers { padding: 6px 12px; border: 1px solid var(--ayto-borde); border-radius: var(--ayto-radio); text-decoration: none; }
body.ayto .page-numbers.current { background: var(--ayto-color); border-color: var(--ayto-color); color: #fff; }

/* Pie */
.ayto-pie { background: #1f1f1f; color: #ddd; font-size: 14px; margin-top: 40px; }
.ayto-pie a, body.ayto .ayto-pie a { color: #f0f0f0; }
body.ayto .ayto-pie a:hover { color: #fff; }
.ayto-pie-columnas { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 24px; padding-top: 28px; padding-bottom: 28px; }
.ayto-pie p { margin: 0 0 6px; }
.ayto-pie-org { font-weight: 700; color: #fff; }
.ayto-redes, .ayto-pie-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ayto-pie-menu { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: flex-end; }

@media (max-width: 860px) {
	.ayto-js .ayto-menu-boton {
		display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; font: inherit; font-weight: 700;
		background: #fff; border: 1px solid var(--ayto-borde); border-radius: var(--ayto-radio); cursor: pointer; color: var(--ayto-texto);
	}
	.ayto-nav { flex-basis: 100%; }
	.ayto-js .ayto-nav { display: none; }
	.ayto-js .ayto-nav.ayto-abierto { display: block; }
	.ayto-menu { flex-direction: column; gap: 0; }
	.ayto-menu a { display: block; padding: 10px 0; border-bottom: 1px solid #eee; }
	.ayto-marca img { height: 44px; }
	.ayto-marca-sitio { display: none; }
	.ayto-pie-columnas { grid-template-columns: 1fr; }
	.ayto-pie-menu { justify-content: flex-start; }
	.ayto-franja .ayto-contenedor > span { font-size: 12px; }
	.ayto-buscar input { width: 110px; }
}

@media (prefers-reduced-motion: reduce) {
	body.ayto * { scroll-behavior: auto; transition: none; animation: none; }
}

@media print {
	.ayto-franja, .ayto-nav, .ayto-menu-boton, .ayto-compartir, .ayto-pie, .ayto-saltar { display: none; }
	.ayto-heroe { background: none; color: #000; padding: 0; }
}
