/*
Theme Name: Werkstatt X
Author: waldperlachfabi
Description: Schlichtes, modernes WordPress-Theme für Werkstatt, Oldtimer- und allgemeine Restaurierungsarbeiten. Mit fertiger Startseite und automatisch angelegten Unterseiten.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: werkstatt-x
Tags: custom-logo, custom-menu, featured-images, block-styles, wide-blocks, threaded-comments, translation-ready
*/

:root {
  --wx-black: #111111;
  --wx-dark: #1a1a1a;
  --wx-red: #c9142f;
  --wx-red-dark: #a60f26;
  --wx-yellow: #f4c430;
  --wx-paper: #f5f2eb;
  --wx-white: #ffffff;
  --wx-muted: #686868;
  --wx-border: #d8d4cb;
  --wx-width: 1160px;
  --wx-radius: 4px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--wx-black);
  background: var(--wx-paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

body.admin-bar .site-header {
  top: 32px;
}

a {
  color: var(--wx-red);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover,
a:focus {
  color: var(--wx-red-dark);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 12px 16px;
  clip: auto;
  color: var(--wx-black);
  background: var(--wx-yellow);
}

.site-wrap {
  width: min(calc(100% - 40px), var(--wx-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  color: var(--wx-white);
  background: var(--wx-black);
  border-bottom: 4px solid var(--wx-red);
}

.header-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-branding {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
}

.site-branding a {
  color: var(--wx-white);
  text-decoration: none;
}

.custom-logo-link {
  display: flex;
  align-items: center;
}

.custom-logo {
  width: auto;
  max-height: 54px;
}

.logo-placeholder {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--wx-black);
  background: var(--wx-yellow);
  border: 3px solid var(--wx-red);
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}

.brand-name {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.1;
}

.brand-tagline {
  display: block;
  margin-top: 4px;
  color: #c9c9c9;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.main-navigation {
  display: flex;
  align-items: center;
  gap: 24px;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-navigation li {
  position: relative;
}

.main-navigation a {
  display: block;
  padding: 10px 0;
  color: var(--wx-white);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a {
  color: var(--wx-yellow);
}

.main-navigation .sub-menu {
  position: absolute;
  top: 100%;
  left: -16px;
  display: none;
  min-width: 210px;
  padding: 8px 16px;
  background: var(--wx-black);
  border-bottom: 3px solid var(--wx-red);
}

.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu {
  display: block;
}

.menu-toggle {
  display: none;
  padding: 8px 10px;
  color: var(--wx-white);
  background: transparent;
  border: 1px solid #555;
  cursor: pointer;
}

.header-cta,
.button,
.wp-block-button__link,
button[type="submit"],
input[type="submit"] {
  display: inline-block;
  padding: 12px 18px;
  color: var(--wx-white);
  background: var(--wx-red);
  border: 0;
  border-radius: 0;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.header-cta:hover,
.header-cta:focus,
.button:hover,
.button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus,
button[type="submit"]:hover,
input[type="submit"]:hover {
  color: var(--wx-black);
  background: var(--wx-yellow);
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--wx-white);
  background: var(--wx-black);
}

.hero::after {
  position: absolute;
  right: -80px;
  bottom: -130px;
  width: 440px;
  height: 260px;
  content: "";
  transform: rotate(-9deg);
  background: var(--wx-red);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 510px;
  align-items: center;
  grid-template-columns: minmax(0, 760px);
  padding-block: 82px;
}

.hero-inner.hero-has-image {
  gap: 52px;
  grid-template-columns: minmax(0, 1.15fr) minmax(290px, .65fr);
}

.hero-copy {
  max-width: 760px;
}

.hero-media {
  position: relative;
  margin: 0;
  border-top: 7px solid var(--wx-red);
  border-bottom: 7px solid var(--wx-yellow);
}

.hero-media img {
  display: block;
  width: 100%;
  height: min(520px, 58vw);
  object-fit: cover;
  object-position: center;
}

.hero h1 {
  max-width: 800px;
  margin: 0 0 22px;
  font-size: clamp(45px, 7vw, 86px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .95;
}

.hero h1 span {
  color: var(--wx-yellow);
}

.hero p {
  max-width: 640px;
  margin: 0 0 28px;
  color: #dedede;
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-secondary {
  color: var(--wx-white);
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--wx-white);
}

.button-secondary:hover,
.button-secondary:focus {
  box-shadow: none;
}

.section {
  padding-block: 82px;
}

.section-white {
  background: var(--wx-white);
}

.section-dark {
  color: var(--wx-white);
  background: var(--wx-black);
}

.section-yellow {
  background: var(--wx-yellow);
}

.section-header {
  max-width: 760px;
  margin-bottom: 38px;
}

.section-header h2,
.restoration-copy h2,
.pickup-copy h2,
.contact-card h2,
.page-title {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1.05;
}

.section-header p,
.restoration-copy p,
.pickup-copy p {
  margin: 0;
  color: var(--wx-muted);
  font-size: 19px;
}

.section-dark .section-header p,
.section-dark .restoration-copy p {
  color: #c8c8c8;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--wx-border);
  border-left: 1px solid var(--wx-border);
}

.service-item {
  min-height: 154px;
  padding: 26px;
  background: var(--wx-paper);
  border-right: 1px solid var(--wx-border);
  border-bottom: 1px solid var(--wx-border);
}

.service-item h3,
.price-row h3 {
  margin: 0 0 6px;
  font-size: 21px;
  line-height: 1.2;
}

.service-item p,
.price-row p {
  margin: 0;
  color: var(--wx-muted);
  font-size: 15px;
}

.results-section {
  background: var(--wx-paper);
}

.gallery-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-item {
  margin: 0;
  overflow: hidden;
  color: var(--wx-white);
  background: var(--wx-black);
  border-bottom: 5px solid var(--wx-red);
}

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: 15px 17px;
  color: var(--wx-white);
  font-size: 16px;
  font-weight: 800;
}

.restoration-grid,
.pickup-grid,
.contact-grid {
  display: grid;
  align-items: start;
  gap: 64px;
  grid-template-columns: 1.1fr .9fr;
}

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

.check-list li {
  padding: 15px 0;
  border-bottom: 1px solid #444;
  font-weight: 700;
}

.check-list li::before {
  margin-right: 12px;
  color: var(--wx-yellow);
  content: "✓";
  font-weight: 900;
}

.price-list {
  border-top: 3px solid var(--wx-red);
}

.price-row {
  display: grid;
  align-items: center;
  gap: 24px;
  grid-template-columns: 1fr auto;
  padding: 20px 4px;
  border-bottom: 1px solid var(--wx-border);
}

.price {
  color: var(--wx-red);
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
}

.price-note {
  margin-top: 18px;
  color: var(--wx-muted);
  font-size: 14px;
}

.pickup-grid {
  align-items: center;
}

.pickup-box {
  padding: 30px;
  color: var(--wx-white);
  background: var(--wx-black);
  border-left: 8px solid var(--wx-red);
}

.pickup-box strong {
  display: block;
  margin-bottom: 5px;
  color: var(--wx-yellow);
  font-size: 21px;
}

.pickup-box p {
  margin: 0;
}

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

.contact-card {
  padding: 34px;
  color: var(--wx-black);
  background: var(--wx-white);
  border-top: 7px solid var(--wx-red);
}

.contact-card h2,
.contact-card strong,
.contact-card span,
.contact-card p {
  color: var(--wx-black);
}

.contact-card .closed {
  color: var(--wx-red);
}

.contact-list,
.hours-list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.contact-list li,
.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--wx-border);
}

.contact-list li {
  display: block;
}

.contact-list strong,
.hours-list strong {
  font-weight: 800;
}

.closed {
  color: var(--wx-red);
  font-weight: 800;
}

.front-editor-content {
  padding-block: 58px;
  background: var(--wx-white);
}

.site-main-page {
  min-height: 55vh;
  padding-block: 68px 90px;
}

.page-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 4px solid var(--wx-red);
}

.entry-content {
  max-width: 850px;
}

.entry-content-full {
  width: 100%;
  max-width: none;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  line-height: 1.2;
}

.entry-content h2 {
  margin-top: 42px;
  font-size: 34px;
}

.entry-content h3 {
  margin-top: 32px;
  font-size: 25px;
}

/* Seiteninhalte bleiben immer dunkel – auch bei großen Gutenberg-Textgrößen. */
.site-main-page .page-title,
.site-main-page .entry-content h1,
.site-main-page .entry-content h2,
.site-main-page .entry-content h3,
.site-main-page .entry-content h4,
.site-main-page .entry-content h5,
.site-main-page .entry-content h6,
.site-main-page .entry-content .has-large-font-size,
.site-main-page .entry-content .has-x-large-font-size,
.site-main-page .entry-content .has-huge-font-size {
  color: var(--wx-black) !important;
}

.entry-content input:not([type="submit"]),
.entry-content textarea,
.entry-content select,
.widget input:not([type="submit"]),
.widget textarea,
.widget select {
  width: 100%;
  padding: 11px 12px;
  background: var(--wx-white);
  border: 1px solid #aaa;
}

.alignwide {
  max-width: var(--wx-width);
  margin-right: auto;
  margin-left: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50vw);
}

.post-list article {
  margin-bottom: 42px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--wx-border);
}

