﻿.blog-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0 40px;
    margin-top: 60px;
    color: white;
    position: relative;
    overflow: hidden;
}

    .blog-hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        margin-top:60px;
    }

/* Filtros de categorías */
.category-pills {
    display: flex;
    gap: 10px;
    padding: 20px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .category-pills::-webkit-scrollbar {
        display: none;
    }

.category-pill {
    padding: 8px 20px;
    border-radius: 25px;
    background: #f8f9fa;
    border: 2px solid transparent;
    color: #495057;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

    .category-pill:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        color: #495057;
    }

    .category-pill.active {
        background: #1B4B8C;
        color: white;
        border-color: #1B4B8C;
    }

    .category-pill .badge {
        background: rgba(255,255,255,0.2);
        font-size: 0.75rem;
    }

/* Cards del blog */
.blog-card {
    height: 100%;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    cursor: pointer;
}

    .blog-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    }

    .blog-card .card-img-wrapper {
        position: relative;
        padding-top: 56.25%; /* 16:9 Aspect Ratio */
        overflow: hidden;
        background: #f8f9fa;
    }

    .blog-card .card-img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .blog-card:hover .card-img {
        transform: scale(1.05);
    }

    .blog-card .category-badge {
        position: absolute;
        top: 15px;
        left: 15px;
        padding: 5px 12px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(10px);
        z-index: 1;
    }

    .blog-card .card-body {
        padding: 1.5rem;
    }

    .blog-card .card-title {
        font-size: 1.1rem;
        font-weight: 600;
        line-height: 1.4;
        color: #2c3e50;
        margin-bottom: 0.75rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .blog-card .card-text {
        color: #6c757d;
        font-size: 0.9rem;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 1rem;
    }

    .blog-card .card-meta {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.85rem;
        color: #95a5a6;
    }

    .blog-card .read-time {
        display: flex;
        align-items: center;
        gap: 5px;
    }

/* Barra de búsqueda */
.search-container {
    max-width: 500px;
    margin: 0 auto 30px;
}

.search-input {
    border-radius: 30px;
    padding: 12px 25px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

    .search-input:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    }

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    display: none;
}

    .loading-spinner.active {
        display: block;
    }

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* No results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

    .no-results img {
        max-width: 200px;
        opacity: 0.5;
        margin-bottom: 20px;
    }

/* Featured carousel */
.featured-carousel {
    margin-bottom: 40px;
}

.featured-card {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    height: 300px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    color: white;
}

    .featured-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    }

.featured-content {
    position: relative;
    padding: 30px;
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-hero {
        padding: 60px 0 30px;
    }

        .blog-hero h1 {
            font-size: 1.75rem;
        }

    .category-pills {
        padding: 15px 0;
    }

    .blog-card .card-body {
        padding: 1.25rem;
    }

    .featured-card {
        height: 250px;
    }

    .featured-content {
        padding: 20px;
    }
}

.pad-section {
    padding-top: 140px; /* Espacio para navbar fija */
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

    .blog-card.animate-in {
        opacity: 1;
        transform: translateY(0);
        animation: fadeInUp 0.4s ease forwards;
    }

/* Skeleton loading para mejor UX */
.skeleton-card {
    height: 350px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 15px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}