/*
Theme Name: DeepSeek Theme
Author: Tu Nombre
Description: Theme estilo DeepSeek con sidebar izquierdo y amplio espaciado.
Version: 1.0
Text Domain: deepseek
*/

/* Variables de diseño */
:root {
    /* Colores */
    --sidebar-bg: #000;
    --text-light: #ffffff;
    --accent-color: #4cc9f0;
    --content-bg: #f8f9fa;
    
    /* Espaciado */
    --sidebar-width: 220px;       /* Sidebar más estrecho */
    --content-margin: 420px;      /* ¡Espacio amplio! (ajustable) */
    --content-padding: 1rem 3rem; /* Padding generoso */
    --gap-posts: 2.5rem;          /* Espacio entre posts */
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Layout principal */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar izquierdo */
.sidebar {
    width: var(--sidebar-width);
    background: #000;
    color: var(--text-light);
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-logo {
    margin-bottom: 2rem;
}

.sidebar-logo img {
    max-width: 100%;
    height: auto;
}

/* Menú principal */
.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.8rem;
    position: relative;
}

.sidebar-nav a {
    color: var(--text-light);
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    transition: all 0.3s;
    font-size: 1.05rem;
    font-weight: bold;
}

.sidebar-nav a:hover {
    color: var(--accent-color);
    padding-left: 0.5rem;
}

/* Submenús */
.sidebar-nav .sub-menu {
    margin-left: 1rem;
    border-left: 2px solid var(--accent-color);
    padding-left: 0.8rem;
    display: none;
}



/* Contenido principal */
.main-content {
    margin-left: var(--content-margin);
    padding: var(--content-padding);
    width: calc(100% - var(--sidebar-width));
    background: var(--content-bg);
    min-height: 100vh;
}

/* Grid de posts */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--gap-posts);
    margin-top: 1.5rem;
}

.post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.post-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.post-card h2 {
    padding: 1.5rem;
    font-size: 1.25rem;
    line-height: 1.4;
}

.post-card h2 a, .archive .post-card a  {
    color: inherit;
    text-decoration: none;
}

/* Responsive: Tablet */
@media (max-width: 1200px) {
    :root {
        --content-margin: 320px;
    }
}

/* Responsive: Móvil */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        padding: 1.5rem;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 2rem 1.5rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Ocultar cualquier menú superior no deseado */
.navbar, #navbar, #menu-header, .main-navigation {
    display: none !important;
}

/* Ocultar menú por defecto de WordPress si aparece */
#header-menu, #primary-menu {
    display: none;
}


/* Estilos para archivo de categoría */
.archive-header {
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.archive-title {
    font-size: 2rem;
    color: var(--sidebar-bg);
}

.post-excerpt {
    padding: 0 1.5rem 1.5rem;
    color: #666;
    font-size: 0.9rem;
}

.pagination {
    grid-column: 1 / -1;
    margin-top: 3rem;
    text-align: center;
}

.pagination .page-numbers {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border: 1px solid #ddd;
    text-decoration: none;
}

.pagination .current {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Estilos para páginas */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.page-featured-image img {
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.page-title {
    font-size: 2.2rem;
    color: var(--sidebar-bg);
}

.page-content-inner {
    line-height: 1.8;
}

/* Estilos para el contenido de WordPress */
.page-content-inner p {
    margin-bottom: 1.5rem;
}

.page-content-inner ul,
.page-content-inner ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.page-links {
    margin: 2rem 0;
    font-weight: bold;
}





.sidebar-nav .sub-menu {
    display: none;
    margin-left: 1rem;
    border-left: 2px solid var(--accent-color);
    padding-left: 0.8rem;
}

.sidebar-nav li.menu-item-has-children.submenu-open > .sub-menu {
    display: block;
}

/* Flecha */
.sidebar-nav li.menu-item-has-children > a::after {
    content: "▼";
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    /* Ya no usamos float ni margin-left */
}


.sidebar-nav li.menu-item-has-children.submenu-open > a::after {
    transform: rotate(-180deg);
}


.sidebar-nav li.menu-item-has-children > a {
    position: relative;
    display: flex;
    align-items: center; /* Centra verticalmente */
    justify-content: space-between; /* Espacio entre texto y flecha */
}

/* Por defecto: sidebar visible y botón oculto */
.sidebar {
    position: fixed;
    width: 250px;
    height: 100vh;
    background: var(--sidebar-bg);
    transition: transform 0.3s ease;
}

.mobile-menu-button {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem; /* posición inicial cuando menú cerrado */
    background: var(--accent-color);
    border: none;
    color: white;
    font-size: 1rem;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    z-index: 1100;
    transition: left 0.3s ease;
}


/* En móvil: mostrar botón y esconder sidebar por defecto */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
    }
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 3px 0 10px rgba(0,0,0,0.3);
    }
    .mobile-menu-button {
        display: block;
    }
    .main-content {
        margin-left: 0;
        padding: 2rem 1.5rem;
        transition: filter 0.3s ease;
    }
    .main-content.dimmed {
        filter: brightness(0.6);
        pointer-events: none;
        user-select: none;
    }
}


/* Cuando menú está abierto, mover el botón hacia la derecha justo al borde del sidebar */
.mobile-menu-button.menu-open {
    left: 250px; /* ancho exacto del sidebar */
}



.pagination {
    margin-top: 2rem;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    margin: 0 0.25rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.pagination .page-numbers.current {
    background-color: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.pagination .page-numbers:hover:not(.current) {
    background-color: #eee;
}



.responsive-video {
    position: relative;
    padding-bottom: 56.25%; /* Relación 16:9 */
    padding-top: 30px; /* Para que no quede pegado arriba */
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

.responsive-video iframe,
.responsive-video object,
.responsive-video embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


.custom-footer {
    margin-top: 3rem;
    padding: 2rem 1rem;
    border-top: 1px solid #ddd;
    text-align: center;
    background: var(--content-bg);
}

.footer-youtube-link svg {
    fill: #FF0000;
    width: 40px;
    height: 40px;
    margin-bottom: 0.8rem;
    transition: fill 0.3s ease;
}

.footer-youtube-link:hover svg {
    fill: #cc0000;
}

.footer-legal-links {
    font-size: 0.9rem;
}

.footer-legal-links a {
    color: #555;
    margin: 0 0.5rem;
    text-decoration: none;
}

.footer-legal-links a:hover {
    color: var(--accent-color);
}



.single-post .post-meta { display:none; }

.single-post h1 { font-size:30px; padding-bottom:10px; margin-top:15px; }


.page .page-title { display:none; }