/* =========================================================================
   ATSOBL Feld und Fokus – ergänzende Styles
   Designsystem (Farben/Typo/Spacing) kommt aus theme.json.
   Hier nur, was sich nicht rein deklarativ lösen lässt.
   ========================================================================= */

:root {
  --atsobl-shadow: 0 6px 28px rgba(31, 61, 47, .08);
  --atsobl-shadow-sm: 0 2px 12px rgba(31, 61, 47, .06);
  --atsobl-radius: 10px;
  --atsobl-header-h: 76px;
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* Sichtbarer Fokus für Tastaturbedienung (A11y) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--wp--preset--color--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip-Link */
.atsobl-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--wp--preset--color--secondary);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 8px 0;
}
.atsobl-skip-link:focus { left: 0; }

/* =========================  Header / Navigation  ======================== */
.atsobl-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--wp--preset--color--base) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--wp--preset--color--line);
}

/* Textbasierter Logo-Platzhalter – später leicht durch echtes Logo ersetzbar */
.atsobl-logo {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
  text-decoration: none;
}
.atsobl-logo strong {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--wp--preset--color--secondary);
}
.atsobl-logo span {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--wp--preset--color--accent);
}

/* Utility-Links (Kundenbereich, Fernwartung) */
.atsobl-utility {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.atsobl-utility a {
  font-size: .85rem;
  font-weight: 500;
  color: var(--wp--preset--color--muted);
  text-decoration: none;
  white-space: nowrap;
}
.atsobl-utility a:hover { color: var(--wp--preset--color--primary); }
.atsobl-header-cta .wp-block-button__link { white-space: nowrap; }

/* Auf Mobile übernimmt die fixe Kontakt-Leiste – Utility & CTA ausblenden */
@media (max-width: 781px) {
  .atsobl-utility,
  .atsobl-header-cta { display: none; }
}

/* Aktiver Navigationspunkt */
.wp-block-navigation .current-menu-item > a,
.wp-block-navigation-item.current-menu-item a {
  color: var(--wp--preset--color--primary);
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* =========================  Hero  ===================================== */
.wp-block-cover h1 { text-shadow: 0 2px 30px rgba(20, 40, 28, .38); }
.wp-block-cover .atsobl-eyebrow { color: #f1d99e; }
.wp-block-cover p:not(.atsobl-eyebrow) { text-shadow: 0 1px 16px rgba(20, 40, 28, .3); }

/* =========================  Footer  =================================== */
.atsobl-footer { line-height: 1.7; }
.atsobl-footer a { color: var(--wp--preset--color--base); text-decoration: none; }
.atsobl-footer a:hover { color: var(--wp--preset--color--accent); text-decoration: underline; }
.atsobl-footer address { font-style: normal; color: rgba(247, 243, 234, .88); }
.atsobl-footer .atsobl-logo--light strong { color: #fff; }
.atsobl-footer .atsobl-logo--light span { color: var(--wp--preset--color--accent); }
.atsobl-footer-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.atsobl-footer p { color: rgba(247, 243, 234, .88); }
.atsobl-footer-legal { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.atsobl-footer-bottom { gap: 1rem; align-items: center; }

/* =========================  Karten  ==================================== */
.is-style-card {
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 14px;
  padding: 1.75rem;
  box-shadow: var(--atsobl-shadow-sm);
  height: 100%;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
/* Verlinkte Karten heben sich beim Hover dezent */
.is-style-card:hover { box-shadow: var(--atsobl-shadow); border-color: #cdd3c3; }
.is-style-card h3 { margin-top: 0; }
.is-style-card > :last-child { margin-bottom: 0; }

/* Karte als ganzer Link (Zielgruppen) */
.atsobl-cardlink {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.atsobl-cardlink:hover { transform: translateY(-2px); }
.atsobl-cardlink h3 { color: var(--wp--preset--color--secondary); }
.atsobl-cardlink p { color: var(--wp--preset--color--muted); }
.atsobl-cardlink .atsobl-arrow {
  margin-top: auto;
  padding-top: .75rem;
  color: var(--wp--preset--color--primary);
  font-weight: 600;
}

/* Downloads-Liste */
.atsobl-downloads { list-style: none; margin: .75rem 0 0; padding: 0; }
.atsobl-downloads li { padding: .35rem 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.atsobl-downloads li:last-child { border-bottom: 0; }
.atsobl-downloads a::before { content: "↓ "; color: var(--wp--preset--color--accent); }
a[aria-disabled="true"] { color: var(--wp--preset--color--muted); cursor: not-allowed; text-decoration: none; }

/* Team-Cards */
.atsobl-team-card { text-align: center; }
.atsobl-team-photo { width: 130px; height: 130px; border-radius: 50%; margin: 0 auto 1rem; border-style: solid; }
.atsobl-team-card h3 { margin: 0; }
.atsobl-team-role { color: var(--wp--preset--color--primary); font-weight: 600; margin: .15rem 0 .6rem; }
.atsobl-team-contact { font-size: .9rem; color: var(--wp--preset--color--muted); }

/* FAQ (details/summary) */
.atsobl-faq { max-width: 760px; margin: 2rem auto 0; }
.atsobl-faq details {
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 8px;
  background: var(--wp--preset--color--white);
  margin-bottom: .75rem;
}
.atsobl-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--wp--preset--color--secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.atsobl-faq summary::-webkit-details-marker { display: none; }
.atsobl-faq summary::after { content: "+"; color: var(--wp--preset--color--accent); font-size: 1.4rem; line-height: 1; }
.atsobl-faq details[open] summary::after { content: "–"; }
.atsobl-faq__body { padding: 0 1.25rem 1.1rem; color: var(--wp--preset--color--muted); }

/* =========================  Häkchen-Liste  ============================= */
.wp-block-list.is-style-check {
  list-style: none;
  padding-left: 0;
}
.wp-block-list.is-style-check li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: .55rem;
}
.wp-block-list.is-style-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .15em;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--wp--preset--color--primary);
  /* weisses Häkchen */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2l-3.5-3.5L4 14.2 9 19.2 20 8.2l-1.4-1.4z'/%3E%3C/svg%3E") center/72% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2l-3.5-3.5L4 14.2 9 19.2 20 8.2l-1.4-1.4z'/%3E%3C/svg%3E") center/72% no-repeat;
}

/* =========================  Vertrauensleiste  ========================= */
.is-style-trust {
  border-top: 1px solid var(--wp--preset--color--line);
  border-bottom: 1px solid var(--wp--preset--color--line);
}
.atsobl-trust__item {
  font-size: .95rem;
  font-weight: 500;
  color: var(--wp--preset--color--secondary);
}
.atsobl-trust__item::before {
  content: "•";
  color: var(--wp--preset--color--accent);
  font-weight: 700;
  margin-right: .5rem;
}

/* =========================  Bild-Platzhalter (SVG)  =================== */
.atsobl-ph {
  display: block;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--atsobl-shadow);
  background: var(--wp--preset--color--secondary);
}
.atsobl-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.atsobl-ph--portrait { max-width: 340px; }

/* =========================  Formulare (mailto)  ======================= */
.atsobl-form {
  display: grid;
  gap: 1rem;
}
.atsobl-form .atsobl-field { display: flex; flex-direction: column; gap: .35rem; }
.atsobl-form label { font-weight: 600; font-size: .92rem; color: var(--wp--preset--color--secondary); }
.atsobl-form label .req { color: var(--wp--preset--color--accent); }
.atsobl-form input,
.atsobl-form textarea,
.atsobl-form select {
  font: inherit;
  color: inherit;
  padding: .7rem .85rem;
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 8px;
  background: var(--wp--preset--color--white);
  width: 100%;
}
.atsobl-form textarea { min-height: 140px; resize: vertical; }
.atsobl-form .atsobl-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.atsobl-form .atsobl-error {
  color: #9a2a2a;
  font-size: .85rem;
  min-height: 1.1em;
}
.atsobl-form input[aria-invalid="true"],
.atsobl-form textarea[aria-invalid="true"] {
  border-color: #9a2a2a;
  background: #fdf6f5;
}
.atsobl-form .atsobl-submit {
  justify-self: start;
  appearance: none;
  cursor: pointer;
  border: 0;
  background: var(--wp--preset--color--primary);
  color: #fff;
  font-weight: 600;
  padding: .85rem 1.6rem;
  border-radius: 8px;
}
.atsobl-form .atsobl-submit:hover { background: var(--wp--preset--color--secondary); }
.atsobl-form .atsobl-hint { font-size: .82rem; color: var(--wp--preset--color--muted); }

/* =========================  Öffnungszeiten-Tabelle  =================== */
.atsobl-hours { width: 100%; border-collapse: collapse; }
.atsobl-hours td { padding: .5rem 0; border-bottom: 1px solid var(--wp--preset--color--line); vertical-align: top; }
.atsobl-hours td:first-child { font-weight: 600; padding-right: 1rem; white-space: nowrap; }
.atsobl-hours td:last-child { text-align: right; color: var(--wp--preset--color--muted); }

/* =========================  Demo-Hinweis  ============================= */
.atsobl-demo-note {
  background: var(--wp--preset--color--surface);
  border-left: 4px solid var(--wp--preset--color--accent);
  padding: .75rem 1rem;
  border-radius: 0 6px 6px 0;
  font-size: .9rem;
  color: var(--wp--preset--color--muted);
}
.atsobl-demo-badge {
  display: inline-block;
  background: var(--wp--preset--color--accent);
  color: #2a2208;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 4px;
}

/* =========================  Mobile Kontakt-Leiste  ==================== */
.atsobl-mobilebar { display: none; }

@media (max-width: 781px) {
  .atsobl-form .atsobl-row { grid-template-columns: 1fr; }

  .atsobl-mobilebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 200;
    border-top: 1px solid var(--wp--preset--color--line);
    background: var(--wp--preset--color--white);
    box-shadow: 0 -4px 20px rgba(31, 61, 47, .1);
  }
  .atsobl-mobilebar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .9rem .5rem;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
  }
  .atsobl-mobilebar a.is-call { color: var(--wp--preset--color--secondary); }
  .atsobl-mobilebar a.is-mail {
    background: var(--wp--preset--color--primary);
    color: #fff;
  }
  /* Platz schaffen, damit der Footer nicht verdeckt wird */
  body { padding-bottom: 56px; }
}

/* =========================  Diverses  ================================= */
.atsobl-section + .atsobl-section { border-top: 1px solid transparent; }
.atsobl-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--wp--preset--color--accent);
  margin-bottom: .5rem;
}
