/* ==========================================================================
   BRAIN LAB ESTUDIO — SECCIÓN APPS PLAY STORE COMPACTA (~30% VIEWPORT HEIGHT)
   - Layout de 2 columnas: Video embebido + Carrusel Neumórfico de Apps
   - Elimina la sobrecarga de altura y botones innecesarios
   - Conserva las descripciones ricas y el estilo neumórfico elegante
   ========================================================================== */

#bl-play-section {
    --bl-play-card-bg: #141822;
    --bl-play-text-main: #ffffff;
    --bl-play-text-muted: #94a3b8;
    --bl-play-accent: #e63946;
    --bl-play-accent-glow: rgba(230, 57, 70, 0.35);
    --bl-play-shadow-flat: 8px 8px 18px #0c0f16, -8px -8px 18px #1c2230;
    --bl-play-shadow-inset: inset 3px 3px 6px #0c0f16, inset -3px -3px 6px #1c2230;
    --bl-play-border: rgba(255, 255, 255, 0.06);

    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    width: 100%;
    box-sizing: border-box;
    padding: 36px 1.5rem 48px;
    position: relative;
    background: transparent;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Modo claro neumórfico */
#bl-play-section.light {
    --bl-play-card-bg: #e6eef8;
    --bl-play-text-main: #0f172a;
    --bl-play-text-muted: #475569;
    --bl-play-shadow-flat: 8px 8px 16px #c3cedd, -8px -8px 16px #ffffff;
    --bl-play-shadow-inset: inset 3px 3px 6px #c5d0e0, inset -3px -3px 6px #ffffff;
    --bl-play-border: rgba(255, 255, 255, 0.6);
}

@media (prefers-color-scheme: light) {
    #bl-play-section:not(.dark) {
        --bl-play-card-bg: #e6eef8;
        --bl-play-text-main: #0f172a;
        --bl-play-text-muted: #475569;
        --bl-play-shadow-flat: 8px 8px 16px #c3cedd, -8px -8px 16px #ffffff;
        --bl-play-shadow-inset: inset 3px 3px 6px #c5d0e0, inset -3px -3px 6px #ffffff;
        --bl-play-border: rgba(255, 255, 255, 0.6);
    }
}

#bl-play-section *,
#bl-play-section *::before,
#bl-play-section *::after {
    box-sizing: border-box;
}

/* CONTENEDOR PRINCIPAL */
#bl-play-section .bl-play-container {
    max-width: 1160px;
    margin: 0 auto;
    position: relative;
    width: 100%;
}

/* ==========================================
   HEADER DE SECCIÓN COMPACTO
   ========================================== */
#bl-play-section .bl-play-header {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

#bl-play-section .bl-play-title {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--bl-play-text-main);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0;
}

#bl-play-section .bl-play-gradient-text {
    background: linear-gradient(120deg, #38bdf8, #818cf8 30%, #e63946 70%, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

#bl-play-section .bl-play-subtitle {
    color: var(--bl-play-text-muted);
    font-size: 0.96rem;
    line-height: 1.5;
    margin: 0;
    max-width: 580px;
}

/* ==========================================
   LAYOUT COMPACTO DE 2 COLUMNAS (VIDEO + APPS)
   ========================================== */
.bl-play-compact-layout {
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-items: center;
    width: 100%;
}

@media (min-width: 992px) {
    .bl-play-compact-layout {
        display: grid;
        grid-template-columns: 1.05fr 1fr;
        gap: 36px;
        align-items: stretch;
    }
}

/* ==========================================
   COLUMNA 1: ESPACIO DE VIDEO SOLICITADO
   ========================================== */
.bl-play-video-col {
    width: 100%;
    display: flex;
    align-items: center;
}

.bl-play-video-box {
    width: 100%;
    border-radius: 18px;
    background: var(--bl-play-card-bg);
    box-shadow: var(--bl-play-shadow-flat);
    border: 1px solid var(--bl-play-border);
    overflow: hidden;
    position: relative;
}

.bl-play-video-box iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: none;
    display: block;
    border-radius: 12px;
}

/* ==========================================
   COLUMNA 2: CARRUSEL COMPACTO DE APPS
   ========================================== */
.bl-play-apps-col {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#bl-play-section .bl-play-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

#bl-play-section .bl-play-carousel-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 6px 2px 14px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    align-items: stretch;
}

#bl-play-section .bl-play-carousel-track::-webkit-scrollbar {
    display: none;
}

#bl-play-section .bl-play-slide {
    flex: 0 0 100%;
    min-width: 100%;
    width: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   TARJETA NEUMÓRFICA COMPACTA (CON SS A LA IZQUIERDA)
   ========================================== */
.bl-play-app-card.neumorphic-card {
    background: var(--bl-play-card-bg);
    border: 1px solid var(--bl-play-border);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    gap: 20px;
    width: 100%;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-sizing: border-box;
}

.bl-play-app-card.neumorphic-card:hover {
    transform: translateY(-2px);
}

/* Columna Izquierda: Captura de pantalla (SS) */
.bl-play-card-ss-col {
    flex: 0 0 145px;
    width: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
}

.bl-play-card-ss-frame {
    width: 100%;
    height: 100%;
    min-height: 220px;
    max-height: 320px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: #06080d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        inset 0 2px 6px rgba(0, 0, 0, 0.6),
        0 8px 18px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.bl-play-card-ss-frame:hover {
    transform: scale(1.02);
    border-color: rgba(96, 165, 250, 0.35);
}

.bl-play-card-ss-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    border-radius: 15px;
}

