/* Quality News Grid Styles */

/* Grid de Noticias Grandes */
.quality-grid-grandes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* Grid de Noticias Pequeñas */
.quality-grid-small {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
    padding: 15px;
}

.quality-grid-small[data-columnas="1"] {
    grid-template-columns: 1fr;
}

.quality-grid-small[data-columnas="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.quality-grid-small[data-columnas="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.quality-grid-small[data-columnas="4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* Estilos de las noticias */
.quality-news-item {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: #f5f5f5;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.news-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Noticia grande mantiene overlay */
.news-item-large .news-link {
    display: block;
    height: 100%;
}

.news-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.news-item-large .news-image {
    min-height: 520px;
    border-radius: 10px;
}

.news-item-medium .news-image {
    height: 250px;
    flex-shrink: 0;
    border-radius: 10px;
}

.news-item-small .news-image {
    height: 220px;
    flex-shrink: 0;
    border-radius: 10px;
    background-size: cover;
    background-position: center center;
}

/* Overlay solo para la noticia grande */
.news-item-large .news-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
}

/* Contenido sobre imagen solo para noticia grande */
.news-item-large .news-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: #fff;
    z-index: 2;
}

/* Contenido debajo de imagen para medianas y pequeñas */
.news-item-medium .news-content,
.news-item-small .news-content {
    padding: 15px;
    background: #fff;
    flex-grow: 1;
}

.news-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
    text-transform: uppercase;
}

.news-item-large .news-title {
    font-size: 28px;
    margin-bottom: 15px;
    color: #fff;
}

.news-item-medium .news-title {
    font-size: 16px;
    color: #000;
}

.news-item-small .news-title {
    font-size: 15px;
    color: #000;
}

.news-excerpt {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-large .news-excerpt {
    font-size: 16px;
    -webkit-line-clamp: 3;
    color: #fff;
}

.news-item-medium .news-excerpt {
    color: #666;
}

.news-item-small .news-excerpt {
    color: #666;
}

/* Destacadas Sidebar */
.quality-destacadas-section {
    background: transparent;
    padding: 15px;
}

.quality-destacadas-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.destacada-item {
    transition: transform 0.3s ease;
}

.destacada-item:hover {
    transform: translateY(-3px);
}

.destacada-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.destacada-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #f0f0f0;
}

.destacada-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.destacada-content {
    padding: 0;
}

.destacada-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    color: #000;
    text-transform: uppercase;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.destacada-item:hover .destacada-title {
    color: #e74c3c;
}

/* Responsive */
@media (max-width: 992px) {
    .quality-grid-small[data-columnas="3"],
    .quality-grid-small[data-columnas="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .quality-grid-small {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .news-image,
    .news-item-large .news-image,
    .news-item-medium .news-image,
    .news-item-small .news-image {
        min-height: 250px;
        height: 250px;
    }
    
    .news-title,
    .news-item-large .news-title,
    .news-item-medium .news-title,
    .news-item-small .news-title {
        font-size: 18px;
    }
    
    .destacada-image {
        height: 180px;
    }
    
    .destacada-title {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .quality-grid-grandes,
    .quality-grid-small {
        gap: 10px;
    }
    
    .news-content {
        padding: 15px;
    }
    
    .news-item-large .news-image {
        min-height: 300px;
    }
}
