/*
Theme Name: Apple Blog
Theme URI: https://example.com
Author: Jörg
Author URI: https://example.com
Description: Minimalistisches Blog-Theme im Apple-Design – viel Weißraum, große Typografie, dezente Animationen. Systemschriften (SF Pro / San Francisco) sorgen für authentischen Look ohne externe Font-Ladezeiten.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apple-blog
*/

/* ==========================================================================
   1. Variablen & Grundlagen
   ========================================================================== */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f5f7;
  --color-text: #1d1d1f;
  --color-text-secondary: #6e6e73;
  --color-accent: #0071e3;
  --color-accent-hover: #0077ed;
  --color-border: #d2d2d7;
  --max-width: 980px;
  --radius: 18px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 17px;
  line-height: 1.5882;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-accent-hover);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: var(--color-text);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 22px;
}

/* ==========================================================================
   2. Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.site-branding a {
  color: var(--color-text);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.primary-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 28px;
}

.primary-nav a {
  color: var(--color-text);
  font-size: 13px;
  opacity: 0.85;
}

.primary-nav a:hover {
  opacity: 1;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--color-text);
}

/* ==========================================================================
   3. Hero
   ========================================================================== */
.hero {
  text-align: center;
  padding: 96px 22px 72px;
  background: linear-gradient(180deg, #ffffff 0%, var(--color-bg-alt) 100%);
}

.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  margin-bottom: 12px;
}

.hero p {
  font-size: clamp(18px, 2.4vw, 24px);
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

/* ==========================================================================
   4. Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 980px;
  background: var(--color-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  transition: var(--transition);
}

.btn:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.btn-secondary:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ==========================================================================
   5. Blog / Post-Karten
   ========================================================================== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
  padding: 64px 0;
}

.post-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.post-card__thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e8e8ed;
}

.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.post-card:hover .post-card__thumb img {
  transform: scale(1.04);
}

.post-card__body {
  padding: 24px 26px 30px;
}

.post-card__meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.post-card__title {
  font-size: 22px;
  margin-bottom: 10px;
}

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

.post-card__excerpt {
  color: var(--color-text-secondary);
  font-size: 15px;
  margin-bottom: 14px;
}

.post-card__link {
  font-size: 14px;
  font-weight: 500;
}

.post-card__link::after {
  content: " →";
}

/* ==========================================================================
   6. Einzelbeitrag
   ========================================================================== */
.single-post {
  padding: 72px 0 96px;
}

.single-post__header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.single-post__meta {
  color: var(--color-text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.single-post__title {
  font-size: clamp(32px, 5vw, 48px);
}

.single-post__thumb {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 48px;
}

.entry-content {
  max-width: 700px;
  margin: 0 auto;
  font-size: 19px;
  line-height: 1.68;
}

.entry-content p {
  margin: 0 0 1.4em;
}

.entry-content h2 {
  font-size: 30px;
  margin-top: 1.6em;
}

.entry-content h3 {
  font-size: 24px;
  margin-top: 1.4em;
}

.entry-content blockquote {
  border-left: 3px solid var(--color-accent);
  margin: 2em 0;
  padding-left: 24px;
  color: var(--color-text-secondary);
  font-style: italic;
}

.entry-content img {
  border-radius: var(--radius);
  margin: 2em 0;
}

.entry-content pre {
  background: var(--color-bg-alt);
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
}

.entry-content code {
  background: var(--color-bg-alt);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

/* ==========================================================================
   7. Seiten (page.php)
   ========================================================================== */
.page-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 72px 0 96px;
  font-size: 19px;
  line-height: 1.68;
}

/* ==========================================================================
   8. Pagination
   ========================================================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 24px 0 80px;
}

.pagination a,
.pagination span {
  padding: 8px 16px;
  border-radius: 980px;
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-size: 14px;
}

.pagination .current {
  background: var(--color-accent);
  color: #fff;
}

/* ==========================================================================
   9. Footer
   ========================================================================== */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 48px 0;
  text-align: center;
}

.site-footer .footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
  text-align: left;
}

.site-footer p {
  color: var(--color-text-secondary);
  font-size: 12px;
  margin: 4px 0;
}

/* ==========================================================================
   10. Kommentare
   ========================================================================== */
.comments-area {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 0 96px;
}

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

.comment-body {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
}

/* ==========================================================================
   11. 404
   ========================================================================== */
.error-404 {
  text-align: center;
  padding: 120px 22px;
}

.error-404 h1 {
  font-size: 96px;
}

/* ==========================================================================
   12. Responsive
   ========================================================================== */
@media (max-width: 768px) {
  .primary-nav {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul {
    flex-direction: column;
    padding: 16px 22px;
    gap: 16px;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    padding: 64px 22px 48px;
  }
}

/* ==========================================================================
   13. Dark Mode (folgt Systemeinstellung)
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #000000;
    --color-bg-alt: #1d1d1f;
    --color-text: #f5f5f7;
    --color-text-secondary: #a1a1a6;
    --color-border: #3a3a3c;
  }

  .site-header {
    background: rgba(0, 0, 0, 0.8);
  }

  .primary-nav {
    background: #000;
  }

  .post-card__thumb {
    background: #2c2c2e;
  }
}
