/* ─── MOBILE SCROLL SECTION ─── */

.mobile-section {
    position: relative;
    width: 100%;
    height: 400vh;
    background-color: #000300;
}

.mobile-sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    z-index: 2;
}

#mobile-stars {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.mobile-container {
    position: absolute;
    left: 38%;
    top: 78%;
    transform: translate(-50%, -50%);
    width: 63vw;
    min-width: 500px;
    height: auto;
    will-change: transform;
    z-index: 10;
}

.mobile-frame {
    width: 100%;
    height: auto;
    max-height: 100vh;
    display: block;
    mix-blend-mode: screen;
    will-change: transform;
}

.mobile-content {
    position: absolute;
    right: 7%;
    top: 50%;
    width: 40%;
    max-width: 520px;
    text-align: left;
    opacity: 0;
    transform: translateY(-50%) translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    z-index: 20;
}

.mobile-content.visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    pointer-events: all;
}

.mobile-content .content-tag {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #8655F6;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.mobile-content h1, .mobile-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #F8F9FA;
    line-height: 0.95;
    margin-bottom: 1.25rem;
    text-shadow: 0 0 30px rgba(134, 85, 246, 0.3);
}

.mobile-content h1 em, .mobile-content h2 em {
    font-style: italic;
    color: #C084FC;
}

.mobile-content p {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: #A1A1AA;
    line-height: 1.8;
    margin-bottom: 2rem;
    font-weight: 300;
}

.mobile-content .tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mobile-content .tech-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(134, 85, 246, 0.3);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    color: #F8F9FA;
    font-size: 0.8rem;
}

.mobile-content .tech-tag:hover {
    border-color: rgba(134, 85, 246, 0.7);
}

.mobile-content .tech-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: #8655F6;
    animation: pulse 2s ease-in-out infinite;
}

.mobile-content .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2.8rem;
    border-radius: 9999px;
    border: 1px solid rgba(134, 85, 246, 0.5);
    background: rgba(134, 85, 246, 0.1);
    color: #F8F9FA;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.4s ease;
    cursor: pointer;
}

.mobile-content .cta-button:hover {
    background: rgba(134, 85, 246, 0.2);
    border-color: #8655F6;
    box-shadow: 0 0 20px rgba(134, 85, 246, 0.4);
    transform: scale(1.03);
}

/* ─── SCROLL INDICATOR ─── */
.mobile-section .scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    opacity: 1;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 30;
}

.mobile-section .scroll-indicator.hide-mouse .scroll-mouse-icon {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.mobile-section .scroll-indicator.hide {
    opacity: 0;
}

.mobile-section .scroll-text {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 1);
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(192, 132, 252, 0.8);
}

.mobile-section .scroll-line {
    width: 1px;
    height: 30px;
    background: linear-gradient(to bottom, rgba(192, 132, 252, 0.8), transparent);
    position: relative;
}

.mobile-section .scroll-line::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 1px;
    height: 40%;
    background: #C084FC;
    animation: scrollSlide 1.8s ease-in-out infinite;
}

/* ─── NAVIGATION DOTS ─── */
.mobile-nav {
    position: absolute;
    left: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    width: fit-content;
}

.mobile-nav.visible {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav .nav-item {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 0.75rem;
    justify-content: flex-start;
    cursor: pointer;
    transition: all 0.25s ease;
}

.mobile-nav .nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s ease;
    background: rgba(180, 180, 180, 0.35);
    position: relative;
    z-index: 1;
}

.mobile-nav .nav-item.active .nav-dot {
    background: #8655F6;
    box-shadow: 0 0 10px rgba(134, 85, 246, 0.7);
    transform: scale(1.25);
}

.mobile-nav .nav-label {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 700;
    white-space: nowrap;
    color: rgba(255, 255, 255, 1);
    user-select: none;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-width 0.5s ease;
    pointer-events: none;
    text-shadow:
        0 0 8px rgba(134, 85, 246, 1),
        0 0 20px rgba(134, 85, 246, 0.8),
        0 0 40px rgba(134, 85, 246, 0.4),
        0 2px 4px rgba(0, 0, 0, 1);
}

.mobile-nav .nav-item.active .nav-label {
    color: #E0AAFF;
}

.mobile-nav:hover .nav-label {
    opacity: 1;
    max-width: 200px;
}

.mobile-nav:hover .nav-item:hover .nav-label {
    color: #ffffff;
    text-shadow:
        0 0 8px rgba(192, 132, 252, 1),
        0 0 20px rgba(192, 132, 252, 0.9),
        0 0 40px rgba(192, 132, 252, 0.5),
        0 2px 4px rgba(0, 0, 0, 1);
}

.mobile-nav:hover .nav-item:hover .nav-dot {
    background: #8655F6;
    box-shadow: 0 0 16px rgba(134, 85, 246, 1);
    transform: scale(1.3);
}

