/* ─── VARIABLES DE COLOR ─────────────────────────────────────────────────────
   Los colores primary, secondary y accent se inyectan dinámicamente desde PHP.
   El resto son colores fijos del sistema que nunca cambian.
──────────────────────────────────────────────────────────────────────────────*/
:root {
    /* Colores del sistema — fijos */
    --color-bg-light:      #FFFFFF;
    --color-bg-soft:       #F4F6F8;
    --color-bg-dark:       #0D1B2A;
    --color-bg-darker:     #080F16;
    --color-text-body:     #1E293B;
    --color-text-mid:      #64748B;
    --color-text-light:    #F8FAFC;
    --color-border:        #1E2D3D;
    --color-border-light:  #E2E8F0;

    /* Tipografía */
    --font-heading:        'Fjalla One', sans-serif;
    --font-body:           'DM Sans', sans-serif;

    /* Espaciados */
    --section-padding:     80px 0;
    --container-width:     1240px;

    /* Estilo contractor — bordes rectos */
    --border-radius:       3px;
    --border-radius-lg:    6px;

    /* Header */
    --header-height:       72px;
    --header-bg:           #0D1B2A;
    --header-topbar-bg:    #080F16;
}


/* ─── RESET BÁSICO ───────────────────────────────────────────────────────────*/
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


/* ─── TIPOGRAFÍA BASE ────────────────────────────────────────────────────────*/
body {
    font-family: var(--font-body);
    color: var(--color-text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.15;
    color: var(--color-bg-dark);
}

p {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text-body);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}


/* ─── CONTENEDOR ─────────────────────────────────────────────────────────────*/
.conecta-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}


/* ─── BOTONES ────────────────────────────────────────────────────────────────*/
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary);
    color: var(--color-button-text);
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-family: var(--font-heading);
    font-size: 16px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.btn-primary:hover {
    background: color-mix(in srgb, var(--color-primary) 85%, black);
    color: var(--color-button-text);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--color-primary);
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-family: var(--font-heading);
    font-size: 16px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 2px solid var(--color-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: #ffffff;
}

.btn-outline-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #ffffff;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-family: var(--font-heading);
    font-size: 16px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 2px solid rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-outline-white:hover {
    border-color: #ffffff;
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}


/* ─── BADGE DE SECCIÓN ───────────────────────────────────────────────────────*/
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    padding: 5px 14px;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
}


/* ─── SECCIONES ──────────────────────────────────────────────────────────────*/
.section-light {
    background: var(--color-bg-light);
    padding: var(--section-padding);
}

.section-soft {
    background: var(--color-bg-soft);
    padding: var(--section-padding);
}

.section-dark {
    background: var(--color-bg-dark);
    padding: var(--section-padding);
}

.section-darker {
    background: var(--color-bg-darker);
    padding: var(--section-padding);
}


/* ─── TÍTULOS DE SECCIÓN ─────────────────────────────────────────────────────*/
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.1;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.section-title span {
    color: var(--color-primary);
}

.section-title.light {
    color: var(--color-text-light);
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--color-text-mid);
    max-width: 580px;
    line-height: 1.7;
}

.section-subtitle.centered {
    margin: 0 auto 48px;
    text-align: center;
}

.section-subtitle.light {
    color: rgba(248, 250, 252, 0.7);
}


/* ─── CARDS ──────────────────────────────────────────────────────────────────*/
.card {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.card.dark {
    background: var(--color-border);
    border-color: #1E2D3D;
}


/* ─── ACENTO DECORATIVO ──────────────────────────────────────────────────────*/
.accent-line {
    display: block;
    width: 48px;
    height: 3px;
    background: var(--color-primary);
    margin: 16px 0;
}

.accent-line.centered {
    margin: 16px auto;
}


/* ─── UTILIDADES ─────────────────────────────────────────────────────────────*/
.text-primary   { color: var(--color-primary); }
.text-light     { color: var(--color-text-light); }
.text-mid       { color: var(--color-text-mid); }
.text-upper     { text-transform: uppercase; letter-spacing: 0.06em; }
.text-center    { text-align: center; }
.fw-600         { font-weight: 600; }

.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mt-32  { margin-top: 32px; }
.mt-48  { margin-top: 48px; }
.mb-8   { margin-bottom: 8px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.mb-32  { margin-bottom: 32px; }
.mb-48  { margin-bottom: 48px; }


/* ─── RESPONSIVE ─────────────────────────────────────────────────────────────*/
@media ( max-width: 768px ) {
    :root {
        --section-padding: 56px 0;
        --header-height:   64px;
    }

    .conecta-container {
        padding: 0 16px;
    }

    .section-subtitle.centered {
        margin-bottom: 32px;
    }
}

@media ( max-width: 480px ) {
    :root {
        --section-padding: 48px 0;
    }

    .btn-primary,
    .btn-secondary,
    .btn-outline-white {
        width: 100%;
        justify-content: center;
    }
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

/* ─── SCROLL TO TOP ──────────────────────────────────────────────────────────*/
#ch-scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    color: var(--color-button-text, #ffffff);
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background 0.2s;
    z-index: 9999;
}

#ch-scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#ch-scroll-top:hover {
    background: var(--color-bg-dark);
}

@media ( max-width: 480px ) {
    #ch-scroll-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}