/* ==========================================================================
   Rechtsanwalt Franz Bruckner – Modern, Timeless & Responsive Stylesheet
   Farbthema: Klassisches Kanzlei-Blau (#0a3d91) mit frischem, modernem Look
   ========================================================================== */

:root {
  /* Primäre Kanzleifarben */
  --primary: #0a3d91;
  --primary-dark: #072a66;
  --primary-light: #1554ba;
  --primary-soft: #eef4ff;
  --primary-border: #c7dbfc;
  
  /* Akzent & Text */
  --accent: #1d4ed8;
  --accent-light: #cfe0ff;
  --text-main: #1e293b;
  --text-muted: #475569;
  --text-light: #64748b;
  --text-inverse: #ffffff;
  
  /* Hintergründe & Flächen */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-light: #edf2f7;
  
  /* Abrundungen & Schatten */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(10, 61, 145, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 14px 30px -4px rgba(10, 61, 145, 0.12), 0 6px 10px -4px rgba(0, 0, 0, 0.06);

  /* Layout */
  --container-max: 980px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========== Grundlayout & Reset ========== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

/* Typografie */
h1, h2, h3, h4 {
  color: var(--primary);
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
  text-align: left;
  hyphens: none;
  -webkit-hyphens: none;
}

h2 {
  font-size: 1.65rem;
  margin-bottom: 1.25rem;
  position: relative;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.85rem;
  color: var(--primary-dark);
}

p, li {
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.7;
}

p {
  margin: 0 0 1.25rem 0;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ========== Header & Navigation ========== */
header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--text-inverse);
  padding: 2rem 1rem 1.5rem 1rem;
  box-shadow: 0 4px 20px rgba(10, 61, 145, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  color: #ffffff;
  font-variant: small-caps;
  letter-spacing: 0.8px;
  text-align: center;
}

header .subtitle {
  margin: 0.35rem 0 1.25rem 0;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--accent-light);
  letter-spacing: 0.4px;
  text-align: center;
  hyphens: none;
  -webkit-hyphens: none;
}

header nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

header nav a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
  hyphens: none;
  -webkit-hyphens: none;
}

header nav a:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

header nav a.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.22);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  text-decoration: none;
}

/* ========== Haupt-Layout & Container ========== */
main {
  flex: 1;
  max-width: var(--container-max);
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.25rem;
  box-sizing: border-box;
}

.content {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 2.25rem;
  margin-bottom: 2rem;
}

/* Intro Highlight Box */
.intro-lead {
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--text-main);
  background-color: var(--primary-soft);
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 2rem;
}

/* ========== Hero-Bereich (Startseite) ========== */
.hero {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--primary);
}

.hero-content {
  flex: 1 1 55%;
}

.hero-content h2 {
  font-size: 2.1rem;
  line-height: 1.25;
  color: var(--primary);
  margin-top: 0;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-content p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.hero-image {
  flex: 0 0 280px;
  text-align: center;
}

.hero-image img {
  width: 100%;
  max-width: 280px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 4px solid #ffffff;
  display: block;
}

/* ========== Buttons & CTA ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  text-decoration: none !important;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  line-height: 1.2;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(10, 61, 145, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(10, 61, 145, 0.35);
  color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary) !important;
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary-soft);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ========== Services Grid (Leistungen) ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 0 2.5rem 0;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.service-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.service-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.service-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background-color: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-card strong {
  font-size: 1.1rem;
  color: var(--primary-dark);
  line-height: 1.3;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.65;
  margin: 0;
}

/* ========== Features / Was mich auszeichnet ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 1rem 0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-weight: 500;
  color: var(--primary-dark);
  transition: var(--transition);
}

.feature-item:hover {
  background-color: #e5efff;
}

.feature-icon {
  color: var(--primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* ========== Timeline (Über mich) ========== */
.timeline {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 6.5rem;
  width: 2px;
  background: var(--border-color);
}

.timeline li {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.85rem 0;
}

.timeline .year {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 7.2rem;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  background-color: var(--primary-soft);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--primary-border);
  text-align: center;
}

.timeline-desc {
  flex: 1;
  color: var(--text-main);
}

/* Listen allgemein */
.content ul:not(.timeline) {
  padding-left: 1.25rem;
  margin: 1rem 0 1.5rem 0;
}

.content ul:not(.timeline) li {
  margin-bottom: 0.6rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.content ul:not(.timeline) li strong {
  color: var(--text-main);
}

/* ========== Kontakt Cards (Kontakt-Seite) ========== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.75rem 0;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.contact-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.contact-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 1.1rem;
}

.contact-card p {
  color: var(--text-muted);
  margin: 0;
}

.contact-card-highlight {
  background: linear-gradient(135deg, var(--primary-soft) 0%, #ffffff 100%);
  border: 1.5px solid var(--primary-border);
}

/* ========== Legal & Text Seiten (Impressum, Datenschutz) ========== */
.legal-section {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.legal-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.legal-section h3 {
  margin-top: 0;
  color: var(--primary);
}

/* Utility */
.center {
  text-align: center !important;
}

/* ========== Footer ========== */
footer {
  background-color: var(--primary-dark);
  color: var(--accent-light);
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.92rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
  margin: 0;
  text-align: center;
  color: var(--accent-light);
}

footer a {
  color: #ffffff;
}

footer a:hover {
  color: var(--accent-light);
}

/* ========== Responsive Breakpoints ========== */
@media (max-width: 860px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
  }
  
  .hero-content {
    flex: 1 1 100%;
  }

  .hero-content h2 {
    font-size: 1.75rem;
  }

  .hero-content p {
    text-align: justify;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-image {
    flex: 0 0 auto;
  }

  .hero-image img {
    max-width: 220px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    display: none;
  }

  .timeline li {
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-light);
  }

  .timeline .year {
    width: auto;
    align-self: flex-start;
  }
}

@media (max-width: 600px) {
  header {
    padding: 1.5rem 0.75rem 1rem 0.75rem;
  }

  header h1 {
    font-size: 1.45rem;
  }

  header .subtitle {
    font-size: 0.92rem;
  }

  header nav {
    gap: 0.25rem;
  }

  header nav a {
    font-size: 0.88rem;
    padding: 0.35rem 0.65rem;
  }

  .content {
    padding: 1.5rem 1.1rem;
    border-radius: var(--radius-md);
  }

  .hero {
    padding: 1.5rem 1.1rem;
    border-radius: var(--radius-md);
  }

  .hero-content h2 {
    font-size: 1.5rem;
  }
}

/* ========== Print Styles ========== */
@media print {
  body {
    background: #ffffff;
    color: #000000;
  }
  header, footer, .btn {
    display: none;
  }
  .content, .hero {
    border: none;
    box-shadow: none;
    padding: 0;
  }
}