/*
Theme Name: VideoADS
Theme URI: https://Yunesoft.com    
Author: Yuneldy Furcal
Author URI: https://tusitio.com    
Description: Un tema simple y limpio para WordPress.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mi-tema
*/

/* === Reset y base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #1e1e1e;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* === Header Moderno (VideoSphere style) === */
.site-header {
    background-color: #121212;
    padding: 10px 0;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 999;
}

.site-header .container {
    max-width: 1550px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.site-title a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* === Menú de navegación === */
.main-navigation {
    display: flex;
    align-items: center;
}

.menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px;
}

.menu li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9em;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.menu li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #0073aa;
}

/* === Contenedor del contenido === */
.content-container {
    max-width: 1550px;
    margin: 30px auto;
    padding: 0 20px;
}

.content-container h1 {
    font-size: 2.2em;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* === Cuadrícula de posts === */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

.post-card {
    background-color: #2d2d2d;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #333;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.post-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.post-title {
    padding: 12px 15px;
    font-size: 1em;
    font-weight: 500;
    color: #ffffff;
    text-align: left;
    border-top: 1px solid #333;
}

/* === Responsive ajustes === */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 12px;
    }

    .main-navigation {
        width: 100%;
        justify-content: center;
    }

    .menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .content-container {
        margin: 25px auto;
        padding: 0 15px;
    }

    .content-container h1 {
        font-size: 2em;
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .post-image {
        height: 180px;
    }

    .post-title {
        font-size: 0.95em;
        padding: 10px;
    }
}

/* === Single Post === */
.single-post .post-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.single-post .post-header h1 {
    font-size: 2em;
    color: #ffffff;
    margin: 0;
}

.single-post .post-meta {
    font-size: 0.9em;
    color: #aaa;
    margin-top: 5px;
}

.single-post .post-content {
    margin: 20px 0;
    line-height: 1.6;
}

/* === Reproductor de video actualizado === */
.video-player-wrapper {
    position: relative;
    margin: 25px 0;
    display: flex;
    justify-content: center;
    padding: 10px;
    background-color: #000;
    border-radius: 8px;
}

.video-player-wrapper video {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    object-fit: contain;
    object-position: center;
}

/* === Overlay de anuncios (nuevo código) === */
.video-ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.25); /* transparente como el ejemplo */
    z-index: 10;
    pointer-events: none; /* permite seguir usando los controles del video */
}

.video-ad-overlay script {
    pointer-events: auto; /* el script aún puede funcionar si genera clics */
}

/* === Responsive video === */
@media (max-width: 768px) {
    .video-player-wrapper {
        margin: 20px 0;
        padding: 0;
        background-color: transparent;
    }

    .video-player-wrapper video {
        max-width: 100%;
        height: auto;
    }
}

/* === Contenido de single post === */
.post-content-wrapper {
    max-width: 600px;
    margin: 20px auto;
    padding: 0 15px;
}

.post-content-wrapper .post-title {
    font-size: 2em;
    margin: 20px 0 10px;
    color: #ffffff;
    font-weight: 600;
}

.post-content-wrapper .post-meta {
    font-size: 0.9em;
    color: #aaa;
    margin-bottom: 20px;
}

.post-content-wrapper .post-content {
    margin: 20px 0;
    line-height: 1.6;
    color: #ffffff;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
}

@media (max-width: 768px) {
    .post-content-wrapper {
        max-width: 100%;
        padding: 0 10px;
    }

    .post-content-wrapper .post-title {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    .post-content-wrapper .post-title {
        font-size: 1.6em;
    }
}

/* === Botón de Telegram === */
.telegram-button-wrapper {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.telegram-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #2481c8, #1b6fae);
    color: #ffffff;
    text-decoration: none;
    padding: 12px 26px;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.telegram-button:hover {
    background: linear-gradient(135deg, #2b8fd7, #237abf);
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
}

.telegram-icon img {
    width: 28px;
    height: 28px;
    margin-right: 6px;
    vertical-align: middle;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.2));
    transition: transform 0.3s ease;
}

.telegram-button:hover .telegram-icon img {
    transform: scale(1.05) rotate(4deg);
}
