/* Wyler am Teich – gemeinsames Stylesheet
   Nachbau des bisherigen Joomla-Auftritts (Farben/Schriften vom Live-Crawl übernommen) */

@import url('https://fonts.googleapis.com/css?family=Oswald:300,400,700&display=swap');
@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&display=swap');

:root {
  --bg: #6e7a85;
  --panel: #879aab;
  --panel-dark: #545f69;
  --accent: #baf5c5;
  --accent-active: #5e7817;
  --text: #ffffff;
  --text-dim: #dbe3e8;
  --max-width: 1140px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, .nav-list {
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 400;
  color: var(--accent);
  text-transform: none;
}

h2 { font-size: 1.4rem; margin: 0 0 .75rem; }
h3 { font-size: 1.1rem; margin: 1rem 0 .4rem; color: var(--accent); }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Header ---------- */
.site-header {
  background: transparent;
  padding: 1.25rem 0;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }

.brand { display: flex; align-items: center; gap: .75rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .logo-img { height: 56px; width: auto; display: block; }

.header-account a {
  color: var(--text-dim);
  font-size: .85rem;
  border: 1px solid rgba(255,255,255,.35);
  padding: .4rem .9rem;
  border-radius: 2px;
}
.header-account a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* ---------- Navigation ---------- */
.main-nav {
  background: var(--panel);
  box-shadow: 0 0 4px rgba(0,0,0,.25);
}
.nav-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list > li {
  position: relative;
}
.nav-list > li > a {
  display: block;
  padding: .85rem 1.1rem;
  color: var(--text);
  font-size: .95rem;
  letter-spacing: .02em;
}
.nav-list > li > a:hover,
.nav-list > li.active > a {
  background: var(--accent-active);
  color: #fff;
  text-decoration: none;
}
.nav-list .has-children > a::after {
  content: "▾";
  font-size: .7em;
  margin-left: .35em;
  opacity: .8;
}

.sub-nav {
  list-style: none;
  margin: 0;
  padding: .35rem 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--panel-dark);
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
  z-index: 20;
  display: none;
}
.nav-list .has-children:hover .sub-nav,
.nav-list .has-children:focus-within .sub-nav {
  display: block;
}
.sub-nav a {
  display: block;
  padding: .55rem 1.1rem;
  color: var(--text-dim);
  font-size: .9rem;
  white-space: nowrap;
}
.sub-nav a:hover { background: var(--accent-active); color: #fff; text-decoration: none; }

/* mobile nav toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  padding: .6rem .3rem;
  cursor: pointer;
}

/* ---------- Page title ---------- */
.page-title {
  background: rgba(0,0,0,.08);
  padding: 1.1rem 0;
}
.page-title h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 300;
}

/* ---------- Slideshow ---------- */
.slideshow {
  position: relative;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  background: #3f4750;
  border-bottom: 1px solid rgba(0,0,0,.15);
}
.slideshow .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .9s ease;
}
.slideshow .slide.is-active { opacity: 1; }

.slideshow .slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.32);
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
}
.slideshow .slide-nav:hover { background: rgba(0,0,0,.55); }
.slideshow .slide-nav.prev { left: 0; }
.slideshow .slide-nav.next { right: 0; }

