/* ===================================================================
   Praxis Dr. med. Dirk Wiehn — Mobile-First Stylesheet
   Breakpoints: 480px | 768px | 1024px
   =================================================================== */

/* --- 1. Design Tokens --- */
:root {
  --red:        #B90707;
  --red-dark:   #960606;
  --bg:         #F0F0F0;
  --bg-white:   #FFFFFF;
  --text:       #2E2E2E;
  --text-light: #555555;
  --footer-bg:  #9E9E9E;
  --footer-text:#FFFFFF;
  --border:     #D8D8D8;

  --font-main: "Open Sans", Helvetica, Arial, sans-serif;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;

  --radius:    3px;
  --shadow:    0 2px 8px rgba(0,0,0,0.10);

  --emergency-h: 36px;
  --nav-h:       60px;
  --header-total: calc(var(--emergency-h) + var(--nav-h));
}

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

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

body {
  font-family: var(--font-main);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* --- 3. Emergency Bar --- */
.emergency-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--emergency-h);
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.emergency-bar__text {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.emergency-bar__link {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- 4. Navigation --- */
.site-nav {
  position: fixed;
  top: var(--emergency-h);
  left: 0;
  right: 0;
  z-index: 999;
  height: var(--nav-h);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-logo__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.nav-logo__sub {
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 400;
}

.nav-logo__name {
  color: var(--red);
}

/* Hamburger Button */
.nav-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-radius: var(--radius);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-bottom: 2px solid var(--red);
  padding: var(--space-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.nav-menu.is-open {
  display: block;
}

.nav-menu__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-menu__link {
  display: block;
  padding: 0.75rem var(--space-sm);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-menu__link:hover,
.nav-menu__link:focus {
  background: var(--bg);
  color: var(--red);
  outline: none;
}

.nav-menu__link--cta {
  background: var(--red);
  color: #fff;
  text-align: center;
  margin-top: var(--space-xs);
}

.nav-menu__link--cta:hover,
.nav-menu__link--cta:focus {
  background: var(--red-dark);
  color: #fff;
}

/* Desktop Nav */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    display: block;
    position: static;
    border: none;
    padding: 0;
    box-shadow: none;
    background: transparent;
  }

  .nav-menu__list {
    flex-direction: row;
    align-items: center;
    gap: var(--space-xs);
  }

  .nav-menu__link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  .nav-menu__link--cta {
    margin-top: 0;
    border-radius: var(--radius);
    padding: 0.5rem 1.25rem;
  }
}

/* --- 5. Page Offset for Fixed Header --- */
.page-body {
  padding-top: var(--header-total);
}

/* --- 6. Hero --- */
.hero {
  position: relative;
  min-height: 280px;
  background-image: url("img/praxis.png");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-lg) var(--space-sm);
  color: #fff;
}

.hero__badge {
  display: inline-block;
  background: rgba(185,7,7,0.9);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 2px;
  margin-bottom: var(--space-sm);
}

.hero__title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero__sub {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: var(--space-md);
  font-weight: 400;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--red);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius);
  min-height: 52px;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 4px 16px rgba(185,7,7,0.35);
}

.hero__cta:hover,
.hero__cta:focus {
  background: var(--red-dark);
  transform: translateY(-1px);
  outline: none;
  box-shadow: 0 6px 20px rgba(185,7,7,0.4);
}

@media (min-width: 768px) {
  .hero {
    min-height: 420px;
  }

  .hero__title {
    font-size: 2.4rem;
  }

  .hero__sub {
    font-size: 1.1rem;
  }
}

/* --- 7. Section Base --- */
.section {
  padding: var(--space-lg) var(--space-sm);
  scroll-margin-top: var(--header-total);
}

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

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

.section__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 0.5rem;
}

.section__heading {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: var(--space-md);
  color: var(--text);
}

.section__text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-light);
  max-width: 680px;
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-xl) var(--space-md);
  }

  .section__heading {
    font-size: 1.9rem;
  }
}

/* --- 8. Willkommen --- */
.welcome__body {
  max-width: 680px;
}

