/* Schloss Thörl – Gestaltung
   Farben und Maße 1:1 von der WordPress-Seite (Thrive) übernommen. */

@font-face {
  font-family: "Abhaya Libre";
  src: url("/fonts/AbhayaLibre-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #b5171d;
  --red-dark: #8f1217;
  --text: #6a6b6c;
  --bg: #fff;
  --soft: #f8f8f8;
  --wrap: 1080px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 18px/1.6 "Abhaya Libre", Georgia, "Times New Roman", serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.wrap {
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--red); color: #fff; padding: 8px 16px; z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; color: #fff; }

/* ---------- Kopfzeile ---------- */
.site-header { background: #fff; position: relative; z-index: 20; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 114px; gap: 24px;
}
.logo { flex: 0 0 auto; }
.logo img { width: 180px; height: auto; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.site-nav a {
  display: block; padding: 5px 20px;
  color: var(--text); text-decoration: none; text-transform: uppercase;
  font-size: 16px; line-height: 32px; transition: color .2s, background-color .2s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--red); }
.nav-cta { margin-left: 12px; }
.nav-cta a { border: 2px solid var(--red); color: var(--red); padding: 3px 18px; }
.nav-cta a:hover, .nav-cta a[aria-current="page"] { background: var(--red); color: #fff; }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0; margin-right: -8px;
  background: none; border: 0; cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  position: absolute; left: 10px; width: 24px; height: 2px; background: var(--red);
  transition: transform .2s, background-color .2s;
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Titelbild mit schräger Unterkante ---------- */
.hero {
  height: clamp(240px, 44vw, 600px);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - min(7vw, 110px)), 0 100%);
}
.hero img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Inhalt ---------- */
main.wrap { padding-top: 96px; padding-bottom: 100px; }
h1, h2, h3 { font-weight: 400; color: var(--red); margin: 0; }
h1 { font-size: 44px; line-height: 1.3; margin-bottom: 2px; }
h2 { font-size: 28px; line-height: 1.4; padding-bottom: 15px; }
h3 { font-size: 22px; line-height: 1.4; padding-bottom: 10px; }
p { margin: 0 0 24px; }
.intro { margin-bottom: 0; }
main ul { margin: 0 0 24px; padding-left: 22px; }
main li { margin-bottom: 6px; }

.split {
  display: grid; grid-template-columns: 500px minmax(0, 1fr);
  gap: 60px; align-items: start; margin-top: 60px;
}
/* Wie bei Thrive: kürzerer Text steht mittig neben dem Bild, längerer Text
   beginnt oben bündig mit dem Bild. */
.split-text { min-height: 520px; display: flex; flex-direction: column; justify-content: center; }
.split--reverse { grid-template-columns: minmax(0, 1fr) 500px; }
.split--reverse .split-media { order: 2; }
.split + .split { margin-top: 50px; }
.split-media img { width: 500px; height: 520px; object-fit: cover; }
.split-text > :last-child { margin-bottom: 0; }

/* ---------- Galerie ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: dense; gap: 12px; margin-top: 40px;
}
.g-item { display: block; position: relative; aspect-ratio: 1; overflow: hidden; background: var(--soft); }
.g-item--large { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.g-item img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.g-item:hover img { transform: scale(1.04); }

.lightbox {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none;
  width: 100vw; height: 100vh; background: rgba(20, 20, 20, .92); color: #fff;
}
.lightbox::backdrop { background: rgba(20, 20, 20, .92); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; max-width: min(90vw, 900px); }
.lightbox img { max-width: 100%; max-height: 82vh; width: auto; margin: 0 auto; }
.lightbox figcaption { text-align: center; font-size: 16px; padding-top: 12px; color: #ddd; }
.lb-btn {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font: inherit; font-size: 40px; line-height: 1; width: 56px; height: 56px; opacity: .8;
}
.lb-btn:hover { opacity: 1; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- Kontakt ---------- */
.contact { margin-top: 24px; }
.btn {
  display: block; max-width: 500px; margin: 0 0 20px; padding: 12px 20px;
  background: var(--red); color: #fff; text-decoration: none; text-align: center;
  font-size: 18px; line-height: 29px; transition: background-color .2s;
}
.btn:hover { background: var(--red-dark); color: #fff; }
.signoff { margin-top: 32px; }

/* ---------- Rechtstexte ---------- */
.legal { margin-top: 24px; }
.legal h2 { margin-top: 24px; }
.legal h3 { margin-top: 8px; }
.legal p, .legal li { overflow-wrap: anywhere; }
.itrk { margin-top: 32px; }
.stand { font-size: 16px; }

/* ---------- Fußzeile ---------- */
.site-footer { background: var(--soft); padding: 42px var(--gutter); text-align: center; }
.site-footer nav { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.site-footer a, .site-footer span {
  color: var(--red); font-size: 15px; letter-spacing: 1px;
  text-transform: uppercase; text-decoration: none; line-height: 18px;
}
.site-footer a:hover { text-decoration: underline; }

/* ---------- Tablet ---------- */
@media (max-width: 1040px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 24px; }
  .site-nav a { padding: 10px 0; border-bottom: 1px solid #eee; }
  .nav-cta { margin: 16px 0 0; }
  .nav-cta a { text-align: center; padding: 8px 18px; border-bottom: 2px solid var(--red); }

  .split, .split--reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
  .split-media img { width: 100%; height: auto; aspect-ratio: 500 / 520; }
  .split-text { min-height: 0; }
}

/* ---------- Smartphone ---------- */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .header-inner { min-height: 84px; }
  .logo img { width: 130px; }
  main.wrap { padding-top: 40px; padding-bottom: 64px; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; padding-bottom: 10px; }
  .split, .split--reverse { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 36px; }
  .split--reverse .split-media { order: 0; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 28px; }
  .btn { font-size: 17px; }
  .lb-prev, .lb-next { top: auto; bottom: 12px; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .g-item img, .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { transition: none; }
}