.mobile-nav .nav-item.clickable {
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════
   TABLET — hasta 1024px
═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .mobile-container {
        left: 50%;
        top: 32%;
        width: 40vw;
        max-width: 420px;
        min-width: 300px;
    }

    .mobile-frame {
        width: 100%;
        height: auto;
        max-height: 60vh;
        transform: scale(1.25);
        transform-origin: center center;
    }

    .mobile-content {
        right: 4%;
        width: 55%;
        top: 65%;
        transform: translateY(0) translateX(30px);
        text-align: center;
    }

    .mobile-content.visible {
        transform: translateY(0) translateX(0);
    }

    .mobile-content h1, .mobile-content h2 {
        font-size: clamp(1.8rem, 4.5vw, 3.2rem);
    }

    .mobile-content p {
        font-size: 1rem;
        margin-bottom: 1.4rem;
    }

    .mobile-content .tags-container {
        gap: 0.7rem;
        margin-bottom: 1.4rem;
        justify-content: center;
    }

    .mobile-content .tech-tag {
        padding: 0.55rem 1.2rem;
        font-size: 0.8rem;
    }

    .mobile-content .cta-button {
        padding: 0.9rem 2.4rem;
        font-size: 0.75rem;
    }

    .mobile-nav {
        left: 50%;
        top: 1.5rem;
        transform: translateX(-50%);
        flex-direction: row;
        gap: 1.5rem;
        align-items: center;
    }

    .mobile-nav .nav-item {
        flex-direction: column;
        gap: 0.4rem;
        align-items: center;
    }

    .mobile-nav .nav-label {
        font-size: 0.5rem;
        opacity: 0;
        max-width: none;
        text-shadow: none;
    }

    .mobile-nav.visible .nav-label {
        opacity: 1;
        max-width: 100px;
        text-align: center;
    }

    .mobile-nav .nav-dot {
        width: 7px;
        height: 7px;
    }
}

/* ═══════════════════════════════════════════════════
   MÓVIL GRANDE — hasta 768px
═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .mobile-container {
        left: 50%;
        top: 30%;
        max-width: 92vw;
        width: 92vw;
    }

    .mobile-frame {
        max-height: 65vh;
        height: auto;
        width: 92vw;
        max-width: 92vw;
        transform: scale(1.35) !important;
        transform-origin: center center;
        will-change: transform;
    }

    .mobile-content {
        left: 0;
        right: 0;
        top: 57%;               /* ← CAMBIADO: 68% → 57% */
        width: 100%;
        max-width: 100%;
        padding: 0 1.2rem;
        transform: translateY(0) translateX(30px);
        text-align: center;
    }

    .mobile-content.visible {
        transform: translateY(0) translateX(0);
    }

    .mobile-content .content-tag {
        font-size: 0.65rem;
        margin-bottom: 0.6rem;
    }

    .mobile-content h1, .mobile-content h2 {
        font-size: clamp(1.7rem, 7vw, 2.6rem);
        margin-bottom: 0.6rem;
    }

    .mobile-content p {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 0.8rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .mobile-content .tags-container {
        justify-content: center;
        gap: 0.5rem;
        margin-bottom: 0.8rem;
    }

    .mobile-content .tech-tag {
        padding: 0.4rem 1rem;
        font-size: 0.74rem;
    }

    .mobile-content .cta-button {
        padding: 0.85rem 1.9rem;
        font-size: 0.68rem;
        gap: 0.6rem;
    }

    .mobile-nav {
        left: 50%;
        top: 1rem;
        bottom: auto;
        padding-top: 0;
        transform: translateX(-50%);
        flex-direction: row;
        gap: 0;
        align-items: center;
        background: rgba(10, 8, 20, 0.65);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(134, 85, 246, 0.18);
        border-radius: 9999px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
        padding: 0.45rem 0.8rem;
        max-width: calc(100% - 2rem);
    }

    .mobile-nav .nav-item {
        flex-direction: row;
        gap: 0.35rem;
        align-items: center;
        padding: 0.4rem 0.75rem;
        border-radius: 9999px;
        transition: background 0.25s ease;
    }

    .mobile-nav .nav-item:hover,
    .mobile-nav .nav-item:active {
        background: rgba(134, 85, 246, 0.14);
    }

    .mobile-nav .nav-label {
        font-size: 0.55rem;
        letter-spacing: 0.08em;
        opacity: 1;
        max-width: 80px;
        text-shadow: none;
        color: rgba(255, 255, 255, 0.65);
        pointer-events: auto;
    }

    .mobile-nav.visible .nav-label {
        opacity: 1;
        max-width: 80px;
        text-align: center;
    }

    .mobile-nav .nav-item.active .nav-label {
        color: #C084FC;
    }

    .mobile-nav .nav-dot {
        width: 6px;
        height: 6px;
    }

    .mobile-section .scroll-indicator {
        bottom: 1.5rem;
        right: 1.5rem;
        left: auto;
        top: auto;
        transform: none;
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
    }

    .mobile-section .scroll-line { display: none; }

    .mobile-section .scroll-text {
        font-size: 0.55rem;
        letter-spacing: 0.1em;
        text-shadow: none;
        color: rgba(255, 255, 255, 0.7);
        font-weight: 500;
    }
}

