/* =========================================
   Homepage — hero, categories, popular, newsletter,
   meinungen, kunst:art+news, news-list, magazine block,
   newsletter widget, top-articles grid, kunstmessen
   ========================================= */

/* -----------------------------------------
   1. Hero with ads (version A)
   2/3 article + 1/3 ad column
   ----------------------------------------- */
.kunst-hero-with-ads {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--kunst-lines);
  align-items: flex-start;
  overflow: visible;
}

.kunst-hero-main {
  flex: 2;
  min-width: 0;
  position: relative;
  cursor: pointer;
}

.kunst-hero-image {
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.kunst-hero-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.kunst-hero-content {
  position: relative;
  z-index: 1;
}

.kunst-hero-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
  color: var(--kunst-text-dark);
}

.kunst-hero-date {
  font-size: 13px;
  color: #999;
  margin-bottom: 12px;
}

.kunst-hero-excerpt {
  font-size: 16px;
  line-height: 1.7;
  color: var(--km-text);
  margin-bottom: 12px;
}

.kunst-hero-author {
  font-size: 13px;
  color: #999;
}

/* Sticky ad column */
.kunst-hero-ads {
  flex: 1;
  min-width: 0;
  position: -webkit-sticky;
  position: sticky;
  top: 20px;
  align-self: flex-start;
  height: fit-content;
  max-height: calc(100vh - 40px);
}

.kunst-hero-ads .advads-container,
.kunst-hero-ads img {
  width: 100%;
  max-width: 100%;
}

/* -----------------------------------------
   2. Hero without ads (version B)
   60% image + 40% text
   ----------------------------------------- */
.kunst-hero-no-ads {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--kunst-lines);
}

.kunst-hero-article {
  display: flex;
  gap: 30px;
  position: relative;
  cursor: pointer;
}

.kunst-hero-content-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.kunst-hero-content-left .kunst-hero-title {
  font-size: 32px;
}

.kunst-hero-image-right {
  flex: 0 0 60%;
  position: relative;
  z-index: 1;
}

.kunst-hero-image-right img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

/* -----------------------------------------
   3. Newsletter banner
   ----------------------------------------- */
.kunst-newsletter-ad {
  margin: 30px 0;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--kunst-lines);
}

.kunst-newsletter-ad-container {
  width: 100%;
}

.kunst-newsletter-ad-container img,
.kunst-newsletter-ad-container .advads-container {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* -----------------------------------------
   4. Category sections (Ausstellungen, Galerien, etc.)
   ----------------------------------------- */
.kunst-category-section {
  margin: 40px 0;
  padding-bottom: 0;
}

.kunst-section-header {
  margin-bottom: 25px;
}

/* Override for homepage section titles */
.kunst-category-section .kunst-section-title,
.kunst-popular-section .kunst-section-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.kunst-category-section .kunst-section-title a {
  color: var(--km-accent);
  text-decoration: none;
}

.kunst-category-section .kunst-section-title a:hover {
  text-decoration: underline;
}

/* Category hero (large featured article) */
.kunst-cat-hero {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--kunst-lines);
  position: relative;
  cursor: pointer;
}

/* Reversed layout: text left, image right */
.kunst-cat-hero-reversed {
  flex-direction: row;
}

.kunst-cat-hero-reversed .kunst-cat-hero-content {
  order: 1;
}

.kunst-cat-hero-reversed .kunst-cat-hero-image {
  order: 2;
}

.kunst-cat-hero-image {
  flex: 0 0 60%;
  position: relative;
  z-index: 1;
}

.kunst-cat-hero-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.kunst-cat-hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.kunst-cat-hero-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--kunst-text-dark);
}

.kunst-cat-hero-date {
  font-size: 12px;
  color: #999;
  margin-bottom: 12px;
}

.kunst-cat-hero-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: var(--km-text);
  margin-bottom: 12px;
}

.kunst-cat-hero-author {
  font-size: 12px;
  color: #999;
}

/* 3-column grid */
.kunst-category-grid {
  display: flex;
  gap: 30px;
}

.kunst-category-item {
  flex: 1;
  position: relative;
  cursor: pointer;
}

/* Vertical dividers between items */
.kunst-category-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0;
  right: -15px;
  width: 1px;
  height: 100%;
  background-color: var(--kunst-lines);
  z-index: 0;
}

.kunst-category-item-image {
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.kunst-category-item-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.kunst-category-item-content {
  position: relative;
  z-index: 1;
}

.kunst-category-item-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--kunst-text-dark);
}

.kunst-category-item-date {
  display: block;
  font-size: 12px;
  color: #999;
  margin-bottom: 10px;
}

