/* ============================================================
   NEUMORFISMO OCRE/ORO — Revista Páginas
   ============================================================ */

/* ---------- VARIABLES DE TEMA ---------- */
[data-theme="light"] {
    --bg: #e4ddd4;
    --bg-secondary: #d9d2c8;
    --fg: #2c2418;
    --fg-muted: #6b5e4f;
    --fg-light: #a09282;
    --accent: #b8860b;
    --accent-hover: #9a7209;
    --accent-text: #ffffff;
    --accent-light: rgba(184, 134, 11, 0.13);
    --shadow-dark: #b8b0a4;
    --shadow-light: #ffffff;
    --neu-raised: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
    --neu-raised-sm: 3px 3px 8px var(--shadow-dark), -3px -3px 8px var(--shadow-light);
    --neu-raised-lg: 10px 10px 20px var(--shadow-dark), -10px -10px 20px var(--shadow-light);
    --neu-inset: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    --neu-inset-sm: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    --danger: #c0392b;
    --danger-bg: rgba(192, 57, 43, 0.1);
    --success: #27ae60;
    --success-bg: rgba(39, 174, 96, 0.1);
    --warning: #d4a017;
    --card-radius: 20px;
    --btn-radius: 14px;
    --input-radius: 14px;
    --tag-radius: 50px;
    --header-blur: rgba(228, 221, 212, 0.9);
    --overlay: rgba(184, 176, 164, 0.55);
    --code-bg: #d5cec5;
    --table-stripe: rgba(184, 176, 164, 0.18);
}

[data-theme="dark"] {
    --bg: #1c1a16;
    --bg-secondary: #24211c;
    --fg: #e8e0d4;
    --fg-muted: #9e9486;
    --fg-light: #635c52;
    --accent: #d4a84b;
    --accent-hover: #b8860b;
    --accent-text: #1c1a16;
    --accent-light: rgba(212, 168, 75, 0.13);
    --shadow-dark: #121110;
    --shadow-light: #262320;
    --neu-raised: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
    --neu-raised-sm: 3px 3px 8px var(--shadow-dark), -3px -3px 8px var(--shadow-light);
    --neu-raised-lg: 10px 10px 20px var(--shadow-dark), -10px -10px 20px var(--shadow-light);
    --neu-inset: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    --neu-inset-sm: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    --danger: #e74c3c;
    --danger-bg: rgba(231, 76, 60, 0.12);
    --success: #2ecc71;
    --success-bg: rgba(46, 204, 113, 0.12);
    --warning: #f0c040;
    --card-radius: 20px;
    --btn-radius: 14px;
    --input-radius: 14px;
    --tag-radius: 50px;
    --header-blur: rgba(28, 26, 22, 0.92);
    --overlay: rgba(18, 17, 16, 0.65);
    --code-bg: #16140f;
    --table-stripe: rgba(38, 35, 32, 0.5);
}

/* ---------- RESET ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.25;
    color: var(--fg);
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }
ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; }
li { margin-bottom: 0.4rem; }

/* ---------- UTILIDADES ---------- */
.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.text-center { text-align: center; }
.muted { color: var(--fg-muted); }
.sm { font-size: 0.85rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.sep {
    font-size: 0.6rem;
    margin: 0 0.5rem;
    color: var(--fg-light);
}

/* ---------- CANVAS ---------- */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---------- SPLASH ---------- */
#splash {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

#splash.out {
    opacity: 0;
    pointer-events: none;
}

#splash .splash-inner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg);
    box-shadow: var(--neu-raised);
    animation: splashPulse 1s ease-in-out infinite;
}

@keyframes splashPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--neu-raised);
    }
    50% {
        transform: scale(1.15);
        box-shadow: var(--neu-raised-lg);
    }
}

