/* Compact Theme - Diseño minimalista y compacto */

/* Variables CSS */
:root {
    --primary-color: #000000;
    --text-color: #333333;
    --text-muted: #666666;
    --bg-white: #ffffff;
    --bg-light: #f5f5f5;
    --border-color: #e0e0e0;
    --transition: all 0.3s ease;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-white);
}

/* Header */
.site-header {
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    padding: 1rem 0;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7); /* Valor por defecto, se sobrescribe con variable */
    z-index: 1;
}

.site-header .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.site-header .row {
    width: 100%;
}

.site-header .col-12 {
    width: 100%;
}

/* Navegación superior */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0 1rem;
    position: relative;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: var(--transition);
}

.nav-links a:hover {
    opacity: 0.7;
}

.nav-icons {
    display: flex;
    gap: 1rem;
}

.btn-search {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
}

/* Botón hamburguesa - oculto por defecto en escritorio */
.btn-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

/* Ocultar botón de cerrar menú en escritorio */
.menu-close-item {
    display: none;
}

.btn-hamburger span {
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform-origin: center;
}

.btn-hamburger.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.btn-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.btn-hamburger.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Logo central */
.logo-container {
    text-align: center;
    padding: 2rem 0 3rem;
}

.site-logo {
    max-height: 120px;
    width: auto;
    max-width: 100%;
    height: auto;
}

.site-logo.logo-border,
.site-title.logo-border {
    border: 4px solid var(--primary-color);
    padding: 1.5rem 3rem;
    background: var(--bg-white);
    display: inline-block;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin: 0;
    letter-spacing: 8px;
    text-transform: uppercase;
    display: inline-block;
}

.site-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0 1rem;
    line-height: 1.6;
}

/* Main Content */
.main-content {
    padding: 3rem 0;
}

/* Post Cards - Compacto */
.post-card {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}

.post-card-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    margin-bottom: 1.5rem;
}

.post-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.post-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-meta a {
    color: var(--text-muted);
    text-decoration: none;
}

.post-meta a:hover {
    color: var(--primary-color);
}

.post-card-title {
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.post-card-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.post-card-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.post-categories {
    margin-bottom: 1rem;
}

.badge {
    background-color: var(--bg-light);
    color: var(--text-color);
    padding: 0.25rem 0.75rem;
    font-weight: 400;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--border-color);
    margin-right: 0.5rem;
    text-decoration: none;
    transition: var(--transition);
}

.badge:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

/* Single Post */
.single-post-header {
    text-align: center;
    margin-bottom: 2rem;
}

