/* =========================================================
   USER.CSS – CLEAN FINAL
   Cassiopeia_extended / Joomla 6
   Krippenfiguren Freiamt
   ========================================================= */

/* -------------------------
   1) Variablen
   ------------------------- */
:root {
  --frame-bg: #FAF7F2;
  --card-bg: #ffffff;

  --frame-max: 1400px;

  --gap-desktop: 28px;
  --gap-mobile: 14px;

  --radius-desktop: 20px;
  --radius-mobile: 14px;

  --text: #2E2E2E;

  --wood: #A67C52;
  --sand: #E8DFD3;
  --warmwhite: #FAF7F2;
}

/* -------------------------
   2) Basis
   ------------------------- */
html,
body {
  margin: 0;
  padding: 0;
}

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

/* -------------------------
   3) Seitenrahmen
   ------------------------- */
.site,
.site-grid {
  max-width: var(--frame-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gap-desktop);
  padding-right: var(--gap-desktop);
  box-sizing: border-box;
}

/* -------------------------
   4) Menü / Header
   ------------------------- */
.container-header {
  max-width: calc(var(--frame-max) - (var(--gap-desktop) * 2)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  background: var(--wood) !important;
  background-image: none !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.container-header .container-nav,
.container-header nav,
.container-header .moduletable,
.container-header .mod-menu {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  background: var(--wood) !important;
  box-sizing: border-box !important;
}

.container-header .mod-menu,
.container-header ul.mod-menu,
.container-header nav ul {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 0.7rem !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0.7rem 1rem !important;
}

.container-header .mod-menu li,
.container-header ul.mod-menu li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.container-header .mod-menu a,
.container-header ul.mod-menu a,
.container-header nav a {
  display: inline-block !important;
  color: var(--warmwhite) !important;
  background: transparent !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  padding: 0.6rem 0.95rem !important;
  border-radius: 12px !important;
}

.container-header .mod-menu a:hover,
.container-header ul.mod-menu a:hover,
.container-header nav a:hover,
.container-header .active > a,
.container-header a.active {
  color: var(--text) !important;
  background: var(--sand) !important;
}

/* -------------------------
   5) Hero Startseite
   ------------------------- */
.hero-wrapper {
  padding: 0;
}

.hero-wrapper .hero.hero--bg {
  position: relative;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;

  min-height: 36vh;
  padding: 4.8rem 3rem 3.5rem 3rem;

  background-image: url("/images/hero/hero-startseite.jpg");
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  background-color: var(--frame-bg);
}

.hero-wrapper .hero.hero--bg::before {
  display: none !important;
}

.hero-wrapper .hero.hero--bg .hero-content {
  max-width: 620px;
  color: var(--text);
}

.hero-wrapper .hero.hero--bg h1 {
  margin: 0 0 0.75rem 0;
  line-height: 1.05;
  color: var(--text);
}

.hero-wrapper .hero.hero--bg .hero-subtitle,
.hero-wrapper .hero.hero--bg p {
  margin: 0;
  opacity: 0.92;
  color: var(--text);
}

/* -------------------------
   6) Hauptinhalt
   ------------------------- */
main {
  background: var(--card-bg);
  border-radius: var(--radius-desktop);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
  padding: 3rem;
}

/* -------------------------
   7) Breadcrumb optisch zurückhaltend
   Falls du Breadcrumbs ganz ausblendest, ist dieser Teil egal.
   ------------------------- */
.breadcrumb,
.breadcrumb ul,
.breadcrumb li,
.breadcrumb a {
  background: transparent !important;
  color: inherit !important;
  border-radius: 0 !important;
}

/* -------------------------
   8) Responsive
   ------------------------- */
@media (min-width: 769px) and (max-width: 1200px) {
  .hero-wrapper .hero.hero--bg {
    padding-top: 7.5rem;
    min-height: 52vh;
  }
}

@media (max-width: 768px) {
  .site,
  .site-grid {
    padding-left: var(--gap-mobile);
    padding-right: var(--gap-mobile);
  }

  .container-header {
    max-width: calc(100% - (var(--gap-mobile) * 2)) !important;
  }

  .container-header .mod-menu,
  .container-header ul.mod-menu,
  .container-header nav ul {
    justify-content: center !important;
    gap: 0.35rem !important;
    padding: 0.6rem !important;
  }

  .container-header .mod-menu a,
  .container-header ul.mod-menu a,
  .container-header nav a {
    font-size: 0.9rem !important;
    padding: 0.45rem 0.7rem !important;
  }

  main {
    border-radius: var(--radius-mobile);
    padding: 1.25rem;
  }

  .hero-wrapper .hero.hero--bg {
    min-height: 62vh;
    padding: 1.2rem 1rem;
    background-position: center right;
  }

  .hero-wrapper .hero.hero--bg .hero-content {
    background: rgba(250,247,242,0.70);
    padding: 10px;
    border-radius: 12px;
    max-width: 92%;
  }

  .hero-wrapper .hero.hero--bg h1 {
    font-size: 16px;
    line-height: 1.15;
    margin: 0 0 0.4rem 0;
  }

  .hero-wrapper .hero.hero--bg .hero-subtitle,
  .hero-wrapper .hero.hero--bg p {
    font-size: 12px;
    line-height: 1.3;
  }
}
/* Menübalken auf Bildbreite bringen */
.container-header {
  max-width: calc(var(--frame-max) - (var(--gap-desktop) * 2)) !important;
  width: calc(100% - (var(--gap-desktop) * 2)) !important;
}

.container-header .container-nav,
.container-header nav,
.container-header .moduletable {
  width: 100% !important;
}

.container-header .mod-menu {
  justify-content: center !important;
}
/* Menüschrift grösser */
.container-header .mod-menu a,
.container-header ul.mod-menu a,
.container-header nav a {
  font-size: 1.45rem !important;
}
/* Menü-Balken etwas schmäler */
.container-header .mod-menu,
.container-header ul.mod-menu,
.container-header nav ul {
  padding-top: 0.15rem !important;
  padding-bottom: 0.15rem !important;
}

.container-header .mod-menu a,
.container-header ul.mod-menu a,
.container-header nav a {
  padding-top: 0.15rem !important;
  padding-bottom: 0.15rem !important;
}
/* Aktive Menü-Linie entfernen */
.container-header .mod-menu .active::after,
.container-header .mod-menu li.active::after,
.container-header .mod-menu a.active::after,
.container-header .mod-menu .current::after,
.container-header .mod-menu a::after {
  display: none !important;
}
/* =========================================================
   STARTSEITE – 3 BILD-KACHELN
   ========================================================= */

.home-teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 0;
}

.home-teaser-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  min-height: 230px;
  text-decoration: none !important;
  box-shadow: 0 10px 26px rgba(0,0,0,0.10);
  background: var(--wood);
}

