/* ============================================================
   GI – ARCHIV und SINGLE Styles
   Konsistente Selektoren für #wrapper-content und #right-sidebar
   ============================================================ */

/* Grund-Grid für Kachelarchiv */
.archive.post-type-archive-gesundheitsimpuls .gi-archiv,
.post-type-archive-gesundheitsimpuls .gi-archiv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px 24px;
  padding: 20px 0;
  width: 100%;
  box-sizing: border-box;
  align-items: stretch;
}

/* Kachel-Box */
.archive.post-type-archive-gesundheitsimpuls .gi-box,
.post-type-archive-gesundheitsimpuls .gi-box {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  height: 100%;
  padding: 18px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform .12s ease, box-shadow .12s ease;
  width: 100%;
  box-sizing: border-box;
}

.archive.post-type-archive-gesundheitsimpuls .gi-box:hover,
.post-type-archive-gesundheitsimpuls .gi-box:hover,
.archive.post-type-archive-gesundheitsimpuls .gi-box:focus-within,
.post-type-archive-gesundheitsimpuls .gi-box:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.10);
  outline: none;
}

/* Titel oben */
.archive.post-type-archive-gesundheitsimpuls .gi-header,
.post-type-archive-gesundheitsimpuls .gi-header {
  margin-bottom: 12px;
}
.archive.post-type-archive-gesundheitsimpuls .gi-title,
.post-type-archive-gesundheitsimpuls .gi-title {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
  font-weight: 600;
  color: #1f2b2b;
  text-align: center;
}
.archive.post-type-archive-gesundheitsimpuls .gi-title a,
.post-type-archive-gesundheitsimpuls .gi-title a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  max-width: 100%;
}

/* Bild-Wrapper und Bild */
.archive.post-type-archive-gesundheitsimpuls .gi-thumb-link,
.post-type-archive-gesundheitsimpuls .gi-thumb-link {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 14px;
  background-color: #f8f8f8;
}
.archive.post-type-archive-gesundheitsimpuls .gi-img,
.post-type-archive-gesundheitsimpuls .gi-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  border-radius: 6px;
  transition: transform .18s ease, opacity .18s ease;
  margin-left: auto;
  margin-right: auto;
}
.archive.post-type-archive-gesundheitsimpuls .gi-box:hover .gi-img,
.post-type-archive-gesundheitsimpuls .gi-box:hover .gi-img {
  transform: scale(1.02);
}

/* Body/Text unter dem Bild */
.archive.post-type-archive-gesundheitsimpuls .gi-body,
.post-type-archive-gesundheitsimpuls .gi-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 0;
  flex: 1 1 auto;
}

/* Excerpt / Textbegrenzung */
.archive.post-type-archive-gesundheitsimpuls .impuls-text,
.post-type-archive-gesundheitsimpuls .impuls-text,
.archive.post-type-archive-gesundheitsimpuls .gi-excerpt,
.post-type-archive-gesundheitsimpuls .gi-excerpt {
  font-size: 0.95rem;
  line-height: 1.45;
  color: #333;
  margin-bottom: 12px;
  flex: 1 0 auto;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer der Kachel */
.archive.post-type-archive-gesundheitsimpuls .gi-footer,
.post-type-archive-gesundheitsimpuls .gi-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  gap: 12px;
}
.archive.post-type-archive-gesundheitsimpuls .gi-date,
.post-type-archive-gesundheitsimpuls .gi-date {
  color: #666;
  font-size: 0.9rem;
}

/* ============================
   BUTTONS – ALLES IN DUNKELGRÜN
   ============================ */

/* Weiterlesen-Button */
.archive.post-type-archive-gesundheitsimpuls .gi-readmore,
.post-type-archive-gesundheitsimpuls .gi-readmore {
  background: #2b6a3f;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background .12s ease, transform .12s ease;
}
.archive.post-type-archive-gesundheitsimpuls .gi-readmore:hover,
.post-type-archive-gesundheitsimpuls .gi-readmore:hover {
  background: #245a35;
  transform: translateY(-1px);
}

