/*
Theme Name: Schlösselgarten
Theme URI: https://schlösselgarten.com/
Author: Schlösselgarten
Description: Schlankes, eigens für den Schlösselgarten erstelltes WordPress-Theme.
Version: 1.2.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: schloesselgarten
*/

:root {
  --sg-blue: #2e97e5;
  --sg-blue-dark: #1477bb;
  --sg-ink: #252525;
  --sg-soft: #f4f7f9;
  --sg-line: #dce5eb;
  --sg-gold: #f2ce24;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--sg-ink);
  background: white;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.65;
}
a { color: var(--sg-blue-dark); }
img { max-width: 100%; height: auto; }

.site-nav {
  position: relative;
  z-index: 5;
  background: white;
  border-bottom: 1px solid var(--sg-line);
}
.nav-inner {
  width: min(1120px, calc(100% - 32px));
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}
.brand {
  color: var(--sg-ink);
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.menu-toggle {
  display: none;
  border: 1px solid var(--sg-line);
  border-radius: 6px;
  background: white;
  padding: 8px 12px;
  font: inherit;
}
.main-menu { display: flex; gap: 26px; margin: 0; padding: 0; list-style: none; }
.main-menu a { color: var(--sg-ink); font-size: .94rem; text-decoration: none; }
.main-menu a:hover, .main-menu .current-menu-item > a { color: var(--sg-blue-dark); }

.hero { background: var(--sg-blue); padding: 62px 24px; }
.hero-inner { width: min(970px, 100%); margin: auto; }
.hero img {
  display: block;
  width: 100%;
  aspect-ratio: 2.42 / 1;
  object-fit: cover;
  box-shadow: 0 12px 36px rgb(0 0 0 / 18%);
}

.layout {
  width: min(1100px, calc(100% - 40px));
  margin: 58px auto;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 64px;
}
.content-only { grid-template-columns: minmax(0, 820px); justify-content: center; }
main h1 { margin: 0 0 28px; font: 700 clamp(2rem, 5vw, 3.4rem)/1.08 Georgia, serif; }
main h2, main h3 { font-family: Georgia, serif; line-height: 1.25; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content .wp-block-image img, .entry-content .wp-block-gallery { border-radius: 3px; }
.entry-content .wp-block-button__link { background: var(--sg-blue-dark); }
.sg-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.sg-albums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.sg-album { min-width: 0; border-radius: 5px; }
.sg-album summary {
  position: relative;
  display: flex;
  min-height: 220px;
  overflow: hidden;
  border-radius: 5px;
  background: #17252f;
  cursor: pointer;
  list-style: none;
}
.sg-album summary::-webkit-details-marker { display: none; }
.sg-album summary > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: transform .25s ease, opacity .25s ease; }
.sg-album summary:hover > img { transform: scale(1.025); opacity: .68; }
.sg-album-label {
  position: relative;
  z-index: 1;
  align-self: flex-end;
  width: 100%;
  padding: 45px 20px 18px;
  color: white;
  background: linear-gradient(transparent, rgb(0 0 0 / 78%));
}
.sg-album-label strong { display: block; font: 700 1.35rem/1.2 Georgia, serif; }
.sg-album-label small { font-size: .82rem; }
.sg-album[open] { grid-column: 1 / -1; border: 1px solid var(--sg-line); }
.sg-album[open] summary { min-height: 150px; border-radius: 4px 4px 0 0; }
.sg-album .sg-gallery { padding: 16px; }
.sg-gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sg-soft); }
.sg-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.sg-gallery a:hover img { transform: scale(1.025); }
.sg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 24px;
  background: rgb(0 0 0 / 88%);
}
.sg-lightbox.is-open { display: flex; }
.sg-lightbox figure { margin: 0; max-width: min(1200px, 95vw); max-height: 90vh; text-align: center; }
.sg-lightbox img { display: block; max-width: 100%; max-height: 82vh; margin: auto; object-fit: contain; }
.sg-lightbox figcaption { margin-top: 10px; color: white; font-size: .9rem; }
.sg-lightbox-close {
  position: absolute;
  top: 12px;
  right: 18px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgb(255 255 255 / 14%);
  font: 300 38px/40px sans-serif;
  cursor: pointer;
}
.sg-lightbox-close:hover { background: rgb(255 255 255 / 26%); }
.sg-lightbox-open { overflow: hidden; }

.sidebar {
  padding: 28px;
  background: var(--sg-soft);
  border-top: 5px solid var(--sg-blue);
  align-self: start;
}
.sidebar h2 { margin-top: 0; font: 700 1.45rem/1.2 Georgia, serif; }
.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li { padding: 16px 0; border-bottom: 1px solid var(--sg-line); }
.event-list li:first-child { padding-top: 0; }
.event-list a { color: var(--sg-ink); font-weight: 650; text-decoration: none; }
.event-list time { display: block; margin-top: 4px; color: #62717a; font-size: .84rem; }
.event-cards { margin-top: 34px; }
.event-cards article { padding: 24px 0; border-top: 1px solid var(--sg-line); }
.event-cards h2 { margin: 4px 0 8px; font-size: 1.45rem; }
.event-cards h2 a { color: var(--sg-ink); text-decoration: none; }
.event-cards time { color: #62717a; font-size: .88rem; }
.event-cards p { margin-bottom: 0; }
.event-empty { margin-top: 28px; padding: 20px; background: var(--sg-soft); }

.site-footer { background: #17252f; color: white; }
.footer-inner {
  width: min(1100px, calc(100% - 40px));
  margin: auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: .9rem;
}
.site-footer a { color: white; }
.footer-links { display: flex; gap: 18px; }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .main-menu {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 12px 24px 20px;
    background: white;
    border-bottom: 1px solid var(--sg-line);
  }
  .main-menu.is-open { display: flex; }
  .main-menu a { display: block; padding: 10px 0; }
  .hero { padding: 34px 16px; }
  .layout { grid-template-columns: 1fr; gap: 36px; margin: 38px auto; }
}

@media (max-width: 600px) {
  body { font-size: 17px; }
  .brand { font-size: 1.1rem; }
  .hero img { aspect-ratio: 1.65 / 1; }
  .footer-inner { flex-direction: column; }
  .sg-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sg-albums { grid-template-columns: 1fr; }
  .sg-album[open] { grid-column: auto; }
}