/* --- 9. Sprechzeiten --- */
.hours-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.hour-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: var(--space-sm) var(--space-md);
  border-left: 3px solid var(--border);
  box-shadow: var(--shadow);
}

.hour-card--highlight {
  border-left-color: var(--red);
}

.hour-card__day {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.hour-card--highlight .hour-card__day {
  color: var(--red);
}

.hour-card__times {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

.hours-note {
  margin-top: var(--space-md);
  font-size: 0.9rem;
  color: var(--text-light);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.hours-note::before {
  content: "ℹ";
  color: var(--red);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05em;
}

.emergency-note {
  margin-top: var(--space-sm);
  font-size: 0.88rem;
  color: var(--text-light);
  padding: var(--space-sm);
  background: var(--bg-white);
  border-radius: var(--radius);
  border-left: 3px solid var(--red);
}

.emergency-note strong {
  color: var(--red);
}

@media (min-width: 480px) {
  .hours-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .hours-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* --- 10. Über die Praxis --- */
.ueber-grid {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

.ueber-grid__text .section__text + .section__text {
  margin-top: var(--space-sm);
}

.ueber-grid__image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quali-list {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quali-list__item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-light);
}

.quali-list__item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  margin-top: 0.55em;
}

@media (min-width: 768px) {
  .ueber-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- 11. Kontakt --- */
.contact-cards {
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.contact-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: var(--space-md);
  border-top: 3px solid var(--red);
}

.contact-card__icon {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  display: block;
}

.contact-card__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.6rem;
}

.contact-card__content {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
}

.contact-card__content a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cta-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--red);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  min-height: 56px;
  margin-top: var(--space-md);
  width: 100%;
  max-width: 360px;
  transition: background 0.15s ease;
  box-shadow: 0 4px 16px rgba(185,7,7,0.3);
}

.cta-call:hover,
.cta-call:focus {
  background: var(--red-dark);
  outline: none;
}

.map-container {
  margin-top: var(--space-md);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-container iframe {
  width: 100%;
  height: 260px;
  border: none;
  display: block;
}

@media (min-width: 640px) {
  .contact-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .map-container iframe {
    height: 360px;
  }
}

/* --- 12. Footer --- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: var(--space-lg) var(--space-sm);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: var(--space-md);
}

.footer-col__heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  opacity: 0.7;
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col__list a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.footer-col__list a:hover {
  opacity: 1;
}

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.2);
  margin: var(--space-sm) 0;
}

.footer-copy {
  font-size: 0.78rem;
  opacity: 0.6;
  max-width: 1100px;
  margin: var(--space-sm) auto 0;
  padding: 0 var(--space-sm);
}

@media (min-width: 640px) {
  .footer-inner {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- 13. Floating CTA (mobile only) --- */
.floating-cta {
  position: fixed;
  bottom: 20px;
  right: 16px;
  z-index: 900;
  background: var(--red);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.8rem 1.2rem;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(185,7,7,0.45);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: background 0.15s ease, opacity 0.3s ease, transform 0.3s ease;
}

.floating-cta:hover,
.floating-cta:focus {
  background: var(--red-dark);
  outline: none;
}

.floating-cta.is-hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

@media (min-width: 768px) {
  .floating-cta {
    display: none;
  }
}

/* --- 14. Focus Styles --- */
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

/* --- 15. Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* --- 16. Utility --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --- Sub-pages (Impressum / Datenschutz) --- */
.subpage-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-sm) var(--space-xl);
}

.subpage-content h1 {
  font-size: 1.7rem;
  margin-bottom: var(--space-md);
  color: var(--text);
}

.subpage-content h2 {
  font-size: 1.15rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--text);
}

.subpage-content p,
.subpage-content li {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-light);
}

.subpage-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.subpage-content a {
  color: var(--red);
  text-decoration: underline;
}

.legal-notice {
  background: #fff8f8;
  border-left: 3px solid var(--red);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  margin: var(--space-md) 0;
  font-size: 0.88rem;
  color: var(--text-light);
}
