/*
 * Independencia Colectiva Código — base común a todas las vistas.
 *
 * Reproduce la capa base que daban Blocksy y su personalizador (paleta, tipografía,
 * reinicio de márgenes, formularios y botones), porque el HTML de las landings
 * fue ajustado sobre ella. Cambiar un valor aquí afecta a TODAS las páginas:
 * comprobar portada, sesión, gracias, grupo y política antes de publicarlo.
 */

/* 1. Variables de marca (antes en Personalizar → Blocksy) */
:root {
	--theme-palette-color-1: #076951;
	--theme-palette-color-2: #16876b;
	--theme-palette-color-3: #365951;
	--theme-palette-color-4: #192c27;
	--theme-palette-color-5: #E7F4F1;
	--theme-palette-color-6: #F2F7F6;
	--theme-palette-color-7: #f8fafa;
	--theme-palette-color-8: #ffffff;

	--theme-font-stack-default: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
	--theme-font-family: var(--theme-font-stack-default);
	--theme-font-weight: 400;
	--theme-text-transform: none;
	--theme-text-decoration: none;
	--theme-font-size: 16px;
	--theme-line-height: 1.65;
	--theme-letter-spacing: 0em;

	--theme-text-color: var(--theme-palette-color-3);
	--theme-link-initial-color: var(--theme-palette-color-1);
	--theme-link-hover-color: var(--theme-palette-color-2);
	--theme-selection-text-color: #ffffff;
	--theme-selection-background-color: var(--theme-palette-color-1);
	--theme-border-color: var(--theme-palette-color-5);
	--theme-headings-color: var(--theme-palette-color-4);
	--theme-content-spacing: 1.5em;
	--theme-list-indent: 2.5em;
	--theme-transition: all .12s cubic-bezier(.455, .03, .515, .955);

	--theme-button-font-weight: 500;
	--theme-button-font-size: 15px;
	--theme-button-min-height: 40px;
	--theme-button-text-initial-color: #ffffff;
	--theme-button-text-hover-color: #ffffff;
	--theme-button-background-initial-color: var(--theme-palette-color-1);
	--theme-button-background-hover-color: var(--theme-palette-color-2);
	--theme-button-border: none;
	--theme-button-border-radius: 8px;
	--theme-button-padding: 5px 20px;

	--theme-form-field-height: 45px;
	--theme-form-field-border-radius: 10px;
	--theme-form-field-border-initial-color: var(--theme-border-color);
	--theme-form-field-border-focus-color: var(--theme-palette-color-1);
	--theme-form-field-border-width: 2px;

	--theme-normal-container-max-width: 1290px;
	--theme-narrow-container-max-width: 750px;
	--theme-content-vertical-spacing: 60px;
	--theme-container-edge-spacing: 90vw;
	--theme-container-width: min(100%, var(--theme-container-edge-spacing));

	/* Interruptores usados por las reglas heredadas */
	--true: initial;
	--false: "";
	--has-link-decoration: var(--true);
	--has-classic-forms: var(--true);
}

@media (max-width: 689.98px) {
	:root {
		--theme-content-vertical-spacing: 50px;
		--theme-container-edge-spacing: 88vw;
	}
}

/* 2. Reinicio */
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	-webkit-tap-highlight-color: transparent;
	scroll-behavior: smooth;
}

body {
	overflow-x: hidden;
	overflow-wrap: break-word;
	-webkit-font-smoothing: antialiased;
	color: var(--theme-text-color);
	background-color: var(--theme-palette-color-7);
}

*, ::before, ::after {
	outline: none;
	box-sizing: border-box;
}

body, p, h1, h2, h3, h4, h5, h6, em, ol, ul, li, tr, th, td, dl, ins, sub, sup, big, cite, form, small, label, table, figure, button, legend, strike, address, caption, fieldset, blockquote {
	margin: 0;
	padding: 0;
	border: none;
	font: inherit;
}

