/* ============================================================
   Дистанция-образование — страницы уроков и тем
   style__lessons.css — стеклянная редакция (как страницы программ)
   Nunito + Comfortaa, блобы и парящие декорации, стеклянные карточки.
   Читаемость сохранена: основной текст 17px, межстрочный 1.8.
   ============================================================ */

/* ===== Base ===== */
body {
    margin: 0;
    font-family: 'Nunito', sans-serif;
    line-height: 1.6;
    font-size: 16px;
    color: #4a4a5a;
    background: linear-gradient(180deg, #f5f3fa 0%, #faf5f8 50%, #f0f5fa 100%);
    min-height: 100vh;
}

*, *:before, *:after { box-sizing: border-box; }

h1, h2, h3, h4, h5, h6 { margin: 0; font-family: 'Comfortaa', cursive; }

a { color: inherit; }

html { scroll-behavior: smooth; }

img { max-width: 100%; }

::selection {
    background: rgba(123, 127, 189, 0.25);
    color: #3d3d55;
}

a:focus-visible {
    outline: 3px solid #7b7fbd;
    outline-offset: 2px;
    border-radius: 10px;
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Decorative blobs ===== */
.bg-blobs {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
}
.blob:nth-child(1) { width: 400px; height: 400px; background: #7b7fbd; top: -100px; left: -100px; }
.blob:nth-child(2) { width: 350px; height: 350px; background: #c98ba8; top: 30%; right: -80px; }
.blob:nth-child(3) { width: 300px; height: 300px; background: #6b9bc4; bottom: 10%; left: -60px; }
.blob:nth-child(4) { width: 280px; height: 280px; background: #6ba89a; bottom: -80px; right: 20%; }

/* ===== Decorative shapes ===== */
.decor {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}
.decor__cloud, .decor__star, .decor__dot { position: absolute; }
.decor__cloud { width: 100px; height: 60px; }
.decor__star  { width: 24px; height: 24px; }
.decor__dot   { width: 40px; height: 40px; }
.decor--1 { top: 8%;  left: 5%;  animation: float 8s ease-in-out infinite; }
.decor--2 { top: 22%; right: 8%; animation: float 10s ease-in-out infinite reverse; }
.decor--3 { top: 40%; left: 3%;  animation: float 7s ease-in-out infinite; }
.decor--4 { top: 60%; right: 4%; animation: float 9s ease-in-out infinite reverse; }
.decor--5 { top: 75%; left: 6%;  animation: float 11s ease-in-out infinite; }
.decor--6 { top: 15%; left: 45%; animation: float 12s ease-in-out infinite reverse; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-20px) rotate(5deg); }
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(123, 127, 189, 0.12);
    border-bottom: 1px solid rgba(123, 127, 189, 0.1);
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #4a4a5a;
}

.logo__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #7b7fbd, #c98ba8);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(123, 127, 189, 0.3);
}

.logo__contain {
    display: flex;
    flex-direction: column;
}

.logo__text {
    font-size: 16px;
    font-weight: 700;
    color: #4a4a5a;
    line-height: 1.2;
}

.logo__subtitle {
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #9da5be;
    line-height: 1.2;
}

/* ===== Nav ===== */
.nav {
    display: flex;
    gap: 8px;
}

.nav__link {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #4a4a5a;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 20px;
    transition: all 0.25s ease;
}

.nav__link:hover {
    color: #7b7fbd;
    background: rgba(123, 127, 189, 0.1);
    box-shadow: 0 2px 8px rgba(123, 127, 189, 0.15);
}

/* ===== Intro ===== */
.intro {
    position: relative;
    z-index: 2;
    padding: 40px 0 60px;
}

.intro__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intro__tittleContain {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
}

.intro__text {
    display: inline-block;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #7b7fbd;
    background: rgba(123, 127, 189, 0.12);
    padding: 6px 20px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.intro__tittle {
    font-size: 28px;
    font-weight: 700;
    color: #4a4a5a;
    line-height: 1.3;
    max-width: 800px;
}

.intro__underline {
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #7b7fbd, #c98ba8);
    border-radius: 2px;
    margin-top: 24px;
}

/* Плашки уроков темы */

.themes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 15px 0;
}

.lesson,
.lesson__head {
    font-family: 'Nunito', sans-serif;
    margin: 0 5px;
    padding: 5px 16px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    border-radius: 20px;
    transition: all 0.25s ease;
}

.lesson {
    color: #7b7fbd;
    background: rgba(123, 127, 189, 0.1);
    border: none;
}

.lesson:hover {
    color: #c98ba8;
    background: rgba(201, 139, 168, 0.12);
    box-shadow: 0 2px 8px rgba(201, 139, 168, 0.18);
}

.lesson__head {
    color: #6b5fc9;
    background: rgba(123, 127, 189, 0.2);
    box-shadow: 0 2px 8px rgba(123, 127, 189, 0.2);
}

.intro__underline1 {
    width: 60%;
    max-width: 500px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(123, 127, 189, 0.3), transparent);
    border: none;
    margin: 16px auto;
    border-radius: 1px;
}

/* ===== Content (стеклянная карточка урока) ===== */

.intro__content {
    width: 100%;
    max-width: 900px;
    margin-top: 32px;
    padding: 28px 32px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(123, 127, 189, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.6);
    scroll-margin-top: 90px;
}

.content__text {
    font-family: 'Comfortaa', cursive;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.6;
    text-align: left;
    width: 100%;
    color: #4a4a5a;
    margin-bottom: 20px;
}

.main__text {
    display: block;
    width: 100%;
    line-height: 1.8;
    font-size: 17px;
}

.main__text p { margin-top: 0; }

.mainText__tittle {
    position: relative;
    padding-left: 18px;
    font-family: 'Comfortaa', cursive;
    font-size: 19px;
    font-weight: 700;
    margin: 30px 0 12px;
    color: #4a4a5a;
}

.mainText__tittle::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 6px;
    border-radius: 3px;
    background: linear-gradient(180deg, #7b7fbd 0%, #c98ba8 100%);
}

/* Подсветки (пастельные «плашки») */

.YellowText {
    background: linear-gradient(135deg, #fff8e6 0%, #fdf3d0 100%);
    border: 1px solid rgba(212, 190, 126, 0.4);
    border-radius: 20px;
    padding: 20px 28px;
    margin: 28px 0;
    color: #6b5d2e;
}

.PurpleText {
    background: linear-gradient(135deg, #f6ecff 0%, #eeddff 100%);
    border: 1px solid rgba(185, 102, 169, 0.25);
    border-radius: 20px;
    padding: 20px 28px;
    margin: 28px 0;
    color: #5f4468;
}

.DiPurpleText {
    background: linear-gradient(135deg, #f4ecfd 0%, #ebdcfa 100%);
    border: 1px solid rgba(123, 127, 189, 0.25);
    border-radius: 20px;
    padding: 20px 28px;
    margin: 28px 0;
    color: #544a75;
}

.borderText {
    border: 2px dashed rgba(123, 127, 189, 0.4);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 18px 26px;
    margin: 28px 0;
}

/* Итоговое «Самое важное» */

.selectedText {
    text-align: center;
    padding: 24px 32px;
    line-height: 2;
    font-family: 'Comfortaa', cursive;
    font-size: 17px;
    margin: 30px 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(123, 127, 189, 0.15);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(123, 127, 189, 0.12);
    color: #4a4a5a;
}

/* Карточки тем (на страницах тем) */

.plan__item {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 24px rgba(123, 127, 189, 0.1);
    transition: all .2s linear;
}

.plan__item:hover {
    box-shadow: 0 8px 32px rgba(123, 127, 189, 0.18);
    transform: translateY(-2px);
}

/* ===== Схемы и картинки ===== */

.imgText,
.imgText2 {
    margin: 40px 0;
    width: 100%;
    height: auto;
}

.imgShema,
.imgShemaLesson5,
.imgShemaLesson2023,
.imgShemaLesson2024 {
    margin: 40px 0;
    width: 100%;
    height: auto;
}

/* ===== Файлы (доп. материалы) ===== */

.fileTittle {
    font-family: 'Comfortaa', cursive;
    margin-top: 40px;
    margin-bottom: 8px;
    color: #a5537f;
}

.file {
    margin: 6px 0;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    width: 100%;
    color: #4a4a5a;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 14px;
    transition: all 0.25s ease;
}

.file:hover {
    color: #c98ba8;
    background: rgba(201, 139, 168, 0.08);
}

/* ===== Таблицы ===== */

.tableOne {
    margin: 35px 0;
    width: 100%;
    font-size: 14px;
    border-radius: 20px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(123, 127, 189, 0.1);
    background: rgba(255, 255, 255, 0.8);
}

caption {
    font-family: 'Comfortaa', cursive;
    background: linear-gradient(135deg, #e8e7f7 0%, #f6e7f0 100%);
    font-size: 16px;
    font-weight: 700;
    padding: 16px;
    color: #4a4a5a;
}

th {
    font-family: 'Nunito', sans-serif;
    border-bottom: 1px solid rgba(123, 127, 189, 0.15);
    padding: 12px 18px;
    color: #4a4a5a;
    background: rgba(123, 127, 189, 0.06);
}

td {
    border: 1px solid rgba(123, 127, 189, 0.1);
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.6);
}

/* ===== Кнопка «Перейти к следующей теме» ===== */

.nextButtonContain {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 60px;
}

.nextButton {
    margin-top: 30px;
    padding: 16px 34px;
    border-radius: 20px;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, #7b7fbd 0%, #6b9bc4 100%);
    box-shadow: 0 4px 12px rgba(123, 127, 189, 0.3);
    transition: all 0.25s ease;
    text-decoration: none;
    color: #ffffff;
    text-align: center;
}

.nextButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(123, 127, 189, 0.4);
    background: linear-gradient(135deg, #6a6eb0 0%, #5b8dbb 100%);
    color: #ffffff;
}

/* ===== Underfooter ===== */

.underfooter {
    position: relative;
    z-index: 2;
    background: rgba(237, 242, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(123, 127, 189, 0.1);
    padding: 24px 0 20px;
    margin-top: 40px;
}

.underfooter__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
}

.underfooter__sign {
    text-align: center;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #9da5be;
}

.underfooter__sign p { margin: 0; }

/* ===== Карусель инфографики (gz-*) ===== */

.gz-carousel {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 24px auto;
    overflow: hidden;
    border-radius: 24px;
    background: #243447;
    box-shadow: 0 12px 32px rgba(123, 127, 189, 0.25);
}

.gz-track {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
}

.gz-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gz-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.gz-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(36, 52, 71, 0.55);
    color: #fff;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gz-nav:hover { background: #7b7fbd; transform: translateY(-50%) scale(1.1); }
.gz-nav:active { transform: translateY(-50%) scale(0.95); }
.gz-nav.prev { left: 12px; }
.gz-nav.next { right: 12px; }

.gz-counter {
    position: absolute;
    bottom: 12px;
    right: 16px;
    background: rgba(20, 24, 44, 0.55);
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 13px;
    color: #cfd3ee;
    z-index: 10;
}

.gz-caption {
    text-align: center;
    margin-top: 10px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    color: #9da5be;
    min-height: 20px;
}

.gz-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.gz-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cfd3ee;
    border: 2px solid #7b7fbd;
    cursor: pointer;
    transition: all 0.3s;
}

.gz-dot.active { background: #7b7fbd; transform: scale(1.3); }
.gz-dot:hover { background: #7b7fbd; }

.gz-thumbs {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.gz-thumbs::-webkit-scrollbar { height: 5px; }
.gz-thumbs::-webkit-scrollbar-track { background: rgba(123, 127, 189, 0.1); border-radius: 3px; }
.gz-thumbs::-webkit-scrollbar-thumb { background: #7b7fbd; border-radius: 3px; }

.gz-thumb {
    min-width: 70px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.3s, opacity 0.3s;
    opacity: 0.55;
    flex-shrink: 0;
}

.gz-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gz-thumb:hover { opacity: 0.8; }
.gz-thumb.active { border-color: #7b7fbd; opacity: 1; box-shadow: 0 4px 12px rgba(123, 127, 189, 0.35); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .intro__tittle { font-size: 22px; }
    .content__text { font-size: 17px; }

    .intro__content {
        padding: 20px;
        border-radius: 20px;
    }

    .main__text { font-size: 16px; }

    .YellowText,
    .PurpleText,
    .DiPurpleText,
    .borderText {
        padding: 16px 20px;
        border-radius: 16px;
    }

    .selectedText {
        padding: 18px;
        line-height: 1.9;
        font-size: 16px;
    }

    .nextButton {
        width: 100%;
        text-align: center;
    }

    .gz-nav { width: 40px; height: 40px; font-size: 20px; }
    .gz-thumb { min-width: 55px; height: 38px; }

    .tableOne {
        font-size: 13px;
    }

    td { padding: 10px 12px; }
}

@media (max-width: 480px) {
    .header__inner { flex-direction: column; gap: 10px; }
    .underfooter__inner { flex-direction: column; gap: 12px; }
    .intro__tittle { font-size: 18px; }
    .intro__text { font-size: 10px; }
    .main__text { font-size: 15px; }
    .themes { flex-direction: column; align-items: center; gap: 6px; }
}
