/* =========================================
   Category / Archive pages — Kategorieseiten Redesign v3
   ========================================= */

/* -----------------------------------------
   1. Remove breadcrumb on archive pages
   ----------------------------------------- */
body.archive .mh-breadcrumb,
body.category .mh-breadcrumb {
  display: none;
}

/* -----------------------------------------
   2. Category heading — remove grey background
   ----------------------------------------- */
body.archive .mh-section-title,
body.category .mh-section-title,
body.archive h1.mh-section-title,
body.category h1.mh-section-title,
body.archive .mh-content h1,
body.category .mh-content h1,
body.archive .mh-loop h1,
body.category .mh-loop h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 25px 0;
  padding: 0 0 15px 0;
  border-bottom: 1px solid #000;
  background: none;
  background-color: transparent;
  text-transform: none;
  letter-spacing: -0.5px;
}

/* Strip grey wrapper containers */
body.archive .mh-title-wrap,
body.category .mh-title-wrap,
body.archive .mh-archive-header,
body.category .mh-archive-header,
body.archive .mh-section-title-wrap,
body.category .mh-section-title-wrap,
body.archive .mh-content > div:first-child,
body.category .mh-content > div:first-child {
  background: none;
  background-color: transparent;
  padding: 0;
  margin: 0 0 25px 0;
  border: none;
}

/* Remove pseudo-element decorations */
body.archive .mh-section-title::before,
body.archive .mh-section-title::after,
body.category .mh-section-title::before,
body.category .mh-section-title::after,
body.archive .mh-title-wrap::before,
body.archive .mh-title-wrap::after,
body.category .mh-title-wrap::before,
body.category .mh-title-wrap::after {
  display: none;
  content: none;
}

/* -----------------------------------------
   3. Content / sidebar spacing
   ----------------------------------------- */
body.archive .mh-content,
body.category .mh-content {
  padding-right: 40px;
}

body.archive .mh-sidebar,
body.category .mh-sidebar {
  padding-left: 20px;
}

/* -----------------------------------------
   4. Article list layout
   ----------------------------------------- */
body.archive .mh-posts-list-item,
body.category .mh-posts-list-item {
  display: flex;
  gap: 25px;
  padding: 25px 0;
  border-bottom: 1px solid #e0e0e0;
  align-items: flex-start;
}

body.archive .mh-posts-list-item:first-child,
body.category .mh-posts-list-item:first-child {
  padding-top: 0;
}

body.archive .mh-posts-list-thumb,
body.category .mh-posts-list-thumb {
  flex: 0 0 280px;
  margin: 0;
}

body.archive .mh-posts-list-thumb img,
body.category .mh-posts-list-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
}

body.archive .mh-posts-list-content,
body.category .mh-posts-list-content {
  flex: 1;
  min-width: 0;
}

body.archive .mh-posts-list-title,
body.category .mh-posts-list-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px 0;
}

body.archive .mh-posts-list-title a,
body.category .mh-posts-list-title a {
  color: #1a1a1a;
  text-decoration: none;
}

body.archive .mh-posts-list-title a:hover,
body.category .mh-posts-list-title a:hover {
  color: var(--km-accent);
}

body.archive .mh-meta,
body.category .mh-meta,
body.archive .mh-posts-list-meta,
body.category .mh-posts-list-meta {
  font-size: 13px;
  color: #999;
  margin-bottom: 10px;
}

body.archive .mh-excerpt,
body.category .mh-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #444;
  margin: 0 0 10px 0;
}

body.archive .mh-excerpt a.mh-excerpt-more,
body.category .mh-excerpt a.mh-excerpt-more {
  display: none;
}

/* -----------------------------------------
   5. Author line
   ----------------------------------------- */
body.archive .kunst-author,
body.category .kunst-author {
  display: block;
  font-size: 13px;
  color: #666;
  margin-top: 8px;
}

body.archive .kunst-author a,
body.category .kunst-author a {
  color: #666;
  text-decoration: none;
}

body.archive .kunst-author a:hover,
body.category .kunst-author a:hover {
  color: var(--km-accent);
}

