/* Legacy cleanup pass: moves recurring inline presentation into classes */

/* Legacy presentational HTML attributes */

img.img-align-left {
  float: left;
  margin-right: 10px;
}

img.img-align-right {
  float: right;
  margin-left: 10px;
}

#navigation a {
  display: block;
  margin: 0 0 10px;
  line-height: 1.25;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

#navigation a:visited,
#navigation a:link,
#navigation a:active {
  color: #ffffff;
}

#navigation a:hover,
#navigation a:focus-visible {
  color: #b02126;
}

#navigation a:last-child {
  margin-bottom: 0;
}

#navigation a.nav-group-start {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(68, 64, 107, 0.35);
}

/* Reusable classes migrated from inline styles */
.legacy-sep-bottom {
  border: 0 none;
  border-bottom: 1px dashed #ccc;
}

.legacy-sep-top {
  border: 0 none;
  border-top: 1px dashed #ccc;
}

.content-row-clear {
  width: 700px;
  display: block;
  clear: both;
}

.sidebar-info-box {
  padding: 5px;
  width: 230px;
  float: right;
  margin-left: 20px;
  margin-bottom: 10px;
  text-align: center;
}

.sidebar-contact-box {
  border: 1px dotted #ccc;
  padding: 5px;
  width: 250px;
  float: right;
  margin-left: 10px;
  text-align: center;
}

.media-block-left {
  float: left;
  margin-bottom: 10px;
  margin-right: 20px;
  display: block;
}

.valign-top {
  vertical-align: top;
}

.text-bold {
  font-weight: bold;
}

.form-field-narrow {
  width: 115px;
}

.form-field-slim {
  width: 120px;
}

.form-field-medium {
  width: 160px;
}

.text-small-9 {
  font-size: 9px;
}

.clear-both {
  clear: both;
}

.text-center {
  text-align: center;
}

.margin-left-10 {
  margin-left: 10px;
}

.margin-left-15-bottom-3 {
  margin-left: 15px;
  margin-bottom: 3px;
}

.margin-left-20 {
  margin-left: 20px;
}

.panel-width-400 {
  padding: 10px;
  width: 400px;
}

.media-card-top {
  vertical-align: top;
  width: 290px;
  margin-left: 20px;
  background-color: #fff;
}

.image-width-280 {
  margin: 0;
  width: 280px;
}

.text-accent {
  color: #b02126;
}

.text-black {
  color: #000;
}

.half-column-left {
  width: 49%;
  float: left;
}

.info-card-compact {
  border: 1px dotted #ccc;
  width: 260px;
  margin-bottom: 25px;
  font-size: 11px;
  background-color: #fff;
}

.margin-left-250 {
  margin-left: 250px;
}

.contact-badge-offset {
  width: 190px;
  position: relative;
  top: -186px;
}

.text-note-compact {
  font-size: 9px;
  text-align: left;
  word-spacing: -1px;
}

.width-190 {
  width: 190px;
}

.width-300 {
  width: 300px;
}

.margin-0 {
  margin: 0;
}

.text-accent-alt {
  color: #b02126;
}

.width-350 {
  width: 350px;
}

.margin-bottom-0 {
  margin-bottom: 0;
}

.text-left {
  text-align: left;
}

.link-blue-strong {
  color: #3333ff;
  font-weight: bold;
}

.media-half-size {
  width: 50%;
  height: 50%;
}

.margin-top-15 {
  margin-top: 15px;
}

.image-hero-large {
  width: 700px;
  height: 741px;
}

.text-brown {
  color: brown;
}

.margin-right-20 {
  margin-right: 20px;
}


