/* Шапка курса */
.course-header {
    gap: 40px;
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e2e8f0;
}

/* Стили для блока с логотипом и информацией факультета */
/* Общие стили для чипсетов */
.faculty-chips-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 15px;
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #f0f4f8;
    border-radius: 20px;
    font-size: 0.875rem;
    color: #334155;
    line-height: 1.4;
    transition: all 0.2s ease;
}

/* Специфичные стили для разных чипсетов */
.faculty-logo-chip {
    padding: 4px;
    background-color: #fff;
    border: 1px solid #e2e8f0;
}

.faculty-logo-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.faculty-name-chip .chip {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #1e293b;
}

.program-categories .chip {
    background-color: #e0f2fe;
    color: #0369a1;
}

.course-directions .chip {
    background-color: #e0e7ff;
    color: #4f46e5;
}

/* Аккордеон программы */
.program-accordion {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

/* Элемент аккордеона */
.accordion-item {
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.accordion-item:last-child {
    border-bottom: 0;
}

/* Заголовок аккордеона */
.accordion-header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem;
    background: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.accordion-header:hover {
    background: #f8fafc;
}

.accordion-header::after {
    content: '';
    width: 24px;
    height: 24px;
    margin-left: auto;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>');
    transition: transform 0.3s;
    display: inline-block;
    /* Добавьте это свойство */
    flex-shrink: 0;
    /* Добавьте это свойство */
}

.accordion-item.is-open .accordion-header::after {
    transform: rotate(180deg);
}

/* Контент аккордеона */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-item.is-open .accordion-content {
    max-height: 1000px;
}

.accordion-content-inner {
    padding: 0 20px 20px 40px;
}

/* Заголовок модуля */
.module-title {
    font-size: 1rem;
    margin: 0;
    flex-grow: 1;
    text-align: left;
}

/* Список уроков */
.module-lessons {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    padding-left: 0;
    margin-left: 0;
    /* Убираем все отступы слева */
}

.module-lessons li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 8px;
}

/* Нумерованный список тем */
.numbered-lessons {
    /* list-style-type: none;Отключаем стандартную нумерацию <ol> */
    margin-top: 15px;
    padding-top: 15px;
    padding-left: 0;
    margin: 0;
}

/* Расстояние между нумерацией и текстом */
.numbered-lessons li {
    padding-left: 5px;
}

.numbered-lessons li::before {
    left: 10px;
    width: 15px;
}

/* Преподаватели */
/* Стили для единого слайдера */
.teachers-slider {
    position: relative;
    padding: 0 40px;
    margin: 0 -40px;
}

.teachers-slider .teacher-card {
    height: 100%;
    box-sizing: border-box;
}

.teachers-slider .swiper-slide {
    opacity: 1 !important;
    /* Отключаем прозрачность */
    padding: 10px;
    /* Уменьшаем отступы */
    box-sizing: border-box;
}

.teacher-slide-wrapper {
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.teachers-slider .swiper-wrapper {
    align-items: stretch;
    /* Выравнивание по высоте */
}

.teachers-slider .swiper-slide-active {
    transform: scale(1.02);
    z-index: 2;
}

.teachers-slider .swiper-button-next,
.teachers-slider .swiper-button-prev {
    background: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    top: 40%;
}

.teachers-slider .swiper-button-next::after,
.teachers-slider .swiper-button-prev::after {
    font-size: 18px;
    color: #333;
}

.teachers-slider .swiper-pagination {
    position: relative;
    margin-top: 20px;
}

/* Форма записи */
.course-registration {
    background: #f7fafc;
    padding: 40px;
    border-radius: 8px;
}

/* Стили для таблицы расписания */
.course-schedule {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.course-table {
    width: 100%;
    min-width: auto;
    /* Убрать фиксированную минимальную ширину */
}

.table-header h2 {
    font-size: 1.5rem;
    padding: 1.5rem;
    margin: 0;
    border-bottom: 1px solid #e2e8f0;
}

.table-headings {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 120px;
    /* Равномерное распределение */
    gap: 1rem;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 120px;
    gap: 1rem;
    padding-top: 10px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.table-row:hover {
    background: #f8fafc;
}

.detail-label {
    display: none;
}

/* Стили для ячеек */
.date-start,
.date-end,
.duration,
.format,
.price,
.action {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.date-main {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.date-month {
    font-size: 0.875rem;
    color: #64748b;
    text-transform: uppercase;
}

.duration-badge {
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-top: 4px;
    width: fit-content;
}

.price-value {
    font-weight: 600;
    color: #10b981;
    font-size: 1.125rem;
}

.enroll-button {
    background: #3b82f6;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.enroll-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
}


/* Стили для формы заявки */
.enroll-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.enroll-form .field-group {
    margin-bottom: 20px;
}

.enroll-form .field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
}

.enroll-form .field-group input,
.enroll-form .field-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
}

.enroll-form .field-group.full-width {
    grid-column: span 2;
}

.enroll-form .wpcf7-submit {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 14px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.enroll-form .wpcf7-submit:hover {
    background: #2563eb;
}

/* Стили для строки без дат */
.table-row.no-dates {
    grid-column: 1 / -1;
    /* Занимает все колонки */
    padding: 1.5rem;
    text-align: center;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Чекбокс согласия */
.consent-checkbox .wpcf7-list-item {
    margin: 0;
    display: block;
}

.consent-checkbox input[type="checkbox"] {
    margin-right: 10px;
    vertical-align: top;
    margin-top: 3px;
}

.consent-checkbox label {
    display: inline !important;
    font-weight: normal;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

/* Стили для ссылок в чекбоксе согласия */
.consent-checkbox a {
    color: #2563eb;
    text-decoration: underline;
}

.consent-checkbox a:hover {
    text-decoration: none;
}

/* Выравнивание текста с чекбоксом */
.wpcf7-list-item {
    display: flex !important;
    align-items: flex-start;
}

.wpcf7-list-item-label {
    line-height: 1.5;
}

/* reCAPTCHA */
.grecaptcha-badge {
    margin-bottom: 20px;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .course-content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .course-header {
        grid-template-columns: 1fr;
    }

    .teachers-slider {
        padding: 0;
    }

    .course-table {
        min-width: auto;
    }

    .table-headings {
        display: none;
    }

    .table-row {
        display: grid;
        grid-template-areas:
            "start end"
            "duration duration"
            "format format"
            "price price"
            "action action";
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 1.5rem;
        margin: 0 0 1rem 0;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        border: 1px solid #e2e8f0;
        background: white;
    }

    .date-start {
        grid-area: start;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .date-end {
        grid-area: end;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .duration {
        grid-area: duration;
        display: flex;
        flex-direction: column;
        padding-top: 12px;
        border-top: 1px solid #f1f5f9;
    }

    .format {
        grid-area: format;
        display: flex;
        flex-direction: column;
        padding-top: 12px;
        border-top: 1px solid #f1f5f9;
    }

    .price {
        grid-area: price;
        display: flex;
        flex-direction: column;
        padding-top: 12px;
        border-top: 1px solid #f1f5f9;
    }

    .action {
        grid-area: action;
        padding-top: 12px;
    }

    .detail-label {
        display: block;
        font-size: 0.75rem;
        color: #64748b;
        margin-bottom: 4px;
        text-transform: uppercase;
    }

    .date-main {
        font-size: 1.5rem;
        font-weight: 600;
        color: #1e293b;
        line-height: 1;
    }

    .date-month {
        font-size: 0.875rem;
        color: #64748b;
        text-transform: uppercase;
        margin-top: 4px;
    }

    .duration-badge {
        background: #e0f2fe;
        color: #0369a1;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.75rem;
        margin-top: 8px;
        width: fit-content;
    }

    .price-value {
        font-weight: 600;
        color: #10b981;
        font-size: 1.25rem;
    }

    .enroll-button {
        background: #3b82f6;
        color: white;
        padding: 12px;
        border-radius: 6px;
        text-align: center;
        text-decoration: none;
        transition: all 0.2s ease;
        width: 100%;
        display: block;
        font-weight: 500;
    }

    .enroll-button:hover {
        background: #2563eb;
    }

    /* Специфичные стили для заголовка таблицы */
    .table-header h2 {
        font-size: 1.25rem;
        padding: 1rem 1.5rem;
        margin: 0;
        border-bottom: 0;
    }

    .table-row.no-dates {
        grid-area: auto;
        /* Сброс grid-area */
        grid-column: 1 / -1;
        padding: 1rem;
        margin-top: 10px;
        border-top: 1px solid #e2e8f0;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .faculty-chips-wrapper {
        gap: 6px;
    }

    .chip {
        padding: 4px 10px;
        font-size: 0.8125rem;
    }

    .faculty-logo-icon {
        width: 16px;
        height: 16px;
    }

    .accordion-header {
        padding: 12px;
        gap: 8px;
    }

    .module-title {
        font-size: 1.1rem;
    }

    .numbered-lessons li {
        padding-left: 1rem;
    }

    .numbered-lessons li::before {
        left: -0.8rem;
        width: 1rem;
    }

    .teachers-slider {
        padding: 0 20px;
    }

    .teachers-slider .swiper-button-next,
    .teachers-slider .swiper-button-prev {
        display: none;
    }

    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }

    .course-registration {
        padding: 20px;
    }

    .enroll-form {
        grid-template-columns: 1fr;
    }

    .enroll-form .field-group.full-width {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .date-main {
        font-size: 1.25rem;
    }

    .date-month {
        font-size: 0.75rem;
    }

    .price-value {
        font-size: 1.1rem;
    }

    .table-row {
        padding: 1rem;
        gap: 8px;
    }
}

/* Состояние когда нет дат */
.no-dates .notification {
    text-align: center;
    color: #64748b;
    padding: 2rem;
    grid-column: 1 / -1;
}