/* Skeleton Loader Styles */
.skeleton-loader-container-s2 {
    margin-top: 10px;
    text-align: center;
}

.skeleton-message-s2 {
    margin-bottom: 10px;
}

.skeleton-line-s2 {
    height: 20px;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 10px auto;
    width: 80%;
    max-width: 500px;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

.skeleton-line-s2.shorter {
    width: 40%;
    max-width: 200px;
    height: 16px;
}

.skeleton-grid-s2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    padding: 0px;
}

.skeleton-post-s2 {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.skeleton-thumbnail-s2 {
    height: 160px;
    background: #e0e0e0;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

.skeleton-title-s2 {
    height: 20px;
    background: #e0e0e0;
    margin: 15px;
    border-radius: 4px;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

.skeleton-author-s2 {
    display: flex;
    align-items: center;
    padding: 0 15px 15px;
}

.skeleton-avatar-s2 {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    margin-right: 10px;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

.skeleton-name-s2 {
    height: 16px;
    background: #e0e0e0;
    flex-grow: 1;
    border-radius: 4px;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

@keyframes skeleton-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Cuando se cargan los posts reales */
#post-list-s2.active ~ .skeleton-loader-container-s2 {
    display: none;
}

#post-list-s2.active {
    display: block !important;
}


/* Contenedor del slider de categorías */
.slider-container-s2 {
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
    background: #fff;
    border-radius: 6px;
}

/* Lista horizontal de categorías */
.categories-slider-s2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-nav-s2 {
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.3s ease;
    background: #f2f4f5;
    color: #122b46;
}

.categories-wrapper-s2 {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.categories-list-s2 {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    scroll-behavior: smooth;
    white-space: nowrap;
}

.categories-list-s2::-webkit-scrollbar {
    display: none;
}

.category-item-s2 a {
    display: block;
    padding: 2px 12px;
    background: #f2f4f5;
    border-radius: 6px;
    text-decoration: none;
    color: #122b46;
    font-size: 14px;
    transition: background 0.3s ease;
}

/* Grid de publicaciones al estilo de tarjetas YouTube */
.post-grid-s2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

/* Tarjeta de publicación */
.post-item-s2 {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Miniatura 16:9 estilo YouTube */
.post-thumbnail-s2 {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #ddd;
    border-radius: 6px 6px 0 0;
}

.post-thumbnail-s2 img {
    position: absolute;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

/* Título de publicación */
.post-title-s2 {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    padding: 8px 6px 4px;
    color: #0f0f0f;
    margin: 0;
}

/* Autor de la publicación */
.post-author-s2 {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 6px 8px;
}

img.author-avatar-s2 {
    width: 32px;
    height: 32px;
    border-radius: 50% !important;
    object-fit: cover;
}

.author-name-s2 {
    font-size: 13px;
    color: #606060;
}

/* Imagen oculta si hay error */
.hide-image {
    display: none;
}

/* Botón de cargar más */
#load-more-posts-s2 {
    display: block;
    margin: 12px auto;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    background: #f2f4f5;
    color: #122b46;
    font-size: 14px;
    font-weight: 400;
}

#load-more-posts-s2:hover {
    color: #007cff;
}

/* Mensaje central */
.select-message-s2 {
    text-align: center;
    margin: 10px 0;
    color: #122b46;
    background: #f2f4f5;
    padding: 8px;
    border-radius: 6px;
    display: inline-block;
    width: 100%;
    font-size: 14px;
    font-weight: 400;
}