@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Handlee&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap");

:root {
  --headings-font: "Handlee", cursive;
  --primary-color: rgb(240, 37, 37);
  --light-grey-color: rgb(243, 243, 243);
  --dark-color: rgb(46, 46, 46);
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

p {
  line-height: 1.5rem;
  padding: 0.5rem 0rem;
}

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

.container {
  max-width: 1100px;
  padding: 0px 20px;
  margin: auto;
}

body {
  background-color: var(--light-grey-color);
}

img {
  width: 100%;
}

.sports-category,
.entertainment-category,
.technology-category {
  display: inline-block;
  text-transform: uppercase;
  font-size: 0.7rem;
  padding: 2px 20px;
  border-radius: 50px;
  color: white;
  margin: 0.5rem 0rem;
}

.sports-category {
  background-color: orange;
}

.entertainment-category {
  background-color: rgb(186, 98, 197);
}

.technology-category {
  background-color: rgb(0, 151, 245);
}

/* ====== Preloader ====== */
.preloader {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 10;
}

.preloader > div:nth-child(1) {
  width: 4rem;
  height: 4rem;
  border: 3px solid var(--primary-color);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

.preloader > div:nth-child(2) {
  margin-top: 3rem;
  font-size: 2rem;
  font-weight: 400;
  color: var(--primary-color);
  font-family: var(--headings-font);
  letter-spacing: 2px;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/*=====
NAV BAR 
=====*/

nav {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: white;
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 10px 0px;
}

.logo h1,
.logo h1 span {
  font-family: var(--headings-font);
  font-size: 1.8rem;
}

.logo i,
.logo span {
  color: var(--primary-color);
}

.social {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-gap: 0.4rem;
}

.social i {
  color: var(--dark-color);
}

.social i:hover {
  color: var(--primary-color);
}

.options a {
  text-decoration: none;
  padding: 10px 15px;
  font-size: 1.05rem;
  font-weight: 400;
  color: black;
  letter-spacing: 1px;
  float: left;
}

.options a:hover {
  background-color: var(--light-grey-color);
  color: black !important;
}

.current {
  background-color: var(--primary-color);
  color: white !important;
}

/* =====
SHOWCASE
===== */

.showcase {
  position: relative;
  color: white;
  height: 60vh;
  background: url(../images/background.jpg) center center/cover;
}

.showcase::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.showcase .container {
  height: inherit;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-content: center;
}

.showcase .text-content {
  position: relative;
  padding: 0px 30px;
}

.showcase .text-content h1 {
  text-transform: uppercase;
  font-size: 1.6rem;
  margin: 10px 0px;
  letter-spacing: 1px;
  font-family: var(--headings-font);
}

.showcase .text-content p:nth-child(3) {
  text-align: justify;
}

.showcase .text-content a {
  text-decoration: none;
  padding: 10px 15px;
  font-size: 1.05rem;
  font-weight: 400;
  display: inline-block;
  color: white;
  letter-spacing: 1px;
  background-color: var(--primary-color);
  margin-top: 10px;
}

.showcase .text-content a:hover {
  background-color: var(--light-grey-color);
  color: black !important;
}

/* =====
ARTICLES
===== */

.editor-h1 {
  font-size: 1.6rem;
  margin: 1rem 0rem;
  letter-spacing: 1px;
}

.articles {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 1rem;
}

.articles > a:nth-child(1),
.articles > a:last-child {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 1rem;
  grid-column: 1 / span 2;
  align-items: center;
}

.articles > a:last-child {
  grid-column: 2 / span 2;
}

.articles > a:nth-child(2) {
  background-color: var(--dark-color);
  color: white;
}

.articles > a:nth-child(6) {
  background-color: var(--primary-color);
  color: white;
}

.card {
  background-color: white;
  padding: 1rem;
  text-decoration: none;
  color: black;
}

.card:hover {
  box-shadow: 3px 5px 10px rgb(199, 199, 199);
}

/* ===
FOOTER
=== */

footer {
  background-color: var(--dark-color);
  color: white;
  height: 100%;
  padding: 2rem 0rem;
  margin-top: 1rem;
}

.footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 1.5rem;
}

.footer h4 {
  margin-bottom: 1rem;
}

.footer p {
  font-size: 0.95rem;
  text-align: left;
}

.footer .logo {
  margin: 0rem;
  margin-bottom: 1rem;
}

.footer article:nth-child(3) p {
  border-bottom: 1px dotted rgb(82, 82, 82);
}

.footer input {
  width: 100%;
  padding: 0.5rem;
  margin: 5px 0px;
}

.footer article:nth-child(2) a {
  display: block;
  text-decoration: none;
  color: white;
  text-align: center;
  padding: 0.5rem;
  background-color: var(--primary-color);
}

.footer article:last-child a {
  display: inline-block;
  text-decoration: none;
  color: white;
  text-align: center;
  padding: 0.6rem 0.8rem;
  background-color: orange;
  margin-top: 0.7rem;
}

.footer a:hover {
  background-color: var(--light-grey-color) !important;
  color: black !important;
}

.copyright {
  padding: 0.5rem;
  background-color: rgb(75, 75, 75);
  text-align: center;
  margin-top: 2rem;
  font-size: 0.8rem;
}

/* == 
ABOUT
== */

.about {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  grid-gap: 1.5rem;
  margin: 1.7rem 0rem;
}

.about article {
  background-color: white;
  padding: 1rem;
}

.about article:first-child {
  grid-row: 1 / span 3;
}

.about article:first-child h2 {
  padding: 0.7rem 0rem;
  font-size: 1.7rem;
  font-weight: 900;
}

.about article:last-child {
  color: white;
  background-color: var(--primary-color);
}

.about article:last-child h3 {
  padding: 0.7rem 0rem;
}

.about article:last-child a {
  text-decoration: none;
  display: inline-block;
  width: 100%;
  color: white;
  background-color: var(--dark-color);
  text-align: center;
  padding: 0.5rem 0rem;
  margin-top: 0.7rem;
}

/* =========
ARTICLE PAGE
==========*/

.article-page {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  grid-gap: 1.5rem;
  margin: 1.7rem 0rem;
}

.article-page article {
  background-color: white;
  padding: 1rem;
}

.article-page > *:first-child {
  grid-row: 1 / span 3;
}

.article-page > *:first-child > *:nth-child(3) {
  background-color: var(--light-grey-color);
  padding: 0.4rem 1rem;
  margin: 0.7rem 0rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.article-page > *:first-child > *:nth-child(3) i {
  margin-right: 0.5rem;
}

.article-page article:last-child {
  color: white;
  background-color: orange;
}

.article-page article:last-child h3 {
  padding: 0.7rem 0rem;
}

.article-page article:last-child a {
  text-decoration: none;
  display: inline-block;
  width: 100%;
  color: white;
  background-color: var(--dark-color);
  text-align: center;
  padding: 0.5rem 0rem;
  margin-top: 0.7rem;
}

.article-page ul {
  list-style-position: inside;
  list-style-type: "-    ";
}

.article-page ul li {
  padding: 0.5rem 0rem;
  border-bottom: 1px dotted black;
}

/* =======
FOR TABLET
======= */

@media (max-width: 900px) {
  /*=====
    NAV BAR 
    =====*/
  nav .container {
    flex-direction: column;
  }

  .social {
    display: none;
  }

  .options a {
    margin: 0.5rem 0rem;
  }

  /* =====
    SHOWCASE
    ===== */
  .showcase .container {
    grid-template-columns: 1fr;
  }

  /* =====
    ARTICLES
    ===== */
  .articles {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .articles > a:nth-child(1),
  .articles > a:last-child {
    display: block;
    grid-column: 1 / span 1;
  }

  .articles > a:last-child {
    grid-column: 1 / span 1;
  }
}

/* =======
FOR MOBILE
======= */

@media (max-width: 700px) {
  /* =====
    SHOWCASE
    ===== */
  .showcase {
    height: 80vh;
    text-align: center;
  }

  .showcase .text-content p:nth-child(3) {
    text-align: center;
  }

  /* =====
    ARTICLES
    ===== */
  .articles {
    grid-template-columns: 1fr;
  }

  /* ===
    FOOTER
    === */
  .footer {
    grid-template-columns: 1fr;
  }

  .footer article {
    margin-top: 0.5rem;
  }

  /* == 
    ABOUT
    == */
  .about {
    grid-template-columns: 1fr;
    text-align: justify;
  }

  /* =========
    ARTICLE PAGE
    ==========*/
  .article-page {
    grid-template-columns: 1fr;
    text-align: justify;
  }

  .article-page > *:first-child > *:nth-child(3) {
    flex-direction: column;
  }
}
