/* ========================================
   DOCUMENTATION.CSS
   Estilos para la pagina de documentacion tecnica
   ======================================== */

/* RESET Y CONFIGURACION BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* SCROLLBAR PERSONALIZADA */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4f7cff, #8b5cf6);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #3b6de0, #7a4fe0);
}

/* SELECCION DE TEXTO */
::selection {
    background: #4f7cff;
    color: white;
}

::-moz-selection {
    background: #4f7cff;
    color: white;
}

/* HEADER Y NAVEGACION */
header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(79, 124, 255, 0.3);
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #4f7cff, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-menu a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(135deg, #4f7cff, #8b5cf6);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: #4f7cff;
}

.nav-menu a:hover::after {
    width: 100%;
}

.lang-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-self: end;
}

.lang-label {
    font-size: 0.9rem;
    color: #aaa;
}

.lang-btn {
    background: transparent;
    border: 1px solid #4f7cff;
    color: #4f7cff;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.8rem;
}

.lang-btn.active {
    background: #4f7cff;
    color: white;
}

.lang-btn:hover {
    background: #4f7cff;
    color: white;
    transform: scale(1.05);
}

/* HERO */
.doc-hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e);
    border-bottom: 1px solid rgba(79, 124, 255, 0.1);
}

.doc-hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #4f7cff, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.doc-hero p {
    max-width: 700px;
    margin: 0 auto;
    color: #ccc;
    font-size: 1.1rem;
}

.doc-hero .doc-badge {
    display: inline-block;
    background: rgba(79, 124, 255, 0.15);
    border: 1px solid rgba(79, 124, 255, 0.3);
    padding: 0.3rem 1.2rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #4f7cff;
    margin-top: 1rem;
}

/* INDICE */
.doc-index {
    padding: 2rem 5%;
    background: rgba(15, 15, 26, 0.5);
    border-bottom: 1px solid rgba(79, 124, 255, 0.1);
}

.doc-index h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff, #4f7cff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.doc-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.doc-index-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(79, 124, 255, 0.1);
    text-decoration: none;
    color: #ccc;
}

.doc-index-item:hover {
    background: rgba(79, 124, 255, 0.1);
    border-color: #4f7cff;
    transform: translateY(-3px);
    color: #4f7cff;
}

.doc-index-item .icon {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
    font-weight: bold;
}

/* CONTENIDO PRINCIPAL */
.doc-content {
    padding: 3rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.doc-section {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(79, 124, 255, 0.1);
}

.doc-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.doc-section h2 {
    text-align: left;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #4f7cff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.doc-section .section-subtitle {
    color: #888;
    font-size: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(79, 124, 255, 0.1);
}

.doc-section h3 {
    color: #4f7cff;
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
}

.doc-section h4 {
    color: #aaa;
    font-size: 1.1rem;
    margin: 1.5rem 0 0.8rem;
}

.doc-section p {
    color: #ccc;
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.8;
}

.doc-section ul,
.doc-section ol {
    color: #ccc;
    margin: 0 0 1.5rem 1.5rem;
    line-height: 1.8;
}

.doc-section ul li,
.doc-section ol li {
    margin-bottom: 0.5rem;
}

.doc-section ul li strong,
.doc-section ol li strong {
    color: #4f7cff;
}

/* TABLAS */
.doc-table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    overflow: hidden;
}

.doc-table thead {
    background: linear-gradient(135deg, rgba(79, 124, 255, 0.2), rgba(139, 92, 246, 0.2));
}

.doc-table th {
    padding: 1rem 1.2rem;
    text-align: left;
    color: #4f7cff;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 2px solid rgba(79, 124, 255, 0.3);
}

.doc-table td {
    padding: 0.8rem 1.2rem;
    color: #ccc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.doc-table tr:hover td {
    background: rgba(79, 124, 255, 0.05);
}

.doc-table .highlight {
    color: #4f7cff;
    font-weight: 500;
}

.doc-table code {
    background: rgba(79, 124, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #4f7cff;
}

/* NOTAS */
.doc-note {
    background: rgba(79, 124, 255, 0.08);
    border-left: 4px solid #4f7cff;
    padding: 1.2rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 10px 10px 0;
}

.doc-note strong {
    color: #4f7cff;
}

.doc-note p {
    margin-bottom: 0;
    color: #ccc;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 2.5rem 5%;
    background: #0a0a0a;
    border-top: 1px solid rgba(79, 124, 255, 0.15);
    color: #888;
    font-size: 0.9rem;
    margin-top: 2rem;
}

footer p {
    margin-bottom: 0.5rem;
}

footer strong {
    color: #4f7cff;
}

/* ANIMACIONES */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.doc-section {
    animation: fadeInUp 0.6s ease forwards;
}

.doc-section:nth-child(2) {
    animation-delay: 0.1s;
}

.doc-section:nth-child(3) {
    animation-delay: 0.2s;
}

.doc-section:nth-child(4) {
    animation-delay: 0.3s;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .doc-hero h1 {
        font-size: 2.5rem;
    }
    
    .doc-section h2 {
        font-size: 1.8rem;
    }
    
    .doc-index-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    header {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem 3%;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .nav-menu {
        gap: 1rem;
        justify-content: center;
    }
    
    .nav-menu a {
        font-size: 0.85rem;
    }
    
    .lang-selector {
        width: 100%;
        justify-content: center;
        justify-self: center;
    }
    
    .doc-hero {
        padding: 3rem 1rem 2rem;
    }
    
    .doc-hero h1 {
        font-size: 2rem;
    }
    
    .doc-hero p {
        font-size: 1rem;
    }
    
    .doc-content {
        padding: 2rem 3%;
    }
    
    .doc-section {
        margin-bottom: 2.5rem;
        padding-bottom: 2rem;
    }
    
    .doc-section h2 {
        font-size: 1.5rem;
    }
    
    .doc-section h3 {
        font-size: 1.2rem;
    }
    
    .doc-table th,
    .doc-table td {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .doc-index-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .doc-index-item {
        padding: 0.8rem;
        font-size: 0.85rem;
    }
    
    .doc-index-item .icon {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .doc-hero h1 {
        font-size: 1.6rem;
    }
    
    .doc-section h2 {
        font-size: 1.3rem;
    }
    
    .doc-section ul,
    .doc-section ol {
        margin-left: 1rem;
    }
    
    .doc-table th,
    .doc-table td {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .nav-menu a {
        font-size: 0.7rem;
    }
    
    .doc-note {
        padding: 1rem;
    }
}

/* UTILITY CLASSES */
.text-center {
    text-align: center;
}

.text-gradient {
    background: linear-gradient(135deg, #4f7cff, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* IMPRESION */
@media print {
    header,
    .lang-selector,
    .doc-index {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .doc-section {
        page-break-inside: avoid;
        border-bottom-color: #ddd;
    }
    
    .doc-section h2 {
        background: none !important;
        color: #4f7cff !important;
        -webkit-text-fill-color: #4f7cff !important;
    }
    
    .doc-table {
        background: white;
    }
    
    .doc-table th {
        background: #f0f0f0;
        color: #333;
        border-bottom-color: #ddd;
    }
    
    .doc-table td {
        color: #333;
        border-bottom-color: #eee;
    }
    
    .doc-note {
        background: #f0f4ff;
        border-left-color: #4f7cff;
    }
    
    footer {
        color: #666;
        border-top-color: #ddd;
    }
}