/* card-collection, card e efeitos auxiliares */

/* Container principal de cards em grid */
.sgm-card-collection {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 2.5rem 2.2rem;
    margin-bottom: 16px;
}

/* Ajusta para dispositivos móveis: uma coluna e centralização */
@media (max-width:779px) {
    .sgm-card-collection {
        grid-template-columns: 1fr;
        gap: 2rem 0.9rem;
        justify-items: center;
        margin-left: 2px;
    }
}

/* Ajusta para tablets e telas médias: duas colunas */
@media (min-width:780px) and (max-width:979px) {
    .sgm-card-collection {
        grid-template-columns: 1fr 1fr;
        gap: 2rem 0.9rem;
        justify-items: center;
        margin-left: 2px;
    }
}

/* Ajusta para telas maiores: três colunas */
@media (min-width:980px) and (max-width:1199px) {
    .sgm-card-collection {
        grid-template-columns: 1fr 1fr 1fr;
        margin-left: 1rem;
    }
}

/* Variante de layout com colunas responsivas de largura mínima */
.sgm-card-collection.sgm-card-collection--3-colunas {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* ---------- card ---------- */
/* Estilo base do card, com borda, sombra, overflow oculto e layout vertical */
.sgm-card {
    position: relative;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    perspective: 1100px;
    box-shadow: 0 1px 2px rgba(0, 49, 92, .05);
    transition: box-shadow .3s ease, transform .3s ease, border-color .3s ease;
    cursor: pointer;
    width: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.sgm-card:has(.sgm-card--background--full) {
    border-width: 0;
}

/* Remove efeitos de link padrão ao passar o mouse no card */
a.sgm-card:hover,
a.sgm-card:focus {
    color: unset;
    text-decoration: none;
}

/* Área visual superior do card com gradiente de fundo */
.sgm-card--visual {
    display: block;
    position: relative;
    height: 152px;
    background: linear-gradient(140deg, var(--from), var(--to));
    transform-style: preserve-3d;
    transition: filter .4s ease;
}

/* Versão grande do card tem altura maior na área visual */
.sgm-card.sgm-card--lg .sgm-card--visual {
    height: 200px;
}

.sgm-card .sgm-card--visual:has(>.sgm-card--background--full) {
    height: auto;
    width: fit-content;
}

/* Padrão SVG opaco sobre o fundo do card */
svg.sgm-card--visual--pattern {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .085;
    pointer-events: none;
}

/* Imagem de background alternativa que preenche todo o bloco visual */
.sgm-card .sgm-card--background {
    object-fit: cover;
    height: 100%;
    max-width: 100%;
}

.sgm-card .sgm-card--background.sgm-card--background--full {
    object-fit: contain;
}

/* Wrapper do ícone do card no canto superior direito */
.sgm-card--icon-wrapper {
    position: absolute;
    top: 14px;
    right: 14px;
    /* width: 66px; */
    /* height: 66px; */
    height: 90px;
    transform: translateZ(0);
    transition: transform .35s cubic-bezier(.22, .61, .36, 1);
}

/* Garante que o ícone SVG/images ocupem todo o wrapper */
.sgm-card--icon-wrapper img,
.sgm-card--icon-wrapper svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

/* Estilos dos traços SVG para o ícone */
.sgm-card--icon-wrapper svg .sgm-svg-line {
    fill: none;
    stroke: #fff;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    transform-box: fill-box;
    transform-origin: center;
    vector-effect: non-scaling-stroke;
}

/* Texto do SVG de ícone em branco e fonte mais pesada */
.sgm-card--icon-wrapper svg .sgm-svg-text {
    fill: #fff;
    font-family: 'Source Sans 3', serif;
    font-weight: 600;
}

/* Transição adicional para o wrapper de ícone */
.sgm-card .sgm-card--icon-wrapper {
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
    transform-origin: top right;
}

/* Efeito hover: ícone cresce e rotaciona levemente */
.sgm-card:hover .sgm-card--icon-wrapper {
    transform: scale(1.2) translate(-6px, 7px) rotate(-4deg);
}

/* Título branco posicionado na parte inferior da área visual */
.sgm-card .sgm-card--visual .sgm-card--title {
    position: absolute;
    left: 18px;
    bottom: 14px;
    right: 64px;
    margin: 0;
    color: #fff;
    /* Syntax order: style | weight | size/line-height | family */
    font: normal 400 24px/28px 'Oswald', sans-serif;
    text-shadow: 0 1px 10px rgba(0, 30, 60, .22);
    transform: translateZ(0);
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), letter-spacing .4s ease, text-shadow .4s ease;
    transform-origin: left bottom;
}

/* Hover no card aumenta o título e acentua a sombra */
.sgm-card:hover .sgm-card--visual .sgm-card--title {
    transform: scale(1.2) translateX(0px);
    letter-spacing: .016em;
    text-shadow: 0 3px 22px rgba(0, 30, 60, .5), 0 0 1px rgba(255, 255, 255, .6);
}

/* Bloco de descrição do card abaixo da área visual */
.sgm-card--description {
    padding: 17px 18px 20px;
    background: #fff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: start;
}

/* Estilo base aplicado a todos os filhos da descrição */
.sgm-card--description>* {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 400;
    color: var(--accent);
}

/* Aumenta o contraste do texto quando o card é hoverado */
.sgm-card:hover .sgm-card--description>* {
    font-weight: 600;
}

/* Ajustes específicos para o título dentro da descrição */
.sgm-card .sgm-card--description .sgm-card--title {
    margin: 0 0 9px;
    color: var(--accent);
    font-weight: 600;
    font-size: 16px;
    transition: color .3s ease;
}

/* Títulos em cards grandes ficam ainda mais fortes no hover */
.sgm-card--lg:hover .sgm-card--description .sgm-card--title {
    font-weight: 700;
}

/* Texto adicional dentro da descrição */
.sgm-card .sgm-card--description .sgm-card--text {
    line-height: 1.18;
    color: var(--accent);
}

/* Kicker / subtítulo pequeno no topo da descrição */
.sgm-card .sgm-card--description .sgm-card--kicker {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #666;
    margin: 0 0 9px;
    min-height: 20px;
}

/* Botão ou link de call to action dentro do card */
.sgm-card .sgm-card--call-to-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 11px;
    letter-spacing: .02em;
    color: var(--accent);
    transition: opacity .3s ease, transform .3s ease;
    align-self: end;
    margin-top: auto;
}

