@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Primary Colors */
  --Soft-orange: hsl(35, 77%, 62%);
  --Soft-red: hsl(5, 85%, 63%);

  /* Neutral Colors */
  --Off-white: hsl(36, 100%, 99%);
  --Grayish-blue: hsl(233, 8%, 79%);
  --Dark-grayish-blue: hsl(236, 13%, 42%);
  --Very-dark-blue: hsl(240, 100%, 5%);

  /* Normal Font Size */
  --Font-size: 15px/16px;
}

body {
  font-family: Inter, sans-serif;
  padding: 3rem 1rem;
  background-color: var(--Off-white);
  padding-bottom: 5rem;
}

nav ul {
  width: 100%;
  list-style: none;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

nav li {
  height: 50px;
}

nav a {
  height: 100%;
  text-decoration: none;
  margin: 0 15px;
  font-size: var(--Font-size);
  display: flex;
  align-items: center;
  color: var(--Very-dark-blue);
  font-weight: 400;
}

nav a:hover {
  color: var(--Soft-orange);
}

nav li:first-child {
  margin-right: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 250px;
  z-index: 1000;
  background-color: var(--Off-white);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 1.5rem 0;
  transform: translateX(100%);
  transition: transform 0.4s ease-in-out;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar li {
  height: 40px;
  width: 100%;
}

.sidebar li:first-child {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 50px;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  z-index: 2;
}

.overlay.active {
  visibility: visible;
  opacity: 1;
}

main {
  margin-top: 1rem;
}

figure .desktop {
  display: none;
}

figure .hero-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center;
}

figcaption {
  display: none;
}

h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  margin-top: 1rem;
  color: var(--Very-dark-blue);
}

p {
  margin-top: 1rem;
  line-height: 1.5;
  font-size: var(--Font-size);
  font-weight: 400;
  color: var(--Dark-grayish-blue);
}

.read-more {
  outline: none;
  border: none;
  font-family: inherit;
  font-weight: 800;
  color: var(--Very-dark-blue);
  padding: 1rem 1.5rem;
  letter-spacing: 4px;
  background-color: var(--Soft-red);
  margin-top: 1rem;
  cursor: pointer;
}

.read-more:hover {
  background-color: var(--Very-dark-blue);
  color: var(--Off-white);
  transition: color 0.4s ease;
  transition: background-color 0.4s ease;
}

.new {
  margin-top: 2rem;
  background-color: var(--Very-dark-blue);
  padding: 1rem;
}

h2 {
  color: var(--Soft-orange);
  margin-bottom: 0.5rem;
}

.new article {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--Dark-grayish-blue);
  color: var(--Off-white);
  cursor: pointer;
}

.new article:last-of-type {
  padding-bottom: 0px;
  border: none;
}

.new article h3 {
  font-size: 1.3rem;
}

.new article:hover h3 {
  color: var(--Soft-orange);
}

.new article p {
  color: var(--Grayish-blue);
  font-size: var(--Font-size);
  line-height: 1.6;
}

.recent-section {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  row-gap: 2.5rem;
}

.recent {
  height: 120px;
  display: flex;
  column-gap: 1rem;
}

.recent img {
  width: 100px;
  object-fit: cover;
  object-position: centerss;
}

.recent h2 {
  color: var(--Soft-red);
  font-weight: 800;
}

.recent:hover {
  color: var(--Soft-red);
  cursor: pointer;
}

@media (width <= 600px) {
  .hideNavLinks {
    display: none;
  }
}

@media (width > 600px) {
  body {
    /* padding-inline: 5rem; */
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  header {
    width: 90%;
    padding: 0;
  }

  nav li:nth-child(6) a {
    margin-right: 0;
  }

  nav li:nth-child(1) a {
    margin-left: 0;
  }

  .main-section {
    max-width: 90%;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-span-2 {
    grid-column: 1 / 3;
    grid-row: 1 / 3;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .new-section-span {
    grid-column: 3 / 4;
    grid-row: 1 / 3;

    margin-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .new-section-span div {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* align-items: stretch; */
  }

  .new-section-span h2 {
    font-size: 1.6rem;
  }

  .new-section-span article h3 {
    font-size: 1.1rem;
  }

  .new-section-span article p {
    font-size: 14px;
  }

  .recent-section-span {
    grid-column: 1 / 4;
    grid-row: 3 / 4;

    margin-top: 2rem;
  }

  .hideOpenSidebar {
    display: none;
  }

  .sidebar {
    display: none;
  }

  .overlay {
    display: none;
  }

  figure .hero-img {
    display: none;
  }

  figure .desktop {
    display: block;
    height: 250px;
  }

  .hero-section > div {
    display: flex;
    column-gap: 2rem;
  }

  .hero-section div article {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: space-between;
  }

  .recent-section {
    flex-direction: row;
    justify-content: space-between;
    column-gap: 1rem;
  }

  .recent article {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
  }

  .recent article p {
    margin-top: 0.5rem;
    font-size: 12px;
  }

  .recent article h3 {
    font-size: var(--Font-size);
  }
}