/* ---------- ANIMACIONES ---------- */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.6s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up:nth-child(2) { animation-delay: 0.08s; }
.fade-up:nth-child(3) { animation-delay: 0.16s; }
.fade-up:nth-child(4) { animation-delay: 0.24s; }
.fade-up:nth-child(5) { animation-delay: 0.32s; }
.fade-up:nth-child(6) { animation-delay: 0.4s; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-blur);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 4px 16px var(--shadow-dark);
    transition: background 0.4s, box-shadow 0.4s;
    padding: 0.25rem 0;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100px;
    gap: 1rem;
    padding: 0.5rem 0;
}

.logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 120px;
    width: auto;
    max-height: 120px;
}

.logo-dark { display: block; }
.logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: block; }

/* Nav desktop */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--fg-muted);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--btn-radius);
    transition: all 0.25s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--fg);
    box-shadow: var(--neu-raised-sm);
    background: var(--bg);
}

.nav-link.active {
    color: var(--accent);
    box-shadow: var(--neu-inset-sm);
    background: var(--bg);
}

/* Búsqueda en header */
.header-search {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-search input {
    width: 0;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: var(--bg);
    box-shadow: var(--neu-inset-sm);
    color: var(--fg);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    transition: width 0.35s ease, padding 0.35s ease;
}

.header-search.open input {
    width: 180px;
    padding: 0.5rem 0.75rem 0.5rem 2.4rem;
}

.header-search .search-icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: var(--bg);
    box-shadow: var(--neu-raised-sm);
    color: var(--fg-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
    font-size: 0.9rem;
}

.header-search .search-icon:hover { color: var(--accent); }
.header-search .search-icon:active { box-shadow: var(--neu-inset-sm); }
.header-search.open .search-icon {
    box-shadow: none;
    background: transparent;
}

/* Burger */
#burgerToggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: var(--bg);
    box-shadow: var(--neu-raised-sm);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: box-shadow 0.2s;
}

#burgerToggle:active { box-shadow: var(--neu-inset-sm); }

#burgerToggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--fg);
    border-radius: 2px;
    transition: all 0.3s;
}

.header-btns {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Nav móvil */
.nav-mobile {
    display: none;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem 0;
}

.nav-mobile .nav-link {
    display: block;
    text-align: center;
    padding: 0.7rem 1rem;
}

.nav-mobile.hide { display: none; }
.nav-mobile:not(.hide) { display: flex; }

@media (max-width: 900px) {
    .nav-desktop { display: none; }
    .header-search.open input { width: 120px; }
    #burgerToggle { display: flex; }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.35rem; }
    .logo-img { height: 56px; max-height: 56px; }
    .header-row { height: 80px; }
}

@media (max-width: 500px) {
    .header-search.open input { width: 90px; }
    .logo-img { height: 48px; max-height: 48px; }
    .header-row { height: 70px; }
}

/* Icon button */
.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: var(--bg);
    box-shadow: var(--neu-raised-sm);
    color: var(--fg-muted);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover { color: var(--accent); }
.icon-btn:active { box-shadow: var(--neu-inset-sm); }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--fg-muted);
}

.breadcrumb a { color: var(--fg-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span:last-child { color: var(--fg-light); font-weight: 600; }

/* ============================================================
   TARJETAS
   ============================================================ */
.card {
    background: var(--bg);
    border-radius: var(--card-radius);
    box-shadow: var(--neu-raised);
    padding: 1.75rem;
    transition: box-shadow 0.3s, transform 0.3s;
    border: none;
}

.card:hover {
    box-shadow: var(--neu-raised-lg);
    transform: translateY(-2px);
}

.card-inset {
    background: var(--bg);
    border-radius: var(--card-radius);
    box-shadow: var(--neu-inset);
    padding: 1.75rem;
}

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--btn-radius);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-text);
    box-shadow: 4px 4px 10px var(--shadow-dark),
                -2px -2px 6px var(--shadow-light),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 6px 6px 14px var(--shadow-dark),
                -3px -3px 8px var(--shadow-light);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.2);
}

.btn-neu {
    background: var(--bg);
    color: var(--fg);
    box-shadow: var(--neu-raised-sm);
}

