﻿.website-introduction {
    font-size: 1.5rem;
    padding: 40px 20px;
    margin-top: var(--whole-page-margin);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    gap: 25px;
    background: var(--intro-gradient);
    color: var(--secondary-color);
}

.website-introduction p {
    width: 100%;
    min-width: 300px;
    max-width: 800px;

    line-height: 2rem;
    text-align: center;
}

.website-introduction-cards {
    height: fit-content;
    display: grid;
    grid-template-columns: repeat(3, fit-content(100%));
    grid-auto-rows: minmax(75px, 110px);
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.website-introduction-cards img {
    width: 60px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    border: var(--accent-color) 2px solid;
    box-shadow: rgba(0, 0, 0, 0.7) 0 2px 10px;
    animation: fly 3s ease-in-out infinite, colorize-border 2s ease-in-out infinite;
    animation-play-state: running;
    transform-origin: 50% 50%;
}

.website-introduction-cards > img:nth-child(odd) {
    margin-top: 50px;
    animation: fly-odd 3s ease-in-out infinite, colorize-border 2s ease-in-out infinite;
}

.website-introduction-cards > img:nth-child(3n) {
    animation: fly-sideways 3s ease-in-out infinite, colorize-border 2s ease-in-out infinite;
}

@keyframes fly {
    0%, 100% {
        transform: translateY(0);
        rotate: 0;
    }
    50% {
        transform: translateY(-5px);
        rotate: 5deg;
    }
}

@keyframes colorize-border {
    0%, 100% {
        border-color: #839d27;
    }
    50% {
        border-color: #c6ff00;
    }
}

@keyframes fly-odd {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(5px);
    }
}

@keyframes fly-sideways {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(5px);
    }
}

@media all and (max-width: 800px) {
    .website-introduction {
        margin-top: 0;
        padding: 35px;
        text-align: center;
        background-repeat: no-repeat;
    }

    .website-introduction > p {
        width: 100%
    }

    .website-introduction-cards {
        display: none;
    }
}

/* Hide the left side images group on tablets. */
@media all and (max-width: 950px) and (min-width: 800px) {
    .website-introduction-cards:first-of-type {
        display: none;
    }

    .website-introduction {
        padding: 40px 75px;
    }

    .website-introduction > p {
        text-align: left;
    }
}