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

body {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    color: #000000;
    line-height: 1.4;
    opacity: 0;
    animation: fadeInSite 0.3s ease-out forwards;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

@keyframes fadeInSite {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo */
.logo {
    position: fixed;
    top: 15px;
    left: 30px;
    width: 120px;
    height: auto;
    z-index: 1001;
}


/* Header - видимый на страницах курса */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.12);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 160px;
}

/* Desktop навигация */
.main-nav {
    display: none;
    align-items: center;
    gap: 40px;
}

.main-nav a {
    text-decoration: none;
    color: #000000;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.main-nav a:hover {
    color: #F14635;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: #F14635;
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

/* Burger Menu */
.burger-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1002;
}

.burger-icon {
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #F14635;
    border-radius: 15px;
    padding: 12px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 6px 25px rgba(241, 70, 53, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.burger-icon:hover {
    background: #d63a2a;
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 10px 35px rgba(241, 70, 53, 0.6);
}

.burger-icon span {
    width: 26px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    margin: 3px 0;
    position: relative;
}

.burger-icon span::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.burger-icon:hover span::before {
    transform: scaleX(1);
}

.burger-icon.active {
    background: #0089d0;
    transform: scale(1.05) rotate(-2deg);
}

.burger-icon.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    width: 30px;
}

.burger-icon.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.burger-icon.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    width: 30px;
}

/* Desktop Burger Menu (500x700) */
.nav-menu {
    position: absolute;
    top: 60px;
    right: 0;
    width: 500px;
    height: 700px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    display: block;
}

.nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nav-menu.closing {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
}

.nav-menu-section {
    margin-bottom: 40px;
}

.nav-menu-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #000000;
    font-weight: 500;
    font-size: 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    background: #f8f8f8;
    color: #F14635;
    transform: translateX(5px);
}

.nav-menu a.active {
    background: #F14635;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(241, 70, 53, 0.3);
}

.nav-menu a.active::before {
    content: '';
    margin-right: 0;
}

/* Mobile Full Screen Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #F14635 0%, #d63a2a 100%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    padding: 100px 30px 30px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-100%);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.mobile-menu.closing {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-100%);
}

.mobile-menu-header {
    margin-bottom: 40px;
    text-align: center;
}

.mobile-menu-title {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.mobile-menu-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 400;
}

.mobile-menu-section {
    margin-bottom: 30px;
}

.mobile-section-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding-left: 5px;
}

.mobile-menu a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    padding: 15px 20px;
    margin-bottom: 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
    border-color: rgba(255, 255, 255, 0.3);
}

.mobile-menu a.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mobile-menu a::before {
    content: '';
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.mobile-menu a:hover::before,
.mobile-menu a.active::before {
    background: white;
    transform: scale(1.3);
}

.back-menu-item {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    margin-bottom: 20px !important;
}

.back-menu-item::before {
    display: none !important;
}

.back-menu-item svg {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.back-menu-item:hover svg {
    transform: translateX(-3px);
}

/* Main Content */
.photo-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 100px 20px 40px;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    overscroll-behavior-y: bounce;
    -webkit-overflow-scrolling: touch;
}

.breadcrumb {
    background: #f8f9fa;
    padding: 15px 25px;
    margin: -20px -20px 30px -20px;
    font-size: 14px;
    color: #666666;
    border-radius: 15px;
    border-left: 4px solid #F14635;
}

.breadcrumb a {
    color: #F14635;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #d63a2a;
}

.breadcrumb .separator {
    margin: 0 10px;
    color: #999999;
}

.breadcrumb .current {
    color: #333333;
    font-weight: 600;
}

.chapter-header {
    margin-bottom: 30px;
    text-align: left;
}

.chapter-title {
    font-family: 'Noto Sans', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 15px;
    line-height: 1.3;
}

.chapter-description {
    font-size: 18px;
    color: #666666;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Chapter Instruction с интерактивной анимацией */
.chapter-instruction {
    font-size: 16px;
    color: #000000;
    line-height: 1.6;
    margin-bottom: 30px;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: text;
    -webkit-user-select: text;
    -webkit-touch-callout: default;
    touch-action: manipulation;
}

.chapter-instruction::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #F14635;
    transition: width 0.3s ease;
}

