/* ==========================================================================
   sterbeurkunde.com -- Complete Stylesheet
   A dignified German informational website about death certificates.
   Author: ArchitectUX
   Date: 2026-03-17
   ========================================================================== */


/* ==========================================================================
   1. @FONT-FACE DECLARATIONS
   ========================================================================== */

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}


/* ==========================================================================
   2. CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
  /* --- Colors --- */
  --color-primary: #2F5C82;
  --color-primary-dark: #234E6E;
  --color-secondary: #7D8B99;
  --color-accent: #8BA88D;
  --color-warm: #A89F94;
  --color-text: #3E4A54;
  --color-text-muted: #6B7580;
  --color-bg: #FFFFFF;
  --color-bg-warm: #F5F3F0;
  --color-border: #D1CCC6;
  --color-info: #6B7FA8;
  --color-info-bg: #EEF1F6;
  --color-danger: #D97D6E;
  --color-danger-bg: #FBF0EE;
  --color-accent-bg: #EFF4EF;
  --color-white: #FFFFFF;
  --color-footer-bg: #3E4A54;
  --color-footer-text: #C8CDD2;

  /* --- Typography --- */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.778rem;    /* 14px */
  --text-base: 1rem;      /* 18px (base) */
  --text-lg: 1.111rem;    /* 20px */
  --text-xl: 1.333rem;    /* 24px */
  --text-2xl: 1.778rem;   /* 32px */
  --text-3xl: 2.333rem;   /* 42px */

  /* --- Spacing (8px grid) --- */
  --space-0: 0;
  --space-1: 0.444rem;    /* 8px */
  --space-2: 0.889rem;    /* 16px */
  --space-3: 1.333rem;    /* 24px */
  --space-4: 1.778rem;    /* 32px */
  --space-5: 2.222rem;    /* 40px */
  --space-6: 2.667rem;    /* 48px */
  --space-8: 3.556rem;    /* 64px */
  --space-10: 4.444rem;   /* 80px */
  --space-12: 5.333rem;   /* 96px */

  /* --- Border Radius --- */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* --- Transitions --- */
  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* --- Shadows --- */
  --shadow-sm: 0 1px 3px rgba(62, 74, 84, 0.06);
  --shadow: 0 2px 8px rgba(62, 74, 84, 0.08);
  --shadow-md: 0 4px 16px rgba(62, 74, 84, 0.1);

  /* --- Layout --- */
  --container-max: 1140px;
  --container-narrow: 780px;
  --header-height: 72px;
  --header-height-mobile: 60px;
}


/* ==========================================================================
   3. RESET / BASE
   ========================================================================== */

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + var(--space-3));
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* Accessible screen-reader-only class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus-visible for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Selection */
::selection {
  background-color: var(--color-primary);
  color: var(--color-white);
}


/* ==========================================================================
   4. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-text);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

h2 {
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.3;
  margin-top: var(--space-8);
  margin-bottom: var(--space-2);
}

h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.4;
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

h4 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.5;
  margin-top: var(--space-4);
  margin-bottom: var(--space-1);
}

p {
  margin-bottom: var(--space-2);
}

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

ul,
ol {
  margin-bottom: var(--space-2);
  padding-left: var(--space-3);
}

ul li,
ol li {
  margin-bottom: var(--space-1);
  padding-left: var(--space-1);
}

ul li::marker {
  color: var(--color-secondary);
}

ol li::marker {
  color: var(--color-primary);
  font-weight: 600;
}

blockquote {
  margin: var(--space-3) 0;
  padding: var(--space-2) var(--space-3);
  border-left: 4px solid var(--color-warm);
  background-color: var(--color-bg-warm);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--color-text-muted);
}

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

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--transition), text-decoration-color var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration-thickness: 2px;
}

strong,
b {
  font-weight: 600;
}

small {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-4) 0;
}


/* ==========================================================================
   5. LAYOUT
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-3);
  padding-right: var(--space-3);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.section--warm {
  background-color: var(--color-bg-warm);
}

.grid {
  display: grid;
  gap: var(--space-3);
}

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

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

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.article-layout__main {
  min-width: 0;
}

.article-layout__sidebar {
  display: none;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  align-items: start;
}


/* ==========================================================================
   6. HEADER
   ========================================================================== */

