﻿/* =========================
   invoiceBin IDP - AI Section
   Namespace: .aisection
   Fondo blanco + puntos dorados 4x + highlights laterales
   ========================= */

.aisection {
    position: relative;
    padding: clamp(44px, 6vw, 92px) 16px;
    background: #ffffff;
    color: #0B1220;
}

.aisection__inner {
    max-width: 1240px;
    margin: 0 auto;
}

.aisection__head {
    text-align: center;
    margin-bottom: clamp(18px, 3vw, 30px);
}

.aisection__title {
    margin: 0;
    font-size: clamp(30px, 3.8vw, 46px);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: #081021;
}

.aisection__subtitle {
    margin: 10px 0 0;
    font-size: clamp(14px, 1.6vw, 18px);
    opacity: .72;
    letter-spacing: .10em;
    text-transform: lowercase;
}

/* Grid: highlights - stage - highlights */
.aisection__grid {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 720px) 1fr;
    gap: clamp(14px, 2.4vw, 24px);
    align-items: center;
}

@media (max-width: 980px) {
    .aisection__grid {
        grid-template-columns: 1fr;
    }

    .aisection__highlights {
        order: 2;
    }

    .aisection__stage {
        order: 1;
    }
}

/* Highlights laterales */
.aisection__highlights {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.aisection__hl {
    position: relative;
    padding: 14px 14px 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(10, 20, 40, 0.10);
    box-shadow: 0 10px 26px rgba(0,0,0,0.08);
}

    .aisection__hl::before {
        content: "";
        position: absolute;
        left: -8px;
        top: 18px;
        width: 8px;
        height: 24px;
        border-radius: 8px;
        background: linear-gradient(180deg, rgba(215,164,58,0.95), rgba(215,164,58,0.25));
        box-shadow: 0 0 18px rgba(215,164,58,0.35);
    }

.aisection__highlights--right .aisection__hl::before {
    left: auto;
    right: -8px;
}

.aisection__hlTitle {
    font-weight: 900;
    letter-spacing: -0.01em;
    color: #071226;
    font-size: 15px;
    margin-bottom: 6px;
}

.aisection__hlText {
    font-size: 13.5px;
    line-height: 1.35;
    color: rgba(11,18,32,0.78);
}

/* Stage */
.aisection__stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    background: radial-gradient(900px 420px at 50% 15%, rgba(215,164,58,0.10), transparent 60%), radial-gradient(700px 380px at 20% 80%, rgba(35,120,255,0.08), transparent 60%), #ffffff;
    border: 1px solid rgba(10, 20, 40, 0.10);
    box-shadow: 0 18px 60px rgba(0,0,0,0.10);
    overflow: hidden;
}

    .aisection__stage::after {
        content: "";
        position: absolute;
        inset: -2px;
        background: radial-gradient(420px 220px at 55% 55%, rgba(215,164,58,0.14), transparent 65%);
        pointer-events: none;
    }

/* Imagen más pequeña */
.aisection__image {
    position: absolute;
    inset: 0;
    margin: auto;
    width: min(420px, 68%); /* <-- más pequeña */
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 18px 38px rgba(0,0,0,0.18));
    z-index: 1;
}

/* Puntos */
.aisection__points {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

/* Puntos 4x: de 14px a 56px */
.aisection__point {
    position: absolute;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: pointer;
    /* Dorado brutal + brillo */
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95) 0%, rgba(255,227,150,0.92) 22%, rgba(215,164,58,0.95) 55%, rgba(170,120,25,0.92) 100%);
    border: 2px solid rgba(255,255,255,0.75);
    box-shadow: 0 0 0 10px rgba(215,164,58,0.18), 0 0 40px rgba(215,164,58,0.55), 0 18px 44px rgba(0,0,0,0.16);
    outline: none;
}

    /* Anillo pulsante dorado */
    .aisection__point::before {
        content: "";
        position: absolute;
        inset: -20px;
        border-radius: 999px;
        background: radial-gradient(circle, rgba(215,164,58,0.32), rgba(215,164,58,0.00) 70%);
        animation: aisectionGoldPulse 1.35s ease-out infinite;
    }

