﻿/* ===== СТИЛИ ДЛЯ СЕКЦИИ ПРОГРАММЫ БЛОКА ===== */

.program-section {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f7ff 100%);
    padding: 5rem 0;
}

.program-bricks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.program-brick {
    background: white;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(109, 123, 212, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .program-brick:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0,0,0,0.12);
        border-color: var(--primary-color);
    }

.brick-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(109, 123, 212, 0.1);
}

.brick-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

    .brick-icon i {
        font-size: 1.5rem;
        color: white;
    }

.brick-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    line-height: 1.3;
    white-space: normal; /* разрешаем перенос */
    hyphens: auto;
    overflow-wrap: break-word; /* современный стандарт */
}

.brick-content {
    flex: 1;
}

.brick-text {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.brick-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.brick-feature {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(109, 123, 212, 0.03);
    transition: background 0.3s ease;
}

    .brick-feature:hover {
        background: rgba(109, 123, 212, 0.08);
    }

    .brick-feature i {
        color: var(--primary-color);
        margin-right: 0.8rem;
        margin-top: 0.2rem;
        font-size: 1rem;
        flex-shrink: 0;
    }

    .brick-feature span {
        font-size: 0.95rem;
        color: var(--text-color);
        line-height: 1.4;
    }

/* ===== ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ ГОДОВОЙ ПРОГРАММЫ ===== */

.blocks-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* центрируем все блоки */
    gap: 1.5rem; /* промежуток между блоками */
}

.program-block {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex: 0 0 100%; /* моб — 100% родителя */
    max-width: 500px;
}

    .program-block:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0,0,0,0.15);
        border-color: var(--primary-color);
    }

.block-header {
    display: flex;
    flex-direction: column; /* элементы сверху вниз */
    align-items: center; /* горизонтальный центр */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem 2rem;
    text-align: center; /* на всякий случай */
}

.block-period {
    display: flex; /* вместо inline-block */
    justify-content: center; /* центр по горизонтали */
    align-items: center; /* центр по вертикали */
    padding: 0.25rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: white;
    background-color: rgba(0,0,0,0.3);
    border-radius: 50px;

}



.block-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.block-content {
    padding: 2rem;
}

.block-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    text-align:center;
}

.block-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-program {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-view-program {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

    .btn-view-program:hover {
        background: var(--secondary-color);
        border-color: var(--secondary-color);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(109, 123, 212, 0.3);
    }

.btn-buy-record {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

    .btn-buy-record:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(109, 123, 212, 0.3);
    }

/* ===== СТИЛИ ДЛЯ КНОПКИ КАРТОТЕКИ ===== */

.cardindex-toggle {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #6d7bd4, #9c89b8);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 1rem 0;
    border: none;
    cursor: pointer;
}

    .cardindex-toggle:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 20px rgba(109, 123, 212, 0.4);
        color: white;
    }

/* ===== МОДАЛЬНОЕ ОКНО ПРОГРАММЫ ===== */

.modal-program {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 5000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-program-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    position: relative;
    animation: modalFadeIn 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* Ограничиваем высоту */
}

.modal-cardindex-content {
    max-width: 900px; /* Немного шире для картотеки */
}

.modal-program-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: 20px 20px 0 0;
    text-align: center;
    flex-shrink: 0; /* Запрещаем сжатие */
}

.modal-program-body {
    padding: 2rem;
    overflow-y: auto; /* Добавляем вертикальную прокрутку */
    flex-grow: 1; /* Занимает доступное пространство */
    max-height: calc(90vh - 140px); /* Рассчитываем высоту с учетом шапки */
}

    /* Стили для прокрутки */
    .modal-program-body::-webkit-scrollbar {
        width: 8px;
    }

    .modal-program-body::-webkit-scrollbar-track {
        background: rgba(109, 123, 212, 0.1);
        border-radius: 4px;
    }

    .modal-program-body::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 4px;
    }

        .modal-program-body::-webkit-scrollbar-thumb:hover {
            background: var(--secondary-color);
        }

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal-program {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

    .close-modal-program:hover {
        background: rgba(255,255,255,0.3);
        transform: rotate(90deg);
    }

/* ===== СТИЛИ ДЛЯ КАРТОТЕКИ ===== */

.cardindex-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.cardindex-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(109, 123, 212, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

    .cardindex-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        border-color: var(--primary-color);
    }

.cardindex-item-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.cardindex-item-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .cardindex-item-icon i {
        color: white;
        font-size: 1.2rem;
    }

.cardindex-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    line-height: 1.3;
}

.cardindex-item-text {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* ===== СТИЛИ ДЛЯ ПРОГРАММ ===== */

.program-modules {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.program-module {
    background: rgba(109, 123, 212, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.module-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

    .module-title i {
        color: var(--primary-color);
    }

.module-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.module-feature {
    display: flex;
    align-items: flex-start;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(109, 123, 212, 0.1);
}

    .module-feature:last-child {
        border-bottom: none;
    }

    .module-feature i {
        color: #28a745;
        margin-right: 1rem;
        margin-top: 0.2rem;
        flex-shrink: 0;
    }

    .module-feature span {
        color: #666;
        line-height: 1.5;
    }
/* ===== МОДАЛЬНОЕ ОКНО КАРТОТЕКИ ===== */

.modal-cardindex-content {
    max-width: 700px;
}

.cardindex-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.cardindex-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(109, 123, 212, 0.1);
    transition: all 0.3s ease;
}

    .cardindex-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        border-color: var(--primary-color);
    }

.cardindex-item-header {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    margin-bottom: 0.5rem;
}

.cardindex-item-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

    .cardindex-item-icon i {
        color: white;
        font-size: 1.2rem;
    }

.cardindex-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    white-space: normal; /* разрешаем перенос */
    word-break: break-word; /* перенос длинных слов */
    overflow-wrap: break-word; /* современный стандарт */
}

.cardindex-item-text {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}
