/*------------------------- Global Styles ---------------------------- */

h1#website-title {
  font-family: "Montserrat", sans-serif;
  color: rgb(126 126 126);
  font-size: 3.2rem;
  font-weight: 700;
  text-decoration: none;
}

h2,
h3,
h4,
h5,
h6 {
  font-family: "Work Sans";
  line-height: 1.4;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 2.1rem;
}

h4 {
  font-size: 1.9rem;
}

h5 {
  font-size: 1.6rem;
  font-weight: 500;
}

body {
  font-family: "Poppins";
  font-size: 1.6rem;
  font-weight: 400;
  color: rgb(51 51 51);
}

a {
  text-decoration: inherit;
  color: inherit;
}

/*------------------------- Main ------------------------------ */

main {
  display: flex;
  flex-direction: column;
  max-width: 1260px;
  margin: 40px auto 60px;
  row-gap: 40px;
}

/*------------------------- Hero Section ---------------------------- */

.hero-section-background {
  background-size: cover;
  background-color: darkgray;
  margin: 10px auto;
  border-radius: 10px;
  overflow: hidden;
  width: min(100%, 1160px);
}

.blurred-overlay {
  backdrop-filter: blur(50px);
  width: 100%;
  height: 100%;
}

.hero-section {
  margin: 0 auto;
  color: white;
  background-color: rgb(0 0 0 / 43%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  row-gap: 30px;
  padding: max(20px, 2vw);
  overflow: hidden;
  width: min(100%, 900px);
}

.hero-section h2 {
  max-width: 600px;
}

.hero-section h2:hover {
  text-decoration: underline;
  text-decoration-color: var(--impact-color);
}

.hero-section > .hero-image {
  align-self: center;
}

.hero-image > img {
  max-width: min(100%, 3600px);
  height: auto;
  display: block;
  margin: 0 auto;
}

.hero-section > .imp {
  background: var(--impact-color);
}

.hero-section > .btn {
  display: none;
  text-decoration: none;
}

/*------------------------- Recent ---------------------------- */

.recent {
  padding: 0 clamp(10px, calc((100vw - 240px) * 0.125), 30px);
  display: grid;
  gap: 20px;
  width: 100%;
  margin: 0 auto;
}

.recent h3 {
  font-weight: 600;
}

.recent-articles {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  justify-content: space-around;
  margin: 0 auto;
  gap: 80px 60px;
}

.card {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  gap: 25px;
  position: relative;
  padding-bottom: 20px;
  overflow: hidden;
}

.card .imp {
  position: absolute;
  top: 10px;
  right: 10px;
}

.card img {
  max-width: 100%;
  height: auto;
  border-radius: 10px 10px 0 0;
  display: block;
}

.card h4,
.card p {
  padding: 0 20px;
}

.card a:hover {
  text-decoration: underline;
}

/* ------------------- Advertisement ------------------- */

.advertisement-section {
  margin: min(2.5vw, 30px) auto;
  padding: 16px;
  display: flex;
  justify-content: center;
  position: relative;
  background-color: rgb(237 237 237);
  width: min(100%, 1040px);
}

.advertisement-section img {
  width: 100%;
  max-width: 728px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.advertisement-section a {
  position: absolute;
  right: 0;
  top: 0;
}

.advertisement-section span {
  font-size: 1.6rem;
  color: var(--btn-color);
}

/*--------------------------- News ------------------------------------- */

.news {
  padding: 0 20px;
  width: min(100%, 1040px);
  margin: 0 auto;
}

.news h3 {
  grid-area: 1/1/2/2;
  margin-bottom: 20px;
}

.news-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.featured-news {
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  aspect-ratio: 1.33;
}

.news a:hover {
  text-decoration: underline;
}

.featured-news .content {
  grid-area: 1 / 1 / 2 / 2;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 20px;
  color: white;
  background-color: rgb(0 0 0 / 58%);
  z-index: 6;
  align-self: end;
  row-gap: 16px;
}

.featured-news .image {
  grid-area: 1 / 1 / 2 / 2;
  position: relative;
  background-color: black;
}

.featured-news .image img {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
}

.featured-news .imp {
  position: absolute;
  top: 10px;
  right: 10px;
}

.news-list {
  min-width: 200px;
  min-height: 0; /* Necessary for the auto scrolling to work */
  max-height: 350px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 20px;
  overflow-y: auto;
}

.news-item {
  border-bottom: 1px solid rgb(195 195 195);
  padding: 0 5px 5px;
}

/* ------------------------- Explore Button ---------------------------- */

.explore {
  padding: 20px 30px;
  text-align: right;

  .explore-btn {
    clip-path: polygon(0% 0%, 97% 0%, 100% 47.5%, 100% 50%, 100% 52.5%, 97% 100%, 0% 100%);
  }
}

/*------------------------- Media Queries ----------------------------- */
@media only screen and (min-width: 660px) {
  .news-wrapper {
    grid-template-columns: 2fr 1fr;
  }

  .featured-news {
    aspect-ratio: unset;
  }
}
