/* ============================================================================
   Полный автономный CSS для расписания курсов ДПО — ТУ УГМК
   ============================================================================ */

/* === Сброс и базовые настройки === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-width: 375px;
}

body {
    min-height: 100%;
    font-family: 'OpenSans', sans-serif;
    font-size: 0.875rem; /* 14px */
    line-height: 1.6111111111;
    color: #303030;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

ul, ol {
    margin-left: 20px;
}
ul li {
    list-style: disc;
}

img {
    vertical-align: top;
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: inherit;
    font-size: inherit;
}

/* === Шрифты === */
@font-face {
    font-family: 'OpenSans';
    src: url('/icon/OpenSans-Regular.woff2') format('woff2'),
         url('/icon/OpenSans-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'OpenSans';
    src: url('/icon/OpenSans-Bold.woff2') format('woff2'),
         url('/icon/OpenSans-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'icons';
    src: url('/icon/icons.woff2') format('woff2'),
         url('/icon/icons.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* === Иконки === */
[class*="_icon-"]:before {
    font-family: "icons" !important;
    font-style: normal;
    font-weight: normal;
    speak: never;
    display: inline-block;
    text-decoration: inherit;
    text-align: center;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

._icon-sdo:before { content: "\e917"; }

/* === Макет === */
.wrapper {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.wrapper > main {
    flex: 1 1 auto;
    min-width: 0;
}

[class*="__container"] {
    max-width: 91.875rem; /* 1470px */
    margin: 0 auto;
    padding: 0 15px;
}

/* === Header (шапка) === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    padding: 27px 0;
    z-index: 149;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    max-width: 91.875rem;
    margin: 0 auto;
    padding: 0 15px;
}

.logo img {
    height: 3.4375rem; /* 55px */
}

.header__title {
    font-size: 2.25rem; /* 36px */
    font-weight: bold;
    color: #333ef9;
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .header__title {
        font-size: 1.5rem;
        white-space: normal;
    }
    .header__container {
        gap: 12px;
    }
}

/* === Основной контент === */
.page-section {
    padding: 80px 0 40px;
}
.page-section__container {
    max-width: 91.875rem;
    margin: 0 auto;
    padding: 0 15px;
}

/* === Переключатели вида === */
.view-toggle {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}
.view-toggle button {
    padding: 0.4rem 1rem;
    border: 1px solid #333ef9;
    background: #fff;
    color: #333ef9;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}
.view-toggle button.active {
    background: #333ef9;
    color: white;
}

/* === Фильтры и сортировка === */
.filters-sort-block {
    margin: 1rem 0;
    background: #fff;
    padding: 1.3rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    align-items: end;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 160px;
}
.filter-group label {
    font-weight: bold;
    font-size: 0.95rem;
}
.filter-group select,
.filter-group input {
    padding: 0.45rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
}

@media (max-width: 768px) {
    .filters-sort-block {
        flex-direction: column;
    }
    .filter-group {
        min-width: 100%;
    }
}

/* === Таблицы === */
.courses-table-container {
    margin-top: 1rem;
    overflow-x: auto;
}
.courses-table {
    width: 100%;
    border-collapse: collapse;
}
.courses-table th,
.courses-table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid #ddd;
}
.courses-table th {
    background: #efefef;
    font-weight: normal;
}
.courses-table tr:hover td {
    background: #e8edff;
}

/* === Экспорт (под таблицей) === */
.export-buttons {
    margin: 1rem 0;
    text-align: right;
}

/* === Календарь === */
.calendar-view {
    margin-top: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 1.5rem;
}
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: #303030;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}
.calendar-day-header {
    font-weight: bold;
    padding: 0.3rem;
    background: #e9ecef;
    font-size: 0.9rem;
}
.calendar-day {
    min-height: 80px;
    padding: 0.2rem;
    border: 1px solid #dee2e6;
    background: #fff;
    font-size: 0.9rem;
    position: relative;
}
.calendar-day.other-month {
    background: #f8f9fa;
    color: #adb5bd;
}
.calendar-day-number {
    font-weight: bold;
    display: block;
    margin-bottom: 0.2rem;
}
.calendar-event {
    display: block;
    background: #e7f3ff;
    border-left: 3px solid #333ef9;
    padding: 0.1rem 0.2rem;
    margin: 0.1rem 0;
    text-align: left;
    font-size: 0.8rem;
    border-radius: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333ef9;
    text-decoration: none;
    cursor: pointer;
}
.calendar-event:hover {
    background: #d0e6ff;
    text-decoration: underline;
}

/* === Список курсов === */
.course-card {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1.25rem;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}
.status-badge.applying {
    background: #e7f3ff;
    color: #333ef9;
}
.status-badge.closed {
    background: #f8f9fa;
    color: #6c757d;
}

/* === Формы и уведомления === */
.feedback__container .errortext {
    display: inline-block;
    color: #fdd9d9 !important;
    background-color: #ffe6e6;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 0 0 10px 0;
    font-size: 0.9em;
}

.imgcaptcha .form-feedback__button {
    padding: 2.5px 25px !important;
    background-color: #333ef9;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.imgcaptcha .form-feedback__button:hover {
    background-color: #2a2ec9;
}

/* === Ссылки в тексте === */
.info-detailed-news__text a,
.news-detail a {
    color: #333ef9;
    text-decoration: underline;
}
.info-detailed-news__text a:hover,
.news-detail a:hover {
    text-decoration: none;
}

/* === Пагинация === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    padding: 0.4rem 0.8rem;
    border: 1px solid #dee2e6;
    text-decoration: none;
    color: #333ef9;
    background: #fff;
    border-radius: 4px;
}
.pagination .current {
    background: #333ef9;
    color: white;
    font-weight: bold;
}

/* === Footer === */
.footer {
    background: #333ef9;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 3rem;
}

/* === Дополнительные утилиты === */
.back-link {
    display: inline-block;
    margin: 1rem 0;
    color: #333ef9;
    text-decoration: none;
    font-weight: 600;
}
.back-link:hover {
    text-decoration: underline;
}

.field-row {
    display: flex;
    margin: 0.8rem 0;
    gap: 1rem;
}
.field-label {
    font-weight: bold;
    min-width: 220px;
    color: #333;
    flex-shrink: 0;
}
.field-value {
    flex: 1;
    color: #555;
}
@media (max-width: 768px) {
    .field-row {
        flex-direction: column;
    }
    .field-label {
        margin-bottom: 0.25rem;
        min-width: auto;
    }
}