/* Awards-Gewinnspiel: Tab „Gewinne“ (content/awards.php, content/award-gutscheine-lib.php, js/awards-gutscheine.js)
   Oben Übersicht 1–n mit Wert, darunter je Gutschein Kopf, Kernleistung, 3 Bilder (Fancybox gallery2), Details zum Aufklappen.
   Handy (bis 768px): Platz und Wert in einer Zeile, Bilder als Wischleiste, schwebender Sprung zur Übersicht. */

#Gewinne {
  --ag-sky: #3eaadf;
  --ag-sky-soft: #eef3f8;
  --ag-gold: #c9a45d;
  --ag-gold-bg: #fcfaf5;
  --ag-navy: #08427a; /* Award-Navy (wie Bestenliste); Alternative Logo-Welle #1a7cb6 */
  --ag-ink: #333;
  --ag-muted: #8e9091;
  --ag-line: #e5e5e5;
}
#Gewinne .ag-toc,
#Gewinne .ag-prize,
#Gewinne .ag-prize * {
  box-sizing: border-box;
}
#Gewinne .sub-text b {
  font-family: 'MyriadSetPro-Semibold', sans-serif;
  font-weight: normal;
  color: var(--ag-navy);
}

/* Übersicht */
.ag-toc {
  background: var(--ag-sky-soft);
  border-radius: 8px;
  padding: 22px 24px;
  margin: 24px 0 8px;
}
.ag-toc-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 10px;
}
.ag-toc-head h3 {
  margin: 0;
  font-family: 'MyriadSetPro-Semibold', sans-serif;
  font-weight: normal;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ag-navy);
}
.ag-toc-sum {
  font-family: 'MyriadSetPro-Text', sans-serif;
  font-size: 15px;
  color: var(--ag-muted);
}
.ag-toc-sum b {
  font-family: 'MyriadSetPro-Semibold', sans-serif;
  font-weight: normal;
  color: var(--ag-navy);
}
.ag-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: column;
  grid-template-rows: repeat(var(--ag-rows, 5), auto);
  column-gap: 40px;
}
.ag-toc li {
  min-width: 0;
  margin: 0;
  padding: 0;
}
.ag-toc a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  color: var(--ag-ink);
  font-family: 'MyriadSetPro-Text', sans-serif;
  font-size: 17px;
  text-decoration: none;
}
.ag-toc a:hover .ag-toc-name,
.ag-toc a:focus-visible .ag-toc-name {
  color: var(--ag-sky);
}
.ag-toc a:focus-visible {
  outline: 2px solid var(--ag-sky);
  outline-offset: 3px;
}
.ag-toc-nr {
  flex: none;
  width: 1.4em;
  font-family: 'MyriadSetPro-Semibold', sans-serif;
  color: var(--ag-gold);
}
.ag-toc-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s;
}
.ag-toc-dots {
  flex: 1;
  min-width: 16px;
  border-bottom: 1px dotted #b2b2b2;
  transform: translateY(-4px);
}
.ag-toc-val {
  flex: none;
  font-family: 'MyriadSetPro-Semibold', sans-serif;
  color: var(--ag-navy);
}

/* Gutschein */
.ag-prize {
  padding: 36px 0 32px;
  border-top: 1px solid var(--ag-line);
  font-family: 'MyriadSetPro-Text', sans-serif;
  color: var(--ag-ink);
}
.ag-prize:first-child {
  border-top: 0;
}
.ag-head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "rank rank" "title value";
  gap: 8px 24px;
  align-items: end;
  margin-bottom: 18px;
}
.ag-rank {
  grid-area: rank;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'MyriadSetPro-Semibold', sans-serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ag-gold);
}
.ag-draft { /* nur in der Admin-Vorschau */
  margin-left: 6px;
  padding: 2px 8px;
  border: 1px solid var(--ag-muted);
  border-radius: 20px;
  color: var(--ag-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.ag-rank svg {
  width: 15px;
  height: 15px;
  flex: none;
}
.ag-title {
  grid-area: title;
  min-width: 0;
}
.ag-prize h3 {
  margin: 0;
  font-family: 'MyriadSetPro-Thin', sans-serif;
  font-weight: normal;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 0.2px;
  color: var(--ag-ink);
  text-wrap: balance;
}
.ag-prize h3 a {
  color: inherit;
  text-decoration: none;
}
.ag-prize h3 a:hover {
  color: var(--ag-sky);
}
.ag-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 8px;
  font-size: 15px;
  color: var(--ag-muted);
}
.ag-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--ag-gold);
  border-radius: 24px;
  background: var(--ag-gold-bg);
  color: var(--ag-gold);
  font-family: 'MyriadSetPro-Semibold', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.ag-place:before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 12px;
  margin-right: 6px;
  vertical-align: -1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16'%3E%3Cpath fill='%238e9091' d='M6 0a6 6 0 0 0-6 6c0 4.5 6 10 6 10s6-5.5 6-10a6 6 0 0 0-6-6zm0 8.5A2.5 2.5 0 1 1 6 3.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.ag-value {
  grid-area: value;
  text-align: right;
}
.ag-value small {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ag-muted);
}
.ag-value strong {
  font-family: 'MyriadSetPro-Thin', sans-serif;
  font-weight: normal;
  font-size: 38px;
  line-height: 1;
  color: var(--ag-navy);
  white-space: nowrap;
}

