/* ===================================
   ESTILOS COMPARTIDOS - SIGEC DOCS
   Sistema de Gestión de Congresos
   =================================== */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-light: #f8fafc;
    --bg-dark: #1e293b;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --sidebar-width: 280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--bg-dark) 0%, #0f172a 100%);
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; color: #fff; }
.sidebar-header p { font-size: 0.85rem; color: #94a3b8; }
.sidebar-nav { padding: 1rem 0; }
.nav-section { margin-bottom: 1.5rem; }
.nav-section-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-left-color: var(--primary-color);
}

.nav-link.active {
    background: rgba(37, 99, 235, 0.2);
    color: #fff;
    border-left-color: var(--primary-color);
}

.nav-link svg {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem 3rem;
    max-width: 1200px;
}

h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.2; }
h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}
h3 { font-size: 1.25rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.1rem; font-weight: 600; margin-top: 1rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; color: var(--text-light); }

.card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
.badge-primary { background: rgba(37, 99, 235, 0.1); color: var(--primary-color); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success-color); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning-color); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger-color); }
.badge-secondary { background: rgba(100, 116, 139, 0.1); color: var(--secondary-color); }

.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

table { width: 100%; border-collapse: collapse; background: #fff; }
thead { background: var(--bg-light); }
th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--text-light);
    border-bottom: 2px solid var(--border-color);
}
td { padding: 1rem; border-bottom: 1px solid var(--border-color); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tr:hover { background: var(--bg-light); }

code {
    font-family: 'Consolas', monospace;
    font-size: 0.875em;
    background: var(--bg-light);
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    color: var(--danger-color);
}

pre {
    background: var(--bg-dark);
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.7;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.code-keyword { color: #c678dd; }
.code-string { color: #98c379; }
.code-number { color: #d19a66; }
.code-comment { color: #5c6370; font-style: italic; }
.code-function { color: #61afef; }
.code-class { color: #e5c07b; }
.code-variable { color: #e06c75; }

.info-box {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid;
}
.info-box-primary { background: rgba(37, 99, 235, 0.05); border-left-color: var(--primary-color); }
.info-box-success { background: rgba(16, 185, 129, 0.05); border-left-color: var(--success-color); }
.info-box-warning { background: rgba(245, 158, 11, 0.05); border-left-color: var(--warning-color); }
.info-box-danger { background: rgba(239, 68, 68, 0.05); border-left-color: var(--danger-color); }

.grid { display: grid; gap: 1.5rem; margin: 1.5rem 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 4rem 3rem;
    border-radius: 1rem;
    margin-bottom: 3rem;
    text-align: center;
}
.hero h1 { color: #fff; font-size: 3rem; margin-bottom: 1rem; }
.hero p { color: rgba(255, 255, 255, 0.9); font-size: 1.25rem; max-width: 600px; margin: 0 auto 2rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}
.btn-primary { background: #fff; color: var(--primary-color); }
.btn-primary:hover { background: var(--bg-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); }

.feature-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--primary-color);
}

.toc {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.toc-title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.toc ul { list-style: none; padding-left: 0; }
.toc li { margin-bottom: 0.5rem; }
.toc a { color: var(--primary-color); text-decoration: none; }
.toc a:hover { color: var(--primary-dark); text-decoration: underline; }

.method-signature {
    background: var(--bg-light);
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    margin: 1rem 0;
    border-left: 4px solid var(--primary-color);
}

.diagram-container {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.breadcrumb { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; font-size: 0.875rem; }
.breadcrumb a { color: var(--primary-color); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--text-light); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-light); }
::-webkit-scrollbar-thumb { background: var(--secondary-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dark); }

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 1.5rem; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .hero { padding: 2rem 1.5rem; }
    .hero h1 { font-size: 2rem; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    table { font-size: 0.875rem; }
    th, td { padding: 0.75rem; }
    pre { padding: 1rem; font-size: 0.8rem; }
}

@media print {
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
    .card { box-shadow: none; border: 1px solid #ddd; }
    pre { background: #f5f5f5; color: #333; }
}