/* Divider vertical entre el SS y el contenido */
.bl-play-card-divider {
    width: 1px;
    align-self: stretch;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.14) 25%, rgba(255, 255, 255, 0.14) 75%, rgba(255, 255, 255, 0.02) 100%);
    flex-shrink: 0;
    margin: 4px 0;
}

/* Columna Derecha: Contenido y detalles */
.bl-play-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

@media (max-width: 640px) {
    .bl-play-app-card.neumorphic-card {
        padding: 16px;
        gap: 14px;
    }
    .bl-play-card-ss-col {
        flex: 0 0 110px;
        width: 110px;
    }
    .bl-play-card-ss-frame {
        min-height: 190px;
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .bl-play-app-card.neumorphic-card {
        flex-direction: column;
        gap: 14px;
    }
    .bl-play-card-ss-col {
        width: 100%;
        flex: 0 0 auto;
    }
    .bl-play-card-ss-frame {
        max-height: 200px;
        width: 100%;
    }
    .bl-play-card-divider {
        width: 100%;
        height: 1px;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.14) 50%, rgba(255, 255, 255, 0.02) 100%);
    }
}

.bl-play-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bl-play-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bl-play-brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bl-play-card-bg);
    box-shadow: var(--bl-play-shadow-flat);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #f87171;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.bl-play-brand-icon.icon-speed {
    color: #38bdf8;
}

.bl-play-brand-info {
    display: flex;
    flex-direction: column;
}

.bl-play-app-name {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.bl-play-app-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #10b981;
    padding: 2px 8px;
    border-radius: 50px;
    background: var(--bl-play-card-bg);
    box-shadow: var(--bl-play-shadow-inset);
    margin-top: 3px;
    width: fit-content;
}

.bl-play-app-headline {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

.bl-play-app-headline .spy-accent-text,
.bl-play-app-headline span {
    color: #f87171;
}

.bl-play-slide:nth-child(2) .bl-play-app-headline span {
    color: #38bdf8;
}

.bl-play-app-desc {
    font-size: 0.88rem;
    color: var(--bl-play-text-muted);
    line-height: 1.55;
    margin: 0;
}

/* Fila de características neumórficas */
.bl-play-features-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bl-play-feature-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 10px;
    background: var(--bl-play-card-bg);
    box-shadow: var(--bl-play-shadow-flat);
    font-size: 0.74rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.bl-play-feature-chip i {
    color: #e63946;
    font-size: 14px;
}

.bl-play-slide:nth-child(2) .bl-play-feature-chip i {
    color: #38bdf8;
}

/* Acciones y botón Google Play */
.bl-play-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}

#bl-play-section .spy-playstore-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #0c0f17;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 12px;
    box-shadow: var(--bl-play-shadow-flat);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease;
}

#bl-play-section .spy-playstore-btn:hover {
    transform: translateY(-2px);
}

#bl-play-section .spy-playstore-btn svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

#bl-play-section .spy-play-text-sub {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    font-weight: 600;
    line-height: 1;
}

#bl-play-section .spy-play-text-main {
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.15;
}

#bl-play-section .spy-security-note {
    font-size: 0.72rem;
    color: var(--bl-play-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.25;
}

#bl-play-section .bl-speed-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e63946;
    color: #ffffff;
    text-decoration: none;
    padding: 9px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 6px 18px rgba(230, 57, 70, 0.35);
    transition: transform 0.2s ease;
}

#bl-play-section .bl-speed-button:hover {
    transform: translateY(-2px);
    background-color: #d62839;
}

#bl-play-section .bl-speed-note {
    font-size: 0.72rem;
    color: var(--bl-play-text-muted);
}

/* BOTONES DE NAVEGACIÓN ANTERIOR / SIGUIENTE */
#bl-play-section .bl-play-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bl-play-card-bg);
    box-shadow: var(--bl-play-shadow-flat);
    border: 1px solid var(--bl-play-border);
    color: var(--bl-play-text-main);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    transition: transform 0.2s ease, color 0.2s ease;
}

#bl-play-section .bl-play-nav-btn:hover {
    transform: translateY(-50%) scale(1.1);
    color: var(--bl-play-accent);
}

#bl-play-section .bl-play-nav-btn.prev {
    left: -14px;
}

#bl-play-section .bl-play-nav-btn.next {
    right: -14px;
}

/* DOTS DE INDICACIÓN */
#bl-play-section .bl-play-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    margin-top: 8px;
}

#bl-play-section .bl-play-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bl-play-card-bg);
    box-shadow: var(--bl-play-shadow-inset);
    cursor: pointer;
    transition: all 0.3s ease;
}

#bl-play-section .bl-play-dot.active {
    width: 24px;
    border-radius: 10px;
    background: var(--bl-play-accent);
    box-shadow: 0 0 10px var(--bl-play-accent-glow);
}

/* ==========================================
   OPTIMIZACIÓN MÓVIL (VERTICAL / CELULAR)
   ========================================== */
@media (max-width: 991px) {
    #bl-play-section {
        padding: 24px 1rem 32px;
    }

    #bl-play-section .bl-play-title {
        font-size: 1.65rem;
    }

    #bl-play-section .bl-play-subtitle {
        font-size: 0.88rem;
    }

    #bl-play-section .bl-play-nav-btn {
        display: none;
        /* Deslizamiento táctil */
    }

    .bl-play-compact-layout {
        gap: 20px;
    }

    .bl-play-app-card.neumorphic-card {
        padding: 18px 16px;
        gap: 12px;
    }

    .bl-play-card-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    #bl-play-section .spy-playstore-btn,
    #bl-play-section .bl-speed-button {
        width: 100%;
        justify-content: center;
    }
}