/* Apotheke am Wasserschloss – public site
   Flat, modern take on the original design: blue brand band, green accents. */

:root {
  /* Brand colours (logo): for large areas, graphics, lines and borders. */
  --blue: #0085b0;
  --green: #009839;
  /* Text-safe shades of the same colours (WCAG AA, >= 4.5:1 with white) for links, buttons, small text. */
  --blue-text: #006b8e;    /* 6.0:1 */
  --blue-text-hover: #00546f;
  --green-text: #007a2e;   /* 5.5:1 */
  --green-text-hover: #00651f;
  --blue-soft: #e8f4f8;
  --red: #c0392b;
  --text: #1f2b33;
  --muted: #5a6670;
  --line: #d8e0e5;
  --bg-soft: #f3f6f8;
  --wrap: 72rem;
  --radius: 2px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-text); text-underline-offset: .15em; }
a:hover { color: var(--blue-text-hover); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6rem; font-weight: 600; }
p, ul, address, table { margin: 0 0 1rem; }
address { font-style: normal; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(0, 133, 176, .45); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.page { padding-top: 2.5rem; padding-bottom: 3.5rem; }
.small { font-size: .875rem; color: var(--muted); }
.nowrap { white-space: nowrap; }

.preview-banner {
  background: #fff4d6; color: #6b4e00; text-align: center;
  font-size: .8rem; padding: .3rem 1rem; border-bottom: 1px solid #f0dc9c;
}

/* ---------------------------------------------------------------- top bar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 3.5rem; }
.topbar-brand img { width: 32px; height: auto; }
.topnav { flex: 1; }
.topnav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.topnav a {
  display: block; padding: 1rem 0 calc(1rem - 3px); color: var(--muted); text-decoration: none;
  border-bottom: 3px solid transparent; font-size: 1rem;
}
.topnav a:hover { color: var(--text); }
.topnav a[aria-current="page"] { color: var(--blue-text); border-bottom-color: var(--blue); font-weight: 600; }
.topbar-phone {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap;
}
/* Phone icon as an SVG mask (Feather "phone", MIT) so it is never rendered as an emoji. */
.topbar-phone::before {
  content: ""; flex: none; width: 1em; height: 1em; background: var(--green);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.topbar-phone:hover { color: var(--blue-text); }

/* live status (filled in by site.js) */
.live-status { display: inline-flex; align-items: center; gap: .4rem; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.live-status::before { content: ""; flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; }
.live-status.is-open { color: var(--green-text); }
.live-status.is-closed { color: var(--red); }
.live-status .ls-short { display: none; }

/* ---------------------------------------------------------------- brand band */
.brandband { background: var(--blue); }
.brandband-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding-top: 2.25rem; padding-bottom: 2.25rem;
}
.wordmark img { width: auto; height: clamp(3rem, 9vw, 7.5rem); }
.brand-cross { width: clamp(3rem, 8.5vw, 7rem); height: auto; }

/* ---------------------------------------------------------------- hero (home) */
.hero { position: relative; margin-top: 2rem; overflow: hidden; border-radius: var(--radius); background: var(--bg-soft); }
.hero-slides { display: grid; }
.hero-slide { grid-area: 1 / 1; width: 100%; height: clamp(12rem, 34vw, 26rem); object-fit: cover; }
.hero-slide + .hero-slide { opacity: 0; animation: hero-fade 30s infinite; }
@keyframes hero-fade {
  0%, 45% { opacity: 0; }
  50%, 95% { opacity: 1; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide + .hero-slide { animation: none; }
}
.hero-label {
  position: absolute; left: 0; bottom: 1.5rem; margin: 0;
  padding: .7rem 1.25rem .7rem 1rem; background: #fff; color: var(--text);
  border-left: 4px solid var(--blue);
  font-size: clamp(1rem, 2.2vw, 1.5rem); font-weight: 600; line-height: 1.3;
  max-width: calc(100% - 2rem);
}
.page-home { padding-top: 2rem; }

/* special opening hours notice (home, today + 7 days) */
.notice {
  margin-top: 1.5rem; padding: 1rem 1.25rem .4rem; background: var(--blue-soft);
  border-left: 4px solid var(--blue); border-radius: var(--radius);
}
.notice h2 { font-size: 1.05rem; margin-bottom: .4rem; }
.notice .hours { margin-bottom: .6rem; }
.notice .hours li, .notice .hours li:first-child { border-color: rgba(0, 133, 176, .2); padding-left: 0; padding-right: 0; }
.notice .hours li:first-child { border-top: 0; }
.notice .hours li:last-child, .special-box .hours li:last-child { border-bottom: 0; }
/* special days: title, then "date · time", then note – all left-aligned so nothing gets lost on wide screens */
.hours.special li { display: block; }
.hours.special .sd-title, .hours.special .sd-when, .hours.special .sd-note { display: block; }
.hours.special .sd-when .times { font-weight: 600; white-space: nowrap; text-align: left; }
.hours.special .sd-sep { margin: 0 .3rem; color: var(--muted); }
.hours.special .sd-note { margin-top: .15rem; font-size: .95rem; }
.special-box .hours li:first-child { border-top: 0; }
@media (max-width: 40rem) {
  .hours.special .sd-sep { display: none; }
  .hours.special .sd-when .times { display: block; }
}

/* ---------------------------------------------------------------- layout */
.grid { display: grid; gap: 2rem; }
@media (min-width: 60rem) {
  .grid { grid-template-columns: 22rem 1fr; align-items: start; }
  .grid-even { grid-template-columns: 1fr 1fr; }
}

.page-title { font-size: clamp(1.8rem, 4vw, 2.4rem); padding-bottom: .75rem; margin-bottom: 1.75rem; border-bottom: 1px solid var(--line); }
.block + .block { margin-top: 2rem; }
.block h2 { font-size: 1.4rem; }
.block h3 { font-size: 1.05rem; }

/* ---------------------------------------------------------------- cards */
.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.card + .card { margin-top: 2rem; }
.card-head {
  margin: 0; padding: .7rem 1.25rem; font-size: 1rem; font-weight: 600;
  background: var(--green-text); color: #fff; border-radius: var(--radius) var(--radius) 0 0;
}
.card-head a { color: #fff; text-decoration: none; }
.card-head a:hover { text-decoration: underline; }
.card-body { padding: 1.25rem; }
.card-body > :last-child { margin-bottom: 0; }
.card-body h3 { font-size: 1.05rem; margin-top: 1.25rem; }
/* home: intro, news, three equal tiles */
.intro { max-width: 52rem; margin-bottom: 2.5rem; }
.intro-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-bottom: 1rem; }
.intro .richtext { font-size: 1.1rem; color: #33414b; }
.news { margin-bottom: 2rem; }
.tiles { display: grid; gap: 1.5rem; }
.tiles > * { min-width: 0; }
@media (min-width: 60rem) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { display: flex; flex-direction: column; margin: 0; }
.tile + .tile { margin-top: 0; }
.tile > .card-body { flex: 1; display: flex; flex-direction: column; }
.tile-link { margin: auto 0 0; padding-top: 1rem; font-size: .9rem; color: var(--muted); }
.tile-map .map { flex: 1; aspect-ratio: auto; min-height: 15rem; margin: 0; border: 0; }
.tile-map .tile-link { flex: none; padding: .75rem 1.25rem; margin: 0; border-top: 1px solid var(--line); }
.hours-compact li { padding-left: .5rem; padding-right: .5rem; }
.hours-compact li > span:first-child { white-space: nowrap; }
.hours-compact .times { line-height: 1.5; }

.status { font-size: 1.2rem; font-weight: 600; margin-bottom: .25rem; display: flex; align-items: center; gap: .5rem; }
.status::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: currentColor; }
.status.is-open { color: var(--green-text); }
.status.is-closed { color: var(--red); }
.today-title { font-weight: 600; margin-bottom: .1rem; }
.today-times { margin-bottom: .25rem; }
.today-note { color: var(--muted); font-size: .9rem; }

/* ---------------------------------------------------------------- buttons */
.button {
  display: inline-block; padding: .65rem 1.2rem; border: 0; border-radius: var(--radius);
  background: var(--green-text); color: #fff; font: inherit; font-weight: 600; font-size: .95rem;
  text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--green-text-hover); color: #fff; }

/* ---------------------------------------------------------------- hours */
.hours { list-style: none; padding: 0; margin: 0 0 1rem; }
.hours li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .45rem .6rem; border-bottom: 1px solid var(--line);
}
.hours li:first-child { border-top: 1px solid var(--line); }
.hours .times { text-align: right; white-space: nowrap; }
.hours li.today { background: var(--blue-soft); font-weight: 600; box-shadow: inset 3px 0 0 var(--blue); }
.special-box { margin-bottom: 1.5rem; padding: 1rem 1rem .25rem; background: var(--blue-soft); border-left: 3px solid var(--blue); }
.special-box h3 { font-size: 1rem; }
.special-box .hours li { border-color: rgba(0, 133, 176, .2); padding-left: 0; padding-right: 0; }

/* ---------------------------------------------------------------- map */
.map { position: relative; aspect-ratio: 4 / 3; background: var(--bg-soft); border: 1px solid var(--line); margin-bottom: .75rem; }
.map-small { aspect-ratio: 16 / 11; margin-top: 1rem; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------------------------------------------------------------- team */
.team { list-style: none; padding: 0; margin: 0; display: grid; gap: 0 2.5rem; }
@media (min-width: 48rem) { .team { grid-template-columns: 1fr 1fr; } }
.team li { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.team strong { display: block; font-weight: 600; }
.team span { color: var(--muted); font-size: .95rem; }

/* ---------------------------------------------------------------- services */
.services { width: 100%; border-collapse: collapse; margin: 0; }
.services td { padding: .7rem 1.25rem; border-top: 1px solid var(--line); vertical-align: top; }
.services tr:first-child td { border-top: 0; }
.services .price { text-align: right; color: var(--muted); white-space: nowrap; }
@media (max-width: 40rem) {
  /* phones: price on its own line under the service name */
  .services td { display: block; padding: .7rem 1rem 0; }
  .services td.price { text-align: left; white-space: normal; border-top: 0; padding: .1rem 1rem 0; font-size: .95rem; }
  .services td.price:empty { display: none; }
  .services tr { display: block; padding-bottom: .7rem; border-top: 1px solid var(--line); }
  .services tr:first-child { border-top: 0; }
  .services tr td:first-child { border-top: 0; }
}

/* ---------------------------------------------------------------- rich text */
.richtext > :last-child { margin-bottom: 0; }
.richtext h2 { font-size: 1.3rem; margin-top: 1.75rem; }
.richtext h3 { font-size: 1.1rem; margin-top: 1.25rem; }
.richtext ul, .richtext ol { padding-left: 1.4rem; }
.privacy { max-width: 46rem; }
.privacy h2:first-child { margin-top: 0; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.footer-inner p { margin: 0; }
.footer-inner strong { color: var(--text); }
.footer-links { align-self: flex-end; }
.footer-links .sep { margin: 0 .4rem; color: var(--line); }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .topbar-inner { flex-wrap: wrap; gap: 0 1rem; }
  .topnav { order: 3; flex-basis: 100%; }
  .topnav ul { gap: 0; justify-content: space-between; flex-wrap: nowrap; }
  .topnav a { padding: .55rem 0 calc(.55rem - 3px); }
  .topbar-phone { margin-left: auto; }
  .live-status { font-size: .8rem; }
  .live-status .ls-long { display: none; }
  .live-status .ls-short { display: inline; }
  .brandband-inner { padding-top: 1.25rem; padding-bottom: 1.25rem; gap: 1rem; }
  .wordmark img { height: auto; width: 100%; max-width: 15rem; }
  .brand-cross { width: 2.75rem; }
  .hero { margin-top: 1.25rem; }
  .hero-slide { height: 13rem; }
  /* phones: label under the photo instead of covering it */
  .hero-label { position: static; max-width: none; border-left: 0; border-top: 4px solid var(--blue); padding: .6rem .9rem; background: var(--bg-soft); }
  .page { padding-top: 1.75rem; }
  .hours li { padding-left: .4rem; padding-right: .4rem; }
  .footer-links .sep { display: none; }
  .footer-links .nowrap { display: block; margin-top: .25rem; }
}

/* tablets: short live status so the menu stays on one line */
@media (min-width: 40.01rem) and (max-width: 64rem) {
  .live-status .ls-long { display: none; }
  .live-status .ls-short { display: inline; }
}

/* very narrow phones (iPhone SE 1st gen, display zoom): keep the menu on one line */
@media (max-width: 23.75rem) {
  .topbar-inner { gap: 0 .6rem; }
  .topnav a { font-size: .9rem; }
  .topbar-phone { font-size: .85rem; gap: .3rem; }
  .live-status { font-size: .75rem; gap: .3rem; }
}
