/* ================================================================
   Reagents by metal block (Provēšana)
   .rg-grid  — one card per precious metal with its reagents
   .rg-cta   — a bar with a note and buttons under the cards
   Section head reuses .pub-section / .pub-section__head
   from publications-block.css
   ================================================================ */

.rg-block * {
    box-sizing: border-box;
}

.rg-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* metal colours */

.rg-card--gold {
    --rg-a: #e9c86b;
    --rg-b: #b8862b;
    --rg-ink: #6e4e10;
}

.rg-card--silver {
    --rg-a: #eef0f2;
    --rg-b: #a7adb4;
    --rg-ink: #4d545b;
}

.rg-card--platinum {
    --rg-a: #dfe4ea;
    --rg-b: #7f8b98;
    --rg-ink: #3f4852;
}

.rg-card--palladium {
    --rg-a: #ece5dc;
    --rg-b: #a89886;
    --rg-ink: #574a3c;
}

.rg-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 26px 24px 24px;
    border: 1px solid var(--pub-line);
    border-radius: 22px;
    background-color: #fff;
    box-shadow: var(--pub-shadow-s);
    transition: box-shadow .25s ease, transform .25s ease;
}

.rg-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rg-a), var(--rg-b));
}

.rg-card:hover {
    box-shadow: var(--pub-shadow-m);
    transform: translateY(-2px);
}

.rg-card__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 20px;
}

.rg-card__symbol {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #fff 0, var(--rg-a) 38%, var(--rg-b) 100%);
    box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .12), 0 6px 14px rgba(0, 0, 0, .08);
    font-size: 20px;
    font-weight: 700;
    color: var(--rg-ink);
}

.rg-card__name {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--pub-bordo);
}

.rg-card__count {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--pub-muted);
}

.rg-card__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rg-card__list li {
    position: relative;
    padding: 10px 12px 10px 34px;
    border-radius: 12px;
    background-color: var(--pub-rose);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--pub-ink);
}

.rg-card__list li::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 13px;
    width: 9px;
    height: 12px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: linear-gradient(180deg, var(--rg-a), var(--rg-b));
    transform: translateY(-50%);
}

.rg-card__note {
    margin: 14px 0 0;
    font-size: 13px;
    font-style: italic;
    line-height: 1.5;
    color: var(--pub-muted);
}

/* ================= call to action ================= */

.rg-cta {
    display: flex;
    align-items: center;
    gap: 22px;
    margin: 28px 0 0;
    padding: 24px 28px;
    border: 1px solid var(--pub-line);
    border-radius: 22px;
    background-color: #fff;
    box-shadow: var(--pub-shadow-s);
}

.rg-cta__icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background-color: var(--pub-card);
    color: var(--pub-bordo);
}

.rg-cta__icon svg {
    width: 28px;
    height: 28px;
}

.rg-cta__body {
    flex: 1 1 auto;
    min-width: 0;
}

.rg-cta__title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--pub-bordo);
}

.rg-cta__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--pub-muted);
}

.rg-cta__actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 10px;
}

.rg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border: 1px solid var(--pub-bordo);
    border-radius: 999px;
    background-color: var(--pub-bordo);
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.rg-btn svg {
    width: 16px;
    height: 16px;
    transition: transform .2s ease;
}

.rg-btn:hover {
    border-color: var(--pub-red);
    background-color: var(--pub-red);
    color: #fff;
}

.rg-btn:hover svg {
    transform: translateX(3px);
}

.rg-btn--ghost {
    background-color: transparent;
    color: var(--pub-bordo);
}

.rg-btn--ghost:hover {
    background-color: var(--pub-card);
    border-color: var(--pub-bordo);
    color: var(--pub-bordo);
}

.rg-btn:focus-visible {
    outline: 2px solid var(--pub-red);
    outline-offset: 2px;
}

/* ================= responsive ================= */

@media (max-width: 1200px) {
    .rg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .rg-cta {
        flex-wrap: wrap;
    }

    .rg-cta__body {
        flex-basis: calc(100% - 80px);
    }

    .rg-cta__actions {
        width: 100%;
        padding-left: 78px;
    }
}

@media (max-width: 768px) {
    .rg-grid {
        gap: 16px;
    }

    .rg-cta__actions {
        padding-left: 0;
    }
}

@media (max-width: 576px) {
    .rg-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .rg-card,
    .rg-cta {
        border-radius: 18px;
    }

    .rg-card {
        padding: 22px 18px 18px;
    }

    .rg-cta {
        padding: 20px 18px;
    }

    .rg-cta__icon {
        width: 48px;
        height: 48px;
    }

    .rg-cta__body {
        flex-basis: calc(100% - 70px);
    }

    .rg-cta__title {
        font-size: 18px;
    }

    .rg-btn {
        flex: 1 1 100%;
    }
}