/*
Theme Name: Potere
Theme URI: https://potere.org
Author: Potere
Description: Tema de bloques de Potere. Aplica el Manual de identidad v1.0 y el DESIGN.md del sitio: paleta tinta, petróleo, turquesa y coral; Source Serif 4 y Montserrat; retícula de 1200 px; publicaciones con ficha de trazabilidad.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: potere
*/

/* ---------- Etiquetas, metadatos y enlaces de acción ---------- */
.potere-etiqueta,
.is-style-etiqueta {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--etiqueta);
	font-weight: 600;
	letter-spacing: 0.085em;
	text-transform: uppercase;
	line-height: 1.4;
}
.potere-etiqueta:not(.has-text-color),
.is-style-etiqueta:not(.has-text-color) { color: var(--wp--preset--color--petroleo); }

.potere-meta,
.is-style-meta {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--meta);
	font-weight: 500;
	line-height: 1.5;
}
.potere-meta:not(.has-text-color),
.is-style-meta:not(.has-text-color) { color: var(--wp--preset--color--grafito); }

.potere-accion,
.is-style-accion,
.wp-block-read-more {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--ui);
	font-weight: 600;
}
.potere-accion a,
.is-style-accion a,
a.wp-block-read-more {
	text-decoration: underline;
	text-underline-offset: 0.25em;
	text-decoration-thickness: 1px;
}
.potere-accion a:hover,
.is-style-accion a:hover,
a.wp-block-read-more:hover { text-decoration-thickness: 2px; }

a { text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:where(a, button, input, textarea, select, .wp-element-button):focus-visible {
	outline: 2px solid var(--wp--preset--color--petroleo);
	outline-offset: 2px;
}

/* ---------- Titulares ---------- */
.potere-display {
	font-weight: 300;
	letter-spacing: -0.03em;
	line-height: 1;
}
.potere-display em,
.potere-frase em,
.potere-destacar em {
	font-style: italic;
	color: var(--wp--preset--color--petroleo);
}
.has-tinta-background-color .potere-frase em { color: var(--wp--preset--color--aqua); }

.potere-cifra {
	font-weight: 300;
	letter-spacing: -0.03em;
	line-height: 1;
	font-variant-numeric: lining-nums;
}

/* ---------- Cabecera ---------- */
.potere-cabecera .wp-block-navigation a { text-decoration: none; }
.potere-cabecera .wp-block-navigation .current-menu-item > a,
.potere-cabecera .wp-block-navigation a[aria-current="page"] {
	color: var(--wp--preset--color--petroleo);
	text-decoration: underline;
	text-underline-offset: 0.35em;
}
.potere-cabecera .wp-block-navigation a:hover { text-decoration: underline; text-underline-offset: 0.35em; }
.potere-cabecera .potere-contacto-nav a { color: var(--wp--preset--color--petroleo); font-weight: 600; text-decoration: underline; text-underline-offset: 0.35em; }
.wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--tinta) !important;
	color: var(--wp--preset--color--hueso) !important;
	padding: 32px 24px;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 32px;
	font-weight: 300;
}

/* Selector de idioma */
.potere-idiomas {
	display: inline-flex;
	gap: 0.5em;
	align-items: center;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--meta);
	font-weight: 600;
	letter-spacing: 0.06em;
}
.potere-idiomas a { color: var(--wp--preset--color--grafito); text-decoration: none; }
.potere-idiomas a:hover { color: var(--wp--preset--color--tinta); }
.potere-idiomas .is-actual { color: var(--wp--preset--color--petroleo); text-decoration: underline; text-underline-offset: 0.35em; }
.potere-idiomas .sep { color: var(--wp--preset--color--aqua); }

/* «In Spanish» solo en la versión en inglés */
.potere-solo-es { display: none; }
html[lang^="en"] .potere-solo-es {
	display: inline-block;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--etiqueta);
	font-weight: 600;
	letter-spacing: 0.085em;
	text-transform: uppercase;
	border: 1px solid currentColor;
	padding: 2px 8px;
	margin-bottom: 8px;
}

/* ---------- Filas con filete (método, servicios, criterios) ---------- */
.potere-filas > * {
	border-top: 1px solid var(--wp--preset--color--aqua);
	padding-top: var(--wp--preset--spacing--40);
	padding-bottom: var(--wp--preset--spacing--40);
	margin-block-start: 0 !important;
}
.potere-filas > *:last-child { border-bottom: 1px solid var(--wp--preset--color--aqua); }
.has-tinta-background-color .potere-filas > * { border-color: rgba(185, 218, 215, 0.35); }
.potere-filas .wp-block-columns { margin-bottom: 0; }

/* ---------- Lo más reciente (tarjetas en banda tinta) ---------- */
.potere-recientes .wp-block-post {
	border-left: 1px solid rgba(185, 218, 215, 0.35);
	padding-left: 24px;
}
.potere-recientes .wp-block-post > * + * { margin-block-start: 20px; }
.potere-recientes a { color: var(--wp--preset--color--hueso); }
.potere-reservado {
	border: 1px dashed rgba(185, 218, 215, 0.6);
	padding: 24px;
	opacity: 0.85;
}

