/* =========================================
   Gemeinsame Gestaltung – Silvias Keramikwelt
   Grundlayout, Inhalte und responsive Regeln
   ========================================= */

html,
body {
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  background: #304b35 url("img/background.jpg") no-repeat center center fixed;
  background-size: cover;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
  font-family: tahoma;
}

a:link {
  color: #000000;
  text-decoration: none;
}

a:visited {
  color: #000000;
}

a:hover {
  color: #759D22;
}

p,
li {
  font-size: 12pt;
  line-height: 1.3;
}

ul {
  list-style: url("img/star_full_12x11.gif") inside;
}

/* Gemeinsame Seitenstruktur */
.wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  width: 100%;
}

.banner {
  min-height: 180px;
  display: flex;
  align-items: center;
  background: url("img/headbanner.jpg") left center no-repeat;
  background-size: cover;
}

.banner-inner {
  width: 100%;
  max-width: 1100px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 28px 20px;
}

.site-title {
  margin: 0;
  color: #f2f2f2;
  font-size: 42px;
  font-weight: 600;
  line-height: 1.1;
  text-align: left;
}

.site-subtitle {
  margin: 8px 0 0;
  color: #f2f2f2;
  font-size: 18px;
  line-height: 1.3;
  opacity: 0.9;
  text-align: left;
}

/* Navigation */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 10px auto 5px;
  padding: 0 20px;
}

.site-nav a {
  display: inline-block;
  padding: 8px 12px;
  background-color: #CCCCCC;
  color: #000000;
  text-decoration: none;
}

.site-nav a.active {
  background-color: #98A4AB;
  color: #D7DCDF;
}

.menu-toggle-row,
.menu-toggle {
  display: none;
}

/* Inhaltsbereich */
.content {
  margin-top: 10px;
  margin-bottom: 7px;
}

.site-nav + .wrapper.content {
  margin-top: 5px;
}

.content p {
  margin: 0.9em 0;
  line-height: 1.5;
}

.content p br {
  line-height: 0.8;
}

.content p:last-of-type {
  margin-bottom: 0.3em;
}

.content h1:first-child,
.content h2:first-child,
.content h3:first-child,
.content p:first-child {
  margin-top: 0;
}

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

.content table[width] {
  width: 100% !important;
}

.content td {
  vertical-align: top;
}

td.main {
  padding: 20px;
  background-color: #E4E4E4;
}

/* Tabellenfreies Seitenlayout (schrittweise Umstellung) */
.page-layout {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 3px;
}

.page-main {
  padding: 20px;
  background-color: #E4E4E4;
}

main .page-title {
  display: block !important;
  margin: 0 0 12px !important;
  font-size: 24px !important;
  font-weight: bold !important;
  line-height: 1.25 !important;
}

main .section-title {
  display: block !important;
  margin: 0.9em 0 0.35em !important;
  font-size: 18px !important;
  font-weight: bold !important;
  line-height: 1.3 !important;
}

.content img,
.content-image {
  max-width: 100%;
  height: auto;
}

.content-image {
  display: block;
  margin: 14px auto 22px;
}

/* Kleinere, mittig angeordnete Inhaltsbilder auf dem Desktop */
@media (min-width: 769px) {
  .content-image {
    width: 60%;
    max-width: 650px;
    margin-right: auto;
    margin-left: auto;
  }
}

.info-list {
  margin: 0.2em 0 0.9em;
  padding-left: 18px;
}

/* FAQ-Akkordeon */
.page-main .faq-intro {
  margin: 0.6em 0 1.2em !important;
}

.page-main .faq-outro {
  margin: 1.2em 0 0.6em !important;
}

.page-main .faq-item {
  margin: 10px 0;
  padding: 0;
  scroll-margin-top: 12px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #ffffff;
}

.page-main .faq-item summary {
  padding: 12px 14px;
  outline: none;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.page-main .faq-item summary::-webkit-details-marker {
  display: none;
}

.page-main .faq-item summary::after {
  content: "▾";
  float: right;
  opacity: 0.65;
  transition: transform 0.15s ease-in-out;
}

.page-main .faq-item[open] summary::after {
  transform: rotate(180deg);
}

.page-main .faq-answer {
  padding: 0 14px 12px;
}

.page-main .faq-answer p {
  margin: 0.7em 0 !important;
}

/* Kontaktformular im Inhaltsbereich */
.page-main .contact-form-area {
  max-width: 620px;
  margin-top: 8px;
}

.page-main .contact-heading {
  margin-top: 1em !important;
}

.page-main .contact-note {
  margin: 0.4em 0 1em;
  font-size: 14px;
}

.page-main .contact-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin: 8px 0;
}

.page-main .contactSubject {
  padding-top: 7px;
}

.page-main .contactField {
  width: 100%;
  box-sizing: border-box;
  padding: 7px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: #fff;
  font: inherit;
}

.page-main .contactField-invalid {
  border: 2px solid #b22222;
  background: #fff7f7;
  outline: none;
}

.page-main .contact-field-error {
  grid-column: 2;
  color: #b22222;
  font-size: 14px;
  font-weight: bold;
  margin-top: -3px;
}

.page-main textarea.contactField {
  min-height: 130px;
  resize: vertical;
}

.page-main .contact-submit {
  text-align: right;
}

.page-main input[type="submit"] {
  margin-top: 10px;
  padding: 7px 14px;
  cursor: pointer;
}

.page-main .contact-error {
  color: #b22222;
}

.page-main .contact-success {
  color: #5f7f25;
}

.contact-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Responsive Galerie der Seelenhäuser */
.soul-gallery {
  margin-top: 24px;
}

.soul-gallery-stage {
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background-color: #f4f4f2;
  text-align: center;
}

