/* ============================================================
   MILPBOOST - Componentes extraidos de estilos inline
   Archivo: custom-components.css

   Contenido movido desde bloques <style> que vivian en el HTML:
   1. index.html        -> Boton CTA premium + banner de hexagonos
   2. desarrollo.html   -> Animacion de seccion resaltada
   3. control-accesos.html -> Formulario de diagnostico (leads)
   4. terminos.html / privacidad.html -> Paginas legales

   NOTA: Los estilos se conservan tal cual estaban (misma paleta
   morado/dorado en CTA y legales). La unificacion de paleta con
   el vino corporativo (#8B2635) queda pendiente de decision.
   ============================================================ */

/* ==========================================
   1. BOTON CTA - DISEÑO PROFESIONAL PREMIUM
   (antes inline en index.html)
   ========================================== */
#cta .actions.special {
    display: flex !important;
    justify-content: center !important;
    margin-top: 2.5em !important;
    margin-bottom: 0 !important;
}

#cta .actions.special li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

section#cta .button.primary.large,
section#cta a.button.primary.large {
    /* Forzar gradiente premium */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    background-color: transparent !important;

    /* Tipografía balanceada */
    color: #ffffff !important;
    font-size: 1.1em !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    line-height: 1.2 !important;

    /* Dimensiones balanceadas */
    padding: 0.95em 2.5em !important;
    min-width: 200px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;

    /* Forma moderna */
    border: none !important;
    border-radius: 50px !important;

    /* Sombra profesional con glow */
    box-shadow:
        0 8px 24px rgba(102, 126, 234, 0.35),
        0 0 30px rgba(102, 126, 234, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;

    /* Animaciones suaves */
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;

    /* Efectos 3D */
    position: relative !important;
    overflow: hidden !important;
    cursor: pointer !important;
    transform: translateY(0) scale(1) !important;
    will-change: transform, box-shadow !important;
}

/* Efecto de brillo animado */
section#cta .button.primary.large:before {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    left: -50% !important;
    width: 200% !important;
    height: 200% !important;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.25) 50%,
        transparent 70%
    ) !important;
    transform: translateX(-100%) translateY(-100%) rotate(45deg) !important;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Estado HOVER - Elevación y glow */
section#cta .button.primary.large:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow:
        0 15px 40px rgba(102, 126, 234, 0.5),
        0 0 60px rgba(102, 126, 234, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

section#cta .button.primary.large:hover:before {
    transform: translateX(100%) translateY(100%) rotate(45deg) !important;
}

/* Estado ACTIVE - Presión */
section#cta .button.primary.large:active {
    transform: translateY(-2px) scale(0.98) !important;
    box-shadow:
        0 8px 20px rgba(102, 126, 234, 0.4),
        0 0 30px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    transition: all 0.1s ease-out !important;
}

/* Estado FOCUS - Accesibilidad */
section#cta .button.primary.large:focus {
    outline: 3px solid rgba(102, 126, 234, 0.4) !important;
    outline-offset: 4px !important;
}

/* Responsive Tablet */
@media screen and (max-width: 980px) {
    section#cta .button.primary.large {
        font-size: 1.05em !important;
        padding: 0.9em 2.3em !important;
        letter-spacing: 1.8px !important;
        min-width: 190px !important;
    }
}

/* Responsive Móvil Grande */
@media screen and (max-width: 736px) {
    section#cta .button.primary.large {
        font-size: 1em !important;
        padding: 0.85em 2em !important;
        letter-spacing: 1.5px !important;
        min-width: 180px !important;
    }
}

/* Responsive Móvil Pequeño */
@media screen and (max-width: 480px) {
    section#cta .button.primary.large {
        font-size: 0.95em !important;
        padding: 0.8em 1.8em !important;
        letter-spacing: 1.2px !important;
        min-width: auto !important;
        width: auto !important;
        max-width: none !important;
    }
}

/* ==========================================
   BANNER - Fondo animado (red de hexagonos)
   (antes inline en index.html)
   ========================================== */
#banner {
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a0b 0%, #160a0c 100%) !important;
}

#bannerHexCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
    border: 0;
}

#bannerHexVeil {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 45%, rgba(10,10,11,0) 42%, rgba(10,10,11,0.55) 100%);
}

#banner h1,
#banner h2,
#banner p,
#banner ul.actions {
    position: relative;
    z-index: 2;
}

/* ==========================================
   2. ANIMACION DE SECCION RESALTADA
   (antes inline en desarrollo.html)
   ========================================== */
@keyframes highlightPulse {
    0% {
        opacity: 0;
        transform: scale(0.97);
    }
    15% {
        opacity: 1;
        transform: scale(1.015);
    }
    85% {
        opacity: 1;
        transform: scale(1.015);
    }
    100% {
        opacity: 0;
        transform: scale(0.97);
    }
}

.section-highlighted {
    position: relative;
    /* Borde más grueso y visible */
    outline: 4px solid #667eea;
    outline-offset: -4px;
    border-radius: 8px;
    /* Fondo más visible */
    background-color: rgba(102, 126, 234, 0.08) !important;
}

