/*
Theme Name: Minimal
Theme URI: https://christof.zachl.at
Author: Christof Zachl
Description: Minimalistisches zweispaltiges Theme mit Notizen-Sidebar
Version: 1.6
License: GPL-2.0-or-later
Text Domain: minimal
*/

/* ─── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:   #111111;
  --grey:    #888888;
  --orange:  #E85A00;
  --white:   #ffffff;
  --max-w:   650px;
  --max-w-wide: 1100px;
}

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-transform: lowercase;
}

/* ─── Typografie ─────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Layout ─────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── Header / Nav ───────────────────────────────────── */
header {
  padding: 3rem 1.5rem 2.5rem;
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid #e8e8e8;
}

.site-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: lowercase;
}

.site-title a:hover { color: var(--orange); }

nav {
  display: flex;
  gap: 2rem;
}

/* WordPress nav_menu erzeugt ul > li > a */
nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav ul li { margin: 0; padding: 0; }

nav a {
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  color: var(--grey);
  transition: color 0.2s;
}

nav a:hover,
nav .current-menu-item > a { color: var(--orange); }

/* ─── Startseite – Zweispaltig ───────────────────────── */
.home-layout {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 4rem;
}

.home-main {
  flex: 1 1 0;
  min-width: 0;
  max-width: var(--max-w);
}

/* ─── Startseite – Artikelliste ──────────────────────── */
.post-list {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.home-layout .post-list {
  max-width: none;
  margin: 0;
  padding: 0;
}

.post-item {
  padding: 4rem 0;
  border-bottom: 1px solid #e8e8e8;
}

.post-item:last-child { border-bottom: none; }

.post-meta {
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: lowercase;
  color: var(--orange);
  margin-bottom: 1rem;
}

.post-cats { color: var(--grey); margin-left: 0.5em; }
.post-cats::before { content: '·'; margin-right: 0.5em; }
.post-cats a { color: var(--grey); text-decoration: none; }
.post-cats a:hover { color: var(--black); }

.post-item h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 1rem;
  max-width: var(--max-w);
}

.post-item h2 a:hover { opacity: 0.65; }

.post-item p {
  max-width: var(--max-w);
  color: #444;
  margin-bottom: 1.5rem;
}

.post-item p a {
  color: var(--orange);
  border-bottom: 1px solid var(--orange);
}

/* Titelbild in der Liste */
.post-cover {
  width: 100%;
  max-width: var(--max-w-wide);
  margin-bottom: 2rem;
  overflow: hidden;
  display: block;
}

.post-cover img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.post-cover:hover img { transform: scale(1.015); }

.read-more {
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: lowercase;
  color: var(--orange);
  border-bottom: 1px solid var(--orange);
  padding-bottom: 2px;
  transition: opacity 0.2s;
  display: inline-block;
}

.read-more:hover { opacity: 0.6; }

/* ─── Einzelner Artikel ──────────────────────────────── */
.post-header {
  padding: 5rem 1.5rem 3rem;
  max-width: var(--max-w-wide);
  margin: 0 auto;
}

.post-header .post-meta { margin-bottom: 1.25rem; }

.post-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  max-width: var(--max-w);
}

/* Hero-Bild oben – volle Breite */
.post-hero {
  max-width: var(--max-w-wide);
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

.post-hero img {
  width: 100%;
  height: 560px;
  object-fit: cover;
  display: block;
}

/* Artikeltext */
.post-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
}

.post-body p { margin-bottom: 1.75rem; }

.post-body h2 {
  font-size: 1.5rem;
  margin: 3rem 0 1rem;
}

.post-body h3 {
  font-size: 1.2rem;
  margin: 2.5rem 0 0.75rem;
}

.post-body ul, .post-body ol {
  margin: 0 0 1.75rem 1.5rem;
}

.post-body li { margin-bottom: 0.5rem; }

.post-body blockquote {
  border-left: 3px solid var(--orange);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #555;
}

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

.post-body a {
  color: var(--orange);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.post-body a:hover { border-bottom-color: var(--orange); }

/* Fotos im Artikeltext */
.post-body .wide-image {
  margin: 3rem 0;
}

.post-body .wide-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.post-body img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  margin: 2.5rem 0;
}

figcaption {
  font-size: 0.78rem;
  color: var(--grey);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Video – YouTube/Vimeo eingebettet */
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 2.5rem 0;
}

.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

/* Video – eigene Datei */
.post-body video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2.5rem auto;
}

/* ─── Foto-Grid (Foto-Posts) ─────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2px;
  max-width: var(--max-w-wide);
  margin: 0 auto 6rem;
}

.photo-grid img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

/* ─── Über-Seite / Statische Seiten ─────────────────── */
.page-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
}

