/*
Theme Name: Porsche 944 Werkstatthandbuch
Theme URI: https://example.com/porsche-944-manual
Author: Darvin Wache
Description: Responsives WordPress-Theme für die Reparaturanweisungen des Porsche 944 (1981–1991).
Version: 3.2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: porsche-944-manual
*/

:root {
  --red: #9d1f1f;
  --red-dark: #711515;
  --ink: #171717;
  --muted: #6d6d6d;
  --paper: #f4f1eb;
  --white: #fff;
  --line: #ded8ce;
  --shadow: 0 18px 50px rgba(28, 20, 16, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Arial, Helvetica, sans-serif; line-height: 1.55; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.screen-reader-text:focus { z-index: 100000; top: 8px; left: 8px; width: auto; height: auto; padding: 12px; clip: auto; background: #fff; }

.site-header { position: sticky; z-index: 50; top: 0; color: #fff; background: rgba(18,18,18,.96); border-bottom: 1px solid rgba(255,255,255,.14); }
.header-inner { width: min(1180px, calc(100% - 40px)); min-height: 72px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; font-size: 12px; font-weight: 800; letter-spacing: -.04em; }
.brand-copy { display: grid; line-height: 1.1; }
.brand-copy strong { font-size: 17px; letter-spacing: .06em; text-transform: uppercase; }
.brand-copy span { margin-top: 4px; color: #c9c9c9; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.menu { display: flex; margin: 0; padding: 0; gap: 26px; list-style: none; }
.menu a { font-size: 14px; text-decoration: none; }
.menu a:hover, .menu a:focus { color: #f2b8b2; }
.menu-toggle { display: none; padding: 8px 10px; color: #fff; background: none; border: 1px solid #666; border-radius: 4px; }

.hero { min-height: 540px; display: grid; align-items: end; color: #fff; background-color: #252525; background-position: center 56%; background-size: cover; position: relative; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.86) 0%, rgba(0,0,0,.50) 45%, rgba(0,0,0,.08) 78%), linear-gradient(0deg, rgba(0,0,0,.62), transparent 55%); }
.hero-inner { position: relative; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 90px 0 74px; }
.eyebrow { margin: 0 0 12px; color: #f0bbb6; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { max-width: 740px; margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(43px, 7vw, 82px); font-weight: 400; line-height: .96; letter-spacing: -.045em; }
.hero-lead { max-width: 560px; margin: 24px 0 0; color: #ece9e4; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border: 1px solid var(--red); border-radius: 3px; color: #fff; background: var(--red); font-weight: 700; text-decoration: none; }
.button:hover, .button:focus { background: var(--red-dark); border-color: var(--red-dark); }
.button-secondary { background: rgba(0,0,0,.28); border-color: rgba(255,255,255,.7); }

.manuals { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 76px 0 90px; }
.section-heading { display: grid; grid-template-columns: 1fr minmax(260px, 390px); gap: 35px; align-items: end; margin-bottom: 34px; }
.section-heading h2 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(34px, 5vw, 54px); font-weight: 400; letter-spacing: -.035em; }
.section-heading p { max-width: 620px; margin: 10px 0 0; color: var(--muted); }
.search-box { position: relative; }
.search-box input { width: 100%; min-height: 50px; padding: 0 44px 0 16px; border: 1px solid #cfc7bc; border-radius: 3px; background: #fff; font: inherit; }
.search-box input:focus { outline: 3px solid rgba(157,31,31,.18); border-color: var(--red); }
.search-box span { position: absolute; top: 14px; right: 15px; color: var(--muted); }
.manual-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.manual-card { min-height: 145px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--red); box-shadow: 0 3px 14px rgba(30,20,10,.045); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.manual-card:hover, .manual-card:focus { transform: translateY(-3px); box-shadow: var(--shadow); }
.manual-card h3 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 21px; font-weight: 400; line-height: 1.25; }
.manual-meta { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.manual-arrow { color: var(--red); font-size: 20px; }
.no-results { display: none; padding: 25px; background: #fff; border: 1px solid var(--line); }

.content-area { width: min(900px, calc(100% - 40px)); min-height: 60vh; margin: auto; padding: 70px 0; }
.entry-title { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(38px, 6vw, 62px); font-weight: 400; line-height: 1; }
.entry-content { font-size: 17px; }
.entry-content a { color: var(--red); }
.site-footer { color: #c9c9c9; background: #171717; }
.footer-inner { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 35px 0; display: flex; justify-content: space-between; gap: 20px; font-size: 13px; }
.footer-inner p { margin: 0; }

@media (max-width: 850px) {
  .manual-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .header-inner { width: min(100% - 28px, 1180px); }
  .menu-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 72px; left: 0; width: 100%; padding: 18px 20px; background: #171717; }
  .site-nav.is-open { display: block; }
  .menu { flex-direction: column; gap: 14px; }
  .hero { min-height: 480px; background-position: 62% center; }
  .hero::before { background: rgba(0,0,0,.62); }
  .hero-inner { width: calc(100% - 30px); padding-bottom: 48px; }
  .hero-lead { font-size: 16px; }
  .manuals { width: calc(100% - 30px); padding: 55px 0 65px; }
  .manual-grid { grid-template-columns: 1fr; }
  .manual-card { min-height: 125px; }
  .footer-inner { flex-direction: column; }
}

.locked-archive { padding: clamp(35px, 7vw, 80px); color: #f3f0e9; background: #0a0b0c; border: 1px solid #39342a; text-align: center; }
.locked-archive h3 { max-width: 680px; margin: 20px auto 12px; font: 400 clamp(28px, 5vw, 48px)/1 Georgia, serif; }
.locked-archive p { margin: 0 auto 26px; color: #aaa; }
.lock-stamp { display: inline-block; padding: 7px 11px; color: #d5af43; border: 1px solid #d5af43; font-size: 11px; font-weight: 800; letter-spacing: .15em; transform: rotate(-2deg); }

.auth-page { min-height: calc(100vh - 72px); color: #f2f0eb; background: radial-gradient(circle at 82% 18%, #202124 0, #0a0b0c 35%, #060708 75%); }
.auth-wrap { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 70px 0 90px; display: grid; grid-template-columns: minmax(340px, 1fr) minmax(380px, .85fr); gap: 70px; }
.auth-intro h1 { margin: 14px 0 24px; max-width: 700px; font-family: Impact, 'Arial Narrow', sans-serif; font-size: clamp(55px, 8vw, 105px); font-weight: 900; line-height: .88; letter-spacing: -.035em; }
.auth-intro > p:not(.eyebrow) { max-width: 610px; color: #aaa; font-size: 17px; }
.auth-page .eyebrow { color: #d5af43; }
.access-report { max-width: 430px; margin-top: 45px; padding: 28px; background: linear-gradient(145deg, #242527, #141516); border: 1px solid #393a3c; border-radius: 26px; box-shadow: 0 30px 80px rgba(0,0,0,.38); }
.report-light { width: 13px; height: 13px; display: block; margin-bottom: 20px; background: #e44c43; border-radius: 50%; box-shadow: 0 0 18px rgba(228,76,67,.55); }
.access-report small { display: block; color: #aaa; letter-spacing: .16em; text-transform: uppercase; }
.access-report strong { display: block; margin: 12px 0 20px; font-family: Impact, 'Arial Narrow', sans-serif; font-size: 35px; line-height: .95; }
.access-report ul { margin: 0; padding: 0; list-style: none; color: #aaa; border-top: 1px solid #3b3b3b; }
.access-report li { padding: 10px 0; border-bottom: 1px solid #3b3b3b; }
.access-report p { margin: 17px 0 0; color: #aaa; }
.access-report b { color: #d5af43; }
.auth-panels { display: grid; gap: 18px; align-content: start; }
.auth-panel { position: relative; padding: 28px; background: rgba(20,21,22,.94); border: 1px solid #363330; border-top: 3px solid #d5af43; }
.panel-number { position: absolute; top: 22px; right: 24px; color: #4c4c4c; font: 44px/1 Impact, sans-serif; }
.auth-panel h2 { margin: 0 0 22px; font: 42px/1 Impact, 'Arial Narrow', sans-serif; text-transform: uppercase; }
.auth-panel form > p, .register-form > p { margin: 0 0 15px; }
.auth-panel label { display: block; margin-bottom: 6px; color: #bbb; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.auth-panel input[type=text], .auth-panel input[type=email], .auth-panel input[type=password], .auth-panel input:not([type]) { width: 100%; min-height: 48px; padding: 0 13px; color: #fff; background: #090a0b; border: 1px solid #454545; font: inherit; }
.auth-panel input:focus { outline: 2px solid #d5af43; border-color: #d5af43; }
.auth-panel .login-remember label, .auth-panel .consent { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; }
.auth-panel .button { width: 100%; margin-top: 8px; color: #0a0b0c; background: #d5af43; border-color: #d5af43; text-transform: uppercase; letter-spacing: .06em; }
.auth-link { display: inline-block; margin-top: 12px; color: #aaa; font-size: 13px; }
.auth-message { padding: 14px 16px; border-left: 3px solid #d5af43; background: #202020; }
.auth-message.error { border-color: #e44c43; }
@media (max-width: 850px) { .auth-wrap { grid-template-columns: 1fr; gap: 45px; } .access-report { max-width: none; } }

.doc-shell { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 340px minmax(0, 1fr); background: #171717; }
.doc-sidebar { position: sticky; top: 72px; height: calc(100vh - 72px); overflow-y: auto; padding: 32px 28px; color: #eee; background: #0b0c0d; border-right: 1px solid #353535; }
.doc-sidebar h1 { margin: 11px 0 18px; font: 34px/1.05 Impact, 'Arial Narrow', sans-serif; text-transform: uppercase; }
.doc-sidebar > p { color: #999; }
.doc-back { display: inline-block; margin-bottom: 27px; color: #d5af43; font-size: 13px; text-decoration: none; }
.doc-search { display: block; margin-top: 26px; color: #aaa; font-size: 12px; text-transform: uppercase; }
.doc-search input { width: 100%; min-height: 44px; margin-top: 7px; padding: 0 11px; color: #fff; background: #171717; border: 1px solid #444; }
.doc-results { max-height: 230px; margin-top: 8px; overflow-y: auto; color: #888; font-size: 12px; }
.doc-results button { width: 100%; padding: 10px; color: #bbb; background: #151515; border: 0; border-bottom: 1px solid #333; text-align: left; cursor: pointer; }
.doc-results button:hover { color: #d5af43; }
.page-controls { margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.page-controls button { width: 38px; height: 38px; color: #111; background: #d5af43; border: 0; cursor: pointer; }
.page-controls input { width: 56px; padding: 6px; color: #fff; background: #191919; border: 1px solid #444; }
.doc-viewer { min-width: 0; padding: 28px clamp(18px, 4vw, 65px) 75px; overflow: hidden; background: #292929; text-align: center; }
.technical-label { display: inline-block; margin-bottom: 16px; padding: 6px 10px; color: #d5af43; border: 1px solid #6e6033; font-size: 10px; letter-spacing: .14em; }
.doc-viewer img { width: auto; max-width: 100%; margin: auto; background: #fff; box-shadow: 0 12px 45px rgba(0,0,0,.5); user-select: none; -webkit-user-drag: none; }
.source-warning { margin-top: 28px; padding: 16px; color: #ccc; border-left: 3px solid #e44c43; background: #211818; }
.doc-quality-note { padding: 9px 11px; color: #e5c5c2 !important; background: #291919; border-left: 3px solid #e44c43; font-size: 12px; }
.doc-viewer img.is-source-damaged { outline: 3px solid #e44c43; }
.source-warning p { margin-bottom: 0; }
.document-placeholder { max-width: 700px; margin: 15vh auto; padding: 60px 30px; color: #eee; border: 2px dashed #6b5a2b; }
.document-placeholder span { color: #d5af43; font-size: 12px; letter-spacing: .16em; }
@media (max-width: 800px) { .doc-shell { grid-template-columns: 1fr; } .doc-sidebar { position: relative; top: 0; height: auto; } .doc-viewer { padding-inline: 10px; } }
