* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --light-color: #fff;
    --dark-color: #353535;

    --main-background-color: var(--light-color);
    --main-color: var(--dark-color);

    /* border */
    --border-color: #bfc0c5;
    --border-radius: 32px;

    /* section */
    --section-border-color: #bfbfbf;
    --bottom-padding: 50px;
    --sides-padding: 16px;

    /* header */
    --header-font-size: 12px;
    --header-font-weight: 400;
    --header-line-height: 15.6px;
    --header-content-title-width: 168px;

    /* copyright */
    --copyright-font-size: 12px;
    --copyright-font-weight: 400;
    --copyright-line-height: 15.6px;

    /* margin */
    --margin-large: 32px;

    /* padding mobile */
    --padding-large: 32px;
    --padding-small: 16px;
    --padding-mobile: 16px;
    --padding-mini: 8px;

    /* gap */
    --container-gap: 30px;
    --content-gap: 20px;
    --inner-gap: 16px;
    --smaller-gap: 12px;
    --rating-gap: 4px;

    /* body text */
    --font-size-mobile: 16px;
    --font-weight-mobile: 300;
    --line-height-mobile: 20.8px;

    /* h1 */
    --h1-font-size-mobile: 24px;
    --h1-font-weight: 400;
    --h1-line-height-mobile: 31.2px;
    /* h2 */
    --h2-font-size-mobile: 20px;
    --h2-font-weight: 400;
    --h2-line-height-mobile: 26px;
    /* h3 */
    --h3-font-size-mobile: 18px;
    --h3-font-weight: 400;
    --h3-line-height-mobile: 23.4px;

    /* button */
    --btn-height-mobile: 56px;

    /* language */
    --lang-font-size: 12px;
    --lang-font-weight: 400;
    --lang-line-height: 14.52px;

    /* Form */
    --input-font-size: 16px;
    --input-font-weight: 400;
    --input-line-height: 18.38px;

    /* cards */
    --teacher-card-min-width: calc(278px - calc(var(--padding-mobile) * 2));
    --teacher-card-min-height: 380px;

    --review-card-min-width: calc(248px - calc(var(--padding-mobile) * 2));
    --review-card-min-height: 280px;

    /* rating star */
    --rating-star-width: 20px;
    --rating-star-height: 20px;

    /* services */
    --services-font-size: 16px;
    --services-font-weight: 300;
    --services-line-height: 20.8px;
}

@media (min-width: 1280px) {
    :root {
        /* section */
        --bottom-padding: 120px;
        --sides-padding: 80px;

        /* h1 */
        --h1-font-size-mobile: 40px;
        --h1-font-weight: 400;
        --h1-line-height-mobile: 48px;
        /* h2 */
        --h2-font-size-mobile: 24px;
        --h2-font-weight: 400;
        --h2-line-height-mobile: 31.2px;

        /* body text */
        --font-size-mobile: 24px;
        --font-weight-mobile: 400;
        --line-height-mobile: 31.2px;

        /* padding */
        --padding-mobile: 80px;

        /* gap */
        --inner-gap: 32px;
        /* teachers, reviews */
        --smaller-gap: 8px;

        /* cards */
        --teacher-card-min-width: 271px;
        --teacher-card-min-height: 430px;

        --review-card-min-width: 273px;
        --review-card-min-height: 343px;
    }
}

/* Global reset for all <a> tags */
a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    /* Removes highlight on tap */
}

/* Remove link underline specifically for iOS devices */
@supports (-webkit-touch-callout: none) {
    a {
        text-decoration: none;
        color: inherit;
    }
}

body {
    font-family: Ubuntu;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--main-color);
}

body.modal-open {
    overflow: hidden;
}

/* Main Elemnt */
main {
    display: flex;
    flex-direction: column;
}

main.hidden {
    display: none;
}

button {
    font-family: Ubuntu;
    cursor: pointer;
}