.page-body h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 2.5rem;
}

.page-body p { margin-bottom: 1.75rem; }

.page-body a {
  color: var(--orange);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.page-body a:hover { border-bottom-color: var(--orange); }

/* ─── Paginierung ────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 0 5rem;
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: lowercase;
}

.pagination a,
.pagination .page-numbers {
  color: var(--grey);
}

.pagination a {
  color: var(--orange);
  border-bottom: 1px solid var(--orange);
  padding-bottom: 2px;
}

.pagination a:hover { opacity: 0.6; }

.pagination .current {
  color: var(--grey);
}

/* ─── Footer ─────────────────────────────────────────── */
footer {
  padding: 2.5rem 1.5rem;
  border-top: 1px solid #e8e8e8;
  text-align: center;
  font-size: 0.78rem;
  color: var(--grey);
}

footer .webring {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

footer .webring a {
  color: var(--grey);
  transition: color 0.2s;
}

footer .webring a:hover { color: var(--orange); }

/* ─── Notizen-Sidebar ────────────────────────────────── */
.notes-sidebar {
  flex: 0 0 260px;
  width: 260px;
  min-width: 0;
  padding-top: 4rem;
  padding-left: 2rem;
  border-left: 1px solid #e8e8e8;
  position: sticky;
  top: 2rem;
}

.notes-sidebar-title {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--grey);
  margin-bottom: 0.75rem;
}

.sidebar-divider {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 2rem 0;
}

.sidebar-cats {
  list-style: none;
  margin-bottom: 0;
}

.sidebar-cats li { margin-bottom: 0.6rem; }

.sidebar-cats a {
  font-size: 0.85rem;
  color: var(--grey);
  text-decoration: none;
  transition: color 0.2s;
}

.sidebar-cats a:hover,
.sidebar-cats a.active { color: var(--black); }

.note-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid #e8e8e8;
}

.note-item:last-child { border-bottom: none; }
.notes-list .note-item:first-child { padding-top: 0; }

.note-item .note-text {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #333;
}

.note-item .note-text p { margin-bottom: 0.75rem; }
.note-item .note-text p:last-child { margin-bottom: 0; }

.note-item .note-text a {
  color: var(--orange);
  border-bottom: 1px solid var(--orange);
}

.note-item .note-meta {
  font-size: 0.7rem;
  color: var(--grey);
  margin-top: 0.6rem;
  letter-spacing: 0.04em;
}

/* ─── Kommentare ─────────────────────────────────────── */
.comments-section {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
  border-top: 1px solid #e8e8e8;
  box-sizing: border-box;
}

.comment-item {
  padding: 2rem 0;
  border-bottom: 1px solid #e8e8e8;
}

.comment-item:last-child { border-bottom: none; }

.comment-meta {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1rem;
  align-items: baseline;
}

.comment-author {
  font-weight: 600;
  color: var(--black);
}

.comment-date {
  color: var(--grey);
}

.comment-body {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.7;
}

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

/* Formular – eigene Zentrierung, unabhängig vom Elternelement */
#respond {
  max-width: var(--max-w);
  width: 100%;
  margin: 3rem auto 0;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

.comment-form {
  width: 100%;
  box-sizing: border-box;
}

.comment-form p {
  margin-bottom: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  width: 100%;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  color: var(--black);
  background: transparent;
  border: none;
  border-bottom: 1px solid #e8e8e8;
  padding: 0.5rem 0;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
  border-bottom-color: var(--black);
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
  color: var(--grey);
}

.comment-submit {
  margin-top: 1rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: lowercase;
  color: var(--orange);
  background: none;
  border: none;
  border-bottom: 1px solid var(--orange);
  padding: 0 0 2px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.comment-submit:hover { opacity: 0.6; }

/* ─── WordPress: Admin Bar Offset ───────────────────── */
.admin-bar .notes-sidebar {
  top: calc(2rem + 32px);
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    gap: 1.25rem;
    padding: 2rem 1.25rem;
  }

  nav { gap: 1.25rem; }
  nav ul { gap: 1.25rem; }

  .post-cover img { height: 260px; }
  .post-hero img { max-height: 320px; }

  .photo-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── Responsive – Tablet/Mobil ─────────────────────── */
@media (max-width: 960px) {
  .home-layout {
    flex-direction: column;
  }

  .home-main {
    max-width: none;
    width: 100%;
  }

  .notes-sidebar {
    flex: 0 0 auto;
    width: 100%;
    border-left: none;
    border-top: 3px solid var(--orange);
    padding-left: 0;
    padding-top: 3rem;
    margin-top: 3rem;
    position: static;
  }
}
