body {
    font-family: Arial, Helvetica, sans-serif;
    padding: 0;
    margin: 0;
}

/*---header---*/

header {
    background: #03377f;
    color: #fff;
}

.header-title {
    font-size: 24px;
    padding: 15px 10px;
}

.menu1 {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    z-index: 10;
    background-color: #5590ff;
}

.menu1 ul {
    position: relative;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    height: auto;
    list-style: none !important;
}

.menu1 ul::after {
    display: block;
    width: 100%;
    height: auto;
    clear: both;
    content: "";
}

.menu1 ul li {
    margin-bottom: 0 !important;
    position: relative;
    display: block;
    float: left;
    width: auto;
    height: auto;
}

.level1 {
    background: #5590ff;
    border-right: solid 1px #000000a0;
}

.level1:hover {
    background: #3377ff;
    border-right: solid 1px #000000a0;
}

.level1> .menu-link {
    color: #fff !important;
}

.level2 {
    background: #3377ff;
}

.level2:hover {
    background: #0055ff;
}

.menu1 ul li .menu-link {
    display: block;
    padding: 9px 25px 0px;
    font-size: 14px;
    line-height: 1.3em;
    text-decoration: none !important;
    font-weight: bold;
    height: 36px;
    box-sizing: border-box;
}

.menu1 ul li ul {
    position: absolute;
    top: 36px;
    left: 0;
    display: none;
    width: 200px;
}

.menu1 ul li:hover ul {
    display: block;
}

.menu1 ul li ul li {
    float: none;
    width: 100%;
}

.menu1 ul li ul li .menu-link {
    display: block;
    text-transform: none;
    height: auto;
    padding: 7px 25px;
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid #ffffff;
    color: #ffffff;
}

.menu1 ul li ul li:first-child .menu-link {
    border-top: 0;
}

.has-sabmenu {
    padding-right: 15px;
}

.has-sabmenu::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 8px;
    width: 15px;
    background-image: url(../img/btn-arrow.svg);
    background-position: right;
    background-repeat: no-repeat;
    cursor: pointer;
    z-index: 1;
}

.has-sabmenu ul {
    box-shadow: 2px 2px 5px 0 rgba(0, 0, 0, 0.5);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    overflow: hidden;
}

/*---container---*/

.main-container {
    display: flex;
    width: 100%;
}

/*---home---*/

section {
    padding: 15px;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.section-wraper {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
}

.section-wraper a {
    text-decoration: none;
    color: #000;
}

.section-wraper .lesson-item-title {
    margin-top: 10px;
}

.section-wraper .lesson-item-img {
    width: 100%;
    height: auto;
}

.section-wraper .lesson-item-img img {
    width: 100%;
    height: auto;
}

.example-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.example-item-title {
    font-weight: bold;
    position: absolute;
    text-align: center;
    font-size: 36px;
}

.example-item-img {
    width: 100%;
    height: auto;
}

.example-item-img img {
    width: 100%;
    height: auto;
}

.section-wraper-lessons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 30px;
}

/*---main---*/
main {
    flex-grow: 1;
}

.container-title h1 {
    margin: 25px 0;
    text-align: center;
}

code {
    font-size: 16px;
    background-color: #eee;
    padding: 3px;
    border-radius: 5px;
}

.code-html,.code-css, pre {
    position: relative;
    font-size: 16px;
    background-color: #fff;
    border: solid 2px #666;
    padding: 1px;
    overflow-x: auto;
    margin-bottom:15px;
}

.code-html::after {
    content: "HTML";
    background-color: #f16529;
    color: #fff;
    width: 100px;
    position: absolute;
    top: 0;
    right: 0;
    text-align: center;
    border-bottom-left-radius: 5px;
}

.code-css::after {
    content: "CSS";
    background-color: #454ef9;
    color: #fff;
    width: 100px;
    position: absolute;
    top: 0;
    right: 0;
    text-align: center;
    border-bottom-left-radius: 5px;
}

.lesson-text li {
    margin-bottom: 10px;
}

li:last-child {
    margin-bottom: 0;
}

.result-code {
    border: solid 2px #000000a0;
    padding: 20px 10px 10px 10px;
    position: relative;
    min-height: 200px;

}

.result-code::after {
    content: "Результат кода";
    background-color: #0f0;
    width: 200px;
    position: absolute;
    top: 0;
    right: 0;
    text-align: center;
    border-bottom-left-radius: 5px;
}

video {
    max-width: 100%;
}

/*---leassons---*/

.section-wraper-lessons .lesson-item {
    display: flex;
    flex-direction: row;
    flex-basis: 45%;
    flex-grow: 0;
    flex-shrink: 0;
    gap: 30px;
}

.section-wraper-lessons .lesson-item-img {
    flex-basis: 200px;
    flex-grow: 0;
    flex-shrink: 0;
}

