/* Cámara Cáceres – Censo. Cabecera y pie calcados de camaracaceres.com
   (medidas y colores tomados de la web oficial, 2026-10-14). */

:root {
	--cct-rojo: #c2002f;
	--cct-rojo-oscuro: #8a0021;
	--cct-rojo-claro: #f1164e;
	--cct-gris-fondo: #f6f4f0;
	--cct-gris-texto: #4a5565;
	--cct-borde: #e2e2e2;
	--cct-texto: #1f2937;
	--cct-blanco: #f4f4f4;
	--cct-barra-alto: 64px;
	--cct-fuente: "Roboto", ui-sans-serif, system-ui, sans-serif;
	--cct-fuente-titulos: "Titillium Web", "Roboto", sans-serif;
	--cct-admin: var(--wp-admin--admin-bar--height, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--cct-fuente);
	font-size: 16px;
	line-height: 1.5;
	color: var(--cct-texto);
	background: #fff;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
img { max-width: 100%; height: auto; }
a { color: var(--cct-rojo); }
h1, h2, h3, h4 { font-family: var(--cct-fuente-titulos); line-height: 1.2; }
.cct-icono { width: 1em; height: 1em; flex: none; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.cct-saltar {
	position: absolute; left: 8px; top: -60px; z-index: 1000;
	padding: 8px 14px; background: var(--cct-rojo); color: #fff; border-radius: 4px; text-decoration: none;
}
.cct-saltar:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--cct-rojo); outline-offset: 2px; }

/* ---------------------------------------------------------------- */
/* Franja superior                                                  */
/* ---------------------------------------------------------------- */

