/* Humor-Homepage: Grundgestaltung */

:root {
  --fun-bg: #f3f0e9;
  --fun-text: #282722;
  --fun-muted: #77746c;
  --fun-card: #ffffff;
  --fun-border: #ded9cf;
  --fun-accent: #35352f;
}

body {
  background: var(--fun-bg);
  color: var(--fun-text);
}

.fun-home {
  max-width: 760px;
  margin: 6vh auto;
  padding: 24px;
  font-family: system-ui, sans-serif;
}

.fun-home h1 {
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.fun-home .fun-intro {
  font-size: 1.15rem;
  line-height: 1.7;
}

.fun-home .fun-muted {
  color: var(--fun-muted);
}

.fun-home .fun-card {
  margin: 32px 0;
  padding: 24px;
  background: var(--fun-card);
  border: 1px solid var(--fun-border);
  border-radius: 12px;
}

.fun-home .fun-stat {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--fun-border);
}

.fun-home .fun-stat:last-child {
  border-bottom: 0;
}

.fun-home .fun-number {
  font-size: 1.3rem;
  font-weight: 700;
}

.fun-home .fun-button {
  display: inline-block;
  margin-top: 16px;
  padding: 13px 20px;
  border: 0;
  border-radius: 7px;
  background: var(--fun-accent);
  color: white;
  font-size: 1rem;
  cursor: pointer;
}

.fun-home .fun-button:hover {
  opacity: 0.85;
}

.fun-home .fun-progress {
  height: 8px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 20px;
  background: #dedbd4;
}

.fun-home .fun-progress-bar {
  width: 0;
  height: 100%;
  background: #77746c;
  border-radius: inherit;
}

.fun-home .fun-result {
  margin-top: 18px;
  padding: 14px;
  background: #ebe7df;
  border-radius: 8px;
}

@media (max-width: 600px) {
  .fun-home {
    margin: 3vh auto;
    padding: 18px;
  }

  .fun-home .fun-card {
    padding: 18px;
  }
}


/* Joomla-Rahmen auf der Startseite ausblenden */
.itemid-102 .container-header,
.itemid-102 .container-footer,
.itemid-102 .container-sidebar-left,
.itemid-102 .container-sidebar-right,
.itemid-102 .container-top-a,
.itemid-102 .container-top-b,
.itemid-102 .container-bottom-a,
.itemid-102 .container-bottom-b {
  display: none !important;
}

/* Beitragsüberschrift und Autoren-/Kategorieinformationen */
.itemid-102 .com-content-article__header,
.itemid-102 .article-info,
.itemid-102 .article-info-term,
.itemid-102 .content-category,
.itemid-102 .page-header,
.itemid-102 .breadcrumb {
  display: none !important;
}

/* Oberen Abstand reduzieren */
.itemid-102 .container-component {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
/* Zufälliger Fotohintergrund nur auf der Startseite */
body.itemid-102 {
  background: transparent !important;
  position: relative;
  isolation: isolate;
}

body.itemid-102::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(
      rgba(20, 24, 30, 0.40),
      rgba(20, 24, 30, 0.40)
    ),
    var(--homepage-background, none);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

body.itemid-102 .site-grid,
body.itemid-102 .container-component {
  background: transparent !important;
}
/* Lesbarkeit der Texte ausserhalb der Karten verbessern */
.fun-home > p,
.fun-home > h1,
.fun-home > .fun-intro {
  display: table;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(20, 24, 30, 0.65);
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Etwas Abstand zwischen den Textflächen */
.fun-home > p {
  margin-top: 10px;
  margin-bottom: 10px;
}

.fun-home > .fun-intro {
  line-height: 1.6;
}

/* Kleine Überschrift oben */
.fun-home > p:first-child {
  color: #e8e8e8 !important;
}

/* Gästebuch-Button auf der Startseite */
body.itemid-102 .fun-guestbook {
  display: inline-block;
  margin-top: 12px;
  padding: 13px 24px;
  background: #1769aa;
  color: #ffffff !important;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none !important;
  text-align: center;
  border: 2px solid rgba(255,255,255,0.75);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
  transition: background 0.2s ease, transform 0.2s ease,
              box-shadow 0.2s ease;
}

body.itemid-102 .fun-guestbook:hover {
  background: #0d4f83;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 7px 18px rgba(0,0,0,0.3);
}
