/* ==========================================================
   VOTINGS HUB
   ========================================================== */

.votings-page {
    --vote-green: #17662c;
    --vote-green-dark: #105421;
    --vote-green-light: #eaf4e8;

    --vote-text: #1b1d1b;
    --vote-muted: #6e746f;

    --vote-border: var(--color-border);
    --vote-bg: #f8faf8;

    background: #fff;
    color: var(--vote-text);
}


/*
 * ВАЖНО:
 * .container здесь специально НЕ переопределяется.
 *
 * Используется контейнер твоей существующей темы,
 * поэтому ширина страницы совпадет с about-us/documents.
 */


.votings-hub{
    position: relative;
    z-index: 2;
    margin-top: -40px;
}

/* Атрибут hidden используется JS при фильтрации карточек и панели. */
.votings-hub [hidden] {
    display: none !important;
}

.votings-hub.is-filter-open {
    z-index: 100;
}

/* ==========================================================
   HERO
   ========================================================== */

.votings-hero {
    position: relative;
    height: 355px;
    overflow: hidden;
    color: #fff;
}

.votings-hero__background,
.votings-hero__overlay {
    position: absolute;
    inset: 0;
}

.votings-hero__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 54%;
}

.votings-hero__overlay {
    background:
            linear-gradient(
                    90deg,
                    rgba(5, 34, 18, .78) 0%,
                    rgba(8, 39, 23, .57) 42%,
                    rgba(9, 34, 19, .18) 72%,
                    rgba(0, 0, 0, .08) 100%
            );
}

.votings-hero .container {
    position: relative;
    z-index: 2;
    height: 100%;
}

.votings-hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding-bottom: 27px;
}

.votings-hero h1 {
    margin: 0;

    font-size: 64px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -.035em;

    color: #fff;
}

.votings-hero__line {
    width: 46px;
    height: 4px;
    margin-top: 25px;
    border-radius: var(--radius);
    background: #91d43e;
}

.votings-hero p {
    margin: 18px 0 0;

    font-size: 18px;
    line-height: 1.55;
    font-weight: 400;

    color: rgba(255, 255, 255, .94);
}


/* ==========================================================
   NAVIGATION
   ========================================================== */

.votings-navigation {
    position: relative;
    z-index: 10;
    margin-top: -28px;
}

.votings-navigation__inner {
    position: relative;

    display: flex;
    align-items: center;
    min-height: 72px;
    margin-bottom: 18px;
    padding: 10px 14px;
    box-shadow: var(--shadow-dark);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: ease .2s;
}
.votings-navigation__inner.sticky{
    position: sticky;
    top: 113px;
    display: flex;
    /*border-radius: 0 0 8px 8px;*/
    z-index: 2;
}
.admin-bar .votings-navigation__inner.sticky{
    top: 145px;
}
.admin-bar .votings-navigation__inner.sticky:before{
    top: 32px;
}
.votings-navigation__inner.sticky:before{
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(10px);
    height: 189px;
}

.voting-navigation__grid{
    display: flex;
    gap: 15px;
}


.votings-navigation__filter {
    appearance: none;
    border: 0;
    background: transparent;
    font-family: var(--font-montserrat);
    cursor: pointer;
}
.votings-navigation__button{
    background: transparent;
    box-shadow: none;
    color: #000;
    border: 1px solid var(--color-border);
}
.votings-navigation__button:hover{
    filter: none;
    box-shadow: none;
}
.votings-navigation__button.is-active{
    color: #fff;
    background: linear-gradient(180deg, #15925f 0%, #087345 100%);
    box-shadow: var(--shadow-dark);
    border: 0;
}
.votings-navigation__button .icon{
    fill: #000;
}
.votings-navigation__button.is-active .icon{
    fill: #fff;
}

.votings-navigation__item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-height: 50px;
    padding: 0 31px;
    font-size: 15px;
    font-weight: 500;
    color: #3d423e;
    border-radius: var(--radius);
}


