/* Layout global KerfGen: Navbar fija con despliegue elástico del logo al scroll + Footer Obsidian CAD (<= 150 líneas) */
.kg-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; width: 100%; }

.kg-navbar { position: fixed; top: 0; left: 0; right: 0; height: var(--kg-nav-h); background: #FFFFFF; border-bottom: 1px solid var(--kg-border); z-index: 9990; display: flex; align-items: center; transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease; }
.kg-navbar.is-scrolled { background: rgba(255,255,255,0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: rgba(226,232,240,0.84); box-shadow: 0 4px 28px rgba(15,23,42,0.06); }
.kg-nav-inner { max-width: 1240px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.kg-nav-left { display: flex; align-items: center; gap: 0; flex-shrink: 0; }

/* Despliegue elástico del logo al hacer scroll en portada; siempre visible en guías internas */
.kg-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--kg-ink) !important; font-size: 17px; font-weight: 600; letter-spacing: -0.025em; white-space: nowrap; flex-shrink: 0; margin-left: 0; max-width: 164px; opacity: 1; transition: opacity 0.32s ease, max-width 0.38s cubic-bezier(0.22, 1, 0.36, 1), transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), margin-left 0.34s ease, visibility 0.32s ease; }
body.kg-has-hero-brand .kg-navbar:not(.is-scrolled):not(.kg-nav-open) .kg-brand { opacity: 0; max-width: 0; transform: translateX(-8px) scale(0.92); overflow: hidden; pointer-events: none; visibility: hidden; }
body.kg-has-hero-brand .kg-navbar.is-scrolled .kg-brand,
body.kg-has-hero-brand .kg-navbar.kg-nav-open .kg-brand { opacity: 1; max-width: 164px; padding-right: 4px; transform: translateX(0) scale(1); pointer-events: auto; visibility: visible; }
.kg-brand-svg { width: 28px; height: 28px; flex-shrink: 0; display: block; border-radius: 50%; }
.kg-navbar.is-scrolled .kg-brand-svg { animation: kgBrandLock 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both; }
@keyframes kgBrandLock {
	0% { transform: scale(0.84) rotate(-8deg); box-shadow: 0 0 0 0 rgba(234,88,12,0.45); }
	55% { transform: scale(1.07) rotate(2deg); box-shadow: 0 0 0 6px rgba(234,88,12,0); }
	100% { transform: scale(1) rotate(0deg); box-shadow: 0 0 0 0 rgba(234,88,12,0); }
}
.kg-brand-text strong { color: var(--kg-ink); font-weight: 800; }

.kg-scroll-prog { position: absolute; left: 0; bottom: -1px; height: 2.5px; width: 0; background: linear-gradient(90deg, var(--kg-accent), var(--kg-accent-bright)); transition: width 0.08s linear; pointer-events: none; }