/* Images Styles */
img {
  image-rendering: auto;
}

/* Section */
.section {
    display: flex;
    flex-direction: column;
}

@media (max-width: 1279px) {
    .section {
        padding: 0 16px var(--bottom-padding);
    }
}

@media (min-width: 1280px) {
    section {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 0 var(--bottom-padding);
    }
}

:root {
    /* header */
    --header-font-size: 12px;
    --header-font-weight: 400;
    --header-line-height: 15.6px;
    --header-content-title-width: 168px;
}

/* Header */
header {
    display: flex;
    flex-direction: column;
    gap: var(--content-gap);
    background-color: var(--main-background-color);
    color: var(--main-color);
    padding: 20px var(--padding-mobile) var(--padding-large);
    margin-bottom: var(--margin-large);
    border-bottom: 2px solid #f3f1eb;
}

/* Fallback using margins */
header>* {
    margin-bottom: var(--content-gap);
}

/* Use feature queries to check for gap support in flexbox */
@supports (gap: var(--content-gap)) {
    header>* {
        margin-bottom: 0;
    }
}

/* Remove the margin for the last item */
header>*:last-child {
    margin-bottom: 0;
}

header.active {
    margin-bottom: 0px;
}

header .actived {
    color: #DF0611;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar span {
    font-size: var(--header-font-size);
    font-weight: var(--header-font-weight);
    line-height: var(--header-line-height);
    text-align: left;
}

header .rating-container {
    display: flex;
    align-items: center;
    gap: var(--rating-gap);
}

/* Fallback using margins */
header .rating-container .label,
header .rating-container .value,
header .rating-container .icon {
    margin-right: var(--rating-gap);
}

/* Use feature queries to check for gap support in flexbox */
@supports (gap: var(--rating-gap)) {

    header .rating-container .label,
    header .rating-container .value,
    header .rating-container .icon {
        margin-right: 0;
    }
}

/* Remove the margin for the last item */
header .rating-container .icon {
    margin-right: 0;
}

header .label-right {
    text-decoration: none;
    color: inherit;
    cursor: default;
}

header .content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--inner-gap);
}

/* Fallback using margins */
header .content>* {
    margin-right: var(--inner-gap);
}

/* Use feature queries to check for gap support in flexbox */
@supports (gap: var(--inner-gap)) {
    header .content>* {
        margin-right: 0;
    }
}

/* Remove the margin for the last item */
header .content>*:last-child {
    margin-right: 0;
}

header .logo img {
    width: 48px;
    height: 36px;
}

header .content .title {
    width: 50%;
    min-width: var(--header-content-title-width);
    height: 32px;
    padding: 6.75px 13.5px;
    border-radius: var(--border-radius);
    border: 0.67px solid var(--border-color);
    text-align: center;
    font-size: 12px;
    font-weight: 400;
    line-height: 15.6px;

    cursor: pointer;

    background: none;

    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;

    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) {
    header .content .title {
        border: 1px solid var(--border-color);
    }

    header .content .title::before {
        border: 1px solid var(--border-color);
    }
}

