/* ==========================================================================
   Dr. med. Manfred Krüger — Custom Styles
   Design Reference: specs.md
   Framework: Foundation 6.8.1
   ========================================================================== */

/* === CSS Custom Properties === */
:root {
  --color-primary-dark: #2C4A3E;
  --color-primary: #3D7A5F;
  --color-primary-light: #E8F0EC;
  --color-accent-warm: #C4956A;
  --color-accent-gold: #D4A76A;
  --color-background: #FAFAF7;
  --color-surface: #FFFFFF;
  --color-text-dark: #2D3436;
  --color-text-body: #4A5568;
  --color-text-muted: #8B9DAF;
  --color-border: #E2E8E5;
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

/* === Base Reset & Typography === */
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text-body);
  background: var(--color-background);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-dark);
  line-height: 1.3;
}
h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 700; margin-top: 2rem; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }

a { color: var(--color-primary); transition: color 0.3s ease; }
a:hover { color: var(--color-accent-warm); }

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

/* === Header === */
.site-header {
  z-index: 100;
}
.site-header .sticky {
  background: var(--color-primary-dark);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.site-header .top-bar {
  background: transparent;
  padding: 0.5rem 1rem;
}
.site-header .title-bar {
  background: var(--color-primary-dark);
}
.title-bar-title {
  font-family: var(--font-heading);
  color: #fff;
}
.site-logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff !important;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.site-logo span {
  color: var(--color-accent-warm);
}
.site-logo:hover {
  color: #fff !important;
}
.site-header .menu > li > a {
  color: rgba(255,255,255,0.9);
  font-weight: 400;
  font-size: 0.95rem;
  padding: 0.7rem 1rem;
  position: relative;
  transition: color 0.3s;
}
.site-header .menu > li > .legacy-nav-context {
  display: none;
}
.site-header .menu > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--color-accent-warm);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.site-header .menu > li > a:hover {
  color: #fff;
}
.site-header .menu > li > a:hover::after {
  transform: scaleX(1);
}
/* Foundation dropdown submenu styling */
.site-header .submenu {
  background: var(--color-primary-dark);
  border: 1px solid rgba(255,255,255,0.1);
}
.site-header .submenu li a {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 1rem;
}
.site-header .submenu li a:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.menu-icon::after {
  background: #fff;
  box-shadow: 0 7px 0 #fff, 0 14px 0 #fff;
}

