:root {
  --highli: #f3f3f5;
  --text: #3e3e3e;
  --muted: #616162;
  --accent: #cbb162;
  --white: #ffffff;
}

.aem-blog-grid {
  max-width: 1360px;
  margin: 0 auto;
}

.aem-blog-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.aem-blog-switcher__link {
  padding: 8px 16px;
  border: 1px solid var(--text);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s ease;
  background: var(--white);
}

.aem-blog-switcher__link:hover {
  border-color: var(--accent);
  color: var(--text);
}

.aem-blog-switcher__link.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.aem-blog-hero {
  position: relative;
  min-height: 500px;
  background-size: cover;
  background-position: center;
  background-color: var(--highli);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 48px;
}

.aem-blog-hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* background: linear-gradient(360deg, rgba(0, 0, 0, 0.8) 0%, rgba(255, 255, 255, 0) 71%); */
  background: linear-gradient(360deg, rgba(0, 0, 0, 0.8) 0%, rgba(255, 255, 255, 0) 120%);
}

.aem-blog-hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 40px 48px 40px;
  max-width: 800px;
  width: 100%;
}

.aem-blog-hero__title {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 16px 0;
  line-height: 1.1;
}

.aem-blog-hero__excerpt {
  font-size: 16px;
  color: var(--white);
  margin: 0 0 20px 0;
  line-height: 1.6;
  opacity: 0.95;
}

.aem-blog-hero__meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.aem-blog-hero__meta .aem-blog-meta__item {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
}

.aem-blog-hero__meta .aem-blog-meta__dot {
  background-color: var(--accent);
}

.aem-blog-hero__btn {
  display: inline-block;
  padding: 12px 24px;
  border: 1px solid var(--white);
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.3s ease;
  background: transparent;
}

.aem-blog-hero__btn:hover {
  background-color: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.aem-blog-grid__cards {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.aem-blog-card {
  display: flex;
  gap: 0;
  background: var(--white);
  /* removed border-radius from container */
  overflow: hidden;
}

.aem-blog-card__image-wrapper {
  flex: 0 0 50%;
  width: 50%;
  min-height: 280px;
  overflow: hidden;
}

.aem-blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* added 9px border-radius to image */
  border-radius: 9px;
}

.aem-blog-card__content {
  flex: 0 0 50%;
  width: 50%;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.aem-blog-card__title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.aem-blog-card__meta {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.aem-blog-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--muted);
}

.aem-blog-meta__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
  flex-shrink: 0;
}

.aem-blog-card__excerpt {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 24px 0;
  line-height: 1.7;
}

.aem-blog-card__btn {
  display: inline-block;
  width: fit-content;
  padding: 12px 24px;
  border: 1px solid var(--text);
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.3s ease;
  background: transparent;
}

.aem-blog-card__btn:hover {
  background-color: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.aem-blog-grid__empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 1rem;
}

@media (max-width: 768px) {
  .aem-blog-hero {
    min-height: 400px;
  }

  .aem-blog-hero__title {
    font-size: 1.75rem;
  }

  .aem-blog-hero__content {
    padding: 30px 24px 36px 24px; /* Updated */
  }

  .aem-blog-card {
    flex-direction: column;
  }

  .aem-blog-card__image-wrapper {
    flex: none;
    width: 100%;
    /* min-height: 220px; */
    min-height: 190px;
    max-height: 260px;
  }

  .aem-blog-card__content {
    flex: none;
    width: 100%;
    padding: 24px 24px 24px 0px;
  }

  .aem-blog-card__title {
    font-size: 1.25rem;
  }
}
