/* elbrachtweller – eigenes Stylesheet, Schriften lokal (keine Google-Server) */
@font-face { font-family: "Gilda Display"; src: url(fonts/gilda-display-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Yantramanav"; src: url(fonts/yantramanav-latin-300-normal.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Yantramanav"; src: url(fonts/yantramanav-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Yantramanav"; src: url(fonts/yantramanav-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #252525;
  --bg-2: #333333;
  --fg: #ffffff;
  --muted: #bdbdbd;
  --accent: #ad8e70;
  --serif: "Gilda Display", Georgia, serif;
  --sans: "Yantramanav", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(20px, 4vw, 58px);
  --gap: 20px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.65 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }
.small { font-size: 14px; color: var(--muted); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(34px, 4.2vw, 60px); letter-spacing: .02em; }
h2 { font-size: clamp(28px, 2.8vw, 40px); letter-spacing: .02em; }

/* Header & Navigation */
.header { display: flex; align-items: center; justify-content: space-between; padding: clamp(24px, 4.5vw, 80px) var(--pad); gap: 24px; position: relative; z-index: 20; }
.logo img { width: clamp(180px, 27.8vw, 400px); }
/* Niedrige Fenster: auch ueber dem Kopf weniger Abstand */
.header { padding-top: min(clamp(24px, 4.5vw, 80px), max(12px, 14vh - 70px)); }
.menu { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(18px, 2.9vw, 42px); align-items: center; }
.menu a, .menu button { font: 400 clamp(14px, 1.25vw, 18px)/1 var(--sans); letter-spacing: .03em; color: var(--fg); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 8px 0; }
.menu a:hover, .menu button:hover, .menu [aria-current="page"], .menu .is-active { color: var(--accent); }
/* Unterstreichung faehrt beim Ueberfahren von links ein; die aktive Seite bleibt unterstrichen */
.menu > li > a:not(.icon-link), .menu > li > button { position: relative; display: block; }
.menu > li > a:not(.icon-link)::before, .menu > li > button::before { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1.5px; background: var(--accent); transition: width .5s ease; }
.menu > li > a:not(.icon-link):hover::before, .menu > li > a:focus-visible::before, .has-sub:hover > button::before, .has-sub:focus-within > button::before, .has-sub.open > button::before, .menu > li > a[aria-current="page"]::before, .menu > li > button.is-active::before { width: 100%; }
.has-sub:hover > button { color: var(--accent); }
.has-sub { position: relative; }
.has-sub > button::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 7px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .3s ease; }
.has-sub:hover > button::after, .has-sub.open > button::after { transform: translateY(0) rotate(225deg); }
.sub { list-style: none; margin: 0; padding: 10px 0; position: absolute; left: 0; top: 100%; min-width: 120px; width: max-content; background: #1f1f1f; border-radius: 5px; opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.sub a { display: block; padding: 9px 16px; }
/* Nahe am rechten Rand nach links aufklappen, sonst laesst sich die Seite seitlich schieben */
.menu > li:nth-last-child(-n+3) .sub { left: auto; right: 0; }
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub { opacity: 1; visibility: visible; }
.icon { display: inline-block; vertical-align: middle; }
.menu a .icon { margin: -3px 0; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span:not(.sr) { display: block; width: 24px; height: 1px; background: var(--fg); margin: 6px 0; }

@media (max-width: 900px) {
  .nav-toggle { display: block; position: relative; z-index: 31; }
  .menu { position: fixed; inset: 0; background: var(--bg); flex-direction: column; justify-content: center; gap: 18px; display: none; z-index: 30; overflow-y: auto; padding: 80px 20px; }
  .menu.open { display: flex; }
  .menu a, .menu button { font-size: 20px; }
  .sub { position: static; display: none; width: auto; background: none; opacity: 1; visibility: visible; transition: none; text-align: center; padding: 6px 0; min-width: 0; }
  .has-sub:hover .sub, .has-sub:focus-within .sub { display: none; }
  .has-sub.open .sub { display: block; }
  .sub a { font-size: 16px; padding: 6px; color: var(--muted); }
  .has-sub { text-align: center; }
}

/* Startseite */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 2.8vw, 40px); padding: clamp(40px, 8vw, 150px) var(--pad) clamp(60px, 7vw, 120px); }
.tile { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; text-decoration: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, filter .6s ease; filter: brightness(.82); }
.tile span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; letter-spacing: .05em; }
.tile:hover img { transform: scale(1.04); filter: brightness(.6); }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tiles { gap: 8px; padding-left: 8px; padding-right: 8px; } }