.votings-navigation__item.is-active {
    padding-left: 38px;
    padding-right: 38px;
    background: linear-gradient(135deg, #19702d, #145d26);
    color: #fff;
}

.votings-navigation__item.is-active::after {
    display: none;
}

.votings-navigation__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.votings-navigation__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: var(--radius);
    background: #edf1ed;
    font-size: 12px;
    color: #5d645f;
}

.votings-navigation__filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 48px;
    margin-left: auto;
    padding: 0 23px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    color: #353936;
}


.votings-navigation__filter.is-open,
.votings-navigation__filter.has-active-filters {
    border-color: #398c54;
    color: #176b37;
}


/* ==========================================================
   FILTER PANEL
   ========================================================== */

.votings-filter-panel {
    position: absolute;
    z-index: 40;
    top: calc(100% + 15px);
    right: 0;

    width: min(340px, calc(100vw - 32px));
    padding: 19px 19px 17px;

    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow-dark);
    border: 1px solid var(--color-border);
}

.votings-filter--overflow{
    height: calc(100dvh - 430px);
    overflow-y: scroll;
}

.votings-filter--overflow::-webkit-scrollbar {
    width: 0;
}

.votings-filter-panel,
.votings-filter-panel * {
    box-sizing: border-box;
}

.votings-filter-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.votings-filter-panel__header h2 {
    margin: 0;
    font-family: var(--font-montserrat);
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;

    color: #202522;
}

.votings-filter-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;
    padding: 0;

    border: 0;
    border-radius: 50%;
    background: transparent;

    font: inherit;
    font-family: var(--font-montserrat);
    font-size: 25px;
    line-height: 1;

    color: #5b625d;
    cursor: pointer;
}
.votings-filter-panel__close .icon{
    width: 14px;
    height: 14px;
    fill: #202522;
}

.votings-filter-panel__close:hover,
.votings-filter-panel__close:focus-visible {
    background: #f0f5f1;
    color: #176b37;
}

.votings-filter-form__group {
    margin: 15px 0 0;
    padding: 15px 0 15px;
    border: 0;
    border-bottom: 1px solid var(--color-border);
}

.votings-filter-form__group:last-child{
    border-bottom: 0;
}

.votings-filter-form__group {
    padding-top: 4px;
    border-top: 0;
}

.votings-filter-form__group legend {
    width: 100%;
    padding: 0;
    font-family: var(--font-montserrat);
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;

    color: #252a26;
}

.votings-filter-option {
    position: relative;

    display: flex;
    align-items: center;
    gap: 9px;

    width: fit-content;
    margin-top: 9px;

    font-size: 13px;
    line-height: 1.35;
    font-family: var(--font-base);
    color: #353b36;
    cursor: pointer;
}


.votings-filter-option input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
    pointer-events: none;
}

.votings-filter-option__mark {
    position: relative;

    flex: 0 0 16px;
    width: 16px;
    height: 16px;

    border: 1px solid var(--color-border);
    border-radius: 3px;
    background: #fff;
}

.votings-filter-option--radio .votings-filter-option__mark {
    border-radius: 50%;
}

.votings-filter-option input:checked + .votings-filter-option__mark {
    border-color: #208146;
    background: #208146;
}

.votings-filter-option--radio input:checked + .votings-filter-option__mark::after {
    position: absolute;
    inset: 4px;

    border-radius: 50%;
    background: #fff;

    content: '';
}

.votings-filter-option:not(.votings-filter-option--radio) input:checked + .votings-filter-option__mark::after {
    position: absolute;
    top: 2px;
    left: 5px;

    width: 4px;
    height: 8px;

    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;

    content: '';
    transform: rotate(45deg);
}

.votings-filter-option input:focus-visible + .votings-filter-option__mark {
    outline: 2px solid rgba(32, 129, 70, .3);
    outline-offset: 2px;
}

.votings-filter-form__empty {
    margin: 0;

    font-size: 12px;
    color: #707771;
}

.votings-filter-form__period {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
}

.votings-filter-form__period input {
    width: 100%;
    min-width: 0;
    height: 35px;
    padding: 0 7px;

    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #fff;
    font-family: var(--font-base);
    font-size: 13px;
    color: #454c46;
}

