/* ==========================================================================
   faul.de – Steuerberater Reinhard Faul
   Responsive Neuauflage (ohne Frames, ohne Tabellenlayout)
   Farben und Bilder entsprechen der bisherigen Seite.
   ========================================================================== */

:root {
  --navy: #000080;          /* Seitenhintergrund */
  --lila: #330066;          /* Text, Links, Überschriften */
  --lila-dunkel: #2E005F;   /* Navigationsleiste der Unterseiten */
  --grau: #D3D6DB;          /* Adressfeld Startseite, Linkfarbe Navigation */
  --rot: #CC0000;           /* Hover in der Navigation */
  --rot-weich: #B72F4A;     /* Hover im Inhalt */
  --blau: #0033CC;          /* Zitate */
  --breite: 800px;          /* Breite der bisherigen Seite */
  --gothic: "Century Gothic", CenturyGothic, "URW Gothic", "URW Gothic L", "Avant Garde",
            "Avenir Next", Avenir, Futura, "Trebuchet MS", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--navy);
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

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

a { color: var(--lila); }

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

.sprung {
  position: absolute; left: -999px; top: 0; z-index: 10;
  background: #fff; color: var(--lila); padding: 8px 12px; font-weight: bold;
}
.sprung:focus { left: 0; }

/* --------------------------------------------------------------------------
   Seitenrahmen: 800px-Spalte auf dunkelblauem Grund, darunter voll breit
   -------------------------------------------------------------------------- */

.seite {
  width: 100%;
  max-width: var(--breite);
  margin: 0 auto;
  padding: 50px 0 40px;
}

/* --------------------------------------------------------------------------
   Kopfbilder
   -------------------------------------------------------------------------- */

.banner { display: block; margin: 0; line-height: 0; }
.banner img { display: block; width: 100%; height: auto; object-fit: cover; }

/* Die Bilder skalieren proportional mit und bleiben immer vollständig sichtbar –
   die mobile Ansicht ist die verkleinerte Desktop-Ansicht. */

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.navi {
  font-weight: bold;
  text-align: right;
  padding: 1px 30px 1px 8px;
}
.navi a { text-decoration: none; white-space: nowrap; }
.menue { display: inline; }
.menue-knopf { display: none; }      /* Hamburger-Knopf: nur schmal + mit JavaScript */
.navi i {                       /* kleines Quadrat zwischen den Menüpunkten */
  display: inline-block; width: 23px; height: 5px; vertical-align: middle;
  background: url(../images/dig.gif) center / 23px 5px no-repeat;
}

