/* ============================================
   BASE
============================================ */
.studiodess-news-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
}

.studiodess-news-grid {
    display: grid;
    grid-template-columns: 2.4fr 1fr;
    grid-gap: 20px;
    align-items: stretch;
}

/* Layout hero: slider full-width, sem sidebar */
.layout-hero .studiodess-news-grid {
    grid-template-columns: 1fr;
}

.layout-hero .studiodess-news-sidebar {
    display: none;
}

/* ============================================
   SLIDE PRINCIPAL
============================================ */
.studiodess-news-main {
    position: relative;
    width: 100%;
}

.news-slide-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Container da imagem principal com altura fixa */
.news-image {
    position: relative;
    overflow: hidden;
    height: var(--sdnews-image-height, 320px);
}

/* Imagem sempre preenche o quadro */
.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    display: block;
    transition: transform 0.35s ease, filter 0.35s ease;
}

/* Fallback sem imagem */
.news-image-placeholder {
    width: 100%;
    height: 100%;
    background: #e3e3e3;
}

/* Hover sutil no destaque */
.news-slide-link:hover .news-image img {
    transform: scale(1.03);
    filter: brightness(1.05);
}

/* Overlay com título + data */
.news-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 18px 10px;
    background: linear-gradient(
        to top,
        var(--sdnews-overlay-color, rgba(0,0,0,0.85)) 0%,
        rgba(0,0,0,0.6) 40%,
        rgba(0,0,0,0.0) 100%
    );
    color: #ffffff;
}