.btn-neu:hover {
    color: var(--accent);
    box-shadow: var(--neu-raised);
}

.btn-neu:active { box-shadow: var(--neu-inset-sm); }

.btn-danger {
    background: var(--danger);
    color: #fff;
    box-shadow: 4px 4px 10px var(--shadow-dark),
                -2px -2px 6px var(--shadow-light);
}

.btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-danger:active {
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.2);
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    border-radius: 10px;
}

.btn-icon-only {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 12px;
}

/* ============================================================
   FORMULARIOS
   ============================================================ */
.fg { margin-bottom: 1.25rem; }

.fg label {
    display: block;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--fg-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fg input[type="text"],
.fg input[type="password"],
.fg input[type="url"],
.fg input[type="email"],
.fg textarea,
.fg select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--fg);
    background: var(--bg);
    border: none;
    border-radius: var(--input-radius);
    box-shadow: var(--neu-inset-sm);
    outline: none;
    transition: box-shadow 0.25s;
}

.fg input:focus,
.fg textarea:focus,
.fg select:focus {
    box-shadow: var(--neu-inset), 0 0 0 3px var(--accent-light);
}

.fg textarea {
    min-height: 120px;
    resize: vertical;
}

.fg select {
    cursor: pointer;
    appearance: none;
}

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
    position: relative;
    z-index: 1;
    padding: 3rem 0 2rem;
    text-align: center;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--fg-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* ============================================================
   GRID ARTÍCULOS
   ============================================================ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.75rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 400px) {
    .articles-grid { grid-template-columns: 1fr; }
}

.article-card {
    background: var(--bg);
    border-radius: var(--card-radius);
    box-shadow: var(--neu-raised);
    overflow: hidden;
    transition: all 0.35s;
    display: flex;
    flex-direction: column;
    border: none;
}

.article-card:hover {
    box-shadow: var(--neu-raised-lg);
    transform: translateY(-4px);
}

.article-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.article-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.article-card-title a { color: var(--fg); }
.article-card-title a:hover { color: var(--accent); }

.article-card-summary {
    font-size: 0.9rem;
    color: var(--fg-muted);
    flex: 1;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--fg-light);
    padding-top: 1rem;
    border-top: 1px solid var(--table-stripe);
}

/* ============================================================
   TAGS
   ============================================================ */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--fg-muted);
    background: var(--bg);
    border-radius: var(--tag-radius);
    box-shadow: var(--neu-raised-sm);
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.tag:hover {
    color: var(--accent);
    box-shadow: var(--neu-raised);
    transform: translateY(-1px);
}

.tags-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-cloud .tag { font-size: 0.75rem; padding: 0.25rem 0.7rem; }

/* ============================================================
   PAGINACIÓN
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 2.5rem 0 1rem;
    position: relative;
    z-index: 1;
    list-style: none;
    padding: 0;
}

.page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fg-muted);
    background: var(--bg);
    border: none;
    border-radius: 12px;
    box-shadow: var(--neu-raised-sm);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.page-item .page-link:hover {
    color: var(--accent);
    box-shadow: var(--neu-raised);
    transform: translateY(-1px);
}

.page-item .page-link:active { box-shadow: var(--neu-inset-sm); }

.page-item.active .page-link {
    color: var(--accent-text);
    background: var(--accent);
    box-shadow: 4px 4px 10px var(--shadow-dark),
                -2px -2px 6px var(--shadow-light),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.page-item.disabled .page-link {
    opacity: 0.4;
    pointer-events: none;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    .content-with-sidebar { grid-template-columns: 1fr; }
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--bg);
    border-radius: var(--card-radius);
    box-shadow: var(--neu-raised);
    padding: 1.5rem;
}

.sidebar-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    box-shadow: 0 2px 0 var(--accent);
}

.popular-list { list-style: none; padding: 0; margin: 0; }

.popular-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--table-stripe);
}

.popular-item:last-child { border-bottom: none; }

.popular-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--bg);
    box-shadow: var(--neu-inset-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent);
}

.popular-item-title {
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.35;
}

.popular-item-title a { color: var(--fg); }
.popular-item-title a:hover { color: var(--accent); }
.popular-item-meta { font-size: 0.75rem; color: var(--fg-light); margin-top: 0.2rem; }

/* ============================================================
   ARTÍCULO
   ============================================================ */