/* Auto-generated final cleanup rules */
.align-left { text-align: left; }
.align-right { text-align: right; }
.align-center { text-align: center; }
.valign-middle { vertical-align: middle; }
.img-align-center { display: block; margin-left: auto; margin-right: auto; }
.border-none { border: 0; }
.anreise-routeplanner-box { background: rgb(255, 255, 255) url(http://iww.web.de/de/themen/auto/routenplaner/img/webde_rp_hg.gif) no-repeat scroll left bottom; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; width: 461px; }
.anreise-map-link-note { color:#0000FF;text-align:left; }
.anreise-map-offset { margin-left: 25px; }
.buergerservice-address-panel { width: 500px; }
.buergerservice-contact-panel { width:280px; }
.cjd-feature-intro { width:500px; margin-bottom:20px; margin-left:50px; margin-top:20px; font-size:12px; font-style:italic; line-height:26px; }
.cjd-contact-card { border: 1px dotted rgb(204, 204, 204); width: 260px; margin-bottom: 5px; font-size: 11px; background-color: rgb(255, 255, 255); }
.ausstellung-zitat-block { width:270px; margin-bottom:20px; margin-left:20px; margin-top:0px; font-size:12px; font-style:italic; font-weight: bolder; float:left; }
.ausstellung-caption-klein { font-size:10px; font-weight:normal; font-style:normal; }
.museum-kontakt-embed { display:block; width:100%; max-width:700px; min-height:700px; border:0; background:#fff; }
.ema-contact-form { width:100%; max-width:700px; padding:14px; border:1px solid #d5d5d5; background:#f7f7f7; box-sizing:border-box; }
.ema-contact-field { margin-bottom:12px; }
.ema-contact-field label { display:block; margin-bottom:4px; font-weight:bold; }
.ema-contact-field input[type="text"],
.ema-contact-field input[type="email"],
.ema-contact-field textarea { width:100%; box-sizing:border-box; border:1px solid #bdbdbd; padding:8px; font:inherit; background:#fff; }
.ema-contact-checkbox label { font-weight:normal; }
.ema-contact-submit { border:1px solid #44406B; background:#e5e5e5; color:#222; padding:8px 14px; cursor:pointer; }
.ema-contact-errors { border:1px solid #b02126; background:#fff3f3; color:#7f1115; padding:10px; margin-bottom:12px; }
.ema-contact-errors ul { margin:0; padding-left:18px; }
.ema-contact-success { border:1px solid #2c7c2c; background:#f0fff0; color:#1f5d1f; padding:10px; margin:0 0 12px; }
.ema-contact-honeypot { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.museum-media-embed { width:500px; height: 300px; }
.museum-media-table { text-align:center; width: 100%; }
.museum-media-cell { width: 100%; text-align: center; }
.museum-section-title { text-align: center; margin-top:60px; }
.museum-figure-third { width: 30%; }
.museum-figure-right-narrow { float: right; margin-left: 10px; margin-right: 0; width: 40%; }
.museum-figure-right-wide { float: right; margin-left: 10px; margin-right: 0; width: 100%; }
.home-map-image { margin-left: 35px; margin-bottom: 40px; margin-top: 10px; }
.home-crest-image { margin-right: 20px; margin-bottom: 15px; margin-top: 15px; }
.karnitz-image-left { float:left; margin-right:30px; margin-left:0px; margin-top:10px; }
.kontakt-textarea { width: 450px; }
.spacing-bottom-large { margin-bottom: 20px; }
.text-muted-link { color: rgb(26, 89, 158); }
.lebenshilfe-sidebox-compact { width: 260px; margin-bottom: 10px; }
.oekokonto-sidebox-map { padding: 5px; width: 350px; float: right; margin-left: 20px; margin-bottom: 10px; text-align: center; }
.oekokonto-source-note { text-align: right; }
.spacing-bottom-medium { margin-bottom: 10px; }
.stadtgarz-gallery-left { float: left; margin-left: 20px; }
.zudar-content-block { width: 680px; text-align: justify; margin-left: 0px; display: block; }
.zudar-image-framed { border: 1px solid rgb(176, 33, 38); margin-right: 10px; }
.table-cell-dark { background-color: #dbdbdb; }
.table-cell-light { background-color: #efefef; }

/* Mobile navigation and responsive layout (desktop behavior remains unchanged) */
.mobile-nav-toggle,
.mobile-nav-overlay,
.mobile-city-links,
.mobile-ema-links {
  display: none;
}

@media (max-width: 900px) {
  html,
  body {
    overflow-x: hidden;
  }

  body {
    font-size: 14px;
    line-height: 1.45;
  }

  #masterblock {
    width: auto;
    max-width: 100%;
    margin: 0;
    border-left: 0;
    border-right: 0;
    box-sizing: border-box;
  }

  #flash,
  #flash img {
    width: 100%;
    height: auto;
  }

  #flash {
    margin-bottom: 14px !important;
  }

  #inhalt {
    float: none;
    width: auto;
    padding: 22px 14px 18px !important;
    box-sizing: border-box;
    text-align: left;
    line-height: 1.6;
  }

  #inhalt h1,
  #inhalt h2 {
    line-height: 1.35;
  }

  #inhalt h1 {
    font-size: 18px;
  }

  #inhalt h2 {
    font-size: 16px;
  }

  .content-row-clear {
    width: auto;
    max-width: 100%;
  }

  #inhalt a.unternavi,
  #inhalt a.unternavi:link,
  #inhalt a.unternavi:visited,
  #inhalt a.unternavi:hover,
  #inhalt a.unternavi:active {
    font-size: 1em;
  }

  #inhalt img,
  #inhalt iframe,
  #inhalt embed,
  #inhalt object {
    max-width: 100%;
    height: auto;
  }

  #inhalt table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #inhalt td,
  #inhalt th {
    white-space: normal;
    word-break: normal;
  }

  #zwischennavigation {
    display: none;
  }

  #navigation {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 85vw);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 1002;
    overflow-y: auto;
    visibility: hidden;
    pointer-events: none;
    background-color: #9094A2;
    padding: 80px 16px 24px;
    box-sizing: border-box;
    text-align: left;
  }

  #navigation a {
    display: block;
    text-align: left;
    margin: 0 0 6px;
    padding: 2px 0;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #navigation a.nav-group-start {
    margin-top: 10px;
    padding-top: 8px;
    border-top-color: rgba(255, 255, 255, 0.35);
  }

  .mobile-city-links {
    display: block;
    margin: 6px 0 10px;
    padding: 8px 0 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  }

  .mobile-city-links a {
    color: inherit;
    margin: 0 0 6px;
    padding: 2px 0;
    line-height: 1.25;
  }

  .mobile-city-links a:last-child {
    margin-bottom: 0;
  }

  #navigation > .mobile-city-links + a {
    margin-top: 8px;
  }

  .mobile-ema-links {
    display: block;
    margin: 2px 0 10px 14px;
    padding: 4px 0 0 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.35);
  }

  .mobile-ema-links a,
  .mobile-ema-links span {
    display: block;
    color: inherit;
    margin: 0 0 6px;
    padding: 1px 0;
    line-height: 1.25;
    font-size: 0.95em;
    text-decoration: none;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .mobile-ema-links .mobile-ema-current {
    font-weight: bold;
    color: #b02126;
  }

  body.has-mobile-ema-links .tab-unternavi {
    display: none;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1004;
    border: 1px solid #44406B;
    border-radius: 6px;
    background: #e5e5e5;
    cursor: pointer;
    padding: 0 10px;
    box-sizing: border-box;
    transition: background-color 0.2s ease, border-color 0.2s ease;
  }

  .mobile-nav-toggle:focus-visible {
    outline: 2px solid #b02126;
    outline-offset: 2px;
  }

  .mobile-nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #333;
    transform-origin: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .mobile-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1001;
  }

  .sidebar-info-box,
  .sidebar-contact-box,
  .info-card-compact,
  .lebenshilfe-sidebox-compact,
  .oekokonto-sidebox-map,
  .buergerservice-address-panel,
  .buergerservice-contact-panel,
  .museum-figure-right-narrow,
  .museum-figure-right-wide,
  .bilder-orte,
  .bilder-hg-variable,
  .gedichte,
  #top,
  .zudar-content-block {
    width: auto;
    max-width: 100%;
    float: none;
    margin-left: 0;
    margin-right: 0;
  }

  .bilder-orte,
  .bilder-hg-variable,
  .gedichte {
    display: block;
    width: auto;
    padding: 8px;
    margin: 0 0 14px;
    text-align: center;
    box-sizing: border-box;
  }

  .contact-badge-offset {
    position: static;
    top: auto;
    margin-top: 10px;
  }

  #top {
    width: auto;
    padding: 10px 0;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open #navigation {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  body.nav-open .mobile-nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.nav-open .mobile-nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .mobile-nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  body.nav-open .mobile-nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  /* EMA Ausstellungen: mobile Reihenfolge Text -> Bild(er) -> Copyright */
  #ema-ausstellungen-dynamic table {
    display: block;
    width: 100%;
    overflow: visible;
  }

  #ema-ausstellungen-dynamic table tbody,
  #ema-ausstellungen-dynamic table tr,
  #ema-ausstellungen-dynamic table td {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
  }

  #ema-ausstellungen-dynamic table tr:first-child {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  #ema-ausstellungen-dynamic td:empty {
    display: none;
  }

  #ema-ausstellungen-dynamic .panel-width-400,
  #ema-ausstellungen-dynamic .media-card-top {
    width: 100% !important;
    margin: 0;
    padding: 0;
    background: transparent;
  }

  #ema-ausstellungen-dynamic td img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 0 10px;
  }

  #ema-ausstellungen-dynamic td img:last-child {
    margin-bottom: 0;
  }

  #ema-ausstellungen-dynamic .ausstellung-zitat-block {
    float: none;
    width: auto;
    margin: 12px 0;
  }

  #ema-ausstellungen-dynamic,
  #ema-ausstellungen-dynamic .ema-entry {
    max-width: 100%;
    overflow-x: hidden;
  }
}

@media (min-width: 901px) {
  #inhalt {
    padding-top: 30px !important;
  }
}