@media (min-width: 1280px) {
    header {
        background-color: #f9f7f7;
        padding: 20px 0 0 0;
        margin-bottom: 0;
        border-bottom: none;
    }

    header .logo {
        min-width: 164px;
        min-height: 52px;
    }

    header .top-bar {
        justify-content: end;
        gap: 16px;
    }

    header .tool-bar {
        border: none;
        border-top: 1px solid #bfc0c5;
        border-bottom: 1px solid #bfc0c5;
    }

    header .top-bar,
    header .tool-bar .content {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
    }

    header .tool-bar .content {
        margin: 20px auto;
    }

    header .content {
        margin: 20px 0;
    }

    header .main-navigation {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    header .main-navigation a {
        font-size: 14px;
        font-weight: 400;
        line-height: 18.2px;
        text-align: left;
    }

    header .header-tabs {
        font-family: Ubuntu;
        font-size: 14px;
        font-weight: 400;
        line-height: 18.2px;
        display: inline-block;
        transition: text-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
    }

    header .header-tabs:hover {
        text-shadow: 0 0 0.3px currentColor, 0 0 0.3px currentColor;
        transform: scale(1.01);
    }

    header .header-tabs {
        will-change: transform, text-shadow;
    }

    header .header-tabs.active {
        color: #DF0611;
    }

    header .top-bar .label-right {
        font-family: Ubuntu;
        font-size: 14px;
        font-weight: 400;
        line-height: 18.2px;
    }

    header .rating-container .label {
        font-family: Ubuntu;
        font-size: 14px;
        font-weight: 400;
        line-height: 18.2px;
    }

    header .rating-container .value {
        font-family: Ubuntu;
        font-size: 14px;
        font-weight: 400;
        line-height: 18.2px;
    }
}

/* Navbar Burger */
.navbar-burger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    width: 40px;
    height: 32px;
    padding: 8px 7px;
}

.navbar-burger span {
    height: 2px;
    width: 26px;
    background-color: #5f6065;
    margin: 6px 0;
    transition: all 0.3s;
    position: absolute;
}

.navbar-burger span:nth-child(1) {
    top: 0;
}

.navbar-burger span:nth-child(2) {
    top: 10px;
}

.navbar-burger span:nth-child(3) {
    top: 20px;
}

.navbar-burger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 10px;
}

.navbar-burger.active span:nth-child(2) {
    opacity: 0;
}

.navbar-burger.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 10px;
}

/* Mobile Nav Elemnt */
.navbar-end {
    display: none;
    padding: var(--padding-large) var(--padding-mobile);
}

.navbar.active {
    display: flex;
}

.navbar-end ul {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    list-style: none;
    gap: var(--content-gap);
}

/* Fallback using margins */
.navbar-end ul li {
    margin-bottom: var(--content-gap);
}

/* Use feature queries to check for gap support in flexbox */
@supports (gap: var(--content-gap)) {
    .navbar-end ul li {
        margin-bottom: 0;
    }
}

/* Remove the margin for the last item */
.navbar-end ul li:last-child {
    margin-bottom: 0;
}

.navbar-end ul li {
    width: 100%;
    min-width: 288px;
}

.navbar-end ul a {
    color: inherit;
    text-decoration: inherit;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-end li span {
    flex-grow: 1;
    text-align: left;
    font-size: var(--h3-font-size-mobile);
    font-weight: var(--h3-font-weight);
    line-height: var(--h3-line-height-mobile);
}

.navbar-end.active {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-align: center;
}

.navbar-end .sub-menu {
    display: flex;
    align-items: center;
    gap: var(--content-gap);
    margin: 0px 0px 12px;
}

.navbar-end .icon-sub-menu {
    gap: var(--content-gap);
}

/* Fallback using margins */
.navbar-end .sub-menu img {
    margin-right: var(--content-gap);
}

.navbar-end .icon-sub-menu img {
    margin-right: var(--content-gap);
}

/* Use feature queries to check for gap support in flexbox */
@supports (gap: var(--content-gap)) {
    .navbar-end .sub-menu img {
        margin-right: 0;
    }

    .navbar-end .icon-sub-menu img {
        margin-right: 0;
    }
}

/* Ensure no extra margin for the last item */
.navbar-end .sub-menu img:last-of-type {
    margin-right: 0;
}

.navbar-end .icon-sub-menu span {
    margin-left: var(--content-gap);
}

.navbar-end .sub-menu h2 {
    font-size: var(--h2-font-size-mobile);
    font-weight: var(--h2-font-weight);
    line-height: var(--h2-line-height-mobile);
    text-align: left;
}

/* Footer Elemnt */
footer.hidden {
    display: none;
}

footer {
    border-top: 2.11px solid var(--section-border-color);
    background-color: var(--main-background-color);
    color: var(--main-color);
    padding: 32px var(--padding-mobile);
}

footer .logo img {
    width: 60px;
    height: 46px;
}

footer .container {
    display: flex;
    flex-direction: column;
    gap: var(--content-gap);
}

/* Fallback using margins */
footer .container>* {
    margin-bottom: var(--content-gap);
}

/* Use feature queries to check for gap support in flexbox */
@supports (gap: var(--content-gap)) {
    footer .container>* {
        margin-bottom: 0;
    }
}

/* Remove margin for the last child element to avoid extra space */
footer .container>*:last-child {
    margin-bottom: 0;
}

footer .contact-details {
    display: flex;
    flex-direction: column;
}

footer .bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-mobile);
    font-weight: var(--font-weight-mobile);
    line-height: var(--line-height-mobile);
    text-align: left;
}

