/* ==========================================================================
   VARIABLES DE TEMA (ESTILO NOTION)
   ========================================================================== */

/* TEMA CLARO (Por defecto) */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f7f7f5;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f1ef;
    
    --text-primary: #37352f;
    --text-secondary: #787774;
    --text-muted: #9e9c97;
    
    /* Azul clásico tipo enlace/etiqueta de Notion */
    --accent: #2383e2;
    --accent-glow: rgba(35, 131, 226, 0.15);
    --accent-2: #0f6cbd;
    --danger: #eb5757;
    
    --border: #e9e9e7;
    --border-light: #f2f2f2;
    
    --radius-sm: 4px;
    --radius: 6px;
    --radius-lg: 8px;
    
    /* Sombras muy sutiles, casi planas */
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 0 2px var(--accent-glow);
    
    --transition: 0.2s ease;
    --max-width: 1000px;
    --header-height: 70px;
}

/* TEMA OSCURO AUTOMÁTICO (Se activa según el sistema operativo del usuario) */
/* TEMA OSCURO (Controlado manualmente) */
html[data-theme="dark"] {
    --bg-primary: #191919;
    --bg-secondary: #202020;
    --bg-card: #191919;
    --bg-card-hover: #252525;

    --text-primary: rgba(255, 255, 255, 0.85);
    --text-secondary: rgba(255, 255, 255, 0.55);
    --text-muted: rgba(255, 255, 255, 0.35);

    --accent: #2eaadc;
    --accent-glow: rgba(46, 170, 220, 0.15);
    --accent-2: #1e8bbd;
    --danger: #ff7369;

    --border: #373737;
    --border-light: #2d2d2d;

    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ESTILOS DEL INTERRUPTOR SOL/LUNA */
.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50px;
    width: 54px;
    height: 28px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    transition: background var(--transition);
    margin-left: 1rem;
}