.kg-nav-links { display: flex; align-items: center; justify-content: center; flex: 1 1 auto; min-width: 0; gap: 4px; }
.kg-nav-link { display: inline-flex; align-items: center; gap: 6px; color: var(--kg-muted) !important; text-decoration: none; font-size: 13.5px; font-weight: 500; padding: 7px 12px; border-radius: 9999px; transition: background 0.15s, color 0.15s; white-space: nowrap; flex-shrink: 0; }
.kg-nav-link:hover { background: var(--kg-bg-soft); color: var(--kg-ink) !important; }
.kg-nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.kg-lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 8px; border-radius: 9999px; background: #F1F5F9; border: 1px solid #CBD5E1; flex-shrink: 0; }
.kg-lang-ico { display: inline-flex; align-items: center; color: #64748B; margin-right: 2px; }
.kg-lang-switch a, .kg-lang-switch .is-active { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; padding: 4px 7px; border-radius: 9999px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-decoration: none; line-height: 1.1; }
.kg-lang-switch a { color: #475569 !important; transition: color 0.15s, background 0.15s; }
.kg-lang-switch a:hover { color: #0F172A !important; background: #E2E8F0; }
.kg-lang-switch .is-active { background: var(--kg-obsidian); color: #FFFFFF !important; }

.kg-btn-nav { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: var(--kg-obsidian); color: #FFFFFF !important; padding: 8px 15px; border-radius: 9999px; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; flex-shrink: 0; transition: background 0.15s, transform 0.15s; }
.kg-btn-nav:hover { background: #1E293B; }
.kg-nav-cta-short { display: none; }

.kg-nav-toggle { display: none; position: relative; z-index: 2; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--kg-border); background: #FFFFFF; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0; flex-shrink: 0; }
.kg-hb { width: 17px; height: 1.75px; background: var(--kg-ink); border-radius: 2px; transition: transform 0.25s ease, opacity 0.2s ease; }
.kg-nav-toggle.is-active .kg-hb:nth-child(1) { transform: translateY(6.75px) rotate(45deg); }
.kg-nav-toggle.is-active .kg-hb:nth-child(2) { opacity: 0; }
.kg-nav-toggle.is-active .kg-hb:nth-child(3) { transform: translateY(-6.75px) rotate(-45deg); }

.kg-top-btn { position: fixed; right: 20px; bottom: 20px; z-index: 9900; width: 42px; height: 42px; border-radius: 9999px; border: 1px solid rgba(255,255,255,0.16); background: var(--kg-obsidian); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transform: translateY(10px); pointer-events: none; box-shadow: 0 10px 24px rgba(11,17,32,0.28); transition: opacity 0.22s ease, transform 0.22s ease, background 0.15s; }
.kg-top-btn.is-on { opacity: 1; transform: none; pointer-events: auto; }
.kg-top-btn:hover { background: var(--kg-accent); }

/* Footer Obsidian Blueprint (4 columnas limpias + línea láser superior) */
.kg-footer { background-color: var(--kg-obsidian); background-image: linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px); background-size: 40px 40px; color: #94A3B8; padding: 48px 0 26px; border-top: 2px solid var(--kg-accent); }
.kg-footer-grid { display: grid; grid-template-columns: 1.45fr 1fr 1fr 0.85fr; gap: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--kg-obsidian-line); }
.kg-footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.kg-footer-brand img { border-radius: 50%; flex-shrink: 0; }
.kg-footer-brand .kg-footer-title { margin: 0; font-size: 16px; }
.kg-footer-title { color: #F8FAFC; font-size: 13.5px; font-weight: 700; margin: 0 0 12px; letter-spacing: -0.01em; }
.kg-footer-desc { color: #94A3B8; font-size: 13px; margin: 0 0 12px; line-height: 1.6; max-width: 340px; }
.kg-footer-mail { margin: 0 0 7px; font-size: 13px; }
.kg-footer-mail a { display: inline-flex; align-items: center; gap: 6px; color: #FDBA74 !important; text-decoration: none; font-weight: 600; }
.kg-footer-mail a:hover { color: #FFFFFF !important; }
.kg-footer-social { margin: 0; font-size: 12.5px; color: #64748B; }
.kg-footer-social a { color: #CBD5E1 !important; text-decoration: none; font-weight: 500; }
.kg-footer-social a:hover { color: var(--kg-accent-bright) !important; }
.kg-footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kg-footer-list a { color: #CBD5E1 !important; text-decoration: none; font-size: 13px; transition: color 0.15s; }
.kg-footer-list a:hover { color: var(--kg-accent-bright) !important; }
.kg-footer-tag { display: inline-block; font-size: 11.5px; color: #CBD5E1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); padding: 3px 9px; border-radius: 6px; }
.kg-footer-lang { display: inline-flex; align-items: center; gap: 6px; color: #FDBA74 !important; font-weight: 600; margin-top: 4px; }
.kg-footer-legal { padding-top: 18px; font-size: 12px; color: #64748B; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.kg-footer-legal p { margin: 0; line-height: 1.55; }
.kg-footer-legal-links { display: inline-flex; align-items: center; gap: 14px; }
.kg-footer-legal-links a { color: #94A3B8 !important; text-decoration: none; font-size: 12px; }
.kg-footer-legal-links a:hover { color: #FFFFFF !important; }

@media (max-width: 1024px) {
	.kg-nav-toggle { display: inline-flex; }
	.kg-navbar.is-scrolled .kg-brand, .kg-navbar.kg-nav-open .kg-brand { margin-left: 10px; }
	.kg-nav-links { position: fixed; top: var(--kg-nav-h); left: 0; right: 0; background: #FFFFFF; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 14px 20px 20px; border-bottom: 1px solid var(--kg-border); box-shadow: 0 18px 36px rgba(15,23,42,0.1); display: none; gap: 4px; }
	.kg-nav-link { border-radius: 10px; padding: 10px 12px; font-size: 14px; }
	.kg-navbar.kg-nav-open .kg-nav-links { display: flex; }
	.kg-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
}
@media (max-width: 768px) {
	body.kg-has-hero-brand .kg-navbar .kg-brand { opacity: 1; max-width: 146px; transform: none; pointer-events: auto; visibility: visible; margin-left: 10px; }
	.kg-brand-svg { width: 24px; height: 24px; }
	.kg-brand-text { font-size: 15px; }
	.kg-lang-ico { display: none; }
	.kg-lang-switch { padding: 3px; }
}
@media (max-width: 600px) {
	.kg-footer-grid { grid-template-columns: 1fr; gap: 22px; }
	.kg-footer-legal { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 520px) {
	.kg-wrap { padding: 0 16px; }
	.kg-navbar.is-scrolled .kg-brand, .kg-navbar.kg-nav-open .kg-brand { max-width: 132px; }
	.kg-nav-cta-full { display: none; }
	.kg-nav-cta-short { display: inline; }
	.kg-btn-nav { padding: 8px 12px; font-size: 12.5px; }
}
