/* ── Clube de Vantagens — Grid & Cards ──────────────────────────────────── */

.ta-cv-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(var(--ta-cv-cols, 3), 1fr);
    grid-auto-rows: 1fr;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 900px) {
    .ta-cv-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .ta-cv-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Card ─────────────────────────────────────────────────────────────────── */

.ta-cv-card {
    position: relative;
    overflow: hidden;
    min-height: 440px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 28px;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .10);
    color: #102a43;
    transition: transform .25s ease, box-shadow .25s ease, opacity .45s ease;
}

.ta-cv-card.ta-cv-visible {
    opacity: 1;
    transform: translateY(0);
}

.ta-cv-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 56px rgba(15, 23, 42, .16);
}

.ta-cv-card::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -16px;
    width: 96px;
    height: 34px;
    background: #96f2d7;
    transform: rotate(-12deg);
    border-radius: 14px;
    z-index: 1;
}

.ta-cv-card::after {
    content: '';
    position: absolute;
    top: 18px;
    right: -18px;
    width: 132px;
    height: 26px;
    background: #38bdf8;
    transform: rotate(11deg);
    border-radius: 14px;
    z-index: 1;
}

/* Imagem de topo */
.ta-cv-card-bg {
    position: relative;
    width: 100%;
    min-height: 232px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f8fbff;
    z-index: 0;
}

.ta-cv-card-overlay {
    display: none;
}

/* Conteúdo do card */
.ta-cv-card-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px 24px 28px;
    background: #ffffff;
}

.ta-cv-card-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.ta-cv-card-group-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1;
}

.ta-cv-card-title {
    margin: 0 0 14px;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 800;
    line-height: 1.05;
    color: #0f172a;
    text-align: left;
    z-index: 3;
}

.ta-cv-card-copy {
    flex: 1;
    margin-bottom: 24px;
    color: #475569;
    font-size: .95rem;
    line-height: 1.75;
    min-height: 72px;
}

/* Botão no pé do card */
.ta-cv-btn-open {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    min-width: 180px;
    background: #0f172a;
    color: #ffffff;
    border: none;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .14);
    transition: transform .2s ease, background .2s ease, color .2s ease;
}
    text-transform: uppercase;
    border-radius: 2px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
    transition: background .2s ease, color .2s ease;
    z-index: 3;
}

.ta-cv-btn-open:hover,
.ta-cv-btn-open:focus-visible {
    background: #111;
    color: #fff;
    outline: none;
}

/* Container de dados para o modal (nunca visível) */
.ta-cv-data {
    display: none !important;
}

/* ── Modal ─────────────────────────────────────────────────────────────────── */

.ta-cv-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ta-cv-modal.ta-cv-open {
    display: flex;
}

.ta-cv-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .58);
    backdrop-filter: blur(3px);
    cursor: pointer;
}

.ta-cv-modal-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .26);
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* Botão fechar */
.ta-cv-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;
    background: rgba(0, 0, 0, .55);
    border: none;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease;
    padding: 0;
}

.ta-cv-modal-close:hover {
    background: rgba(0, 0, 0, .8);
}

/* Lado esquerdo: imagem */
.ta-cv-modal-image-wrap {
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    overflow: hidden;
}

.ta-cv-modal-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    opacity: 0;
    transition: opacity .4s ease;
}

.ta-cv-modal-img.ta-cv-img-loaded {
    opacity: 1;
}

/* Lado direito: conteúdo */
.ta-cv-modal-body {
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.ta-cv-modal-title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.2;
    color: #111;
}

.ta-cv-modal-description {
    color: #444;
    font-size: .96rem;
    line-height: 1.75;
}

.ta-cv-modal-description p:first-child {
    margin-top: 0;
}

.ta-cv-modal-link a {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: #111;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: .83rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    border-radius: 2px;
    transition: background .2s ease;
}

.ta-cv-modal-link a:hover {
    background: #333;
    color: #fff;
}

/* ── Responsividade do modal ─────────────────────────────────────────────── */

@media (max-width: 720px) {
    .ta-cv-modal-wrap {
        grid-template-columns: 1fr;
        max-height: 90vh;
        overflow-y: auto;
    }

    .ta-cv-modal-image-wrap {
        min-height: 200px;
        max-height: 240px;
    }
}

/* Trava o scroll da página quando modal está aberto */
body.ta-cv-modal-open {
    overflow: hidden;
}

/* ── Mensagem vazia ──────────────────────────────────────────────────────── */

.ta-cv-empty {
    color: #666;
    font-style: italic;
}
