﻿/* ============================================
          BLOG SECTION - ESTILOS INDEPENDIENTES
          ============================================ */

/* Reset específico para esta sección */
.blog-section *,
.blog-section *::before,
.blog-section *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Contenedor principal */
.blog-section {
    --blog-primary: #783AFB;
    --blog-primary-hover: #8872EF;
    --blog-text: #1f2937;
    --blog-text-light: #6b7280;
    --blog-bg: #ffffff;
    --blog-border: #e5e7eb;
    --blog-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --blog-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --blog-radius: 16px;
    --blog-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    width: 100%;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header de la sección */
.blog-header {
    text-align: center;
    margin-bottom: 60px;
}

    .blog-header h2 {
        font-size: 2.5rem;
        font-weight: 800;
        color: var(--blog-text);
        margin-bottom: 16px;
        line-height: 1.2;
    }

    .blog-header p {
        font-size: 1.125rem;
        color: var(--blog-text-light);
        max-width: 600px;
        margin: 0 auto;
    }

/* Grid de 3 columnas */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* Tarjeta individual */
.blog-card {
    background: var(--blog-bg);
    border-radius: var(--blog-radius);
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    transition: var(--blog-transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--blog-border);
}

    .blog-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--blog-shadow-hover);
    }

/* Contenedor de imagen */
.blog-image-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.blog-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image {
    transform: scale(1.05);
}

/* Overlay con categoría */
.blog-category {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(160, 110, 235, 0.9);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

/* Contenido de la tarjeta */
.blog-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.875rem;
    color: var(--blog-text-light);
}

.blog-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blog-text);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-excerpt {
    font-size: 0.95rem;
    color: var(--blog-text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Botón CTA */
.blog-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--blog-primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--blog-transition);
    border: none;
    cursor: pointer;
    width: fit-content;
}

    .blog-button:hover {
        background: var(--blog-primary-hover);
        transform: translateX(4px);
    }

    .blog-button svg {
        width: 16px;
        height: 16px;
        transition: transform 0.2s ease;
    }

    .blog-button:hover svg {
        transform: translateX(4px);
    }

/* Responsive */
@media (max-width: 968px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .blog-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 640px) {
    .blog-section {
        padding: 60px 16px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .blog-header h2 {
        font-size: 1.75rem;
    }

    .blog-image-wrapper {
        height: 200px;
    }
}

/* Animación de entrada */
@keyframes blogFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: blogFadeInUp 0.6s ease forwards;
}

    .blog-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .blog-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .blog-card:nth-child(3) {
        animation-delay: 0.3s;
    }
