@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,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Poppins;
}
/* NavBar */
.nav-bar {
  display: flex;
  align-items: center;
  padding: 20px 100px;
  background-color: #1d1d1d;
  justify-content: space-between;
  color: white;
}
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  color: white;
  text-decoration: none;
}
.nav-logo h1 {
  font-weight: 500;
}

/* hero section  */
.hero {
  padding: 60px 100px;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  margin: 0;
  height: 600px;
}
.headlines {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  height: 100%;
}
.hero-image {
  flex: 1;
  height: 100%;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}
.headlines h1 {
  font-size: 24px;
  font-weight: 500;
}
.headlines-button {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.hero-btn {
  border: none;
  padding: 0.5rem 1.5rem;
  background-color: #1d1d1d;
  color: white;
  border-radius: 6px;
}

/* article section */
.articles {
  background: #f5f5f5;
  width: 100%;
  padding: 6rem 0;
}
.article-container {
  padding: 3rem 4rem;
  max-width: 1500px;
}
.articles h2 {
  font-weight: 500;
  margin-bottom: 1rem;
}
.articles p {
  color: #666666;
  margin-bottom: 1rem;
}
/* .card-container{
    display: flex;
    justify-content: space-between;
    gap: 2rem;
} */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.latest-cards {
  height: 500px;
  border-radius: 8px;
  box-shadow: none;
  background: #fff;
  overflow: hidden;
  margin: 0 auto;
}
.latest-cards img {
  width: 100%;
  height: 250px;
  margin-bottom: 1rem;
  object-fit: cover;
}
.latest-cards h2 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: #1d1d1d;
}
.content {
  padding-left: 1.5rem;
}
.latest-cards p {
  color: #666;
  margin-bottom: 1rem;
}
.latest-cards a {
  text-decoration: none;
  color: #1d1d1d;
}

/* Hot news section  */

.hot {
  background: #1d1d1d;
  color: #fff;
  padding: 6rem;
}
.hot-title {
  margin-bottom: 1rem;
}
.hot-subtitle {
  margin-bottom: 2rem;
  color: #666;
}
.hot-right {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}
.hot-flex {
  display: flex;
  gap: 1rem;
  height: 600px;
  width: 100%;
  justify-content: center;
}
.hot-card {
  background-color: #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}
.hot-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hot-right-inner {
  display: flex;
  gap: 0.5rem;
  height: 50%;
}
.hot-right-inner article {
  flex: 0 0 50%;
}
.hot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1rem;
  height: 600px;
}
.hot-grid-1 {
  grid-column: span 2;
  grid-row: span 2;
}
.hot-grid-2 {
  grid-column: span 1;
  grid-row: span 1;
}
.hot-grid-3 {
  grid-column: span 1;
  grid-row: span 1;
}
.hot-grid-4 {
  grid-column: span 2;
  grid-row: span 1;
}

/* Masnory layout  */

.masonry {
  background-color: #fff;
  padding: 4rem 3rem;
}
.container h2 {
  margin-bottom: 1rem;
}
.masonry-subtitle {
  margin-bottom: 2rem;
  color: #666;
}
.masonry-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(3, 200px);
  max-width: none;
  margin: 0 auto;
}
.masonry-item {
  background: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
}
.masonry-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.item1 {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}
.item2 {
  grid-column: 2 / 4;
  grid-row: 1 / 3;
}
.item3 {
  grid-column: 4/ 5;
  grid-row: 1 / 2;
}
.item4 {
  grid-column: 5 / 6;
  grid-row: 1 / 2;
}
.item5 {
  grid-column: 4/ 6;
  grid-row: 2 / 3;
}
.item6 {
  grid-column: 1 / span 4;
  grid-row: span 1;
}
.item7 {
  grid-column: span 1;
  grid-row: span 1;
}

/* Gallery grid */

.gallery {
  padding: 4rem 4rem;
}
.gallery-subtitle {
  margin-bottom: 2rem;
  color: #666;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}
.gallery-item {
  background: #e0e0e0;
  border-radius: 8px;
  font-size: 24px;
  color: #666;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 150px);
  gap: 1rem;
  max-width: none;
  margin: 0 auto;
  grid-template-areas:
    "a b b c d"
    "e e f c g"
    "e e h h m"
    "i k h h m"
    "j k l n n";
}
.a {
  grid-area: a;
}
.b {
  grid-area: b;
}
.c {
  grid-area: c;
}
.d {
  grid-area: d;
}
.e {
  grid-area: e;
}
.f {
  grid-area: f;
}
.g {
  grid-area: g;
}
.h {
  grid-area: h;
}
.i {
  grid-area: i;
}
.j {
  grid-area: j;
}
.k {
  grid-area: k;
}
.l {
  grid-area: l;
}
.m {
  grid-area: m;
}
.n {
  grid-area: n;
}

/* copyright footer */

footer {
  text-align: center;
  padding: 2rem;
  background-color: #1d1d1d;
  color: #f5f5f5;
}
.hot-card {
  position: relative;
}
.hot-overlay {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.597);
  bottom: 0;
  width: 100%;
  padding: 1rem 2rem;
  font-weight: 600;
}

.masonry-item {
  position: relative;
}
.masonry-item::before {
  content: "";
  top: 0;
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.778);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.masonry-item::after {
  content: "View Story";
  text-align: center;
  color: white;
  font-size: 1.4rem;
  font-weight: 600;
  position: absolute;

  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.masonry-item:hover::before,
.masonry-item:hover::after {
  opacity: 1;
}

/* responsive media queries  */
@media screen and (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-bar {
    justify-content: center;
  }
  .hero {
    flex-direction: column;
    height: auto;
    gap: 2rem;
  }
  .masonry-grid {
    display: block;
  }
  .masonry-item {
    margin-bottom: 1rem;
    height: 300px;
  }
  .gallery-grid {
    display: block;
  }
  .gallery-item {
    margin-bottom: 1rem;
    height: 300px;
  }
}
