/* ==========================================================
   Praxis Dr. med. Olga Meier -- Custom Theme CSS
   PRP-010: Migration olgameier.ch
   Farbschema: Medizinisches Blau + Weiss (angelehnt an Wix-Design)
   ========================================================== */

/* --- Inter Variable Font (self-hosted, DSGVO-konform) --- */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/InterVariable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/InterVariable-Italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-primary: #2a6496;
  --color-primary-dark: #1a4a6e;
  --color-primary-light: #e8f0f7;
  --color-accent: #0097a7;
  --color-text: #333;
  --color-text-light: #666;
  --color-bg: #fff;
  --color-bg-light: #f8fafb;
  --color-border: #e0e6eb;
  --color-footer-bg: #7fa8b8;
  --font-heading: Georgia, "Times New Roman", serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1140px;
  --nav-height: 60px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  font-feature-settings: 'liga' 1, 'calt' 1;
}

a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-primary-dark); }

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  line-height: 1.3;
  margin-bottom: 0.5em;
}
h1 { font-size: 2rem; font-weight: 400; }
h2 { font-size: 1.6rem; font-weight: 400; }
h3 { font-size: 1.3rem; font-weight: 400; }
h4 { font-size: 1.1rem; font-weight: 600; }

p { margin-bottom: 1em; }
ul, ol { margin-bottom: 1em; padding-left: 1.5em; }
li { margin-bottom: 0.3em; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* --- Header --- */
.site-header { background: var(--color-bg); border-bottom: 1px solid var(--color-border); }

.header-top { padding: 1rem 0; }
.header-top .container { display: flex; align-items: center; justify-content: space-between; }
.logo-link { display: inline-flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.header-logo { width: 50px; height: auto; }
.logo-text { display: flex; flex-direction: column; }
.site-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-primary);
  font-weight: 400;
  line-height: 1.3;
}
.site-subtitle {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-primary-dark);
  font-weight: 400;
  line-height: 1.3;
}

/* --- Navigation --- */
.main-nav { background: var(--color-bg); border-top: 1px solid var(--color-border); }
.main-nav .container { display: flex; align-items: center; justify-content: center; }

.nav-list {
  list-style: none;
  display: flex;
  gap: 0;
  padding: 0;
  margin: 0;
}
.nav-item a {
  display: block;
  padding: 0.9rem 1.2rem;
  color: var(--color-primary-dark);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.nav-item a:hover,
.nav-item.active a {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.75rem; }
.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--color-primary-dark);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger { position: relative; }
.hamburger::before, .hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }
.nav-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.nav-toggle[aria-expanded="true"] .hamburger::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .hamburger::after { top: 0; transform: rotate(-45deg); }

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, rgba(232,240,247,0.85) 0%, rgba(205,227,239,0.8) 50%, rgba(232,240,247,0.85) 100%),
              url('/images/hero-banner.jpeg') center/cover no-repeat;
  min-height: 240px;
  display: flex;
  align-items: center;
}
.hero-small { min-height: 160px; }
.hero-overlay { width: 100%; padding: 3rem 0; }
.hero h1 {
  color: var(--color-primary-dark);
  font-size: 2.2rem;
  text-align: center;
}
.hero-subtitle {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-top: 0.3rem;
}

/* --- Sections --- */
.section { padding: 3rem 0; }
.section:nth-child(even) { background: var(--color-bg-light); }

.content-narrow { max-width: 780px; margin: 0 auto; }

/* --- About (Startseite) --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-image img {
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.about-text .subtitle {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}
.contact-info p { margin-bottom: 0.8rem; }
.contact-info strong { color: var(--color-primary-dark); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* --- Timeline (Werdegang) --- */
.timeline { position: relative; padding-left: 2rem; margin: 2rem 0; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}
.timeline-item { position: relative; margin-bottom: 2rem; padding-left: 1.5rem; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.55rem;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
}
.timeline-year {
  font-weight: 600;
  color: var(--color-primary-dark);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

/* --- Leistungen Cards --- */
.leistung-section { margin-bottom: 2.5rem; }
.leistung-section h2 {
  border-bottom: 2px solid var(--color-primary-light);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
}
.leistung-section h3 { color: var(--color-primary); margin-top: 1.5rem; }

/* --- Blog --- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.blog-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.blog-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.blog-card-image img { width: 100%; height: 200px; object-fit: cover; }
.blog-card-body { padding: 1.2rem; }
.blog-card-body time { font-size: 0.85rem; color: var(--color-text-light); }
.blog-card-body h2 { font-size: 1.2rem; margin-top: 0.3rem; }
.blog-card-body p { font-size: 0.95rem; color: var(--color-text-light); }

.blog-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.blog-tags { margin-top: 2rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
}
.blog-nav { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }

/* --- Leitprinzipien --- */
.prinzip { margin-bottom: 2rem; }
.prinzip h3 { color: var(--color-accent); }

/* --- Footer --- */
.site-footer {
  background: var(--color-footer-bg);
  color: #fff;
  padding: 2.5rem 0 1.5rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--color-primary-light); }
