/* ============================================================
   hero.css — Hero (scrolly-container, mockups, órbita)
   ============================================================ */

/* --- HERO ORBITAL Y MOCKUPS --- */
.scrolly-container {
    position: relative;
    width: 100%;
    padding-top: 160px;
    padding-bottom: 0;
    background: radial-gradient(circle at top center, #F4EBFF 0%, #FFFFFF 60%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- DEGRADADO SUPERIOR --- */
.scrolly-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 160px;
    background: linear-gradient(to bottom, #f7f1ff 20%, rgba(244, 235, 255, 0) 100%);
    z-index: 3;
    pointer-events: none;
}

.hero-header {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 20px auto;
    padding: 0 20px;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: var(--white);
}

.hero-header h1 {
    font-size: 56px;
    line-height: 1.1;
    letter-spacing: -2px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.hero-header h1 span {
    color: var(--primary);
}

.hero-header p {
    font-size: 14px;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- ÓRBITA GIRATORIA --- */
.hero-orbit-container {
    position: absolute;
    top: 25%;
    left: 50%;
    width: 900px;
    height: 900px;
    animation: rotateOrbit 40s linear infinite;
    border: 1px dashed rgba(139, 92, 246, 0.25);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

@keyframes rotateOrbit {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.orbit-item {
    position: absolute;
    width: 0;
    height: 0;
}

.oi-1 { left: 50%; top: 0%; }
.oi-2 { left: 93.3%; top: 25%; }
.oi-3 { left: 93.3%; top: 75%; }
.oi-4 { left: 50%; top: 100%; }
.oi-5 { left: 6.7%; top: 75%; }
.oi-6 { left: 6.7%; top: 25%; }

.orbit-animator {
    position: absolute;
    top: 0;
    left: 0;
    animation: counterRotate 40s linear infinite;
}

@keyframes counterRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

.orbit-inner {
    position: absolute;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- ESCENARIO DE MOCKUPS (DESKTOP) --- */
.stage-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    height: 630px;
    overflow: visible;
    display: flex;
    justify-content: center;
}

.interactive-stage {
    position: relative;
    z-index: 5;
    width: 1040px;
    height: 630px;
    margin: 0 auto;
    transform-origin: top center;
}

/* Mockup Desktop */
.premium-desktop {
    position: absolute;
    left: 0;
    top: 20px;
    width: 850px;
    height: 520px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.desktop-bar {
    background: #F3F4F6;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}

.d-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.d-dot.red { background: #FF5F56; }
.d-dot.yellow { background: #FFBD2E; }
.d-dot.green { background: #27C93F; }

.desktop-viewport {
    display: flex;
    flex: 1;
    background: #FAFAFA;
    overflow: hidden;
}

/* Imagen del desktop ajustada a tu alineación original */
.hero-desktop-img {
    width: 109%;
    height: 100%;
    object-fit: cover;
}

/* Mockup Teléfono */
.phone-stage {
    position: absolute;
    left: 800px;
    right: auto;
    top: 50px;
    z-index: 10;
}

.hero-phone-updated.css-phone {
    width: 240px;
    height: 500px;
    background: #111827;
    border-radius: 40px;
    border: 8px solid #111827;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.phone-screen-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-badges,
.hero-tagline,
.hero-decor-circle {
    display: none;
}

/* --- ESCALADOS EN PANTALLAS GRANDES Y MEDIANAS --- */
@media (max-width: 1700px) {
    .interactive-stage { transform: scale(0.9); }
    .stage-wrapper { height: calc(630px * 0.9); }
}

@media (max-width: 1536px) {
    .interactive-stage { transform: scale(0.82); }
    .stage-wrapper { height: calc(630px * 0.82); }
}

@media (max-width: 1366px) {
    .interactive-stage { transform: scale(0.74); }
    .stage-wrapper { height: calc(630px * 0.74); }
}

@media (max-width: 1180px) {
    .interactive-stage { transform: scale(0.68); }
    .stage-wrapper { height: calc(630px * 0.68); }
}

/* ============================================================
   TABLETS / IPADS (iPad Air 820px, iPad Mini 768px, Pro 834px)
   ============================================================ */
@media (min-width: 641px) and (max-width: 1024px) {
    .hero-orbit-container {
        display: none !important;
    }

    .hero-header {
        padding: 0 24px;
        margin-bottom: 20px;
    }

    .hero-header h1 {
        font-size: 42px;
        letter-spacing: -1.5px;
    }

    .stage-wrapper {
        width: 100%;
        max-width: 100%;
        height: 420px;
        margin: 0 auto;
        overflow: visible;
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }

    .interactive-stage {
        width: 1040px;
        /* Punto dulce exacto: -125px */
        transform: scale(0.60) translateX(-125px) !important;
        transform-origin: top center;
        margin: 0 auto;
    }
}

/* Ajuste fino para iPad Mini (768px) */
@media (min-width: 641px) and (max-width: 790px) {
    .interactive-stage {
        transform: scale(0.56) translateX(-135px) !important;
    }
    .stage-wrapper {
        height: 390px;
    }
}

/* ============================================================
   SMARTPHONES / MÓVILES (Menor a 640px)
   ============================================================ */
@media (max-width: 640px) {
    .scrolly-container {
        padding-top: 120px !important;
        padding-bottom: 30px;
    }

    .hero-header {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 20px;
        margin-bottom: 24px;
    }

    .hero-header h1 {
        font-size: 28px;
        letter-spacing: -1px;
        margin-bottom: 16px;
    }

    .hero-header p {
        font-size: 14px;
        line-height: 1.5;
    }

    .hero-header div[style*="margin-top: 32px"] {
        margin-top: 24px !important;
        gap: 10px !important;
    }

    .hero-header .btn {
        flex: 1;
        padding: 12px 14px !important;
        font-size: 13px;
    }

    .hero-orbit-container {
        display: none !important;
    }

    /* --- CONTENEDOR Y COMPOSICIÓN DE MOCKUPS EN MÓVIL --- */
    .stage-wrapper {
        position: relative;
        height: 270px !important;
        max-width: 380px;
        width: 100%;
        padding: 0 12px;
        margin: 15px auto 0 auto !important;
        display: block !important;
        overflow: visible !important;
    }

    .interactive-stage {
        position: relative !important;
        width: 100% !important;
        height: 260px !important;
        transform: none !important;
        margin: 0 auto !important;
    }

    /* Computadora más grande y sin cortar imagen */
    .premium-desktop {
        position: absolute !important;
        left: 0 !important;
        top: 40px !important;
        width: 290px !important;      /* Aumentado para mayor presencia */
        height: 195px !important;     /* Altura proporcional */
        border-radius: 14px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
        z-index: 1;
        overflow: hidden;
    }

    .desktop-bar {
        height: 18px;
        padding: 0 10px;
        gap: 5px;
    }

    .d-dot {
        width: 6px;
        height: 6px;
    }

 /* Imagen del desktop: se desplaza hacia la izquierda para empezar en "Punto de Venta" */
    .hero-desktop-img {
        width: 130% !important;              /* Se amplía para compensar el recorte */
        max-width: none !important;
        height: 100% !important;
        object-fit: cover !important;
        transform: translateX(-18px) !important; /* <-- Oculta la barra de iconos y empieza directo en Punto de Venta */
    }

    /* Celular sobrepuesto a la derecha */
    .phone-stage {
        position: absolute !important;
        left: auto !important;
        right: 0px !important;
        top: 25px !important;
        z-index: 10;
    }

    .hero-phone-updated.css-phone {
        width: 115px !important;
        height: 235px !important;
        border-width: 4px !important;
        border-radius: 22px !important;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25) !important;
    }

    /* Notch sutil y centrado */
    .hero-phone-updated .css-phone-notch,
    .phone-stage .css-phone-notch {
        width: 38px !important;
        height: 10px !important;
        border-radius: 8px !important;
        top: 4px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        position: absolute !important;
        background: #000000 !important;
        z-index: 10 !important;
    }
}

/* Pantallas extra pequeñas (< 380px) */
@media (max-width: 380px) {
    .stage-wrapper {
        max-width: 330px;
        height: 240px !important;
    }

    .premium-desktop {
        width: 250px !important;
        height: 165px !important;
    }

    .hero-phone-updated.css-phone {
        width: 105px !important;
        height: 215px !important;
    }
}