/* Стили для модального окна Битрикс24 */
.b24-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; /* Скрыто по умолчанию */
    align-items: center;
    justify-content: center;
    z-index: 1001; /* Выше чем другие элементы */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.b24-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.b24-modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 800px; /* Ширина окна с формой */
    max-height: 90vh; /* Ограничение по высоте */
    overflow-y: auto;
    padding: 20px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.b24-modal-overlay.active .b24-modal-content {
    transform: scale(1);
}

.b24-modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
}
.b24-modal-close-btn:hover {
    color: #333;
}

/* Стили для секции */
.referral-program-section {
    width: 100%;
    margin: 20px 0;
}

.referral-program-content-wrapper {
    display: flex;
    flex-wrap: wrap; /* Для адаптивности */
    align-items: center; /* Выравниваем по центру по вертикали */
    background-color: #fff; /* Белый фон для всего блока (если он не на всю ширину страницы) */
    /* Если фон секции другой, а этот блок - карточка, то раскомментировать: */
    /* border-radius: 12px; */
    /* box-shadow: 0 6px 20px rgba(0,0,0,0.05); */
    /* padding: 40px; */ /* Если это карточка */
    gap: 40px; /* Отступ между текстом и картинкой */
}

.referral-info-content {
    flex: 1; /* Левая колонка с текстом */
    padding: 20px; /* Небольшой отступ от картинки */
    min-width: 300px;
    display: flex;

    flex-direction: column;
    justify-content: center;
}

.referral-title {
    font-size: 3.2em; /* Очень крупный заголовок */
    font-weight: bold;
    color: #000;
    margin-top: 0;
    margin-bottom: 25px;
    line-height: 1.05; /* Очень плотный межстрочный интервал для заголовка */
}

.referral-info-content p {
    font-size: 1em;
    color: #333; /* Текст описания */
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.7;
}
.referral-info-content p:last-of-type { /* Убираем отступ у последнего абзаца перед ссылками */
    margin-bottom: 25px;
}


.referral-links {
    margin-top: 10px;
}

.referral-link {
    display: block;
    color: var(--primary-color); /* Ярко-зеленый цвет ссылок */
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05em;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}
.referral-link:last-child {
    margin-bottom: 0;
}
.referral-link:hover {
    color: var(--primary-color); /* Темнее при наведении */
}

.referral-image-content {
    flex: 1.3; /* Правая колонка с изображением (может быть чуть шире) */
    min-width: 300px;
    display: flex;
}
.referral-image-content img {
    width: 100%;
    height: auto;
    border-radius: 12px; /* Скругление углов изображения */
    display: block;
    max-height: 450px; /* Ограничение высоты изображения */
    object-fit: cover; /* Чтобы изображение красиво заполняло блок */
}

/* Адаптивность */
@media (max-width: 800px) {
    .referral-program-content-wrapper {
        flex-direction: column;
        /* padding: 30px; */ /* Если это карточка */
    }
    .referral-info-content {
        padding-right: 0;
        text-align: center; /* Центрируем текст на мобильных */
        margin-bottom: 30px; /* Отступ до картинки */
    }
    .referral-title {
        font-size: 2.6em;
    }
    .referral-image-content {
        /* Настройки для изображения, если нужно */
    }
}

@media (max-width: 480px) {
    .referral-title {
        font-size: 2.2em;
    }
    .referral-info-content p,
    .referral-link {
        font-size: 0.95em;
    }
}
