* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

main {
    color: white;
    background: #282828;
}

.overflow-hidden {
    overflow-y: hidden;
}

.theme-switcher {
    margin-top: 50px;
}

.theme-switcher label {
    width: 80px;
    display: block;
    height: 32px;
    background: url("img/dark-theme-icon.f8a7f986ab89.svg") no-repeat;
    background-size: contain;
}

main a {
    color: white;
}

    main.light {
        background: #FDFBEE;
        color: black;
    }

        main.light svg, main.light path {
            fill: #1D1B1B !important;
        }

        main.light .theme-switcher label {
            background: url("img/light-theme-icon.9814dcfc753a.svg") no-repeat;
        }

        main.light .article-container {
            box-shadow: 0 0 25.3px 0 rgba(0, 0, 0, 0.1);
        }

    main.light a {
        color: black;
    }

    main.light .article {
        background: #FDFBEE;
    }


        main.light .comments {
            border-top: 1px solid #1D1B1B;
        }

    main.light .comment-input-name, main.light .comment-input-text {
        color: black;
    }

body { 
    background: #282828;
}

body.light {
    background: #FDFBEE;
}

    /* Хедер */

    header {
    background-color: #282828;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1vh 0;
}

.logo {
    width: 10%;
    line-height: 100%;
}

.menu {
    display: flex;
    gap: 15px;
    list-style: none;
}

.menu-link {
    text-decoration: none;
    color: white;
    font-weight: 500;
    font-size: 16px;
}

.burger-menu {
    display: flex;
    align-items: center;
}

.burger-icon {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 2;
}

.bar {
    width: 40px;
    height: 2px;
    background-color: white;
    margin: 5px 0;
    border-radius: 3px;
}


@media screen and (max-width: 1000px) {

    header {
        padding: 2px 5%;
    }

    .logo {
        width: 23%;
    }

    .burger-icon {
        display: flex;
        order: 1;
    }

    .menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 2;
        gap: 30px;
        height: 100%;
        padding-left: 5%;
        padding-top: 120px;
        background-color: black;
    }

        .menu.active {
            display: flex;
        }
}

.parent-category {
    position: relative;
}

.sub-menu {
    background: black;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    position: absolute;
    top: 37px;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
}

    .sub-menu.iteration {
        top: 40%;
        left: 160px;
    }

@media screen and (max-width: 1000px) {

    .sub-menu {
        transform: none;
        position: static;
        padding-left: 0;
        gap: 30px;
        padding-top: 30px;
        padding-bottom: 0;
    }

    .burger-menu form {
        margin-right: 9px;
    }

}

 /* Стили для выпадающего меню */

    .dropdown {
        position: relative;
        display: inline-block;
    }

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #282828;
    min-width: 160px;
    z-index: 2;
    color: white;
}

.dropdown .show {
    display: block;
}

        .dropdown-content button {
            background-color: #282828;
            color: white;
            width: 100%;
            border: none;
            padding: 12px 16px;
            display: block;
            cursor: pointer;
            text-align: left;
        }


.dropbtn {
    background-color: #282828;
    color: white;
    padding: 16px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    font-family: 'SF Pro Display', sans-serif;
}

/* Бегущая строчка */

.ticker {
    overflow: hidden;
    background: url("img/gradient.2892312fe8e7.png") no-repeat;
    background-size: cover;
    padding: 0.8vh 0;
    position: fixed;
    height: fit-content;
    width: 100%;
    z-index: 1;
}

@media screen and (min-width: 1000px) {
    .ticker {
        position: fixed;
        height: fit-content;
        width: 100%;
    }
}

.ticker * {
    cursor: pointer;
}

.ticker__wrapper {
    display: flex;
    gap: 16px;
}

.ticker__item {
    font-family: 'SF Pro Display', sans-serif;
    font-size: 22px;
    font-weight: 500;
    color: white;
    animation: ticker 10s linear infinite;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    gap: 16px;
}

@keyframes ticker {
    0% {
        transform: translateZ(0);
    }

    to {
        transform: translate3d(-100%, 0, 0);
    }
}


 /* Футер */

 footer {
    background-color: #282828;
}

