.ajax-posts-spinner svg {
  animation: spin 1s linear infinite;
  margin: 0 auto;
  display: block;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Fade Effekte */
.ajax-posts-grid.fade-out {
  opacity: 0.3;
  transition: opacity 0.2s ease-out;
}

.ajax-posts-grid.fade-in {
  opacity: 1;
  transition: opacity 0.2s ease-in;
}

/* Grid Layout */
.ajax-posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 35px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

/* Tablet: 2 Spalten */
@media (max-width: 1024px) {
  .ajax-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Smartphone: 1 Spalte */
@media (max-width: 600px) {
  .ajax-posts-grid {
    grid-template-columns: 1fr;
  }
}

.ajax-post-tile {
  width: 100%;
  max-width: 300px; /* oder deine gewünschte Breite */
  margin: 0 auto;
}

.tile-image {
  width: 100%;
  aspect-ratio: 16 / 9; /* Seitenverhältnis festlegen (z.B. 16:9) */
  overflow: hidden;
  position: relative;
  border-radius: 0px; /* optional, abgerundete Ecken */
}

.tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Bild skaliert & beschneidet passend */
  display: block;
  transition: transform 0.3s ease;
}

/* Hover-Effekt: Bild verkleinert sich leicht */
.tile-image:hover img {
  transform: scale(0.95);
}

.tile-title {
  font-weight: 700;
  margin: 12px 0 8px;
  font-size: 1.2rem;
  color: #9DB33E;
}
.tile-title a {
	color: #9DB33E;
}
.tile-title:hover a {
	color: #000;
}

.tile-content {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 12px;
  line-height: 1.4;
}

.tile-readmore {
  display: inline-block;
padding: 8px 0px;
background-color: transparent;
color: #000;
border-radius: 0px;
text-decoration: none;
font-weight: 400;
font-size: 1em;
transition: background-color 0.3s ease;
cursor: pointer;
}

.tile-readmore:hover {
  color: #9DB33E;
}

/* Button und Spinner in der Steuerung */
.ajax-posts-controls {
  text-align: center;
  margin-top: 10px;
}

.ajax-posts-load {
  background-color: #FFF;
  
  text-transform: uppercase;
  fill: #FFFFFF;
  color: #9DB33E;
  border-style: solid;
  border-width: 3px 3px 3px 3px;
  border-color: #9DB33E;
  border-radius: 45px 45px 45px 45px;
  padding: 12px 24px 12px 24px;

  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}
.ajax-posts-load .finep-button-icon { margin-left: 10px; }

.ajax-posts-load:hover:not(:disabled) {
  background-color: #9DB33E;
  color: #FFF
}

.ajax-posts-load:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  display: none;
  visibility: hidden;
}

/* Spinner Styles */
.ajax-posts-spinner svg {
  width: 32px;
  height: 32px;
  margin-top: 10px;
}

.ajax-posts-spinner {
  width: 32px;
  height: 32px;
  border: 4px solid rgba(128, 128, 128, 0.1); /* hellgrauer Hintergrundring */
  border-top: 4px solid #9DB33E;           /* dunkler aktiver Ring */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
  display: none; /* wird per JS sichtbar */
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Animation für Kacheln: nur Fade-In */
.ajax-post-tile {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

.ajax-post-tile:nth-child(1) {
  animation-delay: 0s;
}
.ajax-post-tile:nth-child(2) {
  animation-delay: 0.15s;
}
.ajax-post-tile:nth-child(3) {
  animation-delay: 0.3s;
}
.ajax-post-tile:nth-child(4) {
  animation-delay: 0.45s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}