@charset "utf-8";

/* ========================================= */
/* ОБЩИЕ СТИЛИ И СБРОС */
/* ========================================= */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background-color: #E9E9E9; 
    color: #333;
    min-height: 100vh;
}


.app-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 0px; /* Добавляем боковые отступы */
    background: white;
    min-height: 100vh;
   
    position: relative;
}

/* ========================================= */
/* ТИПОГРАФИКА */
/* ========================================= */

h3 {
    text-align: center;
    font-weight: 400;
}

h4 {
    line-height: 2.5;
    font-size: 18px;
    font-weight: 500;
}

blockquote {
    font-style: italic;
    margin: 20px 0;
    padding: 10px 20px;
    border-left: 5px solid #ccc;
    color: #555;
    background-color: #f9f9f9;
}

/* ========================================= */
/* ХЕДЕР */
/* ========================================= */

.header {
    background: #263232 ;
    color: white;
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left {
    flex: 0 0 auto;
}

.header-logo {
    height: 60px;
    width: auto;
    display: block;
}

.header-center {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.header-center h1 {
    margin: 0;
    font-size: 20px;
    color: white;
    line-height: 1.2;
    /*word-wrap: break-word;*/
}

.header-right {
    flex: 0 0 auto;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hamburger {
    display: flex;
    flex-direction: column;
    width: 24px;
    height: 18px;
    justify-content: space-between;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
    transform-origin: center;
}

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

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

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

/* ========================================= */
/* БОКОВАЯ ПАНЕЛЬ */
/* ========================================= */

.sidebar {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 200;
    overflow-y: auto;
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    background: #333d43; /*linear-gradient(135deg, #2c3e50 0%, #34495e 100%);*/
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title {
    font-size: 18px;
    font-weight: bold;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-content {
    padding: 20px;
}

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

.menu-section-title {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

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

.menu-item {
    margin-bottom: 8px;
}

.menu-link {
    display: block;
    padding: 12px 15px;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-link:hover {
    background: #f8f9fa;
    color: #2c3e50;
    border-left-color: #667eea;
    transform: translateX(5px);
}

.menu-link.active {
    background: linear-gradient(-90deg, #9fc5c5 0%,#5f7377 100%);
    color: white;
    border-left-color: #ffffff;
}

.menu-icon {
    width: 27px !important;
    height: 27px !important;
    background: #5485ba !important;
    color: white !important;
    border-radius: 7px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.8rem !important;
    font-weight: bold !important;
    margin-right: 10px !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    text-shadow: none !important;
    background-image: none !important;
    line-height: 1 !important;
    padding: 0 !important;
}

.menu-link:hover .menu-icon {
    background: #4674a8 !important;
    transform: scale(1.05);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================= */
/* ГЛАВНАЯ СЕКЦИЯ (HERO) */
/* ========================================= */

.hero-section {
	 /*background-color:#030;*/
   background: linear-gradient(-90deg, #9fc5c5 0%,#0d0c15 100%) !important;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
	text-align: center;!important;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1000px;
    width: 100%;
    padding: 40px 30px;
    z-index: 2;
}

.hero-text {
    color: white;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 20px;
   line-height: 1.2 !important; 
    color: white;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.4;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
	
}

.hero-image img {
    max-width: 100%;
    margin-bottom: 50px;
    height: auto;
    border-radius: 15px;
	box-shadow: 0 4px 10px rgba(0,0,0,0.6);
    transition: transform 0.3s ease;
}

 /*.hero-image img:hover {
    transform: scale(1.05);
}*/

/* ========================================= */
/* ОГЛАВЛЕНИЕ */
/* ========================================= */

.table-of-contents {
    padding: 60px 20px 120px 20px;
    background: #cddada;
}

.toc-header {
    text-align: center;
    margin-bottom: 50px;
}

.toc-title {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.toc-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

.chapter-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    text-decoration: none;
    color: #2c3e50;
    border-left: 5px solid #64797d;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.chapter-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #5387c1 0%, #5b7d9d 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.chapter-card:hover:before {
    opacity: 0.05;
}

.chapter-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-left-color: #2e4154;
}

.chapter-card-content {
    position: relative;
    z-index: 2;
}

.chapter-number {
    width: 40px;
    height: 40px;
    background: #667c80 !important;
    color: white !important;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(84, 133, 186, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.chapter-card:hover .chapter-number {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(84, 133, 186, 0.4);
    background: #546768 !important;
}

.chapter-title {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 10px;
    line-height: 1.0;
}

.chapter-description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.4;
}

/* ========================================= */
/* КОНТЕНТ СТРАНИЦЫ */
/* ========================================= */
.sup {
  font-size: 0.75em;
  vertical-align: super;
  color: #555;
}
.page-content {
	
    padding: 0 40px;
    padding-bottom: 120px;
}

.page-content h3 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 20px;
	padding-top: 30px;
}

.page-content p {
    margin-bottom: 15px;
    text-align: justify;
}
.page-content p strong {
  font-weight: 400;
}
.page-content p.indent {
  margin-left: 2em;
  /* или padding-left: 2em; */
}

.page-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.page-content li {
    margin-bottom: 10px;
}
.snoska{
    margin-top: -px;
    padding-top: 10px;
    border-top: 1px solid #ccc;
    font-size: 0.8em;
    color: #666;
}
.footnotes {
    margin-top: -40px;
    padding-top: 20px;
   /* border-top: 1px solid #eee;*/
    font-size: 0.8em;
    color: #666;
}

/* ========================================= */
/* НАВИГАЦИЯ */
/* ========================================= */

.navigation {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 15px;
    border-radius: 25px 25px 0 0;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    max-width: 800px;
    width: 100%;
    gap: 10px;
}

.nav-btn {
    padding: 12px 20px;
    background: linear-gradient(-90deg, #9fc5c5 0%,#5f7377 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 80px;
}

.nav-btn:hover {
    transform: scale(1.05);
}

.nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ========================================= */
/* МОБИЛЬНЫЕ УСТРОЙСТВА */
/* ========================================= */

@media (max-width: 768px) {
    .header {
        padding: 15px 10px;
        gap: 10px;
    }
    
    .header-logo {
        height: 32px;
    }
    
    .header-center h1 {
        font-size: 16px;
        line-height: 1.1;
        word-break: break-word;
        hyphens: auto;
    }
    
    .menu-toggle {
        padding: 8px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-image img {
        margin-bottom: 30px;
    }
    
    .chapter-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .table-of-contents {
        padding: 40px 15px 120px 15px;
    }
    
    .toc-title {
        font-size: 1.5rem;
    }
    
    .chapter-title {
        font-size: 16px;
    }
    
    .page-content {
        font-size: 16px;
        padding: 15px;
        padding-bottom: 120px;
    }
    
    .nav-btn {
        padding: 10px 15px;
        font-size: 12px;
        min-width: 70px;
    }
    
    .navigation {
        padding: 10px;
    }

    .sidebar {
        width: 300px;
        right: -300px;
    }
    
    .chapter-number {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .menu-icon {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.7rem !important;
    }
	/* Увеличиваем отступы на мобильных */
@media (max-width: 768px) {
    .app-container {
        padding: 0 20px; /* Больше отступы на мобильных */
	 .page-content p {
        text-align: left;	
    }
}

