/**
 * Featured Posts Section Styles
 * 
 * Modern grid section for "Destacados" category
 * 
 * @package PlanaMayor_Theme
 * @since 1.2.4
 */

/* ============================================
   FEATURED POSTS SECTION
   ============================================ */

.featured-posts-section {
    margin: 60px 0 40px;
    padding: 40px 0;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
}

/* Header */
.featured-posts-header {
    margin-bottom: 35px;
}

.featured-posts-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1B1B1B;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-posts-title svg {
    color: var(--color-primary, #f70d28);
    flex-shrink: 0;
}

.featured-posts-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary, #f70d28) 0%, transparent 100%);
    border-radius: 2px;
}

/* Grid Layout */
.featured-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Card */
.featured-post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.featured-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Image */
.featured-post-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 aspect ratio - more compact */
    overflow: hidden;
    background: #f0f0f0;
}

.featured-post-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-post-card:hover .featured-post-image img {
    transform: scale(1.08);
}

/* Overlay */
.featured-post-overlay {
    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.3s ease;
}

.featured-post-card:hover .featured-post-overlay {
    opacity: 1;
}

/* No Image Placeholder */
.featured-post-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

/* Content */
.featured-post-content {
    padding: 14px 12px;
}

.featured-post-title-text {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    color: #1B1B1B;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
    min-height: 2.7rem; /* Ensure consistent height */
}

.featured-post-card:hover .featured-post-title-text {
    color: var(--color-primary, #f70d28);
}

.featured-post-date {
    font-size: 0.8rem;
    color: #999;
    font-weight: 400;
    display: block;
}

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

/* Tablets */
@media (max-width: 968px) {
    .featured-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .featured-posts-section {
        margin: 40px 0 30px;
        padding: 30px 0;
    }
    
    .featured-posts-title {
        font-size: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .featured-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .featured-posts-section {
        margin: 30px 0 20px;
        padding: 25px 0;
    }
    
    .featured-posts-title {
        font-size: 1.3rem;
        gap: 8px;
    }
    
    .featured-posts-title svg {
        width: 20px;
        height: 20px;
    }
    
    .featured-post-content {
        padding: 12px;
    }
    
    .featured-post-title-text {
        font-size: 0.85rem;
        -webkit-line-clamp: 3;
    }
    
    .featured-post-date {
        font-size: 0.75rem;
    }
}

/* Very Small Mobile */
@media (max-width: 380px) {
    .featured-posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