/* -----------------------------------------
   6. News category: no image, full width
   ----------------------------------------- */
body.category-news .mh-posts-list-item {
  display: block;
}

body.category-news .mh-posts-list-thumb {
  display: none;
}

body.category-news .mh-posts-list-content {
  width: 100%;
}

body.category-news .mh-posts-list-title {
  font-size: 22px;
}

body.category-news .mh-meta .mh-meta-date,
body.category-news .mh-posts-list-meta {
  display: none;
}

/* News category: hide images in main content only */
body.category-news .mh-content .mh-loop-thumb {
  display: none;
}

body.category-news .mh-content .mh-loop-content {
  width: 100%;
  margin: 0;
  padding: 0;
  float: none;
}

/* -----------------------------------------
   7. Sidebar news: hide date in last widget
   ----------------------------------------- */
body.archive .mh-sidebar .mh-widget:last-child .mh-meta-date,
body.category .mh-sidebar .mh-widget:last-child .mh-meta-date {
  display: none;
}

/* -----------------------------------------
   8. Pagination
   ----------------------------------------- */
body.archive .mh-loop-pagination,
body.category .mh-loop-pagination {
  margin: 40px 0 20px 0;
  padding: 20px 0;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.archive .mh-loop-pagination a,
body.archive .mh-loop-pagination span,
body.category .mh-loop-pagination a,
body.category .mh-loop-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  transition: all 0.2s ease;
  background: #fff;
  color: #333;
}

body.archive .mh-loop-pagination a:hover,
body.category .mh-loop-pagination a:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

body.archive .mh-loop-pagination span.current,
body.category .mh-loop-pagination span.current {
  background: var(--km-accent);
  color: #fff;
  border-color: var(--km-accent);
}

/* Hide dots */
body.archive .mh-loop-pagination span.dots,
body.category .mh-loop-pagination span.dots {
  display: none;
}

body.archive .mh-loop-pagination a.prev,
body.archive .mh-loop-pagination a.next,
body.category .mh-loop-pagination a.prev,
body.category .mh-loop-pagination a.next {
  font-size: 16px;
  font-weight: 700;
}

/* -----------------------------------------
   9. Hover effect on thumbnails
   ----------------------------------------- */
body.archive .mh-posts-list-thumb img,
body.category .mh-posts-list-thumb img {
  transition: transform 0.3s ease;
}

body.archive .mh-posts-list-item:hover .mh-posts-list-thumb img,
body.category .mh-posts-list-item:hover .mh-posts-list-thumb img {
  transform: scale(1.02);
}

/* -----------------------------------------
   10. Sidebar desktop widgets
   ----------------------------------------- */
body.archive .mh-sidebar .mh-widget-title,
body.category .mh-sidebar .mh-widget-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 10px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--km-accent);
}

body.archive .mh-sidebar .mh-custom-posts-small,
body.category .mh-sidebar .mh-custom-posts-small {
  padding: 12px 0;
  border-bottom: 1px solid #e0e0e0;
}

body.archive .mh-sidebar .mh-custom-posts-small:last-child,
body.category .mh-sidebar .mh-custom-posts-small:last-child {
  border-bottom: none;
}

/* =========================================
   Responsive
   ========================================= */

/* Tablet (< 1024px) */
@media (max-width: 1024px) {
  body.archive .mh-posts-list-thumb,
  body.category .mh-posts-list-thumb {
    flex: 0 0 240px;
  }

  body.archive .mh-posts-list-title,
  body.category .mh-posts-list-title {
    font-size: 18px;
  }

  body.archive .mh-content,
  body.category .mh-content {
    padding-right: 30px;
  }
}