.kunst-category-item-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  margin-bottom: 10px;
}

.kunst-category-item-author {
  font-size: 12px;
  color: #999;
}

/* -----------------------------------------
   5. Popular / Most-read section
   ----------------------------------------- */
.kunst-popular-section {
  margin: 40px 0;
}

.kunst-popular-header {
  margin-bottom: 25px;
}

.kunst-popular-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--km-accent);
  margin: 0;
}

.kunst-popular-content {
  background: var(--km-bg-light);
  border-top: 3px solid var(--km-accent);
  padding: 25px 30px;
}

.kunst-popular-grid {
  display: flex;
  gap: 30px;
}

.kunst-popular-item {
  flex: 1;
  position: relative;
  cursor: pointer;
}

.kunst-popular-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0;
  right: -15px;
  width: 1px;
  height: 100%;
  background-color: var(--kunst-lines);
  z-index: 0;
}

.kunst-popular-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--km-accent);
  opacity: 0.4;
  line-height: 1;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.kunst-popular-item-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--kunst-text-dark);
  position: relative;
  z-index: 1;
}

.kunst-popular-item-author {
  font-size: 12px;
  color: #999;
  position: relative;
  z-index: 1;
}

/* -----------------------------------------
   6. Meinungen block (Presseschau & Kommentar)
   ----------------------------------------- */
.meinungen-block {
  margin: 40px 0;
  padding: 25px 0;
  border-top: 1px solid var(--kunst-lines);
  border-bottom: 1px solid var(--kunst-lines);
  clear: both;
  width: 100%;
}

.meinungen-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.meinungen-item {
  padding: 0 25px;
  border-right: 1px solid var(--kunst-lines);
}

.meinungen-item:first-child {
  padding-left: 0;
}

.meinungen-item:last-child {
  padding-right: 0;
  border-right: none;
}

.meinungen-kategorie {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--km-accent);
  text-decoration: none;
  margin-bottom: 10px;
}

.meinungen-kategorie:hover {
  text-decoration: underline;
}

.meinungen-titel {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 10px 0;
}

.meinungen-titel a {
  color: var(--kunst-text-dark);
  text-decoration: none;
}

.meinungen-titel a:hover {
  color: var(--km-accent);
}

.meinungen-autor {
  font-size: 14px;
  font-weight: 400;
  color: #666;
  margin: 0 0 8px 0;
}

.meinungen-datum {
  font-size: 12px;
  color: #999;
  display: block;
}

/* -----------------------------------------
   7. kunst:art + News block
   ----------------------------------------- */
.ka-news-block {
  display: flex;
  gap: 0;
  margin: 40px 0;
  clear: both;
  width: 100%;
}

/* Left column: 40% */
.ka-news-left {
  flex: 0 0 40%;
  padding-right: 30px;
  border-right: 1px solid var(--kunst-lines);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ka-cover-image {
  width: 100%;
  margin-bottom: 20px;
}

.ka-cover-image a {
  display: block;
  width: 100%;
}

.ka-cover-image img {
  width: 100%;
  height: auto;
  display: block;
}

.ka-info {
  text-align: center;
}

.ka-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--kunst-text-dark);
  margin: 0 0 5px 0;
  letter-spacing: -0.5px;
}

.ka-subtitle {
  font-size: 15px;
  color: #666;
  margin: 0 0 20px 0;
  font-style: italic;
}

.ka-button {
  display: inline-block;
  background: var(--km-accent);
  color: #fff;
  padding: 12px 25px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.2s ease;
}

.ka-button:hover {
  background: var(--km-accent-hover);
  color: #fff;
}

/* Right column: 60% */
.ka-news-right {
  flex: 0 0 60%;
  padding-left: 30px;
  min-width: 0;
}

.ka-news-right .mh-widget-title {
  margin-bottom: 20px;
}

.ka-news-right .mh-widget-title a {
  color: #333;
  text-decoration: none;
}

.ka-news-right .mh-widget-title a:hover {
  color: var(--km-accent);
}

.ka-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ka-news-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--kunst-lines);
}

.ka-news-item:last-child {
  border-bottom: none;
}

