:root {
    /* ── Color Palette - Premium Dark Tech Theme (DEFAULT) ── */
    --primary: #00e5ff;
    --primary-dark: #00b8cc;
    --secondary: #7000ff;
    --bg-dark: #05060d;
    --bg-card: rgba(14, 14, 22, 0.80);
    --bg-glass: rgba(14, 14, 22, 0.65);
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: #333333;
    --gradient-main: linear-gradient(135deg, var(--secondary), var(--primary));

    /* ── Header scroll backgrounds ── */
    --header-bg: rgba(10, 10, 10, 0.75);
    --header-bg-scrolled: rgba(10, 10, 10, 0.95);
    --header-shadow-scrolled: 0 2px 10px rgba(0, 0, 0, 0.3);

    /* ── Mobile menu background ── */
    --nav-mobile-bg: rgba(8, 8, 12, 0.97);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Transitions */
    --transition: all 0.3s ease;

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* ══════════════════════════════════════════════════════════
   FROST TECH — Light Theme
   Applied when <html data-theme="light">
   ══════════════════════════════════════════════════════════ */
[data-theme="light"] {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --secondary: #8b5cf6;
    --bg-dark: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.70);
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-color: #bae6fd;
    --gradient-main: linear-gradient(135deg, var(--secondary), var(--primary));

    /* Header scroll backgrounds — light version */
    --header-bg: rgba(255, 255, 255, 0.92);
    --header-bg-scrolled: rgba(255, 255, 255, 0.99);
    --header-shadow-scrolled: 0 2px 12px rgba(14, 165, 233, 0.12);

    /* Mobile menu background — light version */
    --nav-mobile-bg: rgba(255, 255, 255, 0.99);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* ── Global particle canvas ── */
#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* Light mode: reduce canvas opacity so particles are subtle but visible */
[data-theme="light"] #bgCanvas {
    opacity: 0.42;
    pointer-events: none;
}

/* Mobile: canvas muy reducido para evitar saturación de azul en pantallas con alta viveza */
@media (max-width: 768px) {
    [data-theme="light"] #bgCanvas {
        opacity: 0.35;
    }

    /* Eliminar los gradientes azules del fondo en mobile — fondo blanco puro */
    [data-theme="light"] body::before {
        background: #ffffff;
        animation: none;
    }
}

/* Light mode animated gradient background */
[data-theme="light"] body {
    background-color: transparent;
    /* El fondo lo provee body::before — así el canvas z-index:-1
       queda visible a través de elementos translúcidos */
}

[data-theme="light"] body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    /* Un nivel más abajo que el canvas (-1) */
    background:
        radial-gradient(ellipse 80% 60% at 20% 20%, rgba(14, 165, 233, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(14, 165, 233, 0.02) 0%, transparent 70%),
        #ffffff;
    animation: lightBgShift 12s ease-in-out infinite alternate;
}