/* Pagination */
.archive.post-type-archive-gesundheitsimpuls .gi-pagination,
.post-type-archive-gesundheitsimpuls .gi-pagination {
  margin-top: 32px;
  text-align: center;
}
.archive.post-type-archive-gesundheitsimpuls .gi-pagination .page-numbers,
.post-type-archive-gesundheitsimpuls .gi-pagination .page-numbers {
  display: inline-block;
  margin: 0 6px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #f5f5f5;
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background .12s ease, color .12s ease;
}
.archive.post-type-archive-gesundheitsimpuls .gi-pagination .page-numbers:hover,
.post-type-archive-gesundheitsimpuls .gi-pagination .page-numbers:hover {
  background: #e3f0e8;
  color: #2b6a3f;
}
.archive.post-type-archive-gesundheitsimpuls .gi-pagination .page-numbers.current,
.post-type-archive-gesundheitsimpuls .gi-pagination .page-numbers.current {
  background: #2b6a3f;
  color: #fff;
  box-shadow: 0 6px 18px rgba(43,106,63,0.18);
}

/* Backlink Button */
.gi-backlink {
  text-align: center;
  margin-bottom: 20px;
}
.gi-backlink-btn {
  display: inline-block;
  padding: 10px 18px;
  background: #2b6a3f;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s ease;
}
.gi-backlink-btn:hover {
  background: #245a35;
}

/* =========================
   Layout Container und Sidebar
   ========================= */

.post-type-archive-gesundheitsimpuls #wrapper-content .container,
#wrapper-content .container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Hauptinhalt */
.post-type-archive-gesundheitsimpuls #primary,
.post-type-archive-gesundheitsimpuls .content-area,
#wrapper-content .container #primary,
#primary.content-area {
  flex: 1 1 900px;
  max-width: 900px;
  box-sizing: border-box;
}

/* Sidebar */
.post-type-archive-gesundheitsimpuls #right-sidebar,
.post-type-archive-gesundheitsimpuls .sidebar-container,
#wrapper-content .container #right-sidebar {
  flex: 0 0 380px;
  max-width: 380px;
  display: block;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

/* Schutz gegen Theme-Floats */
.container.gi-layout > aside.widget-area,
#wrapper-content .container aside.widget-area {
  position: relative;
  z-index: 1;
}

/* Responsive */
@media (max-width: 900px) {
  #wrapper-content .container {
    flex-direction: column;
  }
  .gi-archive-grid {
    grid-template-columns: 1fr;
  }
  #right-sidebar {
    max-width: 100%;
    flex: 0 0 100%;
  }
}

/* =========================
   Single Post Styles
   ========================= */

.single-gesundheitsimpuls #wrapper-content .container,
.single-gesundheitsimpuls .container {
  display: block;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.single-gesundheitsimpuls #main-content,
.single-gesundheitsimpuls .content-area {
  width: 100%;
  max-width: 1100px;
  float: none;
  margin: 0 auto;
  box-sizing: border-box;
}

.single-gesundheitsimpuls #right-sidebar,
.single-gesundheitsimpuls .widget-area {
  width: 400px;
  max-width: 400px;
  float: right;
  box-sizing: border-box;
}

.single-gesundheitsimpuls .gi-single-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 25px auto;
}

/* Weitere Responsive */
@media (max-width: 1400px) {
  .archive.post-type-archive-gesundheitsimpuls .gi-archiv {
    gap: 28px 18px;
  }
}
@media (max-width: 1024px) {
  .archive.post-type-archive-gesundheitsimpuls .gi-img {
    max-height: 320px;
  }
}
@media (max-width: 768px) {
  .archive.post-type-archive-gesundheitsimpuls .gi-archiv {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 12px 0;
  }
  .archive.post-type-archive-gesundheitsimpuls .gi-box {
    padding: 14px;
    min-height: auto;
  }
  .archive.post-type-archive-gesundheitsimpuls .gi-header {
    margin-bottom: 14px;
  }
  .archive.post-type-archive-gesundheitsimpuls .gi-img {
    max-height: 240px;
  }
  #wrapper-content .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}