/* Sidebar gone (< 900px) */
@media (max-width: 900px) {
  body.archive .mh-sidebar,
  body.category .mh-sidebar {
    display: none;
  }

  body.archive .mh-content,
  body.category .mh-content {
    width: 100%;
    float: none;
    margin: 0;
    padding-right: 0;
  }

  /* Full-bleed mobile ad */
  .kunst-mobile-ad {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 20px;
    background: #f5f5f5;
    text-align: center;
    margin-bottom: 25px;
    box-sizing: border-box;
  }

  .kunst-mobile-ad img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .kunst-mobile-ad .kunst-ad-label {
    display: block;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
  }

  .kunst-mobile-ad .advads-container,
  .kunst-mobile-ad [class*="advads"] {
    width: 100%;
    max-width: 100%;
    display: block;
    margin: 0 auto;
  }

  /* Mobile sidebar content (appended below) */
  .kunst-mobile-sidebar-content {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
  }

  .kunst-mobile-sidebar-content .mh-widget {
    margin-bottom: 30px;
  }

  .kunst-mobile-sidebar-content .mh-widget-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--km-accent);
  }

  .kunst-mobile-sidebar-content .mh-widget:last-child .mh-meta-date {
    display: none;
  }
}

/* Mobile (< 768px): image stacks above text */
@media (max-width: 768px) {
  body.archive .mh-posts-list-item,
  body.category .mh-posts-list-item {
    flex-direction: column;
    gap: 15px;
    display: flex;
  }

  body.archive .mh-posts-list-thumb,
  body.category .mh-posts-list-thumb {
    flex: none;
    width: 100%;
    max-width: 100%;
    order: 1;
  }

  body.archive .mh-posts-list-content,
  body.category .mh-posts-list-content {
    order: 2;
    width: 100%;
  }

  body.archive .mh-posts-list-title,
  body.category .mh-posts-list-title {
    font-size: 20px;
  }

  /* Sidebar widgets: image-above layout */
  body.archive .mh-custom-posts-small,
  body.category .mh-custom-posts-small,
  body.archive .mh-custom-posts-item,
  body.category .mh-custom-posts-item,
  .kunst-mobile-sidebar-content .mh-custom-posts-small {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
  }

  body.archive .mh-custom-posts-thumb,
  body.category .mh-custom-posts-thumb,
  .kunst-mobile-sidebar-content .mh-custom-posts-thumb {
    width: 100%;
    max-width: 100%;
    flex: none;
    float: none;
    margin: 0 0 10px 0;
  }

  body.archive .mh-custom-posts-thumb img,
  body.category .mh-custom-posts-thumb img,
  .kunst-mobile-sidebar-content .mh-custom-posts-thumb img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
  }

  body.archive .mh-custom-posts-content,
  body.category .mh-custom-posts-content,
  .kunst-mobile-sidebar-content .mh-custom-posts-content {
    width: 100%;
    float: none;
  }

  body.archive .mh-custom-posts-small-title,
  body.category .mh-custom-posts-small-title,
  .kunst-mobile-sidebar-content .mh-custom-posts-small-title {
    font-size: 18px;
    line-height: 1.3;
    margin: 0 0 8px 0;
  }

  /* Section title smaller */
  body.archive .mh-section-title,
  body.category .mh-section-title {
    font-size: 24px;
    padding-bottom: 12px;
    margin-bottom: 20px;
  }

  /* News: still no image */
  body.category-news .mh-posts-list-thumb {
    display: none;
  }

  /* Pagination smaller */
  body.archive .mh-loop-pagination a,
  body.archive .mh-loop-pagination span,
  body.category .mh-loop-pagination a,
  body.category .mh-loop-pagination span {
    min-width: 40px;
    height: 40px;
    font-size: 13px;
  }
}

/* Very small screens (< 480px) */
@media (max-width: 480px) {
  body.archive .mh-posts-list-item,
  body.category .mh-posts-list-item {
    padding: 20px 0;
  }

  body.archive .mh-posts-list-title,
  body.category .mh-posts-list-title {
    font-size: 18px;
  }

  body.archive .mh-section-title,
  body.category .mh-section-title {
    font-size: 20px;
  }

  body.archive .mh-loop-pagination,
  body.category .mh-loop-pagination {
    gap: 5px;
  }

  body.archive .mh-loop-pagination a,
  body.archive .mh-loop-pagination span,
  body.category .mh-loop-pagination a,
  body.category .mh-loop-pagination span {
    min-width: 36px;
    height: 36px;
    font-size: 12px;
    padding: 0 10px;
  }
}