@keyframes aisectionGoldPulse {
    0% {
        transform: scale(0.55);
        opacity: 0.98;
    }

    70% {
        transform: scale(1.10);
        opacity: 0.25;
    }

    100% {
        transform: scale(1.25);
        opacity: 0.00;
    }
}

/* "Icono" de interacción (mini destello) */
.aisection__point::marker {
    content: "";
}
/* por si acaso */
.aisection__point span {
    display: none;
}

/* Tooltip grande */
.aisection__point::after {
    content: attr(data-title) "\A" attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: calc(100% + 18px);
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
    width: min(520px, 78vw);
    padding: 16px 16px 16px;
    border-radius: 18px;
    white-space: pre-wrap;
    text-align: left;
    font-size: 14px;
    line-height: 1.35;
    color: #0B1220;
    background: radial-gradient(320px 160px at 20% 25%, rgba(215,164,58,0.24), transparent 60%), radial-gradient(320px 160px at 85% 70%, rgba(35,120,255,0.10), transparent 60%), rgba(255,255,255,0.98);
    border: 1px solid rgba(10, 20, 40, 0.14);
    box-shadow: 0 22px 70px rgba(0,0,0,0.18);
}

    /* Primera línea como "título" del tooltip */
    .aisection__point::after::first-line {
        font-weight: 900;
        letter-spacing: -0.01em;
    }

/* Hover/Focus: aún más glow */
.aisection__point:hover,
.aisection__point:focus-visible {
    box-shadow: 0 0 0 14px rgba(215,164,58,0.22), 0 0 60px rgba(215,164,58,0.70), 0 26px 60px rgba(0,0,0,0.18);
    border-color: rgba(255,255,255,0.95);
}

    .aisection__point:hover::after,
    .aisection__point:focus-visible::after {
        opacity: 1;
        transform: translateX(-50%) translateY(0px);
    }

/* Posiciones (ajústalas según tu imagen) */
.aisection__point.is-1 {
    left: 26%;
    top: 34%;
}

.aisection__point.is-2 {
    left: 74%;
    top: 30%;
}

.aisection__point.is-3 {
    left: 70%;
    top: 72%;
}

.aisection__point.is-4 {
    left: 30%;
    top: 76%;
}

/* Mobile: reduce un poco los puntos */
@media (max-width: 520px) {
    .aisection__point {
        width: 44px;
        height: 44px;
    }

        .aisection__point::before {
            inset: -16px;
        }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .aisection__point::before {
        animation: none;
        opacity: .35;
    }
}

/* =========================
   FIX: tooltips no se recortan
   ========================= */

/* 1) Quita el recorte del stage (este era el culpable) */
.aisection__stage {
    overflow: visible; /* antes: hidden */
    position: relative;
    z-index: 5; /* por encima de highlights */
}

/* 2) Asegura que highlights queden detrás del tooltip */
.aisection__highlights {
    position: relative;
    z-index: 1;
}

/* 3) Asegura que puntos/tooltips estén arriba de todo */
.aisection__points {
    overflow: visible;
    position: absolute;
    inset: 0;
    z-index: 10;
}

.aisection__point {
    z-index: 20;
}

    /* 4) Tooltip arriba de todo y con scroll si es MUY largo */
    .aisection__point::after {
        z-index: 9999;
        max-height: min(52vh, 420px);
        overflow: auto;
    }

    /* 5) Para los puntos de abajo: tooltip hacia arriba (evita que se salga/corte) */
    .aisection__point.is-3::after,
    .aisection__point.is-4::after {
        top: auto;
        bottom: calc(100% + 18px);
        transform: translateX(-50%) translateY(-10px);
    }

    .aisection__point.is-3:hover::after,
    .aisection__point.is-3:focus-visible::after,
    .aisection__point.is-4:hover::after,
    .aisection__point.is-4:focus-visible::after {
        transform: translateX(-50%) translateY(0px);
    }