.votings-filter-form__period input:focus {
    border-color: #398c54;
    outline: 2px solid rgba(57, 140, 84, .12);
}

.votings-filter-form__actions {
    display: grid;
    gap: 8px;

    margin-top: 17px;
}

.votings-filter-form__actions button {
    min-height: 38px;
    font-weight: 600;
}

.votings-filter-form__reset {
    background: #fff;
    color: #20733c;
}

.votings-filter-form__reset:hover {
    background: #f1f7f2;
}

.votings-filter-empty {
    margin: 18px 0 0;
    padding: 28px 20px;

    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
    background: #f8fbf8;

    font-size: 14px;
    text-align: center;

    color: #59615a;
}


/* ==========================================================
   MAIN
   ========================================================== */

.votings-main-grid {
    display: grid;
    grid-template-columns:minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
}


/* ==========================================================
   FEATURED
   ========================================================== */

.voting-featured {
    display: grid;
    grid-template-columns: 43% 57%;
    min-height: 316px;
    margin-bottom: 15px;
    overflow: hidden;
    background: var(--color-surface);
    box-shadow: var(--shadow-dark);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.voting-featured__image {
    position: relative;

    min-height: 316px;

    overflow: hidden;
}

.voting-featured__image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.voting-featured__image .vote-status {
    position: absolute;

    top: 16px;
    left: 16px;
}

.voting-featured__content {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.voting-featured__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.voting-category {
    font-size: 13px;
    line-height: 1.3;
    font-weight: 500;

    color: #42814c;
}

.vote-access {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: var(--radius);
    background: #fbf2d9;
    font-size: 11px;
    font-weight: 600;
    color: #73622d;
}
.vote-access .icon{
    width: 17px;
    height: 17px;
    fill: #73622d;
}
.voting-featured h2 {
    margin: 15px 0 9px;

    font-size: 25px;
    line-height: 1.17;
    font-weight: 700;
    letter-spacing: -.02em;

    color: #1f211f;
}

.voting-featured__description {
    max-width: 490px;

    margin: 0;

    font-size: 13px;
    line-height: 1.48;

    color: #646a65;
}


/* META */

.voting-meta {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-top: auto;
    padding-top: 20px;
    margin-bottom: 20px;
}

.voting-meta__item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.voting-meta .icon-participants{
    width: 25px;
    height: 25px;
    min-width: 25px;
}

.voting-meta__item svg {
    width: 19px;
    height: 19px;

    flex: 0 0 auto;

    fill: none;
    stroke: #397c45;
    stroke-width: 1.7;
}

.voting-meta__item div {
    display: flex;
    flex-direction: column;
}

.voting-meta__item span {
    font-size: 11px;
    line-height: 1.3;

    color: #929792;
}

.voting-meta__item strong {
    margin-top: 1px;

    font-size: 11px;
    font-weight: 600;

    color: #3d413e;
}

.voting-meta__item strong.green {
    color: #397f44;
}

.voting-featured__button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;

    width: 100%;
    height: 45px;

    margin-top: 17px;

    border-radius: var(--radius);

    background: linear-gradient(
            135deg,
            #176a2b,
            #125722
    );

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;

    color: #fff;

    transition: .2s ease;
}

.voting-featured__button:hover {
    background: #0e4f1e;
    color: #fff;
}


/* ==========================================================
   STATUS
   ========================================================== */

.vote-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 2px 10px;
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 600;

    text-transform: none;
}

.vote-status--active {
    background: #238838;
    color: #fff;
}

.vote-status--soon {
    background: rgba(0, 192, 255, 0.2);
    color: #00c0ff;
}

.vote-status--finished {
    background: rgba(108, 108, 108, 0.2);
    color: #6c6c6c;
}


/* ==========================================================
   SMALL CARDS
   ========================================================== */

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

.voting-card {
    display: flex;
    flex-direction: column;
    min-height: 270px;
    padding: 15px 15px 13px;
    background: var(--color-surface);
    box-shadow: var(--shadow-dark);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: box-shadow .2s ease, transform .2s ease;
}

