/**
 * Actions Cards — Карточки акций с прогресс-баром
 * @package OBF2026
 */

/* Сетка карточек — 3 в ряд */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 32px;
}

/* Карточка */
.action-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(34, 139, 34, 0.1);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(34, 139, 34, 0.08);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Зелёная полоса сверху */
.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #228B22, #32CD32, #228B22);
    z-index: 2;
}

.action-card:hover {
    border-color: rgba(34, 139, 34, 0.25);
    box-shadow: 0 8px 28px rgba(34, 139, 34, 0.12);
    transform: translateY(-4px);
}

/* Изображение */
.action-card__img-link {
    display: block;
    text-decoration: none;
}

.action-card__img-wrap {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f0f9f0;
}

/* Blur-подложка */
.action-card__img-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    filter: blur(10px);
    transform: scale(1.1);
    z-index: 1;
    opacity: 0.7;
}

.action-card__img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.4s ease, transform 0.4s ease;
}

.action-card:hover .action-card__img {
    filter: blur(2px);
    transform: scale(1.05);
}

/* Overlay */
.action-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-card:hover .action-card__overlay {
    opacity: 1;
}

.action-card__read-more {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 9px 22px;
    border: 2px solid #ffffff;
    border-radius: 25px;
    transition: background 0.3s ease, color 0.3s ease;
}

.action-card:hover .action-card__read-more {
    background: #228B22;
    border-color: #228B22;
}

/* Контент */
.action-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
}

.action-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    padding-left: 14px;
    position: relative;
}

.action-card__title::before {
    content: '✦';
    position: absolute;
    left: 0;
    top: 2px;
    color: #228B22;
    font-size: 9px;
    opacity: 0.7;
}

.action-card__title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.action-card__title a:hover {
    color: #228B22;
}

.action-card__desc {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

/* Прогресс-бар */
.action-card__progress {
    margin-top: auto;
}

.action-card__progress-bar-wrap {
    background: #e5e7eb;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.action-card__progress-bar {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #DC143C, #ff4d6d);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 4px;
}

/* Подписи к прогресс-бару */
.action-card__progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 4px;
}

.action-card__collected,
.action-card__target {
    font-size: 0.7rem;
    color: #9ca3af;
    line-height: 1.3;
    text-align: center;
}

.action-card__collected {
    text-align: left;
}

.action-card__target {
    text-align: right;
}

.action-card__collected strong,
.action-card__target strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
}

.action-card__collected strong {
    color: #DC143C;
}

.action-card__percent {
    font-size: 0.85rem;
    font-weight: 800;
    color: #DC143C;
    text-align: center;
    white-space: nowrap;
    padding: 0 4px;
}

/* Старые стили — убираем */
.action-card__progress-info {
    display: none;
}

/* Кнопка участия */
.action-card__btn {
    display: block;
    text-align: center;
    padding: 11px 20px;
    background: linear-gradient(135deg, #228B22 0%, #2ea82e 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: auto;
}

.action-card__btn:hover {
    background: linear-gradient(135deg, #1e7a1e 0%, #228B22 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 139, 34, 0.3);
    text-decoration: none;
}

/* Шаблон Акции: высота фото и убираем нижний паддинг */
.actions-cards-grid .news-card__image-container {
    height: 180px;
}

.actions-cards-grid .news-card__content {
    padding-bottom: 0;
}

.actions-cards-grid .news-card__title,
.actions-cards-grid .news-card__excerpt {
    margin-bottom: 0;
}

/* Пагинация */
.obf-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(34, 139, 34, 0.1);
}

.obf-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    background: #f0f9f0;
    color: #1f2937;
    border: 1px solid rgba(34, 139, 34, 0.12);
}

.obf-pagination .page-numbers:hover {
    background: #228B22;
    color: #ffffff;
    border-color: #228B22;
}

.obf-pagination .page-numbers.current {
    background: #228B22;
    color: #ffffff;
    border-color: #228B22;
    pointer-events: none;
}

.obf-pagination .page-numbers.dots {
    background: transparent;
    border-color: transparent;
    cursor: default;
}

/* Прогресс-бар кампании на странице акции */
.page-campaign-progress {
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    padding: 16px 24px 20px;
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.08);
    border: 1px solid rgba(220, 20, 60, 0.1);
    border-top: none;
    margin-bottom: 20px;
}

.page-campaign-progress .action-card__progress-bar-wrap {
    height: 14px;
    margin-top: 10px;
}

.page-campaign-progress .action-card__progress-labels {
    margin-bottom: 0;
}

/* Прогресс и кнопка внутри news-card (promotions-section и page-actions-cards) */
.promo-card {
    display: flex;
    flex-direction: column;
}

.promo-card .news-card__link {
    flex: 1;
}

.promo-card__progress {
    padding: 12px 20px 0;
}

.promo-card__footer {
    padding: 12px 20px 16px;
}

.promo-card__footer .action-card__btn {
    margin-top: 0;
}

/* Сетка на главной */
.promotions-grid {
    grid-template-columns: repeat(3, 1fr);
}



@media (max-width: 992px) {
    .promotions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .promotions-grid {
        grid-template-columns: 1fr;
    }
}
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }


@media (max-width: 600px) {
    .actions-grid {
        grid-template-columns: 1fr;
    }

    .action-card__img-wrap {
        height: 180px;
    }
}

.news-card--regula .news-card__content {
    padding-bottom: 0;
}

/* about-promo-card: убираем лишние отступы */
.about-promo-card .project-card__content {
    padding-bottom: 0;
}

.about-promo-card .project-card__description {
    flex-grow: 0;
    margin-bottom: 0;
}