.article-header {
    text-align: center;
    padding: 2rem 0 1.5rem;
    position: relative;
    z-index: 1;
}

.article-header .article-card-category { margin-bottom: 0.75rem; }

.article-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.88rem;
    color: var(--fg-muted);
    flex-wrap: wrap;
}

.article-meta i { color: var(--accent); margin-right: 0.3rem; }

.article-image-wrap {
    position: relative;
    z-index: 1;
    margin-bottom: 2.5rem;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--neu-raised-lg);
}

.article-image-wrap img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
}

.article-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.article-content h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    box-shadow: 0 2px 0 var(--accent-light);
}

.article-content h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.article-content p { margin-bottom: 1.2rem; font-size: 1.02rem; }
.article-content a { text-decoration: underline; text-underline-offset: 3px; }
.article-content strong { color: var(--fg); }
.article-content ul, .article-content ol { margin-bottom: 1.2rem; }

.article-content blockquote {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    border-radius: var(--input-radius);
    background: var(--bg);
    box-shadow: var(--neu-inset-sm);
    font-style: italic;
    color: var(--fg-muted);
    border-left: 3px solid var(--accent);
}

.article-content code {
    padding: 0.15rem 0.4rem;
    background: var(--code-bg);
    border-radius: 6px;
    font-size: 0.88em;
}

.article-content pre {
    padding: 1rem 1.25rem;
    background: var(--code-bg);
    border-radius: var(--input-radius);
    box-shadow: var(--neu-inset-sm);
    overflow-x: auto;
    margin-bottom: 1.2rem;
}

.article-content pre code {
    padding: 0;
    background: none;
}

.article-tags-section {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--table-stripe);
}

/* ============================================================
   MODO LECTURA
   ============================================================ */
.reading-mode {
    max-width: 760px !important;
    margin: 0 auto !important;
}

.reading-mode .site-header,
.reading-mode .site-footer,
.reading-mode .breadcrumb,
.reading-mode .sidebar,
.reading-mode .share-section,
.reading-mode .related-section,
.reading-mode .article-tags-section,
.reading-mode .article-interactions,
.reading-mode .author-box,
.reading-mode #readingModeBtn {
    display: none !important;
}

.reading-mode .article-image-wrap {
    margin-top: 2rem;
}

.reading-mode .article-header {
    padding-top: 0;
}

/* ============================================================
   COMPARTIR EN REDES SOCIALES
   ============================================================ */
.share-section {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--table-stripe);
}

.share-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--fg-muted);
}

.share-buttons {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: var(--bg);
    box-shadow: var(--neu-raised-sm);
    color: var(--fg-muted);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--neu-raised);
}

