/* ==========================================================================
   Tierarztpraxis Jens Neiseke — Stylesheet
   Plain CSS, no build step. Mobile-first.

   THEME TOGGLE: The whole site is themed from the variables in :root below.
   To switch from green to light blue, comment out the GREEN block and
   uncomment the BLUE block (both are provided). Nothing else needs to change.
   ========================================================================== */

:root {
  /* --- GREEN (default, soft/sage) --- */
  --accent:       #6ea88f;
  --accent-dark:  #4f8571;
  --accent-soft:  #eef5f1;

  /* --- BLUE alternative (uncomment these three, comment the green ones) ---
  --accent:       #6a9cc4;
  --accent-dark:  #4a7ba6;
  --accent-soft:  #eaf1f7;
  --------------------------------------------------------------------------- */

  --gray-bg:   #f6f7f7;
  --border:    #e3e6e5;
  --text:      #2b2f2e;
  --text-soft: #5c625f;
  --white:     #ffffff;

  /* Notdienst is deliberately warm/urgent so it never blends into the theme */
  --notdienst:      #c9553f;
  --notdienst-dark: #a8402d;

  --maxw: 1080px;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);

}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin: 0 0 0.5em; }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); margin: 0 0 0.6em; }
h3 { font-size: 1.15rem; margin: 0 0 0.4em; }

a { color: var(--accent-dark); }
a:hover { color: var(--accent); }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.1rem;
}

/* Accessibility: skip link + visible focus ------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent-dark);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ========================================================================
   Header / Navigation
   ======================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  line-height: 1.15;
  min-width: 0;
}
.brand:hover { color: var(--text); }
.brand-logo { width: 1.9rem; height: 1.9rem; flex-shrink: 0; }
.brand small { display: block; font-weight: 400; color: var(--text-soft); font-size: 0.75rem; }

/* right cluster keeps Notdienst always visible next to the menu toggle */
.header-actions { display: flex; align-items: center; gap: 0.6rem; }

.notdienst-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  background: var(--notdienst);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.51rem 0.85rem;
  border-radius: var(--radius);
  white-space: nowrap;
  font-size: 0.81rem;
}
.notdienst-btn:hover { background: var(--notdienst-dark); color: #fff; }
.notdienst-btn .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 2.5px rgba(255,255,255,0.35);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text);
}

/* Nav — mobile first (collapsed drawer) */
.main-nav {
  display: none;
  width: 100%;
  order: 3;
}
.main-nav.open { display: block; }
.main-nav ul { list-style: none; margin: 0.6rem 0 1rem; padding: 0; }
.main-nav > ul > li { border-top: 1px solid var(--border); }
.main-nav a {
  display: block;
  width: 100%;
  padding: 0.85rem 0.2rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 400;
  background: none;
  border: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.main-nav a:hover, .dropdown-toggle:hover { color: var(--accent-dark); }
.main-nav a[aria-current="page"] { color: var(--accent-dark); }

.dropdown-toggle {
  display: block;
  width: 100%;
  padding: 0.85rem 0.2rem;
  color: var(--text);
  font: inherit;
  font-weight: 400;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}
.main-nav .dropdown { display: none; margin: 0 0 0.6rem; padding-left: 1rem; }
.has-dropdown.open > .dropdown { display: block; }
.main-nav .dropdown a { font-weight: 400; padding: 0.55rem 0.2rem; }

/* Desktop nav ------------------------------------------------------------ */
@media (min-width: 860px) {
  .header-inner { flex-wrap: nowrap; }
  .nav-toggle { display: none; }
  .main-nav {
    display: block;
    width: auto;
    order: 0;
  }
  .main-nav > ul {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
  }
  .main-nav > ul > li { border-top: none; position: relative; }
  .main-nav a { padding: 0.5rem 0.75rem; width: auto; }
  .dropdown-toggle { padding: 0.5rem 0.75rem; width: auto; }
  .main-nav .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 17rem;
    margin: 0;
    padding: 0.4rem 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 20;
  }
  .main-nav .dropdown a { padding: 0.5rem 1rem; }


  /* order in the flex row: brand | nav | actions */
  .brand { order: 0; }
  .main-nav { order: 1; margin: 0 auto 0 1.5rem; }
  .header-actions { order: 2; }
}

/* ========================================================================
   Sections & layout helpers
   ======================================================================== */
section { padding: 3rem 0; }
.section-alt { background: var(--gray-bg); }
.section-soft { background: var(--accent-soft); }