input, select, textarea { margin: 0; }
b, strong { font-weight: bold; }
em { font-style: italic; }
small { font-size: 80%; }
ins, mark { color: inherit; text-decoration: none; background: transparent; }
sup, sub { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -.5em; }
sub { bottom: -.25em; }
hr { height: 1px; border: none; background-color: var(--theme-form-field-border-initial-color); }
img { height: auto; max-width: 100%; vertical-align: middle; }
figure, textarea { display: block; }
audio, canvas, progress, video { display: inline-block; }
embed, iframe, object, video { max-width: 100%; }
code, kbd, samp { padding: 3px 6px; }
pre, code, samp, kbd { tab-size: 4; border-radius: 3px; background: var(--theme-palette-color-6); }
pre { overflow: auto; padding: 15px 20px; }
table { border-collapse: collapse; border-spacing: 0; empty-cells: show; width: 100%; max-width: 100%; }
table, th, td { border: 1px solid var(--theme-border-color); }
th, td { padding: .7em 1em; }
th { font-weight: 600; }

::selection {
	color: var(--theme-selection-text-color);
	background-color: var(--theme-selection-background-color);
}

/* 3. Tipografía */
h1 { --theme-font-weight: 700; --theme-font-size: 40px; --theme-line-height: 1.5; }
h2 { --theme-font-weight: 700; --theme-font-size: 35px; --theme-line-height: 1.5; }
h3 { --theme-font-weight: 700; --theme-font-size: 30px; --theme-line-height: 1.5; }
h4 { --theme-font-weight: 700; --theme-font-size: 25px; --theme-line-height: 1.5; }
h5 { --theme-font-weight: 700; --theme-font-size: 20px; --theme-line-height: 1.5; }
h6 { --theme-font-weight: 700; --theme-font-size: 16px; --theme-line-height: 1.5; }
figcaption { --theme-font-size: 14px; }

h1, h2, h3, h4, h5, h6 { color: var(--theme-heading-color, var(--theme-headings-color)); }

body, h1, h2, h3, h4, h5, h6, label, figcaption, .entry-meta, .entry-excerpt, .page-description, .ct-footer-copyright, .ct-widget > * {
	font-family: var(--theme-font-family);
	font-size: var(--theme-font-size);
	font-weight: var(--theme-font-weight);
	font-style: var(--theme-font-style, inherit);
	line-height: var(--theme-line-height);
	letter-spacing: var(--theme-letter-spacing);
	text-transform: var(--theme-text-transform);
	text-decoration: var(--theme-text-decoration);
}

p { margin-block-end: var(--theme-content-spacing); }
ul, ol { padding-inline-start: var(--theme-list-indent); margin-block-end: var(--theme-content-spacing); }
h1, h2, h3, h4, h5, h6 { margin-block-end: calc(var(--has-theme-content-spacing, 1) * (.3em + 10px)); }

:is(.is-layout-flow, .is-layout-constrained) > :where(:not(h1, h2, h3, h4, h5, h6)) {
	margin-block-start: 0;
	margin-block-end: var(--theme-content-spacing);
}
:is(.is-layout-flow, .is-layout-constrained) :where(h1, h2, h3, h4, h5, h6) {
	margin-block-end: calc(var(--has-theme-content-spacing, 1) * (.3em + 10px));
}

/* 4. Enlaces */
a {
	color: var(--theme-link-initial-color);
	text-decoration: var(--has-link-decoration, var(--theme-text-decoration, none));
	transition: var(--theme-transition);
}
a:hover { color: var(--theme-link-hover-color); }
a:focus, button:focus { outline: none; transition: none; }
a:focus-visible, button:focus-visible {
	outline: 2px solid var(--theme-palette-color-1);
	outline-offset: var(--outline-offset, 2px);
}
.ic-sitio :where(.entry-content :where(p, em, strong) > a, .entry-content :where(ul, ol) a, .wp-block-table a):not(:hover) {
	--theme-text-decoration: underline;
}

/* 5. Formularios */
select, textarea,
input:is([type="url"], [type="tel"], [type="text"], [type="time"], [type="date"], [type="datetime"], [type="datetime-local"], [type="email"], [type="number"], [type="search"], [type="password"]) {
	font-family: var(--theme-form-font-family);
	font-size: var(--theme-form-font-size, 16px);
	font-weight: var(--theme-form-font-weight);
	font-style: var(--theme-form-font-style, inherit);
	line-height: var(--theme-form-line-height);
	letter-spacing: var(--theme-form-letter-spacing);
	text-transform: var(--theme-form-text-transform);
	text-decoration: var(--theme-form-text-decoration);
}

