@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,500;1,600&display=swap");

:root {
  --orange: rgb(255, 68, 34);
}

body {
  background-color: rgb(250, 250, 250);
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  color: rgb(0, 0, 0);
}

body * {
  box-sizing: border-box;
}

img {
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

h2 {
  color: var(--orange);
  font-size: 28px;
  font-weight: 700;
}

h2 > a:hover {
  color: rgb(0, 0, 0);
}

.text-secondary {
  color: rgb(170, 170, 170);
  font-size: 12px;
}

/* Basic grid-layout for the main sections */
.news-big,
.news-latest,
.funding,
.news-categories,
.deals {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 10px;
}

.news-latest,
.funding,
.news-categories,
.deals {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

.site-logo {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background-color: black;
  align-items: center;
  padding: 6px 24px;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}

.navbar-top {
  display: none;
  height: 32px;
  padding: 0 20px;
  background-color: black;
  color: hsla(0, 0%, 100%, 0.6);
  line-height: 32px;
  font-size: 13px;
}

.navbar-top a {
  margin-left: 10px;
  letter-spacing: -0.08em;
}

.navbar-top a.link-highlight {
  color: white;
}

.navbar-top a:first-child {
  margin-left: 0;
}

.navbar-top a:hover {
  color: white;
}

.company {
  text-align: right;
}

.navbar-main {
  height: 48px;
  background-color: white;
  display: flex;
  justify-content: flex-end;
}

.navbar-main a {
  color: rgb(170, 170, 170);
  text-transform: uppercase;
  font-weight: 500;
  display: inline-block;
  height: 48px;
  line-height: 1;
  padding: 18px 12px 0;
}

.navbar-main a:first-child {
  padding-left: 20px;
}

.navbar-main a:hover {
  color: black;
}

.navbar-main button {
  display: block;
  width: 48px;
  height: 48px;
  border: 0;
  border-left: 1px solid rgb(235, 235, 235);
  background-color: white;
  cursor: pointer;
}

.navbar-main .search {
  max-height: 100%;
  padding: 16px 16px 16px 15px;
  float: left;
}

.navbar-main .mobile-menu span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px;
  background-color: var(--orange);
  border-radius: 30%;
}

.navbar-main .expanded-menu {
  display: none;
}

/* Big News section*/
.news-big {
  grid-auto-rows: 240px;
  color: white;
}

.lead-article {
  background-image: url("assets/images/news-big1.jpg");
}

.news-big > article:nth-child(2) {
  background-image: url("assets/images/news-big2.png");
}

.news-big > article:nth-child(3) {
  background-image: url("assets/images/news-big3.jpg");
}

.news-big > article {
  cursor: pointer;
  background-position: center;
  background-size: cover;
}

.news-big > article > header {
  height: 100%;
  background-image: linear-gradient(
    rgba(124, 124, 124, 0.6),
    rgba(15, 15, 15, 0.8) 80%,
    rgba(5, 5, 5, 1)
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
}

.news-big > article > header:hover {
  background-image: linear-gradient(
    rgba(180, 180, 180, 0.6),
    rgba(15, 15, 15, 0.8) 80%,
    rgba(5, 5, 5, 1)
  );
}

.news-big h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.1em;
}

.news-big p {
  margin-bottom: 0.25em;
  letter-spacing: -0.03em;
}

.news-big p > img {
  margin-left: 0.75em;
  margin-right: 0.5em;
  vertical-align: middle;
}

.category {
  text-transform: uppercase;
}

.news-big a:hover {
  color: white;
}

/* Latest news */
.news-latest {
  row-gap: 0;
}

.news-latest > article,
.deals > article {
  padding: 10px;
  display: flex;
}

.news-latest h2 {
  padding-left: 10px;
  margin-bottom: 10px;
}

.news-latest h3 {
  font-weight: 700;
}

.news-latest article a:hover {
  color: rgb(85, 85, 85);
}

.news-latest h3 a:hover {
  color: var(--orange);
  text-decoration: underline;
}

.news-latest time:before {
  content: "\B7";
  display: inline-block;
  margin-left: 4px;
  margin-right: 4px;
}

.news-latest img,
.deals .image {
  width: 75px;
  height: 75px;
  object-fit: cover;
}

.image-wrapper {
  display: block;
  flex: 0 0 75px;
  margin-right: 10px;
}

/* Funding */
.funding {
  padding: 20px;
}

.funding > article:last-child {
  display: none;
}

.funding h2 {
  margin-bottom: 10px;
}

.funding-links a {
  display: block;
  color: var(--orange);
  margin-bottom: 10px;
}

.funding-links a:hover {
  color: black;
}

.funding > article {
  background-color: #fffaf8;
}

.funding > article > header {
  background-color: rgba(255, 68, 34, 0.08);
  position: relative;
  cursor: pointer;
}

.funding h3 {
  padding: 8px 0 8px 90px;
  background-color: var(--orange);
  color: white;
  font-size: 19px;
  font-weight: 500;
}

.funding h4,
.funding h5 {
  padding-left: 90px;
}

.funding h4 {
  padding-top: 10px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
}

.funding h5 {
  padding-bottom: 10px;
  font-size: 13px;
  color: rgb(85, 85, 85);
}

.funding > article > header img {
  position: absolute;
  top: 10px;
  left: 10px;
}

.funding-wrapper {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 68, 34, 0.25);
}