.ka-news-item a {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: #333;
  text-decoration: none;
  display: block;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.ka-news-item a:hover {
  color: var(--km-accent);
}

/* -----------------------------------------
   8. News list grid (kunst-news-list-container)
   ----------------------------------------- */
.kunst-news-list-container {
  --kunst-accent: #9a1815;
  --kunst-lines: #e0e0e0;
  padding-top: 30px;
  margin-bottom: 40px;
  clear: both;
  width: 100%;
}

/* Hide duplicate widget title */
.kunst-news-list-container .mh-widget-title {
  display: none;
}

.kunst-list-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.kunst-list-item {
  background: transparent;
  border: none;
  position: relative;
  margin-bottom: 30px;
  padding-top: 5px;
  padding-left: 25px;
  padding-right: 25px;
  min-height: 120px;
  box-sizing: border-box;
  min-width: 0; /* grid item must be allowed to shrink, else long titles overflow the divider */
  overflow-wrap: break-word;
}

/* Edge alignment */
.kunst-list-item:nth-child(3n+1) {
  padding-left: 0;
  padding-right: 25px;
}

.kunst-list-item:nth-child(3n) {
  padding-left: 25px;
  padding-right: 0;
}

/* Horizontal divider (first row) */
.kunst-list-item:nth-child(-n+3) {
  border-bottom: 1px solid var(--kunst-lines);
  padding-bottom: 25px;
  margin-bottom: 25px;
}

/* Vertical dividers */
.kunst-list-item:not(:nth-child(3n))::after {
  content: "";
  position: absolute;
  right: 0;
  width: 1px;
  background-color: var(--kunst-lines);
}

/* Top row: line from top to near horizontal divider */
.kunst-list-item:nth-child(-n+3):not(:nth-child(3n))::after {
  top: 0;
  bottom: 12px;
}

/* Bottom row: line starts after horizontal divider */
.kunst-list-item:nth-child(n+4):not(:nth-child(3n))::after {
  top: -13px;
  bottom: 0;
}

a.kunst-list-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  overflow-wrap: break-word;
}

.kunst-sub-title {
  display: block;
  min-height: 18px;
  height: 18px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--kunst-accent);
  line-height: 18px;
  visibility: visible;
}

.kunst-sub-title:empty {
  visibility: hidden;
}

.kunst-list-title {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
  margin: 0;
  color: #000;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kunst-list-title:hover {
  color: var(--kunst-accent);
}

/* -----------------------------------------
   9. VKK Magazine block
   ----------------------------------------- */
.vkk-magazine-block {
  background-color: transparent;
  padding: 40px 20px 10px 20px;
  margin: 40px 0 0 0;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid var(--kunst-lines);
}

.vkk-magazine-title {
  text-align: center;
  color: #333;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 24px 0;
  letter-spacing: 0.3px;
}

.vkk-magazine-grid {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.vkk-magazine-item {
  text-align: center;
  flex-shrink: 1;
}

.vkk-magazine-item a {
  display: block;
}

.vkk-magazine-item img {
  height: 140px;
  width: auto;
  display: block;
  margin: 0 auto;
  border: 1px solid #ccc;
  transition: transform 0.2s ease;
}

.vkk-magazine-item img:hover {
  transform: scale(1.02);
}

.vkk-magazine-name {
  color: #999;
  font-size: 14px;
  font-weight: 700;
  margin: 6px 0 0 0;
  text-transform: none;
}

/* -----------------------------------------
   10. Article list widgets (sza1-widget)
   ----------------------------------------- */
.sza1-widget {
  margin: 40px 0;
  clear: both;
  width: 100%;
}

.sza1-liste {
  margin-top: 20px;
}

.sza1-item {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  padding: 30px 0;
  border-bottom: 1px solid var(--kunst-lines);
  cursor: pointer;
  position: relative;
}

.sza1-item:first-child {
  padding-top: 0;
}

.sza1-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Widget 1 and 2: last item keeps bottom border */
.sza1-widget-1 .sza1-item:last-child,
.sza1-widget-2 .sza1-item:last-child {
  border-bottom: 1px solid var(--kunst-lines);
  padding-bottom: 30px;
}

/* Invisible link overlay for right-click support */
.sza1-item-link {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.sza1-content,
.sza1-bild {
  position: relative;
  z-index: 2;
}

a.sza1-kategorie {
  position: relative;
  z-index: 3;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--km-accent);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-decoration: none;
}

a.sza1-kategorie:hover {
  text-decoration: underline;
}

.sza1-content {
  flex: 1;
  min-width: 0;
}

.sza1-titel {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 12px 0;
}

.sza1-titel a {
  color: #333;
  text-decoration: none;
}

.sza1-titel a:hover {
  color: var(--km-accent);
}

.sza1-excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

.sza1-bild {
  flex-shrink: 0;
  width: 320px;
}

.sza1-bild a {
  display: block;
}

.sza1-bild img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* AdSense ad with label */
.sza1-anzeige-wrapper {
  padding: 0;
  margin: 0;
  border-bottom: 1px solid var(--kunst-lines);
}

.sza1-anzeige-label {
  display: block;
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
  padding-top: 20px;
}

.sza1-anzeige {
  min-height: 90px;
  padding: 0 0 20px 0;
  margin: 0;
}

/* -----------------------------------------
   11. Top 3 articles grid
   ----------------------------------------- */
ul.kunst-top-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.kunst-top-articles-grid .kunst-top-article-item {
  position: relative;
  width: 100%;
  float: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: pointer;
  border: none;
}

/* Column 1: right padding + border */
.kunst-top-articles-grid .kunst-top-article-item:nth-child(1) {
  padding-right: 10px;
  border-right: 1px solid var(--kunst-lines);
}

/* Column 2: left + right padding + border */
.kunst-top-articles-grid .kunst-top-article-item:nth-child(2) {
  padding-left: 10px;
  padding-right: 10px;
  border-right: 1px solid var(--kunst-lines);
}

/* Column 3: left padding only */
.kunst-top-articles-grid .kunst-top-article-item:nth-child(3) {
  padding-left: 10px;
}

.kunst-top-articles-grid .mh-custom-posts-large-inner {
  width: 100%;
  float: none;
  border: none;
}

.kunst-top-articles-grid .mh-custom-posts-thumb-xl {
  width: 100%;
  max-width: 100%;
  float: none;
  margin: 0 0 15px 0;
  padding: 0;
}

.kunst-top-articles-grid .mh-custom-posts-thumb-xl a {
  display: block;
  width: 100%;
}

.kunst-top-articles-grid .mh-custom-posts-thumb-xl img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.kunst-top-articles-grid .mh-custom-posts-content {
  width: 100%;
  float: none;
  margin: 0;
  padding: 0;
}

.kunst-top-articles-grid .kunst-top-article-item:hover {
  background-color: transparent;
}

/* -----------------------------------------
   12. Kunstmessen section
   ----------------------------------------- */
.km-sektion {
  margin: 40px 0;
  clear: both;
  width: 100%;
}

.km-sektion h3.mh-section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #333;
  background: transparent;
  padding: 0 0 12px 0;
  margin: 0 0 25px 0;
  border-bottom: 2px solid var(--km-accent);
}