[data-vote-status="finished"] .document-attr .icon{
    fill: var(--color-gray);
}

[data-vote-status="finished"] .snt-button{
    background: linear-gradient(180deg, #6c6c6c 0%, #858585 100%);
    box-shadow: var(--shadow-dark);
}

[data-vote-status="upcoming"] .document-attr .icon{
    fill: #00c0ff;
}

[data-vote-status="upcoming"] .snt-button{
    background: linear-gradient(180deg, #47d2ff 0%, rgb(0 192 255) 100%);
    box-shadow: var(--shadow-dark);
}

.voting-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-dark);
}

.voting-card__status {
    display: flex;
    gap: 5px;
    min-height: 20px;
}
.voting-card__status .card-body--cat{
    line-height: 1.2;
}

.voting-card .voting-category {
    display: block;

    margin-top: 4px;

    font-size: 11px;
}

.voting-card h3 {
    margin: 8px 0 7px;
    font-size: 20px;
    line-height: 1.14;
    font-weight: 700;
    letter-spacing: -.01em;

    color: #202320;
}

.voting-card > p {
    margin: 0;
    font-size: 14px;
    color: #1f211f;
    line-height: 1.43;
}

.voting-card__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 18px;
    margin-top: auto;
    padding-top: 15px;
    margin-bottom: 15px;
}
.voting-card__meta .document-attr .icon{
    margin-right: 0;
}
.voting-card__meta .document-attr--info{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.voting-card__meta .document-label{
    font-size: 11px;
}
.voting-card__meta .document-value{
    font-size: 12px;
}
.voting-card__meta > div{
    gap: 6px;
}

.voting-card__meta > div {
display: flex;
flex-direction: column;
}

.voting-card__meta span {
    font-size: 11px;

    color: #959b96;
}

.voting-card__meta strong {
    margin-top: 2px;

    font-size: 11px;
    font-weight: 600;

    color: #3d423e;
}

.voting-card__meta strong.green {
    color: #347941;
}

.voting-card__locked {
    margin-left: auto;
    font-size: 11px;
    font-weight: 500;
    color: #333;
}
.voting-card__button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 34px;
    margin-top: 13px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    color: #30763b;
    transition: .2s ease;
}

.voting-card__button:hover {
    background: #eff7ee;
    color: #185b27;
}

.voting-card__button--blue {
    border-color: #75a7ef;
    color: #3f7bc9;
}

.voting-card__button--blue:hover {
    background: #f1f6ff;
    color: #356bab;
}

.voting-card__button--gray {
    border-color: #bbc1bc;
    color: #626763;
}








/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 1100px) {

    .votings-main-grid {
        grid-template-columns: 1fr;
    }


    .votings-grid {
        grid-template-columns: repeat(2, 1fr);
    }


}


@media (max-width: 767px) {

    .votings-hero {
        height: 300px;
    }

    .votings-hero h1 {
        font-size: 42px;
    }

    .votings-hero p {
        font-size: 15px;
    }

    .votings-navigation {
        margin-top: -20px;
    }

    .votings-navigation__inner {
        overflow-x: auto;

        justify-content: flex-start;

        padding: 9px;
    }

    .votings-navigation__item {
        flex: 0 0 auto;

        padding: 0 18px;
    }

    .votings-navigation__filter {
        flex: 0 0 auto;
    }

    .votings-filter-panel {
        position: fixed;
        z-index: 1000;
        top: 16px;
        right: 16px;
        bottom: 16px;
        left: 16px;

        width: auto;
        max-height: calc(100dvh - 32px);

        overflow-y: auto;
    }

    .voting-featured {
        grid-template-columns: 1fr;
    }

    .voting-featured__image {
        min-height: 240px;
    }

    .voting-featured__content {
        padding: 20px;
    }

    .voting-featured h2 {
        font-size: 22px;
    }

    .voting-meta {
        flex-wrap: wrap;
    }

    .votings-grid {
        grid-template-columns: 1fr;
    }

    .voting-card {
        min-height: auto;
    }


}
