/* ═══════════════════════════════════════════════════════════
   DER GEIGEN-PARCOURS – BLOG STYLES
   ═══════════════════════════════════════════════════════════ */

/* ====== BASE ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #0a0a0a;
    color: #e5e5e5;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

::selection { background-color: #ff6b2c; color: #ffffff; }

/* ====== TYPOGRAPHY ====== */
.blog-title {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    line-height: 1.1;
}
.blog-title-script {
    font-family: 'Corinthia', cursive;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b2c 0%, #ff8c57 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    padding-bottom: 0.1em;
}
.blog-title-sans {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 400;
    color: #ffffff;
    letter-spacing: -0.02em;
}

/* ====== SCROLLBAR ====== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #ff6b2c; }

/* ====== ANIMATIONS ====== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
.float { animation: float 6s ease-in-out infinite; }

/* ====== ARTICLE CARDS ====== */
.article-card {
    display: grid;
    grid-template-columns: 1fr;
    background: rgba(23, 23, 23, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.article-card:hover {
    border-color: rgba(255, 107, 44, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(255, 107, 44, 0.2);
}

/* Desktop: imagen a la izquierda, contenido a la derecha */
@media (min-width: 768px) {
    .article-card {
        grid-template-columns: 1fr 1.5fr;
    }
}

.article-link { display: contents; }

.article-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}
@media (min-width: 768px) {
    .article-image {
        aspect-ratio: auto;
        min-height: 240px;
    }
}
.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.article-card:hover .article-image img { transform: scale(1.05); }

.article-category {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 107, 44, 0.9);
    backdrop-filter: blur(8px);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-meta {
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: #737373;
    margin-bottom: 12px;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: white;
    line-height: 1.3;
    margin-bottom: 12px;
    transition: color 0.3s;
}
.article-card:hover .article-title { color: #ff8c57; }

.article-excerpt {
    color: #a3a3a3;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.article-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ff6b2c;
    font-size: 0.875rem;
    font-weight: 500;
    transition: gap 0.3s;
}
.article-card:hover .article-read-more { gap: 10px; }

/* ====== SCROLL OFFSET PARA NAVEGACIÓN ====== */
#ueber {
    scroll-margin-top: 120px; /* Compensa la altura de la navbar fija */
}

@media (max-width: 768px) {
    #ueber {
        scroll-margin-top: 100px; /* Menos margen en móvil */
    }
}

/* ====== SIDEBAR ====== */
.archive-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    transition: background 0.3s;
    text-decoration: none;
}
.archive-item:hover { background: rgba(255, 255, 255, 0.03); }

.cat-tag {
    background: rgba(255, 107, 44, 0.1);
    border: 1px solid rgba(255, 107, 44, 0.2);
    color: #ff8c57;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s;
}
.cat-tag:hover {
    background: rgba(255, 107, 44, 0.2);
    border-color: rgba(255, 107, 44, 0.4);
}

.cat-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a3a3a3;
    cursor: pointer;
    transition: all 0.3s;
}
.cat-btn:hover { border-color: rgba(255, 107, 44, 0.3); color: white; }
.cat-btn.active {
    background: linear-gradient(135deg, #e65214, #ff6b2c);
    border-color: transparent;
    color: white;
}

/* ====== ARTICLE PAGE ====== */
.article-hero-image {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.article-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-body {
    color: #d4d4d4;
    font-size: 1.0625rem;
    line-height: 1.8;
}
.article-body p { margin-bottom: 1.5rem; }
.article-body p.lead {
    font-size: 1.25rem;
    color: #ffffff;
    font-weight: 300;
    line-height: 1.6;
    border-left: 3px solid #ff6b2c;
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}
.article-body h2 {
    font-size: 1.75rem;
    font-weight: 500;
    color: white;
    margin: 2.5rem 0 1rem;
    letter-spacing: -0.02em;
}
.article-body h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: white;
    margin: 2rem 0 0.75rem;
}
.article-body ul, .article-body ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}
.article-body li { margin-bottom: 0.5rem; }
.article-body blockquote {
    border-left: 3px solid #ff6b2c;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #ffffff;
    background: rgba(255, 107, 44, 0.05);
    border-radius: 0 12px 12px 0;
}
.article-body strong { color: white; font-weight: 600; }
.article-body a { color: #ff8c57; text-decoration: underline; }

/* ====== WHATSAPP BUTTON ====== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px -5px rgba(37, 211, 102, 0.5);
    z-index: 45; /* Entre menú móvil (40) y cookie banner (50) */
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    text-decoration: none;
}
.whatsapp-float:hover { 
    transform: scale(1.1);
    box-shadow: 0 15px 40px -5px rgba(37, 211, 102, 0.7);
}
.whatsapp-icon { 
    width: 34px; 
    height: 34px; 
    position: relative; 
    z-index: 2;
}
.whatsapp-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25D366;
    animation: whatsappPulse 2s infinite;
    z-index: 1;
}
@keyframes whatsappPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* ═══ RESPONSIVE WHATSAPP ═══ */