.home-teaser-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.home-teaser-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.24),
    rgba(0,0,0,0.00),
    rgba(0,0,0,0.00)
  );
  z-index: 1;
}

.home-teaser-overlay {
  position: absolute;
  left: 1.4rem;
  right: 1.4rem;
  bottom: 1.3rem;
  z-index: 2;
  color: #ffffff;
  text-align: center;
}

.home-teaser-overlay h2 {
  margin: 0 0 0.25rem 0;
  color: #ffffff;
  font-size: 2.1rem;
  line-height: 1;
}

.home-teaser-overlay p {
  margin: 0;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 500;
}

.home-teaser-overlay p::after {
  content: "";
  display: block;
  width: 70px;
  height: 2px;
  margin: 0.55rem auto 0 auto;
  background: rgba(255,255,255,0.75);
}

.home-teaser-card:hover img {
  transform: scale(1.04);
}

/* Mobile */
@media (max-width: 900px) {
  .home-teaser-grid {
    grid-template-columns: 1fr;
  }

  .home-teaser-card img {
    height: 230px;
  }
}
/* =========================================================
   STARTSEITE – JOOMLA TITEL UND DETAILS AUSBLENDEN
   ========================================================= */

body.itemid-101 main .page-header,
body.itemid-101 main .item-title,
body.itemid-101 main .article-info,
body.itemid-101 main .article-info-term,
body.itemid-101 main dl.article-info,
body.itemid-101 main .createdby,
body.itemid-101 main .category-name,
body.itemid-101 main .published,
body.itemid-101 main .hits,
body.itemid-101 main .icons {
  display: none !important;
}
/* Startseite: Joomla-Titel/Details ausblenden, aber Kachel-Titel sichtbar lassen */
body.itemid-101 main .page-header,
body.itemid-101 main .article-info,
body.itemid-101 main .article-info-term,
body.itemid-101 main dl.article-info,
body.itemid-101 main .createdby,
body.itemid-101 main .category-name,
body.itemid-101 main .published,
body.itemid-101 main .hits,
body.itemid-101 main .icons {
  display: none !important;
}

