/*
Theme Name: CDF Gaming
Author: CDF Gaming
Version: 1.3
Text Domain: cdfgaming
Description: Tema minimalista, tecnológico y optimizado para blogs de videojuegos y tecnología.
*/

:root {
    --bg-color: #0d1117;
    --text-color: #c9d1d9;
    --card-bg: #161b22;
    --accent-color: #01777f;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.light-mode {
    --bg-color: #f6f8fa;
    --text-color: #24292f;
    --card-bg: #ffffff;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

/* HEADER Y NAVEGACIÓN CENTRAL */
.site-header { padding: 10px 0; }
.header-top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.header-spacer, .toggle-box { width: 45px; }
.logo-box img.custom-logo { max-height: 85px; width: auto; display: block; margin: 0 auto; transition: filter 0.3s ease; }

/* Inversión inteligente: Si subes el logo negro, se vuelve claro en modo oscuro y viceversa */
body.light-mode .logo-box img.custom-logo { filter: invert(0.85) brightness(0.15); }

.text-logo { font-size: 1.8rem; font-weight: 900; color: var(--text-color); text-decoration: none; text-transform: uppercase; letter-spacing: 1px; }

.main-navigation { margin: 20px 0 10px 0; text-align: center; }
.main-navigation ul { list-style: none; padding: 0; margin: 0; display: inline-flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.main-navigation li { position: relative; }
.main-navigation a { display: inline-block; padding: 10px 22px; background-color: var(--card-bg); color: var(--text-color); text-decoration: none; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; border: 1px solid rgba(1, 119, 127, 0.3); border-radius: 4px; transition: all 0.25s ease; }
.main-navigation li:hover > a, .main-navigation .current-menu-item > a { background-color: var(--accent-color); color: #ffffff !important; border-color: #00f2fe; box-shadow: 0 0 12px rgba(1, 119, 127, 0.4); transform: translateY(-2px); }
.main-navigation .menu-item-has-children > a::after { content: ' ▾'; font-size: 0.75rem; opacity: 0.7; }

/* SUBMENÚS DESPLEGABLES (HOVER) */
.main-navigation ul .sub-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px); background-color: var(--card-bg); border: 1px solid rgba(1, 119, 127, 0.4); border-radius: 4px; padding: 6px 0; min-width: 160px; display: flex; flex-direction: column; opacity: 0; visibility: hidden; pointer-events: none; z-index: 999; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); transition: all 0.2s ease; }
.main-navigation li:hover .sub-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(4px); }
.main-navigation .sub-menu a { display: block; padding: 10px 16px; border: none; text-align: left; font-size: 0.8rem; background: none; white-space: nowrap; }
.main-navigation .sub-menu a:hover { background-color: var(--accent-color); color: #ffffff !important; transform: none; box-shadow: none; }

/* FLASH TICKER (RALENTIZADO) */
.flash-ticker-container { display: flex; align-items: center; background-color: var(--card-bg); border: 1px solid rgba(1, 119, 127, 0.2); height: 40px; margin: 15px 0; overflow: hidden; border-radius: 4px; }
.flash-label { background-color: var(--accent-color); color: #fff; padding: 0 18px; font-weight: 800; font-size: 0.85rem; letter-spacing: 1px; height: 100%; display: flex; align-items: center; z-index: 5; }
.flash-ticker-window { flex-grow: 1; overflow: hidden; position: relative; }
.flash-ticker-track { display: inline-flex; white-space: nowrap; gap: 50px; padding-left: 100%; animation: marquee 30s linear infinite; }
.flash-ticker-track:hover { animation-play-state: paused; }
.ticker-item a { color: var(--text-color); text-decoration: none; font-size: 0.9rem; font-weight: 600; transition: color 0.2s; }
.ticker-item a:hover { color: var(--accent-color); }
@keyframes marquee { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-100%, 0, 0); } }

