/* ============================================================
   Pie propio (reemplaza la plantilla de Elementor 589)
   Etapa 7 de HOJA-DE-RUTA.md. Se diseña en preview/cabecera/.
   Global: carga en todas las páginas y no depende de home.css.
   Selectores de dos clases: el kit de Elementor (.elementor-kit-277 p, a)
   les gana a los de una sola.
   ============================================================ */

.cb-pie {
	position: relative;
	overflow: hidden;
	padding: clamp(48px, 6vw, 72px) 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	background:
		radial-gradient(circle at 92% 0%, rgba(255, 59, 18, 0.12), transparent 34%),
		radial-gradient(circle at 0% 100%, rgba(83, 74, 220, 0.18), transparent 40%),
		linear-gradient(180deg, #151257 0%, #10131c 62%);
	color: #c8ccd6;
	font-family: var(--cb-font, "Poppins", sans-serif);
}

.cb-pie *,
.cb-pie *::before,
.cb-pie *::after {
	box-sizing: border-box;
}

/*
 * Ancho del contenido: el mismo .cb-container de home.css, repetido aquí
 * porque home.css no carga en todas las páginas (entradas del blog, páginas
 * legales) y ahí el pie quedaba pegado a los bordes (2026-10-15).
 */
.cb-pie .cb-container {
	width: min(100% - 40px, 1280px);
	margin-inline: auto;
}

@media (max-width: 760px) {
	.cb-pie .cb-container {
		width: min(100% - 28px, 1280px);
	}
}

.cb-pie .cb-pie__rejilla {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) repeat(4, minmax(0, 1fr));
	gap: 40px 32px;
}

/* ---------- Marca y contacto ---------- */

.cb-pie .cb-pie__logo {
	display: inline-block;
	border-radius: 10px;
}

.cb-pie .cb-pie__logo img {
	display: block;
	width: auto;
	height: 56px;
}

.cb-pie .cb-pie__frase {
	max-width: 330px;
	margin: 18px 0 22px;
	color: #c8ccd6;
	font-size: 14px;
	line-height: 1.65;
}

.cb-pie .cb-pie__contacto {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cb-pie .cb-pie__contacto > li {
	margin: 0;
}

.cb-pie .cb-pie__contacto a,
.cb-pie .cb-pie__horario {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: #e7e9f5;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
}

.cb-pie .cb-pie__horario {
	color: #aeb3c7;
}

.cb-pie .cb-pie__icono {
	display: inline-grid;
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.05);
	color: #ffffff;
	transition: background-color 0.18s ease, border-color 0.18s ease;
}

