html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #fff; /* Sanfter Hintergrund */
  color: #444;
  font-family: "Segoe UI", sans-serif;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  width: 100%;
  margin: 100px auto 60px auto;
  padding: 0 40px;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}


main h1 {
  text-align: center;
  color: #b89161; /* Gold-Beige */
  font-size: 30px;
  font-family: 'Playfair Display', serif;
  font-weight: normal;
  margin-bottom: 20px;
}

.main-wrapper {
  width: 100%;
  padding: 00px 20px;
  max-width: 1600px;
  margin: 0 auto;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.grid-item {
  box-sizing: border-box;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  padding: 28px;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #eaeaea;
}



.grid-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.grid-item h2 {
  font-size: 1.2rem;
  margin-bottom: 14px;
  color: #b89161;
  font-weight: normal;
  font-family: 'Playfair Display', serif;
}

.grid-item h3 {
  font-size: 1.2rem;
  margin-bottom: 14px;
  color: #b89161;
  font-weight: normal;
  font-family: 'Playfair Display', serif;
}

.grid-item .placeholder {
  color: #777;
  font-size: 0.95rem;
  line-height: 1.5;
}

.grid-item.large {
  grid-column: span 2;
}

.grid-item {
  /* …deine bisherigen Styles… */
  font-family: "Segoe UI", sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #444;
}


.look-stack-preview {
  position: relative;
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.stack-base,
.stack-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.stack-overlay {
  z-index: 2;
}
.look-preview-title {
  font-weight: bold;
  margin-top: 8px;
  font-size: 1rem;
  color: #222;
}

#online-users {
  align-self: start;
}
.grid-item.grouped {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0;
  background: none;
  box-shadow: none;
  border: none;
}

.grid-subitem {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  padding: 28px;
  border: 1px solid #eaeaea;
}

/* Stapelt "Wer ist online" und "Nächste Veranstaltung" exakt übereinander */
#online-und-event {
  display: flex;
  flex-direction: column;
  gap: 24px; /* Abstand zwischen den Boxen */
}

/* Gleiche Breite beider Boxen */
#online-users,
#next-event {
  width: 100%;
}

/* Höhe angleichen: exakt wie #remember-box */
#online-und-event {
  height: 100%;
}
#online-users,
#next-event {
  flex: 1;
}
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  align-items: start; /* ← DAS ist der Schlüssel */
}
#latest_post {
  grid-column: span 2;
}

.full-width {
  grid-column: 1 / -1;
  background-color: #fdf7f1;
  border-left: 4px solid #b89161;
  font-size: 1rem;
  padding: 16px;
}
#reload-fact {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9em;
  margin-left: 8px;
  color: #b89161;
  transition: transform 0.3s;
}

#reload-fact:hover {
  transform: rotate(90deg);
  color: #8a6d3b;
}

#funfact-box h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}


@media screen and (max-width: 768px) {
  .grid-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .grid-item,
  .grid-item.large,
  .grid-item.grouped,
  .grid-subitem {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .grid-subitem {
    margin-bottom: 12px;
  }

  .look-stack-preview img {
    max-width: 100%;
    height: auto;
  }

  .look-preview {
    flex-direction: column;
    gap: 10px;
  }
}

/* ======================================================
   GAST-ANSICHT – Grid zentrieren
====================================================== */

body.guest-view .grid-container {
  justify-content: center;
}

body.guest-view .grid-item {
  max-width: 600px;
}

body.guest-view .grid-item.large {
  max-width: 900px;
}

body.guest-view #funfact-box {
  max-width: 900px;
}