/* Startseite: weiße Leiste, schwarze Schrift */
.navi-start { background: #fff; font-size: 16px; line-height: 20px; }
.navi-start a { color: #000; }
.navi-start a:hover, .navi-start a:focus-visible { color: var(--lila); text-decoration: underline; }

/* Unterseiten: dunkelviolette Leiste, hellgraue Schrift */
.navi-kopf { background: var(--lila-dunkel); font-size: 13px; line-height: 18px; padding-top: 2px; padding-bottom: 2px; }
.navi-kopf a { color: var(--grau); }
.navi-kopf a:hover, .navi-kopf a:focus-visible { color: #fff; text-decoration: underline; }
.navi-kopf a[aria-current="page"] { color: #fff; }

/* --------------------------------------------------------------------------
   Startseite: Adressfeld
   -------------------------------------------------------------------------- */

.adresse {
  background: var(--grau);
  color: #000;
  padding: 26px 14px 22px;
  font-size: 16px;
  line-height: 1.2;
  font-style: normal;
}
.adresse p { margin: 0 0 1.15em; }
.adresse .name { font-size: 19px; margin-bottom: 0; }
.adresse a { color: #000; text-decoration: none; }
.adresse a:hover, .adresse a:focus-visible { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Unterseiten: weißes Inhaltsfeld
   -------------------------------------------------------------------------- */

.inhalt {
  background: #fff;
  color: var(--lila);
  padding: 18px 28px 40px;
  min-height: 360px;
  overflow-wrap: break-word;
}

.inhalt h1 {
  font-family: var(--gothic);
  font-weight: normal;
  font-size: 24px;
  line-height: 1.25;
  color: var(--lila);
  margin: 14px 0 26px;
}
.inhalt h1.klein { font-family: inherit; font-size: 1em; font-weight: bold; line-height: inherit; margin: 0 0 .5em; }
.zurueck + h1.klein { margin-top: 12px; }
.inhalt h2 { font-size: 1em; font-weight: bold; margin: 1.4em 0 .5em; }
.inhalt h2:first-child { margin-top: 0; }
.inhalt p { margin: 0 0 1em; }

.inhalt a { color: var(--lila); font-weight: bold; text-decoration: none; }
.inhalt a:hover, .inhalt a:focus-visible { color: var(--rot-weich); text-decoration: underline; }

/* roter Pfeil hinter weiterführenden Links – als Hintergrund im rechten
   Innenabstand, damit er nie allein in die nächste Zeile umbricht */
.pfeil {
  padding-right: 16px;
  background: url(../images/pfeil_kl.gif) right 55% no-repeat;
}
.pfeil.solo { display: inline-block; width: 15px; height: 15px; padding: 0; vertical-align: -3px; background-position: center; }
.nb { white-space: nowrap; }

/* „zurück“-Links oben rechts */
.zurueck { text-align: right; margin: 0 0 2px; font-size: 13px; line-height: 1.9; }
.zurueck a { display: inline-block; }
.zurueck + h1 { margin-top: 6px; }

/* zwei Spalten, die auf schmalen Displays untereinander rutschen */
.spalten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 0 44px;
  align-items: start;
}
.spalten > * { min-width: 0; }
.spalten.gleich { align-items: stretch; }

/* Aufzählungen mit den kleinen Quadraten der alten Seite */
ul.digit { list-style: none; margin: 0 0 1em; padding: 0; }
ul.digit li {
  padding: 3px 0 7px 26px;
  background: url(../images/digit.png) 4px .5em no-repeat;
}
ul.digit.blau li { background-image: url(../images/digitblau.png); }

/* Leistungsübersicht: nummerierte Kästen mit hellem Hintergrundbild */
.kasten {
  margin: 0 0 22px;
  padding: 12px 14px 30px 44px;
  background: #E1E7F4 url(../images/leisthinter.jpg) center / cover no-repeat;
  font-weight: bold;
}
.kasten li { padding: 4px 0 5px 4px; }

/* Text links, Bild/Karte rechts */
.zweispaltig {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 36px;
  align-items: start;
}
.zweispaltig > * { min-width: 0; }
.zweispaltig figure { margin: 0; }
.zweispaltig figure img { display: block; }
.zweispaltig figcaption { font-weight: bold; margin-top: 1em; max-width: 300px; }

.gross { font-size: 16px; font-style: normal; color: #000; }
.gross a { font-weight: normal; }
.gross a[href^="tel:"] { color: inherit; }
.klein { font-size: 12px; }

.karte { width: 360px; max-width: 100%; }
.karte iframe { display: block; width: 100%; height: 350px; border: 1px solid #999; }
.karte p { margin: 4px 0 0; }
.karte a { font-weight: normal; text-decoration: underline; }

.zitat { color: var(--blau); font-weight: bold; }
.fazit { color: #0000FF; font-weight: bold; }

.nach-oben { display: none; text-align: right; margin: 28px 0 0; font-size: 13px; }

/* Rechtstexte (Datenschutz, Haftung, AGB): schwarze Schrift wie bisher */
.recht { color: #000; }
.recht h2 { font-size: 1.07em; margin-top: 1.8em; }
.recht ul { padding-left: 1.4em; }
.recht li { margin-bottom: .4em; }
.agb h1 { text-align: center; margin-bottom: 4px; }
.agb .stand { text-align: center; font-size: 12px; margin-bottom: 24px; }
.agb .dwsol { counter-reset: list; padding-left: 0; }
.agb .dwsol > .dwsli { list-style: none; margin-bottom: .5em; }
.agb .dwsli::before { content: "(" counter(list, number) ") "; counter-increment: list; }
.agb .dwsol ol, .agb .dwsol ul { padding-left: 1.6em; }
.agb .fussnoten, .agb .dwscoypright { font-size: 12px; }

/* Seite „Aktuelles“: Inhalte kommen per Skript vom Mandanten-Info-Dienst */
.aktuelles { padding: 0 0 24px; }
.aktuelles #myContent { display: block; }
.aktuelles #myContent > table,
.aktuelles #myContent table#AutoNumber1 { width: 100% !important; height: auto !important; left: 0 !important; table-layout: fixed; }
.aktuelles #myContent table#AutoNumber1 > tbody > tr > td > img:first-child { display: none; }  /* doppeltes Kopfbild */
.aktuelles #myContent img { max-width: 100%; height: auto; }
.aktuelles #erv { font-size: 14px !important; }
.aktuelles #erv a { font-weight: normal; }
.aktuelles .laden { display: block; padding: 24px 28px; }

/* Der Info-Dienst (mainfo.net) baut seine Seiten zweispaltig mit Flexbox und schaltet
   selbst erst unter 670px auf einspaltig. In der schmalen Ansicht dieser Seite gilt:
   - Seitenleiste aus, dafür die Aufklapp-Navigation des Dienstes (Monat/Themengebiet);
   - die Inhaltsspalte darf schmaler werden als ihr breitester Inhalt (min-width: 0) –
     sonst schieben Bilder und Tabellen sie über den rechten Rand, vor allem auf
     kleinen Displays und in älteren Browsern. */
@media (max-width: 819px) {
  .aktuelles #erv-sidebar { display: none; }
  .aktuelles #erv-nav-responsive { display: block; margin-bottom: 10px; }
  .aktuelles #erv-content { margin-right: 0; }
  .aktuelles #erv, .aktuelles #erv-wrapper, .aktuelles #erv-content, .aktuelles .erv-box,
  .aktuelles .erv-article, .aktuelles .erv-article-content, .aktuelles .erv-article-img { min-width: 0; max-width: 100%; }
  .aktuelles #erv-content { word-break: break-word; overflow-wrap: anywhere; }
  .aktuelles #erv table { max-width: 100%; }
  .aktuelles #erv img { max-width: 100% !important; height: auto; }
}
@media (max-width: 420px) {
  .aktuelles #erv { padding-left: 6px !important; padding-right: 6px !important; }
  .aktuelles .dropbtn { text-align: right; font-size: 15px; padding: 14px 14px; }
  .aktuelles .erv-suchfeld { max-width: 62%; }
}

/* --------------------------------------------------------------------------
   Navigation der Unterseiten bleibt beim Scrollen oben stehen
   (ersetzt den festen Navigations-Frame der alten Seite)
   -------------------------------------------------------------------------- */

@media (min-width: 700px) and (min-height: 500px) {
  .navi-kopf { position: sticky; top: 0; z-index: 5; }
  .inhalt :target, .inhalt [id] { scroll-margin-top: 40px; }
}

/* --------------------------------------------------------------------------
   Tablet und Smartphone
   -------------------------------------------------------------------------- */

@media (max-width: 819px) {
  .seite { padding: 0; }

  /* Navigation einzeilig, etwas größere Tippflächen */
  .navi { padding: 0 14px 0 6px; }
  .navi a { display: inline-block; padding: 8px 0; font-size: 14px; line-height: 18px; }

  .inhalt { padding: 16px 20px 32px; min-height: 0; font-size: 16px; }
  .zurueck { font-size: 14px; }
  .zurueck a { padding-top: 5px; padding-bottom: 5px; }
  .nach-oben { display: block; }
  .nach-oben a { display: inline-block; padding: 8px 0; }
  .klein { font-size: 13px; }
}

/* Smartphone: schmale Leiste mit Hamburger-Menü – Aufbau wie am Desktop */
@media (max-width: 699px) {
  .js .navi { position: relative; padding: 0; text-align: right; line-height: 0; }
  .js .navi-start { color: #000; }
  .js .navi-kopf  { color: var(--grau); }

  .js .menue-knopf {
    display: inline-flex; align-items: center;
    height: 38px; margin: 0; padding: 0 16px 0 14px;
    background: none; border: 0; border-radius: 0; cursor: pointer;
    color: inherit; font: bold 15px/1 Arial, Helvetica, sans-serif;
    -webkit-tap-highlight-color: transparent;
  }
  .js .menue-knopf:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
  .striche {                      /* drei Balken */
    display: block; width: 22px; height: 2px; margin-left: 10px; background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  }

  /* aufgeklapptes Menü legt sich über die Seite, nichts verschiebt sich */
  .js .menue {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
    background: inherit; text-align: right;
    box-shadow: 0 8px 14px rgba(0, 0, 40, .4);
  }
  .js .navi-start, .js .navi-kopf { background-clip: border-box; }
  .js .navi-start .menue { background: #fff; }
  .js .navi-kopf .menue  { background: var(--lila-dunkel); }
  .js .navi.offen .menue { display: block; }
  .js .menue .grp { display: block; }
  .js .menue i { display: none; }
  .js .menue a {
    display: block; padding: 12px 18px; font-size: 16px; line-height: 20px;
    border-top: 1px solid var(--grau);
  }
  .js .navi-kopf .menue a { border-top-color: rgba(211, 214, 219, .28); }

  /* ohne JavaScript: Menüpunkte in drei mittigen Zeilen */
  html:not(.js) .navi { text-align: center; padding: 6px 6px; }
  html:not(.js) .navi .grp { display: block; }
  html:not(.js) .navi .zw { display: none; }
  html:not(.js) .navi a { padding: 9px 5px; font-size: 16px; line-height: 20px; }
  html:not(.js) .navi i { width: 15px; }
}

/* Startseite am Smartphone: Adresse kleiner */
@media (max-width: 699px) {
  .adresse { padding: 18px 16px 20px; font-size: 14px; line-height: 1.4; }
  .adresse p { margin-bottom: 1em; }
  .adresse .name { font-size: 16px; }
}

@media (max-width: 699px) and (min-height: 500px) {
  .js .navi-kopf { position: sticky; top: 0; z-index: 5; }
  .inhalt :target, .inhalt [id] { scroll-margin-top: 46px; }
}

@media (max-width: 640px) {
  .zweispaltig { grid-template-columns: minmax(0, 1fr); }
  .zweispaltig figure img { margin: 0 auto; }
  .zweispaltig figcaption { max-width: none; }
  .karte { width: 100%; }
  .karte iframe { height: 300px; }
  .inhalt h1 { font-size: 22px; margin-bottom: 20px; }
}

@media (max-width: 360px) {
  html:not(.js) .navi a { padding-left: 3px; padding-right: 3px; font-size: 15px; }
  html:not(.js) .navi i { width: 11px; }
  .inhalt { padding-left: 14px; padding-right: 14px; }
}

@media print {
  body { background: #fff; }
  .seite { max-width: none; padding: 0; }
  .navi, .nach-oben, .zurueck, .sprung { display: none; }
  .inhalt { padding: 0; }
}
