/**
 * X Travel Blog - Estilos Base
 * Diseño limpio y minimalista
 * 
 * @version 2.0.0
 */

/* === Variables === */
:root {
    --xb-primary: #8bc34a;
    --xb-primary-dark: #7cb342;
    --xb-text: #333333;
    --xb-text-light: #666666;
    --xb-bg: #ffffff;
    --xb-bg-alt: #f8f9fa;
    --xb-border: #e0e0e0;
    --xb-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --xb-radius: 8px;
    --xb-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* === Reset === */
.xb-container *,
.xb-container *::before,
.xb-container *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* === Container Principal === */
.xb-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: var(--xb-font);
    color: var(--xb-text);
    line-height: 1.6;
}

/* === Navegación === */
.xb-nav {
    background: var(--xb-bg);
    border-radius: var(--xb-radius);
    box-shadow: var(--xb-shadow);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.xb-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--xb-border);
}

.xb-nav-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--xb-primary);
}

.xb-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.xb-nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--xb-text);
    margin: 4px 0;
    transition: 0.3s;
}

.xb-nav-list {
    list-style: none;
}

.xb-nav-list li {
    margin-bottom: 0.25rem;
}

.xb-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--xb-text);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.xb-nav-link:hover {
    background: var(--xb-bg-alt);
    color: var(--xb-primary);
}

.xb-nav-link.active {
    background: var(--xb-primary);
    color: white;
    font-weight: 500;
}

/* === Main Content === */
.xb-main {
    background: var(--xb-bg);
    border-radius: var(--xb-radius);
    box-shadow: var(--xb-shadow);
    overflow: hidden;
}

/* === Header del Artículo === */
.xb-header {
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--xb-bg-alt) 0%, var(--xb-bg) 100%);
    border-bottom: 1px solid var(--xb-border);
}

.xb-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: var(--xb-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.xb-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--xb-text);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.xb-subtitle {
    font-size: 1.1rem;
    color: var(--xb-text-light);
    margin-bottom: 1rem;
}

.xb-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--xb-text-light);
}

/* === Contenido del Artículo === */
.xb-content {
    padding: 2.5rem;
}

.xb-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--xb-text);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--xb-primary);
}

.xb-content h2:first-child {
    margin-top: 0;
}

.xb-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--xb-text);
    margin: 1.5rem 0 0.75rem;
}

.xb-content p {
    margin-bottom: 1rem;
    color: var(--xb-text);
}

.xb-content ul,
.xb-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.xb-content li {
    margin-bottom: 0.5rem;
}

/* === Bloques Destacados === */
.xb-highlight {
    background: var(--xb-bg-alt);
    border-left: 4px solid var(--xb-primary);
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--xb-radius) var(--xb-radius) 0;
}

.xb-highlight-title {
    font-weight: 600;
    color: var(--xb-primary-dark);
    margin-bottom: 0.5rem;
}

.xb-info-box {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: var(--xb-radius);
}

.xb-tip-box {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: var(--xb-radius);
}

/* === Grid de Cards === */
.xb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.xb-card {
    background: var(--xb-bg);
    border: 1px solid var(--xb-border);
    border-radius: var(--xb-radius);
    padding: 1.5rem;
}

.xb-card-title {
    font-weight: 600;
    color: var(--xb-primary-dark);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

/* === Footer/Paginación === */
.xb-footer {
    padding: 1.5rem 2.5rem;
    background: var(--xb-bg-alt);
    border-top: 1px solid var(--xb-border);
}

.xb-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.xb-btn {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    background: var(--xb-bg);
    color: var(--xb-text);
    text-decoration: none;
    border: 1px solid var(--xb-border);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.xb-btn:hover {
    background: var(--xb-primary);
    color: white;
    border-color: var(--xb-primary);
}

.xb-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.xb-page-info {
    font-size: 0.9rem;
    color: var(--xb-text-light);
}

/* === Estado Vacío === */
.xb-empty {
    text-align: center;
    padding: 3rem;
    color: var(--xb-text-light);
}

/* === Animaciones === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animación del contenedor */
.xb-container {
    animation: fadeIn 0.4s ease-out;
}

/* Animación de la navegación */
.xb-nav {
    animation: slideInLeft 0.5s ease-out;
}

.xb-nav-link {
    transition: all 0.25s ease;
}

.xb-nav-link:hover {
    transform: translateX(4px);
}

/* Animación del header */
.xb-header {
    animation: fadeInUp 0.5s ease-out;
}

.xb-badge {
    animation: fadeIn 0.6s ease-out 0.2s backwards;
}

.xb-title {
    animation: fadeInUp 0.5s ease-out 0.1s backwards;
}

.xb-subtitle {
    animation: fadeInUp 0.5s ease-out 0.2s backwards;
}

/* Animación del contenido */
.xb-content {
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.xb-content h2 {
    transition: color 0.2s ease;
}

.xb-content h2:hover {
    color: var(--xb-primary);
}

/* Animación de cards y highlights */
.xb-card,
.xb-highlight,
.xb-info-box,
.xb-tip-box {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.xb-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.xb-highlight:hover,
.xb-info-box:hover,
.xb-tip-box:hover {
    transform: translateX(4px);
}

/* Animación de botones */
.xb-btn {
    transition: all 0.25s ease;
}

.xb-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 195, 74, 0.3);
}

.xb-btn:active:not(.disabled) {
    transform: translateY(0);
}

/* Animación del footer */
.xb-footer {
    animation: fadeIn 0.5s ease-out 0.4s backwards;
}

/* Reducir animaciones si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === Responsive === */
@media (max-width: 900px) {
    .xb-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .xb-nav {
        position: relative;
        top: 0;
    }
    
    .xb-nav-toggle {
        display: block;
    }
    
    .xb-nav-list {
        display: none;
        margin-top: 1rem;
    }
    
    .xb-nav.open .xb-nav-list {
        display: block;
    }
    
    .xb-nav.open .xb-nav-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .xb-nav.open .xb-nav-toggle span:nth-child(2) {
        opacity: 0;
    }
    
    .xb-nav.open .xb-nav-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

@media (max-width: 600px) {
    .xb-header {
        padding: 1.5rem;
    }
    
    .xb-title {
        font-size: 1.5rem;
    }
    
    .xb-content {
        padding: 1.5rem;
    }
    
    .xb-content h2 {
        font-size: 1.25rem;
    }
    
    .xb-footer {
        padding: 1rem 1.5rem;
    }
    
    .xb-pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .xb-page-info {
        order: -1;
    }
}
