/* ==========================================================================
   Codane — cabecera y pie (codigo del tema hijo)
   El contenido de las paginas se maqueta con DANE Maquetador Pro V2; sus
   estilos viven en el «CSS Global» del maquetador.
   ========================================================================== */

:root {
	--cdn-blue: #0094da;
	--cdn-blue-dark: #007bb8;
	--cdn-navy: #12385c;
	--cdn-light: #f1f5f9;
	--cdn-black: #000;
	--cdn-shell: 1600px;
	--cdn-font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body {
	font-family: var(--cdn-font);
	color: #000;
	background: #fff;
}

body.cdn-nav-lock {
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   Logo en texto
   -------------------------------------------------------------------------- */
.cdn-logo {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-end;
	line-height: 1;
	text-decoration: none !important;
	font-family: var(--cdn-font);
}

.cdn-logo__word {
	font-size: 46px;
	font-weight: 800;
	letter-spacing: -1px;
	background: linear-gradient(180deg, #e3e6ea 0%, #9aa1a9 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.cdn-logo__o {
	color: var(--cdn-blue);
	-webkit-text-fill-color: var(--cdn-blue);
}

.cdn-logo__tag {
	margin-top: 2px;
	font-size: 12px;
	font-weight: 500;
	color: var(--cdn-blue);
}

.cdn-logo--footer {
	align-items: flex-start;
}

.cdn-logo--footer .cdn-logo__word {
	font-size: 38px;
	background: none;
	color: #fff;
}

.cdn-logo--footer .cdn-logo__tag {
	margin-top: 6px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Cabecera
   -------------------------------------------------------------------------- */
/*
 * Siempre fija: se oculta al bajar y reaparece al subir solo con transform,
 * asi el contenido nunca se desplaza. El transform se aplica unicamente
 * mientras esta oculta: con transform la cabecera seria el bloque contenedor
 * del panel movil (position:fixed) y lo recortaria.
 */
.cdn-header {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	right: 0;
	z-index: 60;
	background: #000;
	font-family: var(--cdn-font);
	transition: transform .35s cubic-bezier(.2, .8, .2, 1), background-color .3s ease, box-shadow .3s ease;
}

/* Hueco que ocupa la cabecera en las paginas sin hero (alto real via JS). */
.cdn-header-spacer {
	height: var(--cdn-header-h, 134px);
}

.cdn-header--overlay {
	background: transparent;
}

.cdn-header.is-scrolled {
	background: #000;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.cdn-header.is-hidden {
	transform: translateY(calc(-100% - var(--wp-admin--admin-bar--height, 0px)));
	box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
	.cdn-header { transition: none; }
}

.cdn-header__shell {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 24px;
	width: 100%;
	max-width: var(--cdn-shell);
	margin: 0 auto;
	padding: 37px 0 37px 80px;
	box-sizing: border-box;
}

.cdn-header__logo {
	justify-self: start;
}

.cdn-header__logo img {
	display: block;
	max-height: 60px;
	width: auto;
}

/* Menu en pastilla */
.cdn-header__nav {
	justify-self: center;
	display: flex;
	align-items: center;
	min-width: 620px;
	height: 60px;
	padding: 0 40px;
	box-sizing: border-box;
	justify-content: center;
	border-radius: 14px;
	background: rgba(39, 39, 39, .92);
}

.cdn-menu,
.cdn-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cdn-menu {
	display: flex;
	align-items: center;
	gap: 30px;
}

.cdn-menu > li {
	position: relative;
}

.cdn-menu a {
	display: block;
	color: #fff;
	font-size: 18px;
	font-weight: 500;
	line-height: 60px;
	text-transform: uppercase;
	text-decoration: none !important;
	white-space: nowrap;
	transition: color .2s;
}

.cdn-menu a:hover {
	color: var(--cdn-blue);
}

/* Submenu (Servicios) */
.cdn-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 50%;
	min-width: 280px;
	padding: 12px 0;
	border-radius: 12px;
	background: #1b1b1b;
	box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 8px);
	transition: opacity .2s, transform .2s, visibility .2s;
}

.cdn-menu li:hover > .sub-menu,
.cdn-menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}

.cdn-menu .sub-menu a {
	padding: 10px 22px;
	font-size: 15px;
	line-height: 1.3;
	text-transform: none;
}

.cdn-menu .sub-menu a:hover {
	background: rgba(255, 255, 255, .06);
}

/* Boton de contacto */
.cdn-header__cta {
	justify-self: end;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 205px;
	height: 60px;
	padding: 0 28px;
	box-sizing: border-box;
	border-radius: 14px;
	background: var(--cdn-blue);
	color: #fff !important;
	font-size: 18px;
	font-weight: 500;
	text-transform: uppercase;
	text-decoration: none !important;
	transition: background .2s;
}

.cdn-header__cta:hover {
	background: var(--cdn-blue-dark);
}

.cdn-header__cta--mobile,
.cdn-header__toggle,
.cdn-sub-toggle {
	display: none;
}

.cdn-header__toggle {
	justify-self: end;
	width: 48px;
	height: 48px;
	padding: 12px;
	border: 0;
	border-radius: 12px;
	background: rgba(39, 39, 39, .92);
	cursor: pointer;
	flex-direction: column;
	justify-content: space-between;
}

.cdn-header__toggle span {
	display: block;
	height: 2px;
	border-radius: 2px;
	background: #fff;
	transition: transform .25s, opacity .25s;
}

.cdn-header.is-open .cdn-header__toggle span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.cdn-header.is-open .cdn-header__toggle span:nth-child(2) { opacity: 0; }
.cdn-header.is-open .cdn-header__toggle span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

@media (max-width: 1700px) {
	.cdn-header__shell { padding-right: 32px; }
}

@media (max-width: 1366px) {
	.cdn-header__shell { padding: 28px 32px; }
	.cdn-header__nav { min-width: 0; padding: 0 32px; }
	.cdn-menu { gap: 24px; }
	.cdn-menu a { font-size: 16px; }
	.cdn-header__cta { min-width: 0; font-size: 16px; }
}

@media (max-width: 1024px) {
	.cdn-header__shell {
		grid-template-columns: 1fr auto;
		padding: 20px 20px;
	}

	.cdn-logo__word { font-size: 36px; }
	.cdn-header__shell > .cdn-header__cta { display: none; }
	.cdn-header__toggle { display: flex; }

	/* Panel lateral: entra desde la derecha y ocupa la mitad de la pantalla */
	.cdn-header.is-open { z-index: 1000; }
	body.cdn-nav-lock .cdn-wa-float { opacity: 0; visibility: hidden; }

	.cdn-header::before {
		content: "";
		position: fixed;
		inset: 0;
		z-index: 1;
		background: rgba(0, 0, 0, .55);
		opacity: 0;
		visibility: hidden;
		transition: opacity .3s, visibility .3s;
	}

	.cdn-header.is-open::before {
		opacity: 1;
		visibility: visible;
	}

	.cdn-header__toggle {
		position: relative;
		z-index: 3;
	}

	.cdn-header__nav {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		z-index: 2;
		width: clamp(210px, 50vw, 440px);
		min-width: 0;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		height: auto;
		padding: calc(var(--wp-admin--admin-bar--height, 0px) + 96px) 20px 32px;
		border-radius: 0;
		background: #0b0b0b;
		box-shadow: -18px 0 40px rgba(0, 0, 0, .45);
		overflow-y: auto;
		overscroll-behavior: contain;
		visibility: hidden;
		transform: translateX(100%);
		transition: transform .35s cubic-bezier(.2, .8, .2, 1), visibility .35s;
	}

	.cdn-header.is-open .cdn-header__nav {
		visibility: visible;
		transform: none;
	}

	.cdn-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.cdn-menu > li {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		border-bottom: 1px solid rgba(255, 255, 255, .1);
	}

	.cdn-menu > li > a {
		flex: 1;
		min-width: 0;
		padding: 15px 0;
		font-size: 16px;
		font-weight: 600;
		line-height: 1.3;
		letter-spacing: .4px;
	}

	.cdn-menu .current-menu-item > a,
	.cdn-menu .current-menu-ancestor > a { color: var(--cdn-blue); }

	.cdn-sub-toggle {
		display: inline-flex;
		flex: 0 0 40px;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		margin-right: -8px;
		padding: 0;
		border: 0;
		border-radius: 8px;
		background: transparent;
		color: #fff;
		cursor: pointer;
	}

	.cdn-sub-toggle:hover { background: rgba(255, 255, 255, .08); }
	.cdn-sub-toggle svg { transition: transform .25s; }
	.is-sub-open > .cdn-sub-toggle svg { transform: rotate(180deg); }

	.cdn-menu .sub-menu {
		position: static;
		display: none;
		flex: 0 0 100%;
		min-width: 0;
		margin: 0 0 14px;
		padding: 4px 0 4px 14px;
		border-left: 2px solid var(--cdn-blue);
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.cdn-menu .is-sub-open > .sub-menu { display: block; }

	.cdn-menu .sub-menu a {
		padding: 9px 0;
		font-size: 14px;
		font-weight: 500;
		line-height: 1.35;
		white-space: normal;
		color: rgba(255, 255, 255, .8);
	}

	.cdn-menu .sub-menu a:hover { background: none; color: var(--cdn-blue); }

	.cdn-header__cta--mobile {
		display: inline-flex;
		height: auto;
		min-height: 52px;
		padding: 12px 16px;
		text-align: center;
		margin-top: 28px;
		font-size: 15px;
		justify-self: auto;
	}
}

@media (max-width: 1024px) and (prefers-reduced-motion: reduce) {
	.cdn-header__nav,
	.cdn-header::before { transition: none; }
}

/* --------------------------------------------------------------------------
   Pie
   -------------------------------------------------------------------------- */
.cdn-footer {
	background: #000;
	color: #fff;
	font-family: var(--cdn-font);
}

.cdn-footer__shell {
	max-width: 1722px;
	margin: 0 auto;
	padding: 120px 0 0;
	box-sizing: border-box;
}

.cdn-footer__grid {
	display: grid;
	grid-template-columns: 485fr 412fr 472fr 353fr;
}

.cdn-footer__about {
	max-width: 370px;
	margin: 46px 0 0;
	font-size: 17px;
	line-height: 1.65;
	color: #fff;
}

.cdn-footer__title {
	margin: 0 0 32px;
	font-family: var(--cdn-font);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	text-transform: uppercase;
}

.cdn-footer__links,
.cdn-footer__contact {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cdn-footer__links li + li {
	margin-top: 14px;
}

.cdn-footer__links a,
.cdn-footer__contact a {
	color: #fff;
	font-size: 17px;
	letter-spacing: .2px;
	text-decoration: none !important;
	transition: color .2s;
}

.cdn-footer__links a:hover,
.cdn-footer__contact a:hover {
	color: var(--cdn-blue);
}

.cdn-footer__contact li {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	font-size: 17px;
	line-height: 1.4;
}

.cdn-footer__contact li + li {
	margin-top: 22px;
}

.cdn-footer__contact .cdn-icon {
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	margin-top: -2px;
}

.cdn-footer__social {
	display: flex;
	gap: 18px;
}

.cdn-footer__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid #2c3a47;
	border-radius: 50%;
	color: #fff;
	transition: background .2s, border-color .2s;
}

.cdn-footer__social a:hover {
	background: var(--cdn-blue);
	border-color: var(--cdn-blue);
}

.cdn-footer__social .cdn-icon {
	width: 22px;
	height: 22px;
}

.cdn-footer__bottom {
	margin-top: 95px;
	padding: 40px 16px 60px;
	border-top: 1px solid #1b2a38;
	text-align: center;
}

.cdn-footer__bottom p {
	margin: 0;
	font-size: 14px;
	color: #e5e7eb;
}

@media (max-width: 1780px) {
	.cdn-footer__shell { padding-left: 40px; padding-right: 40px; }
}

@media (max-width: 1024px) {
	.cdn-footer__shell { padding: 80px 32px 0; }
	.cdn-footer__grid { grid-template-columns: 1fr 1fr; row-gap: 56px; column-gap: 40px; }
	.cdn-footer__bottom { margin-top: 64px; }
}

@media (max-width: 600px) {
	.cdn-footer__shell { padding: 64px 20px 0; }
	.cdn-footer__grid { grid-template-columns: 1fr; row-gap: 44px; }
	.cdn-footer__about { margin-top: 28px; font-size: 16px; }
	.cdn-footer__title { margin-bottom: 22px; }
	.cdn-footer__bottom { padding: 28px 0 40px; }
}

/* --------------------------------------------------------------------------
   Boton flotante de WhatsApp
   -------------------------------------------------------------------------- */
.cdn-wa-float {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 9990;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	border-radius: 50%;
	background: #25d366;
	color: #fff !important;
	text-decoration: none !important;
	box-shadow: 0 10px 25px rgba(0, 0, 0, .25);
	animation: cdn-wa-bounce 3s ease-in-out infinite;
	transition: transform .2s, background .2s;
}

/* Onda que se expande alrededor del boton */
.cdn-wa-float::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: 50%;
	background: #25d366;
	animation: cdn-wa-pulse 2s ease-out infinite;
}

.cdn-wa-float svg {
	width: 34px;
	height: 34px;
}

.cdn-wa-float:hover {
	background: #1ebe5b;
	animation-play-state: paused;
	transform: scale(1.08);
}

.cdn-wa-float__tip {
	position: absolute;
	right: calc(100% + 12px);
	padding: 8px 14px;
	border-radius: 8px;
	background: #fff;
	color: #111;
	font-family: var(--cdn-font);
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
	opacity: 0;
	transform: translateX(8px);
	pointer-events: none;
	transition: opacity .2s, transform .2s;
}

.cdn-wa-float:hover .cdn-wa-float__tip,
.cdn-wa-float:focus-visible .cdn-wa-float__tip {
	opacity: 1;
	transform: translateX(0);
}

@keyframes cdn-wa-pulse {
	0%   { transform: scale(1);   opacity: .55; }
	100% { transform: scale(1.6); opacity: 0; }
}

@keyframes cdn-wa-bounce {
	0%, 80%, 100% { transform: translateY(0); }
	86%           { transform: translateY(-8px); }
	92%           { transform: translateY(0); }
	96%           { transform: translateY(-4px); }
}

@media (max-width: 600px) {
	.cdn-wa-float { right: 16px; bottom: 16px; width: 56px; height: 56px; }
	.cdn-wa-float svg { width: 30px; height: 30px; }
	.cdn-wa-float__tip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.cdn-wa-float,
	.cdn-wa-float::before { animation: none; }
}
