/*
Theme Name: Diseñador Industrial
Theme URI: https://www.diseñadorindustrial.es
Author: José Manuel Mateo Hernández
Author URI: https://www.diseñadorindustrial.es
Description: Tema personalizado fiel a la estructura de 2011 diseñadorindustrial.es (Indexhibit)
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: disenadorindustrial
*/

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

/* ── Bloqueo horizontal global ───────────────────────────────────────────── */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
body {
    font-size: 14px;
    font-family: 'Helvetica Neue', Arial, Helvetica, Verdana, sans-serif;
    background: #fff;
    color: #000;
    line-height: 1.4em;
    -webkit-text-size-adjust: 100%;
}

/* ── Links ────────────────────────────────────────────────────────────────── */
a:link    { text-decoration: none;      color: #bf0c1d; }
a:visited { text-decoration: none;      color: #bf0c1d; }
a:hover   { text-decoration: underline; color: #000; }
a:active  { text-decoration: none;      color: #000; }
a img     { border: none; }

/* ── Tipografía general ───────────────────────────────────────────────────── */
small      { font-size: 9px; }
code       { font-family: monospace; }
blockquote { padding-left: 9px; }

h1 { font-size: 16px; margin-bottom: 1em; font-weight: bold; }
h2 { font-size: 16px; margin-bottom: 1em; font-weight: bold; }
h3 { font-size: 16px; margin-bottom: 1em; }
h4 { font-size: 16px; margin-bottom: 1em; }

/* ── Imágenes globales ────────────────────────────────────────────────────── */
img {
    max-width: 100%;
    height: auto;
}

/* ── Layout principal ─────────────────────────────────────────────────────── */
#wrapper {
    display: flex;
    min-height: 100vh;
    align-items: flex-start;
    height: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

#wrapper::after {
    content: '';
    position: fixed;
    top: 0;
    bottom: 0;
    right: 400px;
    width: 2px;
    background: #ccc;
    z-index: 50;
}

/* ── Sidebar izquierdo ────────────────────────────────────────────────────── */
#sidebar {
    width: 275px;
    min-width: 275px;
    background: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
}

#sidebar .container {
    padding: 5px 5px 25px 15px;
}

#sidebar .site-header {
    margin-bottom: 1.5em;
}

#sidebar .site-header h1 {
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 0.3em;
}

#sidebar .site-header h1 a {
    font-weight: normal;
    text-decoration: none;
    color: #000;
}

#sidebar .site-header .site-description {
    font-size: 11px;
    color: #666;
}

#sidebar .site-avatar img {
    display: block;
    margin-bottom: 0.8em;
    max-width: 100%;
}

/* ── Navegación / menú ────────────────────────────────────────────────────── */
#sidebar nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#sidebar nav ul.menu-section {
    margin-bottom: 1em;
}

#sidebar nav ul li {
    margin: 0;
    padding: 0;
}

#sidebar nav ul li a {
    display: block;
    padding: 3px 0;
    color: #bf0c1d;
    text-decoration: none;
    font-size: 14px;
}

#sidebar nav ul li a:hover {
    text-decoration: underline;
    color: #000;
}

#sidebar nav ul li.current-menu-item > a,
#sidebar nav ul li.current_page_item > a,
#sidebar nav ul li.current-menu-ancestor > a {
    color: #bf0c1d;
    font-weight: normal;
}

#sidebar nav .menu-category-title {
    color: #000;
    font-weight: normal;
    display: block;
    padding: 1px 0;
    margin-bottom: 0.2em;
}

#sidebar nav .menu-category-title.active {
    font-weight: bold;
}

#sidebar nav ul ul {
    margin-left: 0.8em;
    margin-bottom: 0.5em;
}

/* ── Entradas desplegadas en el sidebar ───────────────────────────────────── */
#sidebar nav ul.category-entries {
    margin-left: 0;
    margin-top: 0.2em;
    margin-bottom: 0.5em;
}

#sidebar nav ul.category-entries li {
    padding: 0;
    margin: 0;
}

#sidebar nav ul.category-entries li a {
    display: block;
    padding: 3px 0 3px 0;
    color: #bf0c1d;
    text-decoration: none;
    font-size: 14px;
}

#sidebar nav ul.category-entries li a:hover {
    text-decoration: underline;
    color: #000;
}

#sidebar nav ul.category-entries li.active-entry a {
    color: #000;
    font-weight: normal;
}

/* ── Colores diferenciados: categorías negro, páginas rojo ────────────────── */
#sidebar nav ul li.menu-item-category > a {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#sidebar nav ul li.menu-item-category > a:hover {
    text-decoration: underline;
    color: #000;
}

#sidebar nav ul li.menu-item-category.menu-item-open > a {
    font-weight: bold;
    color: #000;
}

#sidebar nav ul li.menu-item-page > a {
    color: #bf0c1d;
    text-decoration: none;
}

#sidebar nav ul li.menu-item-page > a:hover {
    text-decoration: underline;
    color: #000;
}

/* ── Área de contenido ────────────────────────────────────────────────────── */
#content {
    margin-left: 275px;
    flex: 1;
    min-height: 100vh;
    padding-bottom: 70px;
    overflow-x: hidden;
    max-width: calc(100% - 275px - 400px);
}

#content .container {
    padding: 5px 5px 25px 20px;
}

#content p {
    max-width: 600px;
    margin-bottom: 1em;
}

#content ul,
#content ol,
#content li {
    max-width: 600px;
    margin-bottom: 0.5em;
}

