:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --gray: #95a5a6;
}
.hide-desktop {
    display: none !important;
}
.off-completed {
    background: rgba(123, 179, 251, 1);
}
.on-completed {
    background: rgba(80, 181, 84, 1);
}

.off-completed-percent {
    background: rgba(123, 179, 251, 0.2);
    color: rgba(58, 126, 215, 1);
}
.on-completed-percent {
    background: rgba(80, 181, 84, 1);
    color: white;
}
.on-completed-border {
    border: 2px solid rgba(80, 181, 84, 1) !important;
}

.module-content-b-t {

}
.module-content-b-t-t {
    width: 100%;
    display: flex;
    font-size: 15px;
    text-transform: uppercase;
    color: rgba(79, 79, 79, 1);
    font-weight: 500;
}
.module-content-b-t-d {
    font-size: 25px;
    max-width: 725px;
    display: flex;
}

.module-content-b-i {
    background: rgba(123, 179, 251, 1);
    padding: 25px 25px 10px;
    border-radius: 50%;
}
.module-content-b-i svg{
    width: 42px;
    height: 42px;
}

.icon-b {
    height: 37px;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    border-radius: 0 0 8px 8px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f9f4f3;
    min-height: 100vh;
}

.container {
    max-width: 1044px;
    margin: 0 auto;
    padding: 20px;
}

/* Шапка */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px;
    background: #BD9286;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    min-height: 240px;
    box-sizing: border-box;
}

.header .logo {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.header .logo i {
    font-size: 3em;
    color: var(--secondary);
}

.header h1 {
    font-size: 32px;
    margin-bottom: 5px;
    color: #FFFFFF;
}

.header .subtitle {
    max-width: 501px;
    opacity: 0.9;
    font-size: 16px;
    color: #FFFFFF;
}
.header-logo-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}
.logo-text {
    font-size: 17px;
}
.header-main-image {
    margin-left: 20px;
    height: 100%;
    display: flex;
    align-items: center;
}

.main-img {
    max-height: 240px;
    width: auto;
    object-fit: contain;
}

.session-info {
    text-align: right;
    opacity: 0.7;
    font-size: 0.9em;
    color: black;
}
.header-logo-section {
    display: flex;
    align-items: center;
    height: 100%;
}
.logo-item {
    display: flex;
    align-items: end;
    gap: 10px;
    color: white;
    font-weight: 600;
    width: 100%;
    margin-top: auto;
}

/* Навигация по модулям */
.module-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.module-btn {
    padding: 20px;
    background: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    gap: 10px;
    position: relative;
}

.module-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--secondary);
}

.module-btn.active {
    /* background: #ecf3f8; */
    /* color: #2d66cf; */
    border: 2px solid rgba(123, 179, 251, 1);
}

.module-btn i {
    font-size: 2em;
    margin-bottom: 5px;
}

.module-btn span {
    font-size: 18px;
    font-weight: 600;
    margin: 30px 0 0 0;

}

.module-btn small {
    font-size: 0.9em;
    opacity: 0.8;
    text-transform: uppercase;
}

.module-progress {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 11px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid rgba(123, 179, 251, 1);
}

/* Контейнер модуля */
.module-container {
    background: white;
    border-radius: 15px;
    /* padding: 30px; */
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 15px;
    min-height: 400px;
}

.loading-message {
    text-align: center;
    padding: 50px;
    color: var(--gray);
}

.loading-message i {
    font-size: 3em;
    margin-bottom: 20px;
}

.error-message {
    text-align: center;
    padding: 50px;
    color: var(--danger);
}

.error-message i {
    font-size: 3em;
    margin-bottom: 20px;
}

.module-title {
    padding: 30px;
    color: var(--primary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    font-size: 1.8em;
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: space-between;
}

.module-title i {
    color: var(--secondary);
}

/* Инструкции */
.instructions {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 5px solid rgba(123, 179, 251, 1);
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    margin: 30px;
}

.instructions h3 {
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.instructions p {
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.7;
}

/* Обновленные стили для навигации */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 20px;
}

.nav-left {
    flex: 1;
}

.nav-right {
    display: flex;
    gap: 15px;
}

/* Обновленная пагинация */
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(217, 219, 224, 1);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: rgba(79, 79, 79, 1);
    transition: all 0.3s ease;
    user-select: none;
}

.pagination-item:hover:not(.disabled):not(.active):not(.dots) {
    border-color: rgba(123, 179, 251, 1);
    color: rgba(123, 179, 251, 1);
    background: rgba(123, 179, 251, 0.1);
}

.pagination-item.active {
    background: white;
    color: rgba(123, 179, 251, 1);
    border-color: rgba(123, 179, 251, 1);
    font-weight: 600;
}

.pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(217, 219, 224, 0.5);
}

.pagination-item.dots {
    cursor: default;
    border: none;
    background: transparent;
}

.pagination-item.dots:hover {
    background: transparent;
    border: none;
}

/* Кнопки навигации */
.nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 40px;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.nav-btn.next {
    background: rgba(123, 179, 251, 1);
    color: white;
    min-width: 180px;
}

.nav-btn.next:hover:not(:disabled) {
    background: rgba(96, 159, 235, 1);
}