.header,
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height-mobile);
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  transition: box-shadow var(--transition);
}

.header--scrolled {
  box-shadow: var(--shadow);
}

.header__inner,
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.header__logo,
.site-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.site-header__logo-icon {
  flex-shrink: 0;
  transition: transform var(--transition);
}

.site-header__logo-text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.site-header__logo-dot {
  color: var(--color-primary);
  font-weight: 400;
}

.header__logo:hover,
.site-header__logo:hover {
  text-decoration: none;
}

.site-header__logo:hover .site-header__logo-icon {
  transform: translateY(-1px);
}

.site-header__logo:hover .site-header__logo-text {
  color: var(--color-primary-dark);
}

/* Desktop Navigation */
.header__nav,
.site-nav {
  display: none;
}

.header__nav-list,
.site-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.header__nav-list li,
.site-nav__list li {
  margin: 0;
  padding: 0;
}

.header__nav-link,
.site-nav__link {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-1) 0;
  position: relative;
  transition: color var(--transition);
}

.header__nav-link:hover,
.header__nav-link--active,
.site-nav__link:hover,
.site-nav__link--active {
  color: var(--color-primary);
  text-decoration: none;
}

.header__nav-link--active::after,
.site-nav__link--active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 1px;
}

/* Hamburger Button */
.header__hamburger,
.site-header__menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
}

.header__hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition-slow), opacity var(--transition);
}

.header__hamburger[aria-expanded="true"] .header__hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__hamburger[aria-expanded="true"] .header__hamburger-line:nth-child(2) {
  opacity: 0;
}

.header__hamburger[aria-expanded="true"] .header__hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Overlay Menu */
.header__mobile-menu,
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--color-bg);
  z-index: 105;
  padding: calc(var(--header-height-mobile) + var(--space-4)) var(--space-3) var(--space-4);
  overflow-y: auto;
}

.header__mobile-menu[aria-hidden="false"],
.mobile-menu.is-open {
  display: block;
}

.header__mobile-nav-list,
.mobile-menu__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.header__mobile-nav-list li,
.mobile-menu__list li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--color-border);
}

.header__mobile-nav-link,
.mobile-menu__link {
  display: block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--text-lg);
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-2) 0;
  transition: color var(--transition);
}

.header__mobile-nav-link:hover,
.header__mobile-nav-link--active,
.mobile-menu__link:hover,
.mobile-menu__link--active {
  color: var(--color-primary);
}


/* ==========================================================================
   7. BREADCRUMB
   ========================================================================== */