/* === Hero Section === */
.hero-section {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, rgba(44,74,62,0.85), rgba(61,122,95,0.75)),
              url('/assets/images/hero_bg.png') center/cover no-repeat;
}
.hero-overlay {
  width: 100%;
  padding: 4rem 1.5rem;
}
.hero-content h1 {
  color: #fff;
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.hero-subtitle {
  color: rgba(255,255,255,0.9);
  font-size: 1.2rem;
  font-weight: 300;
  margin-bottom: 2rem;
}

/* === Buttons === */
.btn-cta {
  background: var(--color-accent-warm) !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: 4px;
  padding: 0.85rem 2.25rem;
  transition: background 0.3s ease, transform 0.3s ease;
  border: none;
}
.btn-cta:hover {
  background: var(--color-accent-gold) !important;
  color: #fff !important;
  transform: translateY(-2px);
}
.btn-outline {
  color: #fff !important;
  border: 2px solid rgba(255,255,255,0.6) !important;
  background: transparent !important;
  font-weight: 600;
  border-radius: 4px;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
}
.btn-outline:hover {
  border-color: #fff !important;
  background: rgba(255,255,255,0.1) !important;
  color: #fff !important;
}

/* === Welcome Section === */
.welcome-section {
  padding: 5rem 0;
  background: var(--color-background);
}
.welcome-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.lead-text {
  font-size: 1.125rem;
  line-height: 1.8;
  border-left: 3px solid var(--color-primary);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  text-align: left;
}
.body-text {
  text-align: left;
  margin-top: 1rem;
}

/* === Content Section === */
.content-section {
  padding: 3rem 0 5rem;
}
.page-title {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--color-primary-light);
}
.content-image {
  margin: 1.5rem 0;
}
.content-image img {
  border-radius: 6px;
}
.content-image figcaption {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  text-align: center;
}
.content-list {
  margin: 1rem 0 1.5rem 1.5rem;
}
.content-list li {
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

/* === CTA Banner === */
.cta-banner {
  background: var(--color-primary-dark);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 10px,
    rgba(255,255,255,0.03) 10px, rgba(255,255,255,0.03) 20px
  );
}
.cta-banner h2 {
  color: #fff;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}
.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

/* === Footer === */
.site-footer {
  background: var(--color-primary-dark);
  padding: 3.5rem 0 1.5rem;
  color: rgba(255,255,255,0.75);
}
.footer-col h4 {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.footer-col p,
.footer-col li {
  font-size: 0.9rem;
  line-height: 1.8;
}
.footer-col a {
  color: rgba(255,255,255,0.7);
}
.footer-col a:hover {
  color: var(--color-accent-warm);
}
.footer-address {
  margin-top: 0.75rem;
}
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* === Breadcrumbs === */
.breadcrumbs-nav {
  background: var(--color-primary-light);
  padding: 0.5rem 0;
}
.breadcrumbs-nav .breadcrumbs {
  margin: 0;
  font-size: 0.85rem;
}
.breadcrumbs-nav .breadcrumbs a {
  color: var(--color-primary);
}
.breadcrumbs-nav .breadcrumbs .current span {
  color: var(--color-text-muted);
}

/* === Sidebar === */
.sidebar {
  padding: 1.5rem;
  background: var(--color-primary-light);
  border-radius: 6px;
  margin-bottom: 2rem;
}
.sidebar .menu a {
  color: var(--color-text-body);
  padding: 0.4rem 0;
  font-size: 0.95rem;
}
.sidebar .menu a:hover {
  color: var(--color-primary);
}

/* === Article Template === */
.article-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}
.article-summary {
  border-left: 3px solid var(--color-primary);
  padding-left: 1.25rem;
  margin-bottom: 2rem;
}
.article-summary .lead {
  font-size: 1.125rem;
  color: var(--color-text-body);
}
.article-main-image {
  max-width: 33%;
  margin: 0 0 1.5rem 1.5rem;
}
.article-main-image img {
  border-radius: 6px;
}

/* === Table of Contents === */
.toc-sidebar {
  padding: 1rem;
  background: var(--color-primary-light);
  border-radius: 6px;
}
.toc-sidebar h4,
.toc-top h4,
.toc-mobile h4 {
  font-size: 1rem;
  color: var(--color-primary-dark);
  margin-bottom: 0.75rem;
}
.toc-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc-menu li {
  margin-bottom: 0.3rem;
}
.toc-menu li a {
  font-size: 0.875rem;
  color: var(--color-text-body);
}
.toc-menu li a:hover {
  color: var(--color-primary);
}
.toc-level-3 { padding-left: 1rem; }
.toc-level-4 { padding-left: 2rem; }
.toc-top {
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--color-primary-light);
  border-radius: 6px;
}
.toc-mobile {
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--color-primary-light);
  border-radius: 6px;
}

/* === Category Cards === */
.category-description {
  font-size: 1.1rem;
  color: var(--color-text-body);
  margin-bottom: 2rem;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-top: 3px solid transparent;
  height: 100%;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  border-top-color: var(--color-accent-warm);
}
.card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.card-section h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.card-section h3 a {
  color: var(--color-text-dark);
}
.card-section h3 a:hover {
  color: var(--color-primary);
}
.card-section p {
  font-size: 0.95rem;
  color: var(--color-text-body);
}
/* Horizontal card */
.card-horizontal {
  overflow: hidden;
}
.card-img-horizontal {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Minimal card */
.card-minimal {
  border: none;
  border-left: 3px solid var(--color-accent-warm);
  border-radius: 0;
  padding-left: 1rem;
  background: transparent;
}
.card-minimal:hover {
  transform: none;
  box-shadow: none;
  border-left-color: var(--color-primary);
}

/* === Gallery === */
.gallery-grid .cell img {
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* === Blockquote === */
blockquote {
  border-left: 3px solid var(--color-accent-warm);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--color-primary-light);
  font-style: italic;
  color: var(--color-text-dark);
}

/* === Code Blocks === */
pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

/* === Separator === */
.section-separator {
  border: none;
  border-top: 2px solid var(--color-border);
  margin: 2rem 0;
}

/* === Tables === */
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  margin: 1.5rem 0;
}
table thead th {
  background: var(--color-primary-dark);
  color: #fff;
  padding: 0.75rem 1rem;
  font-weight: 600;
}
table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

/* === Responsive Adjustments === */
@media screen and (max-width: 639px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .hero-content h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .article-main-image {
    float: none;
    max-width: 100%;
    margin: 0 0 1.5rem 0;
  }
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}