footer .content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Fallback using margins */
footer .content>* {
    margin-bottom: var(--content-gap);
}

/* Use feature queries to check for gap support in flexbox */
@supports (gap: var(--content-gap)) {
    footer .content {
        gap: var(--content-gap);
    }

    footer .content>* {
        margin-bottom: 0;
    }
}

/* Remove margin for the last child element to avoid extra space */
footer .content>*:last-child {
    margin-bottom: 0;
}

footer .section-title {
    font-size: var(--h2-font-size-mobile);
    font-weight: var(--h2-font-weight);
    line-height: var(--h2-line-height-mobile);
}

footer .nav-items {
    font-size: var(--font-size-mobile);
    font-weight: var(--font-weight-mobile);
    line-height: var(--line-height-mobile);
    display: flex;
    flex-direction: column;
    gap: var(--smaller-gap);
}

/* Fallback using margins */
footer .nav-items>a {
    margin-bottom: var(--smaller-gap);
}

/* Use feature queries to check for gap support in flexbox */
@supports (gap: var(--smaller-gap)) {
    footer .nav-items {
        gap: var(--smaller-gap);
    }

    footer .nav-items>a {
        margin-bottom: 0;
    }
}

/* Remove margin for the last item to avoid extra space */
footer .nav-items>a:last-child {
    margin-bottom: 0;
}

footer .nav-items a {
    color: inherit;
    text-decoration: inherit;
}

footer .nav-items a.actived {
    color: #DF0611;
}

footer .nav-items span {
    cursor: pointer;
}

footer .content .about,
footer .content .courses,
footer .content .programs {
    display: flex;
    flex-direction: column;
    gap: var(--content-gap);
}

/* Fallback for older iOS devices */
footer .content .about>*+*,
footer .content .courses>*+*,
footer .content .programs>*+* {
    margin-bottom: var(--content-gap);
}

/* Remove margin from the first child */
footer .content .about>*:first-child,
footer .content .courses>*:first-child,
footer .content .programs>*:first-child {
    margin-top: 0;
}

/* Remove margin from the last child */
footer .content .programs>*:last-child {
    margin-bottom: 0;
}

footer .social-icons {
    display: flex;
    gap: var(--content-gap);
    margin: 20px 0;
}

footer .tg-footer,
footer .ws-footer,
footer .vk-footer {
    cursor: pointer;
}

/* Fallback for social icons container */
@supports not (gap: var(--content-gap)) {
    footer .social-icons>*+* {
        margin-left: var(--content-gap);
    }
}

footer .privacy-policy {
    display: flex;
    flex-direction: column;
    gap: var(--content-gap);
}

/* Fallback for privacy policy container */
footer .privacy-policy>*+* {
    margin-top: var(--content-gap);
}

footer .privacy-policy .nav-items {
    display: flex;
    flex-direction: column;
    gap: var(--smaller-gap);
}

/* Fallback for nav items inside privacy policy */
@supports not (gap: var(--smaller-gap)) {
    footer .privacy-policy .nav-items>*+* {
        margin-top: var(--smaller-gap);
    }
}