.cb-pie .cb-pie__icono svg {
	display: block;
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.cb-pie .cb-pie__icono--relleno svg {
	fill: currentColor;
	stroke: none;
}

.cb-pie .cb-pie__contacto a:hover,
.cb-pie .cb-pie__contacto a:focus-visible {
	color: #ffffff;
}

.cb-pie .cb-pie__contacto a:hover .cb-pie__icono,
.cb-pie .cb-pie__contacto a:focus-visible .cb-pie__icono {
	border-color: var(--cb-accent, #ff3b12);
	background: var(--cb-accent, #ff3b12);
}

/* ---------- Columnas de enlaces ---------- */

.cb-pie .cb-pie__titulo {
	position: relative;
	margin: 6px 0 18px;
	padding-bottom: 12px;
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.3;
}

.cb-pie .cb-pie__titulo::after {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 24px;
	height: 2px;
	border-radius: 2px;
	background: var(--cb-accent, #ff3b12);
	content: "";
}

.cb-pie .cb-pie__lista {
	display: grid;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cb-pie .cb-pie__lista > li {
	margin: 0;
}

.cb-pie .cb-pie__lista a {
	display: inline-block;
	padding: 5px 0;
	color: #c8ccd6;
	font-size: 14px;
	line-height: 1.45;
	text-decoration: none;
	transition: color 0.15s ease, transform 0.15s ease;
}

.cb-pie .cb-pie__lista a:hover,
.cb-pie .cb-pie__lista a:focus-visible {
	color: #ffffff;
	transform: translateX(2px);
}

/* ---------- Franja final ---------- */

.cb-pie .cb-pie__franja {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	margin-top: clamp(40px, 5vw, 56px);
	/* Espacio para la barra fija de contacto: abajo en el celular, a la
	   derecha (botón flotante) en computador. */
	padding: 22px 96px calc(26px + var(--cb-barra-alto, 0px)) 0;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cb-pie .cb-pie__derechos,
.cb-pie .cb-pie__credito {
	margin: 0;
	color: #9aa0b8;
	font-size: 13px;
	line-height: 1.5;
}

.cb-pie .cb-pie__credito a {
	color: #ffffff;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(255, 255, 255, 0.35);
	text-underline-offset: 3px;
}

.cb-pie .cb-pie__credito a:hover {
	text-decoration-color: var(--cb-accent, #ff3b12);
}

.cb-pie a:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
	border-radius: 4px;
}

/* ---------- Tablet y celular ---------- */

@media (max-width: 1099px) {
	.cb-pie .cb-pie__rejilla {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.cb-pie .cb-pie__marca {
		display: grid;
		grid-column: 1 / -1;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 0 40px;
		align-items: start;
		padding-bottom: 32px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	}

	.cb-pie .cb-pie__contacto {
		grid-column: 2;
		grid-row: 1 / span 2;
	}
}

@media (max-width: 760px) {
	.cb-pie .cb-pie__rejilla {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px 20px;
	}

	.cb-pie .cb-pie__marca {
		display: block;
	}

	.cb-pie .cb-pie__logo img {
		height: 48px;
	}

	.cb-pie .cb-pie__franja {
		flex-direction: column;
		align-items: flex-start;
		padding-right: 0;
	}
}

/* ============================================================
   BARRA FIJA DE CONTACTO
   Computador y tablet: botón flotante de WhatsApp abajo a la derecha.
   Celular (hasta 767 px): barra con WhatsApp y Llamar.
   ============================================================ */

:root {
	--cb-barra-alto: 0px;
}

.cb-barra {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 900;
	display: flex;
	/* WhatsApp va primero en el HTML y queda abajo; la llamada, encima. */
	flex-direction: column-reverse;
	align-items: center;
	gap: 12px;
	font-family: var(--cb-font, "Poppins", sans-serif);
}

.cb-barra *,
.cb-barra *::before,
.cb-barra *::after {
	box-sizing: border-box;
}

/* Llamada: del mismo tamaño que WhatsApp (pedido de Steven), en el azul de la
   marca. Blanca se perdía sobre fondos blancos; el aro blanco la despega de
   los fondos oscuros (pie, hero del inicio). */
.cb-barra .cb-barra__boton--tel {
	position: relative;
	display: grid;
	width: 60px;
	height: 60px;
	place-items: center;
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-radius: 50%;
	background: var(--cb-primary, #151257);
	box-shadow: 0 12px 30px rgba(21, 18, 87, 0.35), 0 4px 12px rgba(16, 19, 28, 0.2);
	color: #ffffff;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.cb-barra .cb-barra__boton--tel:hover,
.cb-barra .cb-barra__boton--tel:focus-visible {
	background: #221d80;
	box-shadow: 0 16px 36px rgba(21, 18, 87, 0.42), 0 4px 12px rgba(16, 19, 28, 0.2);
	color: #ffffff;
	transform: translateY(-2px);
}

.cb-barra .cb-barra__boton--tel .cb-barra__icono,
.cb-barra .cb-barra__boton--tel .cb-barra__icono svg {
	width: 26px;
	height: 26px;
}

/* Ícono de trazo: más específico que la regla de relleno del de WhatsApp. */
.cb-barra .cb-barra__boton--tel .cb-barra__icono svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.cb-barra .cb-barra__boton--tel .cb-barra__texto {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.cb-barra .cb-barra__boton--wa {
	position: relative;
	display: grid;
	width: 60px;
	height: 60px;
	place-items: center;
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-radius: 50%;
	background: var(--cb-accent, #ff3b12);
	box-shadow: 0 14px 34px rgba(255, 59, 18, 0.38), 0 4px 12px rgba(16, 19, 28, 0.2);
	color: #ffffff;
	text-decoration: none;
	transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.cb-barra .cb-barra__boton--wa:hover,
.cb-barra .cb-barra__boton--wa:focus-visible {
	background: #e02f0a;
	box-shadow: 0 18px 40px rgba(255, 59, 18, 0.45), 0 4px 12px rgba(16, 19, 28, 0.2);
	color: #ffffff;
	transform: translateY(-2px);
}

.cb-barra .cb-barra__icono,
.cb-barra .cb-barra__icono svg {
	display: block;
	width: 28px;
	height: 28px;
}

.cb-barra .cb-barra__icono svg {
	fill: currentColor;
}

/* El nombre del botón sigue ahí para lectores de pantalla. */
.cb-barra .cb-barra__boton--wa .cb-barra__texto {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

/* Globo «Cotizar por WhatsApp» al pasar el mouse. */
.cb-barra .cb-barra__globo {
	position: absolute;
	top: 50%;
	right: calc(100% + 12px);
	padding: 9px 14px;
	border-radius: 999px;
	background: #ffffff;
	box-shadow: 0 10px 28px rgba(16, 19, 28, 0.18);
	color: var(--cb-primary, #151257);
	font-size: 13.5px;
	font-weight: 600;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transform: translate(6px, -50%);
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.cb-barra .cb-barra__boton:hover .cb-barra__globo,
.cb-barra .cb-barra__boton:focus-visible .cb-barra__globo {
	opacity: 1;
	transform: translate(0, -50%);
}

.cb-barra a:focus-visible {
	outline: 3px solid var(--cb-primary, #151257);
	outline-offset: 3px;
}

@media (max-width: 767px) {
	:root {
		--cb-barra-alto: calc(68px + env(safe-area-inset-bottom, 0px));
	}

	.cb-barra {
		right: 0;
		bottom: 0;
		left: 0;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
		border-top: 1px solid rgba(255, 255, 255, 0.1);
		background: rgba(16, 19, 28, 0.94);
		box-shadow: 0 -10px 30px rgba(8, 10, 30, 0.25);
		-webkit-backdrop-filter: blur(12px);
		backdrop-filter: blur(12px);
	}

	.cb-barra .cb-barra__boton,
	.cb-barra .cb-barra__boton--wa {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		width: auto;
		height: auto;
		min-height: 48px;
		padding: 0 12px;
		border-radius: 14px;
		box-shadow: none;
		font-size: 15px;
		font-weight: 700;
		text-decoration: none;
		white-space: nowrap;
	}

	.cb-barra .cb-barra__boton--wa {
		border: 0;
	}

	.cb-barra .cb-barra__boton--wa:hover,
	.cb-barra .cb-barra__boton--wa:focus-visible {
		box-shadow: none;
		transform: none;
	}

	.cb-barra .cb-barra__boton--wa .cb-barra__texto,
	.cb-barra .cb-barra__boton--tel .cb-barra__texto {
		position: static;
		width: auto;
		height: auto;
		margin: 0;
		overflow: visible;
		clip: auto;
	}

	.cb-barra .cb-barra__boton--tel {
		border: 1px solid rgba(255, 255, 255, 0.28);
		background: rgba(255, 255, 255, 0.06);
		color: #ffffff;
	}

	.cb-barra .cb-barra__boton--tel:hover,
	.cb-barra .cb-barra__boton--tel:focus-visible {
		background: rgba(255, 255, 255, 0.12);
		color: #ffffff;
	}

	.cb-barra .cb-barra__icono,
	.cb-barra .cb-barra__icono svg,
	.cb-barra .cb-barra__boton--tel .cb-barra__icono,
	.cb-barra .cb-barra__boton--tel .cb-barra__icono svg {
		width: 20px;
		height: 20px;
	}

	.cb-barra .cb-barra__boton--tel svg {
		fill: none;
		stroke: currentColor;
		stroke-width: 1.9;
		stroke-linecap: round;
		stroke-linejoin: round;
	}

	.cb-barra .cb-barra__globo {
		display: none;
	}

	.cb-barra a:focus-visible {
		outline-color: #ffffff;
	}
}

/* Celular angosto: ícono y número; «Llamar» queda para lectores de pantalla
   (a 375 px el texto completo se pasaba 7 px). */
@media (max-width: 420px) {
	.cb-barra .cb-barra__verbo {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cb-pie .cb-pie__lista a,
	.cb-pie .cb-pie__icono,
	.cb-barra .cb-barra__boton--wa,
	.cb-barra .cb-barra__globo {
		transition: none;
	}

	.cb-pie .cb-pie__lista a:hover,
	.cb-barra .cb-barra__boton--wa:hover {
		transform: none;
	}
}
