/**
 * Blog Archive Styles
 * Estilos para el listado de artículos del blog
 * Theme: Santé
 */

/* ============================================
   BLOG ARCHIVE - MEJORADO
   ============================================ */

.blog-archive {
    background: linear-gradient(to bottom, #f5f7fa 0%, #ffffff 100%);
}

/* Hero Section */
.blog-hero {
    position: relative;
    background: linear-gradient(135deg, #C41E3A 0%, #8B1E3F 50%, #6D6E71 100%);
    padding: 100px 0;
    text-align: center;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,165.3C384,171,480,149,576,128C672,107,768,85,864,90.7C960,96,1056,128,1152,138.7C1248,149,1344,139,1392,133.3L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.6;
    animation: wave 15s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-20px);
    }
}

.blog-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(0,0,0,0.1) 100%);
    opacity: 0.5;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-hero-title {
    color: white;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
    letter-spacing: -1px;
    animation: fadeInDown 1s ease-out 0.2s both;
}

.blog-hero-title i {
    margin-right: 20px;
    color: rgba(255,255,255,0.95);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.blog-hero-description {
    color: rgba(255,255,255,0.95);
    font-size: 1.3rem;
    margin: 0;
    font-weight: 400;
    animation: fadeInDown 1s ease-out 0.4s both;
}

/* Blog Content Section */
.blog-content-section {
    padding: 80px 0;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 60px;
    align-items: start;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 35px;
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.6s ease-out both;
    position: relative;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.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; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #C41E3A 0%, #9a1729 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.blog-card:hover::before {
    transform: scaleX(1);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(196, 30, 58, 0.15);
}

.blog-card-image {
    position: relative;
    overflow: hidden;
    height: 260px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.blog-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.4) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.blog-card:hover .blog-card-image::after {
    opacity: 1;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.15) rotate(2deg);
}

.blog-card-category {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    animation: slideInRight 0.6s ease-out 0.3s both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.blog-card-category span {
    background: linear-gradient(135deg, #C41E3A 0%, #9a1729 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
    transition: all 0.3s ease;
}

.blog-card:hover .blog-card-category span {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.6);
}

.blog-card-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    gap: 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.blog-card-meta span {
    color: #999;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.blog-card:hover .blog-card-meta span {
    background: rgba(196, 30, 58, 0.08);
    color: #C41E3A;
}

.blog-card-meta i {
    color: #C41E3A;
    font-size: 0.9rem;
}

.blog-card-title {
    font-size: 1.5rem;
    margin-bottom: 18px;
    line-height: 1.4;
    font-weight: 700;
}

.blog-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-title a:hover {
    color: #C41E3A;
}

.blog-card-excerpt {
    color: #666;
    line-height: 1.7;
    margin-bottom: 25px;
    flex: 1;
    font-size: 1rem;
}

.blog-card-read-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: white;
    background: linear-gradient(135deg, #C41E3A 0%, #9a1729 100%);
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    align-self: flex-start;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

.blog-card-read-more:hover {
    gap: 15px;
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

.blog-card-read-more i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-read-more i {
    transform: translateX(3px);
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 110px;
    height: fit-content;
}

.sidebar-widget {
    background: white;
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    animation: fadeInRight 0.8s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar-widget:hover {
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.widget-title {
    color: #1a1a1a;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid #C41E3A;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 45px;
    height: 3px;
    background: white;
}

.widget-title i {
    color: #C41E3A;
    font-size: 1.25rem;
}

/* Search Widget */
.search-input-group {
    display: flex;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-input-group:focus-within {
    border-color: #C41E3A;
    box-shadow: 0 0 0 4px rgba(196, 30, 58, 0.1);
}

.search-field {
    flex: 1;
    border: none;
    padding: 14px 18px;
    font-size: 0.95rem;
}

.search-field:focus {
    outline: none;
}

.search-submit {
    background: linear-gradient(135deg, #C41E3A 0%, #9a1729 100%);
    border: none;
    color: white;
    padding: 14px 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.search-submit:hover {
    transform: scale(1.05);
}

/* Categories Widget */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    margin-bottom: 8px;
}

.categories-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    color: #555;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.categories-list li a:hover {
    background: linear-gradient(90deg, rgba(196, 30, 58, 0.08) 0%, transparent 100%);
    color: #C41E3A;
    padding-left: 24px;
    border-left-color: #C41E3A;
}

.categories-list li a i {
    font-size: 0.7rem;
    color: #C41E3A;
    margin-right: 10px;
}

.category-count {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #666;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Recent Posts Widget */
.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-post-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 2px solid #f5f5f5;
    transition: all 0.3s ease;
}

.recent-post-item:hover {
    padding-left: 5px;
}

.recent-post-item:last-child {
    border-bottom: none;
}

.recent-post-thumb {
    flex-shrink: 0;
    width: 75px;
    height: 75px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.recent-post-thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(196, 30, 58, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recent-post-item:hover .recent-post-thumb::after {
    opacity: 1;
}

.recent-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-post-item:hover .recent-post-thumb img {
    transform: scale(1.15);
}

.recent-post-info {
    flex: 1;
}

.recent-post-title {
    font-size: 0.95rem;
    margin-bottom: 8px;
    line-height: 1.4;
    font-weight: 600;
}

.recent-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recent-post-title a:hover {
    color: #C41E3A;
}

.recent-post-date {
    color: #999;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.recent-post-date i {
    color: #C41E3A;
}

/* Tags Widget */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    color: #555;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: linear-gradient(135deg, #C41E3A 0%, #9a1729 100%);
    color: white;
    border-color: #C41E3A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

/* Pagination */
.blog-pagination {
    margin-top: 60px;
    grid-column: 1 / -1;
}

.navigation.pagination {
    text-align: center;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
    padding: 0 18px;
    background: white;
    color: #555;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 2px solid transparent;
}

.page-numbers:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.page-numbers.current {
    background: linear-gradient(135deg, #C41E3A 0%, #9a1729 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
    border-color: #C41E3A;
}

.page-numbers.dots {
    background: transparent;
    box-shadow: none;
}

/* No Posts Found */
.no-posts-found {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.no-posts-found i {
    font-size: 5rem;
    color: #ddd;
    margin-bottom: 25px;
    animation: pulse 2s ease-in-out infinite;
}

.no-posts-found h3 {
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 18px;
    font-weight: 700;
}

.no-posts-found p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: linear-gradient(135deg, #C41E3A 0%, #9a1729 100%);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

/* Responsive */
@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .blog-sidebar {
        position: static;
        order: 2;
    }
    
    .blog-posts-grid {
        order: 1;
    }
    
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 70px 0;
    }
    
    .blog-hero-title {
        font-size: 2.5rem;
    }
    
    .blog-hero-description {
        font-size: 1.1rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .blog-content-section {
        padding: 50px 0;
    }
    
    .blog-card-image {
        height: 220px;
    }
    
    .sidebar-widget {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 50px 0;
    }
    
    .blog-hero-title {
        font-size: 2rem;
    }
    
    .blog-card-content {
        padding: 25px 20px;
    }
    
    .blog-card-title {
        font-size: 1.3rem;
    }
}

/* Selection color */
::selection {
    background: #C41E3A;
    color: white;
}

::-moz-selection {
    background: #C41E3A;
    color: white;
}