.breadcrumb {
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb__list li {
  margin: 0;
  padding: 0;
}

.breadcrumb__separator {
  color: var(--color-border);
  user-select: none;
}

.breadcrumb__link {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb__link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.breadcrumb__current {
  color: var(--color-text);
  font-weight: 500;
}


/* ==========================================================================
   8. HERO SECTION
   ========================================================================== */

.hero {
  padding-top: calc(var(--space-8) + var(--space-3));
  padding-bottom: var(--space-8);
  background-color: var(--color-bg);
}

.hero--warm {
  background-color: var(--color-bg-warm);
}

.hero__inner {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.hero__title {
  margin-top: 0;
  margin-bottom: var(--space-2);
}

.hero__subtitle {
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.hero__intro {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.8;
}

.article-meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: calc(-1 * var(--space-2));
  margin-bottom: var(--space-3);
}

.article-meta a {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ==========================================================================
   9. CARDS
   ========================================================================== */

.card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card--warm {
  background-color: var(--color-bg-warm);
  border-color: transparent;
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-top: 0;
  margin-bottom: var(--space-1);
  line-height: 1.4;
}

.card__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.card__link {
  display: inline-block;
  margin-top: var(--space-2);
  font-weight: 500;
  font-size: var(--text-sm);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}


/* ==========================================================================
   10. INFO BOXES / CALLOUTS
   ========================================================================== */

.info-box {
  border-left: 4px solid var(--color-info);
  background-color: var(--color-info-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-2) var(--space-3);
  margin: var(--space-3) 0;
}

.info-box p:last-child {
  margin-bottom: 0;
}

.info-box__icon {
  display: inline-block;
  margin-right: var(--space-1);
  font-weight: 600;
  color: var(--color-info);
}

.info-box__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-1);
  margin-top: 0;
}

.info-box--success {
  border-left-color: var(--color-accent);
  background-color: var(--color-accent-bg);
}

.info-box--success .info-box__icon,
.info-box--success .info-box__title {
  color: #5C8A5E;
}

.info-box--warning {
  border-left-color: var(--color-danger);
  background-color: var(--color-danger-bg);
}

.info-box--warning .info-box__icon,
.info-box--warning .info-box__title {
  color: var(--color-danger);
}

/* LEGASY Hint */
.legasy-hint {
  background-color: var(--color-bg-warm);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-2) var(--space-3);
  margin: var(--space-3) 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.legasy-hint p:last-child {
  margin-bottom: 0;
}

.legasy-hint a {
  color: var(--color-primary);
  font-weight: 500;
}


/* ==========================================================================
   11. TABLE OF CONTENTS (TOC)
   ========================================================================== */

.toc {
  position: sticky;
  top: calc(var(--header-height) + var(--space-3));
  max-height: calc(100vh - var(--header-height) - var(--space-6));
  overflow-y: auto;
  padding: var(--space-3);
  background-color: var(--color-bg-warm);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.toc__title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--color-border);
}

.toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc__list li {
  margin: 0;
  padding: 0;
}

.toc__link {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 6px 0 6px var(--space-2);
  border-left: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  line-height: 1.5;
}

.toc__link:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.toc__link--active {
  color: var(--color-primary);
  font-weight: 600;
  border-left-color: var(--color-primary);
}

.toc__link--nested {
  padding-left: var(--space-4);
  font-size: var(--text-xs);
}

/* Scrollbar styling for TOC */
.toc::-webkit-scrollbar {
  width: 4px;
}

.toc::-webkit-scrollbar-track {
  background: transparent;
}

.toc::-webkit-scrollbar-thumb {
  background-color: var(--color-border);
  border-radius: var(--radius-full);
}


/* ==========================================================================
   12. FAQ ACCORDION
   ========================================================================== */

.faq {
  margin: var(--space-3) 0;
}

.faq details {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: var(--space-2);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.faq details:hover {
  box-shadow: var(--shadow-sm);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  transition: background-color var(--transition);
}

.faq summary:hover {
  background-color: var(--color-bg-warm);
}

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

.faq summary::marker {
  display: none;
  content: '';
}

.faq summary::after {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235B7A96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform var(--transition);
}

.faq details[open] summary::after {
  transform: rotate(180deg);
}

.faq .faq__answer {
  padding: 0 var(--space-3) var(--space-3);
  border-top: 1px solid var(--color-border);
  margin-top: 0;
  padding-top: var(--space-2);
}

.faq .faq__answer > *:first-child {
  margin-top: 0;
}

.faq .faq__answer > *:last-child {
  margin-bottom: 0;
}


/* ==========================================================================
   13. TABLES
   ========================================================================== */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: var(--space-3) 0;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
  line-height: 1.6;
}

.table th {
  background-color: var(--color-bg-warm);
  font-weight: 600;
  text-align: left;
  padding: var(--space-2) var(--space-2);
  color: var(--color-text);
  white-space: nowrap;
}

.table td {
  padding: var(--space-2) var(--space-2);
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background-color: var(--color-bg-warm);
}

.table--striped tbody tr:nth-child(even) {
  background-color: var(--color-bg-warm);
}


/* ==========================================================================
   14. STEP LIST / CHECKLIST
   ========================================================================== */

.steps {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0;
  counter-reset: step-counter;
}

.steps__item {
  counter-increment: step-counter;
  position: relative;
  padding-left: calc(var(--space-5) + var(--space-2));
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

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

.steps__item::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: var(--space-5);
  height: var(--space-5);
  background-color: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-sm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.steps__item-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-lg);
  margin-bottom: var(--space-1);
  color: var(--color-text);
}

