/* resetting the style to the home page */
main .md-grid, main .md-content__inner {
    margin-top: 0;
    margin: 0;
    padding: 0;
    max-width: 100%;
}

main .md-content__inner:before {
    display: none;
}

main  li,  [dir=ltr] .md-typeset ul li, [dir=ltr] .md-typeset ul {
    display: block;
    margin: 0;
    margin-left: 0;
}

/* END resetting the style to the home page */

/* --------- Styles for the "offer" section ---------*/

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

.offer .container, .vertical-square__wrap, .horizon-square__wrap  {
    position: relative;
}

.offer {
    background: #F3F4F8;
}

.offer-block {
    padding: 200px 0 120px 0;
}

.offer-block .offer-subtitle {
/*
  padding-left: 240px;
*/
 max-width: 600px;
 margin: 0 auto;
 text-align: center;
}

.offer  .offer-block__title {
    font-style: normal;
    font-weight: 400;
    font-size: 50px;
    line-height: 61px;
    text-align: center;
    margin-bottom: 0;
    color: #444444;
}

.offer-block__title span {
    font-weight: 700;
}

.offer-search__subtext {
    font-weight: 400;
    font-size: 15px;
    line-height: 18px;
    text-align: center;
    color: #7B7B7B;
}

.offer-search__subtext a {
    color: #7B7B7B;
    text-decoration: underline;
}

.search-form {
    display: flex;
    max-width: 620px;
    justify-content: space-between;
    margin: 30px auto 20px;
    width: 100%;
}

.search-form__input {
    display: block;
    background: #FFFFFF;
    border: 1.19691px solid #C4C4C4;
    font-weight: 400;
    font-size: 18px;
    color: #B9B9B9;
    padding: 12px 14px;
    max-width: 434px;
    width: 100%;
}

.search-form__btn {
    background: #444444;
    max-width: 167px;
    width: 100%;  
    font-weight: 700;
    cursor: pointer;
    font-size: 18px;
    text-align: center;
    color: #FFFFFF; 
    padding: 12px 0;
}

.search-form__btn:hover {
    background: #FFA800;
}

.rectangle {
    position: absolute;
    left: 0;
    top: 90px;
    background: #7DD0D9;
    width: 16px;
    height: 144px;
    animation: upAndButtom 7s infinite ;
}

.vertical-square__top, .vertical-square__bottom, .horizon-square__top, .horizon-square__bottom {
    width: 74px;
    height: 74px;
    background: #FFA800;
    border-radius: 10px;
    transform: rotate(45deg);
}

.vertical-square__bottom, .horizon-square__bottom {
    background: transparent;
    border: 3px solid #C70068;
    position: absolute;
    bottom: -24px;
}

.vertical-square__bottom {
    animation: shiftTop 7s infinite ;
}

.vertical-square {
    position: absolute;
    bottom: 200px;
    left: 70px;
}

.horizon-square__top {
    background: #68B2FF;
}

.horizon-square__bottom {
    position: relative;
    bottom: 0;
    z-index: 1;
    left: 19px;
    animation: shiftRight 7s infinite ;
}

.horizon-square__wrap {
    display: flex;
}

.horizon-square {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 5%;
}

.square {
    width: 69px;
    gap: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    position: absolute;
    bottom: 17%;
    right: 16%;
    animation: pulsing 7s infinite;
}

.square__dot {
    width: 8px;
    height: 8px;
    background: #68B2FF;
    border-radius: 50%;
}

.about-block {
    max-width: 1020px;
    width: 100%;
    margin: auto;
    padding: 93px 0 85px;
    border-bottom: 1px solid #C4C4C4;
}

h2.about-block__title, .about-block__text  {
    font-weight: 700;
    font-size: 20px;
    line-height: 24px;
    text-align: center;
    margin: 0;
    color: #444444;
}

/* Animation for elements in the 'Offer' section */

@keyframes upAndButtom {
    0% {
        top: 90px;
    }
    50% {
        top: 40px;
    }
    100% {
        top: 90px;
    }
}

@keyframes shiftRight {
    0% {
        left: 19px;
    }
    50% {
        left: 70px;
    }
    100% {
        left: 19px;
    }
}

@keyframes shiftTop {
    0% {
        bottom: -24px;
    }
    50% {
        bottom: 24px;
    }
    100% {
        bottom: -24px;
    }
}

