:root {
    --dark: #020617;
    --dark-soft: #0f172a;
    --primary: #22d3ee;
    --primary-dark: #0891b2;
    --text: #e5e7eb;
    --header-height: 72px;

    /* Offset base para anchors (secciones “normales”) */
    --anchor-offset: 96px;

    /* Offset especial para CTA (Solicitar demo) */
    --cta-anchor-offset: 240px;
}

/* =========================
   RESET
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Inter, system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #fff;
    color: #020617;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 24px;
}

/* =========================
   HEADER / NAV
   ========================= */
.header {
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    color: white;
    font-weight: 700;
    letter-spacing: 2px;
}

.nav a {
    color: #e5e7eb;
    margin-left: 24px;
    text-decoration: none;
    position: relative;
    font-weight: 500;
}

/* Link activo (scroll spy) */
.nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

/* CTA HEADER */
.nav .btn-primary {
    background: var(--primary-dark);
    color: #f8fafc;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(8,145,178,.35);
    transition: all .25s ease;
}

.nav .btn-primary:hover {
    background: var(--primary);
    color: #020617;
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(34,211,238,.5);
}

/* MOBILE MENU */
.menu-icon {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-icon span {
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 4px 0;
}

#menu-toggle {
    display: none;
}

/* =========================
   HERO HOME (LANDING)
   ========================= */
.hero {
    min-height: 100vh;
    background: url("/assets/img/back_crm.jpg") center/cover no-repeat;
    position: relative;
    color: white;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2,6,23,.78);
}

.hero-fade {
    position: absolute;
    bottom: 0;
    height: 220px;
    width: 100%;
    background: linear-gradient(
        to bottom,
        rgba(2,6,23,0),
        rgba(2,6,23,.6),
        #020617
    );
}

.hero-content {
    position: relative;
    padding-top: 140px;
    padding-bottom: 160px;
    max-width: 720px;
}

.hero-title {
    font-size: clamp(2.8rem, 4.5vw, 3.8rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-highlight {
    display: block;
    color: var(--primary);
    font-size: clamp(1.4rem, 2.4vw, 1.8rem);
    font-weight: 700;
    margin: 14px 0 10px;
}

.hero-title strong {
    display: block;
    margin-top: 12px;
}

.hero-description {
    margin-top: 28px;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #cbd5f5;
    max-width: 620px;
}

.hero-actions {
    margin-top: 42px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

/* BOTONES */
.btn-primary {
    background: var(--primary);
    color: #020617;
    padding: 14px 22px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}

.btn-outline {
    border: 2px solid #94a3b8;
    color: #e5e7eb;
    padding: 14px 22px;
    border-radius: 8px;
    text-decoration: none;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

/* =========================
   SECCIONES GENERALES
   ========================= */
.section {
    padding: 120px 0;
}

/* Anchors: offset base para secciones normales */
#top,
#plataforma,
#funcionalidades,
#arquitectura {
    scroll-margin-top: var(--anchor-offset);
}

/* CTA: offset propio (para que NO se vea arquitectura al llegar) */
#contacto {
    scroll-margin-top: var(--header-height);
}

.section.dark {
    background: var(--dark);
    color: var(--text);
}

/* =========================
   PLATAFORMA / ARQUITECTURA (SLIDER LOOK)
   ========================= */
.platform-section {
    text-align: center;
}

.platform-title {
    font-size: 2.4rem;
    margin-bottom: 12px;
}

.platform-subtitle {
    color: #cbd5f5;
    max-width: 720px;
    margin: 0 auto 48px;
}

.platform-shell {
    max-width: 980px;
    margin: 0 auto;
}

.platform-slider {
    overflow: hidden;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 18px 44px rgba(0,0,0,.35);
}

.platform-track {
    display: flex;
    transition: transform .65s ease;
}

.platform-slide {
    min-width: 100%;
    min-height: 65vh;
    padding: clamp(48px, 6vw, 72px);
    text-align: left;
    display: flex;
    align-items: center;
    position: relative;
    background-size: cover;
    background-position: center;
}

.platform-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(2,6,23,.82);
}

.platform-content {
    position: relative;
    z-index: 2;
    max-width: 840px;
}

.platform-kicker {
    font-size: .85rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(203,213,245,.85);
    margin-bottom: 14px;
}

.platform-slide h3 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    margin-bottom: 14px;
    color: var(--primary);
}

.platform-slide p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #cbd5f5;
}

