/* =====================================================
   ПЕРСИКОВАЯ ТЕМА (КОРЕЙСКИЙ СТИЛЬ) 
   Все фоны остаются белыми, акценты – персиковые.
   ===================================================== */

/* Стиль для активной ссылки в навигации */
.navbar-nav .nav-link.active {
    font-weight: bold;
    color: #E8835A !important; /* тёплый персик */
}

/* Небольшие отступы для аккордеона */
.accordion-item {
    margin-bottom: 1rem;
    border: 1px solid rgba(232, 131, 90, 0.25);
}

/* Стиль для подзаголовков внутри разделов */
.subsection-title {
    color: #8B7A6B; /* мягкий тёплый серо-коричневый */
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Стили для отдельной кнопки открытия панели доступности */
.accessibility-fixed-button {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: #FBC4AB; /* персиковый фон */
    color: #5D4E46;
    border: none;
    border-radius: 5px 0 0 5px;
    padding: 12px 10px;
    cursor: pointer;
    font-weight: bold;
    z-index: 9998;
    transition: transform 0.3s ease;
    box-shadow: -2px 2px 10px rgba(251, 196, 171, 0.4);
}

.accessibility-fixed-button:hover {
    background: #F5A88A; /* при наведении темнее */
}

.accessibility-fixed-button i {
    font-size: 1.3em;
}

/* Стили для панели доступности (фон белый) */
.accessibility-panel {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: #FFFFFF; /* белый фон */
    border: 1px solid #FAD5C0;
    border-radius: 10px 0 0 10px;
    box-shadow: -3px 3px 15px rgba(251, 196, 171, 0.15);
    z-index: 9999;
    width: 300px;
    max-height: 90vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.accessibility-panel.hidden {
    transform: translateX(100%) translateY(-50%);
}

/* Когда панель открыта, кнопка сдвигается вместе с ней */
.accessibility-panel:not(.hidden)+.accessibility-fixed-button {
    transform: translateX(-300px) translateY(-50%);
}

.accessibility-content {
    padding: 20px;
}

.accessibility-option {
    margin-bottom: 15px;
}

.accessibility-btn {
    width: 100%;
    margin-bottom: 8px;
}

/* ===== СПЕЦИАЛЬНЫЕ РЕЖИМЫ (без изменений) ===== */
body.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

body.high-contrast * {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}

body.high-contrast a {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

body.high-contrast .accordion-button {
    background-color: #333 !important;
    color: #fff !important;
}

body.high-contrast .alert {
    background-color: #222 !important;
    border-color: #fff !important;
}

/* Три разных уровня увеличения текста */
body.font-size-medium {
    font-size: 1.3em !important;
    line-height: 1.5 !important;
}

body.font-size-medium * {
    font-size: inherit !important;
    line-height: inherit !important;
}

body.font-size-large {
    font-size: 1.6em !important;
    line-height: 1.7 !important;
}

body.font-size-large * {
    font-size: inherit !important;
    line-height: inherit !important;
}

body.font-size-xlarge {
    font-size: 2.0em !important;
    line-height: 1.8 !important;
}

body.font-size-xlarge * {
    font-size: inherit !important;
    line-height: inherit !important;
}

body.dyslexia-font {
    font-family: "Comic Sans MS", "Segoe UI", Arial, sans-serif !important;
    letter-spacing: 0.05em !important;
}

body.grayscale {
    filter: grayscale(100%) !important;
}

/* Стили для демонстрации размера текста на кнопках */
.font-size-btn-small {
    font-size: 14px;
}

.font-size-btn-medium {
    font-size: 18px;
}

.font-size-btn-large {
    font-size: 22px;
}

.font-size-btn-xlarge {
    font-size: 26px;
}

body:focus,
html:focus {
    outline: none !important;
}

.high-contrast *:focus {
    outline: 3px solid yellow !important;
    outline-offset: 2px !important;
}

.high-contrast [aria-current="page"],
.high-contrast .active {
    outline: 3px solid yellow !important;
    outline-offset: 2px !important;
}

/* Стили для скрытых элементов */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Стили для увеличения интерфейса */
body.interface-medium {
    zoom: 1.2;
}

body.interface-large {
    zoom: 1.5;
}

/* Стили для уведомлений */
.accessibility-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    min-width: 300px;
    max-width: 500px;
}

/* Бейдж для активных настроек */
.accessibility-badge {
    font-size: 0.6em;
    padding: 0.25em 0.4em;
}

/* Стили для печати */
@media print {

    .accessibility-panel,
    .accessibility-fixed-button,
    .skip-link {
        display: none !important;
    }

    .high-contrast * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* Анимации с учетом настроек */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Стили для режима уменьшенного движения */
.reduced-motion * {
    animation: none !important;
    transition: none !important;
}

/* Улучшенные стили для высокого контраста в печати */
@media print and (prefers-contrast: high) {
    body {
        background: white !important;
        color: black !important;
    }

    * {
        background: white !important;
        color: black !important;
        border-color: black !important;
    }
}

/* Стили для мобильных устройств (адаптированы под персиковую тему) */
@media (max-width: 768px) {
    .accessibility-panel {
        width: 90%;
        max-width: 300px;
        right: 0;
        top: 10px;
        transform: none;
        max-height: 80vh;
    }

    .accessibility-panel.hidden {
        transform: translateX(100%);
        top: 10px;
    }

    .accessibility-fixed-button {
        right: 0;
        padding: 10px 8px;
    }

    .accessibility-panel:not(.hidden)+.accessibility-fixed-button {
        transform: translateX(-90%) translateY(-50%);
    }
}

/* Исправление прокрутки для панели (персиковые тона) */
.accessibility-panel::-webkit-scrollbar {
    width: 8px;
}

.accessibility-panel::-webkit-scrollbar-track {
    background: #FFF0E6; /* очень светлый персик */
    border-radius: 4px;
}

.accessibility-panel::-webkit-scrollbar-thumb {
    background: #FBC4AB;
    border-radius: 4px;
}

.accessibility-panel::-webkit-scrollbar-thumb:hover {
    background: #F5A88A;
}

/* Стили для всех режимов цвета (переопределяются) */
.high-contrast .accessibility-panel::-webkit-scrollbar-track {
    background: #222 !important;
}

.high-contrast .accessibility-panel::-webkit-scrollbar-thumb {
    background: #ffff00 !important;
}

.grayscale .accessibility-panel::-webkit-scrollbar-track {
    background: #888 !important;
}

.grayscale .accessibility-panel::-webkit-scrollbar-thumb {
    background: #333 !important;
}

/* Анимация загрузки */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.content-fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Фиксирование подвала внизу – фон белый */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    /* фон не задаём, остаётся белый по умолчанию */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* фон не меняем – белый */
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

#content-container {
    min-height: 400px;
}

/* Стили для фотографии преподавателя - круглая обрезка */
.teacher-photo-container {
    padding-top: 15px;
}

.teacher-photo-frame {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FAD5C0 0%, #FFE5D0 100%); /* персиковый градиент */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 5px 15px rgba(251, 196, 171, 0.25);
    border: 5px solid #FFFFFF; /* белая рамка */
    overflow: hidden;
}

.teacher-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

@media (max-width: 768px) {
    .teacher-photo-frame {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 576px) {
    .teacher-photo-frame {
        width: 130px;
        height: 130px;
    }
}

/* Стили для документов (персиковые акценты, фон белый) */
.document-list .card {
    transition: all 0.3s ease;
    border-left: 4px solid #FBC4AB; /* персиковая полоса слева */
    background-color: #FFFFFF; /* белый фон */
    box-shadow: 0 2px 8px rgba(251, 196, 171, 0.08);
}

.document-list .card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(251, 196, 171, 0.15) !important;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Стили для teacher-info */
.teacher-info p,
.education-info p,
.qualification-info p {
    line-height: 1.6;
    color: #5D4E46;
}

/* Общие стили для карточек – фон белый */
.card {
    transition: transform 0.3s ease;
    background-color: #FFFFFF; /* белый фон */
    border: 1px solid #FAD5C0;
    box-shadow: 0 2px 10px rgba(251, 196, 171, 0.06);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(251, 196, 171, 0.12);
}

/* Цвета для ссылок и кнопок – персиковые */
.text-primary {
    color: #E8835A !important;
}

a.text-decoration-none:hover {
    text-decoration: underline !important;
    color: #D6724E !important;
}

/* Кнопки */
.btn-outline-primary {
    color: #E8835A;
    border-color: #FBC4AB;
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: #FBC4AB;
    color: #5D4E46;
    border-color: #FBC4AB;
}

.btn-primary {
    background-color: #FBC4AB;
    border-color: #FBC4AB;
    color: #5D4E46;
}

.btn-primary:hover {
    background-color: #F5A88A;
    border-color: #F5A88A;
    color: #5D4E46;
}

/* Accordion – фон белый, акценты персиковые */
.accordion-button {
    background-color: #FFFFFF; /* белый фон */
    color: #5D4E46;
}

.accordion-button:not(.collapsed) {
    background-color: #FBC4AB; /* белый фон */
    color: #5D4E46;
    box-shadow: inset 0 -1px 0 rgba(251, 196, 171, 0.2);
}

.accordion-button:focus {
    border-color: #FBC4AB;
    box-shadow: 0 0 0 0.25rem rgba(251, 196, 171, 0.25);
}

/* Персиковый алерт (заменяет стандартный .alert-primary) */
.alert-peach {
    background-color: #fbc4ab56;        /* белый фон */
    border: 1px solid #FBC4AB;        /* персиковая рамка */
    /*border-left: 5px solid #E8835A;   /* акцентная полоса слева */
    color: #5D4E46;                   /* тёплый тёмно-серый текст */
    box-shadow: 0 2px 8px rgba(251, 196, 171, 0.15);
    border-radius: 0.5rem;
}

.alert-peach .lead {
    color: #E8835A;                  /* персиковый цвет для заголовка */
    font-weight: 500;
}

.alert-peach a {
    color: #E8835A;
    text-decoration: underline;
}

.alert-peach a:hover {
    color: #D6724E;
}

h1, h2, h3, h4, h5, h6, p, ul, .card-title, .accessibility-option{
    color: #5D4E46; /* тот же цвет, что и у параграфов */
}