@keyframes lightBgShift {
    0% {
        background-position: 20% 20%, 80% 80%, 50% 50%;
    }

    50% {
        background-position: 30% 10%, 70% 90%, 60% 40%;
    }

    100% {
        background-position: 15% 30%, 85% 70%, 45% 55%;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

h1 {
    font-size: 3.5rem;
    background: var(--gradient-main);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    animation: h1-glitch 3s infinite;
}

@keyframes h1-glitch {

    0%,
    90% {
        transform: translate(0);
        filter: none;
    }

    91% {
        transform: translate(-3px, 1px);
        filter: drop-shadow(3px 0 0 rgba(0, 229, 255, 0.8)) drop-shadow(-3px 0 0 rgba(112, 0, 255, 0.8));
    }

    92% {
        transform: translate(2px, -2px) skewX(2deg);
        filter: drop-shadow(-3px 2px 0 rgba(0, 229, 255, 0.8)) drop-shadow(3px -2px 0 rgba(112, 0, 255, 0.8));
    }

    93% {
        transform: translate(0);
        filter: none;
    }

    94% {
        transform: translate(3px, 2px);
        filter: drop-shadow(-2px 0 0 rgba(0, 229, 255, 0.8)) drop-shadow(2px 0 0 rgba(112, 0, 255, 0.8));
    }

    95% {
        transform: translate(0);
        filter: none;
    }
}

h2 {
    font-size: 2.5rem;
    color: var(--primary);
}

h3 {
    font-size: 1.75rem;
    color: var(--primary);
}

h4,
h5,
h6 {
    color: var(--primary);
}

strong,
b {
    color: var(--primary);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ── Interactive Contact Links ── */
a[href^="tel:"],
a[href^="mailto:"] {
    position: relative;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a[href^="tel:"]:hover,
a[href^="mailto:"]:hover {
    color: var(--primary);
    text-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
    transform: translateY(-1px);
}

a[href^="tel:"]:active,
a[href^="mailto:"]:active {
    transform: scale(0.96) translateY(0);
    opacity: 0.8;
}

/* Subrayado animado para indicar acción */
a[href^="tel:"]::after,
a[href^="mailto:"]::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px var(--primary);
}

a[href^="tel:"]:hover::after,
a[href^="mailto:"]:hover::after {
    width: 100%;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    border-radius: 8px;
}

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    line-height: 1.2;
}

.btn i {
    font-size: 1rem;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

.section {
    padding: var(--spacing-xl) 0;
}

.text-center {
    text-align: center;
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

/* ── Responsive Grid System ── */
.grid-2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* ── HEADER ── */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 0 0 rgba(0, 229, 255, 0.12), 0 4px 24px rgba(0, 0, 0, 0.4);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    background: var(--header-bg-scrolled);
    box-shadow: var(--header-shadow-scrolled);
}

[data-theme="light"] header {
    border-bottom-color: rgba(14, 165, 233, 0.18);
    box-shadow: 0 1px 0 0 rgba(14, 165, 233, 0.15), 0 4px 24px rgba(14, 165, 233, 0.08);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    padding: 0 2rem;
    max-width: 1260px;
    margin: 0 auto;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
    text-decoration: none;
}

.logo img {
    height: 38px;
    width: auto;
    display: block;
    border-radius: 0;
    /* anular el border-radius global de img */
    filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.25));
    content: url('Recursos/tlachia_clean.png');
    /* default: white logo */
}

[data-theme="light"] .logo img {
    content: url('Recursos/logo_tlachia.png');
    /* full color logo for light theme */
    filter: none;
    height: 38px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
}

.nav-links a.nav-item {
    position: relative;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.02em;
    border-radius: 6px;
    transition: color 0.25s, background 0.25s;
}

[data-theme="light"] .nav-links a.nav-item {
    color: var(--text-muted);
}

.nav-links a.nav-item::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-links a.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .nav-links a.nav-item:hover {
    color: var(--primary);
    background: rgba(14, 165, 233, 0.08);
}

.nav-links a.nav-item:hover::after,
.nav-links a.nav-item.active::after {
    width: calc(100% - 1.8rem);
}

.nav-links a.nav-item.active {
    color: var(--primary);
}

.nav-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.35rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.25);
    transition: box-shadow 0.3s, transform 0.25s;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.nav-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.nav-cta:hover::before {
    left: 160%;
}

.nav-cta:hover {
    box-shadow: 0 0 28px rgba(0, 229, 255, 0.45);
    transform: translateY(-1px);
}

.nav-mobile-only {
    display: none;
}

/* ── THEME TOGGLE BUTTON ── */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 40px;
    padding: 0 0.9rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    transition: all 0.25s ease;
    flex-shrink: 0;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 229, 255, 0.08);
}

[data-theme="light"] .theme-toggle {
    border-color: rgba(14, 165, 233, 0.30);
    background: rgba(14, 165, 233, 0.08);
    color: var(--primary);
}

[data-theme="light"] .theme-toggle:hover {
    border-color: var(--primary);
    background: rgba(14, 165, 233, 0.18);
    color: var(--primary-dark);
}

.theme-icon {
    font-size: 0.85rem;
}

/* ── LANG TOGGLE BUTTON ── */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.25s ease;
    flex-shrink: 0;
    text-decoration: none;
}

.lang-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 229, 255, 0.08);
}

[data-theme="light"] .lang-toggle {
    border-color: rgba(14, 165, 233, 0.30);
    background: rgba(14, 165, 233, 0.08);
    color: var(--primary);
}

[data-theme="light"] .lang-toggle:hover {
    border-color: var(--primary);
    background: rgba(14, 165, 233, 0.18);
    color: var(--primary-dark);
}