/* Intro (Überschrift links, Text rechts) */
.intro { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 8vw; padding: 80px var(--pad) 60px; align-items: start; }
.intro p { margin: 0 0 1em; max-width: 60ch; }
@media (max-width: 800px) { .intro { grid-template-columns: 1fr; padding-top: 30px; } }
/* Versetzt: zwei Spalten, unten buendig (Seiten Wir und Menschen) */
.duo { display: grid; grid-template-columns: 1fr 1fr; column-gap: 5.6vw; align-items: end; padding: clamp(30px, 11vw, 220px) var(--pad) 80px; }
.duo h1 { font-size: clamp(34px, 3.6vw, 72px); margin: 0 0 clamp(24px, 5vw, 90px); }
.duo img { width: 100%; }
.duo.square img { aspect-ratio: 1; object-fit: cover; }
.duo-text { padding-top: clamp(24px, 4.5vw, 80px); }
.duo-text p { margin: 0 0 1em; }
.duo-text p:last-child { margin: 1.8em 0 0; }
@media (max-width: 800px) {
  .duo { grid-template-columns: 1fr; row-gap: var(--gap); padding-top: 30px; padding-bottom: 60px; }
  .duo h1 { margin-bottom: 24px; }
  .duo-text { padding-top: 24px; }
  /* "Wir": die beiden Fotos auch hier nebeneinander, Ueberschrift darueber, Text darunter */
  .duo:not(.square) { grid-template-columns: 1fr 1fr; column-gap: 8px; row-gap: 0; align-items: start; }
  .duo:not(.square) > div { display: contents; }
  .duo:not(.square) h1, .duo:not(.square) .duo-text { grid-column: 1 / -1; }
}
.intro-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); padding: 0 var(--pad) 60px; align-items: start; }