.km-sektion h3.mh-section-title a {
  color: #333;
  text-decoration: none;
}

.km-sektion h3.mh-section-title a:hover {
  color: var(--km-accent);
}

.km-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.km-item {
  display: flex;
  flex-direction: column;
}

.km-thumb {
  margin-bottom: 15px;
}

.km-thumb a {
  display: block;
}

.km-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.km-titel {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px 0;
}

.km-titel a {
  color: #333;
  text-decoration: none;
}

.km-titel a:hover {
  color: var(--km-accent);
}

.km-datum {
  font-size: 13px;
  color: #999;
  margin-bottom: 10px;
  display: block;
}

.km-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #666;
}

/* -----------------------------------------
   13. Newsletter home widget (kl_home_widget)
   ----------------------------------------- */
#kl_home_widget {
  background: linear-gradient(135deg, #fafafa, #f0f0f0);
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 35px 40px;
  margin: 40px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  font-family: 'Open Sans', -apple-system, sans-serif;
}

#kl_home_widget * {
  box-sizing: border-box;
}

#kl_home_widget .kl-content {
  padding-right: 20px;
}

#kl_home_widget .kl-badge {
  display: inline-block;
  background: var(--km-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 5px 12px;
  border-radius: 3px;
  margin-bottom: 15px;
}

#kl_home_widget .kl-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--kunst-text-dark);
  margin: 0 0 12px;
}

#kl_home_widget .kl-title em {
  font-style: italic;
  color: var(--km-accent);
}

#kl_home_widget .kl-desc {
  font-size: 15px;
  color: #555;
  line-height: 1.7;
  margin: 0 0 18px;
}

#kl_home_widget .kl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: #666;
}

#kl_home_widget .kl-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

#kl_home_widget .kl-meta-item svg {
  width: 16px;
  height: 16px;
  color: var(--km-accent);
  flex-shrink: 0;
}

#kl_home_widget .kl-meta-item strong {
  color: #333;
  font-weight: 600;
}

/* Form box */
#kl_home_widget .kl-form-box {
  background: #fff;
  border-radius: 4px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8e8;
  max-width: 400px;
  width: 100%;
  min-width: 320px;
  margin: 0 auto;
}

#kl_home_widget .kl-form-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--kunst-text-dark);
  margin: 0 0 6px;
  text-align: center;
}

#kl_home_widget .kl-form-sub {
  font-size: 13px;
  color: #888;
  margin: 0 0 20px;
  text-align: center;
}

