/*
Theme Name:     NeoLog Child Theme
Theme URI:      https://neolog.info/
Description:    Individuelle Optimierungen für Layout, UX und SEO
Author:         Ingrid Senft
Author URI:     https://neolog.info/
Template:       astra
Version:        1.0.1
*/

/* ─────────────────────────────────────────────── */
/* 1. Globale Textdarstellung und Silbentrennung   */
/* ─────────────────────────────────────────────── */

body {
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  word-break: normal;
  overflow-wrap: break-word;
}

button,
a.button,
.wp-block-button__link,
.uagb-button__link {
  hyphens: none !important;
  white-space: normal;
}

.wp-block-button a,
button a,
a.button,
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
.wp-block-button a:hover,
button a:hover,
a.button:hover,
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
  text-decoration: none !important;
}

/* ───────────────────────────────────────────────────────────── */
/* 2. Einheitliche Höhe: Suchfeld und Suchbutton (Sidebar etc.)  */
/* ───────────────────────────────────────────────────────────── */

.wp-block-search__input {
  height: 40px;
}

.wp-block-search__button {
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wp-block-search__button:hover {
  border: 1px solid var(--ast-global-color-6) !important;
}

#wp-block-search__input-1 {
  background-color: var(--ast-global-color-4) !important;
  border-color: var(--ast-global-color-0) !important;
  color: var(--ast-global-color-3) !important;
  box-shadow: none !important;
  outline: none !important;
}

/* ─────────────────────────────────────────────── */
/* 3. Style für Astra Color Mode Switcher Button   */
/* ─────────────────────────────────────────────── */

:where(button.ast-switcher-button) {
  all: unset !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  color: var(--ast-global-color-0) !important;
  transition: color 0.3s ease, fill 0.3s ease !important;
}

:where(button.ast-switcher-button:hover) {
  color: var(--ast-global-color-6) !important;
}

:where(button.ast-switcher-button:focus),
:where(button.ast-switcher-button:focus-visible),
:where(button.ast-switcher-button:active) {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
}

:where(button.ast-switcher-button svg) {
  fill: var(--ast-global-color-0) !important;
  transition: fill 0.3s ease !important;
}

:where(button.ast-switcher-button:hover svg) {
  fill: var(--ast-global-color-6) !important;
}

@media (max-width: 767px) {
  .ast-switcher-button {
    font-size: 0 !important;
  }
}

/* ───────────────────────────────────────────────────────────── */
/* 4. Suchergebnisse: Seiten vs. Beiträge visuell trennen       */
/* ───────────────────────────────────────────────────────────── */

.search .type-page .post-thumb,
.search .type-page .ast-blog-featured-section {
  display: none;
}

.search .type-page .entry-meta {
  display: none;
}

.search .type-page .ast-blog-featured-section + .entry-content {
  margin-top: 0;
}

/* ───────────────────────────────────────────────────────────── */
/* 5. Ähnliche Beiträge (Related Posts) – Gestaltung & Hover    */
/* ───────────────────────────────────────────────────────────── */

.ast-related-posts-wrapper .post-thumb {
  position: relative;
}

.ast-related-posts-wrapper .post-thumb img {
  transition: transform 0.5s ease;
  transform-origin: center center;
}

.ast-related-posts-wrapper .post-thumb:hover img {
  transform: scale(1.10);
}

.ast-related-posts-wrapper .ast-related-post {
  border: 1px solid var(--ast-global-color-7);
  border-radius: 2px;
  background-color: var(--ast-global-color-4);
  transition: box-shadow 0.3s ease;
  padding: 20px;
}

/* ─────────────────────────────────────────────── */
/* 6. Einzelbeitrag: Zoom-In bei Beitragsbildern   */
/* ─────────────────────────────────────────────── */

.single-post .post-thumb {
  position: relative;
}

.single-post .post-thumb img {
  transition: transform 0.5s ease;
  transform-origin: center center;
  border-radius: 2px;
}

.single-post .post-thumb:hover img {
  transform: scale(1.10);
}



/* ─────────────────────────────────────────────── */
/* 8. Keine Ergebnisanzeige bei „Nichts gefunden“ */
/* ─────────────────────────────────────────────── */

body.search-no-results .no-results {
  display: none !important;
}

/* ─────────────────────────────────────────────── */
/* 9. Kategorien-Button-Grid                       */
/* ─────────────────────────────────────────────── */

.neolog-kategorien-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.neolog-kategorien-grid a.button {
  flex: 0 1 auto;
  text-align: center;
  white-space: nowrap;
  margin-bottom: 10px;
}

/* ─────────────────────────────────────────────── */
/* 10. Einzelbild mit Zoom-In im Container         */
/* ─────────────────────────────────────────────── */

img.attachment-large {
  transition: transform 0.5s ease;
  transform-origin: center center;
  display: block;
  width: 100%;
  height: auto;
}

img.attachment-large:hover {
  transform: scale(1.10);
}

body.single-post .sidebar-main .widget {
  padding: 0 !important;
}

/* ───────────────────────────────────────────── */
/* 11. Fluent Forms – Corporate Styling          */
/* ───────────────────────────────────────────── */

