/* ... (Estilos generales, header, pantalla de carga, menú de config, carrusel héroe, carruseles de contenido, etc. sin cambios) ... */
body { font-family: 'Arial', sans-serif; background-color: #f0f0f5; margin: 0; padding: 0 0 70px 0; color: #333; overscroll-behavior-y: contain; transition: background-color 0.3s ease, color 0.3s ease; }
body.modal-open, body.reels-active { overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }
/* ... (Estilos de header y menú de configuración) ... */
header { background: linear-gradient(90deg, #ff0f94, #f7d94c); color: #fff; padding: 15px 0; text-align: center; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); position: sticky; top: 0; z-index: 1001; display: flex; align-items: center; justify-content: center; }
header h1 { margin: 0; font-size: 1.6em; flex-grow: 1; text-align: center; padding-left: 40px; }
#settings-btn { position: absolute; top: 50%; right: 15px; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 8px; z-index: 1002; }
#settings-btn svg { stroke: #fff; display: block; width: 24px; height: 24px; }
.settings-menu { position: absolute; top: 100%; right: 5px; background-color: #fff; border: 1px solid #ccc; border-radius: 5px; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15); display: none; flex-direction: column; z-index: 1001; width: 230px; overflow: hidden; }
.settings-menu.open { display: flex; }
.settings-item { padding: 12px 15px; text-align: left; border: none; background: none; cursor: pointer; font-size: 0.95em; color: #333; transition: background-color 0.2s ease; border-bottom: 1px solid #eee; width: 100%; box-sizing: border-box; }
.settings-item:last-of-type { border-bottom: none; }
.settings-item:hover { background-color: #f0f0f0; }
.settings-copyright { padding: 10px 15px; font-size: 0.75em; color: #777; text-align: center; background-color: #f9f9f9; border-top: 1px solid #eee; }

main#main-content-area { width: 90%; max-width: 1200px; margin: 20px auto; padding-bottom: 20px; }
section { margin-bottom: 40px; }
section h2, #categories-view > h2, #reels-view > h2, #favorites-view > h2 { color: #333; font-size: 1.8em; margin-top: 0; margin-bottom: 20px; border-bottom: 2px solid #ff6b6b; padding-bottom: 10px; }
.loading-message, .error-message, .info-message { width: 100%; text-align: center; padding: 20px; font-style: italic; color: #777; }
.error-message { color: #d9534f; }
.view-section { display: none; }
.view-section.active-view { display: block; }

#hero-carousel-section { margin-bottom: 40px; background-color: #e0e0e0; }
.carousel-container { position: relative; width: 100%; max-width: 1200px; margin: auto; height: 400px; overflow: hidden; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.carousel-slides { display: flex; width: 100%; height: 100%; transition: transform 0.7s ease-in-out; }
.carousel-slide { min-width: 100%; height: 100%; box-sizing: border-box; background-size: cover; background-position: center center; position: relative; display: flex; align-items: flex-end; }
.carousel-slide a.slide-link { display: block; width: 100%; height: 100%; text-decoration: none; color: inherit; position: relative; }
.slide-caption { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0) 100%); color: white; padding: 30px 20px 20px 20px; box-sizing: border-box; }
.slide-caption h3 { margin: 0; font-size: 1.6em; line-height: 1.3; max-height: 3.9em; overflow: hidden; text-overflow: ellipsis; }
.carousel-dots { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.carousel-dot { width: 10px; height: 10px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.5); cursor: pointer; transition: background-color 0.3s ease, transform 0.3s ease; }
.carousel-dot:hover { background-color: rgba(255, 255, 255, 0.8); transform: scale(1.2); }
.carousel-dot.active { background-color: #ffffff; transform: scale(1.2); }

.content-carousel-wrapper { position: relative; padding: 0; margin-bottom: 20px; }
.content-carousel { overflow-x: auto; width: 100%; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #ff6b6b #f0f0f5; }
.content-carousel::-webkit-scrollbar { height: 8px; }
.content-carousel::-webkit-scrollbar-track { background: #f0f0f5; border-radius: 4px; }
.content-carousel::-webkit-scrollbar-thumb { background: #ff6b6b; border-radius: 4px; }
.content-carousel::-webkit-scrollbar-thumb:hover { background: #e05252; }
.content-carousel-track { display: flex; gap: 15px; padding: 10px 5px; }
.content-carousel-track .post { min-width: 280px; max-width: 280px; flex-shrink: 0; height: auto; }

.news-container#all-news-container { display: flex; flex-wrap: wrap; gap: 20px; min-height: 100px; }
.news-container#all-news-container .post { background: #fff; flex-basis: calc(25% - 15px); min-width: auto; max-width: none; }
#all-news-loading-trigger { height: 60px; display: flex; align-items: center; justify-content: center; width: 100%;}
#all-news-loading-trigger .loading-message { padding: 10px; font-size: 0.9em;}


.post { background: #fff; box-sizing: border-box; padding: 15px; border-radius: 15px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.post:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12); }
.post img.featured-post-image { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; background-color: #eee; }
.post .no-image-placeholder { width: 100%; height: 180px; background: #e9e9e9; border-radius: 10px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 0.9em; }
.post h3 { color: #000000; font-size: 1.1em; margin: 0 0 5px 0; line-height: 1.3; height: 3.9em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.post-date { font-size: 0.75em; color: #888; margin-bottom: 8px; }
.post .excerpt-content { font-size: 0.9em; line-height: 1.5; color: #555; flex-grow: 1; margin-bottom: 10px; height: 4.5em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.post .read-more-btn { display: inline-block; margin-top: auto; padding: 10px 15px; background: #ff6b6b; color: #fff; text-decoration: none; border-radius: 5px; transition: background 0.3s ease, color 0.3s ease; border: none; cursor: pointer; text-align: center; width: 100%; }
.post .read-more-btn:hover { background: #f7d94c; color: #333; }
.favorite-btn { position: absolute; top: 10px; right: 10px; background: rgba(255, 255, 255, 0.8); border: none; border-radius: 50%; width: 38px; height: 38px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.2s ease, color 0.2s ease, background-color 0.2s ease; padding: 0; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.favorite-btn svg.star-icon-svg { width: 22px; height: 22px; stroke: #b0b0b0; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.favorite-btn:hover { transform: scale(1.15); background: rgba(255, 255, 255, 0.95); }
.favorite-btn.is-favorite svg.star-icon-svg { stroke: #ffd700; fill: #ffd700; }
.favorite-btn.is-favorite:hover svg.star-icon-svg { stroke: #fcc400; fill: #fcc400; }

/* ESTILOS PARA VISTA DE CATEGORÍAS */
.search-bar-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}
#category-search-input {
    flex-grow: 1;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 0.95em;
}
#category-search-btn {
    padding: 8px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
#category-search-btn svg {
    stroke-width: 2.5;
}
#category-search-btn:hover {
    background-color: #e05252;
}

#category-selector-container { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 25px; justify-content: center; }

/* Contenedor de posts para categorías (vista en cascada/lista) */
.news-list-container#category-posts-container {
    display: flex;
    flex-direction: column; /* Apila los posts verticalmente */
    gap: 20px; /* Espacio entre posts */
}
.news-list-container#category-posts-container .post {
    flex-basis: auto; /* Permitir que tome el ancho completo (o el que le dé su contenedor) */
    width: 100%; /* Ocupar todo el ancho disponible */
    max-width: 100%; /* Asegurar que no se exceda */
    min-width: initial; /* Resetear min-width */
}
#category-posts-loading-trigger {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}


#bottom-menu { position: fixed; bottom: 0; left: 0; width: 100%; background-color: #ffffff; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15); display: flex; justify-content: space-around; align-items: stretch; padding: 0; z-index: 1000; border-top: 1px solid #e0e0e0; height: 60px; }
.menu-btn { background: none; border: none; color: #757575; cursor: pointer; text-align: center; padding: 8px 5px; font-size: 0.75em; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: color 0.2s ease, background-color 0.2s ease; flex-grow: 1; max-width: 25%; line-height: 1.2; }
.menu-btn .menu-icon { margin-bottom: 3px; line-height: 1; }
.menu-btn .menu-icon svg { width: 24px; height: 24px; }
.menu-btn:hover { background-color: #f5f5f5; color: #ff6b6b; }
.menu-btn.active-menu-btn { color: #ff6b6b; }

#article-modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); align-items: center; justify-content: center; padding: 15px; box-sizing: border-box; }
.modal-content-wrapper { background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,0.25); width: 100%; max-width: 750px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eaeaea; padding-bottom: 12px; margin-bottom: 15px; flex-shrink: 0; }
.modal-header h2 { margin: 0; font-size: 1.5em; color: #333; line-height: 1.3; flex-grow: 1; padding-right: 10px; }
.modal-body { overflow-y: auto; flex-grow: 1; line-height: 1.6; font-size: 0.95em; color: #444; padding-right: 5px; }
.article-meta-date { font-size: 0.8em; color: #777; margin-bottom: 10px; text-align: left; }
img.featured-article-image-modal { max-width: 100%; height: auto; max-height: 300px; object-fit: contain; border-radius: 6px; margin: 0 auto 15px auto; display: block; background-color: #f5f5f5; }
#modal-article-full-content .wp-block-embed iframe, #modal-article-full-content iframe { display: block; margin: 15px auto; max-width: 100%; border: none; aspect-ratio: 16 / 9; width: 100%; height: auto; }
#modal-article-full-content .wp-block-embed__wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; margin: 15px 0; }
#modal-article-full-content .wp-block-embed__wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin: 0; }
#modal-article-full-content p { margin-bottom: 1em; } #modal-article-full-content img { max-width: 100%; height: auto; border-radius: 4px; margin: 15px 0; display: block; }
#modal-article-full-content h1, #modal-article-full-content h2, #modal-article-full-content h3, #modal-article-full-content h4 { margin-top: 1.5em; margin-bottom: 0.8em; line-height: 1.3; color: #333; }
#modal-article-full-content ul, #modal-article-full-content ol { padding-left: 25px; margin-bottom: 1em; }
#modal-article-full-content blockquote { border-left: 3px solid #ff6b6b; padding-left: 15px; margin: 1em 0; font-style: italic; color: #555;}
.modal-comments-section { margin-top: 25px; padding-top: 20px; border-top: 1px solid #eee; }
.modal-comments-section h4 { font-size: 1.2em; color: #333; margin-bottom: 15px; }
#disqus_thread { background-color: #f9f9f9; padding: 10px; border-radius: 4px; min-height: 100px; }
.modal-footer { border-top: 1px solid #eaeaea; padding-top: 15px; margin-top: 20px; display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-shrink: 0; }
.modal-action-btn { padding: 8px 12px; border-radius: 5px; border: 1px solid #ccc; background-color: #f8f8f8; cursor: pointer; font-size: 0.9em; transition: background-color 0.2s, border-color 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.modal-action-btn:hover { background-color: #efefef; border-color: #bbb; }
.modal-action-btn#modal-close-btn { font-size: 1.5em; font-weight: bold; color: #999; background: none; border: none; padding: 0 5px; line-height: 1; order: 2; }
.modal-action-btn#modal-close-btn:hover { color: #555; background: none; }
.modal-action-btn.favorite-action-btn svg.star-icon-modal { width: 18px; height: 18px; stroke: #777; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.modal-action-btn.favorite-action-btn.is-favorite svg.star-icon-modal { stroke: #ffd700; fill: #ffd700; }
.modal-action-btn.comments-action-btn svg { width: 18px; height: 18px; stroke: #777; }

#reels-view { }
#reels-viewport { width: 100%; height: calc(100vh - 50px - 60px - 40px); max-height: 700px; margin: auto; overflow: hidden; position: relative; background-color: #111; border-radius: 0; }
#reels-track { display: flex; flex-direction: column; width: 100%; height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
#reels-track::-webkit-scrollbar { display: none; }
.reel-item { width: 100%; height: 100%; flex-shrink: 0; scroll-snap-align: start; position: relative; background-size: cover; background-position: center; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; color: white; }
.reel-item::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 40%, transparent 100%); z-index: 1; }
.reel-overlay-content { position: relative; z-index: 2; padding: 20px; text-align: left; width: 100%; box-sizing: border-box; max-width: 600px; margin-left: auto; margin-right: auto; }
.reel-title { font-size: 1.4em; font-weight: bold; margin: 0 0 8px 0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.reel-date { font-size: 0.8em; color: rgba(255,255,255,0.7); margin-bottom: 8px;}
.reel-excerpt { font-size: 0.9em; margin: 0 0 15px 0; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.reel-read-more-btn { display: inline-block; padding: 8px 15px; background-color: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.8); color: white; border-radius: 20px; text-decoration: none; font-size: 0.9em; cursor: pointer; transition: background-color 0.3s, border-color 0.3s; }
.reel-read-more-btn:hover { background-color: rgba(255, 255, 255, 0.3); border-color: white; }

.pagination-controls { display: none; }
#scrollToTopBtn { display: none; position: fixed; bottom: 75px; right: 20px; z-index: 999; border: none; outline: none; background-color: #ff6b6b; color: white; cursor: pointer; padding: 0; width: 48px; height: 48px; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.2); opacity: 0; transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; visibility: hidden; display: flex; align-items: center; justify-content: center; }
#scrollToTopBtn.visible { display: flex; opacity: 1; visibility: visible; }
#scrollToTopBtn:hover { background-color: #e05252; }
#scrollToTopBtn svg { width: 24px; height: 24px; stroke-width: 2.5; }

@media (max-width: 1200px) { .news-container#all-news-container .post { flex-basis: calc(33.333% - 13.33px); } }
@media (max-width: 768px) { main#main-content-area { width: 95%; } .news-container#all-news-container .post { flex-basis: calc(50% - 7.5px); } .news-container#all-news-container { gap: 15px; } .post h3 { font-size: 1em; height: 3em; -webkit-line-clamp: 2;} .post .excerpt-content { font-size: 0.85em; height: 4.25em; -webkit-line-clamp: 3; } .modal-content-wrapper { padding: 15px; max-width: 95%; } .modal-header h2 { font-size: 1.3em; } .modal-body { font-size: 0.9em; } .modal-footer { flex-direction: row; justify-content: space-around; } .content-carousel-track .post { min-width: 240px; max-width: 240px; } #reels-viewport { height: calc(100vh - 45px - 60px - 20px); border-radius: 0; } .reel-title { font-size: 1.2em; } .reel-excerpt { font-size: 0.85em; } }
@media (max-width: 600px) { body { padding-bottom: 60px; } header h1 { font-size: 1.5em; padding-left: 30px; padding-right: 30px;} #settings-btn { right: 5px; } .settings-menu { right: 5px; width: 200px; } section h2, #categories-view > h2, #reels-view > h2, #favorites-view > h2 { font-size: 1.5em; } .news-container#all-news-container .post { flex-basis: 100%; } .content-carousel-track .post { min-width: 220px; max-width: 220px; } .post { padding: 12px; } .post img.featured-post-image, .post .no-image-placeholder { height: 160px; } .post h3 { font-size: 1.05em; height: auto; -webkit-line-clamp: 3; } .post .excerpt-content { font-size: 0.8em; height: auto; -webkit-line-clamp: 4; } .post .read-more-btn { padding: 9px 13px; font-size: 0.9em; } .favorite-btn svg.star-icon-svg { width: 20px; height: 20px; } .favorite-btn { width: 34px; height: 34px; } .modal-content-wrapper { max-height: 88vh; padding: 10px; } .modal-header h2 { font-size: 1.2em; } .modal-body { font-size: 0.85em; } .modal-action-btn { font-size: 0.8em; padding: 6px 10px;} .modal-action-btn svg { width: 16px; height: 16px; } .menu-btn .menu-text { font-size: 0.8em; } .menu-btn .menu-icon svg { width: 22px; height: 22px; } #bottom-menu { height: 56px; } #reels-viewport { height: calc(100vh - 48px - 56px - 20px); } .reel-title { font-size: 1.2em; } .reel-excerpt { font-size: 0.8em; -webkit-line-clamp: 3; } }
@media (max-width: 480px) { .content-carousel-track .post { min-width: 180px; max-width: 180px; } .reel-title { font-size: 1.1em; } .reel-excerpt { font-size: 0.8em; -webkit-line-clamp: 2; } header h1 { font-size: 1.3em; } }

body.dark-mode { background-color: #121212; color: #e0e0e0;}
body.dark-mode header { background: linear-gradient(90deg, #ff0080, #8f0967); } 
body.dark-mode #settings-btn svg { stroke: #e0e0e0; }
body.dark-mode #settings-btn:hover { background-color: rgba(255, 255, 255, 0.05); }
body.dark-mode .settings-menu { background-color: #1e1e1e; border-color: #333; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5); }
body.dark-mode .settings-item { color: #e0e0e0; border-bottom-color: #333; }
body.dark-mode .settings-item:hover { background-color: #2a2a2a; color: #ff008b; } 
body.dark-mode .settings-copyright { color: #aaa; background-color: #1a1a1a; border-top-color: #333;}
body.dark-mode section h2, body.dark-mode #categories-view > h2, body.dark-mode #reels-view > h2, body.dark-mode #favorites-view > h2 { color: #e0e0e0; border-bottom-color: #ff006a; }
body.dark-mode .loading-message, body.dark-mode .error-message, body.dark-mode .info-message { color: #aaa; }
body.dark-mode .error-message { color: #cf6679; } 
body.dark-mode .post { background-color: #1e1e1e; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); }
body.dark-mode .post:hover { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6); }
body.dark-mode .post h3 { color: #ffffff; }
body.dark-mode .post-date, body.dark-mode .post .excerpt-content { color: #b0b0b0; }
body.dark-mode .post .read-more-btn { background-color: #ff008b; color: #ffffff; }
body.dark-mode .post .read-more-btn:hover { background-color: #ff008b; color: #e0e0e0; }
body.dark-mode .post .favorite-btn { background: rgba(44, 44, 46, 0.8); box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
body.dark-mode .post .favorite-btn svg.star-icon-svg { stroke: #888; }
body.dark-mode .post .favorite-btn.is-favorite svg.star-icon-svg { stroke: #fdd835; fill: #fdd835; }
body.dark-mode .news-container#all-news-container .post { background-color: #1e1e1e; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); }
body.dark-mode .news-container#all-news-container .post h3 { color: #ffffff; }
body.dark-mode .news-container#all-news-container .post .post-date,
body.dark-mode .news-container#all-news-container .post .excerpt-content { color: #b0b0b0; }
body.dark-mode .news-container#all-news-container .post .read-more-btn { background-color: #ff008b; color: #ffffff; }
body.dark-mode .news-container#all-news-container .post .read-more-btn:hover { background-color: #ff008b; color: #e0e0e0; }
body.dark-mode .news-container#all-news-container .post .favorite-btn { background: rgba(44, 44, 46, 0.8); box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
body.dark-mode .news-container#all-news-container .post .favorite-btn svg.star-icon-svg { stroke: #888; }
body.dark-mode .news-container#all-news-container .post .favorite-btn.is-favorite svg.star-icon-svg { stroke: #fdd835; fill: #fdd835; }
body.dark-mode #category-search-input { background-color: #2c2c2e; border-color: #444; color: #bbb; }
body.dark-mode #category-search-btn { background-color: #ff008b; }
body.dark-mode #category-search-btn svg { stroke: #121212; }
body.dark-mode #bottom-menu { background-color: #1e1e1e; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5); border-top-color: #333; }
body.dark-mode .menu-btn { color: #aaa; }
body.dark-mode .menu-btn:hover, body.dark-mode .menu-btn.active-menu-btn { color: #ff008b; background-color: #2a2a2a; }
body.dark-mode #article-modal .modal-content-wrapper { background-color: #1e1e1e; box-shadow: 0 5px 20px rgba(0,0,0,0.5); }
body.dark-mode #article-modal .modal-header { border-bottom-color: #333; }
body.dark-mode #article-modal .modal-header h2 { color: #e0e0e0; }
body.dark-mode #article-modal .modal-action-btn#modal-close-btn { color: #aaa; }
body.dark-mode #article-modal .modal-action-btn#modal-close-btn:hover { color: #fff; }
body.dark-mode #article-modal .modal-body { color: #ccc; }
body.dark-mode .article-meta-date { color: #888; }
body.dark-mode #article-modal #modal-article-full-content h1, 
body.dark-mode #article-modal #modal-article-full-content h2, 
body.dark-mode #article-modal #modal-article-full-content h3,
body.dark-mode #article-modal #modal-article-full-content h4 { color: #e0e0e0; }
body.dark-mode #article-modal #modal-article-full-content blockquote { border-left-color: #ff008b; color: #bbb; }
body.dark-mode #article-modal .modal-comments-section { border-top-color: #333; }
body.dark-mode #article-modal .modal-comments-section h4 { color: #e0e0e0; }
body.dark-mode #disqus_thread { background-color: #121212; border: 1px solid #333; } 
body.dark-mode #article-modal .modal-footer { border-top-color: #333; }
body.dark-mode #article-modal .modal-action-btn { background-color: #2a2a2a; border-color: #444; color: #bbb; }
body.dark-mode #article-modal .modal-action-btn:hover { background-color: #38383a; border-color: #555; }
body.dark-mode .modal-action-btn.favorite-action-btn svg.star-icon-modal { stroke: #888; }
body.dark-mode .modal-action-btn.favorite-action-btn.is-favorite svg.star-icon-modal { stroke: #fdd835; fill: #fdd835; }
body.dark-mode .modal-action-btn.comments-action-btn svg { stroke: #888; }
body.dark-mode #reels-viewport { background-color: #000; }
body.dark-mode .reel-item::before { background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 40%, transparent 100%); }
body.dark-mode .reel-title, body.dark-mode .reel-excerpt, body.dark-mode .reel-read-more-btn { color: #f5f5f5; }
body.dark-mode .reel-date { color: rgba(255,255,255,0.75); }
body.dark-mode .reel-read-more-btn { background-color: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); }
body.dark-mode .reel-read-more-btn:hover { background-color: rgba(255,255,255,0.2); border-color: #fff; }
body.dark-mode .content-carousel::-webkit-scrollbar-track { background: #2c2c2e; }
body.dark-mode .content-carousel::-webkit-scrollbar-thumb { background: #ff008b; }
body.dark-mode .content-carousel::-webkit-scrollbar-thumb:hover { background: #ff008b; }
body.dark-mode .carousel-container { background-color: #2c2c2e; }
body.dark-mode #scrollToTopBtn { background-color: #ff008b; color: #121212; box-shadow: 0 2px 8px rgba(0,0,0,0.5); }
body.dark-mode #scrollToTopBtn:hover { background-color: #ff008b; }
body.dark-mode #all-news-loading-trigger .loading-message, body.dark-mode #all-news-loading-trigger .info-message { color: #aaa; }

/* Al final de tus estilos o en una sección de botones */
.see-more-container {
    text-align: center;
    margin-top: 20px;
}

.see-more-btn {
    padding: 10px 25px;
    font-size: 1em;
    color: #fff;
    background-color: #ff6b6b;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.see-more-btn:hover:not(:disabled) {
    background-color: #e05252;
}
.see-more-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Modo Oscuro para el botón "Ver Más" */
body.dark-mode .see-more-btn {
    background-color: #ff0077;
    color: #ffffff;
}
body.dark-mode .see-more-btn:hover:not(:disabled) {
    background-color: #ff0077;
}

/* === ESTILOS PARA PANTALLA DE CARGA === */
body.loading-active { /* Esta clase se añadirá con JS para evitar el scroll del body */
    overflow: hidden;
}

#loading-overlay {
    position: fixed; /* Cubre toda la pantalla y se queda fija */
    top: 0;
    left: 0;
    width: 100vw; /* Ancho completo de la ventana */
    height: 100vh; /* Alto completo de la ventana */
    background-color: #1c1c1e; /* Fondo oscuro, similar al de tu imagen de ejemplo */
    display: none; /* INICIALMENTE OCULTA, JS la mostrará */
    flex-direction: column; /* Para centrar contenido verticalmente */
    align-items: center; /* Centrado horizontal */
    justify-content: center; /* Centrado vertical */
    z-index: 10000; /* Asegura que esté encima de todo */
    opacity: 0; /* Inicia transparente para un efecto de aparición (fade-in) */
    visibility: hidden; /* Inicia completamente oculta */
    transition: opacity 0.3s ease-in-out, visibility 0s linear 0.3s; /* Transición para ocultar */
}

#loading-overlay.visible { /* Clase que JS añadirá para mostrarla */
    display: flex;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease-in-out, visibility 0s linear 0s; /* Transición para mostrar */
}

#loading-overlay.hiding { /* Clase que JS añadirá para empezar a ocultarla */
    opacity: 0;
    visibility: hidden;
    /* La transición ya está definida en #loading-overlay, 
       pero esta clase asegura que el proceso de ocultación ha comenzado */
}

.loading-content {
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #f0f0f0; 
}

img.loading-logo-main {
    max-width: 260px; /* Ajusta el tamaño de tu logo (cargar.png) */
    max-height: 260px;
    margin-bottom: 20px;
}

.loading-spinner {
    width: 50px; 
    height: 50px;
    border-radius: 50%;
    border: 5px solid #555; 
    border-top-color: #ff0080; /* Color tipo "teal" para el spinner */
    animation: spin 1s linear infinite;
    margin-top: 20px; 
    margin-bottom: 50px; 
}

@keyframes spin { 
    to { 
        transform: rotate(360deg); 
    } 
}

.loading-studios {
    position: absolute; 
    bottom: 25px; /* Distancia desde el borde inferior */
    left: 50%;
    transform: translateX(-50%); /* Centrado horizontal */
    font-size: 0.85em;
    color: rgb(167, 167, 167); /* Un gris para el texto de ONF STUDIOS */
}

/* --- ESTILOS PARA MODO OSCURO DE LA PANTALLA DE CARGA (Opcional, si tu app tiene modo oscuro) --- */
body.dark-mode #loading-overlay { /* Si el body ya tiene .dark-mode cuando carga el JS */
    background-color: #121212; /* Un negro más profundo para el modo oscuro */
}
body.dark-mode .loading-content {
    color: #e0e0e0;
}
body.dark-mode .loading-spinner {
    border: 5px solid #404040; 
    border-top-color: #bb86fc; /* Un color lila para el spinner en modo oscuro */
}
body.dark-mode .loading-studios {
    color: #999;
}

/* Estilos para el contenedor del selector de categorías y el dropdown */
#category-selector-container {
    display: flex;
    flex-direction: column; /* Apila la etiqueta y el select */
    gap: 8px; /* Espacio entre la etiqueta y el select */
    margin-bottom: 25px;
    align-items: stretch; /* Para que el select ocupe el ancho */
}

.category-select-label { /* Estilo para la etiqueta "Elige una categoría:" */
    font-size: 0.95em;
    color: #444;
    font-weight: bold;
}

.category-select-dropdown {
    width: 100%; /* Ancho completo */
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    font-size: 1em;
    color: #333;
    box-sizing: border-box;
    cursor: pointer;
    /* Para un look más nativo, puedes dejar la apariencia por defecto del navegador */
    /* O añadir 'appearance: none;' y un background-image para una flecha custom si lo deseas */
}

.category-select-dropdown:disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
    color: #888;
}

/* Estilos para el modo oscuro del selector y la etiqueta */
body.dark-mode .category-select-label {
    color: #bbb;
}

body.dark-mode .category-select-dropdown {
    background-color: #2c2c2e;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .category-select-dropdown:disabled {
    background-color: #222;
    color: #666;
}