#content h1,
#content h2,
#content h3,
#content h4 {
    max-width: 600px;
}

#content code,
#content blockquote {
    max-width: 600px;
    margin-bottom: 1em;
}

#content img {
    max-width: 100%;
    height: auto;
}

/* ── Títulos de entrada (ocultos visualmente, visibles para SEO) ──────────── */
.entry-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

.entry-meta {
    font-size: 11px;
    color: #666;
    margin-bottom: 1em;
}

.entry-content {
    margin-bottom: 2em;
}

.entry-content a:link    { text-decoration: underline; color: #bf0c1d; }
.entry-content a:visited { text-decoration: underline; color: #bf0c1d; }
.entry-content a:hover   { text-decoration: none;      color: #000; }

.post-list .post-item {
    margin-bottom: 0.3em;
    padding-bottom: 0.3em;
}

.post-list .post-item a {
    color: #bf0c1d;
    text-decoration: none;
}

.post-list .post-item a:hover {
    text-decoration: underline;
    color: #000;
}

.navigation {
    margin-top: 2em;
    font-size: 14px;
}

.navigation a {
    color: #bf0c1d;
}

/* ── Sidebar derecho ──────────────────────────────────────────────────────── */
#sidebar-right {
    width: 400px;
    min-width: 400px;
    background: #fff;
    position: relative;
    height: auto;
    overflow: visible;
}

#sidebar-right .container {
    padding: 5px 10px 25px 10px;
}

.widget-right-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 0.5em;
    color: #000;
}

.widget-right {
    margin-bottom: 1.5em;
    font-size: 14px;
}

.widget-right a {
    color: #bf0c1d;
    text-decoration: none;
}

.widget-right a:hover {
    text-decoration: underline;
    color: #000;
}

.widget-right img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0.5em;
}

/* ── Pie de página ────────────────────────────────────────────────────────── */
#footer {
    margin-left: 275px;
    padding: 10px 5px;
    font-size: 13px;
    color: #666;
    border-top: 1px solid #eee;
}

/* ── Barra de admin de WordPress ─────────────────────────────────────────── */
.admin-bar #sidebar {
    top: 32px;
    height: calc(100vh - 32px);
}

.admin-bar #sidebar-right {
    top: 32px;
}

/* ── Utilidades ───────────────────────────────────────────────────────────── */
.highlight { background: #ccff00; color: #000; }
.captioning { margin-top: 2px; }
.title   { font-size: 0.7em; font-style: italic; line-height: 1.2em; }
.caption { font-size: 0.7em; font-style: italic; line-height: 1.2em; }

/* ── Barra inferior fija ─────────────────────────────────────────────────── */
#footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f5f5f5;
    border-top: 1px solid #000;
    padding: 5px 15px;
    font-size: 15px;
    color: #666;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#footer-bar a {
    color: #bf0c1d;
    text-decoration: none;
    margin: 0 5px;
}

#footer-bar a:hover {
    text-decoration: underline;
    color: #000;
}

/* ── Móvil: botón y menú deslizante ──────────────────────────────────────── */
#closing_layer {
    display: none;
    height: 100%;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    z-index: 99;
    background: rgba(0,0,0,0.5);
}

.index-toggle {
    display: none;
}

#nav-toggle {
    display: block;
    height: 60px;
    width: 60px;
    background-color: #000;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 5000000;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    text-indent: -9999px;
}

#nav-toggle span,
#nav-toggle span:before,
#nav-toggle span:after {
    cursor: pointer;
    border-radius: 1px;
    height: 3px;
    width: 25px;
    background: #fff;
    position: absolute;
    display: block;
    content: '';
    transition: all 250ms ease-in-out;
}

#nav-toggle span { left: 17px; top: 28px; }
#nav-toggle span:before { top: -7px; }
#nav-toggle span:after { bottom: -7px; }

#nav-toggle.active span { background-color: transparent; }
#nav-toggle.active span:before { transform: rotate(45deg); top: 0; }
#nav-toggle.active span:after { transform: translateY(-7px) rotate(-45deg); top: 7px; }

/* ── Responsive: tablet y móvil ──────────────────────────────────────────── */
@media only screen and (max-width: 768px) {

    .index-toggle { display: block; }
    .menu-toggle  { display: none !important; }

    #wrapper {
        flex-direction: column;
    }

    #wrapper::after {
        display: none;
    }

    #sidebar {
        left: -100%;
        width: 100%;
        height: 100vh;
        overflow-y: scroll;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        transition: all 150ms ease-in-out;
        z-index: 9997;
        position: fixed;
        top: 0;
    }

    #content {
        margin-left: 0;
        max-width: 100%;
        overflow-x: hidden;
    }

    #content p,
    #content ul,
    #content ol,
    #content li {
        max-width: 100%;
    }

    #content .container {
    padding: 15px !important;
}
	#content img {
        max-width: 100%;
        width: 100%;
        height: auto;
    }

    #footer {
        margin-left: 0;
    }

    #sidebar-right {
        width: 100%;
        min-width: 0;
        border-left: none;
        border-top: 1px solid #eee;
        position: relative;
    }

    #footer-bar {
        display: none;
    }

    /* ── Tipografía móvil (igual que Indexhibit) ── */
    body, p, h1, h2, h3, h4 {
        font-size: 18px !important;
        line-height: 24px !important;
    }
	#sidebar nav ul li a {
    font-size: 18px !important;
}

#sidebar nav ul.category-entries li a {
    font-size: 18px !important;
}
}