/* ==========================================================================
   Kanzlei Scherer & Altmann – anwalt-scherer.de
   Statische Website (ohne CMS) · Design nach Vorlage der alten Website
   (YOOtheme Lava, Style "salmon"): Open Sans, Box-Layout, grauer Hintergrund
   ========================================================================== */

/* --- Open Sans, selbst gehostet (DSGVO-konform, kein Google-Fonts-Abruf) --- */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/open-sans-latin-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/open-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/open-sans-latin-600-normal.woff2") format("woff2");
}

:root {
  --accent: #ff6666;          /* Rot des Logos/Brands            */
  --accent-dark: #e05555;
  --dark: #454243;            /* Navigationsleiste               */
  --heading: #3f4044;         /* Überschriften (alte Website)    */
  --text: #8b8e94;            /* Fliesstext (alte Website)       */
  --content-bg: #f8fbfc;      /* Inhaltsfläche (alte Website)    */
  --page-bg: #d2d2d2;         /* Papier-Grau des Hintergrunds    */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* --- Grauer Seitenhintergrund mit hellem Verlauf (wie paper.jpg/gradient.svg) --- */

html {
  background-color: var(--page-bg);
  background-image: radial-gradient(ellipse 90% 70% at 50% 0%,
                    rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0) 70%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100%;
}

/* --- Zentrierte Box wie .tm-page der alten Website --- */

body {
  width: 75%;
  max-width: 1200px;
  margin: 60px auto 140px;
  background: var(--content-bg);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.1);
  font-family: "Open Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

@media (max-width: 960px) {
  body { width: 94%; margin: 24px auto 60px; }
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Header / Navigation (dunkle Leiste, rotes Logo-Feld – wie alte Website)
   -------------------------------------------------------------------------- */

header {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  min-height: 96px;
  padding-right: 24px;
}

.brand {
  display: flex;
  align-items: center;
  background: var(--accent);
  padding: 0 40px;
}

.brand img { height: 46px; width: auto; }

nav { display: flex; align-items: center; }

nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
}

nav a {
  display: block;
  padding: 12px 20px;
  color: #989495;
  font-size: 16px;
  text-decoration: none;
  transition: color 0.2s;
}

nav a:hover { color: #ffffff; text-decoration: none; }
nav a.active { color: #ffffff; }

/* Mobile-Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  align-self: center;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: #ffffff;
  margin: 5px 0;
  border-radius: 2px;
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }

  .nav-inner { min-height: 72px; }
  .brand { padding: 0 20px; }
  .brand img { height: 36px; }

  nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark);
    display: none;
  }

  nav.open { display: block; }

  nav ul { flex-direction: column; gap: 0; width: 100%; }

  nav a { padding: 14px 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  nav a.active { border-left: 4px solid var(--accent); }
}

/* --------------------------------------------------------------------------
   Hero / Slideshow (Startseite)
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  height: 380px;
  background: var(--dark);
  overflow: hidden;
}

.hero .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: slidefade 18s infinite;
}

.hero .slide:nth-child(1) { animation-delay: 0s; }
.hero .slide:nth-child(2) { animation-delay: 6s; }
.hero .slide:nth-child(3) { animation-delay: 12s; }

@keyframes slidefade {
  0%      { opacity: 0; }
  5.5%    { opacity: 1; }
  33.3%   { opacity: 1; }
  38.8%   { opacity: 0; }
  100%    { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero .slide { animation: none; }
  .hero .slide:nth-child(1) { opacity: 1; }
}

@media (max-width: 720px) {
  .hero { height: 200px; }
}

/* --------------------------------------------------------------------------
   Inhalt
   -------------------------------------------------------------------------- */

main {
  padding: 48px 6% 64px;
}

h1 {
  font-size: 30px;
  font-weight: 300;
  color: var(--heading);
  margin-bottom: 0.8em;
  line-height: 1.3;
}

h2 {
  font-size: 24px;
  font-weight: 400;
  color: var(--heading);
  margin: 1.6em 0 0.5em;
}

p { margin-bottom: 1em; }

.lead { font-size: 17px; }

strong { font-weight: 600; color: #6b6e74; }

/* --------------------------------------------------------------------------
   Team (runde Farbfotos wie auf der alten Website)
   -------------------------------------------------------------------------- */

.team-member {
  display: flex;
  gap: 44px;
  align-items: center;
  padding: 36px 0;
  border-bottom: 1px solid #e2e6e8;
}

.team-member:last-child { border-bottom: none; }

.team-member img {
  flex: 0 0 240px;
  width: 240px;
  height: 240px;
  border-radius: 50%;      /* einheitlich rund – auch bei rechteckigen Quellen */
  object-fit: cover;
  object-position: top;
  background: #ffffff;
}

.team-member h2 { margin-top: 0; }

.team-member .role {
  color: var(--accent-dark);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.8em;
}

@media (max-width: 720px) {
  .team-member { flex-direction: column; gap: 20px; align-items: flex-start; }
  .team-member img { width: 180px; height: 180px; flex-basis: auto; }
}

/* --------------------------------------------------------------------------
   Kontakt
   -------------------------------------------------------------------------- */

.kontakt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 12px;
}

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

.kontakt-card {
  background: #ffffff;
  border-left: 4px solid var(--accent);
  padding: 28px 32px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.kontakt-card h2 { margin-top: 0; }

.kontakt-card table { border-collapse: collapse; }
.kontakt-card td { padding: 3px 16px 3px 0; vertical-align: top; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  padding: 12px 26px;
  border-radius: 3px;
  font-weight: 600;
  margin-top: 12px;
  transition: background 0.2s;
}

.btn:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }

/* --------------------------------------------------------------------------
   Rechtstexte (Impressum / Datenschutz)
   -------------------------------------------------------------------------- */

.legal h2 { font-size: 20px; }
.legal h3 { font-size: 16px; font-weight: 600; margin: 1.4em 0 0.4em; color: var(--heading); }
.legal address { font-style: normal; margin-bottom: 1em; }
.legal ul { margin: 0 0 1em 1.4em; }
.legal li { margin-bottom: 0.35em; }

/* --------------------------------------------------------------------------
   Footer (hell, zentriert – wie alte Website)
   -------------------------------------------------------------------------- */

footer {
  border-top: 1px solid #e2e6e8;
  font-size: 13px;
  color: var(--text);
}

.footer-inner {
  padding: 24px 6%;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

footer a { color: #6b6e74; margin-left: 18px; }
footer a:hover { color: var(--accent-dark); }
