 :root {
     --header-color: #76bbf7;
     --main-color: #97caf7;
     --second-color: #fff;
     --accent-color: #FF6F91;
     --text-color: #333333;
 }

 html {
     scroll-behavior: smooth;
 }

 body {
     min-height: 100dvh;
     display: flex;
     flex-direction: column;
     align-items: center;
     font-family: 'Nunito', sans-serif;
     background-image: url('../img/background.jpg');
     background-repeat: no-repeat;
     background-color: #f1fcfe;
     overflow-anchor: none;

     & [id] {
         scroll-margin-top: 100px;
     }

     & #showForm {
         min-width: 40%;
         background-color: var(--header-color);
         border: none;
         border-radius: 24px;
         padding: 3em;
         animation-name: zoom;
         animation-duration: .4s;
     }

     & .form__title {
         font-size: 2.5rem;
         text-align: center;
     }

     & .precaution {
         text-align: center;
     }

     & .field__container {
         font-size: 1.2rem;
     }

     & .field__container input {
         width: 100%;
         padding: 0.4em 0.2em;
         border-radius: 12px;
         border: none;
     }

     & #showForm form {
         position: relative;
         display: grid;
         gap: 18px;
     }

     & #showForm button {
         font-size: 1.2rem;
         padding: 0.8em;
         border: none;
         background-color: var(--main-color);
         border-radius: 24px;
         transition: .4s;
     }

     & #showForm button:hover {
         background-color: var(--accent-color);
         color: var(--second-color);
         cursor: pointer;
     }

     & #showForm .close {
         position: absolute;
         top: 0;
         right: 25px;
         font-size: 2rem;
         color: #000;
         transition: 0.2s;
         cursor: pointer;
         z-index: 1;
     }

     & #showForm .required {
         color: var(--accent-color);
     }
 }

 .main__container {
     display: grid;
     align-content: space-around;
     color: var(--text-color);
     width: max(100% - 10dvw, 80%);
     align-self: center;
     gap: 36px;

     &:has(#switch:checked) {
         & *[lang="KZ"] {
             display: block;
         }

         & *[lang="RU"] {
             display: none;
         }
     }

     &:has(#switch:not(:checked)) {
         & *[lang="KZ"] {
             display: none;
         }

         & *[lang="RU"] {
             display: block;
         }
     }

     & section:not(#billboard) {
         background-color: rgba(255, 255, 255, 0.75);
         padding: 2em;
         border-radius: 50px;
     }

     & h2 {
         margin-bottom: 0.8em;
     }
 }

 .header__container {
     margin-top: 1em;
     position: sticky;
     top: 0;
     padding: 1em;
     background-color: rgba(255, 255, 255, 0.85);
     border-radius: 50px;
     z-index: 2;

     & .upper__container {
         position: relative;
         display: grid;
         grid-auto-flow: column;
         justify-content: space-around;
         align-items: center;
     }

     & .anchor__container.upper {
         flex-wrap: wrap;
         list-style: none;
         display: flex;
         gap: 32px;
         font-size: 1.2rem;
         align-items: center;
     }

     & a,
     & a:hover,
     & a:visited {
         color: #000;
         text-decoration: none;
     }

     & .anchor__item.btn {
         display: flex;
         gap: 12px;
     }

     & .anchor__item.btn button {
         background-color: transparent;
         border: none;
         cursor: pointer;
     }

     & .anchor__item.switcher {
         display: flex;
         align-items: center;
         gap: 12px;
     }

     & .switch {
         display: inline-block;
         position: relative;
         width: 60px;
         height: 34px;
     }

     & .switch input {
         position: absolute;
         top: 0;
         left: 0;
         width: 100%;
         height: 100%;
         opacity: 0;
         z-index: 10;
         cursor: pointer;
         margin: 0;
     }

     & .slider {
         cursor: pointer;
         position: absolute;
         top: 0;
         left: 0;
         right: 0;
         bottom: 0;
         background-color: var(--main-color);
         transition: .4s;
     }

     & .slider::before {
         position: absolute;
         content: "";
         height: 26px;
         width: 26px;
         left: 4px;
         bottom: 4px;
         background-color: var(--second-color);
         transition: .4s;
     }

     & input:checked+.slider {
         background-color: var(--accent-color);
     }

     & input:focus+.slider {
         box-shadow: 0 0 1px var(--header-color);
     }

     & input:checked+.slider::before {
         transform: translateX(26px);
     }

     & .slider.round {
         border-radius: 34px;
     }

     & .slider.round::before {
         border-radius: 50px;
     }

     .burger__checkbox {
         position: absolute;
         visibility: hidden;
     }

     @media (max-width: 599px) {
         .burger {
             position: relative;
             cursor: pointer;
             display: block;
             border: none;
             background: transparent;
             width: 40px;
             height: 26px;
             padding: 0;
             z-index: 20;
         }

         .burger::before,
         .burger::after {
             content: '';
             left: 0;
             position: absolute;
             display: block;
             width: 100%;
             height: 4px;
             border-radius: 10px;
             background: #000;
             transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
         }

         .burger::before {
             top: 0;
             box-shadow: 0 11px 0 #000;
         }

         .burger::after {
             bottom: 0;
         }

         .burger__checkbox:checked+.burger::before {
             top: 11px;
             transform: rotate(45deg);
             box-shadow: 0 6px 0 rgba(0, 0, 0, 0);
         }

         .burger__checkbox:checked+.burger::after {
             bottom: 11px;
             transform: rotate(-45deg);
         }

         .anchor__container.upper {
             position: absolute;
             top: 100%;
             width: 85%;
             justify-self: center;
             display: grid;
             justify-content: center;
             align-items: center;
             gap: 20px;
             padding: 0;
             background: rgba(255, 255, 255, 0.85);
             backdrop-filter: blur(10px);
             border-radius: 0 0 24px 24px;
             box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
             opacity: 0;
             visibility: hidden;
             transform: translateY(-20px);
             clip-path: inset(0 0 100% 0);
             transition:
                 opacity 0.4s ease,
                 transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                 visibility 0.4s,
                 clip-path 0.5s ease-in-out;
             z-index: 10;
         }

         .anchor__container.upper li {
             width: 100%;
             text-align: center;
             padding: 0.4em 0;
         }

         .burger__checkbox:checked~.anchor__container.upper {
             visibility: visible;
             opacity: 1;
             transform: translateY(16px);
             clip-path: inset(0 0 0 0);
             padding: 2em 1em;
         }
     }
 }

 #billboard {
     position: relative;
     height: clamp(250px, 75dvh, 700px);

     & .billboard__text.container {
         position: absolute;
         bottom: 25%;
         left: 0;
         font-size: clamp(1rem, 2dvw, 2rem);
         color: var(--second-color);
         display: grid;
         gap: 12px;
         max-width: 30ch;
     }

     & .form__btn {
         border-radius: 50px;
         background-color: var(--second-color);
         border: none;
         padding: 0.3em 1em;
         cursor: pointer;
         max-width: 25ch;
     }

     & .form__btn a,
     & .form__btn a:visited {
         color: var(--text-color);
         text-decoration: none;
         font-weight: bold;
     }

     & .form__btn:hover {
         background-color: var(--accent-color);
     }

     & .form__btn a:hover {
         color: var(--second-color);
     }

     & .billboard__img.container {
         position: relative;
     }

     & .bear__img {
         position: absolute;
         bottom: -5%;
         right: 15%;
         width: 50%;
         height: clamp(250px, 50dvh, 450px);
         object-fit: cover;
         object-position: 100% 20%;
         border-radius: 50px;
     }

     & .sun__img {
         position: absolute;
         width: clamp(200px, 55dvw, 750px);
         top: -20%;
         right: 3%;
     }
 }

 #about__us {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
     gap: 32px;
     justify-items: center;
     min-height: 50dvh;

     & .tab__gallery {
         display: grid;
         gap: 24px;
     }

     & .row {
         display: grid;
         grid-auto-flow: column;
         gap: 12px;
         justify-content: space-between;
         grid-area: 2 / 1 / 3 / 4;
     }

     & .column {
         cursor: pointer;

         & img {
             transition: all 0.3s ease;
             opacity: 0.7;
         }

         & img:hover {
             opacity: 1;
             transform: translateY(-5px);
             box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
         }
     }

     & .expanded__container {
         grid-area: 1 / 1 / 2 / 4;

         & img {
             width: 100%;
             transition: transform 0.3s ease;
         }

         & img.animate {
             animation: fadeInScale 0.5s ease-out;
         }
     }

     & .about__text {
         display: grid;
         text-align: center;
     }

     & .about__title {
         font-size: 2rem;
     }

     & .about__desc {
         font-size: 1.5rem;
         max-width: 45ch;
     }
 }

 #teacher {
     position: relative;
     display: grid;
     align-items: center;
     min-height: 80dvh;

     & .mySlides {
         display: grid;
         grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
         justify-items: center;
         grid-area: 1 / 1 / 2 / 2;
         transition: opacity 0.8s ease-in-out;
         opacity: 0;
     }

     & .mySlides.active {
         opacity: 1;
         z-index: 1;
     }

     & .teacher__wrapper {
         display: grid;
         justify-items: center;
         align-items: center;
     }

     & .teacher__text {
         max-width: 60ch;
     }

     & .teacher__name {
         font-size: 3rem;
         max-width: 19ch;
     }

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

     & .teacher__desc {
         font-size: 1.2rem;
         max-width: 60ch;
     }

     & img {
         transform: rotate(5deg);
         width: 100%;
         height: 600px;
         object-fit: cover;
         border-radius: 50px;
     }

     & .prev,
     .next {
         display: flex;
         justify-content: center;
         align-items: center;
         position: absolute;
         top: 50%;
         background-color: var(--main-color);
         padding: 2em;
         max-width: 50px;
         max-height: 50px;
         border-radius: 50%;
         font-size: 1.5rem;
         cursor: pointer;
     }

     & .next {
         right: -2%;
     }

     & .prev {
         left: -2%;
     }
 }

 #groups {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
     justify-items: center;
     color: var(--second-color);

     & .group__card {
         text-align: center;
         padding: 2em;
         margin: 2em;
         width: 350px;
         min-height: 300px;
         background-color: #91c0dd;
         border-radius: 50px;
         border: 6px solid #22A3FF;
     }

     & .group__desc {
         font-size: 1.1rem;
     }
 }

 #gallery {
     display: grid;
     justify-items: center;

     & .gallery__wrapper {
         display: grid;
         grid-template-columns: repeat(auto-fit, minmax(min(450px, 100dvw - 120px), 1fr));
         row-gap: 1.2em;
         justify-items: center;
     }

     & .gallery__item {
         position: relative;
         width: calc(100% - 20px);
         height: auto;
         cursor: pointer;
         transition: transform 0.5s ease;

         & img {
             border-radius: 24px;
         }
     }

     & .gallery__item:hover {
         transform: scale(1.1);
     }

     & #showImage {
         position: fixed;
         top: 0;
         left: 0;
         width: 100%;
         height: 100%;
         background-color: rgba(0, 0, 0, 0.9);
         z-index: 3;
     }

     & #showImage .close {
         position: absolute;
         top: 15px;
         right: 40px;
         font-size: 3rem;
         color: var(--second-color);
         transition: 0.2s;
         cursor: pointer;
     }

     & #showImage img {
         animation-name: zoom;
         animation-duration: 0.6s;
         width: clamp(60%, 50dvw, 100%);
         place-self: center;
         border-radius: 24px;
     }
 }

 #videos {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
     justify-items: center;
     align-items: center;
     gap: 32px;

     & video {
         width: 100%;
         border-radius: 12px;
     }
 }

 .footer__container {
     display: grid;
     grid-auto-flow: column;
     background-color: #91c0dd;
     padding: 2em;
     border-radius: 100px 100px 0 0;
     color: var(--second-color);
     justify-content: center;
     align-items: center;
     text-align: center;

     & .logo__container {
         position: relative;
     }

     & .logo__title {
         font-size: 4rem;
     }

     & .sub__title {
         max-width: 40ch;
     }

     & a,
     & a:active,
     & a:visited {
         color: var(--second-color);
         text-decoration: none;
     }
 }

 ::backdrop {
     background-color: #000;
     opacity: 0.8;
 }

 @keyframes zoom {
     from {
         transform: scale(0);
     }

     to {
         transform: scale(1);
     }
 }

 @keyframes fadeInScale {
     0% {
         opacity: 0.4;
         filter: blur(5px);
         transform: scale(0.95);
     }

     100% {
         opacity: 1;
         filter: blur(0);
         transform: scale(1);
     }
 }

 @media (max-width: 768px) {

     .main__container {
        display: flex;
        flex-direction: column;
         max-width: 95%;
         gap: 20px;
     }

     .main__container section:not(#billboard) {
         padding: 1.5em 1em;
         border-radius: 30px;
     }

     #billboard {
         height: auto;
         min-height: 500px;
         display: flex;
         flex-direction: column;
         justify-content: center;
     }

     #billboard .billboard__text.container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
         position: relative;
         text-align: center;
         margin: 0 auto;
         z-index: 1;
         transform: translateY(80%);
     }

     #billboard .bear__img {
         position: relative;
         right: 0;
         width: 80%;
         margin: 0 auto;
         height: 300px;
         transform: translateY(50%);
         z-index: -1;
     }

     #billboard .sun__img {
         width: 100%;
         top: -45%;
     }

     #teacher .teacher__name {
         font-size: 1.8rem;
         text-align: center;
     }

     #teacher .teacher__job {
         font-size: 1.4rem;
         text-align: center;
     }

     #teacher img {
         height: 350px;
         transform: rotate(0deg);
     }

     #teacher .prev,
     #teacher .next {
        position: relative;
        z-index: 5;
        padding: 0.5em;
     }

     #teacher .prev {
        left: 30%;
     }

     #teacher .next {
        left: 50%;
        top: -50%;
     }

     #groups .group__card {
         width: 100%;
         margin: 10px 0;
         box-sizing: border-box;
     }

     #gallery #showImage img {
        width: 100%;
     }

     .footer__container {
         grid-auto-flow: row;
         text-align: center;
         gap: 20px;
         border-radius: 50px 50px 0 0;
     }

     .footer__container .logo__title {
         font-size: 2.5rem;
     }
 }

 @media (min-width: 769px) and (max-width: 1024px) {

     .main__container {
         max-width: 90%;
         gap: 28px;
     }
     #billboard {
         height: 60vh;
     }

     #billboard .billboard__text.container {
         left: 5%;
         bottom: 20%;
         font-size: 1.2rem;
         max-width: 35ch;
         z-index: 5;
     }

     #billboard .bear__img {
         width: 45%;
         height: 400px;
         right: 5%;
         bottom: 0;
         transform: translateY(50%);
         position: absolute;
         z-index: -1;
     }

     #billboard .sun__img {
         width: 70%;
         top: -15%;
         right: -5%;
     }

     #about__us {
         grid-template-columns: 1fr;
         gap: 40px;
     }

     #about__us .about__desc {
         max-width: 100%;
         text-align: left;
     }

     #teacher .teacher__name {
         font-size: 2.2rem;
     }

     #teacher img {
         height: 450px;
         transform: rotate(3deg);
     }

     #teacher .prev {
        padding: 0.8em;
         left: -30px;
         z-index: 3;
     }

     #teacher .next {
        padding: 0.8em;
         right: -30px;
         top: 50%;
         z-index: 3;
     }

     #groups {
         grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
         gap: 20px;
     }

     #groups .group__card {
         width: auto;
         margin: 10px;
         min-height: 350px;
     }

     #gallery .gallery__wrapper {
         grid-template-columns: repeat(2, 1fr);
         gap: 15px;
     }

     #videos {
         grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
     }

     .footer__container {
         padding: 3em 2em;
         border-radius: 80px 80px 0 0;
     }

     .footer__container .logo__title {
         font-size: 3rem;
     }
 }