.share-btn.share-x:hover { color: #000; background: #e0e0e0; }
.share-btn.share-fb:hover { color: #fff; background: #1877f2; }
.share-btn.share-wa:hover { color: #fff; background: #25d366; }
.share-btn.share-tele:hover { color: #fff; background: #0088cc; }
.share-btn.share-linkedin:hover { color: #fff; background: #0a66c2; }
.share-btn.share-bluesky:hover { color: #fff; background: #1185fe; }
.share-btn.share-mastodon:hover { color: #fff; background: #6364ff; }
.share-btn.share-pocket:hover { color: #fff; background: #ef4056; }
.share-btn.share-copy:hover { color: var(--accent); }

[data-theme="dark"] .share-btn.share-x:hover { color: #fff; background: #1a1a1a; }

/* ============================================================
   VOTACIÓN ESTRELLAS
   ============================================================ */
#ratingStars .star {
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

#ratingStars .star:hover {
    transform: scale(1.2);
}

#ratingStars .star.active {
    color: var(--accent) !important;
}

/* ============================================================
   ARTÍCULOS RELACIONADOS
   ============================================================ */
.related-section {
    position: relative;
    z-index: 1;
    padding: 2.5rem 0;
    border-top: 1px solid var(--table-stripe);
}

.related-section .section-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ============================================================
   PÁGINA CATEGORÍA / ETIQUETA / BÚSQUEDA
   ============================================================ */
.page-header {
    text-align: center;
    padding: 2.5rem 0 1.5rem;
    position: relative;
    z-index: 1;
}

.page-header h1 { margin-bottom: 0.5rem; }
.page-header .page-desc { color: var(--fg-muted); font-size: 0.95rem; }

/* ============================================================
   LEGALES
   ============================================================ */
.legal-page { max-width: 800px; }
.legal-page h1 { margin-bottom: 0.5rem; }
.legal-page h2 { margin-top: 2rem; margin-bottom: 0.75rem; font-size: 1.3rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    position: relative;
    z-index: 1;
    margin-top: 3rem;
    background: var(--bg-secondary);
    box-shadow: inset 0 4px 12px var(--shadow-dark);
}

.g-footer {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .g-footer { grid-template-columns: 1fr; }
}

.footer-logo { height: 48px; margin-bottom: 0.5rem; }
.footer-logo-d { display: block; }
[data-theme="dark"] .footer-logo-d { display: none; }
.footer-logo-l { display: none; }
[data-theme="dark"] .footer-logo-l { display: block; }

.sb-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--fg);
}

.foot-link {
    display: block;
    color: var(--fg-muted);
    font-size: 0.88rem;
    padding: 0.35rem 0;
    transition: color 0.2s;
}

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

.cc-license {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--fg-light);
    font-size: 0.82rem;
}

.cc-license a { color: var(--fg-muted); }
.cc-license a:hover { color: var(--accent); }

.foot-bottom {
    text-align: center;
    padding: 1.25rem 0;
    font-size: 0.82rem;
    color: var(--fg-light);
    border-top: 1px solid var(--table-stripe);
    margin-top: 2rem;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast-box {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.85rem 1.25rem;
    border-radius: var(--btn-radius);
    background: var(--bg);
    box-shadow: var(--neu-raised);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fg);
    animation: toastIn 0.3s ease;
    max-width: 350px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.out { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateX(30px); }
}

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
}

/* ============================================================
   ADMIN — DASHBOARD
   ============================================================ */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
}

.admin-sidebar {
    background: var(--bg-secondary);
    box-shadow: inset -2px 0 8px var(--shadow-dark);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-sidebar-logo {
    height: 42px;
    margin-bottom: 1.5rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    border-radius: var(--btn-radius);
    color: var(--fg-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.admin-nav-link:hover { color: var(--fg); background: var(--accent-light); }

.admin-nav-link.active {
    color: var(--accent);
    box-shadow: var(--neu-inset-sm);
    background: var(--bg);
}

.admin-nav-link i { width: 20px; text-align: center; }

.admin-main {
    padding: 2rem;
    overflow-y: auto;
}

@media (max-width: 900px) {
    .admin-main { padding: 1rem; }
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 { font-size: 1.6rem; }
.admin-header-actions { display: flex; gap: 0.5rem; align-items: center; }

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg);
    border-radius: var(--card-radius);
    box-shadow: var(--neu-raised);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    box-shadow: var(--neu-raised-lg);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--bg);
    box-shadow: var(--neu-inset-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.2rem;
    color: var(--accent);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--fg);
    font-family: 'Playfair Display', serif;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--fg-muted);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   ADMIN — TABLA
   ============================================================ */
.table-wrap {
    background: var(--bg);
    border-radius: var(--card-radius);
    box-shadow: var(--neu-raised);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-table thead {
    background: var(--bg-secondary);
    box-shadow: inset 0 -2px 6px var(--shadow-dark);
}

.admin-table th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fg-muted);
}

.admin-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--table-stripe);
    vertical-align: middle;
}