select, textarea,
input:is([type="url"], [type="tel"], [type="text"], [type="time"], [type="date"], [type="datetime"], [type="datetime-local"], [type="email"], [type="number"], [type="search"], [type="password"]),
.ct-pseudo-input {
	appearance: none;
	width: var(--has-width, var(--theme-form-field-width, 100%));
	height: var(--has-height, var(--theme-form-field-height, 40px));
	color: var(--theme-form-text-initial-color, var(--theme-text-color));
	padding: var(--has-classic-forms, var(--theme-form-field-padding, 0 15px));
	border-width: var(--theme-form-field-border-width, 1px);
	border-style: var(--theme-form-field-border-style, solid);
	border-color: var(--theme-form-field-border-initial-color);
	border-radius: var(--has-classic-forms, var(--theme-form-field-border-radius, 3px));
	background-color: var(--has-classic-forms, var(--theme-form-field-background-initial-color));
	transition: color .12s cubic-bezier(.455, .03, .515, .955), outline, border-color, background-color;
	outline: max(2px, var(--theme-form-field-border-width, 1px)) solid transparent;
	outline-offset: calc(var(--theme-form-field-border-width, 1px) * -1);
}

select:focus, textarea:focus,
input:is([type="url"], [type="tel"], [type="text"], [type="time"], [type="date"], [type="datetime"], [type="datetime-local"], [type="email"], [type="number"], [type="search"], [type="password"]):focus,
.ct-pseudo-input:focus {
	color: var(--theme-form-text-focus-color, var(--theme-text-color));
	outline-color: var(--theme-form-field-border-focus-color);
	border-color: var(--theme-form-field-border-focus-color);
	background-color: var(--has-classic-forms, var(--theme-form-field-background-focus-color));
}

select::placeholder, textarea::placeholder,
input:is([type="url"], [type="tel"], [type="text"], [type="time"], [type="date"], [type="datetime"], [type="datetime-local"], [type="email"], [type="number"], [type="search"], [type="password"])::placeholder {
	opacity: .7;
	color: inherit;
}

input[type="date"] { min-height: var(--has-height, var(--theme-form-field-height, 40px)); }
input[type="search"]::-webkit-search-cancel-button { appearance: none; }

select {
	padding-inline-end: 25px;
	background-image: url("data:image/svg+xml,%3Csvg width='21' height='13' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.5.379L20.621 2.5 10.5 12.621.379 2.5 2.5.379l8 8z' fill='%234F5D6D' fill-rule='nonzero'/%3E%3C/svg%3E");
	background-repeat: no-repeat, repeat;
	background-size: 8px auto, 100% auto;
	background-position: right 10px top 50%, 0 0;
}
select option { color: initial; }
textarea { line-height: 1.5; resize: vertical; --theme-form-field-padding: 12px 15px; --theme-form-field-height: 170px; }

.ct-pseudo-input :is(input, select) { outline: none; border-width: 0; border-radius: 0; box-shadow: none; background-color: transparent; }
.ct-pseudo-input :is(input, select):focus { background-color: transparent; }
.ct-pseudo-input:has(:is(input, select):focus) {
	outline-color: var(--theme-form-field-border-focus-color);
	border-color: var(--theme-form-field-border-focus-color);
}

fieldset { padding: 30px; border: 1px dashed var(--theme-border-color); }
legend { font-size: 14px; font-weight: 600; padding: 0 15px; margin-left: -15px; }
label { font-size: 15px; line-height: inherit; cursor: pointer; margin: 0 0 .5em; }

