@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #ffffff;
    --bg-sidebar: #f8fafc; /* Gris-azul muy limpio (Slate 50) */
    --text-primary: #0f172a; /* Slate 900 (Formal y de alto contraste) */
    --text-secondary: #475569; /* Slate 600 */
    --text-muted: #64748b; /* Slate 500 */
    --accent: #107c41; /* Verde oficial de Microsoft Excel */
    --accent-soft: rgba(16, 124, 65, 0.06); /* Fondo activo sutil */
    --border: #e2e8f0; /* Bordes más finos (Slate 200) */
    --sidebar-width: 240px; /* Más compacto */
    --transition: all 0.15s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Sidebar (Navegación Lateral) */
aside {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 1.8rem 1.25rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--accent);
    margin-bottom: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    letter-spacing: -0.01em;
}

nav ul {
    list-style: none;
}

nav li {
    margin-bottom: 0.25rem;
}

nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

nav a:hover {
    background-color: #f1f5f9; /* Slate 100 */
    color: var(--text-primary);
}

nav a.active {
    background-color: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

/* Área de Contenido Principal */
main {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2.5rem 6%;
    max-width: 1100px;
}

header {
    margin-bottom: 1.8rem;
}

header h1 {
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Contenedores de Listas (Compacto) */
.content-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.guide-item {
    padding: 0.85rem 1.25rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.guide-item:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.guide-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.guide-info p {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.guide-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.2rem 0.45rem;
    background-color: #f1f5f9;
    color: var(--text-muted);
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.read-link {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--accent);
}

/* Cuadrícula de Infografías (Compacto) */
.infografia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.infografia-card {
    background: var(--bg-main);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.infografia-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.infografia-img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--border);
}

.infografia-info {
    padding: 0.75rem;
}

.infografia-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.infografia-info p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Visualizador de Modal (Elegante & Minimalista) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.85); /* Slate 900 con transparencia */
    backdrop-filter: blur(6px);
    flex-direction: column;
    padding: 1rem;
}

.modal-body {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    cursor: grab;
    padding-top: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.modal-body:active {
    cursor: grabbing;
}

.modal-content {
    width: 95%;
    max-width: 1100px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    user-select: none;
    pointer-events: none;
}

.modal-actions {
    padding: 1rem 0;
    display: flex;
    gap: 0.75rem;
    width: 100%;
    justify-content: center;
}

.modal-btn {
    padding: 0.7rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
    min-width: 140px;
}

.btn-download {
    background-color: var(--accent);
    color: white;
}

.btn-download:hover {
    background-color: #0d5f30;
}

.btn-close {
    background-color: #334155; /* Slate 700 */
    color: white;
}

.btn-close:hover {
    background-color: #475569;
}

/* Pie de Página */
footer {
    margin-top: 3.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Estilos de Atajos (Compactos) */
.shortcut-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem 1.25rem;
    margin: 1rem 0;
    align-items: center;
}

kbd {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-bottom: 2px solid #94a3b8;
    border-radius: 4px;
    padding: 0.2rem 0.45rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.8rem;
    white-space: nowrap;
}

.shortcut-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.shortcut-category {
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--accent);
    font-size: 1.15rem;
    font-weight: 600;
}

.tip-box-mini {
    background: #f0fdf4;
    padding: 0.9rem 1.25rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    margin: 1.25rem 0;
    font-size: 0.88rem;
    color: #166534;
}

/* Estilos de Evaluaciones */
.darker-option {
    border: 1px solid #cbd5e1 !important;
    color: var(--text-primary) !important;
    background: #ffffff;
}

.darker-option:hover {
    background: #f8fafc !important;
    border-color: var(--accent) !important;
}

.darker-option span {
    background: #f1f5f9;
    color: var(--text-secondary);
    border: 1px solid #e2e8f0;
}

/* Buscadores */
.search-container {
    margin-bottom: 1.8rem;
}

.search-input {
    width: 100%;
    max-width: 450px;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-size: 0.92rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

/* Ajustes de Responsividad */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    aside {
        width: 100%;
        height: auto;
        position: sticky;
        top: 0;
        z-index: 100;
        padding: 0.8rem 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border);
        background-color: rgba(248, 250, 252, 0.96);
        backdrop-filter: blur(8px);
    }

    .brand {
        margin-bottom: 0.8rem;
        font-size: 0.95rem;
    }

    nav ul {
        display: flex;
        overflow-x: auto;
        gap: 0.4rem;
        padding-bottom: 0.2rem;
        scrollbar-width: none;
    }

    nav ul::-webkit-scrollbar {
        display: none;
    }

    nav li {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    nav a {
        padding: 0.4rem 0.65rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    main {
        margin-left: 0;
        padding: 1.5rem 1rem;
    }

    header {
        margin-bottom: 1.25rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    header p {
        font-size: 0.88rem;
    }

    .guide-item {
        padding: 0.85rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    footer {
        margin-top: 2rem;
        padding-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.35rem;
    }
    
    .infografia-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