.footer-content { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2rem; margin-bottom: 1.5rem; }
.footer-social { display: flex; gap: 1rem; align-items: start; justify-content: flex-end; }
.footer-social a { opacity: 0.85; transition: opacity 0.2s; }
.footer-social a:hover { opacity: 1; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.3);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* --- Partner-Logos (Hirslanden, nebeneinander, max 200px) --- */
.content-narrow p:has(> a > img[src*="logo-klinik"]) {
  display: inline-block;
  margin-right: 1.5rem;
  vertical-align: top;
}
.content-narrow img[src*="logo-klinik"] {
  max-width: 200px;
}

/* --- Publikations-Icons (klein, inline neben Text) --- */
.content-narrow li img[src*="logo-researchgate"],
.content-narrow li img[src*="logo-google-scholar"] {
  height: 22px;
  width: auto;
  max-width: 120px;
  display: inline;
  vertical-align: middle;
  margin-right: 0.4rem;
  border-radius: 3px;
}

/* --- Content-Bilder abrunden --- */
.content-narrow img {
  border-radius: 6px;
}

/* --- Horizontale Linien --- */
.content-narrow hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

/* --- Blog Card Summary Truncation --- */
.blog-card-body p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Language Switcher --- */
.lang-switcher {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}
.lang-link {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-light);
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.2s, color 0.2s;
}
.lang-link:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}
.lang-link.active {
  background: var(--color-primary);
  color: #fff;
}

/* --- RTL Support (Arabisch) --- */
html[dir="rtl"] body { direction: rtl; text-align: right; }
html[dir="rtl"] .header-top .container { flex-direction: row-reverse; }
html[dir="rtl"] .lang-switcher { flex-direction: row-reverse; }
html[dir="rtl"] .nav-list { flex-direction: row-reverse; }
html[dir="rtl"] .content-narrow ul { padding-right: 1.5rem; padding-left: 0; }
html[dir="rtl"] .content-narrow ol { padding-right: 1.5rem; padding-left: 0; }
html[dir="rtl"] .footer-content { direction: rtl; }
html[dir="rtl"] .blog-card { text-align: right; }

/* --- 404 --- */
.page-404 { text-align: center; padding: 4rem 0; }
.page-404 h1 { font-size: 4rem; color: var(--color-primary-light); }

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--color-bg);
  }
  .nav-list.open { display: flex; }
  .main-nav .container { flex-wrap: wrap; justify-content: flex-end; }
  .nav-item a { padding: 0.7rem 1rem; border-bottom: none; }

  .header-top .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .header-brand { width: 100%; }
  .lang-switcher {
    flex-wrap: wrap;
    gap: 0.2rem;
    width: 100%;
  }
  .lang-link {
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
  }

  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-content { grid-template-columns: 1fr; gap: 1rem; }
  .footer-social { justify-content: flex-start; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; }

  .hero h1 { font-size: 1.6rem; }
  .hero-subtitle { font-size: 1rem; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }

  .blog-grid { grid-template-columns: 1fr; }
  .map-container iframe { height: 300px; }
}

/* --- Google Maps Einbettung --- */
.map-section { background: var(--color-bg-light); }
.map-container {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-top: 1rem;
}
.map-container iframe {
  display: block;
  width: 100%;
  height: 450px;
}
.map-directions {
  margin-top: 1rem;
  text-align: center;
}
.btn-directions {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: var(--color-primary);
  color: #fff !important;
  border-radius: 4px;
  font-weight: 500;
  transition: background 0.2s;
}
.btn-directions:hover {
  background: var(--color-primary-dark);
  color: #fff !important;
}

/* E-Mail Obfuscation Honeypot */
.eo { display: none !important; }