.entry-title {
  margin-bottom: 8px;
}

.entry-title a {
  color: var(--wx-black);
  text-decoration: none;
}

.entry-meta {
  color: var(--wx-muted);
  font-size: 14px;
}

.pagination,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-numbers {
  padding: 8px 12px;
  background: var(--wx-white);
}

.site-footer {
  color: #cfcfcf;
  background: var(--wx-black);
  border-top: 5px solid var(--wx-yellow);
}

.footer-inner {
  display: flex;
  min-height: 130px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand strong {
  display: block;
  color: var(--wx-white);
  font-size: 22px;
}

.footer-brand span,
.site-info {
  font-size: 13px;
}

.footer-navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-navigation a {
  color: var(--wx-white);
  font-size: 14px;
  text-decoration: none;
}

.not-found {
  max-width: 720px;
}

@media (max-width: 900px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  .header-inner {
    flex-wrap: wrap;
    min-height: 68px;
    padding-block: 10px;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .header-cta {
    display: none;
  }

  .main-navigation {
    display: none;
    width: 100%;
  }

  .main-navigation.is-open {
    display: block;
  }

  .main-navigation ul {
    display: block;
    padding: 5px 0 10px;
  }

  .main-navigation .sub-menu {
    position: static;
    display: block;
    padding: 0 0 0 18px;
    border: 0;
  }

  .hero-inner {
    min-height: 450px;
    grid-template-columns: 1fr;
    padding-block: 64px;
  }

  .hero-inner.hero-has-image {
    gap: 38px;
    grid-template-columns: 1fr;
  }

  .hero-media img {
    height: auto;
    max-height: 430px;
    aspect-ratio: 16 / 9;
    object-position: center 55%;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .restoration-grid,
  .pickup-grid,
  .contact-grid {
    gap: 38px;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body.admin-bar .site-header {
    top: 0;
  }

  .site-wrap {
    width: min(calc(100% - 28px), var(--wx-width));
  }

  .brand-tagline {
    display: none;
  }

  .section {
    padding-block: 58px;
  }

  .hero h1 {
    font-size: 47px;
  }

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

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

  .price-row,
  .contact-list li,
  .hours-list li {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .price-row {
    gap: 8px;
  }

  .contact-list li,
  .hours-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 34px;
  }
}
