@font-face {
    font-family: 'Montserrat Alternates';
    src: url('../assets/fonts/MontserratAlternates-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Raleway';
    src: url('../assets/fonts/Raleway-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Raleway';
    src: url('../assets/fonts/Raleway-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('../assets/fonts/Roboto-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('../assets/fonts/Roboto-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

html {
    font-size: 10px;
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Raleway', sans-serif;
    font-size: 1.4rem;
    overflow-x: hidden;
    min-height: 100vh;
}

li {
    list-style: none;
}

a {
    text-decoration: none;
    color: #000000;
}

a:hover {
    color: #000000;
}

.header-container {
    position: relative;
}

.navigation {
    margin-left: 21px;
    position: relative;
    font-weight: 500;
    background-color: transparent !important;
}

.navigation__link_active {
    background-color: #FFD50D;
    padding: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
    transition: box-shadow .1s;
}

.navbar-toggler {
    border: none;
    float: right;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-svg {
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
}

.header__contacts {
    /*width: 227px;*/
    position: absolute;
    right: 0;
    background: linear-gradient(90deg, #E10505 0%, #6B0001 100%);
    padding: 20px 15px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.phone__link {
    font-family: 'Roboto', sans-serif;
    font-size: 1.7rem;
    font-weight: 500;
    color: #FFFFFF;
}

.phone__link:hover {
    color: #FFFFFF;
}

.social__link {
    margin-left: 20px;
    width: 25px;
}

.contacts__social {
    margin-right: -15px;
}

/*.contacts__social-container {*/
/*    margin-right: 15px;*/
/*}*/

.autoschool,
.why-we,
.studying,
.categories,
.facts,
.branches,
.classes,
.instructors,
.photos,
.rewards,
.reviews,
.faq,
.enroll {
    padding: 40px 0 50px;
}

.autoschool {
    height: 100vh;
    min-height: 756px;
    background-repeat: no-repeat;
    background-position: 90% 90%, right;
    background-size: 691px 303px, contain, cover;
    margin-top: -93px;
}

.autoschool__title {
    margin-bottom: 7px;
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 6.4rem;
}

.autoschool__description {
    margin-bottom: 54px;
    font-size: 2.4rem;
    color: #3A3737;
}

.link {
    background: linear-gradient(90deg, #E10505 0%, #6B0001 100%);
    padding: 10px 72px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
    font-size: 2.6rem;
    font-weight: 500;
    color: #FFFFFF;
    transition: box-shadow .1s;
}

.link:hover {
    color: #FFFFFF;
    box-shadow: 0 0 30px rgba(213, 4, 5, 0.93);
    cursor: pointer;
}

.why-we img {
    height: 96px;
}

.why-we {
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.title-h3 {
    margin-bottom: 40px;
    font-size: 4.0rem;
    font-weight: 400;
}

.title-h3_white {
    color: #FFFFFF;
}

.why-we__ul {
    margin-bottom: -50px;
}

.why-we__card-container {
    margin-bottom: 50px;
}

.why-we__card {
    width: 354px;
    min-height: 116px;
    padding: 23px;
    position: relative;
    background-color: #FFFFFF;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
}

.why-we__text {
    width: 242px;
    font-weight: 500;
    font-size: 1.8rem;
    margin-bottom: 0;
}

.why-we__image {
    position: absolute;
    left: 296px;
}

.studying {
    background-repeat: no-repeat;
    background-position: 100% center;
    background-size: 100%;
}

.steps-ul__li {
    position: relative;
    margin-bottom: 60px;
}

.steps-ul__container {
    position: relative;
}

.steps-ul__container:nth-child(n + 2)::before {
    content: "";
    display: block;
    position: absolute;
    top: -24px;
    left: -139px;
    width: 106px;
    height: 128px;
    border-left: 3px solid rgba(203, 4, 4, 1);
    border-bottom: 3px solid rgba(203, 4, 4, 1);
    border-bottom-left-radius: 15px;
}

.steps-ul__container {
    gap: 20px;
}

.studying__subtitle {
    margin-bottom: 18px;
    font-size: 3.2rem;
}

.studying__description {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 0;
}

.categories {
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

.categories__subtitle {
    background: linear-gradient(90deg, #E10505 0%, #6B0001 100%);
    padding: 10px 72px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
    font-size: 3.2rem;
    font-weight: 400;
    color: #FFFFFF;
}

.categories__ul {
    gap: 30px;
}

.categories__subtitle {
    margin-bottom: 43px;
}

.categories__inner-ul {
    height: 90%;
    gap: 30px;
    padding: 0;
}

.categories__inner-li {
    width: calc(50% - 15px);
    background-color: #FFFFFF;
    padding: 30px 25px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
}

.category__image {
    width: 60%;
    height: 153px;
}

.category__subtitle {
    font-size: 2.4rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.category__list-title {
    font-size: 2.0rem;
    margin-bottom: 26px;
}

.category__list {
    padding: 0;
    margin-bottom: 25px;
}

.category__list-item {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.category__price {
    font-family: 'Roboto', sans-serif;
    margin-top: auto;
    margin-bottom: 24px;
    font-size: 2.5rem;
    font-weight: 500;
}

.category__note {
    font-size: 1.6rem;
    margin-bottom: 23px;
}

.link_auto-width {
    display: block;
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

.link_categories {
    margin-bottom: 17px;
}

.facts {
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    background-size: cover;
    padding-bottom: 60px;
}

.facts__ul {
    margin-top: 60px;
    margin-bottom: 0;
}

.facts__logo {
    height: 93px;
    margin-right: 13px;
}

.facts__number {
    font-family: 'Roboto', sans-serif;
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 0;
}

.facts__text {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 0;
}

.branches-n-classes {
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    background-size: cover;
}

.branches-description {
    margin: 40px 0;
    font-size: 2rem;
    font-weight: 500;
}

.branches__ul {
    gap: 37px 30px;
    margin-bottom: 60px;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    grid-auto-rows: max-content;
}

.branches__li {
    height: 100%;
}

.branch__link {
    height: 100%;
    width: 100%;
    background: #850102;
    font-weight: 400;
    padding: 20px 40px;
}

.branch__link .link__paragraph {
    position: relative;
    margin-left: 3.6rem;
    margin-block: 1rem;
}

.branch__link .link__paragraph::before {
    content: '';
    display: inline-block;
    width: 2.8rem;
    height: 4rem;
    margin-right: 14px;
    background: url("../assets/icons/point.svg") no-repeat;
    background-size: 2.8rem 4rem;
    position: absolute;
    left: -3.6rem;
    top: calc(50% - 2rem);
}

.branches__link {
    width: 320px;
}

.link_small {
    font-size: 2.4rem;
    font-weight: 400;
}

.instructors {
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    background-size: cover;
}

.instructors__ul {
    margin: -1rem;
}

.instructor__img {
    margin-bottom: 22px;
}

.instructor__text {
    font-size: 2rem;
    font-weight: 500;
    color: #FFFFFF;
}

.photos {
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.photos__image {
    height: 449px;
    max-width: 100%;
    margin-bottom: 22px;
    border-top-right-radius: 20px;
    border-bottom-left-radius: 20px;
}

.autopark__description {
    font-size: 2rem;
    font-weight: 500;
}

.polygons__title {
    margin-top: 40px;
}

.rewards {
    background: linear-gradient(rgba(254, 214, 31, 0.5), rgba(254, 214, 31, 0.5)), url("../assets/images/background/rewards-bg.webp") no-repeat center fixed;
    background-size: cover;
}

.rewards__li {
    width: 30%;
    position: relative;
    padding: 60px 15px 15px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
    background: #FFF;
    margin-top: 80px;
}

.reward__icon {
    position: absolute;
    max-height: 130px;
    width: auto;
    top: -70px;
}

.reward__description {
    padding: 7px;
    color: #000;
    font-size: 1.8rem;
    font-weight: 500;
}

.reviews-n-faq {
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    background-size: cover;
}

.review__photo {
    height: 354px;
    width: auto;
    margin-right: 29px;
    border-top-right-radius: 20px;
    border-bottom-left-radius: 20px;
}

.review__title {
    font-family: 'Roboto', sans-serif;
    font-size: 3.2rem;
    margin-bottom: 16px;
}

.review__text {
    font-size: 2rem;
    font-weight: 500;
}

.carousel-control-prev:focus,
.carousel-control-next:focus {
    opacity: .5;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 1)) !important;
    opacity: 1;
}

.accordion-item {
    margin-bottom: 32px;
    padding: 34px 145px 34px 131px;
    background: #850102;
    border-radius: 0 20px 0 20px;
}

.accordion-item:first-of-type {
    border-radius: 0 20px;
}

.accordion-item:last-of-type {
    border-radius: 0 20px;
}

.accordion-item .accordion-button {
    background: none;
    box-shadow: none;
    color: #FFF;
    font-size: 3.2rem;
    line-height: 37px;
}

.accordion-header {
    position: relative;
}

.accordion-button::after {
    content: none;
}

.accordion-button:focus {
    box-shadow: none;
}

.accordion-question {
    width: 90%;
}

.accordion-svg {
    position: absolute;
    top: calc(50% - 9px);
    right: 0;
    transition: top .3s;
}

.accordion-svg path {
    transition: d .3s;
}

.accordion-button:not(.collapsed) .accordion-svg {
    top: 50%;
}

.accordion-button:not(.collapsed) .accordion-svg path {
    d: path('M1 1L29 1L54.5 1');
}

.accordion-body {
    font-size: 2rem;
    font-weight: 500;
    color: #FFF;
    line-height: 23px;
}

.accordion-body::before {
    content: '';
    display: block;
    width: 363px;
    height: 1px;
    margin-bottom: 25px;
    background: #FFF;
}

.enroll {
    background: linear-gradient(rgba(255, 214, 26, 0.88), rgba(255, 214, 26, 0.88)), url("../assets/images/background/enroll-bg.webp") no-repeat right fixed;
    background-size: contain;
}

.enroll__specialist-text {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 30px;
}

.enroll__form {
    border: 3px solid #CB0404;
    border-radius: 15px;
    padding: 15px;
}

.footer {
    background: linear-gradient(90deg, rgba(225, 5, 5, 1), rgba(107, 0, 1, 1));
    padding: 32px 0;
    margin-top: auto;
}

.footer-links {
  display: flex;
  gap: 10px;
  margin: 10px 0;
  justify-content: center;
flex-direction: column;
}

.footer-links a {
  color: #fff !important;
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  margin: 0;
  text-align: center;
}


.modal-content {
    margin: 20px;
    border-radius: 0 20px;
    border: none;
}

.modal-header {
    position: relative;
    min-height: 44px;
}

.btn-close {
    background: none;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 15px;
    right: calc(23px + 1rem);
    opacity: 1;
}

.btn-close svg {
    width: 3rem;
    height: 3rem;
}

.btn-close:hover {
    filter: drop-shadow(0 0 4px #850102);
    opacity: 1;
}

.modal-header,
.modal-footer {
    border: none;
}

.modal-body .nav-link {
    font-size: 2.4rem;
    font-weight: 500;
}

.modal-body .navigation__link {
    margin-bottom: 2.4rem;
}

@media screen and (max-width: 1400px) {
    html {
        font-size: calc(5px + 5 * (100vw / 1440));
    }

    .header__contacts {
        /*width: calc(227px - 1.1rem);*/
        padding: 2rem 1.5rem;
    }

    .autoschool__title {
        font-size: 5.6rem;
    }

    .autoschool__description {
        font-size: 2rem;
    }
}

@media screen and (max-width: 1200px) {
    .autoschool {
        background-position: 90% 90%, 120%;
        background-size: 554px 242px, contain, cover;
    }
}

@media screen and (max-width: 1100px) {
    .autoschool {
        background-position: 90% 90%, 135%;
        background-size: 554px 242px, contain, cover;
    }
}

@media screen and (max-width: 1000px) {
    .autoschool {
        background-position: 90% 90%, 140%;
        background-size: 443px 193px, contain, cover;
    }
}

@media screen and (max-width: 991px) {
    .header {
        position: relative;
        background-color: #FFF;
        box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
        z-index: 2;
    }

    .navigation {
        margin-left: 0;
    }

    .navbar-toggler ~ .navbar-collapse {
        width: 96px;
        position: absolute;
        right: -7px;
        top: 100%;
        padding: 5px;
        background-color: #FFF;
        z-index: 4;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
        font-size: 16px;
    }

    .header__contacts {
        /*height: calc(100px - 20px + 2rem);*/
        /*bottom: calc(-100px + 20px - 2rem);*/
        height: 64px;
        bottom: -64px;
    }

    .phone__link {
        font-size: 14px;
    }

    .why-we {
        background: url("../assets/images/background/why-we-bg-mobile.webp") no-repeat center;
        background-size: cover;
    }

    .studying {
        background-size: 150%;
    }

    .branches__ul {
        grid-template-columns: repeat(auto-fill, minmax(273px, 1fr));
    }

    .steps-ul__container:nth-child(n)::before {
        content: none;
        display: none;
    }

    .steps-ul__li:not(:last-child)::before {
        content: "";
        display: block;
        position: absolute;
        top: 69%;
        left: -32px;
        width: 32px;
        height: 194px;
        border-left: 3px solid rgba(203, 4, 4, 1);
        border-bottom: 3px solid rgba(203, 4, 4, 1);
        border-top: 3px solid rgba(203, 4, 4, 1);
        border-bottom-left-radius: 15px;
        border-top-left-radius: 15px;
    }

    .categories__li {
        width: 100%;
    }

    .categories__li.carousel-item {
        margin-bottom: 25px;
    }

    .categories__inner-ul {
        margin-bottom: 23px;
    }

    .categories__subtitle {
        margin-bottom: 23px;
    }

    .carousel-indicators {
        bottom: -5px;
    }

    .slide-box {
        display: flex;
        gap: 2rem;
    }

    .carousel-indicators [data-bs-target]{
        height: 20px;
        width: 20px;
        border: 0 solid transparent;
        border-radius: 10px;
    }

    .photos__image {
        height: 300px;
    }

    .reviews {
        padding-bottom: 30px;
    }

    .review__photo {
        width: auto;
        height: 200px;
    }

    .review__text-block {
        min-height: 230px;
    }

    .accordion-item {
        padding: 25px 29px;
    }
}

@media screen and (max-width: 768px) {
    .container {
        padding: 0 17px;
    }

    .autoschool {
        background-position: 90% 90%, 30vw, 50%;
        background-size: 380px auto, cover, cover;
    }

    .branches__ul {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories__inner-li {
        padding: 15px 10px;
    }

    .category__image {
        width: 40%;
        height: 174px;
        margin: -10px;
    }

    .categories__subtitle {
        margin-bottom: 10px;
    }

    .category__list {
        margin-bottom: 0;
    }

    .category__list-title {
        margin-bottom: 10px;
    }

    .category__list-item {
        margin-bottom: 5px;
    }

    .category__price {
        margin-bottom: 10px;
    }

    .photos__image {
        height: 230px;
    }

    .link_categories {
        margin-bottom: 0;
    }

    .branch__link {
        padding: 10px 13px;
    }

    .instructor__img {
        margin-bottom: 7px;
    }

    .reviews {
        padding-bottom: 0;
    }

    .review__photo {
        margin-bottom: 15px;
    }

    .review__text-block {
        min-height: 210px;
    }

    .accordion-item {
        padding: 15px 17px;
    }
}

@media screen and (max-width: 575px) {
    html {
        font-size: calc(6px + 5 * (100vw / 1440));
    }

    .categories__inner-li {
        width: 100%;
    }

    .link {
        padding: 10px 56px;
        font-size: 20px;
    }

    .link_small {
        font-size: 20px;
        padding: 5px 17px;
    }

    .autoschool {
        height: auto;
        min-height: max(756px, 100vh);
        background-position: 90% 80%, 100%, 50%;
        background-size: 380px auto, 70% 100%, cover;
    }

    .autoschool__title {
        margin-top: 256px;
        font-size: 4.8rem;
    }
    .autoschool__description {
        font-size: 1.8rem;
        margin-bottom: 263px;
    }

    .autoschool__link {
        display: block;
        margin: auto;
        text-align: center;
        width: 271px;
    }

    .why-we__card {
        width: 290px;
        margin-right: 60px;
    }

    .why-we__text {
        width: 80%;
    }

    .why-we__image {
        left: 236px;
    }

    .studying__subtitle,
    .studying__description {
        text-align: center;
    }

    .facts__logo {
        height: 57px;
    }

    .steps-ul__li {
        margin-bottom: 26px;
    }

    .steps-ul__li:nth-child(n)::before {
        content: none;
        display: none;
    }

    .steps__image {
        position: relative;
        z-index: 4;
    }

    .steps-ul__li:nth-child(odd) .steps__img-container::before {
        content: "";
        display: block;
        position: absolute;
        top: calc(20vw + 22% - 3vh);
        left: 8%;
        width: calc(20px + 8%);
        height: calc(65% + 4vh);
        border-left: 3px solid rgba(203, 4, 4, 1);
        border-bottom: 3px solid rgba(203, 4, 4, 1);
        border-top: 3px solid rgba(203, 4, 4, 1);
        border-bottom-left-radius: 15px;
        border-top-left-radius: 15px;
    }

    .steps-ul__li:not(:last-child):nth-of-type(even) .steps__img-container::after {
        content: "";
        display: block;
        position: absolute;
        top: calc(20vw + 22% - 2vh);
        right: 8%;
        width: calc(4px + 8%);
        height: calc(65% + 4vh);
        border-right: 3px solid rgba(203, 4, 4, 1);
        border-bottom: 3px solid rgba(203, 4, 4, 1);
        border-top: 3px solid rgba(203, 4, 4, 1);
        border-bottom-right-radius: 15px;
        border-top-right-radius: 15px;
    }

    .branch__link {
        font-size: 16px;
        padding: 10px 5px;
    }

    .branch__link:before {
        height: 20px;
        width: 13px;
        background-size: 13px 20px;
        margin-right: 5px;
    }

    .review__text-block {
        min-height: 230px;
    }

    .accordion-question {
        width: 80%;
        font-size: 18px;
        line-height: 21px;
    }

    .accordion-body {
        font-size: 16px;
        line-height: 18px;
    }

    .photos__image {
        height: 180px;
    }
}

@media screen and (max-width: 390px) {
    .autoschool {
        background-position: 90% 80%, 100%, 50%;
        background-size: 95vw auto, 70% 100%, cover;
    }

    .branches__ul {
        grid-template-columns: repeat(1, 1fr);
    }

    .branches__li {
        width: 100%;
    }
}

@media screen and (max-width: 360px) {
    .link {
        padding: 10px 33px;
    }

    .why-we__card {
        width: 210px;
    }

    .why-we__image {
        left: 153px;
    }
}