.chapter-instruction:hover {
    transform: translateY(-2px);
    color: #F14635;
}

.chapter-instruction:hover::after,
.chapter-instruction.visited::after {
    width: 100%;
}

.chapter-instruction.visited::after {
    background: #F14635;
}

.chapter-instruction.visited {
    color: #F14635;
}

.chapter-instruction strong {
    font-weight: 600;
    color: inherit;
}

.photo-wrapper {
    width: 100%;
    aspect-ratio: 9/18;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    margin: 30px 0;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #666;
    font-size: 16px;
}

.continue-btn {
    width: 100%;
    padding: 18px;
    background: #0089d0;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
    margin-bottom: 40px;
    flex-shrink: 0;
    box-shadow: 0 8px 25px rgba(0, 137, 208, 0.3);
    text-transform: none;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
}

.continue-btn:hover {
    background: #0073b3;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 137, 208, 0.4);
}

.continue-btn:active {
    transform: translateY(-1px);
}

/* Content Page Styles */
.content-page {
    display: none;
}

.content-page.active {
    display: flex;
    flex-direction: column;
}

.content-header {
    text-align: center;
    margin-bottom: 40px;
}

.course-subtitle {
    font-size: 16px;
    color: #666666;
    margin-bottom: 10px;
    font-weight: 400;
}

.content-title {
    font-family: 'Noto Sans', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 20px;
    line-height: 1.3;
}

.content-description {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 25px;
    background: #ffffff;
    border: 1px solid rgba(240, 240, 240, 0.5);
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.content-description:hover {
    border-color: rgba(241, 70, 53, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(241, 70, 53, 0.15);
}

.content-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #F14635;
    color: #ffffff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 18px;
    margin-right: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(241, 70, 53, 0.3);
}

.content-text {
    flex: 1;
    font-size: 16px;
    color: #000000;
    line-height: 1.6;
}

.content-text strong {
    font-weight: 600;
}

.content-title-text {
    margin-bottom: 15px;
}

.subtopic-list {
    list-style: none;
    margin-top: 15px;
}

.subtopic-item {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
    font-weight: 400;
}

.subtopic-item::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #0089d0;
    font-weight: bold;
    font-size: 16px;
}

.role-description {
    font-size: 16px;
    color: #000000;
    margin-bottom: 30px;
    line-height: 1.6;
}

.stretched-image {
    width: 100%;
    height: 400px;
    background: #f5f5f5;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stretched-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.first-page {
    display: flex;
    flex-direction: column;
}

.first-page.hidden {
    display: none;
}

/* Media Queries */
@media (min-width: 1024px) {
    .main-nav {
        display: flex;
    }
}

@media (max-width: 1023px) {
    .nav-menu {
        display: none !important;
    }
    
    .mobile-menu {
        display: flex !important;
    }
    
    .burger-icon {
        width: 45px;
        height: 45px;
    }
    
    .logo {
        width: 100px;
        left: 25px;
    }
    
    .header-content {
        padding: 0 120px;
    }
}