.admin-table tbody tr { transition: background 0.15s; }
.admin-table tbody tr:hover { background: var(--accent-light); }

.admin-table .actions-cell {
    display: flex;
    gap: 0.35rem;
}

.table-responsive { overflow-x: auto; }

/* ============================================================
   ADMIN — MODAL
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg);
    border-radius: var(--card-radius);
    box-shadow: var(--neu-raised-lg);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(20px) scale(0.97); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.75rem 1rem;
}

.modal-header h2 { font-size: 1.3rem; }

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: var(--bg);
    box-shadow: var(--neu-raised-sm);
    color: var(--fg-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover { color: var(--danger); }
.modal-close:active { box-shadow: var(--neu-inset-sm); }
.modal-body { padding: 0 1.75rem 1.75rem; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.75rem 1.5rem;
}

/* Tags input admin */
.tags-input-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.6rem 0.8rem;
    background: var(--bg);
    border-radius: var(--input-radius);
    box-shadow: var(--neu-inset-sm);
    min-height: 46px;
    align-items: center;
    cursor: text;
}

.tags-input-wrap .tag {
    font-size: 0.78rem;
    padding: 0.2rem 0.65rem;
    cursor: default;
}

.tags-input-wrap .tag .tag-remove {
    margin-left: 0.3rem;
    cursor: pointer;
    opacity: 0.6;
    font-size: 0.7rem;
}

.tags-input-wrap .tag .tag-remove:hover {
    opacity: 1;
    color: var(--danger);
}

.tags-input-wrap input {
    border: none;
    background: none;
    outline: none;
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--fg);
    flex: 1;
    min-width: 80px;
    padding: 0.2rem 0;
}

/* Categorías admin */
.cat-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg);
    border-radius: var(--tag-radius);
    box-shadow: var(--neu-raised-sm);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--fg);
}

.cat-chip .cat-count { font-size: 0.75rem; color: var(--fg-light); font-weight: 400; }

.cat-chip button {
    background: none;
    border: none;
    color: var(--fg-light);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0;
    transition: color 0.2s;
}

.cat-chip button:hover { color: var(--danger); }

/* Form sections del modal */
.form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--table-stripe);
}

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

.form-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 1rem;
}

.img-preview {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: var(--input-radius);
    box-shadow: var(--neu-inset-sm);
    margin-top: 0.5rem;
}

/* ============================================================
   404
   ============================================================ */
.error-page {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.error-code {
    font-family: 'Playfair Display', serif;
    font-size: clamp(5rem, 15vw, 10rem);
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    text-shadow: 3px 3px 0 var(--shadow-dark), -2px -2px 0 var(--shadow-light);
    margin-bottom: 1rem;
}

.error-msg {
    font-size: 1.15rem;
    color: var(--fg-muted);
    margin-bottom: 2rem;
    max-width: 400px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--fg-muted);
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--fg-light);
    margin-bottom: 1rem;
    display: block;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--shadow-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-light); }

/* ============================================================
   SELECCIÓN DE TEXTO
   ============================================================ */
::selection {
    background: var(--accent);
    color: var(--accent-text);
}

/* ============================================================
   TRANSICIÓN GLOBAL TEMA EN ELEMENTOS NEUMÓRFICOS
   ============================================================ */
.site-header,
.site-footer,
.card,
.article-card,
.sidebar-card,
.stat-card,
.table-wrap,
.modal-content,
.btn,
.icon-btn,
.tag,
.page-link,
.login-card,
.toast,
.popular-num,
.tags-input-wrap,
.cat-chip,
.share-btn {
    transition: background 0.4s ease, box-shadow 0.4s ease, color 0.3s ease, transform 0.2s ease;
}

