@import url("tokens.css");
@import url("shared.css");

/* ══ Modernes Theme: alter Charme (Palette, Panorama, weiße Karte auf Hellblau),
     neue Technik (responsive Grid, weiche Schatten, größere Schrift) ══ */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
}

a {
  color: var(--gold);
}

a:hover {
  color: var(--gold-dark);
}

/* ── Header ── */

.site-header .hero {
  background-size: cover;
  background-position: center 30%;
  min-height: clamp(180px, 30vw, 340px);
  display: flex;
  align-items: flex-end;
}

.hero-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 24px clamp(16px, 3vw, 32px);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}

.site-title {
  margin: 0;
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  font-weight: 700;
}

.site-title a {
  color: #fff;
  text-decoration: none;
}

.site-subtitle {
  margin: 4px 0 0;
  color: #ebebeb;
  font-style: italic;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
}

.site-nav {
  background: var(--amber);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-nav ul {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 0 12px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

.site-nav a {
  display: block;
  padding: 12px 16px;
  color: var(--amber-text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-nav a:hover {
  color: #fff;
}

.site-nav a[aria-current="page"] {
  background: var(--active-blue);
  color: #fff;
}

/* ── Layout ── */

.layout {
  width: min(1160px, 100%);
  margin: 28px auto;
  padding: 0 clamp(12px, 2.5vw, 24px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.main-content {
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(20, 61, 143, 0.12);
  padding: clamp(20px, 4vw, 44px);
  min-width: 0;
}

/* ── Sidebar ── */

.sidebar {
  display: grid;
  gap: 20px;
}

.widget {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(20, 61, 143, 0.1);
  overflow: hidden;
}

.widget h3 {
  margin: 0;
  padding: 10px 16px;
  background: var(--amber);
  color: var(--amber-text);
  font-size: 1rem;
}

.widget ul {
  margin: 0;
  padding: 12px 16px;
  list-style: none;
  font-size: 0.95rem;
}

.widget li {
  padding: 3px 0;
}

.widget a {
  text-decoration: none;
}

.widget a:hover {
  text-decoration: underline;
}

#worldmap {
  height: 260px;
}

/* ── Typografie im Beitrag ── */

.post-title,
.page-title {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  line-height: 1.25;
}

.post-body,
.excerpt-body {
  text-align: justify;
  hyphens: auto;
}

.post-body h1,
.post-body h2,
.post-body h3 {
  color: var(--gold);
  text-align: left;
}

.post-body table {
  border-collapse: collapse;
  width: 100%;
  display: block;
  overflow-x: auto;
  font-size: 0.9em;
}

.post-body td,
.post-body th {
  border: 1px solid var(--border);
  padding: 4px 8px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-meta a {
  color: var(--text-muted);
}

blockquote,
.motto {
  margin: 0 0 22px;
  padding: 10px 20px;
  border-left: 4px solid var(--amber);
  background: #fdf8e3;
  border-radius: 0 10px 10px 0;
  font-style: italic;
}

blockquote p {
  margin: 6px 0;
}

/* ── Bilder im Fließtext (Float wie im Original) ── */

.post-img {
  margin: 6px 0 12px;
}

.post-img.float-left {
  float: left;
  margin-right: 18px;
  max-width: min(var(--display-width, 320px), 48%);
}

.post-img.float-right {
  float: right;
  margin-left: 18px;
  max-width: min(var(--display-width, 320px), 48%);
}

.post-img.float-none {
  max-width: 100%;
}

.post-img img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.post-img a:hover img {
  filter: brightness(1.06);
}

.post-img figcaption {
  background: var(--caption-bg);
  color: var(--caption-text);
  font-size: 0.8rem;
  text-align: center;
  padding: 5px 8px;
  border-radius: 0 0 8px 8px;
  margin-top: -6px;
}

/* ── Galerie-Grid ── */

.gallery {
  clear: both;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 24px 0;
}

.gallery-item {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--caption-bg);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ── Album-Kacheln ── */

.album-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.album-tile {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  aspect-ratio: 4 / 3;
}

.album-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.album-tile:hover img {
  transform: scale(1.05);
}

.album-tile-title,
.album-tile-count {
  position: absolute;
  left: 0;
  right: 0;
  color: #fff;
  padding: 6px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.album-tile-title {
  bottom: 18px;
  font-weight: 700;
  font-size: 1.1rem;
  background: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.album-tile-count {
  bottom: 0;
  font-size: 0.8rem;
}

.album-gallery h2 {
  color: var(--gold);
  clear: both;
}

.album-meta {
  color: var(--text-muted);
}

/* ── Videos ── */

.post-video {
  clear: both;
  margin: 24px auto;
  max-width: min(var(--display-width, 640px), 100%);
}

.post-video video {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.video-download {
  font-size: 0.8rem;
  text-align: center;
  color: var(--text-muted);
  margin-top: 6px;
}

.yt-facade {
  clear: both;
  margin: 24px auto;
  max-width: min(var(--display-width, 640px), 100%);
  background: #10161f;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.yt-facade iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-play {
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  display: grid;
  gap: 6px;
  justify-items: center;
  font-family: inherit;
  padding: 24px;
}

.yt-icon {
  font-size: 2rem;
  background: rgba(230, 185, 7, 0.9);
  color: #10161f;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.yt-play:hover .yt-icon {
  background: var(--amber);
}

.yt-label {
  font-weight: 700;
}

.yt-note {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* ── Listen / Übersichtsseiten ── */

.excerpt-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.excerpt-item:first-child {
  padding-top: 0;
}

.excerpt-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  line-height: 1.3;
}

.excerpt-title a {
  text-decoration: none;
}

.excerpt-body.has-thumb {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.excerpt-thumb img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.excerpt-body p {
  margin: 0;
}

.read-more {
  margin: 10px 0 0;
  font-weight: 600;
}

.read-more a {
  text-decoration: none;
}

.pagination,
.prev-next {
  clear: both;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 28px 0 8px;
  font-weight: 600;
}

.page-status {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.9rem;
}

.prev-next a {
  text-decoration: none;
  max-width: 46%;
}

.prev-next .nav-next {
  margin-left: auto;
  text-align: right;
}

/* ── Kommentare ── */

.comments {
  clear: both;
  margin-top: 36px;
  border-top: 2px solid var(--amber);
  padding-top: 18px;
}

.comments-title {
  color: var(--gold);
  font-size: 1.3rem;
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-list .comment-list {
  margin: 12px 0 0 44px;
}

.comment {
  margin-bottom: 18px;
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--amber);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.comment-by-author > .comment-head .comment-avatar {
  background: var(--active-blue);
}

.comment-author {
  font-style: normal;
  font-weight: 700;
}

.comment-date {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.comment-body {
  margin: 6px 0 0 46px;
  background: #f7f9fc;
  border-radius: 0 12px 12px 12px;
  padding: 10px 14px;
}

.comment-body p {
  margin: 0 0 8px;
}

.comment-body p:last-child {
  margin-bottom: 0;
}

.comments-closed {
  margin-top: 22px;
  padding: 12px 16px;
  background: #fdf8e3;
  border: 1px dashed var(--amber);
  border-radius: 10px;
  color: #6b5a10;
  font-size: 0.95rem;
}

/* ── Footer ── */

.site-footer {
  background: var(--amber);
  margin-top: 40px;
  padding: 22px 16px 26px;
  text-align: center;
}

.footer-links {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
}

.footer-links a {
  color: var(--amber-text);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
}

/* ── Responsive ── */

@media (max-width: 920px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .post-img.float-left,
  .post-img.float-right {
    float: none;
    margin: 14px auto;
    max-width: 100%;
  }

  .excerpt-body.has-thumb {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
}
