/* AndroidWorld Featured Posts Grid - Inspired by iDevice.ro */

.aw-featured-grid-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Grid Layout - 2x3 (6 articole) */
.aw-featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    min-height: 500px;
}

/* Primul articol ocupă 2 rânduri */
.aw-featured-large {
    grid-row: span 2;
}

/* Item individual */
.aw-featured-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.aw-featured-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Link wrapper */
.aw-featured-link {
    display: block;
    position: relative;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Imagine featured */
.aw-featured-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.aw-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.aw-featured-item:hover .aw-featured-image img {
    transform: scale(1.1);
}

/* Overlay gradient */
.aw-featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.85) 100%
    );
    transition: opacity 0.3s ease;
}

.aw-featured-item:hover .aw-featured-overlay {
    opacity: 0.9;
}

/* Conținut text */
.aw-featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: #ffffff;
    z-index: 2;
}

/* Titlu articol */
.aw-featured-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 10px 0;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.aw-featured-large .aw-featured-title {
    font-size: 24px;
    -webkit-line-clamp: 4;
}

/* Meta info (autor și dată) */
.aw-featured-meta {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.aw-featured-large .aw-featured-meta {
    font-size: 14px;
}

.aw-featured-author {
    font-weight: 500;
}

.aw-featured-separator {
    margin: 0 5px;
}

.aw-featured-date {
    opacity: 0.9;
}

/* Responsive Design */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .aw-featured-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
    
    .aw-featured-large {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .aw-featured-item {
        min-height: 250px;
    }
    
    .aw-featured-large {
        min-height: 350px;
    }
}

/* Mobile (max 767px) */
@media (max-width: 767px) {
    .aw-featured-grid-container {
        padding: 15px;
    }
    
    .aw-featured-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .aw-featured-large {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .aw-featured-item {
        min-height: 220px;
    }
    
    .aw-featured-large {
        min-height: 280px;
    }
    
    .aw-featured-content {
        padding: 15px;
    }
    
    .aw-featured-title {
        font-size: 16px;
    }
    
    .aw-featured-large .aw-featured-title {
        font-size: 20px;
    }
    
    .aw-featured-meta {
        font-size: 12px;
    }
}

/* Extra small mobile (max 480px) */
@media (max-width: 480px) {
    .aw-featured-grid-container {
        padding: 10px;
    }
    
    .aw-featured-item {
        min-height: 200px;
    }
    
    .aw-featured-large {
        min-height: 250px;
    }
    
    .aw-featured-title {
        font-size: 15px;
        -webkit-line-clamp: 2;
    }
    
    .aw-featured-large .aw-featured-title {
        font-size: 18px;
        -webkit-line-clamp: 3;
    }
}

/* Animații */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aw-featured-item {
    animation: fadeIn 0.6s ease forwards;
}

.aw-featured-item:nth-child(1) { animation-delay: 0s; }
.aw-featured-item:nth-child(2) { animation-delay: 0.1s; }
.aw-featured-item:nth-child(3) { animation-delay: 0.2s; }
.aw-featured-item:nth-child(4) { animation-delay: 0.3s; }
.aw-featured-item:nth-child(5) { animation-delay: 0.4s; }
.aw-featured-item:nth-child(6) { animation-delay: 0.5s; }

/* Loading state (opțional) */
.aw-featured-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Fallback pentru articole fără imagine */
.aw-featured-item:not(:has(.aw-featured-image)) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.aw-featured-item:not(:has(.aw-featured-image)) .aw-featured-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
