:root {
    --gs-amarelo: #909090;
    --gs-laranja: #727272;
    --gs-roxo: #727272;
    --gs-cinza: #727272;
    --gs-cinza-escuro: #5a5a5a;
    --gs-cinza-claro: #f5f5f5;
    --gs-branco: #ffffff;
    --gs-carousel-card-width: calc((100% - 2rem) / 3);
    --gs-carousel-card-min: 200px;
    --gs-carousel-card-max: 280px;
}

.gs-materias-carousel-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
    overflow-y: visible;
    padding: 0 0.75rem;
}

.gs-home-materias .gs-carousel-nav__progress-thumb {
    background-color: #909090;
}

.gs-home-materias .gs-carousel-nav__btn:hover:not(:disabled) {
    border-color: #909090;
    color: #5a5a5a;
}

.gs-materias-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scroll-padding-inline: 0.75rem;
    padding-inline: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
}

@media (min-width: 992px) {
    .gs-materias-carousel {
        cursor: grab;
    }

    .gs-materias-carousel.is-dragging {
        cursor: grabbing;
        scroll-snap-type: none;
        scroll-behavior: auto;
        user-select: none;
    }
}

.gs-materias-carousel::-webkit-scrollbar {
    display: none;
}

.gs-materias-carousel > .gs-materia-card-link {
    flex: 0 0 var(--gs-carousel-card-width);
    scroll-snap-align: start;
    width: var(--gs-carousel-card-width);
    min-width: var(--gs-carousel-card-min);
    max-width: var(--gs-carousel-card-max);
}

.gs-materia-card-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
    height: 100%;
}

.gs-materia-card {
    background: var(--gs-branco);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.gs-materia-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #909090 0%, #b0b0b0 100%);
    opacity: 0;
    transition: opacity 0.22s ease;
    z-index: 1;
}

.gs-materia-card-link:hover .gs-materia-card {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
    border-color: #d8d8d8;
}

.gs-materia-card-link:hover .gs-materia-card::before {
    opacity: 1;
}

.gs-materia-card-destaque {
    border: 2px solid #d0d0d0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.gs-materia-card-destaque::before {
    opacity: 1;
}

.gs-materia-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.94);
    color: var(--gs-cinza-escuro);
    border: 1px solid #ececec;
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-family: 'Argumentum-Black', sans-serif;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gs-materia-card .gs-materia-foto {
    height: auto;
    aspect-ratio: 16 / 9;
    min-height: 120px;
    overflow: hidden;
    border-bottom: 1px solid #f0f0f0;
    background: #f7f7f7;
}

.gs-materia-card .gs-materia-foto-texto {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    text-align: center;
}

.gs-materia-card .gs-materia-destaque {
    font-family: 'Argumentum-Black', sans-serif;
    font-size: 1rem;
    line-height: 1.35;
}

.gs-materia-card .gs-materia-foto img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.3s ease;
}

.gs-materia-card-link:hover .gs-materia-foto img {
    transform: scale(1.05);
}

.gs-materia-card .gs-materia-conteudo {
    padding: 0.85rem 0.95rem 1rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gs-materia-card .gs-materia-titulo {
    font-family: 'Argumentum-Black', sans-serif;
    font-size: 0.88rem;
    color: var(--gs-roxo);
    margin-bottom: 0.35rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gs-materia-card .gs-materia-resumo {
    font-family: 'Argumentum-Regular', sans-serif;
    font-size: 0.82rem;
    color: var(--gs-cinza);
    line-height: 1.45;
    margin-bottom: 0.65rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1 1 auto;
}

.gs-materia-card .gs-materia-btn {
    display: inline-block;
    text-align: center;
    background: #e8e8e8;
    color: var(--gs-cinza-escuro);
    border: 1px solid #d0d0d0;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-family: 'Argumentum-Black', sans-serif;
    font-size: 0.72rem;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    align-self: flex-start;
    margin-top: auto;
}

.gs-materia-card-link:hover .gs-materia-btn {
    background: #e8e8e8;
    border-color: #d0d0d0;
    color: var(--gs-cinza-escuro);
}

@media (max-width: 991px) {
    :root {
        --gs-carousel-card-width: 220px;
        --gs-carousel-card-min: 220px;
        --gs-carousel-card-max: 220px;
    }

    .gs-materias-carousel {
        scroll-padding-inline: max(1rem, calc((100% - var(--gs-carousel-card-width)) / 2));
    }

    .gs-materias-carousel > .gs-materia-card-link {
        scroll-snap-align: center;
    }
}
