:root {
    --background: #FFFAEF;
    --ultralight: #EFEAD7;
    --light: #E6D995;
    --gray: #5B5B5B;
}

body {
    font-family: 'Arima', Arial, sans-serif;
    background-color: var(--background);
    text-align: center;
}

h2 {
    font-size: 16px;
    font-weight: 500;
}

p {
    font-size: 12px;
}

hr {
    border: 1px solid var(--light);
    border-radius: 100px;
    margin: 0;
}

button {
    border: none;
    font-size: 12px;
    font-family: 'Arima', Arial, sans-serif;
    background-color: var(--light);
    color: white;
    border-radius: 10px;
    padding: 8px;
    transition: background-color 2s ease, transform 2s ease, color 2s ease;
}

button:active {
    font-weight: 900;
    color: var(--light);
    box-sizing: border-box;
    outline: solid 2px var(--light);
    background-color: var(--background);
    transition-delay: 0.9s;
}

nav {
    display: flex;
    align-items: center;
    justify-content: center;
}

nav img {
    min-width: 180px;
    padding: 0 30px;
}

.profile {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    padding: 40px 20px;
    gap: 10px;
}

.profile p {
    padding: 10px 0;
}

.profile-txt,
.profile-img {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-txt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.profile-txt hr {
    width: 80%;
}

.profile-img img {
    position: relative;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    object-fit: cover;
}

.profile img,
.courses img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.about-us {
    background-color: var(--ultralight);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.about-us p {
    padding: 0 20px;
    padding-top: 10px;
    padding-bottom: 20px;
}

.about-us hr {
    width: 30%;
}

.about-us h2 {
    padding-top: 20px;
    padding-bottom: 8px;
}

.courses {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.courses h2 {
    margin-bottom: 40px;
}

.courses-cont {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.courses-txt {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.courses-txt p {
    padding-bottom: 10px;
}

.courses-img {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 40px 20px;
}

.gallery h2 {
    padding-bottom: 10px;
}

.gallery hr {
    width: 70%;
}

.scroller-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    height: auto;
}

.scroller-wrapper::before,
.scroller-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50px;
    height: var(--scroller-height, 120px);
    background: linear-gradient(to right, var(--background), rgba(255, 255, 255, 0));
    z-index: 2;
}

.scroller-wrapper::before {
    left: 0;
}

.scroller-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--background), rgba(255, 255, 255, 0));
}

.scroller {
    position: relative;
    width: 100%;
    height: auto;
}

.scroller__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    animation: scroll-left 120s linear infinite;
    padding: 10px 0;
    height: auto;
}

.photo-container {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    overflow: hidden;
}

.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.follow__btn {
    margin: 20px;
}

footer {
    background-color: var(--gray);
    color: white;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

footer hr {
    width: 50%;
    background-color: var(--light);
    margin-bottom: 20px;
}

.footer-cont {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10px;
}

.footer-location, 
.footer-contacts {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 250px;
    text-align: center;
}

.footer-location h2, 
.footer-contacts h2 {
    height: 40px;
    display: flex;
    align-self: center;
    justify-content: center;
}

.footer-loc iframe {
    width: 100%;
    max-width: 90%;
    height: 150px;
    border-radius: 10px;
}

.footer-contacts h3 {
    margin: 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.footer-contacts a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px; /* Add space between the icon and the text */
}

.footer-contacts a img {
    height: 20px; /* Adjust the icon size */
    width: 20px;
}

.footer-contacts a:hover {
    color: white;
}

.footer-contacts a {
    text-decoration: none;
}

.footer-cont img {
    height: 28px;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0); 
    }
    100% {
        transform: translateX(-100%);
    }
}

.profile-img,
.courses-img {
    transition: transform 1500ms;
    transform-style: preserve-3d;
}

.profile-img.flipped,
.courses-img.flipped {
    transform: rotateY(180deg);
}

.front, .back, .back-cont {
    backface-visibility: hidden;
    position: absolute;
    inset: 0;
}

.front {
    position: relative;
}

.back,
.back-cont {
    background-color: var(--ultralight);
    color: black;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    border-radius: 10px;
}

.back p,
.back-cont p {
    font-size: 10px;
    padding: 3px 6px;
    color: black;
}

@media only screen and (min-width: 350px) {
    h2 {
        font-size: 24px;
    }

    p,
    button {
        font-size: 18px;
    }

    .back p,
    .back-cont p {
        font-size: 12px;
    }

    .photo-container {
        width: 150px;
        height: 150px;
    }

    .scroller__inner {
        gap: 20px;
        height: 200px;
    }

    .scroller-wrapper {
        height: auto;
    }

    .scroller-wrapper::after {
        height: 200px;
    }
    .front,
    .back {
        inset: 0;
    }
}

@media only screen and (max-width: 350px) {
    .photo-container {
        width: 100px; 
        height: 100px;
    }

    .scroller__inner {
        gap: 10px;
    }
}

@media only screen and (min-width: 400px) {
    .footer-loc iframe {
        height: 100%;
        width: 100%;
    }  

    .back p {
        font-size: 13px;
    }
}

@media only screen and (min-width: 500px) {
    .back p,
    .back-cont p {
        font-size: 18px;
    }
}

@media only screen and (min-width: 700px) {
    h2 {
        font-size: 28px;
    }

    p ,
    button {
        font-size: 22px;
    }

    h3 {
        font-size: 22px;
    }

    .back p,
    .back-cont p {
        font-size: 22px;
    }

    .photo-container {
        width: 200px; 
        height: 200px;
        padding-top: 20px;
    }

    .scroller__inner {
        gap: 20px;
    }

    .scroller-wrapper::after,
    .scroller-wrapper::before {
        height: 330px;
    }
    
    .footer-loc {
        width: 320px;
        height: 300px;
    }

    .footer-cont {
        padding-top: 70px;
    }
}

@media only screen and (min-width: 800px) {

    .profile,
    .courses {
        margin: 40px 60px;
    }

    h2 {
        font-size: 32px;
    }

    p ,
    button {
        font-size: 26px;
    }

    .back p,
    .back-cont p {
        font-size: 26px;
    }

    .courses img,
    .profile img {
        width: 400px;
    }

    .footer-loc {
        width: 400px;
    }
}

@media only screen and (min-width: 1000px) {
    h2 {
        font-size: 38px;
    }

    p ,
    button {
        font-size: 32px;
    }

    h3 {
        font-size: 32px;
    }

    .back p,
    .back-cont p {
        font-size: 32px;
    }

    .photo-container {
        width: 300px; 
        height: 300px;
        padding-top: 30px;
    }

    .scroller__inner {
        gap: 30px;
        height: 330px;
    }

    .scroller-wrapper::after,
    .scroller-wrapper::before {
        height: 440px;
    }
}