/* 6. Botones */
.button, .ct-button, [type="submit"], .wp-element-button, .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--theme-button-min-height);
	padding: var(--theme-button-padding);
	border: none;
	appearance: none;
	cursor: pointer;
	user-select: none;
	text-align: center;
	border-radius: var(--theme-button-border-radius, 3px);
	transition: color .12s cubic-bezier(.455, .03, .515, .955), background-color, border-color, opacity, transform;
	--has-link-decoration: var(--false);
	position: relative;
	color: var(--theme-button-text-initial-color);
	border: var(--theme-button-border);
	background-color: var(--theme-button-background-initial-color);
	font-family: var(--theme-button-font-family, var(--theme-font-family));
	font-size: var(--theme-button-font-size);
	font-weight: var(--theme-button-font-weight);
	font-style: var(--theme-button-font-style);
	line-height: var(--theme-button-line-height);
	letter-spacing: var(--theme-button-letter-spacing);
	text-transform: var(--theme-button-text-transform);
	text-decoration: var(--theme-button-text-decoration);
}
.button:hover, .ct-button:hover, [type="submit"]:hover, .wp-element-button:hover, .wp-block-button__link:hover {
	color: var(--theme-button-text-hover-color);
	background-color: var(--theme-button-background-hover-color);
}
@media (max-width: 479.98px) {
	.button, .ct-button, [type="submit"], .wp-element-button, .wp-block-button__link { --padding: 5px 15px; }
}

/* 7. Estructura compartida.
 * Se conservan los nombres #main, .ct-container-full y .entry-content porque el CSS
 * de la política (body.page-id-3 #main>.ct-container-full) y otras páginas los usa. */
#main-container {
	display: flex;
	flex-direction: column;
	position: relative;
	min-height: 100vh;
	overflow: clip;
}
#main-container .site-main { flex-grow: 1; }
.entry-content::after { display: table; clear: both; content: ""; }
.entry-content figcaption { text-align: center; margin-block: .5em 0; }
.entry-content .alignleft { float: left; margin-inline-end: var(--theme-content-spacing); }
.entry-content .alignright { float: right; margin-inline-start: var(--theme-content-spacing); }
.entry-content .aligncenter { margin-inline: auto; }

.ct-container,
.ct-container-narrow {
	width: var(--theme-container-width);
	margin-inline: auto;
}
.ct-container { max-width: var(--theme-normal-container-max-width); }
.ct-container-narrow { max-width: var(--theme-narrow-container-max-width); }
.ct-container-full { width: 100%; }

[data-vertical-spacing*="top"] { padding-top: var(--theme-content-vertical-spacing); }
[data-vertical-spacing*="bottom"] { padding-bottom: var(--theme-content-vertical-spacing); }

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	z-index: 100000;
	top: 10px;
	left: 10px;
	padding: 12px 18px;
	color: #fff;
	background: var(--theme-palette-color-1);
	border-radius: 8px;
}

/* 8. Pie del sitio (vistas con pie) */
.ct-footer {
	background-color: var(--theme-palette-color-6);
}
.ct-footer [data-row="bottom"] > .ct-container {
	padding-block: 25px;
}
.ct-footer [data-column="copyright"] {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.ct-footer-copyright {
	--theme-font-weight: 400;
	--theme-font-size: 15px;
	--theme-line-height: 1.3;
}
.ct-footer-copyright p { margin: 0; }
@media (max-width: 689.98px) {
	.ct-footer [data-row="bottom"] > .ct-container { padding-block: 15px; }
}

/* 9. Cabecera del sitio: solo aparece si se asigna un menú con elementos */
.ic-cabecera {
	background: var(--theme-palette-color-8);
	border-bottom: 1px solid var(--theme-border-color);
}
.ic-cabecera .ct-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 70px;
}
.ic-marca { font-weight: 700; color: var(--theme-headings-color); text-decoration: none; }
.ic-menu, .ic-menu ul { list-style: none; margin: 0; padding: 0; }
.ic-menu { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.ic-menu a { color: var(--theme-headings-color); text-decoration: none; font-weight: 600; font-size: 15px; }
.ic-menu a:hover, .ic-menu .current-menu-item > a { color: var(--theme-link-initial-color); }
.ic-menu-boton { display: none; }
@media (max-width: 999.98px) {
	.ic-menu-boton {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		min-height: 44px;
		padding: 0 14px;
		border: 1px solid var(--theme-border-color);
		border-radius: 8px;
		background: transparent;
		color: var(--theme-headings-color);
		font: 600 15px/1 var(--theme-font-family);
		cursor: pointer;
	}
	.ic-nav { flex-basis: 100%; }
	.ic-cabecera .ct-container { flex-wrap: wrap; }
	.ic-cabecera.js-menu .ic-nav[hidden] { display: none; }
	.ic-menu { flex-direction: column; padding: 8px 0 18px; }
	.ic-menu a { display: block; padding: 10px 0; font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}