/* ============================================================
   NUEVAS FUNCIONALIDADES
   ============================================================ */

/* Tamaños de texto personalizables */
[data-text-size="small"] .article-content {
    font-size: 0.9rem;
}
[data-text-size="small"] .article-content p {
    font-size: 0.9rem;
}
[data-text-size="medium"] .article-content {
    font-size: 1rem;
}
[data-text-size="medium"] .article-content p {
    font-size: 1rem;
}
[data-text-size="large"] .article-content {
    font-size: 1.2rem;
}
[data-text-size="large"] .article-content p {
    font-size: 1.2rem;
}
[data-text-size="large"] .article-content h2 {
    font-size: 1.8rem;
}
[data-text-size="large"] .article-content h3 {
    font-size: 1.4rem;
}

.text-size-btn.active {
    color: var(--accent) !important;
    box-shadow: var(--neu-inset-sm) !important;
}

/* Botón volver arriba */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--bg);
    box-shadow: var(--neu-raised);
    color: var(--fg-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

#backToTop.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#backToTop:hover {
    color: var(--accent);
    box-shadow: var(--neu-raised-lg);
    transform: translateY(-2px);
}

#backToTop:active {
    box-shadow: var(--neu-inset-sm);
}

/* Tabla de contenido */
.toc {
    background: var(--bg);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--neu-inset-sm);
}

.toc h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--table-stripe);
}

.toc li:last-child {
    border-bottom: none;
}

.toc a {
    color: var(--fg-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.toc a:hover {
    color: var(--accent);
}

.article-content h2[id] {
    scroll-margin-top: 100px;
}

/* Notas al pie */
.footnotes {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--accent-light);
    font-size: 0.9rem;
    color: var(--fg-muted);
}

.footnotes h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.footnotes ol {
    padding-left: 1.5rem;
}

.footnotes li {
    margin-bottom: 0.5rem;
}

.footnote-back {
    text-decoration: none;
    color: var(--accent);
    font-size: 0.8rem;
}

/* Responsive para grid grande de destacados */
@media (max-width: 900px) {
    .featured-grid-large {
        grid-template-columns: 1fr 1fr !important;
        grid-auto-rows: auto !important;
    }
    .featured-grid-large > div:first-child {
        grid-row: span 1 !important;
        grid-column: span 2 !important;
    }
}

@media (max-width: 600px) {
    .featured-grid-large {
        grid-template-columns: 1fr !important;
    }
    .featured-grid-large > div:first-child {
        grid-column: span 1 !important;
    }
}

/* Mapa de lectores */
.mapa-emojis {
    font-size: 3rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
}

.mapa-emojis span {
    display: inline-block;
    transition: transform 0.3s;
}

.mapa-emojis span:hover {
    transform: scale(1.3);
}

/* ============================================================
   CITAS DESTACADAS CON DISEÑO ESPECIAL
   ============================================================ */

/* Cita destacada (usar <blockquote class="featured">) */
.article-content blockquote.featured {
    margin: 2rem auto;
    padding: 2rem 2.5rem;
    max-width: 650px;
    background: var(--bg);
    border-radius: var(--card-radius);
    box-shadow: var(--neu-raised);
    border-left: none;
    border: 2px solid var(--accent);
    font-size: 1.4rem;
    line-height: 1.6;
    text-align: center;
    color: var(--fg);
    position: relative;
}

.article-content blockquote.featured::before {
    content: '\201C';
    font-size: 4rem;
    font-family: 'Playfair Display', serif;
    color: var(--accent);
    position: absolute;
    top: -0.5rem;
    left: 0.5rem;
    opacity: 0.3;
}

.article-content blockquote.featured::after {
    content: '\201D';
    font-size: 4rem;
    font-family: 'Playfair Display', serif;
    color: var(--accent);
    position: absolute;
    bottom: -2rem;
    right: 0.5rem;
    opacity: 0.3;
}

.article-content blockquote.featured cite {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-style: normal;
    color: var(--fg-muted);
}

.article-content blockquote.featured cite::before {
    content: '— ';
}

/* Cita con borde lateral (usar <blockquote class="sidebar-quote">) */
.article-content blockquote.sidebar-quote {
    float: right;
    max-width: 250px;
    margin: 0.5rem 0 1rem 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg);
    border-radius: var(--card-radius);
    box-shadow: var(--neu-raised-sm);
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--fg-muted);
    border-left: 3px solid var(--accent);
    font-style: italic;
}

