/* ================================================================
   INVICTURI INDEX — CSS
   Estructura: Mobile-first → tablet 600px → desktop 900px
   ================================================================ */

/* ----------------------------------------------------------------
   1. MOBILE NAV (drawer izquierdo)
   ---------------------------------------------------------------- */
.mobile-nav {
    position: fixed;
    top: 0; left: 0;
    width: 280px; height: 100vh;
    background-color: var(--bg-black);
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 2001;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0,0,0,.5);
}
.mobile-nav.active { transform: translateX(0); }

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.close-menu-btn { color: var(--text-white); font-size: 24px; }

.mobile-nav-link {
    display: block;
    padding: 12px 0;
    color: var(--text-white);
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

/* ----------------------------------------------------------------
   2. HERO — MOBILE
   ---------------------------------------------------------------- */
.hero-section {
    position: relative;
    height: 100vh; width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,.45), transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
}

.hero-title {
    font-size: 26px; font-weight: 900;
    line-height: 1.2; margin-bottom: 14px;
}

.hero-subtitle {
    font-size: 14px; color: rgba(255,255,255,.78);
    line-height: 1.6; margin-bottom: 28px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.hero-btn-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.logo-btn {
    width: 84px; height: 84px;
    background-color: rgba(20,22,26,.08);
    border: 1px solid rgba(0,102,255,.15);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(0,102,255,.13);
    transition: transform .2s ease, box-shadow .2s ease;
    cursor: pointer;
}
.logo-btn:hover { transform: scale(1.06); box-shadow: 0 12px 30px rgba(0,102,255,.2); }
.logo-btn img   { width: 100%; height: 100%; object-fit: contain; }

.hero-btn-wrapper span { font-weight: 700; font-size: 14px; }

/* Imágenes laterales: ocultas en móvil */
.hero-side-img { display: none; }

/* ----------------------------------------------------------------
   3. ENCODER — MOBILE
   ---------------------------------------------------------------- */
.encoder-section .section-title  { margin-bottom: 20px; }
.encoder-section .product-description { margin-bottom: 24px; }

.product-description { font-size: 14px; margin-bottom: 24px; }
.product-description p { margin-bottom: 10px; color: rgba(255,255,255,.75); }

.product-layout { display: flex; flex-direction: column; align-items: center; gap: 20px; }

.product-image-right img { width: 90%; max-width: 380px; height: auto; }

.product-cta { margin: 8px 0; }

/* Features grid: oculto en móvil (.desktop-only controlado por common.css) */
.features-grid { display: none; }

/* ----------------------------------------------------------------
   4. TRAINING — MOBILE
   ---------------------------------------------------------------- */
.training-main-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    text-align: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.training-info-block  { width: 100%; }
.training-features-block { width: 100%; }

.training-info-block .section-title,
.training-features-block .section-title { text-align: center; }

.training-info-block .product-description p { text-align: center; }

.feature-list {
    display: flex; flex-direction: column;
    gap: 12px; margin-bottom: 20px;
}
.feature-list-item {
    display: flex; align-items: center;
    justify-content: center; gap: 12px;
    font-size: 15px; color: var(--text-white);
}
.feature-list-item i { color: var(--primary-blue); font-size: 16px; }

.training-image-mobile { display: flex; justify-content: center; width: 100%; }
.training-image-mobile img { width: 90%; max-width: 420px; height: auto; }

/* ----------------------------------------------------------------
   5. USOS Y FAQ — MOBILE
   ---------------------------------------------------------------- */
#usos {
    align-items: flex-start;
    padding-top: 80px;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 28px;
}

.use-case-card {
    background-color: var(--bg-black);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.use-case-card i    { color: var(--primary-blue); font-size: 20px; margin-top: 2px; flex-shrink: 0; }
.use-case-card h3   { font-size: 15px; margin-bottom: 4px; }
.use-case-card p    { font-size: 13px; }

.faq-container { max-width: 860px; margin: 0 auto; }

.faq-item { border-bottom: 1px solid rgba(255,255,255,.1); }

.faq-question {
    width: 100%; padding: 16px 0;
    text-align: left;
    color: var(--text-white); font-weight: 600;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 14px; gap: 12px;
}
.faq-question i { flex-shrink: 0; transition: transform .3s ease; }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-answer p { padding-bottom: 16px; font-size: 14px; color: rgba(255,255,255,.7); line-height: 1.6; }

.faq-item.active .faq-answer  { max-height: 300px; }
.faq-item.active .faq-question i { transform: rotate(180deg); }

/* ----------------------------------------------------------------
   6. NOSOTROS Y CONTACTO — MOBILE
   ---------------------------------------------------------------- */
.about-box {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.65;
    font-size: 14px;
    color: rgba(255,255,255,.75);
}

.subsection-title {
    text-align: center;
    font-size: 18px;
    color: var(--text-gray);
    font-weight: 700;
    margin-bottom: 16px;
}

.vision-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.vision-card {
    background-color: var(--bg-black);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255,255,255,.75);
}
.vision-card h4 { color: var(--primary-blue); margin-bottom: 8px; font-size: 16px; }

