/**
 * Abakan Online — home "Городская информация".
 * Loaded only with the "home-government-info" mod_articles_categories layout.
 */

.ao-home-government {
    --ao-gov-ink: #182033;
    --ao-gov-muted: #687086;
    --ao-gov-blue: #2f5eff;
    width: 100%;
    margin: 34px 0 48px;
    padding: 28px 26px 24px;
    border: 1px solid #e2e8f2;
    border-radius: 24px;
    background: #f8faff;
    color: var(--ao-gov-ink);
}

.ao-home-government,
.ao-home-government *,
.ao-home-government *::before,
.ao-home-government *::after {
    box-sizing: border-box;
}

.ao-home-government__title {
    margin: 0 0 18px;
    color: var(--ao-gov-ink);
    font-size: 28px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -.03em;
}

.ao-home-government__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.ao-home-government-card {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 18px;
    grid-template-rows: auto auto;
    min-width: 0;
    min-height: 120px;
    align-items: start;
    column-gap: 12px;
    row-gap: 6px;
    padding: 16px;
    border: 1px solid #e4e9f1;
    border-radius: 18px;
    background: #fff;
    color: var(--ao-gov-ink) !important;
    box-shadow: 0 6px 18px rgba(31, 48, 86, .035);
    text-decoration: none !important;
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

.ao-home-government-card:hover,
.ao-home-government-card:focus-visible {
    border-color: #d5ddeb;
    color: var(--ao-gov-ink) !important;
    box-shadow: 0 10px 25px rgba(31, 48, 86, .075);
    transform: translateY(-2px);
}

.ao-home-government-card:focus-visible {
    outline: 3px solid rgba(47, 94, 255, .16);
    outline-offset: 2px;
}

.ao-home-government-card__icon {
    grid-column: 1;
    grid-row: 1;
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background-color: #eaf0ff;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2726%27%20height%3D%2726%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%232f5eff%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M4%2020h16%27%2F%3E%3Cpath%20d%3D%27M6%2020V9l6-4%206%204v11%27%2F%3E%3Cpath%20d%3D%27M9%2020v-5h6v5%27%2F%3E%3C%2Fsvg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 24px 24px;
}

.ao-home-government-card__copy {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding-top: 6px;
}

.ao-home-government-card__title {
    display: block;
    overflow: hidden;
    color: var(--ao-gov-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ao-home-government-card__description {
    display: block;
    margin-top: 26px;
    overflow: hidden;
    color: var(--ao-gov-muted);
    font-size: 11.5px;
    font-weight: 400;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ao-home-government-card__arrow {
    grid-column: 3;
    grid-row: 2;
    align-self: end;
    justify-self: end;
    color: #9aa6b8;
}

.ao-home-government-card__arrow svg {
    display: block;
    width: 16px;
    height: 16px;
    transition: transform .18s ease, color .18s ease;
}

.ao-home-government-card:hover .ao-home-government-card__arrow,
.ao-home-government-card:focus-visible .ao-home-government-card__arrow {
    color: var(--ao-gov-blue);
}

.ao-home-government-card:hover .ao-home-government-card__arrow svg,
.ao-home-government-card:focus-visible .ao-home-government-card__arrow svg {
    transform: translateX(2px);
}

.ao-home-government-card[data-category-alias="transport"] .ao-home-government-card__icon {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2726%27%20height%3D%2726%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%232f5eff%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Crect%20x%3D%276%27%20y%3D%273.5%27%20width%3D%2712%27%20height%3D%2715%27%20rx%3D%272.5%27%2F%3E%3Cpath%20d%3D%27M8.5%207h7M8.5%2011h7%27%2F%3E%3Ccircle%20cx%3D%279%27%20cy%3D%2716%27%20r%3D%271%27%2F%3E%3Ccircle%20cx%3D%2715%27%20cy%3D%2716%27%20r%3D%271%27%2F%3E%3Cpath%20d%3D%27M8%2020l1-1.5M16%2020l-1-1.5%27%2F%3E%3C%2Fsvg%3E");
}

.ao-home-government-card[data-category-alias="meditsina"] .ao-home-government-card__icon {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2726%27%20height%3D%2726%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%232f5eff%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M12%2021s-7-4.4-7-10a4%204%200%200%201%207-2.5A4%204%200%200%201%2019%2011c0%205.6-7%2010-7%2010Z%27%2F%3E%3Cpath%20d%3D%27M9%2012h2l1-2%201.4%204%201-2H17%27%2F%3E%3C%2Fsvg%3E");
}

.ao-home-government-card[data-category-alias="dokumenty"] .ao-home-government-card__icon {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2726%27%20height%3D%2726%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%232f5eff%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M7%203h7l4%204v14H7z%27%2F%3E%3Cpath%20d%3D%27M14%203v5h5%27%2F%3E%3Cpath%20d%3D%27M10%2012h5M10%2015h5%27%2F%3E%3C%2Fsvg%3E");
}

.ao-home-government-card[data-category-alias="ekstrennaya-pomoshch"] .ao-home-government-card__icon {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2726%27%20height%3D%2726%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%232f5eff%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M12%203%2019%206v5c0%204.8-3%208-7%2010-4-2-7-5.2-7-10V6z%27%2F%3E%3Cpath%20d%3D%27M12%208v5M12%2016h.01%27%2F%3E%3C%2Fsvg%3E");
}

@media (max-width: 1199.98px) and (min-width: 768px) {
    .ao-home-government__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .ao-home-government {
        margin: 24px 0 30px;
        padding: 18px 14px 16px;
        border-radius: 18px;
    }

    .ao-home-government__title {
        margin-bottom: 12px;
        font-size: 20px;
        letter-spacing: -.025em;
    }

    .ao-home-government__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .ao-home-government-card {
        grid-template-columns: 38px minmax(0, 1fr);
        grid-template-rows: auto;
        min-height: 82px;
        column-gap: 8px;
        padding: 9px;
        border-radius: 14px;
    }

    .ao-home-government-card:hover,
    .ao-home-government-card:focus-visible {
        transform: none;
    }

    .ao-home-government-card__icon {
        width: 38px;
        height: 38px;
        border-radius: 11px;
        background-size: 20px 20px;
    }

    .ao-home-government-card__copy {
        grid-column: 2;
        grid-row: 1;
        padding-top: 2px;
    }

    .ao-home-government-card__title {
        display: -webkit-box;
        font-size: 11.5px;
        line-height: 1.15;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .ao-home-government-card__description {
        display: -webkit-box;
        margin-top: 4px;
        font-size: 9.5px;
        line-height: 1.18;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .ao-home-government-card__arrow {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ao-home-government-card,
    .ao-home-government-card__arrow svg {
        transition: none;
    }
}
