/*
Theme Name: Alliante Group
Theme URI: https://alliante.co
Author: Alliante Group
Description: Tema corporativo de Alliante Group: portada, páginas de las tres divisiones (Abogados, Negocios Inmobiliarios y Acero), actualidad y contacto. Incluye selector de idioma ES/EN, menú móvil y formulario de contacto funcional.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alliante
Tags: business, corporate, one-column, custom-menu, custom-logo, translation-ready
*/

/* ==================================================================
   Base — es el <style> que cada página del diseño traía en su <helmet>.
   El acento cambia por división: lo fija body_class (al_body_class()).
   ================================================================== */

:root {
	--al-accent: #d95226;
	--al-bg: #f5f3ef;
	--al-ink: #16181d;
	--al-muted: #6b7078;
	--al-line: rgba(22, 24, 29, 0.08);
	--al-sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--al-display: 'Bricolage Grotesque', Georgia, serif;
}

body.al-inmobiliaria { --al-accent: #206cc0; --al-bg: #f5f7f9; }
body.al-acero        { --al-accent: #4b4f56; --al-bg: #f3f3f2; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--al-bg);
	color: var(--al-ink);
	font-family: var(--al-sans);
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--al-accent); }

img { max-width: 100%; height: auto; }

::selection { background: var(--al-accent); color: #fff; }

@keyframes al-rise {
	from { opacity: 0; transform: translateY(22px); }
	to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* ---------- Cabecera ----------
   Los :hover que el diseño llevaba en style-hover="". Los del cuerpo de las
   páginas los genera tools/build.js en hover.css; estos son de header.php,
   que se escribe a mano, y por eso viven aquí. */

.al-cta,
.al-navlink--dark,
.al-desktop-nav a {
	transition: background-color 0.22s ease, color 0.22s ease;
}

.al-cta--group:hover   { background: #d95226 !important; color: #fff !important; }
.al-cta--accent:hover  { background: #16181d !important; color: #fff !important; }
.al-cta--on-dark:hover { background: #fff !important; color: #16181d !important; }
.al-navlink--dark:hover { color: #fff !important; }

/* ---------- Formularios (venían del <helmet> de Contacto) ---------- */

input, textarea, select, button { font-family: inherit; }
input::placeholder, textarea::placeholder { color: #9aa0a8; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--al-accent) !important; }
:focus-visible { outline: 2px solid var(--al-accent); outline-offset: 3px; }

/* Aviso de resultado del formulario de contacto */
.al-note {
	border-radius: 14px;
	padding: 16px 18px;
	font-size: 15px;
	line-height: 1.5;
	margin: 0 0 22px;
}
.al-note--ok  { background: #e9f7ef; border: 1px solid #b7e3c7; color: #1b6b3a; }
.al-note--err { background: #fdecea; border: 1px solid #f3bdb6; color: #97281a; }
.al-note ul { margin: 8px 0 0; padding-left: 18px; }

/* El honeypot: campo señuelo, invisible para las personas y tentador para los bots */
.al-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Solo para lectores de pantalla */
.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;
}
.skip-link:focus {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 100000;
	width: auto;
	height: auto;
	clip: auto;
	background: var(--al-ink);
	color: #fff;
	padding: 12px 18px;
	border-radius: 100px;
	font-size: 14px;
	font-weight: 600;
}

/* ==================================================================
   Contenido de artículos y páginas (lo que escribe el editor de WordPress).
   Reproduce la tipografía de los artículos del diseño original.
   ================================================================== */

.al-prose {
	font-size: 18.5px;
	line-height: 1.75;
	color: #2c2f36;
}
.al-prose > * { margin: 0 0 26px; }
.al-prose > *:last-child { margin-bottom: 0; }

.al-prose h2 {
	font-family: var(--al-display);
	font-weight: 600;
	font-size: clamp(26px, 3vw, 34px);
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--al-ink);
	margin: 44px 0 18px;
}
.al-prose h3 {
	font-family: var(--al-display);
	font-weight: 600;
	font-size: clamp(21px, 2.2vw, 26px);
	line-height: 1.2;
	color: var(--al-ink);
	margin: 36px 0 14px;
}

.al-prose a { color: var(--al-accent); text-decoration: underline; text-underline-offset: 3px; }
.al-prose a:hover { color: var(--al-ink); }

.al-prose blockquote {
	margin: 38px 0;
	padding: 6px 0 6px 28px;
	border-left: 4px solid var(--al-accent);
	font-family: var(--al-display);
	font-size: clamp(22px, 3vw, 30px);
	font-weight: 500;
	line-height: 1.25;
	color: var(--al-ink);
}
.al-prose blockquote p { margin: 0; }
.al-prose blockquote cite {
	display: block;
	margin-top: 14px;
	font-family: var(--al-sans);
	font-size: 15px;
	font-weight: 600;
	font-style: normal;
	color: var(--al-muted);
}

.al-prose ul, .al-prose ol { padding-left: 22px; }
.al-prose li { margin-bottom: 10px; }

.al-prose img,
.al-prose .wp-block-image img { border-radius: 16px; }
.al-prose figure { margin: 34px 0; }
.al-prose figcaption {
	font-size: 13px;
	color: #8b9098;
	text-align: center;
	margin-top: 10px;
}

.al-prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.al-prose th, .al-prose td { padding: 12px 14px; border-bottom: 1px solid var(--al-line); text-align: left; }

.al-prose pre {
	background: #16181d;
	color: #e6e8ea;
	padding: 20px 22px;
	border-radius: 14px;
	overflow-x: auto;
	font-size: 14.5px;
	line-height: 1.6;
}
.al-prose code { font-size: 0.92em; }

/* Letra capital del primer párrafo, como en los artículos del diseño */
.al-prose--dropcap > p:first-of-type::first-letter {
	font-family: var(--al-display);
	font-size: 52px;
	font-weight: 600;
	float: left;
	line-height: 0.82;
	margin: 6px 14px 0 0;
	color: var(--al-accent);
}

/* Bloques anchos de Gutenberg dentro de una columna estrecha */
.al-prose .alignwide { width: min(1040px, 92vw); margin-left: 50%; transform: translateX(-50%); }
.al-prose .alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); max-width: none; }
.al-prose .alignfull img { border-radius: 0; }

/* Paginación de listados y de artículos partidos en páginas */
.al-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 56px;
}
.al-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border-radius: 100px;
	border: 1.5px solid var(--al-line);
	font-size: 15px;
	font-weight: 600;
	background: #fff;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.al-pagination .page-numbers:hover { border-color: var(--al-ink); color: var(--al-ink); }
.al-pagination .page-numbers.current {
	background: var(--al-ink);
	border-color: var(--al-ink);
	color: #fff;
}

/* Comentarios: el diseño no los contempla, pero un tema debe saber pintarlos */
.al-comments { max-width: 720px; margin: 0 auto; padding: 0 28px 80px; }
.al-comments ol { list-style: none; margin: 0; padding: 0; }
.al-comments .children { list-style: none; padding-left: 26px; }
.al-comments .comment-body {
	background: #fff;
	border: 1px solid var(--al-line);
	border-radius: 18px;
	padding: 24px 26px;
	margin-bottom: 16px;
}
.al-comments .comment-meta { font-size: 13.5px; color: var(--al-muted); margin-bottom: 10px; }
.al-comments .comment-author img { border-radius: 50%; vertical-align: middle; margin-right: 10px; }
.al-comments input[type="text"],
.al-comments input[type="email"],
.al-comments input[type="url"],
.al-comments textarea {
	width: 100%;
	padding: 14px 16px;
	border: 1.5px solid rgba(22, 24, 29, 0.14);
	border-radius: 12px;
	font-size: 15px;
	background: #faf9f6;
}
.al-comments .submit {
	background: var(--al-accent);
	color: #fff;
	border: none;
	padding: 14px 28px;
	border-radius: 100px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

/* Barra de administración: el header pegajoso no debe quedar debajo */
.admin-bar header[style*="position:sticky"] { top: 32px; }
@media screen and (max-width: 782px) {
	.admin-bar header[style*="position:sticky"] { top: 46px; }
}

@media (max-width: 640px) {
	.al-prose { font-size: 17px; }
	.al-prose--dropcap > p:first-of-type::first-letter { font-size: 40px; margin-right: 10px; }
}