#kl_home_widget .kl-gender {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
}

#kl_home_widget .kl-gender.hidden {
  display: none;
}

#kl_home_widget .kl-gender label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
}

#kl_home_widget .kl-gender input[type="radio"] {
  accent-color: var(--km-accent);
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}

#kl_home_widget .kl-names {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

#kl_home_widget .kl-names.hidden {
  display: none;
}

#kl_home_widget .kl-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fafafa;
  transition: 0.2s;
}

#kl_home_widget .kl-input:focus {
  outline: none;
  border-color: var(--km-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(154, 24, 21, 0.08);
}

#kl_home_widget .kl-input._err {
  border-color: #e53935;
}

#kl_home_widget .kl-group {
  margin-bottom: 10px;
}

#kl_home_widget .kl-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--km-accent);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 4px;
}

#kl_home_widget .kl-btn:hover {
  background: var(--km-accent-hover);
}

#kl_home_widget .kl-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#kl_home_widget .kl-btn.loading {
  color: transparent;
  position: relative;
}

#kl_home_widget .kl-btn.loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  left: 50%;
  margin: -9px 0 0 -9px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: klSpin 0.8s linear infinite;
}

@keyframes klSpin {
  to { transform: rotate(360deg); }
}

#kl_home_widget .kl-privacy {
  font-size: 11px;
  color: #888;
  text-align: center;
  margin-top: 14px;
}

#kl_home_widget .kl-privacy a {
  color: #666;
  text-decoration: underline;
}

#kl_home_widget .kl-err {
  background: #fff5f5;
  color: #c53030;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 12px;
  display: none;
  border: 1px solid #feb2b2;
}

#kl_home_widget .kl-err.show {
  display: block;
}

#kl_home_widget.variant-b .kl-input {
  padding: 14px 16px;
  font-size: 15px;
}

/* Success modal */
.kl-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 20px;
}

.kl-overlay.show {
  display: flex;
}

.kl-modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
  max-width: 420px;
  width: 100%;
  position: relative;
  overflow: hidden;
  font-family: 'Open Sans', -apple-system, sans-serif;
  animation: klModalIn 0.3s ease;
}

@keyframes klModalIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.kl-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  z-index: 10;
}

.kl-modal-close:hover {
  background: #e8e8e8;
  transform: rotate(90deg);
}

.kl-modal-close svg {
  width: 18px;
  height: 18px;
  color: #666;
}

.kl-modal-head {
  background: linear-gradient(135deg, #f8f8f8, #f0f0f0);
  padding: 40px 30px 30px;
  text-align: center;
  border-bottom: 1px solid #e8e8e8;
}

.kl-modal-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--kunst-text-dark);
  margin: 0;
}

.kl-modal-body {
  padding: 30px;
  text-align: center;
}

.kl-modal-text {
  font-size: 15px;
  color: #555;
  line-height: 1.7;
  margin: 0 0 20px;
}

.kl-modal-info {
  background: #fef9e7;
  border: 1px solid #f5d76e;
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}

.kl-modal-info svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #d4a000;
}

.kl-modal-info-text {
  font-size: 13px;
  color: #856404;
  line-height: 1.5;
}

.kl-modal-info-text strong {
  display: block;
  margin-bottom: 2px;
  color: #6d5200;
}

.kl-modal-foot {
  padding: 0 30px 30px;
  text-align: center;
}

.kl-modal-btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--km-accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.kl-modal-btn:hover {
  background: var(--km-accent-hover);
  transform: translateY(-1px);
}

/* -----------------------------------------
   14. Newsletter popup (floating card)
   ----------------------------------------- */
.kl-popup-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999998;
  opacity: 0;
  transform: translateY(100px);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
  font-family: 'IBM Plex Sans', -apple-system, sans-serif;
}

.kl-popup-wrap.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.kl-popup-card {
  width: 380px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
}

.kl-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  z-index: 10;
}

.kl-popup-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

.kl-popup-close svg {
  width: 16px;
  height: 16px;
  color: #666;
}

.kl-popup-header {
  background: linear-gradient(135deg, #fafafa, #f0f0f0);
  padding: 24px 24px 20px;
  border-bottom: 1px solid #e8e8e8;
}

.kl-popup-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--kunst-text-dark);
  margin: 0 0 6px;
  padding-right: 30px;
}

.kl-popup-subtitle {
  font-size: 13px;
  color: #666;
  margin: 0;
}

.kl-popup-body {
  padding: 20px 24px 24px;
}

.kl-popup-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.kl-popup-benefits li {
  font-size: 12px;
  color: #555;
  background: #f5f5f5;
  padding: 4px 10px;
  border-radius: 12px;
}

