﻿/* ================================
   GETTING STARTED CSS - PERFECTAMENTE CONSISTENTE
   Compatible con dashboard.css y layout.css
   ================================ */

/* Reset específico para evitar conflictos */
.documentation-container {
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-primary);
    min-height: calc(100vh - 120px);
    width: 100%;
    box-sizing: border-box;
}

/* Contenedor responsive que se adapta al número de columnas */
@media (max-width: 767px) {
    .documentation-container {
        max-width: 600px;
        padding: 1rem;
    }
}

@media (min-width: 768px) and (max-width: 2299px) {
    .documentation-container {
        max-width: 1200px;
    }
}

@media (min-width: 2300px) {
    .documentation-container {
        max-width: 1800px;
    }
}

/* ================================
   HEADER DE DOCUMENTACIÓN - CONSISTENTE
   ================================ */
.docs-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-primary);
}

.docs-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.docs-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ================================
   SECCIONES DE DOCUMENTACIÓN - MEJORADAS
   ================================ */
.docs-section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1rem;
}

    .section-title::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--primary-accent);
        border-radius: 2px;
    }

.section-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ================================
   PASOS DE CONFIGURACIÓN - MEJORADOS COMO DASHBOARD
   ================================ */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

    .step-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--gradient-primary);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s ease;
    }

    .step-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-accent);
    }

        .step-card:hover::before {
            transform: scaleX(1);
        }

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow-accent);
}

.step-content {
    flex: 1;
}

    .step-content h3 {
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.75rem;
    }

    .step-content p {
        color: var(--text-secondary);
        margin-bottom: 1rem;
        line-height: 1.5;
    }

/* Botones de paso - EXACTAMENTE COMO DASHBOARD */
.step-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--primary-accent);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-accent);
}

    .step-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s ease;
    }

    .step-button:hover::before {
        left: 100%;
    }

    .step-button:hover {
        background: var(--primary-dark);
        border-color: var(--primary-dark);
        color: white;
        text-decoration: none;
        transform: translateY(-2px) scale(1.02);
        box-shadow: var(--shadow-accent), var(--shadow-md);
    }

/* ================================
   CAJA DE INFORMACIÓN - MEJORADA
   ================================ */
.info-box {
    background: var(--primary-light);
    border: 1px solid var(--primary-accent);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

    .info-box i {
        color: var(--primary-accent);
        font-size: 1.1rem;
    }

    .info-box span {
        color: var(--text-primary);
        font-size: 0.9rem;
        line-height: 1.4;
    }

/* ================================
   CÓDIGO INLINE - MEJORADO
   ================================ */
code {
    background: var(--bg-secondary);
    color: var(--primary-accent);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.85rem;
    border: 1px solid var(--border-primary);
    font-weight: 600;
}

/* ================================
   GRIDS - EXACTAMENTE COMO DASHBOARD
   ================================ */
.features-grid,
.commands-grid,
.tips-container,
.next-steps,
.support-section {
    display: grid;
    gap: 1.5rem;
    justify-content: center;
}

/* Pantallas pequeñas: 1 columna centrada */
@media (max-width: 767px) {
    .features-grid,
    .commands-grid,
    .tips-container,
    .next-steps,
    .support-section {
        grid-template-columns: 1fr;
        max-width: 512px;
        margin: 0 auto;
    }
}

/* Pantallas medianas: 2 columnas de 512px */
@media (min-width: 768px) and (max-width: 2299px) {
    .features-grid,
    .commands-grid,
    .tips-container,
    .next-steps,
    .support-section {
        grid-template-columns: 512px 512px;
        gap: 1.5rem;
    }
}

/* Pantallas ultra anchas: 3 columnas de 580px */
@media (min-width: 2300px) {
    .features-grid,
    .commands-grid,
    .tips-container,
    .next-steps,
    .support-section {
        grid-template-columns: 580px 580px 580px;
        gap: 2rem;
    }
}

/* ================================
   CARDS - EXACTAMENTE COMO DASHBOARD
   ================================ */
.feature-item,
.command-card,
.tip-card,
.support-card {
    background: var(--card-bg);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

    .feature-item::before,
    .command-card::before,
    .tip-card::before,
    .support-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--gradient-primary);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s ease;
    }

    .feature-item:hover,
    .command-card:hover,
    .tip-card:hover,
    .support-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-accent);
    }

        .feature-item:hover::before,
        .command-card:hover::before,
        .tip-card:hover::before,
        .support-card:hover::before {
            transform: scaleX(1);
        }

/* Feature Items */
.feature-item {
    padding: 1.5rem;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-accent);
}

.feature-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.feature-link {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

    .feature-link:hover {
        color: var(--primary-dark);
        text-decoration: none;
        transform: translateX(2px);
    }

.command-examples {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

    .command-examples code {
        display: block;
        width: fit-content;
    }

/* Command Cards */
.command-header {
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-primary);
    border-radius: 16px 16px 0 0;
}

    .command-header h4 {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-primary);
        margin: 0;
    }

.command-list {
    padding: 1.5rem;
}

.command-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-primary);
}

    .command-item:last-child {
        border-bottom: none;
    }

    .command-item code {
        margin-right: 1rem;
        flex-shrink: 0;
    }

    .command-item span {
        color: var(--text-secondary);
        font-size: 0.9rem;
        text-align: right;
        line-height: 1.4;
    }