.steps__item p {
  color: var(--color-text-muted);
}

/* Checklist */
.checklist {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0;
}

.checklist li {
  position: relative;
  padding-left: var(--space-4);
  margin-bottom: var(--space-1);
  padding: var(--space-1) 0 var(--space-1) var(--space-4);
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238BA88D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}


/* ==========================================================================
   15. BUTTONS
   ========================================================================== */

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--outline:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn--sm {
  font-size: var(--text-xs);
  padding: 8px 16px;
}


/* ==========================================================================
   16. FOOTER
   ========================================================================== */

.footer,
.site-footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding-top: var(--space-8);
  padding-bottom: 0;
}

.footer a,
.site-footer a {
  color: var(--color-footer-text);
  text-decoration: none;
  transition: color var(--transition);
}

.footer a:hover,
.site-footer a:hover {
  color: var(--color-primary);
}

.footer__grid,
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-6);
}

.footer__col-title,
.site-footer__heading {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

/* site-footer__col: basic column spacing */
.site-footer__col {
  /* inherits block layout from grid */
}

.footer__brand-name,
.site-footer__brand {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--color-white);
  margin-bottom: var(--space-1);
}

.footer__brand-tagline,
.site-footer__desc {
  font-size: var(--text-sm);
  color: var(--color-footer-text);
  margin-bottom: var(--space-2);
  line-height: 1.6;
}

.footer__brand-legasy,
.site-footer__sub {
  font-size: var(--text-xs);
  color: var(--color-secondary);
  margin-top: var(--space-2);
}

.footer__links,
.site-footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__links li,
.site-footer__list li {
  margin: 0;
  padding: 0;
  margin-bottom: 8px;
}

.footer__links a,
.site-footer__list a {
  font-size: var(--text-sm);
  line-height: 1.5;
}

.footer__bottom,
.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-3) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-secondary);
}

.footer__bottom-links,
.site-footer__bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.footer__bottom-links a,
.site-footer__bottom-links a {
  font-size: var(--text-xs);
  color: var(--color-secondary);
}

.footer__bottom-links a:hover,
.site-footer__bottom-links a:hover {
  color: var(--color-white);
}


/* --- Flat footer aliases (sterbeurkunde-beantragen.html variant) --- */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-6);
}

.footer-col {
  /* basic column layout */
}

.footer-tagline {
  font-size: var(--text-sm);
  color: var(--color-footer-text);
  margin-bottom: var(--space-2);
  line-height: 1.6;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin: 0;
  padding: 0;
  margin-bottom: 8px;
}

.footer-links a {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-footer-text);
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-3) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-secondary);
}

/* ==========================================================================
   17. FIGURES & IMAGES
   ========================================================================== */

.article-figure {
  margin: var(--space-4) 0;
  padding: 0;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.article-figure figcaption {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  font-style: italic;
}


/* ==========================================================================
   18. UTILITY CLASSES
   ========================================================================== */

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

.text-muted { color: var(--color-text-muted); }
.text-sm    { font-size: var(--text-sm); }
.text-lg    { font-size: var(--text-lg); }

/* Margin-top */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }

/* Margin-bottom */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }

/* Padding-top */
.pt-0 { padding-top: 0; }
.pt-1 { padding-top: var(--space-1); }
.pt-2 { padding-top: var(--space-2); }
.pt-3 { padding-top: var(--space-3); }
.pt-4 { padding-top: var(--space-4); }

/* Padding-bottom */
.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: var(--space-1); }
.pb-2 { padding-bottom: var(--space-2); }
.pb-3 { padding-bottom: var(--space-3); }
.pb-4 { padding-bottom: var(--space-4); }


/* ==========================================================================
   18. RESPONSIVE -- TABLET (768px+)
   ========================================================================== */

