/* Global tokens and base styles */
:root {
    --color-primario: #ce1212;
    --color-primario-2: #f59e0b;
    --color-secundario: #0f172a;
    --color-fondo: #f8fafc;
    --color-surface: #ffffff;
    --color-texto: #1f2937;
    --color-texto-suave: #64748b;
    --color-borde: rgba(15, 23, 42, 0.1);
    --color-sombra: 0 12px 30px rgba(15, 23, 42, 0.08);
    --color-sombra-hover: 0 18px 36px rgba(15, 23, 42, 0.14);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --container-max: 1240px;
    --transition-base: 0.25s ease;
}

/* =========================================
   RESETEO BASE
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body { height: 100%; margin: 0; padding: 0; width: 100%; overflow-x: clip; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", "Segoe UI", Arial, sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.5;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(14px, 3vw, 24px);
}

/* Tipografía global */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    line-height: 1.2;
    color: #0f172a;
}

p {
    margin-top: 0;
    line-height: 1.65;
}

.titulo-seccion {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.subtitulo-seccion {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-texto-suave);
    max-width: 780px;
}

/* Secciones */
.section-space {
    padding: clamp(52px, 8vw, 88px) 0;
}

.section-space-sm {
    padding: clamp(28px, 5vw, 56px) 0;
}

/* Tarjetas globales */
.card-surface {
    background: var(--color-surface);
    border: 1px solid var(--color-borde);
    border-radius: var(--radius-md);
    box-shadow: var(--color-sombra);
}

/* Botón principal */
.btn-principal,
.btn-primary {
    background: var(--color-primario);
    color: #fff;
    padding: 12px 24px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition-base);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-principal:hover,
.btn-primary:hover {
    background: #b30f0f;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.25);
}

/* Botón secundario */
.btn-secundario,
.btn-ghost {
    background: #ffffff;
    color: var(--color-primario);
    padding: 11px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid rgba(15, 23, 42, 0.12);
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secundario:hover,
.btn-ghost:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

/* Botón tipo link */
.btn-link {
    text-decoration: none;
    color: var(--color-primario);
    font-weight: 600;
    margin-left: 12px;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #16a34a;
    color: #fff;
    padding: 10px 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2000;
    font-size: 0.9rem;
    box-shadow: 0 14px 28px rgba(22, 163, 74, 0.25);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}


/* helpers */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

@media (max-width: 768px) {
    .btn-principal,
    .btn-primary,
    .btn-secundario,
    .btn-ghost { width: 100%; }
}