.section-wraper-lessons .lesson-item-img img {
    width: 100%;
}

.section-wraper-lessons .lesson-item-text a {
    color: #000;
}

.section-wraper-lessons .lesson-item-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.section-wraper-lessons .lesson-item-desc {
    text-align: justify;
}

/*---lesson---*/

.lesson-text {
    margin: 10px auto;
    width: 90%;
    max-width: 1000px;
}

.lesson-text a {
    text-decoration: none;
    color: #1100ff;
    font-weight: 600;
}

.lesson-text a:hover {
    color: #0c00b4;
    text-decoration: underline;
}

.lesson-text h2.text-center {
    font-size: 30px;
}

.text-center {
    text-align: center;
}

/*---sidebar---*/

.sidebar {
    position: sticky;
    width: 240px;
    flex-grow: 0;
    flex-shrink: 0;
    height: fit-content;
    top: 40px;
    margin: 40px 0 0 40px;
    color: #fff;
}

.sidebar-menu {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    border: solid 1px #000000a0;
    background-color: #5590ff;
}

.sidebar-menu li {
    border-bottom: solid 1px #000000a0;
    text-align: center;
}

.sidebar-menu li:hover {
    background-color: #1100ff;
}

.sidebar-menu li.active {
    background-color: #1100ff;
    pointer-events: none;
    cursor: default;
}

.sidebar-menu li:last-child {
    border: 0;
}

.sidebar-menu li .menu-link {
    display: block;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    padding: 15px;
}

/*---result-code---*/
.result-code.p1 {
    ul {
        padding: 15px;
        margin: 3px;
        background: #f5f5f5;
        list-style: disc;
    }

    ul li {
        padding: 5px;
        margin: 5px 15px;
        background: #ffffff;
    }
}

.result-code.p2 {
    ol {
        padding: 15px;
        margin: 3px;
        background: #f5f5f5;
        list-style: decimal;
        /* обычные цифры */
    }

    ol li {
        padding: 5px;
        margin: 5px 15px;
        background: #ffffff;
    }
}

.result-code.p3 {

    ul,
    li {
        margin: 0;
        padding: 0;
    }

    ul {
        display: flex;
        list-style: none;
        width: 100%;
    }

    a {
        background: #4caf50;
        color: #ffffff;
        display: block;
        font: bold 13px sans-serif;
        padding: 10px 25px;
        text-align: center;
        text-decoration: none;
    }

    li:hover a {
        background: #45a049;
    }
}

.result-code.p4 {
    img {
        margin: 15px;
        background-color: #f9f9f9;
        box-shadow: 5px 5px 10px 0px #cccccc;
        border-radius: 10px;
        border: 1px solid #dddddd;
    }
}

.result-code.p4-1 {
    p {
        padding: 15px;
        margin: 15px;
    }

    .custom-class {
        background-color: #42b0ff;
        border: 4px double black;
    }

    #custom-id {
        background-color: #42b0ff;
        border: 4px outset #afdeff;
    }
}

.result-code.p4-2 {
    #container {
        width: auto;
    }

    #header {
        background: #85d6e5;
        height: 150px;
    }

    #navigation {
        background: #afdeff;
        height: 40px;
    }

    #content {
        background: #85d6e5;
        float: left;
        width: 75%;
        height: 250px;
    }

    #sidebar {
        background: #9fd5fc;
        float: right;
        width: 25%;
        height: 250px;
    }

    #clear {
        clear: both;
    }

    #footer {
        background: #75c9d8;
        height: 150px;
    }
}

.result-code.p5-1 {
    height: 200px;

    #menu1 {
        position: relative;
        width: 100%;
        z-index: 10;
    }

    #menu1 ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    #menu1 ul li {
        display: inline-block;
        position: relative;
    }

    #menu1 ul li a {
        display: block;
        padding: 10px 20px;
        text-decoration: none;
        color: #fff;
        background: #38b6ff;
    }

    #menu1 ul li ul {
        position: absolute;
        display: none;
        background: #38b6ff;
    }

    #menu1 ul li:hover ul {
        display: block;
    }

    #menu1 ul li ul li {
        display: block;
        width: 200px;
    }

    #menu1 ul li ul li a {
        padding: 8px 15px;
        border-top: 1px solid #fff;
    }
}