.contact-box {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.contact-subtitle { font-size: 14px; margin-bottom: 10px; color: rgba(255,255,255,.65); }
.contact-text { font-size: 13px; margin-bottom: 24px; color: rgba(255,255,255,.65); line-height: 1.6; }

.contact-buttons {
    display: flex; flex-wrap: wrap;
    justify-content: center; gap: 14px;
    margin-bottom: 20px;
}

.contact-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: 12px;
    color: #fff; font-weight: 700;
    width: 100%; max-width: 220px;
    box-shadow: 0 6px 12px rgba(0,0,0,.2);
    text-decoration: none;
    transition: transform .2s, filter .2s;
}
.contact-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.contact-btn.whatsapp  { background-color: #25D366; }
.contact-btn.instagram { background-color: #E1306C; }

.terms-link {
    color: var(--primary-blue);
    text-decoration: underline;
    font-size: 13px;
}

/* ================================================================
   7. TABLET 600-899px
   ================================================================ */
@media (min-width: 600px) {
    .logo-btn { width: 100px; height: 100px; }
    .use-cases-grid { grid-template-columns: repeat(2,1fr); }
}

/* ================================================================
   8. DESKTOP >= 900px
   ================================================================ */
@media (min-width: 900px) {

    /* Hero */
    .hero-title    { font-size: 48px; }
    .hero-subtitle { font-size: 18px; }

    .hero-side-img {
        display: flex;
        position: absolute;
        top: 50%;
        width: 55%;
        align-items: center;
        pointer-events: none;
        z-index: 0;
        opacity: 0;
        transition: opacity .4s ease, transform .5s cubic-bezier(.2,.8,.2,1);
    }
    .hero-side-img.left-side {
        left: -30%;
        justify-content: flex-start;
        transform: translateY(-50%) translateX(-30px);
    }
    .hero-side-img.right-side {
        right: -30%;
        justify-content: flex-end;
        transform: translateY(-50%) translateX(30px);
    }
    .hero-side-img.active { opacity: 1; }
    .hero-side-img.left-side.active  { transform: translateY(-50%) translateX(0); left: -12%; }
    .hero-side-img.right-side.active { transform: translateY(-50%) translateX(0); right: -12%; }
    .hero-side-img img {
        max-width: 100%; max-height: 90vh;
        object-fit: contain;
        filter: drop-shadow(0 15px 40px rgba(0,0,0,.6));
    }

    /* Encoder */
    .encoder-section .product-content { padding-top: 10px; transform: translateY(-5vh); }
    .encoder-section .product-description { margin-bottom: 30px; }

    /* Limitar ancho del texto intro para que no se extienda full-width */
    .encoder-section .section-title,
    .encoder-section .product-description {
        max-width: 680px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .product-description { font-size: 16px; }
    .product-description p { font-size: 16px; }

    .product-layout {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 48px;
        margin-top: 20px;
    }

    .product-image-left,
    .product-image-right { flex: 0 0 auto; display: flex; justify-content: center; align-items: center; }
    .product-image-left img  { max-height: min(360px, 42vh); width: auto; transition: transform .3s; }
    .product-image-right img { max-height: min(440px, 50vh); width: auto; transition: transform .3s; }
    .product-image-left img:hover,
    .product-image-right img:hover { transform: scale(1.04); }
    .product-cta { flex: 0 0 auto; align-self: center; }

    .features-grid {
        display: flex;
        justify-content: center;
        gap: 20px; margin-top: 48px; flex-wrap: wrap;
    }
    .feature-item {
        background-color: var(--bg-black);
        border: 1px solid var(--border-color);
        border-radius: 12px; padding: 8px 16px;
        display: flex; align-items: center; gap: 8px;
        font-size: 14px;
    }
    .feature-item i { color: var(--primary-blue); }

    /* Training */
    .training-main-layout {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        min-height: calc(100vh - 64px);
        gap: 48px;
        padding: 20px 60px;
        text-align: left;
        transform: translateY(-10vh);
    }

    .training-col-left {
        flex: 0 0 50%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .training-col-left img {
        width: auto;
        height: 75vh;
        max-height: 680px;
        object-fit: contain;
    }

    .training-col-right {
        flex: 0 0 42%;
        display: flex;
        flex-direction: column;
        gap: 40px;
    }

    .training-info-block  { text-align: left; }
    .training-features-block { text-align: left; display: flex; flex-direction: column; align-items: flex-start; }

    .training-info-block .section-title,
    .training-features-block .section-title { text-align: left; }

    .training-info-block .product-description p { text-align: left; font-size: 17px; }

    .feature-list { align-items: flex-start; }
    .feature-list-item { justify-content: flex-start; font-size: 16px; }
    .feature-list-item i { font-size: 18px; }

    /* Use cases grid 4 columnas */
    .use-cases-grid { grid-template-columns: repeat(4,1fr); }
    .use-case-card  { flex-direction: column; }

    /* About: cards en fila */
    .vision-cards { flex-direction: row; }
    .vision-card  { flex: 1; }
    .about-box    { font-size: 15px; }
}