/* ---------- Lista de publicaciones ---------- */
.potere-lista .wp-block-post {
	border-top: 1px solid var(--wp--preset--color--tinta);
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--50);
}
.potere-lista .wp-block-post:last-child { border-bottom: 1px solid var(--wp--preset--color--tinta); }
.potere-lista .wp-block-post-title a { text-decoration: none; }
.potere-lista .wp-block-post-title a:hover { text-decoration: underline; }
.potere-filtro { display: flex; gap: 32px; font-family: var(--wp--preset--font-family--sans); font-size: var(--wp--preset--font-size--ui); font-weight: 500; }
.potere-filtro a { color: var(--wp--preset--color--tinta); text-decoration: none; }
.post-type-archive-publicacion .potere-filtro .todas,
.term-nota .potere-filtro .notas,
.term-serie .potere-filtro .series { color: var(--wp--preset--color--petroleo); font-weight: 600; text-decoration: underline; text-underline-offset: 0.35em; }

/* ---------- Nota: ficha de trazabilidad y lectura ---------- */
.potere-ficha > .wp-block-group {
	border-bottom: 1px solid var(--wp--preset--color--aqua);
	padding-top: 14px;
	padding-bottom: 14px;
	margin-block-start: 0 !important;
}
.potere-ficha p { margin: 0; }
.potere-ficha .potere-valor { font-family: var(--wp--preset--font-family--sans); font-size: var(--wp--preset--font-size--ui); font-weight: 500; }
.potere-ficha .potere-valor:empty::before { content: "—"; color: var(--wp--preset--color--grafito); }
.potere-lectura {
	border-left: 2px solid var(--wp--preset--color--petroleo);
	padding-left: 24px;
}
.potere-grafica figcaption, .potere-fuente { font-family: var(--wp--preset--font-family--sans); font-size: var(--wp--preset--font-size--meta); color: var(--wp--preset--color--grafito); }

/* ---------- Formularios (Contact Form 7, WPForms, Gravity Forms, etc.) ---------- */
.potere-formulario input[type="text"],
.potere-formulario input[type="email"],
.potere-formulario input[type="tel"],
.potere-formulario textarea,
.potere-formulario select {
	width: 100%;
	border: 1px solid var(--wp--preset--color--tinta);
	border-radius: 0;
	padding: 12px 14px;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 17px;
	background: var(--wp--preset--color--blanco);
	color: var(--wp--preset--color--tinta);
}
.potere-formulario label { font-family: var(--wp--preset--font-family--sans); font-size: var(--wp--preset--font-size--meta); font-weight: 500; }
.potere-formulario input[type="submit"],
.potere-formulario button[type="submit"] {
	background: var(--wp--preset--color--tinta);
	color: var(--wp--preset--color--blanco);
	border: 0;
	border-radius: 0;
	padding: 14px 24px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.potere-formulario input[type="submit"]:hover,
.potere-formulario button[type="submit"]:hover { background: var(--wp--preset--color--petroleo); }

/* ---------- Imagen de archivo ---------- */
.potere-archivo img { filter: none; }

/* ---------- Móvil ---------- */
@media (max-width: 781px) {
	.potere-cabecera .potere-idiomas { margin-right: 8px; }
	.potere-recientes .wp-block-post-template.is-layout-grid { grid-template-columns: 1fr !important; }
	.potere-hide-mobile { display: none !important; }
}

/* ---------- Ajustes de color en enlaces con color propio ---------- */
.potere-accion.has-text-color a,
.potere-meta.has-text-color a,
p.has-text-color > a:only-child { color: inherit; }
.has-tinta-background-color a:not(.wp-element-button) { color: inherit; }

/* Listas compactas (servicios en las áreas) */
.potere-filas-compactas > * { padding-top: 12px; padding-bottom: 12px; }

/* Pie de página */
.potere-pie a { color: var(--wp--preset--color--grafito); text-decoration: none; }
.potere-pie a:hover { color: var(--wp--preset--color--tinta); text-decoration: underline; }
.potere-pie .wp-block-column > * { margin-block-start: 10px; }
.potere-pie .wp-block-column > *:first-child { margin-block-start: 0; }

/* Títulos en listas en tinta; «Publicaciones» activo en sus páginas */
.potere-lista .wp-block-post-title a { color: var(--wp--preset--color--tinta); }
.post-type-archive-publicacion .potere-cabecera a[href$="/publicaciones/"],
.single-publicacion .potere-cabecera a[href$="/publicaciones/"],
.tax-formato .potere-cabecera a[href$="/publicaciones/"] {
	color: var(--wp--preset--color--petroleo);
	text-decoration: underline;
	text-underline-offset: 0.35em;
}