/* Ícone ou seta no call to action */
.sgm-card .sgm-card--call-to-action svg {
    width: 13px;
    height: 13px;
    font-weight: 600;
}

/* Texto do call to action fica mais forte no hover */
.sgm-card:hover .sgm-card--call-to-action {
    font-weight: 600;
}

/* sgm-seam - efeito de linha fina que revela ao passar o mouse */
/* Posição da linha sgm-seam; usado para animação de hover */
.sgm-seam--trigger .sgm-seam--position {
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--from), var(--to));
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .45s cubic-bezier(.22, .61, .36, 1);
}

.sgm-seam--trigger:has(.sgm-card--background--full) .sgm-seam--position {
    height: 0;
}

.sgm-seam--trigger:hover .sgm-seam--position {
    transform: scaleX(1);
}

.sgm-seam--trigger:has(.sgm-card--background--full):hover .sgm-seam--position {
    height: 3px;
}

/* levitar */
.sgm-levitate {
    transform-style: preserve-3d;
    transition: box-shadow .35s ease, transform .35s cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}

.sgm-levitate:hover {
    transform: translateY(-7px);
    box-shadow: 0 22px 44px -18px var(--accent), 0 6px 14px -8px rgba(0, 40, 80, .25);
}

/* sgm-glow (o elemento gatilho para o glow) */
.sgm-glow--trigger:hover .sgm-glow--visual {
    filter: saturate(1.14) brightness(1.08);
    transition: filter .4s ease;
}

/* sgm-gradient - elemento para posicionar o gradiente */
.sgm-glow--trigger .sgm-glow--gradient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* default igual ao shine... */
    background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .45), transparent 80%);
    mix-blend-mode: overlay;
    opacity: 0;
    transition: opacity .4s ease;
}

.sgm-glow--trigger .sgm-glow--gradient.sgm-glow--gradient--darken {
    background: radial-gradient(circle at 50% 30%, rgba(0, 0, 0, .45), transparent 80%);
}

.sgm-glow--trigger .sgm-glow--gradient.sgm-glow--gradient--shine {
    background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .45), transparent 80%);
}

.sgm-glow--trigger:hover .sgm-glow--gradient,
.sgm-glow--trigger:hover .sgm-glow--gradient--shine {
    opacity: 1;
}

.sgm-gradient {
    background: linear-gradient(140deg, var(--sgm-gradient-from), var(--sgm-gradient-to));
}

/* rotacionar */
.sgm-rotate--trigger:hover .sgm-rotate--element {
    transform: scale(1.04) rotate(-1deg);
}

.sgm-rotate--trigger *:has(> .sgm-rotate--element) {
    overflow: hidden;
}