footer .privacy-policy .nav-items span {
    font-size: var(--font-size-mobile);
    font-weight: var(--font-weight-mobile);
    line-height: var(--line-height-mobile);
    cursor: pointer;
}

footer .copyright {
    font-size: var(--copyright-font-size);
    font-weight: var(--copyright-font-weight);
    line-height: var(--copyright-line-height);
}

@media (min-width: 1280px) {
    footer {
        padding: 80px 0 58px;
    }

    footer .container {
        flex-direction: row;
        justify-content: space-between;
    }

    footer .logo img {
        width: 164px;
        height: 52px;
    }

    footer .content {
        order: 1;
        flex-direction: row;
        gap: 200px;
    }

    footer .content .nav-items {
        font-size: 14px;
        font-weight: 400;
        line-height: 18.2px;
        gap: 20px;
    }

    footer .nav-items span {
        display: inline-block;
        transition: text-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
    }

    footer .nav-items span:hover {
        text-shadow: 0 0 0.3px currentColor, 0 0 0.3px currentColor;
        transform: scale(1.01);
    }

    footer .nav-items span {
        will-change: transform, text-shadow;
    }

    footer .nav-items span.actived {
        color: #DF0611;
    }

    footer .section-title {
        font-size: 16px;
        font-weight: 400;
        line-height: 20.8px;
    }

    footer .contact-details {
        order: 2;
        gap: var(--content-gap);
    }

    footer .content .about,
    footer .content .courses,
    footer .content .programs {
        gap: 32px;
    }

    footer .bottom-bar {
        order: 3;
        flex-direction: column;
        align-items: end;
        gap: 40px;
    }

    footer .privacy-policy {
        order: 4;
        margin-top: 20px;
    }

    footer .privacy-policy .nav-items {
        text-align: end;
        gap: 20px;
    }

    footer .privacy-policy .nav-items span {
        font-size: 14px;
        font-weight: 400;
        line-height: 18.2px;
    }

    footer .privacy-policy .nav-items span {
        display: inline-block;
        transition: text-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
    }

    footer .privacy-policy .nav-items span:hover {
        text-shadow: 0 0 0.3px currentColor, 0 0 0.3px currentColor;
        transform: scale(1.01);
    }

    footer .privacy-policy .nav-items span {
        will-change: transform, text-shadow;
    }

    footer .privacy-policy .nav-items span.active {
        color: #DF0611;
    }

    footer .social-icons {
        order: 5;
        justify-content: end;
        margin: 0;
    }

    footer .copyright {
        order: 6;
        text-align: end;
    }

    footer .site-map {
        text-align: end;
    }

    footer .copyright p,
    footer .site-map {
        font-size: 14px;
        font-weight: 400;
        line-height: 18.2px;
    }

    footer .site-map span {
        display: inline-block;
        transition: text-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
    }

    footer .site-map span:hover {
        text-shadow: 0 0 0.3px currentColor, 0 0 0.3px currentColor;
        transform: scale(1.01);
    }

    footer .site-map span {
        will-change: transform, text-shadow;
    }

    footer .site-map span.active {
        color: #DF0611;
    }
}

@media (min-width: 1280px) {
    footer {
        width: 100%;
    }

    footer .container {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Swiper */
@media (min-width: 1280px) {
    .swiper-button-prev {
        background-image: url("./assets/address/arrow_left.png");
        background-size: 100% 100%;
    }

    .swiper-button-next {
        background-image: url("./assets/address/arrow_right.png");
        background-size: 100% 100%;
    }
}

/* Link Classes */
.link-wrapper {
  text-decoration: none;
  color: inherit;
  display: inline-block;
  cursor: pointer;
}

.link-wrapper:hover {
  opacity: 0.9;
}

.cta-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.cta-link:hover {
  opacity: 0.9;
}