.kl-popup-benefits li::before {
  content: "\2713 ";
  color: var(--km-accent);
  font-weight: 600;
}

.kl-popup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kl-popup-err {
  background: #fff5f5;
  color: #c53030;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  display: none;
  border: 1px solid #feb2b2;
}

.kl-popup-err.show {
  display: block;
}

.kl-popup-variant-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kl-popup-variant-fields.hidden {
  display: none;
}

.kl-popup-gender {
  display: flex;
  gap: 14px;
}

.kl-popup-gender-opt {
  display: flex;
  align-items: center;
  gap: 4px;
}

.kl-popup-gender-opt input[type="radio"] {
  accent-color: var(--km-accent);
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}

.kl-popup-gender-opt label {
  font-size: 12px;
  color: #555;
  cursor: pointer;
}

.kl-popup-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.kl-popup-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fafafa;
  box-sizing: border-box;
  transition: 0.2s;
}

.kl-popup-input:focus {
  outline: none;
  border-color: var(--km-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(154, 24, 21, 0.08);
}

.kl-popup-input._err {
  border-color: #e53935;
}

.kl-popup-submit {
  width: 100%;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--km-accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
  position: relative;
}

.kl-popup-submit:hover {
  background: var(--km-accent-hover);
}

.kl-popup-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.kl-popup-submit.loading {
  color: transparent;
}

.kl-popup-submit.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: klPopupSpin 0.8s linear infinite;
}

@keyframes klPopupSpin {
  to { transform: rotate(360deg); }
}

.kl-popup-privacy {
  font-size: 10px;
  color: #999;
  text-align: center;
  margin: 10px 0 0;
  line-height: 1.4;
}

.kl-popup-privacy a {
  color: #666;
  text-decoration: underline;
}

/* Popup success state */
.kl-popup-success {
  display: none;
}

.kl-popup-success.show {
  display: block;
}

.kl-popup-success-header {
  background: linear-gradient(135deg, #f8f8f8, #f0f0f0);
  padding: 30px 24px 24px;
  text-align: center;
  border-bottom: 1px solid #e8e8e8;
}

.kl-popup-success-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--kunst-text-dark);
  margin: 0;
}

.kl-popup-success-body {
  padding: 24px;
  text-align: center;
}

.kl-popup-success-text {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 16px;
}

.kl-popup-success-info {
  background: #fef9e7;
  border: 1px solid #f5d76e;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}

.kl-popup-success-info svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: #d4a000;
  margin-top: 1px;
}

.kl-popup-success-info-text {
  font-size: 12px;
  color: #856404;
  line-height: 1.4;
}

.kl-popup-success-info-text strong {
  display: block;
  margin-bottom: 2px;
  color: #6d5200;
}

.kl-popup-success-footer {
  padding: 0 24px 24px;
  text-align: center;
}

.kl-popup-success-btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--km-accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.kl-popup-success-btn:hover {
  background: var(--km-accent-hover);
}

/* -----------------------------------------
   15. News widget sidebar adjustments
   ----------------------------------------- */
#mh_magazine_custom_posts-21 .mh-meta,
#mh_magazine_custom_posts-21 .mh-custom-posts-meta,
.mh-home-6 .mh-custom-posts-meta {
  display: none;
}