.slideshow .slide-dots {
  position: absolute;
  bottom: .7rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: .4rem;
  z-index: 5;
}
.slideshow .slide-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255,255,255,.5);
  cursor: pointer;
}
.slideshow .slide-dots button.is-active { background: #fff; }

@media (max-width: 600px) {
  .slideshow { aspect-ratio: 4 / 3; }
}

/* ---------- Content ---------- */
main { padding: 2rem 0 1rem; }

.intro { margin-bottom: 2rem; }
.intro p { color: var(--text-dim); }

.content-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.panel { background: rgba(255,255,255,.04); padding: 1.25rem 1.4rem; border-radius: 2px; }

.event-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.event-list li {
  padding: .5rem 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
  color: var(--text-dim);
}
.event-list li:last-child { border-bottom: none; }
.event-list .label { color: var(--text); font-weight: 600; }

details.past-events { margin-top: .5rem; }
details.past-events summary {
  cursor: pointer;
  color: var(--accent);
  font-family: "Oswald", sans-serif;
  padding: .4rem 0;
}
details.past-events ul { list-style: none; margin: 0; padding: 0; }
details.past-events li {
  padding: .35rem 0;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .92rem;
}

.news-item { margin-bottom: 1.5rem; }
.news-item:last-child { margin-bottom: 0; }
.news-item p { color: var(--text-dim); margin: .3rem 0; }
.news-item img { max-width: 100%; border-radius: 2px; margin: .5rem 0; }
.news-photo { max-width: 100%; border-radius: 2px; margin: .5rem 0; }
.news-photos { display: flex; gap: .75rem; flex-wrap: wrap; margin: .5rem 0; }
.news-photos img { max-width: 100%; height: auto; border-radius: 2px; flex: 1 1 240px; }

/* ---------- Footer ---------- */
.site-footer {
  background: rgba(0,0,0,.12);
  padding: 1rem 0;
  margin-top: 2rem;
  font-size: .85rem;
  color: var(--text-dim);
}

/* ---------- Generic content helpers (used on inner pages) ---------- */
.link-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.link-list li { padding: .35rem 0; border-bottom: 1px solid rgba(255,255,255,.1); color: var(--text-dim); }

.table-scroll { overflow-x: auto; margin-bottom: 1.5rem; }
.table-scroll .data-table { margin-bottom: 0; }
.data-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.data-table td, .data-table th { padding: .6rem .75rem; border-bottom: 1px solid rgba(255,255,255,.08); color: var(--text-dim); text-align: left; }
.data-table th { color: var(--accent); font-family: "Oswald", sans-serif; font-weight: 400; }
.data-table tbody tr:nth-child(odd) { background: rgba(255,255,255,.07); }
.data-table tbody tr:nth-child(even) { background: rgba(0,0,0,.06); }
.data-table tbody tr:hover { background: rgba(186,245,197,.1); }

/* ---------- Dokumente: Kategorien ---------- */
.doc-category-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
}
.doc-category {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1rem;
  background: rgba(255,255,255,.06);
  border-radius: 2px;
  color: var(--text);
  font-family: "Oswald", sans-serif;
}
.doc-category:hover { background: var(--accent-active); color: #fff; text-decoration: none; }
.doc-category-icon { font-size: 1.3rem; }

/* ---------- Dokumente: Dateiliste ---------- */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-row {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .6rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.doc-row:last-child { border-bottom: none; }
.doc-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 42px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Oswald", sans-serif;
  font-size: .65rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
}
.doc-name { flex: 1 1 auto; color: var(--text); }
.doc-size { flex: 0 0 auto; color: var(--text-dim); font-size: .85rem; min-width: 4.5em; text-align: right; }
.doc-download {
  flex: 0 0 auto;
  background: rgba(255,255,255,.1);
  color: var(--text);
  padding: .4rem .9rem;
  border-radius: 2px;
  font-size: .85rem;
}
.doc-download:hover { background: var(--accent-active); color: #fff; text-decoration: none; }

@media (max-width: 600px) {
  .doc-row { flex-wrap: wrap; }
  .doc-size { order: 3; margin-left: calc(36px + .9rem); }
  .doc-download { order: 4; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { margin-bottom: 1.25rem; font-size: .9rem; color: var(--text-dim); }
.breadcrumb .sep { margin: 0 .35rem; opacity: .6; }

/* ---------- Fotogalerie: Kategorien ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.category-tile {
  position: relative;
  height: 150px;
  border-radius: 2px;
  background: rgba(255,255,255,.06) center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.category-tile::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.65) 100%);
}
.category-tile-label {
  position: relative;
  z-index: 1;
  padding: .6rem .8rem;
  color: #fff;
  font-family: "Oswald", sans-serif;
}
.category-tile-label .count { color: var(--text-dim); font-family: "Open Sans", sans-serif; font-size: .8rem; margin-left: .3rem; }
.category-tile:hover { text-decoration: none; outline: 2px solid var(--accent-active); }
.category-tile-lock {
  position: absolute; top: .5rem; right: .6rem; z-index: 1;
  font-size: 1.1rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6));
}

/* ---------- Fotogalerie: Bilder ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .6rem;
}
.photo-item {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(0,0,0,.2);
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.photo-item:hover img { transform: scale(1.06); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.lightbox.is-open { display: flex; }
body.lightbox-locked { overflow: hidden; }
.lightbox-img { max-width: 90vw; max-height: 85vh; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,.08);
  color: #fff;
  border: none;
  cursor: pointer;
}
.lightbox-close { top: 1rem; right: 1rem; width: 42px; height: 42px; font-size: 1.6rem; line-height: 1; border-radius: 50%; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 1.8rem; }
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.2); }
.lightbox-caption { position: absolute; bottom: 1rem; left: 0; right: 0; text-align: center; color: var(--text-dim); font-size: .85rem; }

/* ---------- Login ---------- */
.login-panel { max-width: 420px; }
.login-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.25rem; }
.login-form label { display: flex; flex-direction: column; gap: .35rem; color: var(--text-dim); font-size: .9rem; }
.login-form input {
  padding: .55rem .7rem;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 2px;
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 1rem;
}
.login-form input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.login-form button {
  align-self: flex-start;
  padding: .6rem 1.4rem;
  background: var(--accent-active);
  color: #fff;
  border: none;
  border-radius: 2px;
  font-family: "Oswald", sans-serif;
  font-size: 1rem;
  cursor: pointer;
}
.login-form button:hover { background: #6c8c1c; }
.login-error { color: #e2574c; }
.login-notice { color: var(--accent); }

/* ---------- Artikel mit Bilder-Seitenspalte (Geschichte) ---------- */
.article-with-sidebar { display: grid; grid-template-columns: 1fr 260px; gap: 2rem; align-items: start; }
.article-with-sidebar .article-main blockquote {
  margin: 1rem 0; padding: .75rem 1rem; border-left: 3px solid var(--accent-active);
  background: rgba(255,255,255,.04); color: var(--text-dim); font-style: italic;
}
.sidebar-images { display: flex; flex-direction: column; gap: 1rem; }
.sidebar-images img { width: 100%; display: block; border-radius: 2px; }
.hero-photo { width: 100%; border-radius: 2px; margin: 1.5rem 0; }
.mini-gallery { display: flex; gap: .6rem; margin: 1rem 0; flex-wrap: wrap; }
.mini-gallery img { width: 100px; height: 100px; object-fit: cover; border-radius: 2px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.video-grid .video-frame { position: relative; padding-top: 56.25%; height: 0; overflow: hidden; border-radius: 2px; }
.video-grid .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* ---------- Karten ---------- */
.map-frame { position: relative; padding-top: 75%; height: 0; overflow: hidden; border-radius: 2px; margin-top: 1rem; }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.map-external-link {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1rem;
  padding: .6rem 1.1rem; background: rgba(255,255,255,.08); color: var(--text);
  border-radius: 2px; font-family: "Oswald", sans-serif;
}
.map-external-link:hover { background: var(--accent-active); color: #fff; text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .content-columns { grid-template-columns: 1fr; }

  .main-nav .wrap { display: flex; flex-wrap: wrap; align-items: center; }
  .nav-toggle { display: block; }
  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-bottom: .5rem;
  }
  .nav-list.is-open { display: flex; }
  .sub-nav { display: block; position: static; box-shadow: none; padding-left: 1rem; }

  .article-with-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .site-header .wrap { gap: .75rem; }
  .brand .logo-img { height: 44px; }
  .header-account a { padding: .35rem .7rem; font-size: .8rem; }
  .page-title h1 { font-size: 1.3rem; }
  h2 { font-size: 1.2rem; }
  .panel { padding: 1rem; }
  main { padding: 1.25rem 0 1rem; }
}

@media (max-width: 420px) {
  .wrap { padding: 0 1rem; }
}
