/* Klusto · estilos críticos
   - Modal popup (no depende de Tailwind compile)
   - Header sticky + nav + menú hamburguesa móvil
   - Reset z-index y posicionamiento
*/

/* ═══════════════════════════════════════ LEAD MODAL POPUP ═══════════════════ */

#lead-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

#lead-modal.is-open {
	display: flex;
}

@media (max-height: 720px) {
	#lead-modal {
		overflow-y: auto;
		padding-top: 2rem;
		padding-bottom: 2rem;
		align-items: flex-start;
	}
}

#lead-modal .lead-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(2, 6, 23, 0.85);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

#lead-modal .lead-modal-card {
	position: relative;
	width: 100%;
	max-width: 32rem;
	border-radius: 1.5rem;
	background: #fff;
	color: #0f172a;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
	overflow: hidden;
}

/* Botón cerrar (X) — siempre arriba derecha y visible */
#lead-modal .lead-modal-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.18);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, transform 0.2s ease;
	z-index: 2;
	padding: 0;
}
#lead-modal .lead-modal-close:hover {
	background: rgba(255, 255, 255, 0.32);
	transform: scale(1.05);
}
#lead-modal .lead-modal-close svg {
	width: 1.125rem;
	height: 1.125rem;
}

body.modal-open {
	overflow: hidden;
}

/* ═══════════════════════════════════════ SITE HEADER STICKY ═════════════════ */

.klusto-site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	-webkit-backdrop-filter: saturate(140%) blur(12px);
	backdrop-filter: saturate(140%) blur(12px);
	background-color: rgba(7, 17, 31, 0.85); /* klusto-deep/85 */
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.klusto-site-header.is-scrolled {
	background-color: rgba(7, 17, 31, 0.96);
	box-shadow: 0 4px 24px -8px rgba(0, 0, 0, 0.4);
}

.klusto-header-inner {
	max-width: 80rem; /* max-w-7xl */
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.5rem;
}
@media (min-width: 1024px) {
	.klusto-header-inner { padding-left: 3rem; padding-right: 3rem; }
}

.klusto-header-logo {
	display: flex;
	align-items: center;
	transition: transform 0.2s ease;
	flex-shrink: 0;
}
.klusto-header-logo:hover { transform: scale(1.02); }
.klusto-header-logo img { height: 2.25rem; width: auto; }
@media (min-width: 768px) {
	.klusto-header-logo img { height: 2.5rem; }
}

/* Nav desktop — solo md+ */
.klusto-header-nav {
	display: none;
	align-items: center;
	gap: 2.25rem; /* generoso, evita que las palabras se peguen */
	font-size: 0.95rem;
	font-weight: 500;
	color: #cbd5e1; /* slate-300 */
}
.klusto-header-nav a {
	color: #cbd5e1;
	transition: color 0.2s ease;
	text-decoration: none;
	white-space: nowrap;
}
.klusto-header-nav a:hover { color: #fff; }
@media (min-width: 768px) {
	.klusto-header-nav { display: flex; }
}

/* Acciones derecha */
.klusto-header-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
}

/* v0.8.8 — Language switcher (ES / EN) */
.klusto-lang-switcher {
	display: none;
	align-items: center;
	gap: 0.35rem;
	padding: 0.4rem 0.75rem;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	margin-right: 0.25rem;
}
@media (min-width: 768px) {
	.klusto-lang-switcher { display: inline-flex; }
}
.klusto-lang-switcher .klusto-lang-link {
	color: rgba(255, 255, 255, 0.5);
	text-decoration: none;
	padding: 0.1rem 0.25rem;
	transition: color 0.15s ease;
	letter-spacing: 0.06em;
}
.klusto-lang-switcher .klusto-lang-link:hover { color: #fff; }
.klusto-lang-switcher .klusto-lang-link.is-current {
	color: #fff;
	cursor: default;
}
.klusto-lang-switcher .klusto-lang-sep {
	color: rgba(255, 255, 255, 0.2);
	font-weight: 400;
}

/* Mobile lang switcher (dentro del menú móvil) */
.klusto-mobile-lang-switcher {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
	font-size: 0.875rem;
	font-weight: 600;
}
.klusto-mobile-lang-switcher .klusto-lang-link {
	color: rgba(255, 255, 255, 0.55);
	text-decoration: none;
	padding: 0.25rem 0.5rem;
}
.klusto-mobile-lang-switcher .klusto-lang-link.is-current {
	color: #fff;
}
.klusto-mobile-lang-switcher .klusto-lang-sep {
	color: rgba(255, 255, 255, 0.2);
}
@media (min-width: 768px) {
	.klusto-mobile-lang-switcher { display: none; }
}

/* CTA "Probar 14 días" */
.klusto-header-cta {
	border-radius: 9999px;
	background: #fff;
	color: #07111f;
	padding: 0.625rem 1.125rem;
	font-size: 0.875rem;
	font-weight: 600;
	white-space: nowrap;
	transition: background-color 0.2s ease;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
}
.klusto-header-cta:hover { background: #f1f5f9; }
@media (min-width: 640px) {
	.klusto-header-cta { padding: 0.625rem 1.25rem; }
}

/* Texto responsive del CTA: "Probar" en móvil, "Probar 14 días" en desktop */
.klusto-cta-mobile  { display: inline; }
.klusto-cta-desktop { display: none; }
@media (min-width: 640px) {
	.klusto-cta-mobile  { display: none; }
	.klusto-cta-desktop { display: inline; }
}

/* Burger button (solo móvil) */
.klusto-header-burger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 0.75rem;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #fff;
	cursor: pointer;
	padding: 0;
	transition: background-color 0.2s ease;
}
.klusto-header-burger:hover { background: rgba(255, 255, 255, 0.12); }
.klusto-header-burger svg { width: 1.25rem; height: 1.25rem; }
.klusto-header-burger .burger-icon-close { display: none; }
.klusto-header-burger.is-open .burger-icon-open { display: none; }
.klusto-header-burger.is-open .burger-icon-close { display: block; }
@media (min-width: 768px) {
	.klusto-header-burger { display: none; }
}

/* Mobile menu (slide-down) */
.klusto-mobile-menu {
	display: none;
	flex-direction: column;
	background-color: rgba(7, 17, 31, 0.98);
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	padding: 0.5rem 1.5rem 1rem;
}
.klusto-mobile-menu.is-open { display: flex; }
.klusto-mobile-menu-link {
	color: #cbd5e1;
	padding: 0.875rem 0;
	font-size: 1rem;
	font-weight: 500;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	text-decoration: none;
	transition: color 0.2s ease;
}
.klusto-mobile-menu-link:last-child { border-bottom: none; }
.klusto-mobile-menu-link:hover { color: #fff; }
@media (min-width: 768px) {
	.klusto-mobile-menu { display: none !important; }
}
