/* Baraja de 3 tarjetas de las páginas de especialidad (partials/specialty-deck.php). Selectores con dos clases para ganar a las reglas h2/p de cada página. */
.deckSection { position: relative; overflow-x: clip; padding-block: 0 64px; background: transparent; }
.deckSection + .cta-final { padding-top: 0; }
.deck { position: relative; max-width: 440px; margin: 0 auto; outline: none; }
.deck:focus-visible { outline: 2px solid var(--brand); outline-offset: 18px; border-radius: 28px; }
.deckCards { position: relative; display: grid; touch-action: pan-y; user-select: none; }
.deck .deckCard { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 18px; min-height: 500px; margin: 0; padding: 40px; border-radius: 26px; text-align: center; color: #fff; box-shadow: 0 26px 48px -26px rgba(0, 43, 55, .55); transform-origin: 50% 100%; transition: transform .6s cubic-bezier(.22, 1, .36, 1), box-shadow .4s ease, filter .25s ease; will-change: transform; cursor: pointer; }
.deck .deckCard.is-active { z-index: 3; transform: none; cursor: default; }
.deck .deckCard.is-left { z-index: 2; transform: translate(-42%, calc(5% - var(--lift, 0%))) rotate(-7deg) scale(.92); }
.deck .deckCard.is-right { z-index: 1; transform: translate(42%, calc(5% - var(--lift, 0%))) rotate(6deg) scale(.92); }
.deck .deckCard:not(.is-active) { box-shadow: 0 18px 36px -24px rgba(0, 43, 55, .45); }
@media (hover: hover) and (min-width: 901px) { .deck .deckCard:not(.is-active):hover { --lift: 3%; filter: brightness(1.1); } }
.deck .deckCard--oscuro { background: linear-gradient(180deg, #006278 0%, #0f7d88 100%); }
.deck .deckCard--medio { background: #4f8e94; }
.deck .deckCard--claro { background: linear-gradient(135deg, #003d4f 0%, #00556d 45%, #1d6a78 100%); }
.deck .deckCard h2 { margin: 0; font-size: clamp(28px, 2.8vw, 34px); line-height: 1.18; font-weight: 700; letter-spacing: 0; color: inherit; text-wrap: normal; }
.deck .deckCard p { max-width: 340px; margin: 0; color: inherit; font-size: 17px; line-height: 1.5; opacity: .86; text-wrap: pretty; }
.deck .deckCard .deckLead { font-size: 18px; font-weight: 700; opacity: 1; }
.deck .deckBtn { display: inline-flex; align-items: center; justify-content: center; min-width: 178px; min-height: 50px; margin-top: auto; padding: 10px 28px; border: 3px solid currentColor; border-radius: 999px; color: inherit; font-size: 18px; font-weight: 800; text-decoration: none; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.deck .deckCard--oscuro .deckBtn:hover, .deck .deckCard--medio .deckBtn:hover, .deck .deckCard--claro .deckBtn:hover { background: #fff; color: var(--brand); }
.deckNav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 30px; }
.deckArrow { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 1.5px solid #bfd3d6; border-radius: 50%; background: #fff; color: var(--brand); cursor: pointer; transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.deckArrow:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.deckArrow:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.deckDots { display: flex; align-items: center; gap: 8px; }
.deckDots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #bfd3d6; cursor: pointer; transition: transform .2s ease, background-color .2s ease; }
.deckDots button[aria-current="true"] { background: var(--brand); transform: scale(1.35); }
.deckDots button:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
html:not(.js) .deck .deckCards { gap: 18px; }
html:not(.js) .deck .deckCard { grid-area: auto; transform: none; cursor: default; }
html:not(.js) .deck .deckNav { display: none; }

/* Dedo de ayuda sobre la tarjeta derecha; arranca cuando la baraja queda centrada (clase is-playing puesta por specialty-deck.js). El rastro sale de la yema (19% / 18% del icono). */
.deckHint { position: absolute; top: 60%; right: -45%; width: 30%; z-index: 40; pointer-events: none; }
.deckHint::after { content: ''; position: absolute; top: calc(18% + 40px); right: 81%; width: 300px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .67); opacity: 0; transform: scaleX(0); transform-origin: 100% 50%; }
.deckHint__finger { display: block; width: 100%; height: auto; opacity: 0; }
.deckHint.is-playing .deckHint__finger { animation: deckSwipeFinger 2s ease forwards; }
.deckHint.is-playing::after { animation: deckSwipeTrail 2s ease forwards; }
@keyframes deckSwipeFinger {
    0% { opacity: 0; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(25px); }
    100% { opacity: 0; transform: translate(-300px, 25px); }
}
@keyframes deckSwipeTrail {
    0%, 40% { opacity: 0; transform: scaleX(0); }
    45%, 60% { opacity: 1; }
    85%, 100% { opacity: 0; }
    100% { transform: scaleX(1); }
}

@media (max-width: 900px) {
    .deckSection { margin-inline: calc(50% - 50vw); padding-block: 0 48px; }
    .deck { max-width: min(420px, 70vw); }
    .deck .deckCard { min-height: calc(min(420px, 70vw) * 1.2); padding: 30px 26px 28px; transform-origin: 50% 50%; }
    .deck .deckCard.is-left { transform: translate(-16%, 5%) rotate(-7deg) scale(.92); }
    .deck .deckCard.is-right { transform: translate(16%, 5%) rotate(7deg) scale(.92); }
    .deckArrow { display: none; }
    .deckHint { top: 28%; right: -20%; }
    /* Las tarjetas fuera de foco se oscurecen con un velo (sin blur ni filter: más barato en móvil) */
    .deck .deckCard { position: relative; }
    .deck .deckCard::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(0, 43, 55, .45); opacity: 0; transition: opacity .45s ease; pointer-events: none; }
    .deck .deckCard:not(.is-active)::after { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .deck .deckCard, .deck .deckCard::after, .deckDots button, .deck .deckBtn, .deckArrow { transition: none; }
    .deckHint { display: none; }
}