.cct-pre { background: var(--cct-gris-fondo); font-family: ui-sans-serif, system-ui, sans-serif; }
.cct-pre-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.cct-pre ul { list-style: none; margin: 0; padding: 0; display: flex; }
.cct-pre-enlaces { flex-wrap: wrap; }
.cct-pre-enlace {
	display: flex;
	align-items: center;
	height: 40px;
	padding: 0 16px;
	font-size: 12px;
	letter-spacing: -0.3px;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--cct-gris-texto);
	border-right: 1px solid var(--cct-borde);
	transition: background-color .2s, color .2s;
}
.cct-pre-enlace:hover { color: var(--cct-rojo); background: #fff; }
.cct-pre-enlace.cct-actual { color: var(--cct-rojo); background: #fff; box-shadow: inset 0 -2px 0 var(--cct-rojo); }
.cct-pre-oscuro, .cct-pre-primario, .cct-pre-claro { color: var(--cct-blanco); border-right-color: rgba(255,255,255,.25); }
.cct-pre-oscuro { background: var(--cct-rojo-oscuro); }
.cct-pre-primario { background: var(--cct-rojo); }
.cct-pre-claro { background: var(--cct-rojo-claro); }
.cct-pre-oscuro:hover, .cct-pre-primario:hover, .cct-pre-claro:hover { color: #fff; background: var(--cct-rojo-oscuro); }

.cct-redes { gap: 8px; padding: 6px 16px !important; }
.cct-redes a {
	display: flex; align-items: center; justify-content: center;
	width: 28px; height: 28px;
	border-radius: 6px;
	background: var(--cct-rojo);
	color: #fff;
	font-size: 16px;
	transition: opacity .2s;
}
.cct-redes a:hover { opacity: .8; }

/* ---------------------------------------------------------------- */
/* Logo y contacto                                                  */
/* ---------------------------------------------------------------- */

.cct-marca {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 16px;
	background: #fff;
	border-bottom: 1px solid var(--cct-borde);
}
.cct-logo img { display: block; width: 224px; }
.cct-contacto { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }
.cct-contacto a {
	display: flex; align-items: center; gap: 6px;
	font-size: 14px; font-weight: 500;
	color: var(--cct-rojo);
	text-decoration: none;
}
.cct-contacto a:hover { text-decoration: underline; }
.cct-contacto .cct-icono { font-size: 20px; color: var(--cct-texto); }

/* ---------------------------------------------------------------- */
/* Barra del menú (fija al hacer scroll)                            */
/* ---------------------------------------------------------------- */

.cct-barra {
	position: sticky;
	top: var(--cct-admin);
	z-index: 50;
	background: #fff;
	border-bottom: 1px solid var(--cct-borde);
	transition: box-shadow .2s;
}
.cct-fija .cct-barra { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.cct-barra-in {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: var(--cct-barra-alto);
	padding: 0 16px;
}
.cct-logo-mini { display: none; flex: none; }
.cct-logo-mini img { display: block; width: 150px; }
.cct-fija .cct-logo-mini { display: block; }

.cct-menu { margin-left: auto; }
.cct-menu ul { list-style: none; margin: 0; padding: 0; }
.cct-menu-n1 { display: flex; align-items: center; gap: 20px; }
.cct-menu-cabecera { display: none; }
.cct-item { position: relative; }
.cct-enlace {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 0;
	font: 500 14px/20px var(--cct-fuente);
	color: #000;
	text-decoration: none;
	background: none;
	border: 0;
	cursor: pointer;
	white-space: nowrap;
}
.cct-menu-n1 > .cct-item > .cct-enlace { position: relative; height: var(--cct-barra-alto); }
.cct-menu-n1 > .cct-item > .cct-enlace::after {
	content: "";
	position: absolute; left: 0; right: 0; bottom: 18px;
	height: 2px;
	background: var(--cct-rojo);
	transform: scaleX(0);
	transition: transform .2s;
}
.cct-menu-n1 > .cct-item:hover > .cct-enlace::after,
.cct-menu-n1 > .cct-abierto > .cct-enlace::after { transform: scaleX(1); }
.cct-enlace .cct-icono, .cct-desplegar .cct-icono { color: var(--cct-rojo); font-size: 14px; transition: transform .2s; }
.cct-desplegar:not(.cct-enlace) { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.cct-abierto > .cct-desplegar .cct-icono { transform: rotate(180deg); }

.cct-sub {
	position: absolute;
	top: 100%;
	left: -16px;
	min-width: 260px;
	padding: 8px 0;
	background: #fff;
	border: 1px solid var(--cct-borde);
	border-radius: 6px;
	box-shadow: 0 12px 28px rgba(0,0,0,.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px) scale(.98);
	transition: opacity .15s, transform .15s, visibility 0s .15s;
}
.cct-sub .cct-enlace {
	display: flex;
	justify-content: space-between;
	width: 100%;
	padding: 9px 18px;
	white-space: normal;
	text-align: left;
}
.cct-sub .cct-enlace:hover, .cct-sub .cct-enlace:focus-visible { color: var(--cct-rojo); background: var(--cct-gris-fondo); }
.cct-sub .cct-con-hijos > .cct-enlace .cct-icono { transform: rotate(-90deg); }
.cct-sub .cct-sub { top: -9px; left: 100%; }

@media (hover: hover) and (min-width: 1181px) {
	.cct-item:hover > .cct-sub { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
}
.cct-abierto > .cct-sub { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

.cct-herramientas { display: flex; align-items: center; gap: 8px; margin-left: 24px; padding-left: 24px; border-left: 1px solid #e5e7eb; }
.cct-herramientas button {
	display: flex; align-items: center; justify-content: center;
	width: 40px; height: 40px;
	padding: 0;
	background: none; border: 0; border-radius: 6px;
	color: #374151;
	font-size: 24px;
	cursor: pointer;
}
.cct-herramientas button:hover, .cct-herramientas button[aria-expanded="true"] { color: var(--cct-rojo); }
.cct-hamburguesa { display: none !important; }

.cct-buscador {
	display: flex;
	gap: 8px;
	padding: 12px 16px;
	border-top: 1px solid var(--cct-borde);
	background: var(--cct-gris-fondo);
}
.cct-buscador[hidden] { display: none; }
.cct-buscador input {
	flex: 1; min-width: 0;
	padding: 10px 14px;
	font: inherit;
	border: 1px solid #c9c9c9;
	border-radius: 6px;
}
.cct-buscador button {
	padding: 10px 20px;
	font: 500 15px var(--cct-fuente);
	color: #fff;
	background: var(--cct-rojo);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}
.cct-buscador button:hover { background: var(--cct-rojo-oscuro); }

/* ---------------------------------------------------------------- */
/* Móvil y tableta: menú lateral                                    */
/* ---------------------------------------------------------------- */

@media (max-width: 1180px) {
	.cct-hamburguesa { display: flex !important; }
	.cct-herramientas { margin-left: auto; padding-left: 0; border-left: 0; }
	.cct-menu {
		position: fixed;
		top: var(--cct-admin); right: 0; bottom: 0;
		z-index: 200;
		width: min(360px, 88vw);
		margin: 0;
		overflow-y: auto;
		background: #fff;
		box-shadow: -8px 0 30px rgba(0,0,0,.2);
		transform: translateX(105%);
		visibility: hidden;
		transition: transform .25s ease, visibility 0s .25s;
	}
	.cct-menu-abierto .cct-menu { transform: none; visibility: visible; transition-delay: 0s; }
	.cct-menu-cabecera {
		display: flex; align-items: center; justify-content: space-between;
		padding: 8px 8px 8px 20px;
		font: 600 18px var(--cct-fuente-titulos);
		color: #fff;
		background: var(--cct-rojo);
	}
	.cct-menu-cerrar { display: flex; padding: 8px; color: #fff; background: none; border: 0; font-size: 24px; cursor: pointer; }
	.cct-menu-n1 { display: block; }
	.cct-item { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--cct-borde); }
	.cct-sub .cct-item { border-bottom: 0; }
	.cct-menu-n1 > .cct-item > .cct-enlace { height: auto; }
	.cct-menu-n1 > .cct-item > .cct-enlace::after { display: none; }
	.cct-enlace { flex: 1; justify-content: space-between; padding: 14px 20px; white-space: normal; text-align: left; }
	.cct-desplegar:not(.cct-enlace) { display: flex; padding: 14px 20px; }
	.cct-sub, .cct-sub .cct-sub {
		position: static;
		display: none;
		flex-basis: 100%;
		min-width: 0;
		padding: 0 0 8px 12px;
		border: 0; border-radius: 0; box-shadow: none;
		background: transparent;
		opacity: 1; visibility: visible; transform: none; transition: none;
	}
	.cct-abierto > .cct-sub { display: block; }
	.cct-sub .cct-enlace { padding: 10px 20px; font-weight: 400; }
	.cct-sub .cct-con-hijos > .cct-enlace .cct-icono { transform: none; }
	.cct-abierto > .cct-enlace .cct-icono { transform: rotate(180deg) !important; }
}
/* Por debajo de .cct-barra (z-index 50), que contiene el menú lateral: si el velo
   quedara encima, cada toque en el menú caería en el velo y lo cerraría. */
.cct-velo { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.4); }
.cct-velo[hidden] { display: none; }

@media (max-width: 900px) {
	.cct-pre-nav { flex-direction: column; }
	.cct-pre-enlaces { justify-content: center; width: 100%; }
	.cct-pre-enlaces li { flex: 1 1 auto; }
	.cct-pre-enlace { justify-content: center; border-bottom: 1px solid var(--cct-borde); }
	.cct-contacto { display: none; }
}
@media (max-width: 600px) {
	.cct-logo img { width: 190px; }
	.cct-fija .cct-logo-mini img { width: 120px; }
}

/* ---------------------------------------------------------------- */
/* Contenido                                                        */
/* ---------------------------------------------------------------- */

.cct-principal { flex: 1; outline: none; }
.cct-contenido { max-width: 1200px; margin: 0 auto; padding: 48px 16px 64px; }
.cct-titulo {
	margin: 0 0 28px;
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 700;
	color: var(--cct-texto);
}
.cct-titulo::after {
	content: "";
	display: block;
	width: 56px; height: 4px;
	margin-top: 12px;
	background: var(--cct-rojo);
	border-radius: 2px;
}
.cct-texto > :first-child { margin-top: 0; }

/* ---------------------------------------------------------------- */
/* Pie                                                              */
/* ---------------------------------------------------------------- */

.cct-pie { color: #fff; background: var(--cct-rojo); padding: 48px 32px; }
.cct-pie-in {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 32px 48px;
	max-width: 1376px;
	margin: 0 auto;
}
.cct-pie-logo img { display: block; width: 224px; }
.cct-pie-redes { list-style: none; display: flex; gap: 0; margin: 16px 0 0; padding: 0; }
.cct-pie-redes a { display: flex; padding: 4px 8px; color: #fff; font-size: 24px; transition: opacity .2s; }
.cct-pie-redes a:hover { opacity: .75; }
.cct-pie-info p { margin: 8px 0 0; padding: 8px 0; font-size: 14px; line-height: 1.5; max-width: 390px; }
.cct-pie-columnas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.cct-pie-titulo {
	margin: 20px 0 16px;
	font: 400 18px/28px var(--cct-fuente-titulos);
	letter-spacing: .9px;
	text-transform: uppercase;
}
.cct-pie ul:not(.cct-pie-redes) { list-style: none; margin: 0; padding: 0; }
.cct-pie-columna a { display: inline-block; padding: 4px 0; font-size: 14px; color: #fff; text-decoration: none; }
.cct-pie-columna a:hover { text-decoration: underline; }
.cct-pie :focus-visible { outline-color: #fff; }

@media (max-width: 900px) {
	.cct-pie { padding: 40px 20px; }
	.cct-pie-in { grid-template-columns: 1fr; }
	.cct-pie-columnas { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 32px; }
}

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