@import url('https://fonts.googleapis.com/css2?family=Abel&family=Agdasima:wght@400;700&family=Anton&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Abel&family=Agdasima:wght@400;700&family=Alfa+Slab+One&family=Anton&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Abel&family=Agdasima:wght@400;700&family=Alfa+Slab+One&family=Anton&display=swap');

/* properties common all over the page */

h1, h2, h3 {
    font-family: Agdasima, sans-serif;
}

h2 {
    padding: 25px 10%;
    padding-bottom: 5px;
}

section button {
    background-color: white;
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid;
    font-size: .8rem;
    font-weight: 600;
    margin-top: 20px;
    transition: background-color .3s linear;
}

section button:hover {
    background-color: red;
}

/* =========== hero section ========== */


section.hero {
    /* to create the gradient overlay on the background */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2.2rem;
    /* replace this height with padding */
    /* height: 570px; */
    padding: 150px 10px;
    color: #eee;
    font-size: 1.1rem;
    margin-bottom: 50px;
    background-image: url(../images/bg-imgs/kobbie-and-team-celebration.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-image: fill 1 linear-gradient(transparent, black 96%);
}

.hero-text {
    background-color: hsla(0, 0%, 0%, .1);
    border-radius: 10px;
    padding: 10px;
    /* width: ; */
}

.hero-text h1 {
    color: white;
    font-family: Impact, Anton, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-size: clamp(3.8rem, 11vw, 6rem);
}

.hero-text .manchester {
    color: rgb(219, 27, 27);
    text-shadow: 1px 0 1px black;
}

.hero-text .united {
    color: transparent;
    -webkit-text-stroke: .1px white;
}

.hero-text p {
    padding: 6px 0;
}

.hero-text h2 {
    padding-top: 18px;
    padding-left: 0;
}

.hero-text h2 span {
    color: rgb(219, 27, 27);
}

/* ======= matches section ====== */

/* ----- slider ---- */

section.matches {
    position: relative;
}

.slider {
    display: flex;
    gap: 30px;
    overflow-x: scroll;
    background-color: #eee;
    padding: 25px;
    margin: 20px 2%;
    margin-right: 0;
    border-left: 4px solid black;
}

/* to have the blurring effect at the end of slider.
   position is relative to section.matches  */
.slider::after {
    content: '';
    width: 100px;
    height: 416px;
    position:absolute;
    right: 0;
    top: 81.5px;
    background-image: linear-gradient(to right, transparent, #eee 80%);
}

/* -------- match card ------- */

.match-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 180px;
    gap: 10px;
    padding: 10px;
    border-radius: 11px;
    background-color: white;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, .2);
}

.competition-logo {
    height:130px;
    width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.competition-logo.friendly p {
    width: 100%;
    font-weight: 900;
    font-size: 1.4rem;
    color: rgb(123, 57, 57);
    text-align: center;
}

/* the europa league logo i have got is too large. to fix it: */
img.europa {
    width:84px;
    height: auto;
}

.match-date {
    font-size: .8rem;
    color: hsl(0, 100%, 58%);
}

.result-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 5px;
}

.result {
    padding-bottom: 10px;
    font-weight: 900;
    color: rgb(101, 24, 38);
}

.match-status {
    padding-bottom: 5px;
    font-weight: 600;
    letter-spacing: .12rem;
}

.win-status {
    width: 40px;
    height: 3px;
    border-radius: 16px;
}

/* color codes of win, lose, draw and pending games*/
.win-status.pending {
    background-color: grey;
}
.win-status.win {
    background-color: yellowgreen;
    box-shadow: 0 0 4px yellowgreen;
}
.win-status.lose {
    background-color: red;
    box-shadow: 0 0 3px red;
}
.win-status.draw {
    background-color: blue;
    box-shadow: 0 0 2px blue;
}

/* MATCH PREVIEW button */
.stat-button:hover {
    color: #eee;
}

/* if the match is a future one */
.stat-button.pending:hover {
    background-color: hsl(0, 0%, 90%);
    color: black;
}

/* ===== youtube vedio form the man u channel */