/* Tablet */
@media (max-width: 1024px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
}

/* Móvil - botón más pequeño y bien posicionado */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 54px;
        height: 54px;
        bottom: 20px;
        right: 16px;
    }
    .whatsapp-icon { 
        width: 30px; 
        height: 30px; 
    }
}

/* Cuando el cookie banner está visible, subir el WhatsApp */
.cookie-bar.show ~ .whatsapp-float,
body:has(.cookie-bar.show) .whatsapp-float {
    bottom: 160px;
}

/* Cuando el menú móvil está abierto, ocultar el WhatsApp */
body.menu-open .whatsapp-float {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

/* Móvil pequeño */
@media (max-width: 480px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 16px;
        right: 12px;
    }
    .whatsapp-icon { 
        width: 28px; 
        height: 28px; 
    }
}

/* ====== COOKIE BANNER ====== */
.cookie-bar {
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
}
.cookie-bar.show { 
    transform: translateY(0); 
}

/* Cookie banner responsive */
@media (max-width: 768px) {
    .cookie-bar {
        padding: 12px !important;
    }
    .cookie-bar > div {
        padding: 20px !important;
    }
    .cookie-bar h4 {
        font-size: 0.95rem;
    }
    .cookie-bar p {
        font-size: 0.8rem;
    }
    .cookie-bar button {
        padding: 10px 16px !important;
        font-size: 0.8rem !important;
        width: 100%;
    }
}

/* ====== MODALS ====== */
.modal-bg {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-bg.open { opacity: 1; pointer-events: auto; }
.modal-box {
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-bg.open .modal-box { transform: translateY(0) scale(1); }

/* ====== RESPONSIVE ====== */

/* Tablet */
@media (max-width: 1024px) {
    .blog-title-script { font-size: clamp(2.5rem, 7vw, 4.5rem); }
    .blog-title-sans { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
}

/* Móvil */
@media (max-width: 768px) {
    /* Hero */
    header { padding-top: 7rem; padding-bottom: 3rem; }
    .blog-title-script { font-size: 3.5rem; }
    .blog-title-sans { font-size: 1.35rem; }
  
    /* Grid principal: sidebar abajo */
    .grid.lg\:grid-cols-12 {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
    }
    
    /* Artículos: 1 columna en móvil */
    .article-card {
        grid-template-columns: 1fr !important;
    }
    
    .article-image {
        aspect-ratio: 16/10 !important;
        min-height: auto !important;
    }
    
    .article-content { padding: 20px; }
    .article-title { font-size: 1.125rem; }
    .article-excerpt { font-size: 0.875rem; }
    
    /* Filtros: scroll horizontal */
    #categoryFilter {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    #categoryFilter::-webkit-scrollbar { display: none; }
    #categoryFilter { flex-wrap: nowrap; }
    .cat-btn { white-space: nowrap; flex-shrink: 0; }
    
    /* Article page */
    .article-body { font-size: 1rem; }
    .article-body h2 { font-size: 1.5rem; }
    .article-body p.lead { font-size: 1.1rem; }
}

/* Móvil pequeño */
@media (max-width: 480px) {
    .blog-title-script { font-size: 2.75rem; }
    .blog-title-sans { font-size: 1.15rem; }
    
    .article-content { padding: 16px; }
    .article-title { font-size: 1.0625rem; }
    
    .article-meta { 
        flex-direction: column; 
        gap: 6px;
        font-size: 0.7rem;
    }
}