/* ===================================================================
   Internistische Praxis Dr. Nader / Dr. Riedel
   Modernes, responsives Stylesheet (mobile-first)
   =================================================================== */

:root {
  --primary: #7a8f00;
  --primary-dark: #5f7000;
  --primary-light: #eef3d8;
  --accent: #c2de00;
  --text: #2d3436;
  --text-muted: #5f6a6d;
  --bg: #f6f7f2;
  --card: #ffffff;
  --border: #e2e6d8;
  --danger: #c0392b;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  --max-width: 1140px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

a {
  color: var(--primary-dark);
}

a:hover {
  color: var(--primary);
}

/* -------------------------------------------------------------------
   Header & Navigation
   ------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card);
  border-bottom: 3px solid var(--accent);
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.brand {
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary-dark);
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.nav-toggle:focus-visible {
  outline: 3px solid var(--accent);
}

.nav-toggle .burger {
  display: inline-block;
  width: 18px;
}

.nav-toggle .burger,
.nav-toggle .burger::before,
.nav-toggle .burger::after {
  content: "";
  height: 2px;
  background: #fff;
  display: block;
  border-radius: 2px;
}

.nav-toggle .burger::before {
  margin-top: -6px;
}

.nav-toggle .burger::after {
  margin-top: 10px;
  margin-bottom: -6px;
}

.site-nav {
  flex-basis: 100%;
  display: none;
}

.site-nav.open {
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 0.5rem 0 0.75rem;
  padding: 0;
}

.site-nav a,
.site-nav .nav-label {
  display: block;
  padding: 0.65rem 0.75rem;
  text-decoration: none;
  color: var(--text);
  border-radius: 8px;
  font-weight: 500;
}

.site-nav .nav-label {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-bottom: 0.2rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.site-nav a[aria-current="page"] {
  background: var(--primary);
  color: #fff;
}

.site-nav .sub-menu {
  margin: 0 0 0.25rem;
  padding-left: 0.9rem;
}

.site-nav .nav-cta a {
  background: var(--primary);
  color: #fff;
  text-align: center;
  margin-top: 0.4rem;
}

.site-nav .nav-cta a:hover,
.site-nav .nav-cta a:focus-visible {
  background: var(--primary-dark);
  color: #fff;
}

/* -------------------------------------------------------------------
   Layout
   ------------------------------------------------------------------- */

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.content {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1.5rem;
  min-width: 0;
}

.content > :first-child {
  margin-top: 0;
}

h1 {
  font-size: 1.6rem;
  line-height: 1.25;
  color: var(--primary-dark);
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.25rem;
  color: var(--primary-dark);
  margin: 1.75rem 0 0.5rem;
}

h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.4rem;
}

.content ul {
  padding-left: 1.3rem;
}

.content li {
  margin: 0.3rem 0;
}

.content img {
  border-radius: var(--radius);
  margin: 0.5rem 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}

.notice {
  background: #fdf3e7;
  border-left: 4px solid #e67e22;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.9rem 1rem;
  margin: 1.25rem 0;
}

.notice-important {
  background: #fdecea;
  border-left-color: var(--danger);
}

.hinweis-rot {
  color: var(--danger);
  font-weight: 600;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  margin: 0.5rem 0;
  transition: background 0.15s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--primary-dark);
}

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

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--primary-light);
}

.back-link {
  display: inline-block;
  margin-top: 1.25rem;
  font-weight: 600;
}

/* -------------------------------------------------------------------
   Sidebar (Öffnungszeiten etc.)
   ------------------------------------------------------------------- */

.sidebar {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem;
}

.card h2 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
}

.card-hours {
  border-top: 4px solid var(--accent);
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.hours-table td {
  padding: 0.25rem 0;
  vertical-align: top;
}

.hours-table td:last-child {
  text-align: right;
  white-space: nowrap;
}

.card .small {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.contact-list li {
  margin: 0.35rem 0;
}

/* -------------------------------------------------------------------
   Team
   ------------------------------------------------------------------- */

.team-member {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.team-member:last-child {
  border-bottom: 0;
}

.team-member img {
  width: 200px;
  max-width: 100%;
  border-radius: var(--radius);
  flex-shrink: 0;
  margin: 0;
}

.team-member h2 {
  margin: 0 0 0.25rem;
}

.team-member .role {
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.team-details {
  min-width: 0;
}

/* -------------------------------------------------------------------
   medatixx Terminkalender
   ------------------------------------------------------------------- */

.termin-embed {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 1.25rem 0;
}

.termin-embed iframe {
  display: block;
  width: 100%;
  border: 0;
  /* Auf dem Handy fast die volle Bildschirmhöhe nutzen,
     auf dem Desktop auf sinnvolle Höhe begrenzen */
  height: clamp(560px, calc(100vh - 220px), 860px);
  height: clamp(560px, calc(100dvh - 220px), 860px);
}

.termin-fallback {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.5rem 0 1.5rem;
}

/* -------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------- */

.site-footer {
  background: #3a4200;
  color: #eef3d8;
  margin-top: 2rem;
  padding: 1.75rem 1rem 5rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.site-footer h2 {
  color: var(--accent);
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.site-footer p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
}

.site-footer a {
  color: #fff;
}

.footer-meta {
  font-size: 0.85rem;
  color: #c9d3a0;
}

/* -------------------------------------------------------------------
   Mobile Schnellleiste (Anrufen / Termin)
   ------------------------------------------------------------------- */

.quickbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
}

.quickbar a {
  flex: 1;
  text-align: center;
  padding: 0.8rem 0.5rem;
  padding-bottom: calc(0.8rem + env(safe-area-inset-bottom));
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary-dark);
}

.quickbar a + a {
  border-left: 1px solid var(--border);
}

.quickbar .qb-primary {
  background: var(--primary);
  color: #fff;
}

/* -------------------------------------------------------------------
   Desktop
   ------------------------------------------------------------------- */

@media (min-width: 900px) {
  .brand-title {
    font-size: 1.25rem;
  }

  .brand-sub {
    font-size: 0.9rem;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: block;
    flex-basis: 100%;
  }

  .site-nav > ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem;
    margin: 0.35rem 0 0.15rem;
  }

  .site-nav a,
  .site-nav .nav-label {
    padding: 0.5rem 0.8rem;
  }

  .site-nav li {
    position: relative;
  }

  .site-nav .nav-label {
    cursor: default;
    text-transform: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0;
    padding-bottom: 0.5rem;
  }

  .site-nav .nav-label::after {
    content: " ▾";
    font-size: 0.7em;
    color: var(--text-muted);
  }

  .site-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--card);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 0.4rem;
    margin: 0;
  }

  .site-nav li:hover > .sub-menu,
  .site-nav li:focus-within > .sub-menu {
    display: block;
  }

  .site-nav .nav-cta a {
    margin: 0 0 0 0.5rem;
    border-radius: 999px;
    padding: 0.5rem 1.1rem;
  }

  .page {
    padding: 2rem 1.5rem 3rem;
  }

  .content-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.75rem;
  }

  .content {
    padding: 2rem 2.25rem 2.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  .team-member {
    flex-direction: row;
  }

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

  .site-footer {
    padding-bottom: 1.75rem;
  }

  .quickbar {
    display: none;
  }
}

/* Float-Bilder nur auf größeren Screens */
@media (min-width: 700px) {
  .img-float-left {
    float: left;
    margin: 0.25rem 1.25rem 0.75rem 0;
  }

  .img-float-right {
    float: right;
    margin: 0.25rem 0 0.75rem 1.25rem;
  }
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}