.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; padding: 13px 27px; letter-spacing: .1em; font-size: 15px; border: 1px solid var(--accent); transition: color .4s ease, background-color .4s ease; }
@media (hover: hover) { .btn:hover { background: #fff; color: var(--accent); } }

/* Masonry-Galerie */
.masonry { columns: 3; column-gap: var(--gap); padding: 0 var(--pad) 60px; }
.masonry figure { margin: 0 0 var(--gap); break-inside: avoid; }
.masonry a { display: block; position: relative; cursor: pointer; }
.masonry img { width: 100%; }
/* Einblenden beim Scrollen (Klassen setzt site.js) */
.masonry figure.blende { opacity: 0; transform: translateY(28px); }
.masonry figure.blende.da { opacity: 1; transform: none; transition: opacity .625s cubic-bezier(.37, 0, .63, 1), transform .625s cubic-bezier(.37, 0, .63, 1); }
/* Schleier beim Ueberfahren; die Farbe je Foto steht in farben.css */
.masonry a::after { content: ""; position: absolute; inset: 0; background: var(--accent); opacity: 0; transition: opacity .25s ease-in-out; }
@media (hover: hover) { .masonry a:hover::after { opacity: .75; } }
@media (max-width: 1000px) { .masonry { columns: 2; } }
/* Handy: weiter zwei Fotos nebeneinander, dafuer engere Abstaende */
@media (max-width: 560px) { .masonry { column-gap: 8px; padding-left: 8px; padding-right: 8px; } .masonry figure { margin-bottom: 8px; } }

/* Teaser & Blättern */
.teaser { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); padding: 20px var(--pad) 40px; }
.teaser a { background: var(--bg-2); padding: 50px 30px; text-align: center; text-decoration: none; transition: background .3s; }
.teaser a:hover { background: #3d3d3d; }
.teaser h2 { margin-bottom: .2em; }
.teaser span { color: var(--accent); letter-spacing: .05em; }
.pager { display: flex; justify-content: space-between; padding: 10px var(--pad) 40px; }
.pager a { text-decoration: none; color: var(--muted); }
.pager a:hover { color: var(--accent); }
@media (max-width: 560px) { .teaser { grid-template-columns: 1fr; } }

/* Wir */
.wir-imgs { display: grid; grid-template-columns: 2fr 1fr; gap: var(--gap); padding: 0 var(--pad) 60px; align-items: start; }
@media (max-width: 700px) { .wir-imgs { grid-template-columns: 1fr; } }

/* Kontakt */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 8vw; background: var(--bg-2); padding: 70px var(--pad); }
.contact p { max-width: 60ch; }
.contact-box { font-size: 18px; }
.mail-line { font-family: var(--serif); font-size: 24px; }
@media (max-width: 800px) { .contact { grid-template-columns: 1fr; } }
/* Adresse steht rückwärts im HTML und wird per CSS richtig herum gezeigt – Kopieren liefert Unsinn */
.mail-rtl { unicode-bidi: bidi-override; direction: rtl; user-select: none; -webkit-user-select: none; }

/* Rechtstexte */
.legal { max-width: 820px; margin: 0 auto; padding: 40px var(--pad) 80px; }
.legal h2 { font-size: 24px; margin-top: 1.6em; }

/* Footer */
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 50px var(--pad) 60px; font-size: 14px; color: var(--muted); }
.footer a { margin-right: 22px; text-decoration: none; color: var(--fg); }
.footer a:hover { color: var(--accent); }

