/* =========================================
   BLOG & ARTICLE STYLES (MODERN 2025)
   ========================================= */

/* --- AUTOMATION BANNER (n8n) --- */
.n8n-banner {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    /* Tech Blue Gradient */
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    margin: -30px auto 50px;
    /* Overlap Hero */
    max-width: 800px;
    position: relative;
    z-index: 5;
    text-align: center;
    box-shadow: 0 10px 30px rgba(30, 60, 114, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-weight: 500;
    flex-wrap: wrap;
    animation: slideUp 0.8s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.n8n-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.n8n-link {
    color: #74ebd5;
    /* Cyan brillante */
    text-decoration: none;
    font-weight: 700;
    margin-left: 5px;
    transition: color 0.3s;
}

.n8n-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* --- HERO SECTIONS --- */
.blog-hero,
.article-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-top: -80px;
    /* Compensa header fixed */
    padding-top: 140px;
    /* Clear header */
}

.blog-hero {
    height: 50vh;
    min-height: 400px;
}

.article-hero {
    height: 70vh;
    min-height: 500px;
    padding-bottom: 60px;
}

.blog-hero::before,
.article-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(5, 10, 20, 0.85), rgba(0, 40, 80, 0.7));
    z-index: 1;
}

.blog-hero-content,
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
    max-width: 900px;
}

/* Typography */
.blog-title,
.article-title {
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    line-height: 1.2;
}

.blog-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

.article-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 20px;
}

.blog-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 650px;
    margin: 0 auto;
    font-weight: 300;
}

.article-meta {
    font-size: 1.1rem;
    opacity: 0.95;
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    font-weight: 500;
}

/* Tags (Article + Hero) */
.hero-tags {
    margin-bottom: 25px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-tag {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-tag:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* --- BLOG GRID & FILTERS --- */
.blog-filters {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    /* Sombra suave */
    margin-bottom: 60px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.filter-input {
    padding: 12px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.95rem;
    background: #fdfdfd;
    color: #444;
    outline: none;
    transition: all 0.3s;
    min-width: 200px;
}

.filter-input:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.08);
}

.filter-btn {
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.25);
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 86, 179, 0.35);
    background: var(--secondary-color);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1400px;
    /* Margen seguridad pantallas grandes */
    margin: 0 auto;
    padding: 0 40px;
    /* Margen horizontal */
}

.blog-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.card-img-wrapper {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.card-category {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
}

.card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-date {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 12px;
    display: block;
    font-weight: 500;
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 800;
    line-height: 1.35;
    color: #1a1a1a;
    transition: color 0.3s;
}

.blog-card:hover .card-title {
    color: var(--primary-color);
}

.card-excerpt {
    font-size: 1rem;
    color: #666;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 25px;
    flex-grow: 1;
}

.card-footer {
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: var(--secondary-color);
    font-weight: 700;
}

.card-footer i {
    transition: transform 0.3s;
}

.blog-card:hover .card-footer i {
    transform: translateX(5px);
}

/* --- ARTICLE CONTENT CONTAINER --- */
.article-container {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: -60px auto 60px;
    /* Negative margin overlap */
    background: white;
    padding: 70px;
    border-radius: 30px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.08);
    /* Sombra elegante */
}

.breadcrumbs {
    margin-bottom: 40px;
    color: #999;
    font-size: 0.95rem;
    font-weight: 500;
}

.breadcrumbs a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.article-body {
    font-size: 1.25rem;
    line-height: 1.9;
    color: #2c3e50;
    font-weight: 400;
}

.article-body h2 {
    font-size: 2.2rem;
    color: #1a1a1a;
    margin: 3rem 0 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.article-body h3 {
    font-size: 1.7rem;
    color: #2c3e50;
    margin: 2.5rem 0 1rem;
    font-weight: 700;
}

.article-body p {
    margin-bottom: 1.8rem;
}

.article-body ul {
    margin-bottom: 2rem;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 12px;
}

.article-body blockquote {
    border-left: 5px solid var(--secondary-color);
    padding: 30px 40px;
    background: #f4f9fc;
    font-style: italic;
    font-size: 1.35rem;
    margin: 3rem 0;
    border-radius: 0 20px 20px 0;
    color: #445;
    line-height: 1.6;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: slideUp 0.8s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
    opacity: 0;
}

.delay-200 {
    animation-delay: 0.2s;
    opacity: 0;
}

.delay-300 {
    animation-delay: 0.3s;
    opacity: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .article-container {
        margin-top: -50px;
        padding: 40px 20px;
        border-radius: 25px 25px 0 0;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
    }

    .article-title {
        font-size: 2rem;
    }

    .n8n-banner {
        width: 90%;
        margin-left: auto;
        margin-right: auto;
        flex-direction: column;
        gap: 10px;
        padding: 20px;
    }

    .blog-filters {
        gap: 10px;
        padding: 20px 15px;
    }

    .filter-input {
        width: 100%;
    }

    .filter-btn {
        width: 100%;
    }
}