.section-highlighted::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 4px solid #667eea;
    border-radius: 8px;
    pointer-events: none;
    animation: highlightPulse 2.5s ease-in-out;
    will-change: opacity, transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ==========================================
   3. FORMULARIO DE DIAGNOSTICO (LEADS)
   (antes inline en control-accesos.html)
   ========================================== */
#lead-form { text-align: left; }
#lead-form label { margin-bottom: 0.45em; }
#lead-form .row.gtr-uniform { margin-top: -1.3em; }
#lead-form .row.gtr-uniform > * { padding-top: 1.3em; }
#lead-form .lead-submit-wrap { margin-top: 1.75em; }

/* ==========================================
   4. PAGINAS LEGALES (Terminos / Privacidad)
   (antes inline en terminos.html y privacidad.html)
   ========================================== */
:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --bg-light: rgba(102, 126, 234, 0.03);
    --bg-medium: rgba(102, 126, 234, 0.08);
    --bg-emphasis: rgba(102, 126, 234, 0.12);
    --border: rgba(102, 126, 234, 0.2);
    --text-dark: #333;
    --text-muted: #666;
}

/* Secciones principales - más limpias */
.terms-section, .privacy-section {
    margin-bottom: 3em;
    padding: 2em;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.terms-section:hover, .privacy-section:hover {
    background: var(--bg-medium);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.terms-section h3, .privacy-section h3 {
    color: var(--primary);
    margin-bottom: 1.2em;
    padding-bottom: 0.6em;
    border-bottom: 2px solid var(--border);
    font-size: 1.5em;
    font-weight: 600;
}

.terms-section h4, .privacy-section h4 {
    color: var(--secondary);
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    font-size: 1.15em;
    font-weight: 600;
}

.terms-section ul, .terms-section ol,
.privacy-section ul, .privacy-section ol {
    margin-left: 1.8em;
    margin-bottom: 1.2em;
    line-height: 1.8;
}

.terms-section li, .privacy-section li {
    margin-bottom: 0.7em;
}

/* Avisos importantes - diseño elegante y limpio */
.important-notice {
    background: var(--bg-medium);
    border: 3px solid var(--primary);
    padding: 1.8em;
    border-radius: 8px;
    margin: 2.5em 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.important-notice h4 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 0.8em;
    font-size: 1.3em;
}

.important-notice p {
    margin-bottom: 0.5em;
    line-height: 1.7;
    color: #ffffff;
}

.important-notice p:last-child {
    margin-bottom: 0;
}

/* Cajas de definiciones y datos */
.definition-box, .data-box {
    background: var(--bg-medium);
    padding: 1.5em;
    border-left: 4px solid var(--secondary);
    margin: 1.8em 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 4px;
}

.data-box strong {
    color: var(--secondary);
}

/* Cajas de derechos (para privacidad) */
.rights-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px solid var(--primary);
    padding: 1.8em;
    border-radius: 8px;
    margin: 1.8em 0;
}

.rights-box h4 {
    color: var(--primary);
    margin-top: 0;
}

/* Última actualización */
.last-updated {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 2.5em;
    text-align: center;
    padding: 1.2em;
    background: var(--bg-light);
    border-radius: 6px;
    border: 1px solid var(--border);
}

/* Tabla de contenidos - diseño premium */
.toc {
    background: var(--bg-emphasis);
    padding: 2.5em;
    border-radius: 12px;
    margin: 3em 0;
    border: 2px solid var(--border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.toc h4 {
    margin-top: 0;
    color: var(--primary);
    font-size: 1.4em;
    margin-bottom: 1.2em;
    padding-bottom: 0.8em;
    border-bottom: 2px solid var(--border);
}

.toc ul {
    list-style: none;
    margin-left: 0;
}

.toc li {
    margin: 0.8em 0;
    padding-left: 2em;
    position: relative;
}

.toc li:before {
    content: "▸";
    position: absolute;
    left: 0.5em;
    color: var(--primary);
    font-size: 1.2em;
}

.toc a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    display: inline-block;
}

.toc a:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

/* Tablas mejoradas (solo paginas legales, via clase .legal-page en <body>) */
.legal-page .table-wrapper table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.legal-page .table-wrapper th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 1em;
}

.legal-page .table-wrapper tr:nth-child(even) {
    background: var(--bg-light);
}

/* Responsive mejorado */
@media screen and (max-width: 980px) {
    .terms-section, .privacy-section {
        padding: 1.5em;
        margin-bottom: 2em;
    }

    .toc {
        padding: 1.8em;
    }

    .important-notice {
        padding: 1.5em;
    }
}

@media screen and (max-width: 736px) {
    .terms-section, .privacy-section {
        padding: 1.2em;
        margin-bottom: 1.5em;
    }

    .toc {
        padding: 1.5em;
    }

    .toc li {
        padding-left: 1.5em;
    }

    .important-notice {
        padding: 1.2em;
    }
}