.funding-wrapper img {
  vertical-align: middle;
  margin-right: 0.5em;
}

.funding-wrapper a {
  display: block;
  color: rgb(85, 85, 85);
  font-size: 12px;
  margin-bottom: 1em;
}

.funding-wrapper a:last-child {
  margin-bottom: 0;
}

.funding-wrapper a:hover {
  color: black;
}

.funding > article > footer {
  padding: 1rem;
  color: rgb(85, 85, 85);
  font-size: 12px;
}

.funding .source {
  color: rgb(170, 170, 170);
}

/* News by category */
.news-categories {
  padding: 20px;
}

.news-categories h2 {
  margin-bottom: 10px;
}

.news-categories .most-popular {
  padding-bottom: 75%;
  position: relative;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  cursor: pointer;
}

.hard-fork .most-popular {
  background-image: url("assets/images/cat1a.jpg");
}

.apps .most-popular {
  background-image: url("assets/images/cat2a.jpg");
}

.gear .most-popular {
  background-image: url("assets/images/cat3a.webp");
}

.tech .most-popular {
  background-image: url("assets/images/cat4a.jpg");
}

.creative .most-popular {
  background-image: url("assets/images/cat5a.jpg");
}

.podium .most-popular {
  background-image: url("assets/images/cat6a.png");
}

.insights .most-popular {
  background-image: url("assets/images/cat7a.jpg");
}

.launch .most-popular {
  background-image: url("assets/images/cat8a.jpg");
}

.distract .most-popular {
  background-image: url("assets/images/cat9a.jpg");
}

.news-categories .most-popular header {
  color: white;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-image: linear-gradient(
    rgba(5, 5, 5, 0.1),
    rgba(5, 5, 5, 0.6) 70%,
    rgba(5, 5, 5, 0.9) 80%,
    rgba(5, 5, 5, 1)
  );
  padding-left: 20px;
  padding-bottom: 15px;
}

.news-categories .most-popular p {
  cursor: auto;
}

.most-popular .category {
  font-size: 13px;
}

.news-categories .most-popular h3 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3em;
}

.news-categories .most-popular h3 a:hover {
  text-decoration: underline rgba(170, 170, 170, 0.5);
  text-underline-offset: 5px;
}

.most-popular .text-secondary a:hover {
  color: white;
}

.most-popular time:before {
  content: "\B7";
  display: inline-block;
  margin-left: 4px;
  margin-right: 4px;
}

.news-categories .latest {
  margin-top: 2px;
  background-color: rgba(255, 68, 34, 0.08);
  color: var(--orange);
}

.news-categories .latest img {
  object-fit: cover;
}

.news-categories .latest p {
  padding-left: 20px;
  padding-top: 10px;
  font-size: 13px;
}

.news-categories .latest:after {
  content: "";
  display: block;
  height: 0;
  clear: right;
}

.news-categories .latest h3 {
  font-weight: 600;
  padding-left: 20px;
}

.news-categories .latest h3 a:hover {
  text-decoration: underline rgba(255, 68, 34, 0.15);
  text-underline-offset: 3px;
}

.news-categories .latest img {
  float: right;
}

.news-categories .latest img:hover {
  cursor: pointer;
}

.further-articles li {
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 12px;
  color: rgb(85, 85, 85);
  border-bottom: 1px solid rgba(170, 170, 170, 0.2);
}

.further-articles a:before {
  content: "";
  display: inline-block;
  margin-right: 14px;
  margin-top: 0.5em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--orange);
  flex-shrink: 0;
}

.further-articles li a {
  display: flex;
}

.further-articles li a:hover {
  color: black;
}

/* Deals */
/* For styling the images see .latest-news section!*/
.deals {
  row-gap: 0;
  margin-bottom: 40px;
}

.deals > article {
  padding-bottom: 0;
}

.deals > header {
  display: flex;
  justify-content: space-between;
  padding: 40px 10px 10px;
}

.deals > header > a {
  color: var(--orange);
  align-self: flex-end;
}

.deals > header > a:hover {
  color: black;
}

.old-price {
  text-decoration: line-through;
  margin-right: 0.3em;
}

.new-price {
  color: rgb(85, 85, 85);
  font-size: 14px;
}

.deals h3 {
  font-weight: 600;
}

.deals h3:hover {
  color: var(--orange);
  text-decoration: underline rgba(255, 68, 34, 0.2);
  text-underline-offset: 3px;
}

.discount {
  display: none;
}