.nav-btn.complete {
    background: rgba(80, 181, 84, 1);
    color: white;
    min-width: 180px;
}

.nav-btn.complete:hover:not(:disabled) {
    background: rgba(68, 165, 72, 1);
}

.page-indicator {
    text-align: center;
    color: var(--gray);
    margin: 20px 0;
    font-style: italic;
    display: none; /* Скрываем старый индикатор */
}

/* Контейнер вопроса */
.question-container {
    /* margin-bottom: 20px; */
    padding: 30px;
    transition: all 0.3s ease;
    background: white;
    border-top: 1px solid rgba(217, 219, 224, 1);
}

.question-container-first {

}
.question-container-last {

}
/* У последнего блока добавляем нижнюю границу */
.question-container:last-of-type {
    border-bottom: 1px solid rgba(217, 219, 224, 1);
}

.question-container:hover {
    /* border-color: var(--secondary); */
    /* box-shadow: 0 5px 15px rgba(52, 152, 219, 0.1); */
}

.question-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
    overflow: hidden;
}

.question-number {
    background: rgba(244, 235, 233, 1);
    color: rgba(189, 146, 134, 1);
    min-width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.question-text {
    font-size: 18px;
    color: var(--dark);
    line-height: 1.7;
    flex-grow: 1;
    font-weight: 500;
}

/* Варианты ответов */
.options-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 15px;
}

.option-btn:hover {
    /* border-color: rgba(47, 43, 61, 0.3); */
    /* background: #f8f9fa; */
    /* transform: translateY(-2px); */
    /* box-shadow: 0 4px 12px rgba(0,0,0,0.05); */
}

.option-btn.selected {
    /* border-color: rgba(86, 127, 203, 0.3); */
    background: white;
    transform: translateY(-2px);
    /* box-shadow: 0 4px 15px rgba(86, 127, 203, 0.1); */
}

.option-btn.selected::after {
    content: '✓';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
}

/* Обновленный стиль для прогресс контейнера */
.progress-container {
    background: white;
    padding: 25px;
    border-radius: 16px;
    margin: 15px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-info {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.page-indicator {
    text-align: right;
    color: var(--gray);
    font-style: italic;
    font-size: 14px;
    display: block !important; /* Переопределяем display: none */
    margin: 0 !important; /* Сбрасываем внешние отступы */
}

.progress-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 6px;
    /* overflow: hidden; */
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success) 0%, #2ecc71 100%);
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
    overflow: visible;
    border-radius: 16px;
}

.progress-percent {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--success);
    color: white;
    padding: 0px 12px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 11px;
    white-space: nowrap;
    /* margin-right: 5px; */
    font-size: 14px;
    z-index: 1;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.3) 50%, 
        rgba(255,255,255,0) 100%);
    /* animation: shimmer 2s infinite; */
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    border-top: 1px solid #eee;
}

.results-section {
    margin-bottom: 30px;
}

.results-section h4 {
    color: var(--primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light);
}

.scale-result {
    padding: 10px 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--secondary);
}

.scale-result.suicidal {
    border-left-color: var(--danger);
    background: #fee;
}

.scale-result.ptsd {
    border-left-color: var(--warning);
    background: #fff3cd;
}

.scale-result.adaptability {
    border-left-color: var(--success);
    background: #d4edda;
}

.scale-result.total {
    border-left-color: var(--primary);
    background: #e2e3e5;
    font-weight: bold;
}

/* Кнопки действий */
.action-btn {
    padding: 12px 25px;
    background: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.action-btn:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Футер */
.footer {
    margin-top: 50px;
    padding: 20px;
    text-align: center;
    color: var(--gray);
    border-top: 1px solid #eee;
    background: white;
    border-radius: 10px;
}

.footer p {
    margin: 5px 0;
    font-size: 0.9em;
}



.page-completion-status {
    text-align: center;
    margin: 15px 0;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.page-completion-status.complete {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.page-completion-status.incomplete {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.page-completion-status i {
    margin-right: 8px;
}


/* Обновленные стили для кнопок ответов */
.options-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 15px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 5px 5px;
    border: none;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    text-align: left;
    position: relative;
    width: 100%;
}

.option-btn:hover {
    /* border-color: rgba(47, 43, 61, 0.3); */
    /* background: #f8f9fa; */
    /* transform: translateY(-2px); */
    /* box-shadow: 0 4px 12px rgba(0,0,0,0.05); */
}

.option-btn.selected {
    /* border-color: rgba(86, 127, 203, 0.3); */
    background: white;
    transform: translateY(-2px);
    /* box-shadow: 0 4px 15px rgba(86, 127, 203, 0.1); */
}

/* Кружок для выбора */
.option-btn::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(47, 43, 61, 0.4);
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
}

.option-btn.selected::before {
    border-color: rgba(86, 127, 203, 1);
    background-color: rgba(86, 127, 203, 1);
}

/* Белая точка в центре при выборе */
.option-btn.selected::after {
    content: '';
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: white;
    z-index: 1;
}

/* Текст ответа */
.option-text {
    flex-grow: 1;
    color: black;
    /* font-weight: 500; */
}

.option-btn.selected .option-text {
    /* font-weight: 600; */
}