/* Teilen */
.share-open { background: none; border: 0; padding: 0; margin-right: 22px; color: var(--fg); cursor: pointer; vertical-align: middle; }
.share-open:hover { color: var(--accent); }
.share { border: 0; border-radius: 12px; padding: 28px; width: min(500px, calc(100vw - 32px)); background: #fff; color: #333; }
.share::backdrop { background: rgba(0,0,0,.5); }
.share h2 { font: 500 17px/1.3 var(--sans); margin: 0 0 20px; }
.share-close { position: absolute; top: 10px; right: 14px; background: none; border: 0; cursor: pointer; font: 300 28px/1 var(--sans); color: #666; }
.share-row { display: flex; gap: 8px; background: #f4f5f6; border: 1px solid #e5e7ea; border-radius: 6px; padding: 6px 6px 6px 10px; }
.share-url { flex: 1; min-width: 0; border: 0; background: none; font: 400 15px/1.4 var(--sans); color: #444; }
.share-copy { border: 0; background: #fff; border-radius: 4px; padding: 6px 10px; cursor: pointer; font: 400 14px/1 var(--sans); color: #333; }
.share-targets { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.share-targets a { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; color: #fff; }
@media (max-width: 520px) { .share { padding: 22px 16px; } .share-targets { gap: 6px; } .share-targets a { width: 44px; height: 44px; } }
.share-fb { background: #5800ff; } .share-x { background: #000; } .share-pin { background: #d10000; }
.share-tu { background: #0b0b3b; } .share-wa { background: #00b489; } .share-mail { background: #333; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(20,20,20,.97); z-index: 100; display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: calc(100vw - 140px); max-height: calc(100vh - 80px); width: auto; height: auto; object-fit: contain; user-select: none; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; font: 300 40px/1 var(--sans); padding: 16px; opacity: .7; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 10px; right: 14px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; top: 22px; left: 24px; font-size: 14px; color: var(--muted); }
@media (max-width: 700px) { .lightbox img { max-width: 100vw; max-height: 85vh; } .lb-prev, .lb-next { top: auto; bottom: 10px; transform: none; } }

/* Start, Wir, Kontakt am grossen Bildschirm: Fensterhoehe nutzen, gleicher Abstand (--luft)
   zwischen Logo und Inhalt wie zwischen Inhalt und Fusszeile */
@media (min-width: 901px) and (min-height: 560px) {
  .fill { --luft: clamp(20px, 4.5vh, 70px); display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  .fill .header { padding-bottom: 0; }
  .fill .footer { padding-top: 0; }
  .fill main { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; padding: var(--luft) 0; }

  /* Startseite: Kacheln so hoch wie der freie Platz, Seitenverhaeltnis bleibt */
  .fill .tiles { flex: 1 1 0; min-height: 340px; container-type: size; display: flex; justify-content: center; align-items: center; padding: 0 var(--pad); }
  .fill .tile { width: min((100cqw - 3 * clamp(20px, 2.8vw, 40px)) / 4, 100cqh * 2 / 3); flex: none; }
  .fill .current-galleries { padding: var(--luft) var(--pad) 0; }

  /* Wir: Foto, Text, Foto nebeneinander; die Fotos bleiben versetzt (links unten, rechts oben) */
  .fill .duo:not(.square) { --text: clamp(290px, 28vw, 520px); --spalt: clamp(20px, 3vw, 60px); --versatz: 8cqh;
    flex: 1 1 0; min-height: 480px; container-type: size; display: grid; grid-template-columns: auto var(--text) auto;
    grid-template-rows: 1fr auto auto 1fr; justify-content: center; align-items: stretch; column-gap: var(--spalt); padding: 0 var(--pad); }
  .fill .duo:not(.square) > div { display: contents; }
  .fill .duo:not(.square) img { grid-column: 1; grid-row: 1 / -1; align-self: end; max-width: none; height: auto; aspect-ratio: 3 / 4; object-fit: cover;
    width: min((100cqw - var(--text) - 2 * var(--spalt)) / 2, (100cqh - var(--versatz)) * 3 / 4); }
  .fill .duo:not(.square) > div:last-child img { grid-column: 3; align-self: start; }
  .fill .duo:not(.square) h1 { grid-column: 2; grid-row: 2; font-size: clamp(28px, min(3vw, 5vh), 60px); margin: 0 0 .6em; }
  .fill .duo:not(.square) .duo-text { grid-column: 2; grid-row: 3; padding: 0; }
  .fill .duo:not(.square) .duo-text p:last-child { margin-top: 1.2em; }

  @media (max-height: 920px) {
    .fill .duo:not(.square) { --text: clamp(380px, 40vw, 560px); }
    .fill .duo:not(.square) .duo-text { font-size: 14.5px; line-height: 1.5; }
    .fill .duo:not(.square) h1 { font-size: clamp(26px, 4vh, 36px); }
    .fill .duo:not(.square) .duo-text p { margin-bottom: .7em; }
    .fill .duo:not(.square) .duo-text p:last-child { margin: .8em 0 0; }
  }

  /* Kontakt: engere Innenabstaende, damit moeglichst alles ins Fenster passt */
  .fill .intro { padding-top: 0; padding-bottom: clamp(20px, 4vh, 60px); }
  .fill .intro h1 { font-size: clamp(32px, min(4.2vw, 6.4vh), 60px); }
  .fill .contact { padding-top: clamp(24px, 4.5vh, 70px); padding-bottom: clamp(24px, 4.5vh, 70px); }
  .fill .contact h2 { font-size: clamp(26px, min(2.8vw, 4.4vh), 40px); }
}

/* Sport, Events, Feiern, Menschen, Impressum, Datenschutz: Abstand unter dem Kopf wie bei Wir */
@media (min-width: 901px) {
  .nah .header { padding-bottom: 0; }
  .nah main { display: flow-root; padding-top: clamp(20px, 4.5vh, 70px); }
  .nah main > .intro, .nah main > .duo, .nah main > .legal { padding-top: 0; }
}

/* Startseite: aktuelle Galerien */
.current-galleries { text-align: center; padding: 0 var(--pad) 60px; }
.current-galleries div { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