/* Tip Cards */
.tip-card {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.tip-success {
    background: linear-gradient(135deg, var(--card-bg), rgba(16, 185, 129, 0.02));
    border-color: var(--success-color);
}

.tip-info {
    background: linear-gradient(135deg, var(--card-bg), rgba(59, 130, 246, 0.02));
    border-color: var(--info-color);
}

.tip-warning {
    background: linear-gradient(135deg, var(--card-bg), rgba(245, 158, 11, 0.02));
    border-color: var(--warning-color);
}

.tip-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.tip-success .tip-icon {
    background: var(--gradient-success);
    color: white;
}

.tip-info .tip-icon {
    background: var(--gradient-info);
    color: white;
}

.tip-warning .tip-icon {
    background: var(--gradient-warning);
    color: white;
}

.tip-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tip-content p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* ================================
   PRÓXIMOS PASOS - MEJORADOS
   ================================ */
.next-step-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

    .next-step-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--gradient-primary);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s ease;
    }

    .next-step-item:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-accent);
    }

        .next-step-item:hover::before {
            transform: scaleX(1);
        }

.step-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary-accent);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.step-info {
    flex: 1;
}

    .step-info h4 {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
    }

    .step-info p {
        color: var(--text-secondary);
        margin-bottom: 0.75rem;
        line-height: 1.5;
        font-size: 0.95rem;
    }

.next-link {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

    .next-link:hover {
        color: var(--primary-dark);
        text-decoration: none;
        transform: translateX(2px);
    }

/* ================================
   SECCIÓN DE SOPORTE - MEJORADA
   ================================ */
.support-card {
    padding: 2rem;
    text-align: center;
}

.support-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    color: var(--primary-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-sm);
}

.support-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.support-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.support-link {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

    .support-link:hover {
        color: var(--primary-dark);
        text-decoration: none;
        transform: translateX(2px);
    }

/* ================================
   ESTILOS HÍBRIDOS ESPECÍFICOS
   ================================ */

/* Indicadores de usuario autenticado */
.auth-enabled {
    border-left: 3px solid var(--success-color) !important;
    background: linear-gradient(135deg, var(--card-bg), rgba(16, 185, 129, 0.02)) !important;
}

    .auth-enabled .step-number {
        background: var(--gradient-success) !important;
        color: white !important;
    }

/* Indicadores para funcionalidades que requieren login */
.requires-auth {
    opacity: 0.85;
    position: relative;
    transition: all 0.2s ease;
}

    .requires-auth::after {
        content: 'Requiere login';
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: var(--warning-color);
        color: white;
        font-size: 0.7rem;
        font-weight: 600;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        z-index: 1;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .requires-auth:hover {
        opacity: 1;
    }

/* Efectos de pulso para botón de login */
.pulse-highlight {
    animation: pulseGlow 2s ease-in-out 2;
    position: relative;
    z-index: 10;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
        transform: scale(1.02);
    }
}

/* ================================
   TABLA DE CONTENIDOS - PERFECTA
   ================================ */
.table-of-contents {
    background: var(--card-bg);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 3rem;
    max-width: 300px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

    .table-of-contents::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--gradient-primary);
    }

    .table-of-contents h4 {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .table-of-contents ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .table-of-contents li {
        margin-bottom: 0.5rem;
    }

    .table-of-contents a {
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.9rem;
        transition: all 0.2s ease;
        padding: 0.25rem 0.5rem;
        display: block;
        border-radius: 6px;
        position: relative;
        padding-left: 1.5rem;
    }

        .table-of-contents a::before {
            content: '▸';
            position: absolute;
            left: 0.5rem;
            color: var(--text-muted);
            transition: all 0.2s ease;
        }

        .table-of-contents a:hover,
        .table-of-contents a.active {
            color: var(--primary-accent);
            background: var(--primary-light);
            text-decoration: none;
        }

            .table-of-contents a:hover::before,
            .table-of-contents a.active::before {
                color: var(--primary-accent);
                transform: rotate(90deg);
            }

/* ================================
   PROGRESO DE LECTURA
   ================================ */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-accent), var(--success-color));
    z-index: 10000;
    transition: width 0.1s ease;
}

/* ================================
   ANIMACIONES
   ================================ */
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hover-elevated {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--primary-accent) !important;
}

.hover-scale {
    transform: scale(1.02);
}

/* ================================
   RESPONSIVE DESIGN ESPECÍFICO
   ================================ */
@media (max-width: 768px) {
    .documentation-container {
        padding: 1.5rem;
    }

    .docs-title {
        font-size: 2rem;
    }

    .docs-subtitle {
        font-size: 1.1rem;
    }

    .step-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .command-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

        .command-item span {
            text-align: left;
        }

    .table-of-contents {
        max-width: 100%;
        margin-bottom: 2rem;
    }

    .requires-auth::after {
        position: static;
        display: block;
        text-align: center;
        margin-top: 0.5rem;
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    .documentation-container {
        padding: 1rem;
    }

    .docs-header {
        margin-bottom: 2rem;
    }

    .docs-section {
        margin-bottom: 3rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .step-card,
    .feature-item,
    .support-card {
        padding: 1.25rem;
    }
}

/* ================================
   FIXES ESPECÍFICOS PARA INTEGRACIÓN
   ================================ */

/* Asegurar que no haya conflictos con el container principal */
.container-fluid {
    padding: 0 !important;
    margin: 0 !important;
}

/* Compatibilidad perfecta con el sistema de variables */
.documentation-container {
    color: var(--text-primary);
    background: transparent;
}

    /* Asegurar que los elementos no hereden estilos no deseados */
    .documentation-container * {
        box-sizing: border-box;
    }

/* Override para sidebar en documentación */
.sidebar .section-title {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}