/* Farmacia Vida Sana – Stylesheet */

:root {
  --green: #1e8f0f;
  --page-width: 900px;
  --radius: 7px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, Verdana, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background-color: var(--green);
}

img {
  max-width: 100%;
  height: auto;
}

h3 {
  font-size: 1.25rem;
}

/* ---------- Layout ---------- */

.page {
  max-width: var(--page-width);
  margin: 0 auto;
  background-color: #fff;
  border-radius: var(--radius);
}

.site-header {
  position: relative;
  text-align: center;
}

.site-header__image {
  display: block;
  width: 100%;
  border-radius: var(--radius) var(--radius) 0 0;
}

.site-header h1 {
  margin: 0.5rem 0;
}

/* ---------- Sprachumschalter ----------
   Aussehen nach isceer/gegenstrom (index.html, .lang-switcher, Commit f6ef3e2):
   Trigger mit aktiver Flagge + Caret oben rechts, aufklappendes Menü mit
   Flagge + Sprachcode, 44 px Trefferfläche, aktive Sprache hinterlegt.
   Bewusst anders: <details>/<summary> statt JS, Einträge sind echte Links
   auf /, /en/, /de/ (CANON §12 E-1). */

.lang-switcher {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  text-align: left;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.6rem;
  background: #fff;
  border: 1px solid #e6e2db;
  border-radius: 10px;
  color: #1c1917;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.06);
}

.lang-trigger::-webkit-details-marker {
  display: none;
}

.lang-trigger::marker {
  content: "";
}

.lang-trigger:focus-visible,
.lang-menu-item:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.lang-caret {
  font-size: 0.75rem;
}

.lang-switcher img {
  display: block;
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 7.5rem;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e6e2db;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.06);
}

.lang-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: 6px;
  color: #1c1917;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

a.lang-menu-item:hover,
.lang-menu-item[aria-current="page"] {
  background: #e1eef2;
}

.content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
}

.card {
  padding: 6px 12px 10px;
  text-align: left;
}

.card h2 {
  margin: 0.5rem 0;
  font-size: 1.25rem;
  text-align: center;
}

.card--outlined {
  border: medium outset var(--green);
  border-radius: var(--radius);
}

.card__photo {
  display: block;
  margin: 0 auto 0.5rem;
}

.card__map {
  display: block;
  width: 100%;
  height: 350px;
  border: 0;
}

address {
  font-style: normal;
  font-size: 0.9rem;
}

.hours {
  padding-left: 1.2rem;
}

.hours li {
  margin-bottom: 0.75rem;
}

/* ---------- Footer ---------- */

.site-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
  font-size: 0.75rem;
}

.site-footer__legal {
  padding: 6px;
  text-align: center;
  border: medium outset var(--green);
  border-radius: var(--radius);
}

/* Aviso Legal als Aufklappblock: <details>, standardmäßig zu, ohne JS.
   Caret wie beim Sprachumschalter, 44 px Trefferfläche. */
.legal__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
}

.legal__toggle::-webkit-details-marker {
  display: none;
}

.legal__toggle::marker {
  content: "";
}

.legal__toggle:hover {
  background: #e1eef2;
}

.legal__toggle:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.legal__caret {
  font-size: 0.75rem;
  transition: transform 0.15s;
}

.legal[open] .legal__caret {
  transform: rotate(180deg);
}

.site-footer__credit {
  text-align: right;
}

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .content,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer__credit {
    text-align: left;
  }

  /* Handy: Umschalter in eigener Zeile über dem Banner, verdeckt den Schriftzug nicht */
  .lang-switcher {
    position: relative;
    top: auto;
    right: auto;
    width: max-content;
    margin: 6px 6px 6px auto;
  }
}