.lead { font-size: 1.15rem; color: var(--text-soft); max-width: 60ch; }

.hero {
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--white) 100%);
  padding: 3.5rem 0 3rem;
}
.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin: 0 0 0.6rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.4rem 0 0.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--accent-dark); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); color: var(--accent-dark); }
.btn-notdienst { background: var(--notdienst); color: #fff; }
.btn-notdienst:hover { background: var(--notdienst-dark); color: #fff; }

/* Info badges (barrierefrei / Parkplatz) */
.badges { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.badge .ic { font-size: 1.1rem; }

/* Grid used for Sprechzeiten / Kontakt / Leistungen */
.grid { display: grid; gap: 1.2rem; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }

/* Leistungen list */
.service-list { border-bottom: 1px solid var(--border); max-width: 780px; }
.service {
  display: grid;
  gap: 0.4rem 2rem;
  padding: 1.1rem 0 1.1rem 1rem;
  border-top: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  margin-top: -1px;
}
.service h3 { margin: 0; font-size: 1.1rem; color: var(--accent-dark); }
.service-body p, .service-body ul { margin: 0; }
.service-body ul { padding-left: 1.1rem; }
@media (min-width: 720px) {
  .service { grid-template-columns: 15rem 1fr; align-items: baseline; }
}

/* Sprechzeiten table */
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { text-align: left; padding: 0.6rem 0.2rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.hours th { font-weight: 600; white-space: nowrap; padding-right: 1.2rem; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: none; }

/* Contact list */
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 0.7rem; padding: 0.55rem 0; align-items: flex-start; }
.contact-list .ic { font-size: 1.25rem; line-height: 1.4; }
.contact-list a { font-weight: 600; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* Map (gated behind consent) */
.map-wrap {
  position: relative;
  margin-top: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 300px;
  background: var(--gray-bg);
}
.map-wrap iframe { display: block; width: 100%; height: 360px; border: 0; }
.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.8rem;
  padding: 2rem 1.2rem;
  min-height: 300px;
  color: var(--text-soft);
}
.map-placeholder .ic { font-size: 2rem; }

/* ========================================================================
   Footer
   ======================================================================== */
.site-footer {
  background: var(--text);
  color: #d9dcdb;
  padding: 2.5rem 0;
  margin-top: 1rem;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.1rem; }
.footer-note { font-size: 0.85rem; color: #9aa09d; margin-top: 1.2rem; }
.cookie-settings-link {
  background: none; border: none; color: #fff; cursor: pointer;
  font: inherit; text-decoration: underline; padding: 0;
}

/* ========================================================================
   Cookie banner + modal
   ======================================================================== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 900;
  background: var(--white);
  border-top: 2px solid var(--accent);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
  padding: 1.1rem 0;
}
.cookie-banner[hidden] { display: none; }
.cookie-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.cookie-text { flex: 1 1 300px; font-size: 0.95rem; margin: 0; }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cookie-buttons .btn { padding: 0.6rem 1.1rem; font-size: 0.95rem; cursor: pointer; }
.btn-ghost { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn-ghost:hover { background: var(--gray-bg); color: var(--text); }

/* Preferences modal */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,0.5);
}
.cookie-modal[hidden] { display: none; }
.cookie-modal-box {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.6rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.cookie-cat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 0.8rem 0;
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.cookie-cat .switch { margin-top: 0.2rem; }
.cookie-cat h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.cookie-cat p { margin: 0; font-size: 0.9rem; color: var(--text-soft); }
.cookie-modal-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.cookie-modal-actions .btn { cursor: pointer; }

/* ========================================================================
   Page intro (sub-pages)
   ======================================================================== */
.page-intro { background: var(--accent-soft); padding: 2.5rem 0 2rem; }

.legal h2 { margin-top: 2rem; }
.legal h3 { margin-top: 1.5rem; }
.legal h4 { font-size: 1rem; margin: 1.2rem 0 0.3rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.3rem; }
.legal p { overflow-wrap: anywhere; hyphens: auto; }
.legal dl { margin: 0 0 1.5rem; }
.legal dt { font-weight: 700; margin-top: 0.8rem; }
.legal dd { margin: 0; }

/* ========================================================================
   Motion preferences
   ======================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Leistungen subpages */
.prose { max-width: 70ch; }
.prose p { margin: 0 0 1.1rem; }
.prose-actions { margin-top: 2rem !important; padding-top: 1.2rem; border-top: 1px solid var(--border); }