@media (max-width: 600px) {
    .burger-menu {
        top: 18px;
        right: 18px;
    }
    
    .burger-icon {
        width: 42px;
        height: 42px;
    }
    
    .logo {
        top: 12px;
        left: 20px;
        width: 90px;
    }
    
    .photo-container {
        padding: 100px 20px 60px;
        min-height: calc(100vh + env(safe-area-inset-bottom));
    }
    
    .breadcrumb {
        margin: -20px -20px 20px -20px;
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .chapter-title {
        font-size: 24px;
    }
    
    .content-title {
        font-size: 22px;
    }
    
    .header-content {
        padding: 0 110px;
    }
    
    .mobile-menu {
        padding: 80px 20px 20px;
    }
    
    .mobile-menu-title {
        font-size: 24px;
    }
    
    .mobile-menu-subtitle {
        font-size: 14px;
    }
    
    .mobile-menu a {
        font-size: 16px;
        padding: 12px 16px;
    }
    
    .logo {
        display: none;
    }
    
    .continue-btn {
        margin-bottom: 60px;
        padding: 20px;
        font-size: 19px;
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        width: calc(100% - 40px);
        z-index: 100;
        margin-top: 0;
    }
    
    .first-page, .content-page {
        padding-bottom: 100px;
    }
    
    .chapter-instruction {
        cursor: text;
        user-select: text;
        -webkit-user-select: text;
        -webkit-touch-callout: text;
    }
    
    .chapter-instruction:hover {
        transform: none;
    }
    
    .content-text {
        user-select: text;
        -webkit-user-select: text;
        -webkit-touch-callout: text;
    }
    
    .role-description {
        user-select: text;
        -webkit-user-select: text;
        -webkit-touch-callout: text;
    }
}

/* Quiz Styles */
.quiz-section {
    margin-top: 40px;
    padding: 30px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(0, 137, 208, 0.1);
}

.quiz-title {
    font-size: 28px;
    font-weight: 700;
    color: #0089d0;
    text-align: center;
    margin-bottom: 10px;
}

.quiz-description {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-bottom: 30px;
}

.quiz-container {
    position: relative;
    min-height: 400px;
}

.question-card {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.question-card.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

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

.question-number {
    font-size: 14px;
    font-weight: 600;
    color: #0089d0;
    background: rgba(0, 137, 208, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-left: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #F14635;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.question-text {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.4;
}

.answers-list {
    display: grid;
    gap: 12px;
}

.answer-btn {
    padding: 18px 20px;
    background: #ffffff;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.answer-btn:hover {
    border-color: rgba(241, 70, 53, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(241, 70, 53, 0.15);
}

.answer-btn.selected {
    border-color: #F14635;
    background: rgba(241, 70, 53, 0.1);
    color: #F14635;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(241, 70, 53, 0.2);
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    gap: 15px;
}

.nav-btn {
    padding: 14px 28px;
    border: 2px solid #f0f0f0;
    background: #ffffff;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

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

.nav-btn.primary {
    background: #0089d0;
    color: white;
    border-color: #0089d0;
}

.nav-btn.primary:hover:not(:disabled) {
    background: #d63a2a;
    box-shadow: 0 8px 25px rgba(241, 70, 53, 0.3);
}

.nav-btn.primary:disabled {
    background: #ccc;
    border-color: #ccc;
}

/* Quiz Results */
.quiz-results {
    padding: 40px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(0, 137, 208, 0.1);
    text-align: center;
}

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

.results-title {
    font-size: 28px;
    font-weight: 700;
    color: #0089d0;
    margin-bottom: 20px;
}

.score-circle {
    display: inline-flex;
    width: 120px;
    height: 120px;
    border: 6px solid #0089d0;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: rgba(0, 137, 208, 0.1);
}

.score-text {
    font-size: 32px;
    font-weight: 800;
    color: #0089d0;
}

.results-content {
    text-align: left;
    margin-bottom: 30px;
}

.result-message {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(0, 137, 208, 0.05);
    border-radius: 12px;
    border-left: 4px solid #0089d0;
}

.result-message h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0089d0;
    margin-bottom: 8px;
}

.result-message p {
    font-size: 16px;
    color: #666;
}

.recommendations {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.recommendations h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.rec-list {
    list-style: none;
}

.rec-list li {
    position: relative;
    padding: 8px 0 8px 25px;
    font-size: 15px;
    color: #666;
    line-height: 1.4;
}

.rec-list li::before {
    content: "-";
    position: absolute;
    left: 0;
    color: #0089d0;
    font-weight: bold;
}

@media (max-width: 600px) {
    .quiz-section, .quiz-results {
        margin: 20px 0;
        padding: 20px;
        padding-bottom: 120px;
    }
    
    .quiz-section .continue-btn,
    .quiz-results .continue-btn {
        position: static !important;
        width: 100% !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        margin: 30px 0 20px 0 !important;
    }
    
    .quiz-title {
        font-size: 24px;
    }
    
    .question-text {
        font-size: 18px;
    }
    
    .answer-btn {
        padding: 15px;
        font-size: 15px;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
    }
    
    .score-text {
        font-size: 28px;
    }
    
    .quiz-navigation {
        flex-direction: column;
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    
    .nav-btn {
        min-width: auto;
        margin-bottom: 10px;
    }
}
