/* =========================
   VARIABLES
========================= */
:root {
    --sidebar-size: 40px;
    --accent: #df1515;#pageSlider::-webkit-slider-thumb {
}

/* =========================
   BASE
========================= */
body {
    margin: 0;
    background: #111;
    color: white;
    font-family: Arial;
}

/* =========================
   SIDEBAR
========================= */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-size);
    height: 100vh;
    background: #0a0a0a;

    display: flex;
    flex-direction: column;
    align-items: center;
}

/* pequeño espacio superior */
.sidebar::before {
    content: "";
    height: 10px;
    width: 100%;
    display: block;
}

/* enlaces */
.sidebar a {
    color: white;
    text-decoration: none;
    font-size: 20px;
    margin: 0; /* 👈 importante */
}

/* =========================
   BOTONES NAV (ICONOS GRANDES)
========================= */
.nav-item {
    width: var(--sidebar-size);  
    height: var(--sidebar-size);  
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: visible !important;           
}

.icon {
   
    width: 22px !important; 
    height: 22px !important;    
    object-fit: contain;
    transition: transform 0.2s ease;
    filter: invert(1); /* Para que sean blancos si son negros */
}

/* Efecto al pasar el ratón o tocar: se agrandan más todavía */
.nav-item:active .icon {
    transform: scale(1.2); /* Crece un 20% al pulsar */
    filter: invert(1) brightness(1.5);
}

/* =========================
   ICONOS
========================= */
.icon {
    width: 16px;   /* proporcional a 40px */
    height: 16px;
    filter: invert(1) brightness(0.8);
}

/* activo */
.nav-item.active .icon {
    filter: invert(1);
}

/* click */
.icon:active {
    transform: scale(0.9);
    filter: invert(1) brightness(1.5);
}

/* =========================
   CONTENT
========================= */
.content {
    margin-left: var(--sidebar-size);  /* 👈 SIEMPRE sincronizado */
    padding: 20px;
}

/* =========================
   GRID
========================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 20px;
}

/* =========================
   CARDS
========================= */
.card {
    text-align: center;
    text-decoration: none;
    color: white;
}

.card:active {
    transform: scale(0.95);
}

.card img {
    width: 100%;
    height: 225px;
    object-fit: cover;
    border-radius: 8px;
}

.card img {
    width: 100%;
    height: 225px;
    object-fit: cover;
    border-radius: 8px;
}
/* HOME SIEMPRE ROJO */
.nav-item.home {
    background: var(--accent) !important;
}

.nav-item.home .icon {
    filter: invert(1) !important;
}
.topbar {
    height: var(--sidebar-size);   /* 👈 misma altura que icono */
    display: flex;
    align-items: center;
    padding-left: 12px;
}

.topbar h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}
.bg {
    position: fixed;
    inset: 0;

    background-size: cover;
    background-position: center;

    filter: blur(0px) brightness(0.10);
    transform: scale(1.1);

    z-index: -1;
    transition: background-image 0.5s ease;
}
.reading-progress{
    width:100%;
    height:4px;
    background:#222;
    margin-top:6px;
    border-radius:2px;
    overflow:hidden;
}

.reading-progress-fill{
    height:100%;
    background:#df1515;
    transition:width .3s;
}