.single-post-title {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.single-post-content {
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 3rem;
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
}

.single-post-content h2,
.single-post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.single-post-content p {
    margin-bottom: 1.5rem;
}

.single-post-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Author Info */
.author-info {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
    margin: 3rem 0;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.author-name a {
    color: var(--text-color);
    text-decoration: none;
}

.author-name a:hover {
    color: var(--primary-color);
}

/* Sidebar */
.sidebar {
    padding-left: 2rem;
}

.sidebar-widget {
    margin-bottom: 3rem;
}

.widget-title {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.widget-image {
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

.widget-content {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.recent-posts-list,
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts-list li,
.categories-list li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.recent-posts-list li:last-child,
.categories-list li:last-child {
    border-bottom: none;
}

.recent-posts-list a,
.categories-list a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.recent-posts-list a:hover,
.categories-list a:hover {
    color: var(--primary-color);
}

.post-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Pagination */
.pagination {
    margin-top: 3rem;
}

.page-link {
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: var(--transition);
}

.page-link:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-white);
    font-weight: 700;
}

/* Newsletter Section */
.newsletter-section {
    background: var(--bg-light);
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.newsletter-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0;
}

.newsletter-form .form-control {
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.newsletter-form .form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.newsletter-form .btn-newsletter {
    background: var(--primary-color);
    color: var(--bg-white);
    border: none;
    border-radius: 0;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: var(--transition);
}

.newsletter-form .btn-newsletter:hover {
    opacity: 0.8;
}

/* Footer */
.site-footer {
    background: var(--bg-white);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.site-footer p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.site-footer a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.site-footer a:hover {
    color: var(--primary-color);
}

.footer-legal {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.btn-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--bg-white);
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    z-index: 999;
}

.btn-back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.page-description {
    font-size: 1rem;
    color: var(--text-muted);
}

/* 404 Page */
.error-404 {
    text-align: center;
    padding: 5rem 0;
}

.error-404 h1 {
    font-size: 8rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-404 h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        padding-left: 0;
        margin-top: 3rem;
    }
}

@media (max-width: 768px) {
    /* Ocultar icono de búsqueda en móvil */
    .nav-icons {
        display: none;
    }
    
    /* Ocultar subtítulo en móvil */
    .site-subtitle {
        display: none;
    }
    
    /* Header más compacto en móvil */
    .site-header {
        min-height: auto !important;
    }
    
    /* Reorganizar header en móvil - todo en una fila */
    .site-header .col-12 {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
    
    /* Logo a la izquierda - ocupa todo el espacio disponible */
    .logo-container {
        padding: 0.75rem 0;
        text-align: left;
        flex: 1;
        display: flex;
        align-items: center;
        min-width: 0;
        order: 1;
    }
    
    .site-logo {
        max-height: 50px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        object-fit: contain;
        object-position: left center;
    }
    
    .site-title {
        font-size: 1.2rem;
        letter-spacing: 2px;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
    }
    
    .site-logo.logo-border,
    .site-title.logo-border {
        padding: 0.5rem 1rem;
        border-width: 2px;
        width: 100%;
        display: inline-block;
    }
    
    /* Navegación a la derecha del logo */
    .top-nav {
        padding: 0;
        align-items: center;
        order: 2;
        flex-shrink: 0;
        position: static;
    }
    
    /* Mostrar botón hamburguesa en móvil */
    .btn-hamburger {
        display: flex;
    }
    
    /* Menú móvil lateral deslizante */
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        gap: 0;
        padding: 0;
        margin: 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        transition: left 0.3s ease;
        z-index: 10000;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    /* Item del botón de cierre - mostrar solo en móvil */
    .menu-close-item {
        display: flex;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 1.5rem;
        justify-content: flex-end;
    }
    
    .btn-close-menu {
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--text-color);
        cursor: pointer;
        padding: 0.5rem;
        line-height: 1;
        transition: var(--transition);
    }
    
    .btn-close-menu:hover {
        color: var(--primary-color);
        transform: rotate(90deg);
    }
    
    .nav-links li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-links li:last-child {
        border-bottom: none;
    }
    
    .nav-links a {
        display: block;
        padding: 1.25rem 2rem;
        font-size: 0.85rem;
        background: var(--bg-white);
        transition: var(--transition);
    }
    
    .nav-links a:hover {
        background: var(--bg-light);
        padding-left: 2.5rem;
    }
    
    /* Overlay oscuro cuando el menú está abierto */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 9999;
    }
    
    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .main-content {
        padding: 2rem 0;
    }
    
    .single-post-title {
        font-size: 2rem;
    }
    
    .post-card-image,
    .post-placeholder {
        height: 200px;
    }
    
    .btn-back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* Media query para pantallas muy pequeñas */
@media (max-width: 480px) {
    .site-logo {
        max-height: 45px;
    }
    
    .site-title {
        font-size: 1rem;
        letter-spacing: 1px;
    }
    
    .site-logo.logo-border,
    .site-title.logo-border {
        padding: 0.4rem 0.8rem;
        border-width: 2px;
    }
    
    .top-nav {
        padding: 0.6rem 0;
    }
    
    .btn-hamburger {
        width: 26px;
        height: 20px;
    }
    
    .btn-hamburger span {
        width: 26px;
        height: 2.5px;
    }
    
    .btn-hamburger.active span:nth-child(1) {
        transform: translateY(8.5px) rotate(45deg);
    }
    
    .btn-hamburger.active span:nth-child(3) {
        transform: translateY(-8.5px) rotate(-45deg);
    }
    
    .nav-links a {
        padding: 0.875rem 1rem;
        font-size: 0.75rem;
    }
    
    .post-card-title {
        font-size: 1.5rem;
    }
    
    .post-excerpt {
        font-size: 0.9rem;
    }
}

/* Videos responsivos */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 2rem 0;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: var(--bg-white);
    border: 1px solid var(--border-color);
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-title {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
    text-align: center;
    line-height: 1.4;
    padding: 0 1rem;
}

/* Utilidades */
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

