/* ================================================================
   Convention page blocks (Dārgmetālu konvencija)
   Section: member states with search
   Section head reuses .pub-section / .pub-section__head
   from publications-block.css
   ================================================================ */

.cv-members * {
    box-sizing: border-box;
}

/* ================= search bar ================= */

.cv-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 28px;
}

.cv-search {
    position: relative;
    flex: 1;
    max-width: 420px;
}

.cv-search__icon {
    position: absolute;
    top: 50%;
    left: 18px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--pub-bordo-soft);
    pointer-events: none;
}

.cv-search__input {
    width: 100%;
    height: 50px;
    padding: 0 18px 0 48px;
    border: 1px solid var(--pub-line);
    border-radius: 999px;
    background-color: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    color: var(--pub-ink);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.cv-search__input::placeholder {
    color: #a8979c;
}

.cv-search__input:focus {
    border-color: var(--pub-bordo-soft);
    box-shadow: 0 0 0 4px rgba(155, 74, 97, .12);
}

.cv-count {
    flex: none;
    margin: 0;
    font-size: 14px;
    color: var(--pub-muted);
}

.cv-count b {
    font-size: 22px;
    font-weight: 700;
    color: var(--pub-bordo);
}

/* ================= country cards ================= */

.cv-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

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

.cv-card[hidden] {
    display: none;
}

.cv-card:hover {
    transform: translateY(-3px);
    border-color: #dcc9ce;
    box-shadow: var(--pub-shadow-m);
}

.cv-card--home {
    border-color: var(--pub-red);
    box-shadow: 0 0 0 1px var(--pub-red), var(--pub-shadow-m);
}

.cv-card__head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--pub-line);
}

.cv-card__flag {
    flex: none;
    width: 40px;
    height: 30px;
    border-radius: 5px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
}

.cv-card__names {
    flex: 1;
    min-width: 0;
}

.cv-card__name {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--pub-bordo);
}

.cv-card__en {
    margin: 2px 0 0;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--pub-muted);
}

.cv-card__mark {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 104px;
    height: 60px;
    padding: 4px;
    border-radius: 10px;
    background-color: var(--pub-rose);
}

.cv-card__mark img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    mix-blend-mode: multiply;
}

.cv-card__address {
    flex: 1;
    margin: 16px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--pub-ink);
}

.cv-card__address b {
    font-weight: 500;
    color: var(--pub-bordo);
}

.cv-card__contacts {
    display: grid;
    gap: 8px;
    margin: auto 0 0;
    padding: 16px 0 0;
    list-style: none;
}

.cv-card__address + .cv-card__contacts {
    margin-top: 16px;
    border-top: 1px dashed var(--pub-line);
}

.cv-card__contacts li {
    display: grid;
    grid-template-columns: 18px 74px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--pub-ink);
}

.cv-card__contacts svg {
    width: 16px;
    height: 16px;
    color: var(--pub-bordo-soft);
}

.cv-card__label {
    font-size: 12px;
    color: var(--pub-muted);
}

.cv-card__contacts a {
    overflow-wrap: anywhere;
    color: var(--pub-red);
    text-decoration: none;
}

.cv-card__contacts a:hover,
.cv-card__contacts a:focus-visible {
    text-decoration: underline;
}

.cv-empty {
    margin: 12px 0 0;
    padding: 28px;
    border: 1px dashed #dcc9ce;
    border-radius: 16px;
    text-align: center;
    font-size: 15px;
    color: var(--pub-muted);
}

.cv-empty[hidden] {
    display: none;
}

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

@media (max-width: 1200px) {
    .cv-card {
        padding: 20px 18px 18px;
    }

    .cv-card__contacts li {
        grid-template-columns: 18px 66px minmax(0, 1fr);
    }
}

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

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

    .cv-bar {
        margin-bottom: 22px;
    }
}

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

    .cv-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .cv-search {
        max-width: none;
    }

    .cv-search__input {
        height: 46px;
    }

    .cv-card__name {
        font-size: 19px;
    }

    .cv-card__mark {
        width: 80px;
        height: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cv-card {
        transition: none;
    }
}