:root {
  --color-accent: hsl(244, 80%, 60%);
}

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

body {
  max-width: 1280px;
  margin: 16px auto;
  padding: 0 16px 0 16px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 2;
  text-align: justify;
}

h1,
h2,
h3 {
  font-weight: 700;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

footer {
  margin-top: 72px;
}

/* Header */
.header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  padding-bottom: 16px;
}

.header a {
  color: #000;
}

.logo-navbar {
  display: flex;
  align-items: center;
  column-gap: 48px;
}

.desktop-logo,
.mobile-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent) !important;
}

.desktop-logo i,
.mobile-logo i {
  padding-top: 2px;
}

.header-navbar {
  display: flex;
  column-gap: 32px;
  z-index: 1000;
}

.header-navbar a:hover,
.header-navbar a.active {
  color: var(--color-accent);
  text-decoration: underline 2px;
  text-underline-offset: 8px;
}

.header-navbar-animation {
  transition: all 600ms ease;
}

.mobile-logo-close-btn {
  display: none;
}

.account-search-btns {
  display: flex;
  align-items: center;
  column-gap: 12px;
}

.search {
  position: relative;
}

.search input {
  width: 192px;
  padding: 2px 16px;
  border: 1px solid #000;
  border-radius: 100px;
  outline: none;
  transition: all 300ms ease;
}

.search input::placeholder {
  color: #aaa;
}

.search button {
  position: absolute;
  top: 4px;
  left: 8px;
  color: #000;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger-menu-icon {
  display: none;
}

/* Main */
/* Banner */
.banners-container {
  display: flex;
  column-gap: 16px;
  height: 640px;
}

.banner {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: none;
}

.active-banner {
  width: 100%;
  border-radius: 32px;
}

.deactive-banner {
  width: 10%;
  border-radius: 16px;
}

.banner-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px 32px;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: #fff;
  transition: all 300ms ease;
}

.banner-text {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  column-gap: 48px;
}

.link-arrow,
.article-link-arrow {
  transform: rotate(45deg);
}

.banner-article-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
}

.author-date {
  display: flex;
  align-self: self-start;
  column-gap: 32px;
}

.article-author,
.article-date {
  display: flex;
  column-gap: 8px;
  font-weight: 100;
}
.article-author img,
.article-info img {
  width: 32px;
  height: 32px !important;
  border-radius: 100%;
  object-fit: cover;
}

.article-date-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #fff;
  border-radius: 100%;
}

.banner-article-tags {
  display: flex;
  align-self: self-end;
  column-gap: 12px;
}

.banner-article-tag {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 64px;
  padding: 8px 16px;
  border: 1px solid #fff;
  border-radius: 100px;
  font-size: 12px;
}

.banner-animation {
  transition: all 300ms ease;
}

.hide a {
  bottom: -1600px;
}

/* Blog post filters section */
.new-section {
  margin-top: 72px;
}

.filters-header {
  display: flex;
  justify-content: space-between;
  column-gap: 32px;
}

.filters-container {
  width: 100%;
  margin-top: 8px;
}

.filter-titles {
  display: flex;
  column-gap: 48px;
  overflow-x: scroll;
  color: #aaa;
  cursor: pointer;
  scrollbar-width: none;
  height: 35px;
}

.active-filter {
  color: #000;
  text-decoration: underline 2px;
  text-underline-offset: 12px;
}

.desktop-read-all-btn {
  display: flex;
}

.mobile-read-all-btn {
  display: none;
}

.desktop-read-all-btn,
.mobile-read-all-btn {
  align-items: center;
  column-gap: 8px;
  flex-shrink: 0;
  padding: 6px 20px;
  border-radius: 100px;
  background: var(--color-accent);
  color: #fff;
}

.separator {
  width: 100%;
  height: 1px;
  background-color: #ddd;
}

.articles-container {
  display: flex;
  column-gap: 32px;
  row-gap: 24px;
  margin-top: 48px;
}

.article-container {
  flex: 1;
}

.article-container img {
  max-width: 100%;
  height: 224px;
  border-radius: 24px;
  object-fit: cover;
}

.article-tag {
  display: inline-block;
  min-width: 48px;
  margin-left: 4px;
  padding: 2px 12px;
  border-radius: 100px;
  color: var(--color-accent) !important;
  background: rgba(82, 71, 235, 0.1);
  font-size: 12px;
  text-align: center;
}

.article-container a {
  color: #000;
}

.article-container p,
.article-container h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-container h3 {
  -webkit-line-clamp: 1;
}

.article-container p {
  -webkit-line-clamp: 2;
  color: #707070;
}

.article-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.article-info-img-author {
  display: flex;
  align-items: center;
  column-gap: 8px;
}

.article-info span {
  display: block;
  margin-top: -6px;
  min-width: 128px;
  font-weight: 100;
}

.article-info span:nth-of-type(2) {
  margin-top: -6px;
  font-size: 12px;
  color: #707070;
}

.not-visible {
  display: none;
}

.footer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.social-media-icons {
  display: flex;
  column-gap: 16px;
}

.social-media-icons a,
.copyright-text {
  color: #aaa;
}

.copyright-text {
  font-size: 12px;
}

/* Responsiveness styles */
/* Breakpoint: 1024px */
@media (max-width: 1024px) {
  .desktop-logo {
    display: none;
  }

  .header-navbar {
    position: absolute;
    flex-direction: column;
    row-gap: 16px;
    top: 0;
    right: -320px;
    padding: 12px 24px;
    width: 288px;
    height: 100dvh;
    background: #fff;
    box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.1);
  }

  .header-navbar a:hover,
  .header-navbar a.active {
    text-decoration: none;
    border-right: 2px solid var(--color-accent);
    padding-right: 8px;
  }

  .mobile-logo-close-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
  }

  .search input {
    width: 144px;
  }

  .hamburger-menu-icon {
    display: block;
  }

  .banners-container {
    flex-direction: column;
    row-gap: 16px;
    height: 800px;
  }

  .active-banner {
    height: 100%;
  }

  .deactive-banner {
    width: 100%;
    height: 10%;
  }

  .desktop-read-all-btn {
    display: none;
  }

  .mobile-read-all-btn {
    display: flex;
    justify-content: center;
    margin-top: 16px;
  }

  .articles-container {
    flex-direction: column;
  }

  .mobile-article-container {
    display: flex;
    column-gap: 32px;
  }

  .mobile-article-container a {
    flex-shrink: 0;
  }
}

/* Breakpoint: 768px */
@media (max-width: 768px) {
  .banner-article-info {
    flex-direction: column;
    row-gap: 16px;
  }

  .articles-container {
    row-gap: 48px;
  }

  .article-container img {
    width: 100%;
    height: 320px;
  }

  .mobile-article-container {
    flex-direction: column;
  }
}

/* Breakpoint: 480px */
@media (max-width: 480px) {
  .link-arrow {
    display: none;
  }

  .author-date,
  .banner-article-tags {
    align-self: center;
  }

  .footer-info {
    flex-direction: column !important;
    row-gap: 8px;
  }
}

/* Breakpoint: 400px */
@media (max-width: 400px) {
  .banner-article-info {
    display: none;
  }
}