@media (max-width: 768px) {
    .theme-label {
        display: none;
    }

    /* En mobile todos los controles: cuadrado redondeado 40×40px */
    .theme-toggle {
        width: 40px;
        padding: 0;
        border-radius: 10px;
    }
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.mobile-toggle:hover {
    background: rgba(0, 229, 255, 0.08);
    border-color: rgba(0, 229, 255, 0.3);
}

[data-theme="light"] .mobile-toggle {
    border-color: rgba(14, 165, 233, 0.25);
    background: rgba(14, 165, 233, 0.06);
}

[data-theme="light"] .mobile-toggle:hover {
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(14, 165, 233, 0.4);
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.35s ease, opacity 0.2s ease, width 0.25s ease;
    transform-origin: center;
}

[data-theme="light"] .hamburger-line {
    background: var(--primary);
}

.mobile-toggle.open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.open .hamburger-line:nth-child(2) {
    opacity: 0;
    width: 0;
}

.mobile-toggle.open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── SUBPAGE LAYOUT ── */
main {
    padding-top: 68px;
    /* Compensación por header fijo */
}

/* Normalización de títulos en subpáginas */
main section:first-of-type h1,
main .srv-hero h1,
main .cap-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

/* ── HERO ── */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: transparent;
}

#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 70% at 50% 50%, rgba(5, 6, 13, 0.25) 0%, rgba(5, 6, 13, 0.60) 100%);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.4s ease;
}

[data-theme="light"] .hero::before {
    background: radial-gradient(ellipse 80% 70% at 50% 50%, rgba(14, 165, 233, 0.06) 0%, rgba(240, 249, 255, 0.30) 100%);
}

[data-theme="light"] #heroCanvas {
    opacity: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── CTA BANNER ── */
.cta-banner {
    margin-top: 5rem;
    background: linear-gradient(135deg, #0d1117, #1a0533);
    border: 1px solid rgba(167, 139, 250, .3);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
}

.cta-banner h2 {
    font-size: 1.8rem;
    margin-bottom: .8rem;
}

.cta-banner p {
    color: #aaa;
    margin-bottom: 1.8rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.cta-banner-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── VALUE BLOCKS ── */
.value-blocks {
    background: rgba(14, 14, 20, 0.82);
    backdrop-filter: blur(6px);
    margin-top: -50px;
    position: relative;
    z-index: 10;
    border-radius: 12px;
    padding: var(--spacing-md);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.value-item {
    text-align: center;
    padding: var(--spacing-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: var(--transition);
}

.value-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--primary);
}

.value-item i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* ── SERVICES GRID ── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.service-card {
    background: rgba(14, 14, 22, 0.78);
    backdrop-filter: blur(8px);
    padding: var(--spacing-md);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.2) 0%, rgba(112, 0, 255, 0.05) 40%, transparent 60%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    opacity: 0;
    transition: width 0.6s ease, height 0.6s ease, opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.service-card>* {
    position: relative;
    z-index: 1;
}

.service-card:hover,
.service-card.hover-active {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 229, 255, 0.2) inset;
    border-color: rgba(0, 229, 255, 0.4);
}

.service-card:hover::before,
.service-card.hover-active::before {
    width: 300%;
    height: 300%;
    opacity: 1;
}

.service-card h3 {
    margin-top: 1rem;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--secondary);
}

.service-link {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.service-link:hover {
    gap: 0.8rem;
}

/* ── SERVICE HIGHLIGHT (Rich Cards) ── */
.service-highlight {
    background: linear-gradient(135deg, var(--bg-card), #13131f);
    border: 1px solid var(--secondary);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}

.service-highlight:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 180, 200, 0.15);
}

.service-highlight.accent-gold {
    border-color: #f59e0b;
}

.service-highlight.accent-green {
    border-color: #22c55e;
}

.service-highlight.accent-red {
    border-color: #ef4444;
}

.service-highlight.accent-orange {
    border-color: #f97316;
}

.service-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* ── CHECK LIST ── */
.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.5;
}

.check-list li i {
    color: #22c55e;
    margin-top: 5px;
    flex-shrink: 0;
}

.check-list li span {
    flex: 1;
}

/* ── FOOTER ── */
footer {
    background: #050505;
    padding-top: var(--spacing-xl);
    border-top: 1px solid #222;
}