#mh_magazine_custom_posts-21 .mh-custom-posts-item,
.mh-home-6 .mh-custom-posts-item {
  border-bottom: 1px solid var(--kunst-lines);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

#mh_magazine_custom_posts-21 .mh-custom-posts-item:last-child,
.mh-home-6 .mh-custom-posts-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* =========================================
   Responsive — Homepage
   ========================================= */

/* Tablet: hero stacks, grid to single column */
@media screen and (max-width: 1000px) {
  /* Hero with ads: stack vertically */
  .kunst-hero-with-ads {
    flex-direction: column;
  }

  /* Ads: full width, side-by-side, no longer sticky */
  .kunst-hero-ads {
    position: static;
    width: 100%;
    height: auto;
  }

  .kunst-ad-slots-container {
    flex-direction: row;
    gap: 20px;
  }

  .kunst-ad-slots-container .advads-container,
  .kunst-ad-slots-container > div {
    flex: 1;
    width: auto;
  }

  /* Hero without ads */
  .kunst-hero-article {
    flex-direction: column;
  }

  .kunst-hero-image-right {
    flex: none;
    width: 100%;
    order: -1;
  }

  .kunst-hero-content-left {
    margin-top: 20px;
  }

  .kunst-hero-content-left .kunst-hero-title {
    font-size: 26px;
  }

  /* Images switch to 4:3 when stacked */
  .kunst-hero-image img,
  .kunst-hero-image-right img {
    aspect-ratio: 4/3;
  }

  /* Category hero: stack vertically */
  .kunst-cat-hero,
  .kunst-cat-hero-reversed {
    flex-direction: column;
  }

  .kunst-cat-hero-reversed .kunst-cat-hero-content,
  .kunst-cat-hero-reversed .kunst-cat-hero-image {
    order: unset;
  }

  .kunst-cat-hero .kunst-cat-hero-image {
    order: -1;
  }

  .kunst-cat-hero-image {
    flex: none;
    width: 100%;
  }

  .kunst-cat-hero-content {
    margin-top: 20px;
  }

  .kunst-cat-hero-image img {
    aspect-ratio: 4/3;
  }

  /* Category grid: single column */
  .kunst-category-grid {
    flex-direction: column;
    gap: 30px;
  }

  .kunst-category-item::after {
    display: none;
  }

  .kunst-category-item:not(:last-child) {
    padding-bottom: 30px;
    border-bottom: 1px solid var(--kunst-lines);
  }

  /* Small items match large item sizes on mobile */
  .kunst-category-item-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
  }

  .kunst-category-item-date {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .kunst-category-item-excerpt {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 12px;
  }

  .kunst-category-item-author {
    font-size: 13px;
  }

  /* Popular: single column */
  .kunst-popular-content {
    padding: 20px;
  }

  .kunst-popular-grid {
    flex-direction: column;
    gap: 0;
  }

  .kunst-popular-item::after {
    display: none;
  }

  .kunst-popular-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--kunst-lines);
  }

  .kunst-popular-item:first-child {
    padding-top: 0;
  }

  .kunst-popular-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
  }
}

/* Tablet: sza1 widget */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .sza1-bild {
    width: 250px;
  }

  .sza1-titel {
    font-size: 20px;
  }

  .vkk-magazine-item img {
    height: 110px;
  }

  .vkk-magazine-grid {
    gap: 30px;
  }

  /* Kunstmessen 2-col */
  .km-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Meinungen: 2 columns */
  .meinungen-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .meinungen-item:nth-child(2) {
    border-right: none;
  }

  .meinungen-item:nth-child(3) {
    grid-column: 1 / -1;
    border-right: none;
    border-top: 1px solid var(--kunst-lines);
    margin-top: 25px;
    padding-top: 25px;
    padding-left: 0;
  }

  /* Top articles: 2-col */
  ul.kunst-top-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .kunst-top-articles-grid .kunst-top-article-item:nth-child(2) {
    border-right: none;
    padding-right: 0;
  }

  .kunst-top-articles-grid .kunst-top-article-item:nth-child(3) {
    margin-top: 20px;
    padding-top: 20px;
    padding-left: 0;
    border-top: 1px solid var(--kunst-lines);
    grid-column: 1 / -1;
  }
}

/* Narrow: ads stack, titles shrink */
@media screen and (max-width: 650px) {
  .kunst-ad-slots-container {
    flex-direction: column;
    gap: 15px;
  }

  .kunst-ad-slots-container .advads-container,
  .kunst-ad-slots-container > div {
    width: 100%;
    flex: none;
  }

  .kunst-hero-title {
    font-size: 24px;
  }

  .kunst-hero-content-left .kunst-hero-title {
    font-size: 24px;
  }

  .kunst-cat-hero-title {
    font-size: 22px;
  }

  .kunst-category-item-title {
    font-size: 22px;
  }
}