.news-overlay .news-title {
    font-size: var(--sdnews-main-title-size, 22px);
    color: var(--sdnews-main-title-color, #ffffff);
    font-weight: 700;
    margin: 2px 0 4px 0;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-overlay .news-date {
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--sdnews-date-color, #f5f5f5);
    display: inline-block;
    text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}

/* ============================================
   LABEL DE CATEGORIA
============================================ */

/* Label da imagem principal */
.news-category-label {
    display: inline-block;
    background: var(--sdnews-main-cat-label-bg, #274045);
    color: var(--sdnews-main-cat-label-color, #ffffff);
    font-size: var(--sdnews-main-cat-label-size, 11px);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 6px;
}

/* Labels dos thumbs e da lista */
.thumb-category-label,
.sdnews-category-label {
    display: inline-block;
    background: var(--sdnews-thumb-cat-label-bg, #274045);
    color: var(--sdnews-thumb-cat-label-color, #ffffff);
    font-size: var(--sdnews-thumb-cat-label-size, 11px);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 4px;
}

/* ============================================
   SIDEBAR / THUMBS
============================================ */
.studiodess-news-sidebar {
    border-left: 1px solid #e5e5e5;
    padding-left: 12px;
    padding-right: 12px;
}

.sidebar-title {
    font-size: 16px;
    margin: 0 0 12px;
    color: #555;
}

.studiodess-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-thumb {
    margin-bottom: 18px;
    padding: 4px 2px;
    border-radius: 8px;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.news-thumb:last-child {
    margin-bottom: 0;
}

.news-thumb-link {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

/* Thumbs base */
.thumb-image img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Fallback */
.thumb-image-placeholder {
    width: 150px;
    height: 100px;
    background: #e3e3e3;
    border-radius: 6px;
    flex-shrink: 0;
}

.thumb-text {
    flex: 1;
}

.thumb-title {
    font-size: var(--sdnews-thumb-title-size, 15px);
    color: var(--sdnews-thumb-title-color, #222222);
    font-weight: 600;
    margin: 2px 0 4px;
    line-height: 1.3;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.thumb-date {
    font-size: 12px;
    color: var(--sdnews-date-color, #999999);
}

/* Sombra suave ao passar o mouse */
.news-thumb-link:hover .thumb-image img {
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.news-thumb-link:hover .thumb-title {
    text-decoration: underline;
}

/* Hover no título principal */
.news-slide-link:hover .news-title {
    text-decoration: underline;
}

/* ============================================
   CONTROLES SWIPER
============================================ */
.studiodess-news-main .swiper-button-next,
.studiodess-news-main .swiper-button-prev {
    color: #ffffff;
    width: 32px;
    height: 32px;
}

.studiodess-news-main .swiper-button-next::after,
.studiodess-news-main .swiper-button-prev::after {
    font-size: 18px;
}

.studiodess-news-main .swiper-pagination-bullet {
    background: #ffffff;
    opacity: 0.7;
}

.studiodess-news-main .swiper-pagination-bullet-active {
    opacity: 1;
}

/* ============================================
   LAYOUT LISTA (layout="list")
============================================ */
.studiodess-news-list-layout {
    width: 100%;
}

.studiodess-news-list-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sdnews-list-item {
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 16px;
}

.sdnews-list-item:last-child {
    border-bottom: none;
}

.sdnews-list-link {
    display: flex;
    gap: 16px;
    text-decoration: none;
    color: inherit;
}

.sdnews-list-image img {
    width: 220px;
    height: var(--sdnews-image-height, 260px);
    object-fit: cover;
    display: block;
}

.sdnews-list-text {
    flex: 1;
}

.sdnews-list-title {
    font-size: var(--sdnews-main-title-size, 22px);
    color: var(--sdnews-main-title-color, #ffffff);
    font-weight: 700;
    margin: 2px 0 6px;
    line-height: 1.3;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sdnews-list-date {
    font-size: 12px;
    color: var(--sdnews-date-color, #999999);
    display: inline-block;
    margin-bottom: 6px;
}

.sdnews-list-excerpt {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
}

/* ============================================
   PRESETS DE ESTILO
============================================ */

/* PORTAL – padrão */
.style-portal .studiodess-news-grid {
    grid-template-columns: 2.4fr 1fr;
    grid-gap: 20px;
}

.style-portal .thumb-image img {
    width: 150px;
    height: 120px;
}

/* CLEAN – mais leve */
.style-clean .studiodess-news-grid {
    grid-template-columns: 2.2fr 1fr;
    grid-gap: 18px;
}

.style-clean .news-thumb {
    margin-bottom: 14px;
    padding: 2px 0;
}

.style-clean .thumb-image img {
    width: 100px;
    height: 72px;
    box-shadow: none;
}

/* COMPACT – mais enxuto */
.style-compact .studiodess-news-grid {
    grid-template-columns: 2fr 1fr;
    grid-gap: 12px;
}

.style-compact .news-thumb {
    margin-bottom: 10px;
    padding: 2px 0;
}

.style-compact .thumb-image img {
    width: 90px;
    height: 65px;
}

.style-compact .news-overlay .news-title {
    font-size: calc(var(--sdnews-main-title-size, 22px) - 2px);
}

/* ============================================
   RESPONSIVO
============================================ */
@media (max-width: 992px) {
    .studiodess-news-grid,
    .style-portal .studiodess-news-grid,
    .style-clean .studiodess-news-grid,
    .style-compact .studiodess-news-grid {
        grid-template-columns: 1fr;
    }

    .studiodess-news-sidebar {
        border-left: none;
        border-top: 1px solid #e5e5e5;
        margin-top: 16px;
        padding-left: 10px;
        padding-right: 10px;
        padding-top: 12px;
    }

    .news-image {
        height: min(var(--sdnews-image-height, 320px), 260px);
    }

    .thumb-image img,
    .thumb-image-placeholder {
        width: 100px;
        height: 72px;
    }

    .sdnews-list-link {
        flex-direction: column;
    }

    .sdnews-list-image img {
        width: 100%;
        height: min(var(--sdnews-image-height, 260px), 260px);
        object-fit: cover;
    }
}

@media (max-width: 600px) {
    .thumb-image img,
    .thumb-image-placeholder {
        width: 85px;
        height: 62px;
    }

    .news-overlay .news-title {
        font-size: calc(var(--sdnews-main-title-size, 22px) - 2px);
    }

    .studiodess-news-list-layout {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* ============================================
   VAZIO
============================================ */
.studiodess-latest-news-empty {
    text-align: center;
    font-size: 14px;
    color: #777;
}