[data-theme="light"] footer {
    background: #f0f9ff;
    border-top: 1px solid rgba(14, 165, 233, 0.20);
    box-shadow: 0 -4px 24px rgba(14, 165, 233, 0.06);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-col h4 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

[data-theme="light"] .footer-col h4 {
    color: #0284c7;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid #222;
    padding: 2rem 0;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

[data-theme="light"] .footer-bottom {
    border-top: 1px solid rgba(14, 165, 233, 0.18);
    color: #475569;
}

[data-theme="light"] .footer-col ul li a {
    color: #334155;
}

[data-theme="light"] .footer-col ul li a:hover {
    color: var(--primary);
}

/* Footer: override inline color styles for light theme */
[data-theme="light"] footer p {
    color: #475569 !important;
}

[data-theme="light"] footer p a {
    color: #0284c7 !important;
}

[data-theme="light"] footer p a:hover {
    color: #0ea5e9 !important;
}

/* Footer logo: remove cyan glow in light mode, but add a soft blue glow on hover */
[data-theme="light"] footer img {
    filter: drop-shadow(0 2px 8px rgba(14, 165, 233, 0.15)) !important;
    opacity: 1 !important;
}

[data-theme="light"] footer img:hover {
    filter: drop-shadow(0 2px 14px rgba(14, 165, 233, 0.40)) !important;
    transform: scale(1.02);
}

/* ── ANIMATIONS ── */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.random-reveal .random-char {
    opacity: 0;
    filter: blur(8px);
    transform: scale(1.2);
    display: inline-block;
    transition: opacity 0.5s ease-out, filter 0.5s ease-out, transform 0.5s ease-out;
}

.random-reveal.visible .random-char {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

/* ── MEDIA QUERIES ── */

@media (max-width: 900px) {
    .grid-2-cols {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    /* Normalización de títulos en subpáginas (Mobile) */
    main section:first-of-type h1,
    main .srv-hero h1,
    main .cap-hero h1 {
        font-size: 2.2rem;
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }

    .nav-links {
        position: fixed;
        top: 68px;
        left: 0;
        width: 100%;
        background: var(--nav-mobile-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem 1.25rem 1rem;
        gap: 0;
        display: flex;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-6px);
        pointer-events: none;
        transition: visibility 0s linear 0.25s, opacity 0.25s ease, transform 0.25s ease;
        z-index: 998;
    }

    .nav-links.active {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
        transition-delay: 0s;
    }

    .nav-links a.nav-item {
        display: block;
        padding: 0.9rem 0.5rem;
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.7);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 0;
    }

    [data-theme="light"] .nav-links a.nav-item {
        color: var(--text-muted);
        border-bottom-color: rgba(14, 165, 233, 0.12);
    }

    .nav-links a.nav-item::after {
        display: none;
    }

    .nav-links a.nav-item:hover,
    .nav-links a.nav-item.active {
        color: var(--primary);
        background: transparent;
    }

    .nav-cta-desktop {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-mobile-only {
        display: block;
        color: var(--primary) !important;
        font-weight: 600 !important;
        margin-top: 0.25rem;
    }

    nav {
        padding: 0 1.25rem;
        gap: 0.75rem;
    }

    .theme-toggle {
        margin-left: auto;
    }

    .hero-btns,
    .cta-banner-btns,
    .service-cta,
    .course-cta {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    .value-blocks {
        margin-top: var(--spacing-md);
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    h2 {
        font-size: 1.8rem;
        word-wrap: break-word;
    }

    h3 {
        font-size: 1.4rem;
    }

    .service-highlight {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .course-highlight {
        padding: 1.5rem;
    }

    .check-list li {
        font-size: 0.9rem;
        gap: 0.6rem;
    }

    .service-card {
        padding: 1.5rem 1.25rem;
    }

    .section {
        padding: 4rem 0;
    }

    .container {
        padding: 0 1.25rem;
    }

    /* Footer Mobile Adjustments */
    .footer-col h4 {
        margin-bottom: 1rem;
    }

    .footer-col ul li {
        margin-bottom: 0.4rem;
    }

    footer p {
        line-height: 1.4;
    }

    .footer-grid {
        gap: 2rem;
    }
}

/* ── OPTION B TRANSITION ── */
body.page-exiting main,
body.page-exiting footer {
    opacity: 0 !important;
    filter: blur(8px);
    transform: translateY(10px);
    transition: opacity 0.4s ease-in, filter 0.4s ease-in, transform 0.4s ease-in;
}

body.page-entering main,
body.page-entering footer {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(-10px);
}

body.page-entered main,
body.page-entered footer {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
    transition: opacity 0.6s ease-out, filter 0.6s ease-out, transform 0.6s ease-out;
}