.article-content blockquote.sidebar-quote cite {
    display: block;
    font-size: 0.8rem;
    font-style: normal;
    color: var(--fg-light);
    margin-top: 0.25rem;
}

/* Cita con fondo (usar <blockquote class="highlight-quote">) */
.article-content blockquote.highlight-quote {
    margin: 1.5rem 0;
    padding: 1.5rem 2rem;
    background: var(--bg);
    border-radius: var(--card-radius);
    box-shadow: var(--neu-inset);
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--fg);
    border-left: none;
    font-style: italic;
}

.article-content blockquote.highlight-quote cite {
    display: block;
    font-size: 0.85rem;
    font-style: normal;
    color: var(--accent);
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .article-content blockquote.featured {
        font-size: 1.1rem;
        padding: 1.5rem;
    }
    .article-content blockquote.sidebar-quote {
        float: none;
        max-width: 100%;
        margin: 1rem 0;
    }
}

/* ============================================================
   VISTA LISTA COMPACTA
   ============================================================ */

.articles-grid.view-list .article-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 0;
    overflow: hidden;
    min-height: 120px;
}

.articles-grid.view-list .article-card .article-card-img {
    width: 200px;
    height: 120px;
    object-fit: cover;
    flex-shrink: 0;
}

.articles-grid.view-list .article-card .article-card-body {
    padding: 1rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.articles-grid.view-list .article-card .article-card-title {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.articles-grid.view-list .article-card .article-card-summary {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
}

.articles-grid.view-list .article-card .article-card-meta {
    padding-top: 0.5rem;
    margin-top: 0.25rem;
}

.articles-grid.view-list .article-card .article-card-actions {
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .articles-grid.view-list .article-card {
        flex-direction: column;
    }
    .articles-grid.view-list .article-card .article-card-img {
        width: 100%;
        height: 150px;
    }
}

/* Botones de cambio de vista */
.view-toggle-container {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    margin-bottom: 1rem;
}

.view-toggle-btn.active {
    color: var(--accent) !important;
    box-shadow: var(--neu-inset-sm) !important;
}

/* ============================================================
   COLORES POR CATEGORÍA
   ============================================================ */

/* Colores por defecto para las categorías */
.category-color-ensayos { --cat-color: #b8860b; --cat-color-light: rgba(184, 134, 11, 0.15); }
.category-color-opinion { --cat-color: #2c7a7a; --cat-color-light: rgba(44, 122, 122, 0.15); }
.category-color-poesia { --cat-color: #8b3a8b; --cat-color-light: rgba(139, 58, 139, 0.15); }

/* Aplicar color a la tarjeta del artículo */
.article-card[data-category] {
    border-top: 3px solid var(--cat-color, var(--accent));
}

.article-card[data-category] .article-card-category {
    color: var(--cat-color, var(--accent));
}

.article-card[data-category] .article-card-category::before {
    content: '■ ';
    font-size: 0.65rem;
    color: var(--cat-color, var(--accent));
}

.article-card[data-category]:hover {
    box-shadow: var(--neu-raised-lg), 0 0 0 1px var(--cat-color-light, var(--accent-light));
}

/* Artículo destacado con color */
.article-card.featured[data-category] {
    border: 2px solid var(--cat-color, var(--accent));
}

/* ============================================================
   ADMIN - CATEGORÍAS CON COLOR
   ============================================================ */

.cat-chip {
    border-left: 4px solid var(--accent);
}