.soul-gallery-stage img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 650px;
  margin: 0 auto;
  object-fit: contain;
}

.soul-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 28px;
  margin-top: 12px;
}

.gallery-control {
  display: inline-block;
  position: relative;
  flex: none;
  padding: 0;
  border: 0;
  background-color: transparent;
  cursor: pointer;
}

.gallery-control img {
  display: block;
  width: auto;
  max-width: none;
  height: auto;
}

.gallery-control .control-hover {
  display: none;
  position: absolute;
  inset: 0;
}

.gallery-control:hover > img:first-child {
  visibility: hidden;
}

.gallery-control:hover .control-hover {
  display: block;
}

.gallery-control:focus-visible {
  outline: 2px solid #759d22;
  outline-offset: 3px;
}

.gallery-previous {
  width: 16px;
  height: 22px;
}

.gallery-start {
  width: 64px;
  height: 23px;
}

.gallery-next {
  width: 16px;
  height: 22px;
}

/* Footer */
td.impressum {
  height: 26px !important;
  padding: 2px 10px !important;
  background-color: #CCCCCC;
  line-height: 1.15 !important;
}

td.impressum table,
td.impressum tr,
td.impressum td {
  height: auto !important;
}

td.impressum table,
td.impressum td {
  padding: 4px 0 !important;
}

.text-impressum,
.text-copyright {
  margin: 0 !important;
  padding: 0 !important;
  color: #000000;
  font-size: 13px;
  line-height: 1.2;
}

td.impressum .text-impressum {
  padding-left: 6px !important;
}

td.impressum .text-copyright {
  padding-right: 6px !important;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.page-footer {
  display: flex;
  min-height: 36px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background-color: #CCCCCC;
}

.whatsapp-button {
  display: none;
}

/* Mobile Darstellung */
@media (max-width: 768px) {
  html,
  body {
    overscroll-behavior-y: none;
  }

  html {
    background-attachment: scroll;
  }

  .banner {
    min-height: 140px;
  }

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

  .site-subtitle {
    font-size: 14px;
  }

  .banner-inner {
    padding-right: 78px;
    padding-left: 15px;
  }

  .wrapper,
  .site-nav,
  .menu-toggle-row {
    padding-right: 15px;
    padding-left: 15px;
  }

  .content {
    padding-right: 10px;
    padding-left: 10px;
  }

  .mobile-menu-ready .menu-toggle-row {
    position: fixed;
    top: 48px;
    right: 10px;
    z-index: 1001;
    display: flex;
    width: auto;
    margin: 0;
    padding: 0;
  }

  .whatsapp-button {
    position: fixed;
    right: 10px;
    bottom: 16px;
    z-index: 999;
    display: flex;
    width: 58px;
    height: 58px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 50%;
    background-color: #fff;
    color: #1f2917;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
  }

  .whatsapp-button:hover,
  .whatsapp-button:focus-visible {
    background-color: #f4f4f2;
    outline: 2px solid #1f2917;
    outline-offset: 2px;
  }

  .whatsapp-button svg {
    display: block;
    width: 30px;
    height: 30px;
    fill: currentColor;
  }

  .mobile-menu-ready .menu-toggle {
    display: inline-flex;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 4px;
    background-color: rgba(105, 153, 55, 0.97);
    color: #ffffff;
    font: inherit;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

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

  .mobile-menu-ready .menu-toggle:hover,
  .mobile-menu-ready .menu-toggle:focus-visible,
  .mobile-menu-ready .menu-toggle[aria-expanded="true"] {
    background-color: rgba(84, 130, 40, 0.99);
  }

  .menu-toggle-icon,
  .menu-toggle-icon::before,
  .menu-toggle-icon::after {
    display: block;
    width: 22px;
    height: 2px;
    background-color: currentColor;
  }

  .menu-toggle-icon {
    position: relative;
  }

  .menu-toggle-icon::before,
  .menu-toggle-icon::after {
    position: absolute;
    left: 0;
    content: "";
  }

  .menu-toggle-icon::before {
    top: -7px;
  }

  .menu-toggle-icon::after {
    top: 7px;
  }

  .mobile-menu-ready .site-nav {
    position: fixed;
    top: 100px;
    right: 10px;
    z-index: 1000;
    display: none;
    width: min(240px, calc(100vw - 28px));
    box-sizing: border-box;
    margin: 0;
    padding: 6px;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 4px;
    background-color: rgba(243, 248, 237, 0.98);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.24);
    max-height: calc(100vh - 108px);
    overflow-y: auto;
  }

  .mobile-menu-ready .site-nav.is-open {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .site-nav a {
    min-height: 44px;
    box-sizing: border-box;
    padding: 11px 14px;
    background-color: #e5eed9;
    color: #1f2917;
    text-align: left;
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    background-color: #d4e3c0;
    color: #1f2917;
  }

  .site-nav a.active {
    background-color: #9fba72;
    color: #18200f;
  }

  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .page-layout {
    margin: 0;
  }

  .page-footer {
    min-height: 53px;
    align-items: flex-start;
  }

  .page-main .faq-item {
    scroll-margin-top: 100px;
  }

  td.impressum {
    height: auto !important;
  }

  /* Alte äußere Layouttabellen dürfen die Mobilbreite nicht erzwingen. */
  .content,
  .content > table,
  .content > table > tbody,
  .content > table > tbody > tr,
  .content > table > tbody > tr > td {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .content {
    overflow-wrap: anywhere;
  }

}

@media (max-width: 700px) {
  .soul-gallery-stage {
    padding: 8px;
  }

  .page-main .contact-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .page-main .contactSubject {
    padding-top: 0;
  }

  .page-main .contact-field-error {
    grid-column: 1;
  }
}
