/* styles.css - VERSIÓN DEFINITIVA (sidebar se expande/colapsa correctamente) */

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* === GRID PRINCIPAL - CLAVE PARA EXPANSIÓN === */
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    grid-template-columns: auto 1fr !important;   /* ← Esto permite que el contenido se expanda al 100% al colapsar la sidebar */
}

/* Header y filtros siempre ocupan el espacio disponible */
#main-header,
#category-filters {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

#main-header > div,
#category-filters > div {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* #content */
#content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding: 1rem;
}

/* Contención suave para carruseles y grids (evita desbordes) */
.carousel-wrapper,
.detail-view,
.episodes-list,
#results-grid,
#recommendations-grid,
.flex.overflow-x-auto {
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Botones de navegación carrusel */
.nav-btn {
    position: absolute;
    top: 0; bottom: 0; z-index: 40; width: 60px;
    display: none; align-items: center; justify-content: center;
}
.nav-btn.left  { left: 0; background: linear-gradient(to right, #050505 0%, transparent 100%); }
.nav-btn.right { right: 0; background: linear-gradient(to left, #050505 0%, transparent 100%); }
.nav-btn button {
    background: rgba(255,255,255,0.1); backdrop-filter: blur(10px);
    border-radius: 50%; width: 40px; height: 40px;
    border: 1px solid rgba(255,255,255,0.1); color: white; font-size: 20px;
}
.nav-btn button:hover { background: rgba(255,255,255,0.3); transform: scale(1.1); }
@media (min-width: 1024px) {
    .carousel-wrapper:hover .nav-btn { display: flex; }
}

/* Tarjetas y listados (originales) */
.card-std { min-width: 200px; width: 200px; display: flex; flex-direction: column; gap: 10px; }
.card-video {
    height: 220px; width: 220px; flex-shrink: 0; position: relative; overflow: hidden;
    border-radius: 12px; transition: width 0.5s cubic-bezier(0.25,1,0.5,1);
}
@media (min-width: 1024px) { .card-video:hover { width: 390px; } }

.card-list-group {
    min-width: 300px;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.list-item {
    display: flex; align-items: center; gap: 12px;
    padding: 6px; border-radius: 8px; transition: background 0.2s;
}
.list-item:hover { background: rgba(255,255,255,0.08); }

.overlay-full {
    position: absolute; inset: 0; background: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px); opacity: 0; transition: opacity 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 12px;
}
.group:hover .overlay-full { opacity: 1; }

.action-icon { width: 36px; height: 36px; transition: transform 0.2s; cursor: pointer; }
.play-icon-lg { width: 56px; height: 56px; transition: transform 0.2s; }
.play-icon-sm { width: 28px; height: 28px; }

.mobile-play-button {
    position: absolute; bottom: 8px; right: 8px; width: 32px; height: 32px;
    background: rgba(0,0,0,0.7); border-radius: 50%; display: flex;
    align-items: center; justify-content: center; z-index: 30;
}
@media (min-width: 1024px) { .mobile-play-button { display: none; } }

/* Reproductor y iconos */
#floating-player { transform: translateY(100%); transition: transform 0.3s ease; }
#floating-player.active { transform: translateY(0); }

.icon-white,
.podcast-icon-btn img,
.episode-action-btn img,
.episode-play-btn img,
.action-icon,
.play-icon-lg,
.play-icon-sm,
.mobile-play-button img,
.player-controls img {
    filter: brightness(0) invert(1);
}

/* List-item seguro */
.list-item { min-height: 56px; }
.list-item .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* Medida extra de seguridad para cualquier módulo futuro */
#content section,
#content .detail-view,
#content .grid { max-width: 100%; overflow-x: hidden; }