/* Footer */
.social,
.links {
  margin-left: 20px;
  margin-right: 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.footer1 {
  padding: 3em 0 3em;
  background-color: rgb(19, 19, 19);
}

.icon-btn {
  margin-right: 7px;
  background-color: rgb(51, 51, 51);
  border: 2px solid rgb(51, 51, 51);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 10px;
  cursor: pointer;
}

.icon-btn:last-child {
  margin-right: 0;
}

.icon-btn:hover {
  background-color: rgb(19, 19, 19);
}

.social {
  margin-bottom: 1.5em;
}
.links > a {
  margin-right: 1em;
  text-transform: uppercase;
  color: rgb(170, 170, 170);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.links > a:last-child {
  margin-right: 0;
}

.links > a:hover {
  color: white;
}

.footer2 {
  padding: 3em 0;
  background-color: black;
}

.footer2 .wrapper {
  padding: 0 20px;
  text-align: center;
}

.logo-mockup {
  text-transform: uppercase;
  color: white;
  font-weight: 900;
}

.footer2 span {
  display: block;
}

/* First breakpoint @768px */
@media (min-width: 768px) {
  .navbar-top {
    display: flex;
    justify-content: space-between;
    margin-left: 108px;
  }

  .site-logo {
    padding: 20px 24px;
  }

  .navbar-main {
    justify-content: space-between;
    margin-left: 108px;
  }

  .navbar-main .mobile-menu {
    display: none;
  }

  .navbar-main .expanded-menu {
    display: block;
  }

  .news-big,
  .news-latest,
  .funding,
  .deals {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .news-big {
    height: 60vh;
    grid-template-rows: 1fr 1fr;
  }

  .lead-article {
    grid-row: 1 / span 2;
    grid-column: 1 / span 2;
  }

  .lead-article h3 {
    font-size: 36px;
  }

  .news-latest h2,
  .funding h2,
  .deals > header {
    grid-column: 1 / -1;
  }

  .news-categories {
    grid-template-columns: 1fr 1fr;
    row-gap: 40px;
    column-gap: 25px;
  }

  .news-latest article,
  .deals article {
    flex-wrap: wrap;
    align-content: flex-start;
  }

  .deals > article {
    padding-bottom: 10px;
  }

  /* 
  Using the "padding-bottom hack" to ensure all the images 
  in the latest news section have the same aspect ratio.
  See: https://www.smashingmagazine.com/2013/09/responsive-images-performance-problem-case-study/
*/
  .news-latest img,
  .deals .image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
  }

  .image-wrapper {
    width: 100%;
    height: 0;
    flex: 0 0 auto;
    margin-right: 0;
    margin-bottom: 5px;
    padding-bottom: 56.25%;
    position: relative;
  }

  .deals .image-wrapper {
    padding-bottom: 74.5%;
  }

  .discount {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background-image: url("assets/images/deals-ribbon.svg");
    background-size: cover;
  }

  .discount > div {
    transform: rotate(45deg);
    position: absolute;
    top: 20px;
    left: 20px;
    font-weight: 600;
    font-size: 13px;
  }

  /* Funding section */
  .funding > header {
    grid-column: 1 / -1;
  }

  .funding h2 {
    margin-bottom: 0;
  }

  .funding-links > a {
    display: inline-block;
    margin-right: 10px;
    font-size: 16px;
  }

  .funding-links > a:first-child::after,
  .funding-links > a:nth-child(2)::after {
    content: "|";
    font-size: 1.1em;
    margin-left: 10px;
  }

  .funding-links > a:first-child:hover::after,
  .funding-links > a:nth-child(2):hover::after {
    color: black;
  }

  .footer2 span {
    display: inline;
  }

  .icon-btn {
    margin-right: 14px;
  }
}

/* Special case: portrait (if height >= width) */
@media (min-width: 768px) and (orientation: portrait) {
  .news-big {
    height: 50vh;
  }
}

/* Second breakpoint @1024px */
@media (min-width: 1024px) {
  .site-logo {
    display: none;
  }

  .logo-text {
    transform: translateY(-100%);
  }

  .navbar-main,
  .navbar-top {
    margin-left: 0px;
  }

  .news-latest,
  .funding,
  .deals {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }

  .news-big {
    height: 560px;
  }

  .news-categories {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .funding > header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }

  .funding h2 {
    margin-bottom: 10px;
  }

  .funding h3 {
    font-size: 17px;
    font-weight: 700;
  }

  .funding > article:last-child {
    display: block;
  }

  .deals h3 {
    font-weight: 700;
    font-size: 15px;
  }
}

/* Classes to work with JS */
.invisible {
  display: none !important;
}

.visible {
  display: block !important;
}

.logo-padding {
  padding-top: 6px;
  padding-bottom: 6px;
}

.margin-108 {
  margin-left: 108px;
}

.move-in {
  transform: translateY(0);
  transition: transform 0.5s;
}

.move-out {
  transform: translateY(-100%);
}