/* ═══════════════════════════════════════════════════
   MÓVIL PEQUEÑO — hasta 430px
═══════════════════════════════════════════════════ */
@media (max-width: 430px) {
    .mobile-container {
        max-width: 95vw;
        width: 95vw;
        top: 28%;
    }

    .mobile-frame {
        width: 95vw;
        max-width: 95vw;
        height: auto;
        max-height: 60vh;
        transform: scale(1.4) !important;
        transform-origin: center center;
    }

    .mobile-content {
        top: 58%;               /* ← CAMBIADO: 70% → 58% */
        padding: 0 1rem;
    }

    .mobile-content h1, .mobile-content h2 {
        font-size: clamp(1.5rem, 6.5vw, 2rem);
    }

    .mobile-content p {
        font-size: 0.84rem;
        -webkit-line-clamp: 2;
    }

    .mobile-content .tech-tag {
        padding: 0.35rem 0.8rem;
        font-size: 0.66rem;
    }

    .mobile-content .cta-button {
        padding: 0.75rem 1.4rem;
        font-size: 0.62rem;
    }

    .mobile-nav {
        padding: 0.38rem 0.6rem;
    }

    .mobile-nav .nav-item {
        padding: 0.38rem 0.55rem;
    }

    .mobile-nav .nav-label {
        font-size: 0.48rem;
        max-width: 55px;
    }

    .mobile-nav .nav-dot {
        width: 5px;
        height: 5px;
    }

    .mobile-section .scroll-indicator {
        bottom: 1.2rem;
        right: 1rem;
    }
}

/* ═══════════════════════════════════════════════════
   LANDSCAPE MÓVIL — orientación horizontal
═══════════════════════════════════════════════════ */
@media (max-width: 900px) and (orientation: landscape) {
    .mobile-container {
        left: 35%;
        top: 50%;
        width: auto;
        max-width: 39vw;
        min-width: auto;
    }

    .mobile-frame {
        width: auto;
        max-width: 39vw;
        max-height: 90vh;
        height: auto;
        transform: scale(1.3);
        transform-origin: center center;
    }

    .mobile-content {
        right: 5%;
        left: auto;
        top: 50%;
        width: 48%;
        max-width: none;
        padding: 0 0.8rem;
        transform: translateY(-50%) translateX(30px);
        text-align: left;
    }

    .mobile-content.visible {
        transform: translateY(-50%) translateX(0);
    }

    .mobile-content .content-tag {
        font-size: 0.55rem;
        margin-bottom: 0.4rem;
    }

    .mobile-content h1, .mobile-content h2 {
        font-size: clamp(1.1rem, 3vw, 1.6rem);
        margin-bottom: 0.4rem;
    }

    .mobile-content p {
        font-size: 0.72rem;
        line-height: 1.5;
        margin-bottom: 0.6rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .mobile-content .tags-container {
        justify-content: flex-start;
        gap: 0.4rem;
        margin-bottom: 0.6rem;
    }

    .mobile-content .tech-tag {
        padding: 0.3rem 0.7rem;
        font-size: 0.6rem;
    }

    .mobile-content .cta-button {
        padding: 0.55rem 1.2rem;
        font-size: 0.58rem;
        gap: 0.4rem;
    }

    .mobile-nav {
        left: 1.2rem;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        flex-direction: column;
        gap: 1rem;
        padding: 0;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .mobile-nav .nav-item {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
        padding: 0;
        border-radius: 0;
    }

    .mobile-nav .nav-label {
        font-size: 0.45rem;
        max-width: 0;
        opacity: 0;
    }

    .mobile-nav.visible .nav-label {
        max-width: 0;
        opacity: 0;
    }

    .mobile-nav:hover .nav-label {
        opacity: 1;
        max-width: 120px;
    }

    .mobile-nav .nav-dot {
        width: 6px;
        height: 6px;
    }

    .mobile-section .scroll-indicator {
        bottom: 1rem;
        right: 1.2rem;
        left: auto;
        top: auto;
        transform: none;
        flex-direction: row;
        gap: 0.4rem;
    }

    .mobile-section .scroll-line { display: none; }

    .mobile-section .scroll-text {
        font-size: 0.5rem;
    }
}