/* =============================================================
   IMSO – Folla de estilos didácticos
   CIFP A Carballeira · Módulo IMSO (26/27)
   ============================================================= */

/* -------------------------------------------------------------
   Base
   ------------------------------------------------------------- */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

code,
pre {
    font-family: 'Fira Code', monospace;
}

/* -------------------------------------------------------------
   Panel lateral (índice / TOC)
   ------------------------------------------------------------- */
.sidebar {
    position: sticky;
    top: 2rem;
    height: calc(100vh - 4rem);
    overflow-y: auto;
}

.sidebar-panel {
    background-color: var(--bs-tertiary-bg);
    border-color: var(--bs-border-color) !important;
    color: var(--bs-body-color);
}

.sidebar-panel h6 {
    color: var(--bs-body-color);
}

.sidebar-panel hr {
    border-color: var(--bs-border-color);
    opacity: 1;
}

#toc .nav-link {
    color: var(--bs-secondary-color);
}

#toc .nav-link:hover,
#toc .nav-link:focus {
    color: var(--bs-primary);
}

/* -------------------------------------------------------------
   Bloques por plataforma (Windows / Linux)
   ------------------------------------------------------------- */
.section-platform {
    overflow: hidden;
}

.section-platform.platform-windows {
    border-color: rgba(13, 110, 253, 0.45) !important;
}

.section-platform.platform-linux {
    border-color: rgba(25, 135, 84, 0.45) !important;
}

.section-platform .card-header {
    font-weight: 600;
    border-bottom: none;
}

.platform-windows > .card-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: #fff;
}

.platform-linux > .card-header {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
    color: #fff;
}

.section-card .card-header {
    background-color: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
    font-weight: 600;
}

/* -------------------------------------------------------------
   Comandos en <pre><code>
   ------------------------------------------------------------- */
.cmd-pre {
    margin: 0;
    padding: 0.65rem 0.85rem;
    border-radius: 0.5rem;
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.45;
    overflow-x: auto;
}

.cmd-pre code {
    color: #7dd3fc;
    background: transparent;
    padding: 0;
    font-size: inherit;
}

[data-bs-theme="dark"] .cmd-pre {
    background: #0f172a;
    border-color: #475569;
}

[data-bs-theme="dark"] .cmd-pre code {
    color: #67e8f9;
}

.list-group-item.cmd-item {
    border-left: 3px solid var(--bs-primary);
    background-color: var(--bs-body-bg);
}

.platform-linux .list-group-item.cmd-item {
    border-left-color: var(--bs-success);
}

/* -------------------------------------------------------------
   Exercicios / actividades
   ------------------------------------------------------------- */
.imso-ejercicio {
    border-left: 4px solid var(--bs-primary);
    background: linear-gradient(
        135deg,
        rgba(13, 110, 253, 0.08) 0%,
        var(--bs-body-bg) 45%
    );
}

[data-bs-theme="dark"] .imso-ejercicio {
    background: linear-gradient(
        135deg,
        rgba(13, 110, 253, 0.18) 0%,
        var(--bs-body-bg) 50%
    );
}

.imso-ejercicio-titulo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: 1rem;
    line-height: 1.35;
    border-bottom: 2px solid var(--bs-primary);
    padding-bottom: 0.4rem;
}

/* Número de exercicio sen fondo — só texto en cor primaria */
.imso-ex-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bs-primary);
    border: 2px solid var(--bs-primary);
    border-radius: 50%;
    line-height: 1;
    vertical-align: middle;
    flex-shrink: 0;
}

.imso-grupo-ejercicios {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.imso-enunciado {
    color: var(--bs-body-color);
    border-left: 3px solid var(--bs-border-color);
    padding-left: 0.85rem;
    margin-bottom: 1rem;
}

.imso-paso {
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.imso-paso-texto {
    flex: 1;
    min-width: 0;
}

.imso-indicacions {
    border-left: 3px solid rgba(13, 110, 253, 0.35);
    padding-left: 0.5rem;
}

.imso-indicacion {
    position: relative;
    padding: 0.35rem 0 0.35rem 1.25rem;
    color: var(--bs-secondary-color);
}

.imso-indicacion::before {
    content: "›";
    position: absolute;
    left: 0;
    color: var(--bs-primary);
    font-weight: 700;
}

.imso-subpaso {
    color: var(--bs-body-color);
    border-left: 2px dashed var(--bs-border-color);
    padding-left: 0.75rem;
}

.imso-contexto .imso-dato {
    margin-bottom: 0.35rem;
}

/* -------------------------------------------------------------
   Notas informativas
   ------------------------------------------------------------- */
.imso-nota {
    border-left: 4px solid var(--bs-warning);
}

/* -------------------------------------------------------------
   Bloques de código con botón de copiar
   ------------------------------------------------------------- */
pre.block-code {
    background: #212529;
    color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    position: relative;
}

.btn-copy {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0.5;
}

.btn-copy:hover {
    opacity: 1;
}

/* -------------------------------------------------------------
   Artigo principal
   ------------------------------------------------------------- */
article h1 {
    color: var(--bs-emphasis-color);
}

article .lead {
    color: var(--bs-secondary-color);
}

/* -------------------------------------------------------------
   Impresión
   ------------------------------------------------------------- */
@media print {
    .no-print {
        display: none;
    }
}

/* ── Blockquote personalizado ─────────────────────────────── */
.blockquote-custom {
    border-left: 4px solid var(--bs-secondary);
    background: var(--bs-light);
    color: var(--bs-secondary-emphasis);
    font-style: italic;
}

[data-bs-theme="dark"] .blockquote-custom {
    background: rgba(255,255,255,0.05);
    border-left-color: var(--bs-secondary-border-subtle);
}

/* =============================================================
   SMPP Brand — Navbar & Footer
   ============================================================= */

@font-face {
    font-family: 'Yukarimobile';
    src: url('../fonts/yukarimobil.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ── Navbar ── */
.smpp-navbar {
    background: #1e293b;
    padding: 10px 0;
    border-bottom: 2px solid #38bdf8;
}

.smpp-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.smpp-buho {
    color: #38bdf8;
    width: 38px;
    height: 52px;
    flex-shrink: 0;
}

.smpp-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.smpp-title {
    font-family: 'Yukarimobile', monospace;
    font-size: 22px;
    letter-spacing: 2px;
    color: #38bdf8;
}

.smpp-subtitle {
    font-size: 10px;
    color: #94a3b8;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 3px;
}

.smpp-module {
    color: #cbd5e1;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* ── Footer ── */
.smpp-footer {
    background: #0f172a;
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #1e293b;
    margin-top: 3rem;
    padding-left: 24px;
    padding-right: 24px;
}

.smpp-footer-spacer {
    width: 36px;
    flex-shrink: 0;
}

.smpp-footer-center {
    flex: 1;
    text-align: center;
    color: #C9A84C;
    font-size: 11px;
    line-height: 1.8;
}

.smpp-footer-center span {
    display: block;
    color: #C9A84C;
    font-size: 12px;
    font-weight: 600;
}

.smpp-sauce {
    color: #C9A84C;
    width: 36px;
    height: 40px;
    flex-shrink: 0;
    opacity: 0.85;
}
