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

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.6;
}

.container {
  background: #060e0f;
  color: aliceblue;
  padding: 2rem;
}

/* Navbar Styling */
nav {
  display: flex;
  justify-content: center;
  align-items: center;
}

nav a {
  margin: auto 3rem;
  text-decoration: none;
  color: aliceblue;
  font-size: larger;
}

nav a:hover {
  color: #1e86ec;
}

/* Hero Section Styling */
.hero-section {
  display: grid;
  justify-content: center;
  align-items: center;
}

.img {
  text-align: center;
}

.img img {
  max-width: 100%;
  height: auto;
}

.headline {
  text-align: center;
  max-width: 60vw;
  font-size: x-large;
  margin: 1rem auto;
}

form {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

form input {
  width: 50%;
  padding: 0.5rem;
}

#Sub {
  padding: 0.5rem 0.8rem;
  background: #1eec58;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  color: aliceblue;
  font-size: medium;
  cursor: pointer;
}

#Sub:hover {
  background: #097526;
}

/* Recent Articles Styling */
.recent-container {
  background: #0b181a;
  margin: 0;
  padding: 2rem 0;
}

.recent-container h2 {
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 3rem;
  color: aliceblue;
  padding-top: 2rem;
}

.recent-articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  gap: 0.5rem;
  padding: 2rem;
}

.recents {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  width: 20vw;
  background: #141617;
  border-radius: 2%;
  transition: box-shadow 0.3s ease-in-out, transform 0.3s ease;
}

.recents img {
  width: 100%;
  max-height: 675px;
  object-fit: cover;
  box-shadow: 0 0 5px aliceblue;
}

.recents p {
  width: 100%;
  color: aliceblue;
  font-size: 1.5rem;
  padding: 0.7em;
}

.recents:hover {
  box-shadow: 1px 1px 4px #1e86ec;
  transform: scale(1.04);
}

/* Articles Section Styling */
.articles ul {
  list-style-type: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.articles ul li {
  margin: 3rem;
  max-width: 60vw;
  padding: 1em;
  cursor: pointer;
}

.articles ul li p {
  margin: 1.5rem 0;
  margin-bottom: 0;
}

.articles ul li h2 {
  color: #489cf0;
}

.articles ul li h2:hover {
  color: #0e77e1;
  text-decoration: underline;
}

/* FAQ Section Styling */
.faq-container {
  background: #0b181a;
  color: aliceblue;
  padding: 2rem;
}

.faq-container h2 {
  padding: 1rem 0;
  font-size: 2rem;
}

.faq-table {
  width: 100%;
  border-collapse: collapse;
}

.faq-table th,
.faq-table td {
  border: 1px solid #1e86ec;
  padding: 1rem;
  text-align: left;
}

.faq-table th {
  background-color: #141617;
  color: #489cf0;
}

.faq-table td {
  background-color: #141617;
}

.faq-table tr:hover {
  background-color: #1e1e1e;
}

/* Footer Styling */
footer {
  background: #060e0f;
  color: aliceblue;
  padding: 2rem 0;
  text-align: center;
}

.footer-content {
  max-width: 60vw;
  margin: 0 auto;
}

.footer-content p {
  margin: 1rem 0;
}

.footer-content a {
  color: #1e86ec;
  text-decoration: none;
}

.footer-content a:hover {
  color: #0e77e1;
  text-decoration: underline;
}

/* Media Queries for Responsiveness */
@media screen and (max-width: 1024px) {
  .recent-articles {
    grid-template-columns: repeat(2, 1fr);
  }

  .recents {
    width: 40vw;
  }
}

@media screen and (max-width: 768px) {
  nav {
    flex-direction: column;
  }

  nav a {
    margin: 0.5rem;
  }

  .headline {
    max-width: 90vw;
    font-size: large;
  }

  form {
    flex-direction: column;
    padding: 1rem;
  }

  form input {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  #Sub {
    width: 100%;
  }

  .recent-articles {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .recents {
    width: 80vw;
  }

  .articles ul li {
    max-width: 90vw;
    margin: 1.5rem;
  }

  .faq-table {
    font-size: 0.9rem;
  }

  .footer-content {
    max-width: 90vw;
  }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 1rem;
  }

  .headline {
    font-size: medium;
  }

  .recent-container h2 {
    font-size: 2rem;
  }

  .recents p {
    font-size: 1.2rem;
  }

  .articles ul li h2 {
    font-size: 1.2rem;
  }

  .faq-table {
    font-size: 0.8rem;
  }

  .faq-table th,
  .faq-table td {
    padding: 0.5rem;
  }
}