/**
 * Forms compilation page.
 *
 * Category groups, cards and yellow accents follow inner-page branding.
 *
 * @package jpd-theme
 */

.jpd-page--forms {
    color: #333333;
    background: var(--jpd-white);
    padding: 0 0 72px;
}

.jpd-forms-content {
    padding-top: clamp(2rem, 4vw, 2rem);
}

.jpd-forms {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.jpd-forms__intro {
    color: #333333;
    font-size: clamp(0.95rem, 0.35vw + 0.85rem, 1.05rem);
    line-height: 1.7;
}

.jpd-forms__intro > *:first-child {
    margin-top: 0;
}

.jpd-forms__intro > *:last-child {
    margin-bottom: 0;
}

.jpd-forms__groups {
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
}

.jpd-forms__group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.jpd-forms__group-title {
    margin: 0;
}

.jpd-forms__group-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.45rem 1.5rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #fde08d 0%, #f5c842 100%);
    color: #1a1a1a;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.jpd-forms__list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.jpd-form-card {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem 1.15rem;
    padding: 1.15rem 1.25rem;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition:
        background-color 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.jpd-form-card:hover,
.jpd-form-card:focus-within {
    border-color: #f5c842;
    background: linear-gradient(90deg, #fffdf4 0%, #fff8dc 100%);
    box-shadow: 0 6px 20px rgba(153, 116, 7, 0.14);
}

.jpd-form-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 10px;
    background: #103d74;
    color: #ffffff;
    flex-shrink: 0;
}

.jpd-form-card__body {
    min-width: 0;
}

.jpd-form-card__title {
    margin: 0;
    color: #0b3a74;
    font-family: var(--jpd-font-heading);
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    font-weight: 700;
    line-height: 1.35;
}

.jpd-form-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0.4rem 0 0;
    color: #5a5a5a;
    font-size: 0.88rem;
    line-height: 1.3;
}

.jpd-form-card__online-link {
    color: inherit;
    text-decoration: none;
}

/* Extend the title link across the card, below the separate download button. */
.jpd-form-card__online-link::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 12px;
    content: "";
}

.jpd-form-card--online:hover .jpd-form-card__online-link,
.jpd-form-card__online-link:focus-visible {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.jpd-form-card__online-link:focus-visible {
    outline: none;
}

.jpd-form-card__online-link:focus-visible::after {
    outline: 3px solid var(--jpd-primary);
    outline-offset: 3px;
}

.jpd-form-card__online-label {
    margin: 0.45rem 0 0;
    color: var(--jpd-primary);
    font-size: 0.88rem;
    font-weight: 700;
}

.jpd-form-card__category {
    color: var(--jpd-secondary, #e8a020);
    font-weight: 700;
}

.jpd-form-card__meta-sep {
    display: inline-block;
    width: 1px;
    height: 12px;
    background: #c8c8c8;
}

.jpd-form-card__excerpt {
    margin: 0.45rem 0 0;
    color: #4f4f4f;
    font-size: 0.92rem;
    line-height: 1.5;
}

.jpd-form-card__download {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 1.15rem;
    border: 0;
    border-radius: 4px;
    background: var(--jpd-secondary, #e8a020);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.jpd-form-card__download:hover,
.jpd-form-card__download:focus-visible {
    background: #c98912;
    color: #ffffff;
    outline: none;
}

.jpd-form-card__download:focus-visible {
    box-shadow: 0 0 0 3px rgba(16, 61, 116, 0.28);
}

.jpd-form-card__unavailable {
    color: #8a8a8a;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
}

.jpd-forms__empty {
    margin: 0;
    padding: 12px 0 28px;
    color: #4f4f4f;
    font-size: 0.98rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .jpd-page--forms {
        padding: 0 0 48px;
    }

    .jpd-forms {
        gap: 2rem;
    }

    .jpd-form-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .jpd-form-card__download,
    .jpd-form-card__unavailable {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jpd-form-card,
    .jpd-form-card__download {
        transition: none;
    }
}