/* GALERÍA / SLIDER PRINCIPAL */
.featured-gallery-slider { position: relative; width: 100%; height: 480px; margin-top: 20px; border-radius: 8px; overflow: hidden; background-color: #000; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3); }
.slider-wrapper { position: relative; width: 100%; height: 100%; }
.main-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; visibility: hidden; transition: opacity 0.6s ease, visibility 0.6s; z-index: 1; }
.main-slide.active { opacity: 1; visibility: visible; z-index: 2; }
.slide-bg-image, .slide-bg-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide-overlay { position: absolute; bottom: 0; left: 0; width: 100%; height: 60%; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 100%); display: flex; align-items: flex-end; padding: 40px; z-index: 3; }
.slide-info-box { max-width: 80%; }
.slide-title { font-size: 2.2rem; font-weight: 800; margin: 12px 0 0 0; line-height: 1.2; }
.slide-title a { color: #ffffff !important; text-decoration: none; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.slide-title a:hover { color: #00f2fe !important; }

.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(1, 119, 127, 0.4); color: #fff; font-size: 1.2rem; padding: 12px 16px; cursor: pointer; border-radius: 4px; z-index: 10; transition: all 0.2s; }
.slider-arrow:hover { background: var(--accent-color); border-color: #00f2fe; }
.slider-arrow.prev { left: 20px; }
.slider-arrow.next { right: 20px; }
.slider-dots { position: absolute; bottom: 20px; right: 40px; display: flex; gap: 8px; z-index: 10; }
.dot { width: 10px; height: 10px; background: rgba(255, 255, 255, 0.4); border-radius: 50%; cursor: pointer; }
.dot.active { background: var(--accent-color); box-shadow: 0 0 8px var(--accent-color); }

/* CUADRÍCULA DE POSTS (LIMPIA) */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; margin-bottom: 40px; }
.post-card { background-color: var(--card-bg); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 4px 15px rgba(0,0,0,0.1); transition: transform 0.2s ease; }
.post-card:hover { transform: translateY(-4px); }
.post-thumbnail img { width: 100%; height: 210px; object-fit: cover; display: block; }
.post-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.post-tag { display: inline-block; align-self: flex-start; background-color: rgba(1, 119, 127, 0.15); color: var(--accent-color); font-size: 0.75rem; font-weight: 800; padding: 4px 10px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.post-title { font-size: 1.25rem; margin: 0; line-height: 1.3; font-weight: 700; }
.post-title a { color: var(--text-color); text-decoration: none; transition: color 0.2s; }
.post-title a:hover { color: var(--accent-color); }

/* PAGINACIÓN */
.pagination-container { margin: 40px 0; text-align: center; }
.pagination-container .nav-links { display: inline-flex; gap: 8px; justify-content: center; }
.pagination-container .page-numbers { padding: 8px 14px; background-color: var(--card-bg); color: var(--text-color); text-decoration: none; border-radius: 4px; font-size: 0.9rem; font-weight: 600; }
.pagination-container .page-numbers.current, .pagination-container .page-numbers:hover { background-color: var(--accent-color); color: #ffffff; }

/* CUERPO INTERNO DEL ARTÍCULO (SINGLE) */
.article-body-text { font-size: 1.15rem; line-height: 1.7; color: var(--text-color); }
.article-body-text p { margin-bottom: 24px; text-align: justify; }
.article-body-text h2, .article-body-text h3 { color: var(--text-color); margin-top: 40px; margin-bottom: 15px; font-weight: 700; }
.article-body-text h2 { font-size: 1.75rem; border-bottom: 1px solid rgba(1, 119, 127, 0.2); padding-bottom: 8px; }
.article-body-text a { color: var(--accent-color); text-decoration: underline; text-underline-offset: 3px; }
.article-body-text a:hover { color: #00f2fe; }
.article-body-text img { max-width: 100%; height: auto; border-radius: 6px; margin: 20px 0; }

@media(max-width: 768px) {
    .featured-gallery-slider { height: 320px; }
    .slide-title { font-size: 1.4rem; }
    .slider-arrow { display: none; }
    .slide-overlay { padding: 20px; }
    .slider-dots { right: 20px; }
}