/* Pflichtsterne markieren */
form label::after {
  color: var(--ast-global-color-6) !important;
  font-weight: bold;
}

/* Fehlermeldungen einheitlich */
form .error,
form .text-danger,
form .alert {
  color: var(--ast-global-color-6) !important;
  font-weight: normal;
}

.ff-el-group .ff-el-form-check + .ff-el-group .error {
  color: var(--ast-global-color-6) !important;
}

/* Formularbutton im NeoLog-Stil */
.fluentform .ff-btn-submit,
.fluentform .ff-btn-submit::before,
.fluentform .ff-btn-submit::after {
  background-color: var(--ast-global-color-0) !important;
  color: var(--ast-global-color-4) !important;
  border: 1px solid var(--ast-global-color-0) !important;
  border-radius: 2px !important;
  padding: 10px;
  text-align: center;
  font-size: 1em !important;

  /* Visuelle Vereinfachung */
  transition: none !important;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
  background-blend-mode: normal !important;
  text-shadow: none !important;
  outline: none !important;
}

/* Hover-Zustand für Submit-Button */
.fluentform .ff-btn-submit:hover,
.fluentform .ff-btn-submit:focus {
  background-color: var(--ast-global-color-6) !important;
  color: var(--ast-global-color-4) !important;
  border-color: var(--ast-global-color-6) !important;
}

/* Grundzustand der Checkbox */
.fluentform input[type="checkbox"].ff-el-form-check-input {
  background-color: var(--ast-global-color-4) !important;
  border: 1px solid var(--ast-global-color-6) !important;
  border-radius: 2px !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  width: 1em !important;
  height: 1em !important;
  position: relative !important;
}

/* Aktivierter Zustand – Haken sichtbar */
.fluentform input[type="checkbox"].ff-el-form-check-input:checked::before {
  content: "✔" !important;
  color: var(--ast-global-color-6) !important;
  font-size: 0.85em !important;
  font-weight: bold !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  line-height: 1 !important;
  pointer-events: none !important;
}

/* Aktivierter Zustand – gleiche Optik beibehalten */
.fluentform input[type="checkbox"].ff-el-form-check-input:checked {
  background-color: var(--ast-global-color-4) !important;
  border-color: var(--ast-global-color-6) !important;
}


/* ───────────────────────────────────────────── */
/* 12. Container/Post Grid – bereinigt            */
/* ───────────────────────────────────────────── */

p {
  margin-top: 0 !important;
  margin-bottom: 0 !important; 
}

.ast-button {
  margin-top: 1em;
}

.wp-block-uagb-icon-list .uagb-icon-list__source-wrap {
  padding-top: 5px !important;
}

.uagb-ifb-title a {
  text-decoration: none !important;
}

details summary,
.wp-block-details summary {
  font-weight: 700;
  color: var(--ast-global-color-0);
}

.wp-block-uagb-post-grid .uagb-post__image img {
  filter: grayscale(100%);
}

.wp-block-uagb-post-grid .uagb-post__inner-wrap:hover .uagb-post__image img {
  filter: grayscale(0%);
}

.uagb-post__image-wrap {
  position: relative;
}

.uag-post__image {
  position: relative;
}

.wp-block-uagb-post-grid .uagb-post__image {
  position: relative !important;
}

/* Verhindert, dass der Slider die Containerbreite sprengt */
.wp-block-uagb-slider .swiper-wrapper {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Jedes einzelne Slide soll sich ebenfalls dem Container anpassen */
.wp-block-uagb-slider .swiper-slide {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.wp-block-uagb-slider-slide.uagb-slider-slide-duplicate {
  display: none !important;
}

/* Nur Hintergrundfarbe der Pfeilbuttons in der Spectra Image Gallery */
.spectra-image-gallery__control-arrows {
  background-color: var(--ast-global-color-0) !important;
}
.spectra-image-gallery__control-arrows:hover {
  background-color: var(--ast-global-color-0) !important;
}

/* iOS-Zoom verhindern bei Suchfeldern im Menü (auch Spectra/Astra Offcanvas etc.) */
header input[type="search"],
header .ast-search-menu-input,
.ast-header-break-point .ast-search-icon input[type="search"],
.ast-header-break-point .ast-search-icon .search-field {
  font-size: 16px !important;
}

/* Nur Slick-Pfeile einfärben – Hintergrund in ast-global-color-0 */
.slick-arrow {
  background-color: var(--ast-global-color-0) !important;
}

/* 1. Normalzustand: Bild mit Rand */
.ast-blog-featured-section .wp-post-image {
  border: 1px solid var(--ast-global-color-5);
  border-radius: 2px;
  box-sizing: border-box;
}

.post-thumb-img-content {
  overflow: hidden;
}

.uagb-post__image {
  overflow: hidden;
}

/* ───────────────────────────────────────────────────────────── */
/* 7. Containerbreite Blog / Archiv / Beiträge (Astra Basis)     */
/* ───────────────────────────────────────────────────────────── */

.page .ast-container,
body.blog .ast-container,
body.archive .ast-container,
body.search .ast-container,
body.single-post .ast-container,
body.error404 .ast-container {
  width: clamp(1120px, 90%, 2200px) !important;
  margin-left: auto;
  margin-right: auto;
}