/* Базовые переменные в стиле China-RU */
.charity-page {
    --charity-primary: #c62828;
    --charity-bg: #ffffff;
    --charity-bg-alt: #f9f9fc;
    --charity-text: #333333;
    --charity-muted: #666666;
    --charity-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--charity-text);
    line-height: 1.6;
    margin-bottom: 60px;
}

.charity-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 0px;
}

/* Хлебные крошки */
.charity-breadcrumbs {
    margin-top: 20px;
    margin-bottom: -10px; /* Чтобы не было слишком большого разрыва до баннера */
}

.text-center {
    text-align: center;
}

.bg-light {
    background-color: var(--charity-bg-alt);
    border-radius: 24px;
    padding: 60px 0;
    margin: 40px 0;
}

/* Баннер */
.charity-banner {
    position: relative;
    height: 400px;
    background-color: #333;
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    margin: 30px auto 40px;
    max-width: 1280px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.charity-banner__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5); /* Затемнение картинки для читаемости текста */
}

.charity-banner__content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 0 20px;
}

.charity-banner h1 {
    font-size: 48px;
    font-weight: 800;
    margin: 0 0 16px;
}

.charity-banner p {
    font-size: 20px;
    opacity: 0.9;
    margin: 0;
}

/* Вводный текст (добавлены рамка и отступы) */
.charity-intro {
    margin-bottom: 60px;
}

.charity-intro__text {
    font-size: 20px;
    text-align: center;
    color: var(--charity-muted);
    max-width: 1280px;
    margin: 0 auto;
    line-height: 1.8;
    
    /* Новое оформление: красная окантовка и закругления */
    border: 1px solid var(--charity-primary);
    border-radius: 16px;
    padding: 32px 40px;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(198, 40, 40, 0.05); /* Легкая тень в тон рамки для красоты */
}

.charity-intro__text strong {
    color: var(--charity-primary);
}

/* Заголовки */
.charity-title {
    font-size: 36px;
    font-weight: 800;
    color: #111;
    margin: 0 0 8px;
}

.charity-subtitle {
    font-size: 18px;
    color: var(--charity-primary);
    font-weight: 600;
    margin: 0 0 24px;
}

.charity-section {
    margin-bottom: 80px;
}

/* Сетка (Текст + Картинка) */
.charity-grid {
    display: flex;
    align-items: center;
    gap: 60px;
}

.charity-grid--reverse {
    flex-direction: row-reverse;
}

.charity-grid__text {
    flex: 1;
}

.charity-grid__text p {
    font-size: 16px;
    color: var(--charity-muted);
    margin-bottom: 20px;
}

.charity-grid__image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.charity-grid__image img {
    max-width: 100%;
    height: auto;
}

.charity-grid__image--photo img {
    border-radius: 20px;
    box-shadow: var(--charity-shadow);
    width: 100%;
    object-fit: cover;
}

/* Чем занимается фонд (4 карточки) */
.charity-activities {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.charity-activity-card {
    background: var(--charity-bg);
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--charity-shadow);
}

.charity-activity-card:hover {
    transform: translateY(-5px);
    border-color: var(--charity-primary);
    box-shadow: 0 15px 35px rgba(198, 40, 40, 0.1);
}

.charity-activity-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: rgba(198, 40, 40, 0.08);
    color: var(--charity-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.charity-activity-icon svg {
    width: 32px;
    height: 32px;
}

.charity-activity-card h4 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #111;
}

.charity-activity-card p {
    font-size: 14px;
    color: var(--charity-muted);
    margin: 0;
}

/* Кнопка */
.charity-action {
    text-align: center;
    margin-top: 50px;
}

.charity-btn {
    display: inline-block;
    background-color: var(--charity-primary);
    color: #fff;
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(198, 40, 40, 0.2);
}

.charity-btn:hover {
    background-color: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(198, 40, 40, 0.3);
    color: #fff;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .charity-activities {
        grid-template-columns: repeat(2, 1fr);
    }
    .charity-grid {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .charity-banner {
        height: 300px;
        margin-left: 20px;
        margin-right: 20px;
        border-radius: 16px;
    }
    
    .charity-banner h1 {
        font-size: 32px;
    }
    
    .charity-grid,
    .charity-grid--reverse {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .bg-light {
        padding: 40px 20px;
    }
    
    .charity-intro__text {
        font-size: 16px;
        padding: 24px 20px; /* Уменьшаем отступы в рамке для мобилок */
    }
    
    .charity-activities {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    /* 1. Возвращаем отступы от краев экрана для всех блоков */
    .charity-container {
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box; /* Гарантирует, что padding не расширит блок за пределы экрана */
    }

    /* 2. Блок с красной окантовкой после баннера */
    .charity-intro__text {
        padding: 20px 16px; /* Уменьшаем внутренние отступы, чтобы рамка не съедала много места на телефоне */
        font-size: 16px;
    }
    
    /* 3. Блоки "О фонде" и "О создателе" (текст и картинка) */
    .charity-grid,
    .charity-grid--reverse {
        flex-direction: column;
        text-align: center;
        gap: 24px; /* Уменьшаем отступ между картинкой и текстом */
    }

    /* 4. Карточки "Чем занимается фонд" */
    .charity-activities {
        grid-template-columns: 1fr; /* Делаем в 1 колонку */
        gap: 16px; /* Аккуратный отступ между карточками */
    }

    .bg-light {
        padding: 40px 0; /* Ограничиваем серый фон по высоте на мобильных */
    }
}