.yt-video {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 0 50px 0;
    position: relative;
}

.yt-video h2 {
    position: absolute;
    left: 0;
    top: 18px;
}

.yt-video iframe {
    width: 80%;
    height: 30vw;
}

.yt-video h1 {
    width: 80%;
    padding: 10px 0;
    background-color: hsl(0, 0%, 90%);
    font-size: clamp(.7rem, 4vw, 1.79rem);
}

/* ====== articles section ====== */

/* --------- article card ------------ */

section.articles {
    /* necessary to make the more articles button at center */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.article-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: min(30px, 2%);
    gap: 20px;
}

article {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 1px 1px 5px hsl(0, 0%, 20%);
}

/* to have a gradient between the text and image */
article .article-overlay {
    height: 100%;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    background-image: linear-gradient(transparent, black 96%);
}

/* to have the image magnifying effect when hovering */
.img-wrapper {
    transition: scale .6s ease-in;
}
/* hover on .img-wrapper because it is sitting on top of the image */
.img-wrapper:hover {
    scale: 1.04;
}

article img {
    max-width: 500px;
    max-height: 280px;
    min-width: 320px;
}


.article-text {
    position: absolute;
    bottom: 0;
    left: 0;
    color: white;
    padding: 15px 10px;
    padding-top: 0;
}

article h1 {
    font-size: 1.7rem;
}

.read-more-button {
    background-color: transparent;
    color: white;
}

.read-more-button:hover {
    border: 1px solid red;
}

.more-articles-button {
    background-image: linear-gradient(to right top, red, black);
    color: white;
    border: none;
    transition: transform .2s linear;
    font-size: 1rem;
    box-shadow: 1px 1px 5px hsl(0, 0%, 10%);
}
.more-articles-button:hover {
    /* transform: scaleX(1.2); */
    animation: growShrink 1.5s ease-in 0s infinite;
}

@keyframes growShrink {
    /* form {
        scale: 1.05;
    } */
    50% {
        scale: 1.03;
    }
    100% {
        scale: 1;
    }
}

/* ==== sponsors section ==== */

.sponsor-slider {
    display: flex;
    /* justify-content: center; */
    /* flex-wrap: wrap; */
    /* gap: 3vw; */
    padding: 45px 5%;
    margin-top: 60px;
    overflow: hidden;
    position: relative;
}

.sponsor-slider::before {
    content: '';
    width: 20vw;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    background-image: linear-gradient(to right, white 40%, transparent);
}
.sponsor-slider::after {
    content: '';
    width: 20vw;
    height: 100%;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    background-image: linear-gradient(to left, white 40%, transparent);
}

.slider-img-container {
    display: flex;
    justify-content: center;
    width: 240px;
    position: absolute;
    right: -200px;
    animation: slideLeft 7s linear infinite;
}

.sponsor-slider img {
    height: 36px;
    width: auto;
}

.pad {
    /* i did this because two logos was sliding too close to each other. */
    /* i don't know why it must be negative */
    margin-right: -30px;
}

.i1 {
    animation-delay: 0s;
    padding-left: 10px;
}
.i2 {
    animation-delay: 1s;
}
.i3 {
    animation-delay: 2s;
}
.i4 {
    animation-delay: 3s;
}
.i5 {
    animation-delay: 4s;
}
.i6 {
    animation-delay: 5s;
}
.i7 {
    animation-delay: 6s;
}

@keyframes slideLeft {
    to {
        translate: -1700px;
    }
}

/* queries for you tube video */
@media screen and (max-width: 640px) {
    .yt-video iframe {
        width: 95%;
        height: 45vw;
    }
    .yt-video h1 {
        width: 95%;
    }
}

/* queries for article */
@media screen and (max-width: 534px) {
    article .img-container img {
        max-width: 400px;
    }
    article .article-text h1 {
        font-size: 1.65rem;
    }
    article .article-text p {
        font-size: .94rem;
    }
}
@media screen and (max-width: 408px) {
    article .img-container img {
        width: 198px;
    }
    article .article-text h1 {
        font-size: 1.17rem;
    }
    article .article-text p {
        font-size: .84rem;
    }
}