.result-code.ex2 {

    /* Базовые стили */
    body {
        margin: 0;
        font-family: Arial, sans-serif;
    }

    /* Стили хедера */
    header {
        background: #333;
        color: white;
        padding: 15px 0;
    }

    .header-content {
        width: 90%;
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        font-size: 24px;
        font-weight: bold;
    }

    nav ul {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    nav ul li {
        margin-left: 20px;
    }

    nav ul li a {
        color: white;
        text-decoration: none;
    }

    nav ul li a:hover {
        text-decoration: underline;
    }

}

.result-code.ex3 {
    .standard-footer {
        background-color: #2c3e50;
        color: #ecf0f1;
        padding: 40px 0 20px;
        font-size: 14px;
    }

    .standard-footer .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 15px;
        flex-direction: column;
    }

    .footer-columns {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        margin-bottom: 30px;
    }

    .footer-column {
        flex: 1;
        min-width: 200px;
        margin-bottom: 20px;
        padding: 0 15px;
    }

    .footer-column h3 {
        color: #fff;
        margin-bottom: 20px;
        font-size: 18px;
    }

    .footer-column ul {
        list-style: none;
        padding: 0;
    }

    .footer-column ul li {
        margin-bottom: 10px;
    }

    .footer-column ul li a {
        color: #bdc3c7;
        text-decoration: none;
        transition: color 0.3s;
    }

    .footer-column ul li a:hover {
        color: #3498db;
    }

    .footer-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .social-links a {
        color: #bdc3c7;
        margin-left: 15px;
        font-size: 18px;
        transition: color 0.3s;
    }

    .social-links a:hover {
        color: #3498db;
    }

}

.result-code.ex4 {

    /* Общие стили */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: 'Arial', sans-serif;
    }

    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        background-color: #f5f5f5;
        color: #333;
    }

    a {
        text-decoration: none;
        color: inherit;
    }

    .container {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 15px;
    }

    /* Шапка */
    header {
        background-color: #2c3e50;
        color: white;
        padding: 15px 0;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

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

    .logo {
        font-size: 24px;
        font-weight: bold;
    }

    nav ul {
        display: flex;
        list-style: none;
    }

    nav ul li {
        margin-left: 20px;
    }

    nav ul li a {
        padding: 5px 10px;
        border-radius: 3px;
        transition: background-color 0.3s;
    }

    nav ul li a:hover {
        background-color: #34495e;
    }

    /* Основное содержимое */
    main {
        flex: 1;
        padding: 30px 0;
    }

    .hero {
        background-color: #3498db;
        color: white;
        padding: 60px 0;
        text-align: center;
        margin-bottom: 30px;
    }
    .hero .container {
        flex-direction: column;
    }
    .hero h1 {
        font-size: 36px;
        margin-bottom: 20px;
    }

    .hero p {
        font-size: 18px;
        max-width: 700px;
        margin: 0 auto 25px;
    }

    .btn {
        display: inline-block;
        background-color: #e74c3c;
        color: white;
        padding: 10px 20px;
        border-radius: 5px;
        transition: background-color 0.3s;
    }

    .btn:hover {
        background-color: #c0392b;
    }

    .features {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        margin: 40px 0;
    }

    .feature {
        flex: 0 0 calc(33.333% - 20px);
        background: white;
        padding: 25px;
        border-radius: 5px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        margin-bottom: 30px;
        text-align: center;
    }

    .feature i {
        font-size: 40px;
        color: #3498db;
        margin-bottom: 15px;
    }

    .feature h3 {
        margin-bottom: 15px;
    }

    /* Подвал */
    footer {
        background-color: #2c3e50;
        color: #ecf0f1;
        padding: 40px 0 20px;
    }
    footer .container {
        flex-direction: column;
    }
    .footer-columns {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        margin-bottom: 30px;
    }

    .footer-column {
        flex: 1;
        min-width: 200px;
        margin-bottom: 20px;
        padding: 0 15px;
    }

    .footer-column h3 {
        color: white;
        margin-bottom: 20px;
        font-size: 18px;
    }

    .footer-column ul {
        list-style: none;
    }

    .footer-column ul li {
        margin-bottom: 10px;
    }

    .footer-column ul li a {
        color: #bdc3c7;
        transition: color 0.3s;
    }

    .footer-column ul li a:hover {
        color: #3498db;
    }

    .footer-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .social-links a {
        color: #bdc3c7;
        margin-left: 15px;
        font-size: 18px;
        transition: color 0.3s;
    }

    .social-links a:hover {
        color: #3498db;
    }
}

/* ---about--- */
.container-profile {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.my-photo {
    width: 400px;
    border-radius: 50%
}

.my-info {
    padding: 10px;
    margin: 10px;
}

/*---footer---*/
footer {
    background-color: #03377f;
    margin-top: 50px;
    padding: 20px;
    color: #fff;
}

.footer-colums {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.colum {
    width: 35%;
}

.colum a {
    text-decoration: none;
    color: inherit;
}

.colum a:hover {
    color: #5590ff;
}

.menu-footer {
    width: fit-content;
}

.footer-title {
    font-weight: 700;
    margin: 0;
}

.menu-footer ul {
    list-style: none;
    padding: 0;
}

.menu-footer ul li {
    margin-bottom: 5px;
}