@media (min-width: 768px) {

  /* Layout */
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-column {
    grid-template-columns: 1fr 1fr;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  /* Footer */
  .footer__grid,
  .site-footer__grid,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__bottom,
  .site-footer__bottom,
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  /* Visibility */
  .hide-desktop {
    /* not yet -- tablet is not desktop */
  }
}


/* ==========================================================================
   18b. RESPONSIVE -- DESKTOP (1024px+)
   ========================================================================== */

@media (min-width: 1024px) {

  /* Header */
  .header {
    height: var(--header-height);
  }

  .header__nav {
    display: block;
  }

  .header__hamburger {
    display: none;
  }

  .header__mobile-menu {
    display: none !important;
  }

  /* Typography */
  html {
    scroll-padding-top: calc(var(--header-height) + var(--space-3));
  }

  /* Layout */
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .article-layout {
    grid-template-columns: 1fr 260px;
  }

  .article-layout__sidebar {
    display: block;
  }

  /* Hero */
  .hero {
    padding-top: calc(var(--space-10) + var(--space-3));
    padding-bottom: var(--space-10);
  }

  /* Footer */
  .footer__grid,
  .site-footer__grid,
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  /* Visibility */
  .hide-mobile {
    /* visible on desktop -- default display */
  }

  .hide-desktop {
    display: none;
  }
}


/* ==========================================================================
   18c. RESPONSIVE -- MOBILE OVERRIDES (below 768px)
   ========================================================================== */

@media (max-width: 767px) {

  /* Typography scaling */
  h1 {
    font-size: 1.667rem; /* ~30px */
  }

  h2 {
    font-size: 1.333rem; /* ~24px */
  }

  h3 {
    font-size: 1.111rem; /* ~20px */
  }

  /* Reduce section padding */
  .section {
    padding-top: var(--space-5);
    padding-bottom: var(--space-5);
  }

  /* Table font size */
  .table {
    font-size: var(--text-sm);
  }

  .table th,
  .table td {
    padding: var(--space-1) var(--space-2);
  }

  /* Steps */
  .steps__item {
    padding-left: calc(var(--space-4) + var(--space-2));
  }

  .steps__item::before {
    width: var(--space-4);
    height: var(--space-4);
    font-size: var(--text-xs);
  }

  /* Visibility */
  .hide-mobile {
    display: none;
  }
}


/* ==========================================================================
   19. PRINT STYLES
   ========================================================================== */

@media print {

  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.6;
  }

  .header,
  .header__mobile-menu,
  .footer,
  .breadcrumb,
  .toc,
  .btn,
  .legasy-hint {
    display: none !important;
  }

  h1, h2, h3, h4 {
    page-break-after: avoid;
    break-after: avoid;
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  table {
    border-collapse: collapse !important;
  }

  table th,
  table td {
    border: 1px solid #ccc !important;
    padding: 8px !important;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555 !important;
  }

  a[href^="#"]::after,
  a[href^="javascript"]::after {
    content: "";
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-layout__sidebar {
    display: none;
  }
}


/* ==========================================================================
   STANDESAMT-VERZEICHNIS
   ========================================================================== */

.standesamt-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.standesamt-card h2 {
  margin-bottom: var(--space-3);
  color: var(--color-primary);
}

.standesamt-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.standesamt-card__info p {
  margin-bottom: var(--space-1);
}

.standesamt-card__cta {
  background: var(--color-bg-warm);
  border-radius: var(--radius);
  padding: var(--space-3);
}

.standesamt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-2);
  margin: var(--space-3) 0;
  list-style: none;
  padding: 0;
}

.standesamt-grid a {
  display: block;
  padding: var(--space-2) var(--space-2);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: border-color var(--transition), color var(--transition);
}

.standesamt-grid a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.bundesland-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.bundesland-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
  display: block;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.bundesland-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(91, 122, 150, 0.12);
  text-decoration: none;
}

.bundesland-card__name {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}

.bundesland-card__count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

@media (max-width: 767px) {
  .standesamt-card__grid {
    grid-template-columns: 1fr;
  }
}

/* Summary Box — AI Citation Optimization */
.summary-box {
  background: var(--color-info-bg);
  border-left: 4px solid var(--color-primary);
  border-radius: 8px;
  padding: var(--space-4) var(--space-5);
  margin: var(--space-5) 0;
}

.summary-box h2 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-box p {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  margin: 0;
}
