
:root {
    --greenCol: #55b952;
    --LgreenCol: #addfab;
    --LblueCol:#cddfe7;
    --body-bg: #eef2f5;
    --text-color: #1e4663;
    --btn-text: #1e4663;
    --bg-main: white;
    --bg-v: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--body-bg);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease, color 0.3s ease;
}

.header {
    display: grid;
    background: var(--greenCol);
    align-items: center;
    padding-block: 0.7rem ;
}

.back-btn {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    margin-left: 80px;
    height: 90%;
    max-height: 100px;
    padding: 10px 18px;
    font-size: 1.1rem;
    border: none;
    color: var(--btn-text);
    border-radius: 40px;
    background: var(--bg-v);
    outline: 2px solid orange;
    transition: background 0.3s ease, color 0.3s ease, outline-width 0.2s;
}
.back-btn:hover {
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
    outline-width: 3px;
}

/* Боковые полосы*/
.sidebar-left, .sidebar-right {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 80px;
    background:var(--LgreenCol);
    z-index: -1;
} .sidebar-left {left: 0;} .sidebar-right {right: 0;}

/* Основной блок */
.main-content {
    text-align: center;
    border-radius: 2rem;
    width: 90%;
    margin: 3vh auto;
    justify-content: center;
    padding: 1.5rem 2rem;
    background: var(--bg-main);
    flex: 1;
}

.main-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1e4663;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid orange;
    display: inline-block;
}

.footer {
    background:var(--greenCol);
    padding: 0.6rem;
    justify-content: center;
    display: flex;
    align-items: center;
}

.mpk {
    width: 90px;
    height: 90px;
}

.footer-text {
    display: flex;
    margin-left: 10px;
    flex-direction: column;   
    color: var(--LblueCol);
    text-align: center;
    gap: 10px;
}

/* День-Ночь */
.NightDay {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    margin-right: 80px;
    height: 90%;
    max-height: 100px;
    padding: 10px 18px;
    font-size: 1.1rem;
    border: none;
    color: var(--btn-text);
    border-radius: 40px;
    background: var(--bg-v);
    outline: 2px solid orange;
    transition: background 0.3s ease, color 0.3s ease, outline-width 0.2s;
    
} .NightDay:hover {
    box-shadow: 0 8px 15px  rgba(0,0,0,0.15);
    outline-width: 3px;
}

html[data-theme="dark"] {
    --greenCol: #213347;
    --LgreenCol: #2c3e50;
    --LblueCol: #a0b0c0;
    --body-bg: #2c2b2b;
    --btn-text: white;
    --bg-main: #b1b1b1;
    --bg-v: #374d63;
}  /* Плавно менять элекенты:  */ .header, .footer, .sidebar-left, .sidebar-right, .main-content, .main-content_document-page {transition: background 0.3s ease;}

/* Стиилизация кнопок для перехода по пособию */
.buttons-panel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 0;
    justify-items: stretch;
}

.topic-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--btn-text);
    background: var(--LgreenCol);
    border: 2px solid transparent;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    cursor: pointer;
}

.topic-btn:hover {
    background: var(--greenCol);
    color: white;
    border-color: orange;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.topic-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 5px rgba(0,0,0,0.1);
}
/* PDF стили*/
.main-content_document-page {
    width: 75%;
    margin: 3vh auto;
    padding: 2rem 2.5rem;
    background: #e9e9e9;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
    flex: 1;
    text-align: center
}

.main-content_document-page .main-title {
    display: inline-block;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 600;
    color: #1e4663;
}

#pdf-viewer {
    background: transparent;
    width: 100%;
    margin: 0 auto;
}

#pdf-viewer canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto 12px auto;       
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border-radius: 2px;
}

/* Кнопка скачивания */
.title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 1.5rem;
}

.download-btn {
    position: absolute;
    right: 0;
    width: 60px;
    height: 60px;
    background: var(--LgreenCol);
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.3rem;
    color: #1e4663;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: background 0.2s ease, transform 0.2s ease;
    transition: all 0.2s ease;
    outline: 2px solid orange; 
}
.download-btn:hover {
    background: var(--greenCol);
    color: white;
    transform: scale(1.1);
}
/* Поисковая строка */
.search-wrapper {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    width: 90%;
    max-width: 400px;
}
.searchbar {
    grid-column: 1;
    grid-row: 1;
    justify-self: center; 
    width: 90%;
    max-width: 400px;
    height: 90%;
    max-height: 100px;
    padding: 10px 18px;
    font-size: 1rem;
    border: none;
    border-radius: 40px;
    color: var(--btn-text);
    background: var(--bg-v);
    outline: 2px solid orange;
}
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.search-suggestions li {
    padding: 10px 18px;
    cursor: pointer;
    font-size: 1rem;
    color: #1e4663;
    transition: background 0.2s;
}

.search-suggestions li:hover, .search-suggestions li.active {background: var(--LgreenCol);}
html[data-theme="dark"] .search-suggestions {background: #2c3e50;border-color: #1e2a38;}
html[data-theme="dark"] .search-suggestions li {color: #e0e0e0;}
html[data-theme="dark"] .search-suggestions li:hover,
html[data-theme="dark"] .search-suggestions li.active {background: #1e2a38;}