/* Category Latest Post component */
.category-latest-posts-section {
  width: 100%;
}

.category-latest-post {
  display: flex;
  width: 100%;
  align-items: stretch;
}

.category-latest-post__image,
.category-latest-post__content {
  box-sizing: border-box;
}

.category-latest-post__image {
  overflow: hidden;
  flex-shrink: 0;
}

.category-latest-post__image a {
  display: block;
  height: 100%;
  min-height: 100%;
}

.category-latest-post__image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.category-latest-post__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 48px;
  flex-shrink: 0;
}

.category-latest-post__category {
  display: block;
  color: var(--voicey-el-category, var(--voicey-purple-dark, #680fa7));
  font-family: var(--voicey-font-funnel, "Funnel Sans", sans-serif);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.category-latest-post__title {
  margin: 0 0 20px;
  font-family: var(--voicey-font-playfair, "Playfair Display", Georgia, serif);
  font-weight: 700;
  line-height: 1.15;
  font-size: clamp(32px, 4vw, 48px);
  color: var(--voicey-el-text, #000);
}

.category-latest-post__title a {
  color: inherit;
  text-decoration: none;
}

.category-latest-post__title a:hover,
.category-latest-post__title a:focus-visible {
  text-decoration: underline;
}

.category-latest-post__description {
  margin: 0 0 28px;
  font-family: var(--voicey-font-helvetica, "Helvetica Neue", Helvetica, Arial, sans-serif);
  font-weight: 300;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.35;
  color: var(--voicey-el-text-muted, #000);
}

.category-latest-post__read-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  background: var(--voicey-el-btn-bg, var(--voicey-lavender));
  color: var(--voicey-el-btn-text, #000);
  padding: 10px 24px;
  font-family: var(--voicey-font-funnel, "Funnel Sans", sans-serif);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  text-decoration: none;
  border: none;
  border-radius: 0;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.category-latest-post__read-more:hover,
.category-latest-post__read-more:focus-visible {
  background: var(--voicey-el-btn-hover-bg, var(--voicey-purple));
  color: var(--voicey-el-btn-hover-text, #fff);
  text-decoration: none;
  transform: translateY(-1px);
}

.category-latest-post--image-right {
  flex-direction: row-reverse;
}

/* ── Left image layout ── */
.category-latest-post--image-left .category-latest-post__image {
  padding-right: 0;
}

.category-latest-post--image-left .category-latest-post__image img {
  border-radius: 0;
  min-height: 380px;
}

/* ── Right image layout (mockup) ── */
.category-latest-post--image-right .category-latest-post__image {
  padding-left: 0;
}

.category-latest-post--image-right .category-latest-post__image img {
  border-radius: 0;
  min-height: 380px;
}

/* Shared centered content for both layouts */
.category-latest-post--image-left .category-latest-post__content,
.category-latest-post--image-right .category-latest-post__content {
  text-align: center;
  align-items: center;
  padding: 40px 48px;
}

.category-latest-post--image-left .category-latest-post__read-more,
.category-latest-post--image-right .category-latest-post__read-more {
  align-self: center;
}

/* Right layout uses a slightly larger headline in the mockup */
.category-latest-post--image-right .category-latest-post__title {
  font-size: clamp(36px, 4.5vw, 50px);
  line-height: 1.1;
}

.category-latest-post--image-left .category-latest-post__title {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
}

@media (max-width: 768px) {
  .category-latest-post,
  .category-latest-post--image-left {
    flex-direction: column;
  }

  .category-latest-post--image-right {
    flex-direction: column-reverse;
  }

  .category-latest-post__image,
  .category-latest-post__content {
    width: 100% !important;
    flex-basis: auto !important;
    max-width: 100%;
  }

  .category-latest-post--image-left .category-latest-post__image,
  .category-latest-post--image-right .category-latest-post__image {
    padding-left: 0;
    padding-right: 0;
  }

  .category-latest-post__image img,
  .category-latest-post--image-left .category-latest-post__image img,
  .category-latest-post--image-right .category-latest-post__image img {
    width: 100%;
    height: auto;
    min-height: 240px;
  }

  .category-latest-post__content,
  .category-latest-post--image-left .category-latest-post__content,
  .category-latest-post--image-right .category-latest-post__content {
    padding: 24px 20px;
    text-align: center;
    align-items: center;
  }

  .category-latest-post__category {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .category-latest-post__title,
  .category-latest-post--image-right .category-latest-post__title {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 14px;
  }

  .category-latest-post__description {
    font-size: 16px;
    line-height: 1.35;
    margin-bottom: 20px;
  }

  .category-latest-post__read-more {
    font-size: 18px;
    padding: 10px 20px;
  }
}

/* Dark theme */
body.voicey-theme-dark {
  --voicey-el-text: #fff;
  --voicey-el-text-muted: #e8e8e8;
  --voicey-el-category: #c9a8e8;
  --voicey-el-btn-bg: #a97ae6;
  --voicey-el-btn-text: #111;
  --voicey-el-btn-hover-bg: #6d0aff;
  --voicey-el-btn-hover-text: #fff;
}

body.voicey-theme-dark .category-latest-post__title,
body.voicey-theme-dark .category-latest-post__title a {
  color: var(--voicey-el-text) !important;
}

body.voicey-theme-dark .category-latest-post__description {
  color: var(--voicey-el-text-muted) !important;
}

body.voicey-theme-dark .category-latest-post__category {
  color: var(--voicey-el-category) !important;
}

body.voicey-theme-dark .category-latest-post__read-more {
  background: var(--voicey-el-btn-bg) !important;
  color: var(--voicey-el-btn-text) !important;
}

body.voicey-theme-dark .category-latest-post__read-more:hover,
body.voicey-theme-dark .category-latest-post__read-more:focus-visible {
  background: var(--voicey-el-btn-hover-bg) !important;
  color: var(--voicey-el-btn-hover-text) !important;
}