.theme-toggle i { font-size: 0.75rem; z-index: 1; transition: color 0.3s; }
.theme-toggle .fa-moon { color: #d8dee9; }
.theme-toggle .fa-sun { color: #f59e0b; }

.theme-toggle-ball {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: var(--bg-primary);
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    z-index: 2;
}

html[data-theme="dark"] .theme-toggle-ball {
    transform: translateX(26px);
    background: #2eaadc;
}
html[data-theme="dark"] .fa-moon { color: #fff; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Transición suave al cambiar entre modo claro/oscuro */
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   SISTEMA UNIFICADO DE BOTONES (DISEÑO PLANO MINIMALISTA)
   ========================================================================== */

.btn-header, .btn-header-outline, .btn-logout,
.btn-primary, .btn-outline, .btn-sm,
.btn-ide-primary, .btn-ide-secondary, 
.btn-tiny, .btn-tiny-danger, 
.btn-copy-citation, .btn-ide-danger-icon {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 0.5rem; text-align: center; text-decoration: none;
    font-family: inherit; white-space: nowrap; cursor: pointer;
    transition: all var(--transition); outline: none;
    border: 1px solid transparent; border-radius: var(--radius-sm);
}

.btn-primary, .btn-outline { padding: 0.6rem 1.4rem; font-weight: 500; font-size: 0.95rem; }
.btn-header, .btn-header-outline, .btn-logout, .btn-sm, .btn-ide-primary, .btn-ide-secondary { padding: 0.4rem 1rem; font-weight: 500; font-size: 0.85rem; }
.btn-tiny, .btn-tiny-danger, .btn-copy-citation { padding: 0.3rem 0.6rem; font-weight: 500; font-size: 0.8rem; }
.btn-ide-danger-icon { padding: 0.4rem; font-size: 1rem; }

/* Botones principales planos */
.btn-primary { background: var(--text-primary); color: var(--bg-primary); }
.btn-primary:hover { opacity: 0.85; }

.btn-outline { background: transparent; border-color: var(--border); color: var(--text-primary); }
.btn-outline:hover { background: var(--bg-secondary); }

.btn-header { background: var(--text-primary); color: var(--bg-primary); }
.btn-header:hover { opacity: 0.85; }

.btn-header-outline { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn-header-outline:hover { background: var(--bg-secondary); color: var(--text-primary); }

.btn-logout { background: transparent; color: var(--danger); }
.btn-logout:hover { background: rgba(235, 87, 87, 0.1); }

.btn-sm { background: var(--text-primary); color: var(--bg-primary); }
.btn-sm:hover { opacity: 0.85; }

.btn-ide-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-ide-primary:hover { background: var(--accent-2); }

.btn-ide-secondary { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn-ide-secondary:hover { background: var(--bg-secondary); color: var(--text-primary); }

.btn-tiny { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn-tiny:hover { background: var(--bg-secondary); color: var(--text-primary); }

.btn-tiny-danger { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn-tiny-danger:hover { color: var(--danger); background: rgba(235, 87, 87, 0.1); border-color: transparent; }

.btn-copy-citation { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn-copy-citation:hover { background: var(--bg-secondary); color: var(--text-primary); }

.btn-ide-danger-icon { background: transparent; color: var(--text-muted); }
.btn-ide-danger-icon:hover { color: var(--danger); background: rgba(235, 87, 87, 0.1); }

form.button_to, .admin-actions form, .ide-actions-bar form, .media-list-actions form, .tree-post form { display: contents; }
.admin-actions { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.ide-actions-bar { display: flex; gap: 0.5rem; padding-bottom: 0.5rem; align-items: center; flex-wrap: wrap; }

/* ==========================================================================
   ESTRUCTURA GENERAL (HEADER, HERO, ETC)
   ========================================================================== */

/* HEADER */
header {
    position: sticky; top: 0; z-index: 100;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
    display: flex; align-items: center;
}
.header-inner {
    width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.8rem;
    display: flex; align-items: center; justify-content: space-between;
}
.logo {
    font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 1.2rem;
    color: var(--text-primary); text-decoration: none; letter-spacing: -0.5px;
    display: flex; align-items: center; gap: 0.45rem;
}
.logo i { color: var(--text-primary); font-size: 1.2rem; }
nav { display: flex; gap: 1.5rem; align-items: center; }
nav a {
    text-decoration: none; color: var(--text-secondary); font-weight: 500; font-size: 0.95rem;
    transition: color var(--transition); padding: 0.3rem 0.5rem; border-radius: var(--radius-sm);
}
nav a:hover, nav a.active { color: var(--text-primary); background: var(--bg-secondary); }
.admin-menu { display: flex; align-items: center; gap: 0.5rem; }

/* FLASH */
.flash {
    max-width: var(--max-width); margin: 1rem auto 0; padding: 0.6rem 1rem; border-radius: var(--radius-sm);
    font-size: 0.9rem; display: flex; align-items: center; gap: 0.6rem;
}
.flash-notice { background: rgba(52, 211, 153, 0.1); color: #10b981; }
.flash-alert { background: rgba(235, 87, 87, 0.1); color: var(--danger); }

/* HERO */
.hero { max-width: var(--max-width); margin: 0 auto; padding: 4rem 1.8rem 3rem; text-align: center; }
.hero-badge {
    display: inline-block; background: var(--bg-secondary); border: 1px solid var(--border);
    color: var(--text-secondary); padding: 0.3rem 1rem; border-radius: 50px; font-size: 0.8rem; margin-bottom: 1.5rem;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 700; line-height: 1.2; margin-bottom: 1rem; letter-spacing: -1px; }
.hero h1 .highlight { color: var(--accent); }
.hero-subtitle { font-size: 1.1rem; color: var(--text-secondary); max-width: 620px; margin: 0 auto 2rem; }
.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-bottom: 2rem; }
.hero-tags span {
    background: transparent; border: 1px solid var(--border); padding: 0.3rem 0.8rem; border-radius: 50px;
    font-size: 0.85rem; color: var(--text-secondary); transition: all var(--transition);
}
.hero-tags span i { margin-right: 0.3rem; opacity: 0.7; }
.hero-tags span:hover { background: var(--bg-secondary); color: var(--text-primary); }

/* SECTIONS */
section { max-width: var(--max-width); margin: 0 auto; padding: 2rem 1.8rem 4rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; border-bottom: 1px solid var(--border-light); padding-bottom: 0.8rem; }
.section-header h2 { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.5px; display: flex; align-items: center; gap: 0.5rem; }
.section-header h2 i { color: var(--text-muted); font-size: 1.2rem; }
.link-more { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; display: flex; align-items: center; gap: 0.35rem; }
.link-more:hover { color: var(--text-primary); }
.empty-state { color: var(--text-muted); font-style: italic; }

/* ABOUT (ESTILO CLEAN) */
.about-home, .about-full .about-home {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center;
    background: transparent; padding: 1.5rem 0; border: none; box-shadow: none;
}
.about-img-wrapper {
    position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3;
    border: 1px solid var(--border-light);
}
.about-img-wrapper img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-img-overlay { display: none; /* Quitamos el gradiente oscuro para que se vea limpio */ }
.about-content h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.5rem; }
.about-content .role { color: var(--text-secondary); font-size: 0.95rem; display: block; margin-bottom: 1rem; }
.about-content p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 0.95rem; }

/* BLOG CARDS */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.blog-card {
    background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 1rem;
    transition: all var(--transition); display: flex; flex-direction: column;
}
.blog-card:hover { background: var(--bg-secondary); }
.blog-card .date { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.draft-badge { color: var(--danger); font-style: normal; margin-left: 0.4rem; font-size: 0.7rem; background: rgba(235, 87, 87, 0.1); padding: 0.1rem 0.4rem; border-radius: 3px; }
.blog-card h4 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.3rem; line-height: 1.4; }
.blog-card h4 a { color: var(--text-primary); text-decoration: none; }
.blog-card p { color: var(--text-secondary); font-size: 0.9rem; flex-grow: 1; margin-bottom: 0.8rem; }
.blog-card .tag { display: none; /* Limpieza estilo Notion */ }

/* PROJECTS */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.project-card {
    background: transparent; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    transition: all var(--transition); display: flex; flex-direction: column;
}
.project-card:hover { border-color: var(--text-muted); box-shadow: var(--shadow-card); transform: translateY(-2px); }
.project-img { width: 100%; aspect-ratio: 16/10; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--border-light); overflow: hidden; }
.project-img img { width: 100%; height: 100%; object-fit: cover; color: transparent; }
.project-img i { font-size: 2.5rem; color: var(--text-muted); opacity: 0.3; }
.project-info { padding: 1rem; flex-grow: 1; display: flex; flex-direction: column; }
.project-info h4 { font-size: 1rem; font-weight: 600; margin-bottom: 0.2rem; }
.project-info h4 a { color: var(--text-primary); text-decoration: none; }
.project-info p { font-size: 0.85rem; color: var(--text-secondary); flex-grow: 1; margin-bottom: 0.8rem; }
.project-tech { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.project-tech span { background: var(--bg-secondary); color: var(--text-secondary); padding: 0.1rem 0.4rem; border-radius: 3px; font-size: 0.7rem; border: 1px solid var(--border-light); }

/* SINGLE PAGE (post/proyecto) */
.single-page { max-width: 700px; width: 100%; margin: 0 auto; }
.single-header { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-light); }
.single-header .date { color: var(--text-muted); font-size: 0.9rem; }
.single-header h1 { font-size: 2.2rem; font-weight: 700; margin: 0.5rem 0; letter-spacing: -0.5px; }
.single-desc { color: var(--text-secondary); font-size: 1.05rem; }
.single-image { border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; }
.single-image img { width: 100%; display: block; }
.single-admin-actions { margin-top: 2rem; border-top: 1px solid var(--border-light); padding-top: 1rem; }

/* MARKDOWN CONTENT */
.markdown-body { font-size: 1.05rem; color: var(--text-primary); }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { font-weight: 600; margin-top: 2rem; margin-bottom: 0.5rem; letter-spacing: -0.3px; }
.markdown-body h1 { font-size: 1.8rem; border-bottom: 1px solid var(--border-light); padding-bottom: 0.3rem; } 
.markdown-body h2 { font-size: 1.4rem; } 
.markdown-body h3 { font-size: 1.2rem; }
.markdown-body p { margin-bottom: 1.2rem; line-height: 1.7; }
.markdown-body a { color: var(--text-primary); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.markdown-body a:hover { text-decoration-color: var(--text-primary); }
.markdown-body ul, .markdown-body ol { margin: 0 0 1.2rem 1.4rem; }
.markdown-body li { margin-bottom: 0.3rem; }
.markdown-body blockquote { border-left: 3px solid var(--text-primary); padding-left: 1rem; color: var(--text-secondary); margin-bottom: 1.2rem; font-style: normal; }
.markdown-body code { background: var(--bg-secondary); padding: 0.2rem 0.4rem; border-radius: 3px; font-family: 'JetBrains Mono', monospace; font-size: 0.85em; color: var(--accent-2); }
.markdown-body pre { background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 1rem; overflow-x: auto; margin-bottom: 1.2rem; }
.markdown-body pre code { background: none; padding: 0; color: var(--text-primary); }
.markdown-body table { width: 100%; border-collapse: collapse; margin-bottom: 1.2rem; display: block; overflow-x: auto; white-space: nowrap; }
.markdown-body th, .markdown-body td { border-bottom: 1px solid var(--border-light); padding: 0.6rem 0.8rem; text-align: left; }
.markdown-body th { color: var(--text-muted); font-weight: 500; font-size: 0.9rem; }
.markdown-body img { max-width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border-light); }

/* ADMIN FORMS */
.form-page { max-width: 600px; }
.admin-form { background: transparent; padding: 1rem 0; }
.field { margin-bottom: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-weight: 500; font-size: 0.9rem; color: var(--text-secondary); }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="number"], .field textarea, .field input[type="file"] {
    background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 0.5rem 0.8rem; color: var(--text-primary); font-family: inherit; font-size: 0.95rem;
}
.field textarea { font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field .hint { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.current-image img, .current-image { max-width: 150px; border-radius: var(--radius-sm); margin-top: 0.5rem; border: 1px solid var(--border-light); }
.form-actions { display: flex; gap: 0.8rem; margin-top: 1.5rem; }
.form-errors { background: rgba(235, 87, 87, 0.05); border-left: 3px solid var(--danger); color: var(--danger); padding: 0.8rem 1rem; margin-bottom: 1.2rem; font-size: 0.9rem; }
.form-errors ul { margin-left: 1.2rem; }

/* FOOTER */
footer { border-top: 1px solid var(--border-light); padding: 2rem 1.8rem; margin-top: auto; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-links { display: flex; gap: 1.5rem; align-items: center; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--text-primary); }
.copyright { color: var(--text-muted); font-size: 0.85rem; }

/* ==========================================================================
   OVERLEAF IDE STYLE EDITOR (ADMIN FORMS)
   ========================================================================== */

.ide-fullscreen-wrapper { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; padding: 0; }
.overleaf-ide-container { display: flex; flex-direction: column; width: 100%; height: calc(100vh - var(--header-height)); background: var(--bg-primary); border-top: 1px solid var(--border); margin: 0; overflow: hidden; }
.form-errors-banner { background: rgba(235, 87, 87, 0.05); border-bottom: 1px solid var(--danger); color: var(--danger); padding: 0.6rem 1.5rem; font-size: 0.85rem; flex-shrink: 0; }
.ide-workspace { display: flex; width: 100%; flex: 1; overflow: hidden; border-bottom: 1px solid var(--border); }
.overleaf-sidebar { width: 280px; background: var(--bg-secondary); border-right: 1px solid var(--border); padding: 1.2rem; display: flex; flex-direction: column; gap: 1.2rem; flex-shrink: 0; overflow-y: auto; }
.sidebar-section-title { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; padding-bottom: 0.3rem; border-bottom: 1px solid var(--border-light); }
.sidebar-field { display: flex; flex-direction: column; gap: 0.4rem; }
.sidebar-field label { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); }
.sidebar-field input[type="text"], .sidebar-field textarea, .sidebar-field input[type="file"] { background: var(--bg-primary); border: 1px solid var(--border); border-radius: 3px; padding: 0.4rem 0.6rem; color: var(--text-primary); font-size: 0.85rem; width: 100%; }
.sidebar-field textarea { resize: vertical; }
.sidebar-field input:focus, .sidebar-field textarea:focus { outline: none; border-color: var(--accent); }
.sidebar-thumb-preview { margin-top: 0.4rem; border: 1px solid var(--border-light); border-radius: 3px; overflow: hidden; max-width: 100px; }
.sidebar-thumb-preview img { width: 100%; display: block; }
.checkbox-field { flex-direction: row; align-items: center; gap: 0.5rem; padding: 0.2rem 0; }
.overleaf-editor-zone { flex: 1; display: flex; flex-direction: column; background: var(--bg-primary); min-width: 0; }
.editor-top-toolbar { height: 40px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0; flex-shrink: 0; }
.file-tab { background: var(--bg-primary); color: var(--text-primary); padding: 0 1.2rem; height: 100%; display: flex; align-items: center; font-size: 0.85rem; border-right: 1px solid var(--border); font-weight: 500; }
.toolbar-right { padding-right: 1.2rem; font-size: 0.8rem; color: var(--text-muted); }
.editor-textarea-wrapper { flex: 1; position: relative; width: 100%; }
.ide-textarea { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; background: transparent; border: none; resize: none; padding: 2rem; color: var(--text-primary); font-family: 'JetBrains Mono', monospace; font-size: 0.95rem; line-height: 1.7; outline: none; overflow-y: auto; }
.overleaf-bottom-tray { padding: 0.8rem 1.2rem; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }

/* ==========================================================================
   BLOG TREE EXPLORER (Cajas Externas + Árbol Interno + 10 Colores)
   ========================================================================== */

.blog-tree-page { max-width: 750px; margin: 0 auto; }
.tree-search-wrapper { position: relative; margin-bottom: 2rem; }
.tree-search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.85rem; }
.tree-search-input { width: 100%; background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); padding: 0.8rem 1rem 0.8rem 2.4rem; color: var(--text-primary); font-family: inherit; font-size: 0.95rem; }
.tree-search-input:focus { outline: none; border-color: var(--accent); }

/* Reset del explorador */
.tree-explorer { font-family: inherit; width: 100%; padding: 0; }
.tree-explorer ul { list-style: none; margin: 0; padding: 0; }

/* Ocultar elementos cuando la carpeta está colapsada */
.tree-explorer .node-folder.is-collapsed > .tree-list, 
.tree-explorer .node-folder.is-collapsed > .node-files { display: none; }


/* ==========================================================================
   1. LA ESTRUCTURA EXTERNA (NODO RAÍZ Y CAJAS)
   ========================================================================== */

/* Nodo Raíz ("es" / "en") */
.tree-explorer > .tree-list > li > .node-folder > strong {
    display: inline-block; font-size: 0.85rem; color: var(--text-muted); 
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; cursor: pointer;
}
.tree-explorer > .tree-list > li > .node-folder > strong::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: 0.5rem; }
.tree-explorer > .tree-list > li.is-collapsed > .node-folder > strong::after { transform: rotate(-90deg); }

/* Contenedor de las Cajas */
.tree-explorer > .tree-list > li > .tree-list > li {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light, rgba(255, 255, 255, 0.05));
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

/* 10 COLORES VIBRANTES (Ciclo automático) */
.tree-explorer > .tree-list > li > .tree-list > li:nth-child(10n + 1) { border-left: 4px solid #f59e0b; --cat-color: #f59e0b; }
.tree-explorer > .tree-list > li > .tree-list > li:nth-child(10n + 2) { border-left: 4px solid #3b82f6; --cat-color: #3b82f6; }
.tree-explorer > .tree-list > li > .tree-list > li:nth-child(10n + 3) { border-left: 4px solid #ef4444; --cat-color: #ef4444; }
.tree-explorer > .tree-list > li > .tree-list > li:nth-child(10n + 4) { border-left: 4px solid #10b981; --cat-color: #10b981; }
.tree-explorer > .tree-list > li > .tree-list > li:nth-child(10n + 5) { border-left: 4px solid #8b5cf6; --cat-color: #8b5cf6; }
.tree-explorer > .tree-list > li > .tree-list > li:nth-child(10n + 6) { border-left: 4px solid #06b6d4; --cat-color: #06b6d4; }
.tree-explorer > .tree-list > li > .tree-list > li:nth-child(10n + 7) { border-left: 4px solid #eab308; --cat-color: #eab308; }
.tree-explorer > .tree-list > li > .tree-list > li:nth-child(10n + 8) { border-left: 4px solid #f43f5e; --cat-color: #f43f5e; }
.tree-explorer > .tree-list > li > .tree-list > li:nth-child(10n + 9) { border-left: 4px solid #6366f1; --cat-color: #6366f1; }
.tree-explorer > .tree-list > li > .tree-list > li:nth-child(10n + 10){ border-left: 4px solid #14b8a6; --cat-color: #14b8a6; }

/* Título de la Caja (Cabecera) */
.tree-explorer > .tree-list > li > .tree-list > li > .node-folder > strong {
    display: inline-flex; align-items: center;
    background: rgba(0, 0, 0, 0.1); 
    padding: 0.8rem 1.2rem;
    margin-bottom: 0.8rem;
    font-size: 1.05rem; font-weight: 600; color: var(--text-primary);
    border-bottom: 1px solid var(--border-light, rgba(255, 255, 255, 0.05));
    border-radius: 8px 8px 0 0;
    width: 100%;
    box-sizing: border-box;
}
.tree-explorer > .tree-list > li > .tree-list > li > .node-folder > strong::before {
    color: var(--cat-color) !important; font-size: 1.1rem; margin-right: 0.6rem;
}


/* ==========================================================================
   2. EL INTERIOR (ÁRBOL CLÁSICO E ÍCONOS)
   ========================================================================== */

/* Líneas guía de indentación */
.tree-explorer .tree-list, 
.tree-explorer .node-files {
    padding-left: 1.2rem; margin-left: 1rem;
    border-left: 1px solid var(--border-light, rgba(255, 255, 255, 0.1));
}
/* Limpiar línea para el primer nivel dentro de la caja */
.tree-explorer > .tree-list > li > .tree-list > li > .tree-list,
.tree-explorer > .tree-list > li > .tree-list > li > .node-files {
    border-left: none; margin-left: 0; padding-left: 1.2rem; padding-right: 1.2rem;
}

/* Carpetas y Enlaces base */
/* 1. Carpetas (Se quedan en línea para no romper el botón de administrador) */
.tree-explorer .node-folder > strong {
    display: inline-flex; align-items: center;
    padding: 0.25rem 0.5rem; margin: 0.1rem 0;
    border-radius: 4px; font-size: 0.9rem; color: var(--text-secondary);
    transition: background 0.15s ease, color 0.15s ease;
}

/* 2. Archivos (Forzamos el salto de línea, manteniendo el fondo "píldora") */
.tree-explorer .tree-post,
.tree-explorer .node-files li {
    display: flex; align-items: center;
    width: fit-content; /* <- La magia que evita que el gris ocupe todo el ancho */
    padding: 0.25rem 0.5rem; margin: 0.1rem 0;
    border-radius: 4px; font-size: 0.9rem; color: var(--text-secondary);
    transition: background 0.15s ease, color 0.15s ease;
}

/* Íconos Dinámicos de Carpetas internas */
.tree-explorer .node-folder > strong { color: var(--text-primary); font-weight: 500; cursor: pointer; }
.tree-explorer .node-folder > strong::before { content: "\f07c"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--text-muted); margin-right: 0.5rem; }
.tree-explorer .node-folder.is-collapsed > strong::before { content: "\f07b"; }
.tree-explorer .node-folder > strong::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 0.65rem; color: var(--text-muted); margin-left: 0.4rem; transition: transform 0.2s; }
.tree-explorer .node-folder.is-collapsed > strong::after { transform: rotate(-90deg); }

/* Íconos de Archivos */
.tree-explorer .tree-post a { color: inherit; text-decoration: none; width: 100%; display: flex; align-items: center; }
.tree-explorer .tree-post a::before { content: "\f15c"; font-family: "Font Awesome 6 Free"; font-weight: 400; opacity: 0.6; margin-right: 0.5rem; color: var(--text-muted); }
.tree-explorer .node-files li::before { content: "\f03e"; font-family: "Font Awesome 6 Free"; font-weight: 400; opacity: 0.6; margin-right: 0.5rem; color: var(--text-muted); }

/* Efecto Hover General */
.tree-explorer .node-folder > strong:hover,
.tree-explorer .tree-post:hover,
.tree-explorer .node-files li:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}


/* ==========================================================================
   3. ENLACE DE ABRIR DIRECTORIO Y ACCIONES DE ADMIN
   ========================================================================== */

/* ¡CORRECCIÓN AQUÍ! Restauramos el signo "+" para apuntar al enlace hermano */
.folder-admin-link { 
    opacity: 0; 
    margin-left: 0.8rem; 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    text-decoration: none;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05); /* Diseño de botón sutil */
    transition: opacity 0.2s, background 0.2s, color 0.2s;
}

/* Hover sobre el botón de directorio */
.folder-admin-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Mostrar el enlace "Abrir directorio" al pasar el ratón por el título de la carpeta o el enlace mismo */
.tree-explorer .node-folder > strong:hover + .folder-admin-link, 
.folder-admin-link:hover { 
    opacity: 1; 
}

/* Acciones de administrador en los posts */
.tree-explorer .admin-actions { margin-left: auto; opacity: 0; display: inline-flex; gap: 0.4rem; }
.tree-explorer .tree-post:hover .admin-actions,
.tree-explorer .node-files li:hover .admin-actions { opacity: 1; }

.file-icon { display: none !important; }

/* ==========================================================================
   BLOQUE DE CITACIÓN BIBLIOGRÁFICA (Texto libre, sin cajas ni líneas)
   ========================================================================== */

.post-citation-card { 
    position: relative; 
    background: var(--bg-secondary); 
    border: 1px solid var(--border-light, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-sm, 8px); 
    padding: 1.5rem; 
    margin-top: 3.5rem; 
    margin-bottom: 2rem; 
    overflow: hidden; 
}

.citation-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    margin-bottom: 0.2rem; 
}

.citation-title { 
    font-size: 1.1rem; 
    font-weight: 600; 
    color: var(--text-primary); 
    margin: 0; 
}

.citation-url { 
    margin-bottom: 1.5rem; 
}

.citation-url .url-link { 
    color: var(--text-secondary); 
    font-size: 0.85rem; 
    text-decoration: none; 
    word-break: break-all; 
    font-family: 'JetBrains Mono', 'Fira Code', monospace; 
    transition: color var(--transition);
}

.citation-url .url-link:hover {
    color: var(--accent);
}

.citation-metadata { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 2.5rem; 
    margin-bottom: 1.2rem; 
}

.meta-group { 
    display: flex; 
    flex-direction: column; 
    gap: 0.3rem; 
}

.meta-label { 
    font-size: 0.7rem; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    font-weight: 600; 
}

.meta-value { 
    font-size: 0.85rem; 
    color: var(--text-primary); 
    font-weight: 500;
}

/* Las licencias ahora flotan libres, sin cajas ni bordes de fondo */
.citation-notes {
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 1rem;
    font-size: 0.78rem; 
    color: var(--text-muted); 
    display: flex; 
    gap: 1.5rem; 
    flex-wrap: wrap;
    align-items: center;
}

.citation-notes span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.citation-notes a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

.citation-notes a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.bg-cc-icon { 
    display: none; 
}

/* ==========================================================================
   MEDIA LIST VIEW (ESTILO NOTION FILES)
   ========================================================================== */
.media-list { display: flex; flex-direction: column; gap: 0.5rem; }
.media-list-row { display: flex; align-items: center; padding: 0.5rem; gap: 1rem; border-bottom: 1px solid var(--border-light); }
.media-list-row:hover { background-color: var(--bg-secondary); }
.media-list-thumb { width: 40px; height: 40px; background-color: transparent; border-radius: 3px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.media-list-thumb img { max-width: 100%; max-height: 100%; object-fit: cover; border-radius: 3px; }
.media-list-info { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.media-filename { font-size: 0.9rem; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-meta { font-size: 0.75rem; color: var(--text-muted); }
.media-list-snippet-container { flex-shrink: 0; }
.media-snippet { background: transparent; padding: 0.3rem 0.5rem; font-size: 0.8rem; cursor: pointer; color: var(--text-secondary); }
.media-snippet:hover { color: var(--text-primary); }
.media-snippet code { display: none; }

/* ==========================================================================
   OBSIDIAN EMBEDS (Imágenes, PDFs y Archivos)
   ========================================================================== */
.obsidian-image { max-width: 100%; border-radius: var(--radius-sm); margin: 1rem 0; display: block; border: 1px solid var(--border-light); }
.obsidian-pdf-wrapper { margin: 1.5rem 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.obsidian-pdf-header { background: var(--bg-secondary); padding: 0.4rem 0.8rem; font-size: 0.8rem; color: var(--text-secondary); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 0.5rem; }
.obsidian-pdf { width: 100%; height: 600px; border: none; display: block; }
.obsidian-file-card { display: flex; align-items: center; gap: 1rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.8rem 1rem; margin: 1rem 0; text-decoration: none; transition: background 0.2s; }
.obsidian-file-card:hover { background: var(--border-light); }
.obsidian-file-card .file-icon { font-size: 1.5rem; color: var(--text-muted); }
.obsidian-file-card .file-info { flex-grow: 1; display: flex; flex-direction: column; }
.obsidian-file-card .filename { color: var(--text-primary); font-weight: 500; font-size: 0.9rem; }
.obsidian-file-card .file-action { color: var(--text-muted); font-size: 0.75rem; }
.obsidian-file-card .download-icon { color: var(--text-muted); font-size: 1rem; }

/* ==========================================================================
   RESPONSIVIDAD (MÓVILES Y TABLETS)
   ========================================================================== */
@media (max-width: 768px) {
    section { padding: 1.5rem 1rem 3rem; }
    .hero { padding: 3rem 1rem 2rem; }
    .header-inner { flex-direction: column; gap: 1rem; padding: 1rem; }
    header { height: auto; padding: 0.5rem 0; }
    nav { flex-wrap: wrap; justify-content: center; }
    .about-home, .about-full .about-home { display: flex; flex-direction: column; gap: 1.5rem; padding: 0; text-align: left; }
    .about-img-wrapper { max-width: 100%; margin: 0; }
    .hero h1 { font-size: 2rem; }
    .btn-primary, .btn-outline, .btn-ide-primary, .btn-ide-secondary, .btn-sm, .btn-tiny, .btn-tiny-danger { width: 100%; justify-content: center; }
    .admin-actions { flex-direction: column; width: 100%; align-items: stretch; }
    .footer-inner { flex-direction: column; text-align: center; gap: 1.2rem; }
    .footer-links { flex-direction: column; gap: 0.8rem; }
    .ide-workspace { flex-direction: column; }
    .overleaf-sidebar { width: 100%; height: 200px; border-right: none; border-bottom: 1px solid var(--border); }
    .tree-explorer .tree-post .admin-actions { opacity: 1; flex-direction: row; margin-top: 0.5rem; }
}

/* ==========================================================================
   DISEÑO VERTICAL UNIFICADO (ABOUT)
   ========================================================================== */
.about-full { max-width: 700px; margin: 0 auto; }
.about-card-vertical { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 2rem 0; }
.about-hero-photo { width: 180px; height: 180px; border-radius: 50%; overflow: hidden; background: var(--bg-secondary); margin-bottom: 1.5rem; }
.about-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-hero-info { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 2rem; width: 100%; }
.about-hero-info h3 { font-size: 1.8rem; font-weight: 700; color: var(--text-primary); }
.about-hero-info .role { color: var(--text-secondary); font-weight: 500; font-size: 1rem; }
.about-hero-info .location { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.2rem; }
.about-hero-body { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 1.5rem; }
.about-hero-body .bio-text { color: var(--text-primary); font-size: 1.05rem; line-height: 1.7; }
.about-quote { border-left: 3px solid var(--text-primary); padding-left: 1rem; font-size: 0.95rem; color: var(--text-secondary); text-align: left; font-style: italic; }

/* ==========================================================================
   GESTOR DE ARCHIVOS (MEDIA MANAGER - ESTILO NOTION)
   ========================================================================== */

.media-manager-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.8rem;
}

.media-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
}

.media-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
}

.media-header h2 i {
    color: var(--text-muted);
}

.media-header h2 code {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* Zona de Subida */
.media-upload-zone {
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: border-color var(--transition);
}

.media-upload-zone:hover {
    border-color: var(--text-muted);
    background: var(--bg-secondary);
}

.media-upload-form {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.file-input-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
}

.file-input-icon {
    color: var(--text-muted);
}

.custom-file-input {
    color: var(--text-primary);
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

.custom-file-input::file-selector-button {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-right: 1rem;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all var(--transition);
}

.custom-file-input::file-selector-button:hover {
    background-color: var(--border-light);
    border-color: var(--text-muted);
}

/* Lista de Archivos */
.media-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.media-list-row {
    display: flex;
    align-items: center;
    background-color: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    gap: 1.2rem;
    transition: all var(--transition);
}

.media-list-row:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border);
}

/* Miniatura más compacta */
.media-list-thumb {
    width: 60px;
    height: 45px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border-light);
}

.media-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doc-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.media-list-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.media-filename {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.media-filename i {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.media-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.media-list-snippet-container {
    flex-shrink: 0;
}

.media-snippet {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: border-color var(--transition);
    color: var(--text-secondary);
}

.media-snippet:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.media-snippet code {
    background: transparent;
    padding: 0;
    border: none;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.media-list-actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.action-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition);
}

.action-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--border);
}

.action-btn-danger:hover {
    color: var(--danger);
    background: rgba(235, 87, 87, 0.1);
    border-color: transparent;
}

.media-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    opacity: 0.5;
}

/* Responsividad Gestor */
@media (max-width: 768px) {
    .media-upload-form { flex-direction: column; align-items: stretch; }
    .media-upload-form .btn-primary { width: 100%; justify-content: center; }
    .media-list-row { flex-direction: column; align-items: flex-start; gap: 0.8rem; position: relative; }
    .media-list-snippet-container { width: 100%; }
    .media-snippet { justify-content: space-between; }
    .media-list-actions { position: absolute; top: 0.8rem; right: 1rem; background: var(--bg-primary); border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
}

/* ==========================================================================
   IDE BOTTOM TRAY (Barra inferior del editor)
   ========================================================================== */
.overleaf-bottom-tray {
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    gap: 2rem;
}

.tray-media-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

.tray-media-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tray-media-title {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tray-media-title i {
    color: var(--text-muted);
}

.tray-media-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.tray-media-hint code {
    background: var(--bg-secondary);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

/* Responsividad para la barra inferior del IDE en móviles */
@media (max-width: 768px) {
    .overleaf-bottom-tray {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        padding: 1.5rem 1.2rem;
    }
    
    .tray-media-header {
        justify-content: space-between;
    }
}

/* ==========================================================================
   SPLIT VIEW (VISTA PREVIA EN TIEMPO REAL)
   ========================================================================== */
.editor-split-view {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: 100%;
}

.editor-textarea-wrapper {
    flex: 1;
    position: relative;
    border-right: 1px solid transparent;
    transition: border-color var(--transition);
}

/* El panel derecho de vista previa */
.editor-preview-wrapper {
    flex: 0; /* Oculto por defecto */
    width: 0;
    overflow-y: auto;
    padding: 0;
    background: var(--bg-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

/* Clase que se activa con Javascript */
.editor-split-view.show-preview .editor-textarea-wrapper {
    border-right-color: var(--border);
}

.editor-split-view.show-preview .editor-preview-wrapper {
    flex: 1;
    width: 50%;
    padding: 2rem;
    opacity: 1;
}

/* Ocultar en pantallas muy pequeñas */
@media (max-width: 992px) {
    .editor-split-view.show-preview .editor-textarea-wrapper { display: none; }
    .editor-split-view.show-preview .editor-preview-wrapper { flex: 1; width: 100%; }
}

/* ==========================================================================
   OBSIDIAN CALLOUTS
   ========================================================================== */
.obsidian-callout {
    /* La magia de los canales RGB nos permite controlar la opacidad (0.1) */
    background-color: rgba(var(--callout-color), 0.1);
    border: 1px solid rgba(var(--callout-color), 0.2);
    border-left: 4px solid rgb(var(--callout-color));
    border-radius: var(--radius-sm, 6px);
    margin: 1.5rem 0;
    padding: 1rem 1.2rem;
    transition: background-color var(--transition);
}

.callout-title {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-weight: 600;
    color: rgb(var(--callout-color));
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.callout-icon {
    font-size: 1rem;
    margin-top: 2px;
}

.callout-content {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Evitamos márgenes dobles dentro de las tarjetas */
.callout-content p:last-child {
    margin-bottom: 0;
}

.callout-content p:first-child {
    margin-top: 0;
}

pre.mermaid:not([data-processed="true"]) {
    color: transparent;
}