.ag-prize p.ag-voucher { /* schlägt .text-page p (19px) */
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.45;
  overflow: hidden; /* blendet den Trennpunkt aus, wenn die Kernleistung in eine eigene Zeile umbricht */
}
.ag-voucher-name {
  font-family: 'MyriadSetPro-Semibold', sans-serif;
  color: var(--ag-navy);
}
.ag-voucher-name:before {
  content: "Gutschein · ";
  font-family: 'MyriadSetPro-Text', sans-serif;
  color: var(--ag-muted);
}
.ag-voucher-core {
  min-width: 0;
}
.ag-voucher-name + .ag-voucher-core:before { /* sitzt in der Lücke links davon, am Zeilenanfang außerhalb des Absatzes */
  content: "·";
  display: inline-block;
  width: 12px;
  margin-left: -12px;
  text-align: center;
  color: var(--ag-muted);
}
.ag-voucher b,
.ag-details b {
  font-family: 'MyriadSetPro-Semibold', sans-serif;
  font-weight: normal;
  color: var(--ag-ink); /* Portal-Regel färbt <b> im Awards-Tab sonst blau */
}

/* Bilder: Lupe beim Hover kommt aus main.css (a[data-fancybox]:has(> img)) */
.ag-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 14px;
}
.ag-gallery a {
  display: block;
  aspect-ratio: 3 / 2;
  max-width: 100%;
  overflow: hidden;
  border-radius: 6px;
  background: var(--ag-sky-soft);
}
.ag-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ag-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
}
.ag-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 18px 9px 16px;
  border: 1px solid var(--ag-sky);
  border-radius: 40px;
  background: #fff;
  color: var(--ag-sky);
  font-family: 'MyriadSetPro-Text', sans-serif;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
}
.ag-toggle:hover {
  background: var(--ag-sky);
  color: #fff;
}
.ag-toggle:focus-visible {
  outline: 3px solid var(--ag-sky);
  outline-offset: 2px;
}
.ag-toggle svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
}
.ag-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.ag-links {
  display: flex;
  gap: 20px;
  font-size: 15px;
}
.ag-links a {
  color: var(--ag-sky);
  text-decoration: none;
}
.ag-links a:hover {
  text-decoration: underline;
}
.ag-links .ag-up {
  color: var(--ag-muted);
}

.ag-details {
  margin-top: 18px;
  padding: 20px 22px;
  background: #fafafa;
  border: 1px solid var(--ag-line);
  border-radius: 8px;
}
.ag-details[hidden] {
  display: none;
}
.ag-details h4 {
  margin: 0 0 10px;
  font-family: 'MyriadSetPro-Semibold', sans-serif;
  font-weight: normal;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ag-navy);
}
.ag-details > ul {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 32px;
}
.ag-details li {
  position: relative;
  break-inside: avoid;
  margin: 0;
  padding: 0 0 7px 18px;
  font-size: 16px;
  line-height: 1.45;
}
.ag-details li:before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ag-sky);
}
.ag-details li ul {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.ag-details li li {
  padding-bottom: 4px;
  font-size: 15px;
}
.ag-details li li:before {
  width: 5px;
  height: 5px;
  background: none;
  border: 1px solid var(--ag-sky);
}
.ag-details p.ag-terms { /* schlägt .text-page p (19px) */
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--ag-line);
  font-size: 14px;
  line-height: 1.45;
  color: #6f7477;
}
.ag-terms b {
  color: var(--ag-ink);
}
.ag-close {
  display: block;
  margin: 12px 0 0 auto;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--ag-sky);
  font-family: 'MyriadSetPro-Text', sans-serif;
  font-size: 15px;
  cursor: pointer;
}
.ag-close:focus-visible {
  outline: 2px solid var(--ag-sky);
  outline-offset: 2px;
}

/* Sprung zur Übersicht am Handy: Klassen des Website-Buttons aus detail.php (main.css .website-sticky-mobile) */
#ag-to-toc svg {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: -3px;
}
/* .btn-blue-full:hover macht den Button transparent; am Handy bleibt Hover nach dem Antippen hängen,
   der Button stand dann unsichtbar über den Bildern. Er bleibt daher in jedem Zustand blau. */
#ag-to-toc:hover,
#ag-to-toc:focus,
#ag-to-toc:active {
  background: #3eaadf;
  color: #fff;
}
#ag-to-toc:focus-visible {
  outline: 3px solid #08427a;
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .ag-toc {
    padding: 16px;
    margin-top: 18px;
  }
  .ag-toc ol {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-template-rows: none;
  }
  .ag-toc a {
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #dfe6eb;
    font-size: 16px;
  }
  .ag-toc li:last-child a {
    border-bottom: 0;
  }
  .ag-toc-name {
    flex: 1;
    white-space: normal;
    line-height: 1.3;
  }
  .ag-toc-dots {
    display: none;
  }

  .ag-prize {
    padding: 28px 0 26px;
  }
  .ag-head {
    grid-template-areas: "rank value" "title title";
    align-items: center;
    gap: 6px 12px;
    margin-bottom: 14px;
  }
  .ag-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
  }
  .ag-value small {
    margin: 0;
    font-size: 11px;
  }
  .ag-value strong {
    font-size: 26px;
  }
  .ag-prize h3 {
    font-size: 26px;
  }
  .ag-meta {
    font-size: 14px;
  }
  .ag-prize p.ag-voucher {
    font-size: 16px;
  }

  .ag-gallery {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-right: -15px;
    padding-right: 15px;
  }
  .ag-gallery::-webkit-scrollbar {
    display: none;
  }
  .ag-gallery a {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }

  .ag-foot {
    flex-wrap: nowrap;
  }
  .ag-toggle {
    padding: 9px 14px 9px 12px;
    font-size: 15px;
    white-space: nowrap;
  }
  .ag-links {
    white-space: nowrap;
  }
  .ag-links .ag-up {
    display: none;
  }
  .ag-details {
    padding: 16px;
  }
  .ag-details > ul {
    columns: 1;
  }
  .ag-details li {
    font-size: 15px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .ag-toggle svg,
  .ag-toc-name {
    transition: none;
  }
}
