/* ==========================================================================
   manual.css - Estilos específicos del Manual de Usuario inubbe
   ========================================================================== */

/* Layout del manual */
.manual-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bg-dark);
    padding-left: 300px; /* Espacio para la sidebar fija */
    justify-content: center; /* Centra el contenido en el espacio restante */
}

/* Sidebar del manual */
.manual-sidebar {
    width: 300px;
    background: linear-gradient(180deg, #054A59 0%, #030712 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.manual-sidebar::-webkit-scrollbar { width: 6px; }
.manual-sidebar::-webkit-scrollbar-track { background: transparent; }
.manual-sidebar::-webkit-scrollbar-thumb { background: var(--turquoise); border-radius: 3px; }

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
}

.sidebar-header-2{
    padding-left: 0.3rem;
}

.sidebar-logo {
    height: 70px;
    filter: drop-shadow(0 0 8px rgba(5, 17, 242, 0.4));
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, var(--mint));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-subtitle {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navegación del sidebar */
.sidebar-nav {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: stretch;
}

.nav-section {
    /* display: flex;
    flex-direction: column; */
}

.section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    user-select: none;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    font-weight: 700;
    letter-spacing: 1px;
}

.section-toggle:hover {
    background: rgba(255, 255, 255, 0.04);
}

.section-toggle i {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    transition: transform 0.2s;
}

.section-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.section-content.open {
    max-height: 500px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.45rem 0.75rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: white;
}

.nav-link.active {
    background: linear-gradient(90deg, var(--primary) 0%, #23648C 100%);
    color: white;
    font-weight: 600;
}

.nav-link i {
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
    color: #f59e0b;
}

.nav-link.active i { color: white; }

.owner-section .nav-link i { color: var(--mint); }

/* Main content */
.manual-content {
    flex: 1;
    padding: 3rem 4rem;
    max-width: 1000px;
    width: 100%;
    box-sizing: border-box;
}

/* Page header */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.page-header .breadcrumb {
    color: var(--text-gray);
    font-size: 0.85rem;
}

.page-header .breadcrumb a {
    color: var(--mint);
    text-decoration: none;
}

.page-header .breadcrumb a:hover { text-decoration: underline; }

/* Descripción del módulo */
.module-description {
    background: rgba(5, 74, 89, 0.08);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.module-description p {
    color: var(--text-gray);
    margin: 0;
}

/* Pasos numerados */
.steps-container {
    margin: 2rem 0;
}

.step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 16px;
    padding: 1.25rem;
    transition: all 0.3s;
}

.step:hover {
    border-color: var(--border-glass-hover);
    background: rgba(5, 74, 89, 0.05);
}

.step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--mint), var(--turquoise));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--bg-dark);
}

.step-content {
    flex: 1;
}

.step-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.step-content p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin: 0;
}

.step-content ul {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.step-content li { margin-bottom: 0.3rem; }

/* Imagen de screenshot */
.screenshot-container {
    margin: 1.5rem 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    background: rgba(3, 12, 26, 0.4);
}

.screenshot-container img {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-caption {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: var(--text-gray);
    background: rgba(3, 12, 26, 0.6);
    border-top: 1px solid rgba(255,255,255,0.04);
}

/* Mockup visual */
.mockup-visual {
    margin: 1.5rem 0;
    border-radius: 16px;
    border: 1px solid var(--border-glass);
    background: rgba(3, 12, 26, 0.4);
    padding: 1.5rem;
}

.mockup-visual .mockup-label {
    font-size: 0.7rem;
    color: var(--text-gray);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* Info cards */
.info-card {
    background: rgba(5, 74, 89, 0.08);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.25rem;
    margin: 1rem 0;
}

.info-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card h4 i {
    font-size: 1rem;
}

.info-card p, .info-card li {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin: 0;
}

.info-card ul {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
    color: var(--text-gray);
    font-size: 0.85rem;
}

.info-card.tip {
    border-color: rgba(44, 191, 164, 0.3);
    background: rgba(44, 191, 164, 0.05);
}

.info-card.tip h4 { color: var(--mint); }

.info-card.warning {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.05);
}

.info-card.warning h4 { color: #f59e0b; }

/* Permisos table */
.permissions-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.permissions-table th,
.permissions-table td {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 0.85rem;
}

.permissions-table th {
    background: rgba(5, 74, 89, 0.15);
    color: var(--mint);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.permissions-table td {
    color: var(--text-gray);
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.badge-danger { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.badge-info { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }

/* Galería de screenshots en portada */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    transition: all 0.3s;
    background: rgba(3, 12, 26, 0.4);
}

.gallery-item:hover {
    border-color: var(--mint);
    transform: translateY(-2px);
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.gallery-item .gallery-info {
    padding: 0.75rem;
}

.gallery-item .gallery-info h5 {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 0.3rem;
}

.gallery-item .gallery-info p {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin: 0;
}

/* Tabla de contenido en portada */
.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.toc-card {
    background: rgba(5, 74, 89, 0.08);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s;
    text-decoration: none;
    color: white;
}

.toc-card:hover {
    border-color: var(--mint);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.toc-card .toc-icon {
    width: 48px;
    height: 48px;
    background: rgba(44, 191, 164, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--mint);
    margin-bottom: 1rem;
}

.toc-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.toc-card p {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin: 0;
}

/* Responsive */
@media (max-width: 1023px) {
    .manual-wrapper {
        flex-direction: column;
        padding-left: 0; /* Quitar offset de sidebar en móvil */
        justify-content: flex-start;
    }

    .manual-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        max-height: 80px;
        overflow: hidden;
    }

    .manual-sidebar.open {
        max-height: 100vh;
    }

    .manual-content {
        margin-left: 0;
        margin-right: 0;
        padding: 1.5rem;
        max-width: 100%;
    }

    .toc-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .step {
        flex-direction: column;
    }
}
