@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter/Inter-VariableFont_opsz\,wght.ttf") format("ttf");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter/Inter-Italic-VariableFont_opsz\,wght.ttf") format("ttf");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background-color: hsl(230, 17%, 14%);
}

header {
    margin-bottom: 50px;
}

header p {
    margin-top: 3px;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
}

header p, .toggleLabel {
    color: hsl(230, 22%, 74%);
    font-size: 14px;
}

.container {
    height: 240px;
    border-radius: 0 0 14px 14px;
    background-color: hsl(232, 19%, 15%);

    & .content {
        color: #fff;
        font-weight: 400;
        margin: 0 auto;
        padding: 36px 24px 0;
        max-width: 1100px;
    }
}

.topCards, .bottomCards {
    display:flex;
    gap: 28px;
    flex-wrap: wrap;
} 

.card {
    background-color: hsl(228, 28%, 20%);
    color: hsl(230, 22%, 74%);
    border-radius: 6px;
}

.card:hover {
    background-color: hsl(228, 28%, 30%);
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.topCards .card {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
    margin-bottom: 44px;
    padding: 22px 0 25px 0;

    &.facebook {
        border-top: 6px solid hsl(208, 92%, 53%);
    }

    &.instagram {
        position: relative;
    }

    &.instagram::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        height: 6px;
        width: 100%;
        border-radius: 6px 6px 0 0;
        background: linear-gradient(
            to right,
            hsl(37, 97%, 70%),
            hsl(5, 77%, 71%),
            hsl(329, 70%, 58%)
        );
    }

    &.twitter {
        border-top: 6px solid hsl(203, 89%, 53%);
    }

    &.youtube {
        border-top: 6px solid hsl(348, 97%, 39%);
    }

    & .socialPresence {
        display: flex; 
        justify-content: center; 
        gap: 8px; 
    }

    & .followerCount, .followerChange {
        display: flex;
        align-items: center;
    }

    & .followerChange {
        justify-content: start;
        gap: 6px;
    }

    & .followerCount {
        text-transform: uppercase;
        letter-spacing: 3px;
        flex-direction: column;
        margin-top: 19px;
        margin-bottom: 25px;
        & .number {
            color: #fff;
            letter-spacing: 0;
            font-size: 54px;
            font-weight: 700;
        }
    }
}

.bottomCards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 24px;
    gap: 28px;
}

.bottomCards .card {
    padding: 14px;

    & .topRow, .bottomRow {
        display: flex; 
        align-items: baseline;
        justify-content: space-between;
    }

    & .topRow {
        align-items: center; 
        margin-bottom: 20px;
    }

    & .percentageLevel {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    & .title {
        text-transform: capitalize;
    }

    & .count {
        color: #fff;
        font-size: 32px;
        font-weight: 700;
    }
}

.attribution {
    margin-top: 2.5rem;
}

.green-highlight {
    color: hsl(163, 72%, 41%);
}

.red-highlight {
    color: hsl(356, 69%, 56%);
}