/* Listas dentro del cuadro (plataforma/arquitectura) */
.platform-content ul {
    margin-top: 18px;
    padding-left: 18px;
}

.platform-content ul li {
    color: #cbd5f5; /* mismo color del subtítulo */
    line-height: 1.7;
    margin-bottom: 10px;
}

/* Títulos (Voz:, WhatsApp:, etc.) deben ser igual al subtítulo */
.platform-content ul li strong {
    color: #cbd5f5;
    font-weight: 700;
}

/* CONTROLES */
.platform-controls {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 26px;
}

.platform-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: var(--primary-dark);
    color: #fff;
    font-size: 1.6rem;
}

/* BACKGROUNDS SLIDES */
.bg-omnicanal { background-image: url("/assets/img/omni.jpg"); }
.bg-dialer { background-image: url("/assets/img/discador.jpg"); }
.bg-supervision { background-image: url("/assets/img/monitoreo.jpg"); }
.bg-reporting { background-image: url("/assets/img/reportes.jpg"); }
.bg-security { background-image: url("/assets/img/seguridad.jpg"); }

/* Arquitectura como “slide” (mismo look plataforma) */
.bg-architecture { background-image: url("/assets/img/cloud.jpg"); }

/* =========================
   FIX PLATAFORMA (posición)
   ========================= */
#plataforma.section {
    padding-top: 0px;      /* sube el contenido */
    padding-bottom: 120px; /* mantiene aire inferior */
}

#plataforma .platform-title {
    margin-top: 0px;
}

/* =========================
   FIX ARQUITECTURA (altura/arranque)
   ========================= */
/* Arquitectura tiene más texto → no centrar verticalmente y sin 65vh */
#arquitectura .platform-slide {
    min-height: auto;
    padding-top: 56px;
    padding-bottom: 64px;
    align-items: flex-start;
}

/* =========================
   CTA (SOLICITAR DEMO)
   ========================= */
.cta-section {
    background: linear-gradient(
        180deg,
        #020617 0%,
        #020617 30%,
        #0f172a 100%
    );

    /* CAMBIO 1: altura real como Hero / Plataforma */
    min-height: calc(100vh - var(--header-height));

    /* CAMBIO 2: padding NORMAL (no gigante) */
    padding: 120px 24px 280px;

    display: flex;
    justify-content: center;

    /* CAMBIO 3: centrado real */
    align-items: center;
}

.cta-card {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 16px;
    padding: 48px;
    max-width: 600px;
    width: 100%;
    margin-top: -120px;
    text-align: center;
}

.cta-card h2 {
    color: #fff;
    font-size: 2rem;
}

.cta-card p {
    color: #cbd5f5;
    margin: 16px 0 32px;
}

.cta-button {
    background: linear-gradient(135deg, #22d3ee, #06b6d4);
    color: #020617;
    padding: 16px 32px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
}

/* =========================
   FOOTER
   ========================= */
.footer {
    background: #020617;
    color: #94a3b8;
    text-align: center;
    padding: 24px;
}

/* =========================
   COMPATIBILIDAD (NO ROMPE NADA)
   Si aún existiera HTML viejo con estas clases, no se rompe el layout.
   (Se eliminó la duplicidad/contradicción; queda una sola intención.)
   ========================= */
.architecture-section {
    background: var(--dark);
}

.architecture-overlay {
    display: none;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 768px) {
    :root {
        --anchor-offset: 84px;
        --cta-anchor-offset: 200px;
    }

    .menu-icon {
        display: flex;
    }

    .nav {
        position: absolute;
        top: var(--header-height);
        right: 0;
        width: 100%;
        background: #020617;
        display: none;
        flex-direction: column;
        text-align: center;
        padding: 24px 0;
    }

    .nav a {
        margin: 12px 0;
        display: block;
    }

    #menu-toggle:checked + .menu-icon + .nav {
        display: flex;
    }

    .hero-content {
        padding-top: 110px;
        padding-bottom: 120px;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .platform-slide {
        min-height: 420px;
        align-items: flex-start;
    }

    #plataforma.section {
        padding-top: 48px;
    }

    .cta-section {
        padding: 180px 18px 140px;
    }

    .cta-card {
        padding: 40px 28px;
    }
}

/* =========================
   FIX FINAL – ANCLA CTA
   ========================= */

/* El ancla existe, pero NO muestra contenido inmediatamente */
#contacto {
    position: relative;
}

/* Empujamos visualmente el contenido del CTA */
#contacto .cta-card {
    margin-top: 10px; /* ← CLAVE */
}