/* Mobile */
@media screen and (max-width: 767px) {
  /* sza1 widget */
  .sza1-item {
    flex-direction: column-reverse;
    gap: 15px;
    padding: 20px 0;
  }

  .sza1-bild {
    width: 100%;
  }

  .sza1-bild img {
    aspect-ratio: auto;
    object-fit: contain;
  }

  a.sza1-kategorie {
    display: none;
  }

  .sza1-titel {
    font-size: 18px;
  }

  .sza1-excerpt {
    font-size: 15px;
  }

  .sza1-anzeige-label {
    padding-top: 15px;
  }

  .sza1-anzeige {
    padding: 0 0 15px 0;
    min-height: 50px;
  }

  .sza1-widget-1 .sza1-item:last-child,
  .sza1-widget-2 .sza1-item:last-child {
    padding-bottom: 20px;
  }

  /* News list grid */
  .kunst-list-wrapper {
    grid-template-columns: 1fr;
  }

  .kunst-news-list-container {
    padding-top: 20px;
  }

  .kunst-list-item {
    border-bottom: 1px solid var(--kunst-lines);
    margin-bottom: 20px;
    padding-bottom: 20px;
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
    min-height: auto;
  }

  .kunst-list-item:last-child {
    border-bottom: none;
  }

  .kunst-list-item::after {
    display: none;
  }

  .kunst-sub-title {
    min-height: auto;
    height: auto;
  }

  /* Magazine block */
  .vkk-magazine-block {
    padding: 30px 15px 8px 15px;
  }

  .vkk-magazine-title {
    font-size: 16px;
    margin-bottom: 15px;
  }

  .vkk-magazine-item img {
    height: 70px;
  }

  .vkk-magazine-grid {
    gap: 15px;
  }

  .vkk-magazine-name {
    font-size: 11px;
    margin-top: 4px;
  }

  /* kunst:art + news */
  .ka-news-block {
    flex-direction: column;
  }

  .ka-news-left {
    flex: none;
    width: 100%;
    padding-right: 0;
    padding-bottom: 30px;
    margin-bottom: 30px;
    border-right: none;
    border-bottom: 1px solid var(--kunst-lines);
  }

  .ka-news-right {
    flex: none;
    width: 100%;
    padding-left: 0;
  }

  .ka-title {
    font-size: 24px;
  }

  /* Meinungen: single column */
  .meinungen-grid {
    grid-template-columns: 1fr;
  }

  .meinungen-item {
    padding: 0 0 25px 0;
    margin-bottom: 25px;
    border-right: none;
    border-bottom: 1px solid var(--kunst-lines);
  }

  .meinungen-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  /* Kunstmessen single column */
  .km-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  /* Top articles: single column */
  ul.kunst-top-articles-grid {
    grid-template-columns: 1fr;
  }

  .kunst-top-articles-grid .kunst-top-article-item:nth-child(1),
  .kunst-top-articles-grid .kunst-top-article-item:nth-child(2),
  .kunst-top-articles-grid .kunst-top-article-item:nth-child(3) {
    padding: 0 0 20px 0;
    margin-bottom: 20px;
    border-right: none;
    border-bottom: 1px solid var(--kunst-lines);
  }

  .kunst-top-articles-grid .kunst-top-article-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }
}

/* Very small magazine covers */
@media screen and (max-width: 480px) {
  .kl-popup-wrap {
    bottom: 10px;
    right: 10px;
    left: 10px;
  }

  .kl-popup-card {
    width: 100%;
    max-width: none;
  }

  .kl-popup-name-row {
    grid-template-columns: 1fr;
  }

  .kl-popup-header {
    padding: 20px 20px 16px;
  }

  .kl-popup-body {
    padding: 16px 20px 20px;
  }

  .kl-popup-title {
    font-size: 20px;
  }

  .kl-popup-success-header {
    padding: 24px 20px 20px;
  }

  .kl-popup-success-title {
    font-size: 22px;
  }

  .kl-popup-success-body,
  .kl-popup-success-footer {
    padding: 20px;
  }
}

@media screen and (max-width: 400px) {
  .vkk-magazine-item img {
    height: 50px;
  }

  .vkk-magazine-grid {
    gap: 10px;
  }

  .vkk-magazine-name {
    font-size: 9px;
  }

  .kunst-hero-title,
  .kunst-hero-content-left .kunst-hero-title,
  .kunst-cat-hero-title,
  .kunst-category-item-title {
    font-size: 20px;
  }

  .kunst-hero-excerpt,
  .kunst-cat-hero-excerpt,
  .kunst-category-item-excerpt {
    font-size: 15px;
  }

  .kunst-popular-content {
    padding: 15px;
  }
}

/* Newsletter home widget responsive */
@media (max-width: 800px) {
  #kl_home_widget {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 25px 20px;
  }

  #kl_home_widget .kl-content {
    padding: 0;
    text-align: center;
  }

  #kl_home_widget .kl-meta {
    justify-content: center;
  }

  #kl_home_widget .kl-title {
    font-size: 22px;
  }

  #kl_home_widget .kl-title br {
    display: none;
  }

  #kl_home_widget .kl-form-box {
    min-width: auto;
    max-width: 400px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  #kl_home_widget .kl-names {
    grid-template-columns: 1fr;
  }

  #kl_home_widget .kl-meta {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  #kl_home_widget .kl-gender {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .kl-modal {
    margin: 10px;
    border-radius: 12px;
  }

  .kl-modal-head {
    padding: 30px 20px 25px;
  }

  .kl-modal-body,
  .kl-modal-foot {
    padding: 25px 20px;
  }

  .kl-modal-title {
    font-size: 24px;
  }
}
