/* ========== RESET ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #fbfaf8;
    font-family: 'Inter', 'Georgia', serif;
    color: #1d2c3a;
    line-height: 1.48;
    scroll-behavior: smooth;
    transition: all 0.3s ease;
}

h1, h2, h3, .logo h1, .section-title, .hero-content h1, .stat-number {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ========== ПАНЕЛЬ СПЕЦИАЛЬНЫХ ВОЗМОЖНОСТЕЙ ========== */
.accessibility-panel {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: #1a2c3c;
    padding: 15px 12px;
    border-radius: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.accessibility-panel.hidden { display: none; }
.accessibility-panel button {
    background: #fff;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a2c3c;
}
.accessibility-panel button:hover { background: #9b2f2f; color: #fff; transform: scale(1.05); }
.accessibility-panel button.active { background: #9b2f2f; color: #fff; }
.accessibility-panel .separator { height: 2px; background: rgba(255,255,255,0.3); margin: 5px 0; }
.accessibility-panel .panel-title { color: #fff; font-size: 0.6rem; text-align: center; margin-bottom: 5px; }

.toggle-panel-btn {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: #9b2f2f;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: 0.3s;
}
.toggle-panel-btn:hover { background: #1a2c3c; transform: translateY(-50%) scale(1.05); }
.toggle-panel-btn.hidden { display: none; }

/* ========== ВЕРСИЯ ДЛЯ СЛАБОВИДЯЩИХ ========== */
body.special-view { font-family: Arial, Helvetica, sans-serif; line-height: 1.8; }
body.special-view * { font-family: Arial, Helvetica, sans-serif; }
body.special-view a { text-decoration: underline; text-decoration-thickness: 2px; }
body.special-view .btn, body.special-view .course-btn, body.special-view .auth-btn { text-decoration: none; }

body.font-large { font-size: 1.2rem; }
body.font-large h1 { font-size: 2.5rem; }
body.font-large h2 { font-size: 2rem; }
body.font-large .hero-content h1 { font-size: 3rem; }
body.font-large .nav-link { font-size: 1.1rem; }
body.font-large .auth-btn { font-size: 1rem; padding: 10px 24px; }

body.font-xlarge { font-size: 1.4rem; }
body.font-xlarge h1 { font-size: 3rem; }
body.font-xlarge h2 { font-size: 2.5rem; }
body.font-xlarge .hero-content h1 { font-size: 3.5rem; }
body.font-xlarge .nav-link { font-size: 1.3rem; }
body.font-xlarge .auth-btn { font-size: 1.1rem; padding: 12px 28px; }

body.high-contrast { background: #000 !important; color: #fff !important; }
body.high-contrast .site-header { background: #000 !important; border-bottom-color: #fff; }
body.high-contrast .profile-card,
body.high-contrast .course-card,
body.high-contrast .mission-card,
body.high-contrast .team-card,
body.high-contrast .partner-card,
body.high-contrast .modal-content { background: #111 !important; color: #fff !important; border-color: #fff !important; }
body.high-contrast a { color: #ff0 !important; }
body.high-contrast .btn-primary { background: #fff !important; color: #000 !important; }
body.high-contrast .btn-outline { border-color: #fff !important; color: #fff !important; }
body.high-contrast .hero-stats { background: #111 !important; border-color: #fff; }

body.large-spacing p, body.large-spacing li { margin-bottom: 15px; }
body.large-spacing .course-card { padding: 40px; }
body.large-spacing .mission-card { padding: 50px 40px; }

body.hide-images img,
body.hide-images .team-avatar,
body.hide-images .gallery-item img,
body.hide-images .partner-card img,
body.hide-images .mission-icon i { display: none !important; }
body.hide-images .team-avatar {
    background: #ccc;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: block;
}
body.hide-images .team-avatar::after {
    content: "📷";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2rem;
}

body.hide-animations * { animation: none !important; transition: none !important; transform: none !important; }
body.hide-animations .fade-up { opacity: 1 !important; transform: none !important; }
body.hide-animations .course-card:hover,
body.hide-animations .mission-card:hover,
body.hide-animations .team-card:hover,
body.hide-animations .partner-card:hover { transform: none !important; }

/* ========== ШАПКА ========== */
.site-header {
    padding: 15px 0;
    border-bottom: 1px solid rgba(45, 55, 65, 0.08);
    background: rgba(251, 250, 248, 0.95);
    backdrop-filter: blur(16px);
    z-index: 999;
}
body.special-view .site-header { background: #1a2c3c; }
body.special-view .site-header .logo h1 { background: none; color: #fff; }
body.special-view .site-header .logo p { color: #ccc; }
body.special-view .nav-link { color: #fff; }
body.special-view .nav-link:hover { color: #ff0; }

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}
.logo h1 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #1a3c34, #2c5a4a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
}
body.high-contrast .logo h1 { background: none; color: #fff; }
.logo p {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #8b7a66;
}

.nav-wrapper { display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; gap: 1.8rem; flex-wrap: wrap; align-items: center; }
.dropdown { position: relative; display: inline-block; }
.dropdown-content {
    display: none;
    position: absolute;
    background: white;
    min-width: 260px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    z-index: 1000;
    padding: 10px 0;
    border: 1px solid #ece1d4;
}
body.special-view .dropdown-content { background: #1a2c3c; border-color: #fff; }
body.special-view .dropdown-content a { color: #fff; }
body.special-view .dropdown-content a:hover { background: #333; color: #ff0; }
.dropdown-content a {
    color: #2c3e3a;
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    white-space: normal;
}
.dropdown-content a:hover { background: #fbf8f2; color: #9b2f2f; }
.dropdown:hover .dropdown-content { display: block; }
.dropdown > .nav-link i { margin-left: 5px; font-size: 0.7rem; }

.nav-link {
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: #2c3e3a;
    position: relative;
    padding-bottom: 4px;
    white-space: nowrap;
    transition: 0.3s;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: #9b2f2f;
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }
.nav-link:hover { color: #9b2f2f; }

.auth-buttons { display: flex; gap: 12px; }
.auth-btn {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 22px;
    border-radius: 40px;
    transition: 0.3s;
    white-space: nowrap;
    display: inline-block;
}
.btn-login { background: #1a2c3c; color: white; }
.btn-login:hover { background: #9b2f2f; transform: translateY(-2px); }
.btn-register { background: transparent; border: 1px solid #cbd5e0; color: #2b3b44; }
.btn-register:hover { border-color: #9b2f2f; background: #9b2f2f08; transform: translateY(-2px); }
.btn-profile { background: transparent; border: 1px solid #9b2f2f; color: #9b2f2f; }
.btn-profile:hover { background: #9b2f2f; color: white; transform: translateY(-2px); }
.btn-logout { background: #9b2f2f20; border: 1px solid #9b2f2f; color: #9b2f2f; }
.btn-logout:hover { background: #9b2f2f; color: white; transform: translateY(-2px); }

body.special-view .btn-login { background: #fff; color: #1a2c3c; }
body.special-view .btn-register { border-color: #fff; color: #fff; }
body.special-view .btn-register:hover { background: #fff; color: #1a2c3c; }

.burger-menu { display: none; flex-direction: column; cursor: pointer; gap: 5px; z-index: 1001; }
.burger-menu span { width: 28px; height: 2px; background: #2c3e3a; transition: 0.3s; }
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(251, 250, 248, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px;
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.4s ease;
}
.mobile-nav.active { transform: translateX(0); display: flex; }
.mobile-nav .nav-link { font-size: 1.4rem; white-space: normal; }
.mobile-nav .dropdown-content {
    position: static;
    display: block;
    background: transparent;
    box-shadow: none;
    text-align: center;
    padding: 0;
    margin-top: 10px;
}
.mobile-nav .dropdown-content a { font-size: 1.1rem; padding: 8px 0; color: #7c6b59; }
.close-menu {
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 2rem;
    cursor: pointer;
    color: #2c3e3a;
}

/* ========== МОДАЛЬНЫЕ ОКНА ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}
.modal.active { display: flex; }
.modal-content {
    background: white;
    border-radius: 32px;
    max-width: 500px;
    width: 90%;
    padding: 40px;
    position: relative;
    border: 1px solid #ece1d4;
}
.modal-content.large { max-width: 800px; }
.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #8b7a66;
}
.modal-close:hover { color: #9b2f2f; }
.modal h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #1a3c34;
    text-align: center;
}
.modal h3 { font-size: 1rem; color: #7c6b59; margin-bottom: 25px; font-weight: normal; }
.modal p { color: #7c6b59; margin-bottom: 25px; text-align: center; }

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e3a;
}
.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd2c4;
    border-radius: 24px;
    font-size: 1rem;
}
.form-group input:focus,
.form-group select:focus { outline: none; border-color: #9b2f2f; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.form-group.full-width { grid-column: span 2; }
.checkbox-group { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.checkbox-group input { width: 20px; height: 20px; cursor: pointer; }
.checkbox-group label { margin-bottom: 0; font-size: 0.85rem; cursor: pointer; }

.btn-submit {
    width: 100%;
    padding: 14px;
    background: #1a2c3c;
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-submit:hover { background: #9b2f2f; transform: translateY(-2px); }
.btn-cancel {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid #ddd2c4;
    border-radius: 40px;
    cursor: pointer;
}
.btn-cancel:hover { border-color: #9b2f2f; color: #9b2f2f; }
.modal-buttons { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.modal-footer { text-align: center; margin-top: 20px; font-size: 0.85rem; }
.modal-footer a { color: #9b2f2f; text-decoration: none; cursor: pointer; }

/* ========== СТРАНИЦА ОБУЧЕНИЯ ========== */
.page-title { font-family: 'Cormorant Garamond', serif; font-size: 3rem; color: #1a3c34; margin: 40px 0 20px; }
.page-subtitle { color: #7c6b59; margin-bottom: 50px; font-size: 1.1rem; }
.back-link { display: inline-block; margin-bottom: 20px; color: #9b2f2f; text-decoration: none; font-weight: 500; }
.back-link:hover { text-decoration: underline; }

.competence { margin-bottom: 80px; }
.competence-title { font-family: 'Cormorant Garamond', serif; font-size: 2.2rem; color: #1a3c34; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 2px solid #9b2f2f; display: inline-block; }
.competence-desc { color: #7c6b59; margin-bottom: 30px; max-width: 800px; }
.courses-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; margin-top: 20px; }
.course-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    border: 1px solid #ece1d4;
    transition: all 0.3s;
    position: relative;
}
.course-card:hover { transform: translateY(-8px); box-shadow: 0 20px 35px -12px rgba(0,0,0,0.1); border-color: #d6c3ae; }
.course-hours {
    display: inline-block;
    background: #9b2f2f;
    color: white;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}
.course-card h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; margin-bottom: 12px; color: #1a3c34; }
.course-card p { color: #7c6b59; line-height: 1.5; margin-bottom: 20px; font-size: 0.9rem; }
.course-features { list-style: none; margin-bottom: 25px; }
.course-features li { padding: 8px 0; border-bottom: 1px solid #f0e8e0; font-size: 0.85rem; color: #4a5b68; }
.course-features li i { color: #9b2f2f; width: 24px; }
.course-price { font-size: 1.2rem; font-weight: 700; color: #1a3c34; margin-bottom: 20px; }
.course-price span { font-size: 0.8rem; font-weight: normal; color: #7c6b59; }
.btn-start {
    width: 100%;
    padding: 14px;
    border-radius: 40px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
    background: #1a2c3c;
    color: white;
}
.btn-start:hover { background: #9b2f2f; transform: translateY(-2px); }

/* ========== ПРОФИЛЬ ========== */
.profile-card {
    background: white;
    border-radius: 32px;
    padding: 50px;
    text-align: center;
    border: 1px solid #ece1d4;
    margin-bottom: 40px;
}
.profile-card h1 { font-family: 'Cormorant Garamond', serif; font-size: 2.5rem; margin-bottom: 20px; color: #1a3c34; }
.role-badge {
    display: inline-block;
    background: #9b2f2f;
    color: white;
    padding: 6px 24px;
    border-radius: 40px;
    font-size: 0.85rem;
    margin-bottom: 30px;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
    text-align: left;
}
.info-item { padding: 18px; background: #fbf8f2; border-radius: 20px; }
.info-label { font-weight: 600; color: #7c6b59; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; }
.info-value { font-size: 1.1rem; margin-top: 8px; color: #2c3e3a; font-weight: 500; }

.tabs { display: flex; gap: 10px; margin-bottom: 30px; border-bottom: 1px solid #ece1d4; }
.tab-btn {
    padding: 12px 28px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: #7c6b59;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}
.tab-btn.active { color: #9b2f2f; }
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #9b2f2f;
}
.tab-btn:hover { color: #9b2f2f; }
.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.course-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 15px;
}
.status-pending { background: #fef3c7; color: #d97706; }
.status-approved { background: #d1fae5; color: #059669; }
.status-rejected { background: #fee2e2; color: #dc2626; }

.search-box { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; margin-bottom: 30px; }
.search-input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid #ece1d4;
    border-radius: 40px;
    font-size: 1rem;
    background: white;
}
.search-input:focus { outline: none; border-color: #9b2f2f; }

.signature-container { border: 2px solid #ddd2c4; border-radius: 16px; padding: 10px; background: white; }
.signature-canvas { width: 100%; height: auto; background: white; border: 1px solid #e5e7eb; border-radius: 12px; cursor: crosshair; }
.signature-buttons { display: flex; gap: 10px; margin-top: 10px; }

/* ========== КАРТОЧКИ КУРСОВ ========== */
.course-card.small { padding: 20px; }
.course-card.small .course-hours { font-size: 0.7rem; padding: 3px 12px; }
.course-card.small h3 { font-size: 1.2rem; }

/* ========== ФУТЕР ========== */
.footer {
    background: #1a2624;
    color: #dad3c6;
    padding: 50px 0 30px;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 56px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}
.footer-logo {
    font-size: 1.8rem;
    font-family: 'Cormorant Garamond', serif;
    color: white;
}
.footer a { color: #bfb8ab; text-decoration: none; }
.footer a:hover { color: #e3aa7a; }
.footer-privacy {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #3d514a;
    font-size: 0.8rem;
}

/* ========== БЫСТРЫЕ КНОПКИ ========== */
.btn-group { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 20px; }
.btn-primary {
    background: #1a2c3c;
    color: white;
    padding: 14px 34px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: 0.3s;
}
.btn-primary:hover { background: #9b2f2f; transform: translateY(-4px); }
.btn-outline {
    background: transparent;
    border: 1.5px solid #cfc2b2;
    padding: 14px 34px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    color: #2e5a4a;
    display: inline-block;
    transition: 0.3s;
}
.btn-outline:hover { border-color: #9b2f2f; background: #9b2f2f08; transform: translateY(-4px); }

/* ========== СООБЩЕНИЯ ========== */
.message {
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: none;
}
.message.success { background: #d1fae5; color: #059669; display: block; }
.message.error { background: #fee2e2; color: #dc2626; display: block; }
.message.info { background: #e0f2fe; color: #0284c7; display: block; }

.loader { text-align: center; padding: 40px; color: #7c6b59; }

/* ========== АДАПТИВ ========== */
@media (max-width: 860px) {
    .container, .header-inner, .footer-grid { padding: 0 20px; }
    .burger-menu { display: flex; }
    .nav-wrapper { display: none; }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-grid { flex-direction: column; text-align: center; }
    .hero-desc { border-left: none; padding-left: 0; }
    .hero-stats { width: 100%; }
    .team-grid { gap: 20px; }
    .accessibility-panel {
        left: auto;
        right: 10px;
        top: auto;
        bottom: 20px;
        flex-direction: row;
        transform: none;
        border-radius: 50px;
        padding: 10px 15px;
    }
    .accessibility-panel .separator { width: 2px; height: auto; margin: 0 5px; }
    .accessibility-panel .panel-title { display: none; }
    .toggle-panel-btn { left: auto !important; right: 10px !important; top: auto !important; bottom: 20px !important; transform: none !important; }
    .form-row { grid-template-columns: 1fr; }
    .form-group.full-width { grid-column: span 1; }
    .courses-grid { grid-template-columns: 1fr; }
}