/*
Theme Name: ETD Theme
Theme URI: https://elektrotechnik-dittrich.de
Author: Elektrotechnik Dittrich
Description: Individuelles WordPress-Theme für Elektrotechnik Dittrich, optisch an die bisherige Joomla-Website angelehnt.
Version: 1.9.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: etd
*/

:root {
  --etd-yellow: #f2df00;
  --etd-black: #111111;
  --etd-dark: #2d2d2d;
  --etd-white: #ffffff;
  --etd-text: #333333;
  --etd-muted: #707070;
  --etd-border: #dddddd;
  --etd-width: 980px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: radial-gradient(circle at top, #484848 0, #2a2a2a 48%, #191919 100%);
  color: var(--etd-text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.62;
}

img { max-width: 100%; height: auto; }
a { color: #6b6300; }
a:hover, a:focus { color: #111; }

.site-wrap {
  width: min(calc(100% - 30px), var(--etd-width));
  margin: 26px auto;
  background: var(--etd-white);
  box-shadow: 0 0 22px rgba(0,0,0,.5);
}

.site-header { background: var(--etd-black); }

.branding {
  min-height: 126px;
  display: flex;
  align-items: center;
  padding: 18px 30px 14px;
}

.branding img { display: block; width: min(100%, 490px); }

.menu-toggle { display: none; }

.primary-nav {
  background: linear-gradient(#464646, #252525);
  border-top: 1px solid #555;
  border-bottom: 5px solid var(--etd-yellow);
}

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

.primary-nav li { border-right: 1px solid #515151; }

.primary-nav a {
  display: block;
  padding: 12px 17px;
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a:focus,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
  background: var(--etd-yellow);
  color: #111;
}

.site-main {
  min-height: 500px;
  padding: 30px 36px 46px;
  background: #fff;
}

.entry-header { margin-bottom: 22px; }

.entry-title {
  margin: 0;
  color: #303030;
  font-size: 29px;
  line-height: 1.18;
  font-weight: 400;
}

.entry-content h2 {
  margin: 30px 0 14px;
  color: #3a3a3a;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 400;
}

.entry-content h3 {
  margin: 24px 0 12px;
  color: #444;
  font-size: 18px;
}

.entry-content h4 {
  margin: 10px 0 8px;
  color: #666;
  font-size: 14px;
}

.entry-content p { margin: 0 0 16px; }
.entry-content ul, .entry-content ol { padding-left: 24px; }
.entry-content li { margin-bottom: 7px; }

.intro-copy { max-width: 830px; }

.more-link {
  display: inline-block;
  padding: 8px 13px;
  background: var(--etd-yellow);
  border: 1px solid #d5c600;
  color: #111;
  text-decoration: none;
}

.about-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.about-lead img {
  display: block;
  width: 100%;
  border: 1px solid var(--etd-border);
}

.person {
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr);
  gap: 24px;
  margin: 24px 0 34px;
  align-items: start;
}

.person img {
  width: 165px;
  border: 1px solid var(--etd-border);
}

.notice {
  padding: 14px 16px;
  border-left: 4px solid var(--etd-yellow);
  background: #f5f5f5;
}

.contact-card {
  max-width: 560px;
  padding: 22px;
  border: 1px solid var(--etd-border);
  background: #f7f7f7;
}

.contact-card a { word-break: break-word; }

.site-footer {
  padding: 20px 24px;
  background: var(--etd-black);
  color: #bdbdbd;
  text-align: center;
  font-size: 13px;
}

.site-footer a { color: var(--etd-yellow); text-decoration: none; }

.footer-menu {
  display: inline-flex;
  flex-wrap: wrap;
  margin: 0 0 0 5px;
  padding: 0;
  list-style: none;
}

.footer-menu li:not(:last-child)::after {
  content: " | ";
  color: #777;
  margin: 0 6px;
}


.primary-nav a {
  text-shadow: 0 1px 0 rgba(0,0,0,.45);
}

.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
  text-shadow: none;
}

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

.more-link {
  font-weight: 400;
  line-height: 1.2;
}

.more-link:hover,
.more-link:focus {
  text-decoration: none;
  background: #e6d500;
}

@media (max-width: 900px) {
  .primary-nav a {
    padding-inline: 14px;
    font-size: 12.5px;
  }
}

@media (max-width: 760px) {
  .site-wrap { width: 100%; margin: 0; box-shadow: none; }
  .branding { min-height: auto; padding: 18px; }

  .menu-toggle {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-top: 1px solid #444;
    background: #2d2d2d;
    color: #fff;
    border-bottom: 4px solid var(--etd-yellow);
    font-size: 16px;
    text-align: left;
    cursor: pointer;
  }

  .primary-nav { display: none; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: block; padding: 0; }
  .primary-nav li { border-right: 0; border-bottom: 1px solid #555; }
  .site-main { padding: 26px 20px 38px; }
  .entry-title { font-size: 26px; }
  .about-lead, .person { grid-template-columns: 1fr; }
  .person img { width: auto; max-width: 220px; }
  .footer-menu { display: flex; justify-content: center; margin: 8px 0 0; }
}


/* ETD Theme 1.2 – finaler Feinschliff */
.site-wrap {
  overflow: hidden;
}

.branding {
  min-height: 122px;
  padding-top: 16px;
  padding-bottom: 12px;
}

.branding img {
  width: min(100%, 560px);
}

.primary-nav ul {
  min-height: 43px;
  align-items: stretch;
}

.primary-nav li {
  display: flex;
}

.primary-nav a {
  display: flex;
  align-items: center;
  min-height: 43px;
  padding: 10px 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.site-main {
  padding-top: 34px;
}

.entry-title {
  max-width: 860px;
  margin-bottom: 4px;
  font-size: clamp(28px, 3.1vw, 36px);
}

.intro-copy,
.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > h2,
.entry-content > h3,
.entry-content > .wp-block-group {
  max-width: 850px;
}

.entry-content p {
  line-height: 1.68;
}

.entry-content ul {
  list-style: square;
}

.entry-content li::marker {
  color: #8d8200;
}

.more-link {
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}

.contact-card {
  max-width: 580px;
  padding: 20px 22px;
  border-left: 5px solid var(--etd-yellow);
  background: #f4f4f4;
}

.site-footer {
  border-top: 1px solid #2f2f2f;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 10px 14px;
  background: var(--etd-yellow);
  color: #111;
}

.skip-link:focus {
  left: 10px;
  top: 10px;
}

@media (max-width: 900px) {
  .primary-nav a {
    padding-inline: 12px;
    font-size: 12px;
  }
}

@media (max-width: 760px) {
  .branding img {
    width: min(100%, 500px);
  }

  .site-main {
    min-height: 420px;
  }

  .entry-title {
    font-size: 27px;
  }

  .primary-nav a {
    min-height: 46px;
    padding: 13px 18px;
    font-size: 14px;
  }
}


/* ETD Theme 1.3 – optischer Feinschliff */
:root {
  --etd-yellow: #f4df00;
  --etd-width: 1000px;
}

.branding {
  min-height: 132px;
  padding: 20px 30px 14px;
}

.branding img {
  width: min(100%, 610px);
}

.primary-nav ul {
  min-height: 46px;
}

.primary-nav a {
  min-height: 46px;
  padding: 11px 17px;
}

.site-main {
  padding: 36px 40px 50px;
}

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

.intro-copy,
.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > h2,
.entry-content > h3,
.entry-content > .wp-block-group {
  max-width: 875px;
}

.site-footer {
  padding: 18px 24px 20px;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.footer-menu li:not(:last-child)::after {
  margin: 0 7px;
}

@media (max-width: 900px) {
  :root {
    --etd-width: 960px;
  }

  .branding img {
    width: min(100%, 560px);
  }
}

@media (max-width: 760px) {
  .branding {
    padding: 18px 18px 14px;
  }

  .branding img {
    width: min(100%, 520px);
  }

  .site-main {
    padding: 28px 22px 40px;
  }

  .site-footer {
    padding-inline: 18px;
  }
}


/* ETD Theme 1.4 – präziser Originalabgleich */
:root {
  --etd-width: 995px;
  --etd-yellow: #f3df00;
}

.site-wrap {
  margin-top: 24px;
  margin-bottom: 24px;
}

.branding {
  min-height: 128px;
  padding: 18px 30px 12px;
}

.branding img {
  width: min(100%, 585px);
}

.primary-nav {
  border-bottom-width: 4px;
}

.primary-nav ul {
  min-height: 44px;
}

.primary-nav a {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
}

.site-main {
  min-height: 515px;
  padding: 32px 40px 48px;
}

.entry-header {
  margin-bottom: 18px;
}

.entry-title {
  font-size: clamp(29px, 3vw, 35px);
  line-height: 1.16;
}

.entry-content p {
  margin-bottom: 15px;
  line-height: 1.64;
}

.intro-copy,
.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > h2,
.entry-content > h3,
.entry-content > .wp-block-group {
  max-width: 860px;
}

.more-link {
  padding: 7px 12px;
  border: 1px solid #cfbf00;
  background: #f3df00;
  box-shadow: none;
  font-size: 13px;
}

.site-footer {
  padding: 17px 22px 19px;
  font-size: 11.5px;
}

@media (max-width: 760px) {
  .site-wrap {
    margin: 0;
  }

  .branding {
    min-height: auto;
    padding: 16px 18px 12px;
  }

  .branding img {
    width: min(100%, 500px);
  }

  .site-main {
    padding: 26px 20px 38px;
  }

  .entry-title {
    font-size: 26px;
  }
}


/* ETD Theme 1.5 – konsolidierte Version im festen Theme-Ordner */
.site-wrap {
  width: min(calc(100% - 30px), 995px);
}

.branding {
  padding-left: 32px;
}

.primary-nav ul {
  padding-left: 12px;
}

.primary-nav a {
  border-left: 1px solid rgba(255,255,255,.03);
}

.primary-nav li:first-child a {
  border-left: 0;
}

.entry-title {
  font-weight: 400;
  letter-spacing: -0.015em;
}

.entry-content {
  font-size: 15px;
}

.entry-content p:last-child {
  margin-bottom: 0;
}

.more-link {
  transition: background-color .15s ease, color .15s ease;
}

.more-link:hover,
.more-link:focus {
  background: #111;
  color: var(--etd-yellow);
}

.site-footer {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}

@media (max-width: 760px) {
  .site-header {
    position: relative;
  }

  .menu-toggle {
    font-weight: 600;
  }

  .site-main {
    min-height: 360px;
  }

  .site-footer {
    display: block;
    text-align: center;
  }
}


/* ETD Theme 1.6 – Seitenlayouts und Feinschliff */
.page-template-default .entry-content,
.front-page-content .entry-content {
  width: 100%;
}

.service-list,
.job-list {
  margin: 18px 0 28px;
  padding: 0;
  list-style: none;
}

.service-list li,
.job-list li {
  position: relative;
  margin: 0;
  padding: 10px 12px 10px 28px;
  border-bottom: 1px solid #e6e6e6;
}

.service-list li::before,
.job-list li::before {
  content: "■";
  position: absolute;
  left: 8px;
  top: 10px;
  color: var(--etd-yellow);
  font-size: 10px;
}

.service-list li:first-child,
.job-list li:first-child {
  border-top: 1px solid #e6e6e6;
}

.section-box {
  margin: 24px 0;
  padding: 20px 22px;
  border-left: 5px solid var(--etd-yellow);
  background: #f5f5f5;
}

.section-box h2,
.section-box h3 {
  margin-top: 0;
}

.company-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.company-grid img {
  width: 100%;
  border: 1px solid var(--etd-border);
}

.contact-card p:last-child {
  margin-bottom: 0;
}

.contact-card a {
  font-weight: 600;
}

.primary-nav a:focus-visible,
.more-link:focus-visible,
.site-footer a:focus-visible {
  outline: 2px solid var(--etd-yellow);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .company-grid {
    grid-template-columns: 1fr;
  }

  .section-box {
    padding: 18px;
  }

  .service-list li,
  .job-list li {
    padding-right: 8px;
  }
}


/* ETD Theme 1.7 – Unternehmen, Ansprechpartner und Inhaltsdetails */
.company-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
  margin-bottom: 34px;
}

.company-intro img {
  width: 100%;
  border: 1px solid var(--etd-border);
}

.timeline {
  margin: 20px 0 34px;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  margin: 0;
  padding: 10px 12px 10px 28px;
  border-bottom: 1px solid #e8e8e8;
}

.timeline li:first-child {
  border-top: 1px solid #e8e8e8;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 17px;
  width: 7px;
  height: 7px;
  background: var(--etd-yellow);
}

.person-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin: 24px 0 34px;
  padding: 20px;
  border: 1px solid #dedede;
  background: #f7f7f7;
}

.person-card img {
  width: 180px;
  border: 1px solid #d2d2d2;
}

.person-card h2 {
  margin-top: 0;
  margin-bottom: 4px;
}

.person-role {
  margin-bottom: 14px;
  color: var(--etd-muted);
  font-weight: 600;
}

.legal-content {
  max-width: 860px;
}

.legal-content h2 {
  margin-top: 30px;
}

.legal-content p,
.legal-content li {
  line-height: 1.65;
}

@media (max-width: 760px) {
  .company-intro,
  .person-card {
    grid-template-columns: 1fr;
  }

  .person-card img {
    width: auto;
    max-width: 220px;
  }
}


/* ETD Theme 1.8 – technische Verfeinerung */
.contact-meta {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-meta li {
  margin: 0 0 8px;
}

.contact-meta strong {
  display: inline-block;
  min-width: 78px;
}

.contact-note {
  margin-top: 18px;
  color: var(--etd-muted);
  font-size: 13px;
}

@media (max-width: 520px) {
  .contact-meta strong {
    display: block;
    min-width: 0;
  }
}


/* ETD Theme 1.9 – Kontaktformular und eingebettete Karte */
.wpforms-container {
  max-width: 680px;
  margin: 30px 0 0;
  padding: 22px;
  border: 1px solid #dddddd;
  background: #f7f7f7;
}

.wpforms-container .wpforms-field {
  padding: 8px 0;
}

.wpforms-container label {
  display: block;
  margin-bottom: 5px;
  color: #333333;
  font-weight: 600;
}

.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container textarea,
.wpforms-container select {
  width: 100%;
  max-width: 100%;
  padding: 10px 11px;
  border: 1px solid #bdbdbd;
  border-radius: 0;
  background: #ffffff;
  color: #222222;
  font: inherit;
}

.wpforms-container textarea {
  min-height: 150px;
  resize: vertical;
}

.wpforms-container input:focus,
.wpforms-container textarea:focus,
.wpforms-container select:focus {
  outline: 2px solid var(--etd-yellow);
  outline-offset: 1px;
  border-color: #847900;
}

.wpforms-container button[type="submit"],
.wpforms-container .wpforms-submit {
  min-height: 40px;
  padding: 9px 16px !important;
  border: 1px solid #c8b900 !important;
  border-radius: 0 !important;
  background: var(--etd-yellow) !important;
  color: #111111 !important;
  font: inherit !important;
  font-weight: 600 !important;
  cursor: pointer;
}

.wpforms-container button[type="submit"]:hover,
.wpforms-container button[type="submit"]:focus,
.wpforms-container .wpforms-submit:hover,
.wpforms-container .wpforms-submit:focus {
  background: #111111 !important;
  color: var(--etd-yellow) !important;
}

.wpforms-confirmation-container-full {
  max-width: 680px;
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid #c8b900;
  background: #fffbe0;
  color: #222222;
}

.entry-content iframe {
  display: block;
  width: 100%;
  max-width: 680px;
  min-height: 360px;
  margin-top: 30px;
  border: 0;
}

@media (max-width: 760px) {
  .wpforms-container {
    padding: 18px;
  }

  .entry-content iframe {
    min-height: 300px;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .site-wrap {
    width: 100%;
    margin: 0;
    box-shadow: none;
  }

  .site-header,
  .site-footer,
  .wpforms-container,
  .entry-content iframe {
    display: none !important;
  }

  .site-main {
    padding: 0;
  }
}