footer .container {
    padding: 7vh 0;
    color: white;
    gap: 48px;
    display: flex;
    flex-direction: column;
}

.footer-row1 {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.footer-row1 > div {
    display: flex;
    gap: 30px;
}

.footer-row2 {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

footer a {
    color: white;
    text-decoration: none;
}

@media screen and (max-width: 1000px) {

    footer .container {
        padding: 3vh 5%;
        gap: 30px;
    }

    .footer-row1 {
        flex-direction: column;
        align-items: start;
        gap: 30px;
    }

    .footer-row1 > div {
        display: flex;
    }

    .footer-row2 {
        display: flex;
        flex-wrap: wrap;
    }
}

/* Шрифты */

    * {
        font-family: 'SF Pro Display', sans-serif;
        line-height: 140%;
    }

    @media screen {

        h1 {
            font-size: 32px;
        }

        .article p, .article a {
            font-size: 18px;
        }

        .article h2 {
            font-size: 28px;
        }

        .article-author h3, .article-author h3 a {
            font-size: 22px;
        }

        h3, h3 a {
            font-size: 24px;
        }

        p, li, a, .form, summary, details {
            font-size: 16px;
        }

        .card-text p {
            font-size: 14px;
        }
    }



    /* Паддинги */

    @media screen and (min-width: 1000px) {

        main {
            padding: 30px 0 50px 0;
        }

        .container {
            width: 61.5%;
            max-width: 1180px;
            margin: auto;
        }

        .menu {
            align-items: center;
        }
    }

    @media screen and (max-width: 1000px) {

        main {
            padding: 40px 5%;
        }
    }

    h1 {
        margin-bottom: 30px;
    }

   
    /* Карточки статей */

    .articles-container {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 20px;
    }

    .article-card {
        box-shadow: 0px 2px 11.6px rgba(0, 0, 0, 0.1);
        background-color: #1D1B1B;
    }

    .card-text p {
        opacity: 50%;
    }

    @media screen and (min-width: 1000px) {
        .article-card:nth-child(1) {
            width: calc(((100% - 40px) / 3 * 2) + 20px);
        }

        .article-card {
            width: calc((100% - 40px) / 3);
        }

        .recommended.article-card {
            width: calc((100% - 20px) / 2) !important;
        }

        .card-image {
            padding: 14px 16px;
        }

        .card-text {
            margin-bottom: auto;
        }

        .card-footer, .card-text {
            padding: 15px 17px;
        }

            .card-text h3 {
                margin-bottom: 8px;
            }
    }

    @media screen and (max-width: 1000px) {

        .article-card {
            width: 100%;
            border-radius: 10px;
        }

        .card-image {
            padding: 17px 8px;
        }

        .card-footer, .card-text {
            padding: 15px 17px;
        }

            .card-text h3 {
                margin-bottom: 8px;
            }
    }

    .card-image {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        height: 231px;
        align-content: start;
    }

        .card-image p, .article-image p {
            padding: 7px 8px;
            background: #FDFBEE;
            height: fit-content;
            color: black;
            border-radius: 10px;
        }

    .article-card {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .card-content {
        flex-grow: 1;
    }

    .card-footer {
        margin-top: auto;
    }

    /* Кнопка */

    .btn {
        background-color: black;
        color: white;
        padding: 10px 15px;
        text-decoration: none;
        cursor: pointer;
        display: block;
        width: fit-content;
        font-weight: 600;
        font-size: 16px;
    }

    /* Детальный вид статьи */


    .article-image {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        height: 360px;
        border-radius: 10px;
    }

.article {
    padding: 50px 0;
    background: #1D1B1B;
}

.article-container {
    border-radius: 10px 10px 0 0;
    width: 100%;
}

.article-features {
    display: flex;
    gap: 30px;
    align-items: center;
}

.comments {
    padding-top: 30px;
    border-top: 1px solid #828282;
}

.article-text {
    padding-bottom: 40px;
}

.comment {
    padding-top: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #4F4F4F;
}

.comment-form {
    display: flex;
    flex-direction: column;
}

.comment-btn {
    color: white;
    background: #EB5757;
    border: none;
    padding: 8px 16px;
    font-weight: bold;
    line-height: 140%;
    font-size: 18px;
    width: fit-content;
    margin-top: 15px;
    cursor: pointer;
}

.comment-input-name {
    width: 220px;
    line-height: 140%;
    font-size: 18px;
    padding: 8px;
    background: none;
    border: 1px solid #828282;
    border-radius: 4px;
    margin-bottom: 10px;
    color: white;
}

    .comment-input-name::placeholder {
        color: #828282;
    }

.comment-input-text {
    color: white;
    line-height: 140%;
    font-size: 18px;
    padding: 8px;
    background: none;
    border: 1px solid #828282;
    border-radius: 4px;
    margin-bottom: 15px;
}

.comment-input-text::placeholder {
    color: #828282;
}

.comment-description {
    font-weight: 500; 
    width: 50%; 
    font-size: 26px; 
    line-height: 140%; 
    margin-top: 30px; 
    margin-bottom: 20px;
}


@media screen and (min-width: 1000px) {
    .article-wrapper {
            display: flex;
            padding-top: 30px;
            padding-bottom: 50px;
            gap: 20px;
        }

        .article-container {
            flex-grow: 1;
        }


        .article-image {
            padding: 16px 15px;
        }

    .article-text, .comments, .recommended-articles {
        padding-left: 11%;
        padding-right: 11%;
    }

    .article-features {
        flex-direction: column;
    }

    }

    @media screen and (max-width: 1000px) {

        .article {
            padding: 40px 5%;
            padding-top: 25px;
        }

        .article-image {
            margin: 0 8px;
            padding: 16px 15px;
        }

        .article-features {
            margin-bottom: 50px;
            justify-content: space-between;
        }

        .comment-description {
            width: 100%; 
        }

        .article-features {
            margin-bottom: 30px;
            margin-top: 30px;
            gap: 15px;
            border: 1px solid #828282;
            width: fit-content;
            margin-left: 5%;
            margin-right: 5%;
            padding: 20px 12px;
            width: 90%;
        }

        .theme-switcher {
            margin-top: 0;
        }
        

    }

    .comments form.form {
        gap: 10px;
    }

        .comments form.form .btn {
            margin-top: 10px;
        }



    /* Формы */

    input.form, textarea.form {
        padding: 10px 15px;
        border-color: rgba(0, 0, 0, 0.1);
    }

    form.form {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    fieldset.form {
        border: 0;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    .form .btn {
        margin-top: 10px;
    }

    /* Кабинет редактора */

details {
    margin-top: 8px;
    margin-bottom: 8px;
}

.toggle {
    padding-inline-start: 0em;
    list-style-type: none;
}

    /* Indent toggle children */
    .toggle > li > details {
        padding-left: 1.7em;
    }

        .toggle > li > details > summary {
            margin-left: -1.1em;
        }

form.categories-form {
    flex-direction: row;
    gap: 0;
}

    form.categories-form input {
        height: fit-content;
        width: fit-content;
        padding: 4px;
    }

    form.categories-form .btn {
        margin-top: 0;
        padding: 4px;
    }

@media screen and (max-width: 1000px) {
    form.categories-form {
        flex-direction: column;
        gap: 5px;
        margin-bottom: 25px;
    }
}



.article-main {
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

main li {
    margin-left: 5%;
    margin-top: 5px;
    margin-bottom: 5px;
}

main p {
    margin-top: 5px;
    margin-bottom: 5px;
}

.article-card, .card-image {
    border-radius: 10px;
}


.article img {
    width: 100%;
    max-width: 100%;
}

h2 {
    margin-bottom: 15px;
}

.unpublished {
    position: relative;
}

    .unpublished::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
    }

header {
    position: fixed;
    width: 100%;
    z-index: 2;
}

@media screen and (min-width: 1000px) {
   .article-features {
        position: fixed;
    }
    .article-container {
        margin-left: 100px;
    }
}

/*
    Author blocks
*/

.article-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 35px;
}

.author-img-overlay {
    overflow: hidden;
    width: 50px;
    height: 50px;
    border-radius: 50px;
}

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

.article-author {
    align-self: center;
}

main {
    margin-top: 113px;
}

@media screen and (min-width: 1000px) {
   main {
        margin-top: 54px;
    }
}