@keyframes pulsing {
    0% {
        transform: scale(0.8, 0.8)
    }
    50% {
        transform: scale(1.0, 1.0);
    }
    100% {
        transform: scale(0.8, 0.8);
    }
}


/* --------- Styles for the "About" section ---------*/

.about-block__text {
    font-weight: 400;
    margin-top: 24px;
}

.about-block__text a {
    color: #186EED;
}

/* --------- Styles for the "Categories" section ---------*/

.categories {
    padding: 64px 0 130px;
}

h2.categories__title, h2.articles__title {
    font-weight: 700;
    font-size: 30px;
    text-align: center;
    color: #444444;
    margin: 0;
}

.categories-wrap {
    margin-top: 33px;
    display: flex;
    flex-wrap: wrap;
}

.categories-card {
    width: 33%;
    padding: 30px 13px;
    text-align: center;
}

.categories-card:hover {
    background: #f3f4f5;
}

.categories-card__icon {
  padding-bottom: 0.3em;
}

.categories .categories-card__title, .categories-list__item a {
    font-weight: 700;
    font-size: 20px;
    color: #444444; 
    line-height: 18px;
}

.categories-card__title:hover, .categories-list__item a:hover {
    color: #186EED;
    text-decoration: underline;
}

.categories-list__item a, .categories-card__link {
    font-weight: 400;
    font-size: 15px;
}

.categories ul.categories-list {
    margin: 20px 0 17px;
}

.categories-list__item  {
    margin-bottom: 8px;
}

.categories .categories-card__link {
    color: #A3A3A3;
}

.categories-card:nth-child(3n+2) {
    border-left: 1px solid #C4C4C4;
    border-right: 1px solid #C4C4C4;
}

.categories-card:nth-child(-n+6) {
    border-bottom: 1px solid #C4C4C4;
}

/* --------- Styles for the "Articles" section ---------*/

.articles {
    background: #F3F4F8;
}

.articles__wrap {
    padding: 60px 0 70px 130px;
    border-bottom: 1px solid #C4C4C4;
}

h2.articles__title {
    text-align: start;
}

.articles__title img {
    margin-right: 10px;
}

