/* ========================================
   RELATED POSTS AFTER ARTICLE - FOOTER STYLE
   Basado en diseño Figma
   ======================================== */

/* Sección principal */
.related-posts-after-article {
    background-color: #FFFFFF;
    margin: 60px 0 0 0;
    padding: 60px 0 0 0;
}

/* Título de la sección */
.related-posts-title-section {
    text-align: center;
    margin-bottom: 40px;
}

.related-posts-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #000000;
    margin: 0;
    line-height: 1.2;
}

/* Grid de posts */
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 0;
}

/* Reutilizar estilos de post-category-card */
.related-posts-after-article .post-category-card {
    background-color: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    border: none;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.related-posts-after-article .post-category-image {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.related-posts-after-article .post-category-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-posts-after-article .post-category-card:hover .post-category-thumbnail {
    transform: scale(1.05);
}

.related-posts-after-article .post-category-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-posts-after-article .post-category-content {
    padding: 0 0 0 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 3;
    margin-top: -30px;
}

.related-posts-after-article .post-category-title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #264067 !important;
    margin: 0 0 0.75rem 0 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.4px !important;
    background: #FFFFFF;
    padding: 1rem;
    padding-bottom: 0;
    padding-left: 1rem;
    min-height: 55px;
    border-radius: 30px 0;
}

.related-posts-after-article .post-category-card .post-category-title a,
.entry-content .related-posts-after-article .post-category-card .post-category-title a,
.article-content .related-posts-after-article .post-category-card .post-category-title a,
#primary .related-posts-after-article .post-category-card .post-category-title a,
.post-content .related-posts-after-article .post-category-card .post-category-title a,
.page-content .related-posts-after-article .post-category-card .post-category-title a,
.page .entry-content .related-posts-after-article .post-category-card .post-category-title a,
.single .entry-content .related-posts-after-article .post-category-card .post-category-title a,
.ast-article-single .related-posts-after-article .post-category-card .post-category-title a {
    color: #264067 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.related-posts-after-article .post-category-card .post-category-title a:visited,
.entry-content .related-posts-after-article .post-category-card .post-category-title a:visited,
.article-content .related-posts-after-article .post-category-card .post-category-title a:visited,
#primary .related-posts-after-article .post-category-card .post-category-title a:visited,
.post-content .related-posts-after-article .post-category-card .post-category-title a:visited,
.page-content .related-posts-after-article .post-category-card .post-category-title a:visited,
.page .entry-content .related-posts-after-article .post-category-card .post-category-title a:visited,
.single .entry-content .related-posts-after-article .post-category-card .post-category-title a:visited,
.ast-article-single .related-posts-after-article .post-category-card .post-category-title a:visited {
    color: #264067 !important;
    text-decoration: none !important;
}

.related-posts-after-article .post-category-card .post-category-title a:hover,
.entry-content .related-posts-after-article .post-category-card .post-category-title a:hover,
.article-content .related-posts-after-article .post-category-card .post-category-title a:hover,
#primary .related-posts-after-article .post-category-card .post-category-title a:hover,
.post-content .related-posts-after-article .post-category-card .post-category-title a:hover,
.page-content .related-posts-after-article .post-category-card .post-category-title a:hover,
.page .entry-content .related-posts-after-article .post-category-card .post-category-title a:hover,
.single .entry-content .related-posts-after-article .post-category-card .post-category-title a:hover,
.ast-article-single .related-posts-after-article .post-category-card .post-category-title a:hover {
    color: #0a9bc7 !important;
    text-decoration: none !important;
}

.related-posts-after-article .post-category-excerpt {
    margin: 0 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px !important;
    color: #000000 !important;
    line-height: 1.6 !important;
    padding: 1rem;
    padding-top: 0;
}

.related-posts-after-article .post-category-excerpt p {
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 16px !important;
}

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

/* Tablet */
@media (max-width: 1024px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .related-posts-title {
        font-size: 28px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .related-posts-after-article {
        margin: 40px 0 0 0;
        padding: 40px 0 0 0;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .related-posts-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .related-posts-after-article .post-category-title {
        font-size: 18px !important;
    }
    
    .related-posts-after-article .post-category-excerpt p {
        font-size: 14px !important;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .related-posts-after-article {
        margin: 30px 0 0 0;
        padding: 30px 0 0 0;
    }
    
    .related-posts-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .related-posts-after-article .post-category-title {
        font-size: 16px !important;
        min-height: auto;
    }
    
    .related-posts-after-article .post-category-excerpt p {
        font-size: 13px !important;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.related-posts-after-article {
    animation: fadeInUp 0.6s ease-out;
}

.related-posts-after-article .post-category-card {
    animation: fadeInUp 0.6s ease-out;
}

.related-posts-after-article .post-category-card:nth-child(2) {
    animation-delay: 0.1s;
}

.related-posts-after-article .post-category-card:nth-child(3) {
    animation-delay: 0.2s;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.related-posts-after-article .post-category-title a:focus {
    outline: 2px solid #0A9BC7;
    outline-offset: 2px;
}

.related-posts-after-article .post-category-link:focus {
    outline: 2px solid #0A9BC7;
    outline-offset: 2px;
}

