/* Os cartões dos pacotes — página principal e /pacotes/.
   Vidro escuro sobre o fundo azul-noite da marca, como o resto da principal.
   O realce que segue o rato usa --mx/--my, postos por /assets/package-ui.js. */

.pkc-wrap { display: grid; gap: 28px; }

.pkc-filter { display: flex; flex-wrap: wrap; gap: 10px; }
.pkc-filter button {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: 999px; cursor: pointer;
    border: 1px solid rgba(127,211,245,.22); background: rgba(10,18,30,.55);
    color: #cfdae8; font: inherit; font-size: .88rem; font-weight: 700;
    backdrop-filter: blur(8px); transition: background .2s, color .2s, border-color .2s;
}
.pkc-filter button span {
    min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: .74rem;
    background: rgba(255,255,255,.08); color: #9fb2c9; text-align: center;
}
.pkc-filter button:hover { border-color: rgba(127,211,245,.5); color: #fff; }
.pkc-filter button.is-on { background: linear-gradient(135deg, #1570ef, #1ba8e6); border-color: transparent; color: #fff; box-shadow: 0 8px 24px rgba(21,112,239,.35); }
.pkc-filter button.is-on span { background: rgba(255,255,255,.22); color: #fff; }

.pkc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; grid-auto-flow: dense; }

.pkc {
    --mx: 50%; --my: 0%;
    position: relative; isolation: isolate;
    display: flex; flex-direction: column; min-width: 0;
    border-radius: 20px; overflow: hidden;
    background: linear-gradient(180deg, rgba(14,27,46,.86), rgba(8,17,31,.92));
    border: 1px solid rgba(127,211,245,.14);
    box-shadow: 0 24px 60px rgba(0,0,0,.28);
    transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .35s, opacity .3s;
}
/* O brilho que acompanha o rato, por cima do vidro e por baixo do texto. */
.pkc::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
    background: radial-gradient(420px circle at var(--mx) var(--my), rgba(27,168,230,.18), transparent 60%);
    transition: opacity .3s;
}
.pkc:hover { transform: translateY(-6px); border-color: rgba(127,211,245,.42); box-shadow: 0 34px 80px rgba(0,0,0,.4), 0 0 0 1px rgba(127,211,245,.08); }
.pkc:hover::before { opacity: 1; }
.pkc.is-hidden { display: none; }

.pkc-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0b1f3a; }
.pkc-media img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.02); transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.pkc:hover .pkc-media img { transform: scale(1.08); }
.pkc-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,17,31,0) 45%, rgba(8,17,31,.9)); }
.pkc-cat, .pkc-badge {
    position: absolute; z-index: 1; top: 14px; left: 14px;
    padding: 5px 11px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    background: rgba(8,21,39,.72); color: #bfe9ff; border: 1px solid rgba(127,211,245,.3); backdrop-filter: blur(8px);
}
.pkc-badge { left: auto; right: 14px; background: linear-gradient(135deg, #1570ef, #1ba8e6); color: #fff; border-color: transparent; }

.pkc-body { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px 24px; flex: 1; }
.pkc h3 { margin: 0; font-family: var(--font-display, var(--display, inherit)); font-size: 1.28rem; line-height: 1.25; color: #fff; letter-spacing: -.01em; }
.pkc-link { color: inherit; text-decoration: none; }
.pkc-link::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* o cartão inteiro é o link */
.pkc-link:focus-visible { outline: none; }
.pkc:has(.pkc-link:focus-visible) { outline: 2px solid #7fd3f5; outline-offset: 3px; }
.pkc-sum { margin: 0; color: #a9b8cf; font-size: .94rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.pkc-feats { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 9px; }
.pkc-feats li { display: flex; align-items: center; gap: 10px; color: #dbe6f3; font-size: .9rem; line-height: 1.35; }
.pkc-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; color: #7fd3f5; background: rgba(27,168,230,.12); border: 1px solid rgba(127,211,245,.18); }

.pkc-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pkc-more { display: inline-flex; align-items: center; gap: 8px; color: #7fd3f5; font-weight: 800; font-size: .92rem; }
.pkc-more svg { transition: transform .3s; }
.pkc:hover .pkc-more svg { transform: translateX(5px); }
.pkc-talk {
    position: relative; z-index: 2; /* por cima do link do cartão */
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
    color: #cfdae8; font-size: .84rem; font-weight: 700; text-decoration: none;
    border: 1px solid rgba(255,255,255,.14); transition: border-color .2s, color .2s, background .2s;
}
.pkc-talk:hover { color: #fff; border-color: rgba(127,211,245,.5); background: rgba(27,168,230,.12); }

/* Em destaque: duas colunas, imagem à esquerda. */
.pkc.is-featured { grid-column: span 2; display: grid; grid-template-columns: 1.08fr 1fr; }
.pkc.is-featured .pkc-media { aspect-ratio: auto; min-height: 100%; }
.pkc.is-featured .pkc-media::after { background: linear-gradient(90deg, rgba(8,17,31,0) 55%, rgba(8,17,31,.95)); }
.pkc.is-featured .pkc-body { padding: 30px 30px 28px; }
.pkc.is-featured h3 { font-size: 1.6rem; }
.pkc.is-featured .pkc-sum { -webkit-line-clamp: 4; }

/* O cartão que fecha a grelha. */
.pkc-ask { justify-content: center; gap: 16px; padding: 34px 30px; text-decoration: none; border-style: dashed; border-color: rgba(127,211,245,.3);
    background: radial-gradient(120% 90% at 0% 0%, rgba(27,168,230,.16), transparent 60%), linear-gradient(180deg, rgba(14,27,46,.7), rgba(8,17,31,.8)); }
.pkc-ask .pkc-ic { width: 48px; height: 48px; border-radius: 14px; }
.pkc-ask .pkc-sum { -webkit-line-clamp: 4; }
.pkc-wrap.is-filtered .pkc-ask { display: none; }

@media (max-width: 1100px) {
    .pkc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .pkc-grid { grid-template-columns: 1fr; }
    .pkc.is-featured { grid-column: auto; grid-template-columns: 1fr; }
    .pkc.is-featured .pkc-media { aspect-ratio: 16 / 9; }
    .pkc.is-featured .pkc-media::after { background: linear-gradient(180deg, rgba(8,17,31,0) 45%, rgba(8,17,31,.9)); }
    .pkc-filter { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
    .pkc-badge { top: auto; bottom: 14px; right: auto; left: 14px; } /* não pisa a categoria em ecrãs estreitos */
    .pkc-filter button { flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .pkc, .pkc-media img, .pkc-more svg { transition: none; }
    .pkc:hover { transform: none; }
    .pkc:hover .pkc-media img { transform: scale(1.02); }
}
