* {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
}
body {
  min-height: 100vh;
  margin: 0 100px;
  background-color: hsl(36, 100%, 99%);
}
.nav-bar {
  display: flex;
  justify-content: space-between;
  min-height: 70px;
  align-items: center;
  padding: 0px 25px;
}
.nav-item {
  list-style: none;
}
a {
  color: hsl(236, 13%, 42%);
  text-decoration: none;
  transition: all 0.3s ease-in;
}
a:hover {
  color: hsl(5, 85%, 63%);
}
.nav-menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 60px;
}

.Hamberger {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 22px;
  z-index: 1001;
}
.bar {
  display: block;
  width: 30px;
  background-color: hsl(240, 100%, 5%);
  height: 3px;
  margin: 5px auto;
  -webkit-transition: transform 0.3s ease, opacity 0.3s ease;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.upper-section {
  display: flex;
  gap: 30px;
  margin: 30px;
}

/* Left section */
.left-sec {
  flex: 3; /* takes more space */
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-img {
  width: 100%;
  height: auto;
}

.text {
  display: flex;
  gap: 30px;
}

.left-sec h1 {
  font-size: 2.5rem;
  font-weight: 800;
  flex: 1.5; /* allow text to take space */
  line-height: 1.1;
}

.info {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.text p {
  color: hsl(236, 13%, 42%);
  line-height: 1.6;
}

button {
  width: fit-content;
  padding: 12px 20px;
  color: hsl(36, 100%, 99%);
  background-color: hsl(5, 85%, 63%);
  border: none;
  font-weight: 600;
  transition: 0.3s ease-in;
  text-transform: uppercase;
  letter-spacing: 1px;
}

button:hover {
  background-color: hsl(240, 100%, 5%);
  color: hsl(36, 100%, 99%);
}

/* Right section */
.right-sec {
  flex: 1;
  background-color: hsl(240, 100%, 5%);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.right-sec h2 {
  color: hsl(35, 77%, 62%);
}

.news a {
  color: hsl(36, 100%, 99%);
  transition: all 0.3s ease-in-out;
}
.news a:hover {
  color: hsl(35, 77%, 62%);
}
.news p {
  color: hsl(233, 8%, 79%);
}
.line {
  display: inline-block;
  width: 95%;
  background-color: hsl(236, 13%, 42%);
  height: 1px;
  margin: 20px 0;
}
.lower-sec {
  display: flex;
  margin: 50px 30px;
  gap: 30px;
  flex-wrap: wrap; /* allow wrapping */
}

.article {
  display: flex;
  flex: 1; /* each takes equal space */
  gap: 20px;
  min-width: 280px; /* prevents squishing too much */
}

.article img {
  width: 100px; /* fixed base width */
  height: auto;
  object-fit: cover;
}

.article-text {
  display: flex;
  flex-direction: column;
  flex: 1; /* take remaining space */
  gap: 5px;
}

.article-text h3 {
  color: hsl(5, 85%, 63%);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.article-text a {
  color: hsl(240, 100%, 5%);
  transition: all 0.3s ease-in-out;
  font-weight: 800;
}

.article-text a:hover {
  color: hsl(5, 85%, 63%);
}

/* Tablet breakpoint */
@media (max-width: 960px) {
  body {
    margin: 0 20px;
  }
  .upper-section {
    flex-direction: column;
    gap: 40px;
  }

  .text {
    flex-direction: column;
  }

  .left-sec h1 {
    font-size: 2rem;
  }

  button {
    width: 50%; /* mobile-friendly button */
    text-align: center;
  }
  .article img {
    max-width: 30%;
  }
  .lower-sec {
    flex-direction: column;
  }

  .article img {
    width: 120px;
  }
}

@media (max-width: 410px) {
  .article img {
    flex: 1;
  }
}

@media (max-width: 728px) {
  body {
    margin: 0 5px;
  }
  .Hamberger {
    display: block;
  }
  .Hamberger.active .bar:nth-child(2) {
    opacity: 0;
  }
  .Hamberger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .Hamberger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    width: 100%;
    text-align: center;
    padding: 15px 0;
    transition: 0.3s;
  }
  .nav-menu.active {
    left: 0;
    background-color: rgb(104, 99, 99);
    background-color: hsl(36, 100%, 99%);
  }
}

/* Mobile breakpoint */
@media (max-width: 600px) {
  .upper-section {
    margin: 20px 0;
    gap: 20px;
  }

  .left-sec h1 {
    font-size: 1.8rem;
  }
}

/* Mobile breakpoint */
@media (max-width: 480px) {
  .article {
    gap: 15px;
  }
  .article img {
    width: 35%;
  }
  .article-text {
    flex: 1;
  }
}

@media (max-width: 330px) {
  body {
    margin: 0;
  }
  .article {
    flex-direction: column;
    align-items: center;
  }

  .article img {
    width: 90%;
  }
  .article-text {
    width: 90%;
    text-align: center;
  }
}