/* Kachel-Titel ausdrücklich sichtbar lassen */
body.itemid-101 main .home-teaser-overlay h2,
body.itemid-101 main .home-teaser-overlay p {
  display: block !important;
}
/* =========================================================
   STARTSEITE – WEISSER BEREICH AUF HERO-BREITE
   ========================================================= */

body.itemid-101 main {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  border-radius: 16px !important;
  box-sizing: border-box !important;
}

/* Innenabstand des weissen Bereichs etwas ruhiger */
body.itemid-101 main {
  padding: 2.6rem !important;
}

/* Mobile */
@media (max-width: 768px) {
  body.itemid-101 main {
    padding: 1.2rem !important;
    border-radius: 14px !important;
  }
}
/* Startseite: weisser Kachelbereich exakt breiter ziehen */
body.itemid-101 main {
  width: calc(100% + 36px) !important;
  max-width: calc(100% + 36px) !important;
  margin-left: -18px !important;
  margin-right: -18px !important;
}
/* Startseite: weisser Bereich ohne runde Ecken */
body.itemid-101 main {
  border-radius: 0 !important;
}

/* Bildkacheln etwas weniger rund */
.home-teaser-card,
.home-teaser-card img {
  border-radius: 10px !important;
}
/* Startseite: Abstand zwischen Hero und Kachelbereich verkleinern */
body.itemid-101 main {
  margin-top: -10px !important;
}
/* Startseite: weisser Bereich kompakter */
body.itemid-101 main {
  padding-top: 2rem !important;
  padding-bottom: 2rem !important;
}
/* =========================================================
   STARTSEITE – KACHELBEREICH FINAL AUSRICHTEN
   ========================================================= */

body.itemid-101 main {
  padding: 2rem 2.6rem !important;
}

body.itemid-101 .home-teaser-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.6rem !important;
  margin: 0 !important;
  width: 100% !important;
}

body.itemid-101 .home-teaser-card {
  height: 220px !important;
  min-height: 220px !important;
}

body.itemid-101 .home-teaser-card img {
  height: 220px !important;
}
/* =========================================================
   STARTSEITE – KACHELBEREICH FEINSCHLIFF
   ========================================================= */

body.itemid-101 main {
  padding: 1.6rem 2.4rem !important;
  margin-top: -10px !important;
  border-radius: 0 !important;
}

body.itemid-101 .home-teaser-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.5rem !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: stretch !important;
}

body.itemid-101 .home-teaser-card {
  height: 225px !important;
  min-height: 225px !important;
  margin: 0 !important;
}

body.itemid-101 .home-teaser-card img {
  height: 225px !important;
  width: 100% !important;
  object-fit: cover !important;
}

/* Falls Joomla/Editor versteckte Absatzabstände erzeugt */
body.itemid-101 main p {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
/* Startseite: Kacheln etwas breiter und ruhiger ausrichten */
body.itemid-101 main {
  padding-left: 1.6rem !important;
  padding-right: 1.6rem !important;
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}

body.itemid-101 .home-teaser-grid {
  gap: 1.4rem !important;
}