.articles ul.articles-list, .contact ul.contact-list, .contact-wrap {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.articles ul.articles-list {
    margin-top: 20px;
}

.articles li.articles-list__item, .contact li.contact-list__item {
    margin-bottom: 10px;
    width: 50%;
    line-height: 30px;
}

.articles-list__item a, .contact-list__item a {
    font-weight: 400;
    font-size: 15px;
    line-height: 18px;
    color: #444444;
}

/* --------- Styles for the "Contact" section ---------*/

.contact { 
    padding: 85px 0;
    background: #F3F4F8;
}

.contact-wrap {
    margin-left: 130px;
    max-width: 825px;
    width: 100%;
}

.contact-logo {
    max-width: 182px;
    width: 100%;
    display: block;
}

.contact ul.contact-list {
    margin-top: 0;
    max-width: 510px;
    width: 100%;
}

.contact-list__item a {
    display: flex;
    align-items: center;
}

.contact-list__item a img {
    display: inline;
    margin: unset;
}

.contact-list__item a .content-text {
   margin-left: 1em;
}


main .contact li.contact-list__item {
    margin-bottom: 20px;
}


/* style for responsive site */

/*992-1200px*/
@media screen and (max-width: 1200px) {
    .offer-block {
        padding: 200px 0;
    }
    .rectangle {
        left: 20px;
    }
    .vertical-square {
        bottom: 123px;
    }
    .horizon-square {
        top: 63%;
        transform: translateY(-63%);
    }
    .square {
        bottom: 10%;
        right: 22%;
    }
    /* articles */
    .articles__wrap {
        padding: 60px 0 70px 47px;
    }
    /* contact */
    .contact-wrap {
        margin-left: 47px;
    }
}

/*768-992px*/
@media screen and (max-width: 992px) {
    .container {
        width: 700px;
    }
    .offer .offer-block__title {
        font-size: 40px;
    }
    .rectangle {
        left: 0;
        top: 59px;
        width: 12px;
        height: 89px;
    }
    .vertical-square__top, .vertical-square__bottom, .horizon-square__top, .horizon-square__bottom {
        width: 60px;
        height: 60px;
    }
    .vertical-square {
        bottom: 88px;
    }
    .horizon-square {
        top: 20%;
        transform: translateY(-20%);
    }
    .square {
        right: 13%;
    }
    /* categorie */
    .categories {
        padding: 48px 0 68px;
    }
    .categories-card {
        width: 50%;
        border: 1px solid #C4C4C4;
    }
    /* articles */
    .articles__wrap {
        padding: 60px 0 70px 0;
    }
    h2.articles__title, .articles ul.articles-list {
        text-align: center;
    }
    main .articles li.articles-list__item {
        width: 100%;
        margin-bottom: 20px;
    }
    .articles li.articles-list__item, .contact li.contact-list__item {
        line-height: 24px;
    }
    /* contact */
    .contact-wrap {
        margin-left: 0;
    }
    .contact ul.contact-list {
        max-width: 430px;
    }
}

/*576-768px*/
@media screen and (max-width: 768px) {
    .container {
        width: 520px;
    }
    .offer .offer-block__title {
        font-size: 31px;
    }
    /* categorie */
    .categories-card {
        width: 100%;
    }
    .categories-card:not(:last-child) {
        border-bottom: none;
    }
    /* contact */
    .contact-wrap {
        justify-content: center;
    }
    .contact-logo {
        margin-bottom: 20px;
    }
    .contact {
        padding: 50px 0;
    }
}

/*320-576px*/
@media screen and (max-width: 576px) {
    .container {
        max-width: 400px;
        width: 90%;
        padding: 0;
    }
    .offer .offer-block__title {
        font-size: 26px;
        line-height: 36px;
    }
    .offer-block__title span {
        display: block;
    }
    .offer-block {
        padding: 120px 0;
    }
    .rectangle {
        top: 50px;
        width: 5px;
        height: 68px;
    }
    .vertical-square__top, .vertical-square__bottom, .horizon-square__top, .horizon-square__bottom {
        width: 35px;
        height: 35px;
        border-radius: 6px;
    }
    .horizon-square {
        top: 11%;
        right: 12%;
        transform: translateY(-11%);
    }
    .square__dot {
        width: 5px;
        height: 5px;
    }
    .square {
        gap: 5px;
    }
    .vertical-square {
        bottom: 58px;
        left: 40px;
    }
    .search-form {
        margin: 17px auto 20px;
        flex-direction: column;
    }
    .search-form__btn {
        max-width: 100%;
        margin-top: 15px;
        font-size: 14px;
        padding: 9px 0;
    }
    .search-form__input {
        font-size: 14px;
        padding: 9px 14px;
    }
    /* about */
    .about-block {
        padding: 48px 0 48px;
    }
    h2.about-block__title, .about-block__text {
        font-size: 16px;
        line-height: 21px;
    }
    /* categorie */
    main .categories-list li.categories-list__item {
        margin-bottom: 12px;
        line-height: 19px;
    }
    .categories ul.categories-list {
        margin: 9px 0 17px;
    }
    h2.categories__title, h2.articles__title {
        font-size: 22px;
    }
    .categories-wrap {
        margin-top: 20px;
    }
    .categories .categories-card__title, .categories-list__item a {
      font-size: 17px;
    }
    .categories-list__item a, .categories-card__link {
        font-weight: 400;
        font-size: 13px;
    }
    .categories-card {
        padding: 27px 8px;
    }
    .categories {
        padding: 40px 0 80px;
    }
    /* contact */
    .contact ul.contact-list {
        flex-direction: column;
        width: max-content;
    }
    .contact-wrap {
        flex-direction: column;
        align-items: center;
    }
    .contact li.contact-list__item {
        width: 100%;
    }
}

@media screen and (max-width: 330px) {
    .container {
        max-width: 290px;
    }
}

/* Block styles when dark mode is on */

.dark p, .dark h2, .dark .offer .offer-block__title, .dark h3, .dark div, .dark a, .dark .categories .categories-card__title {
    color: #fff;;
}
.dark .vertical-square__top, .dark .search-form__input {
    background: #464853;
    border: none;
}
.dark .square__dot {
    background: #186EED;
}
.dark .about-block__text a {
    color: #186EED;
}
.dark .contact, .dark  .articles, .dark .offer, .dark .categories-card:hover  {
    background: #1D1E27;
}
.dark .contact-logo img {
    filter: invert(1);
}
.dark .search-form__btn {
    background: #FFA800;
}
