/* ==========================================================================
   DZKB – zentrale Bausteine für die öffentlichen Seiten
   Adresse: https://dzkb.bayern/ui/site-components.css

   Diese Datei wird von dzkb.bayern und hundefuehrerschein.dzkb.bayern geladen
   (jeweils NACH der seiteneigenen styles.css). Was hier steht, gilt auf allen
   Seiten gleich – Aussehen deshalb nur hier ändern, nie in einer Seiten-CSS.

   Inhalt
   1. Auswahlkacheln  .site-tiles / .site-tile
   ========================================================================== */


/* 1. Auswahlkacheln ---------------------------------------------------------
   Kacheln, die neben sich einen Inhalt umschalten (Informationen, Berufsbilder,
   Über uns). Aufbau:

     <div class="site-tiles">
       <div class="site-tiles__label">GRUPPE</div>                 (optional)
       <button class="site-tile is-active"> Symbol + Text </button>
       <button class="site-tile"> … </button>
     </div>

   Jede Kachel hat genau ein Symbol. Drei Arten sind möglich:
     a) Bild:        <img src="…" alt="">Text
     b) Liniengrafik: <span class="site-tile__icon"><svg viewBox="0 0 48 48">…</svg></span>
                      <span class="site-tile__copy"><small>ZEILE</small><strong>Text</strong></span>
     c) Symbolklasse: class="site-tile site-tile--icon-team">Text
        (für Kacheln, deren Text im Seiteneditor bearbeitbar bleiben muss)

   Der Pfeil rechts und der Farbverlauf je Position kommen automatisch.
   .is-active markiert die gewählte Kachel.
   .site-tiles--fill verteilt die Kacheln gleichmäßig auf die Höhe des Nachbarn.
   .site-tiles--on-dark ist für Gruppen auf dunklem Grund.
   -------------------------------------------------------------------------- */

.site-tiles {
  display: grid;
  /* Ab rund 670 px Breite stehen die Kacheln zweispaltig, darunter untereinander. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  align-content: start;
  gap: 13px;
  min-width: 0;
}
.site-tiles--fill {
  grid-auto-rows: 1fr;
  align-content: stretch;
}

.site-tiles__label {
  grid-column: 1 / -1;
  margin: 3px 6px 1px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .14em;
  color: #5d8298;
}
.site-tiles__label:not(:first-child) { margin-top: 26px; }

.site-tile {
  appearance: none;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 16px;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 82px;
  padding: 15px 18px;
  border: 1px solid #d8e8f1;
  border-radius: 10px;
  background: rgba(255, 255, 255, .91);
  box-shadow: 0 5px 14px rgba(4, 66, 101, .045);
  color: #073c5f;
  font: inherit;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

/* Farbverlauf je Position in der Gruppe */
.site-tile:nth-of-type(1) { background: linear-gradient(135deg, rgba(226, 246, 255, .94), rgba(255, 255, 255, .96)); }
.site-tile:nth-of-type(2) { background: linear-gradient(135deg, rgba(234, 249, 248, .95), rgba(255, 255, 255, .96)); }
.site-tile:nth-of-type(3) { background: linear-gradient(135deg, rgba(239, 244, 255, .95), rgba(255, 255, 255, .96)); }
.site-tile:nth-of-type(4) { background: linear-gradient(135deg, rgba(229, 247, 255, .95), rgba(255, 255, 255, .96)); }
.site-tile:nth-of-type(5) { background: linear-gradient(135deg, rgba(234, 243, 255, .95), rgba(255, 255, 255, .96)); }
.site-tile:nth-of-type(6) { background: linear-gradient(135deg, rgba(232, 249, 244, .95), rgba(255, 255, 255, .96)); }

.site-tile:hover {
  border-color: #79c7ee;
  box-shadow: 0 8px 20px rgba(4, 66, 101, .08);
  transform: translateX(2px);
}
.site-tile.is-active {
  background: linear-gradient(135deg, #d9f2fd 0%, #f7fcff 100%);
  border-color: #2aa8e7;
  box-shadow: 0 9px 22px rgba(8, 129, 191, .13);
}

/* Auf dunklem Grund (z. B. blauer Abschnitt) hebt ein heller Ring die gewählte Kachel ab. */
.site-tiles--on-dark .site-tile {
  border-color: rgba(255, 255, 255, .6);
  box-shadow: 0 8px 20px rgba(0, 45, 75, .16);
}
.site-tiles--on-dark .site-tile:not(.is-active):not(:hover) { opacity: .86; }
.site-tiles--on-dark .site-tile:hover,
.site-tiles--on-dark .site-tile.is-active {
  border-color: #fff;
}
.site-tiles--on-dark .site-tile.is-active {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 12px 28px rgba(0, 45, 75, .28);
}

/* Pfeil rechts */
.site-tile::after {
  content: "›";
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  color: #0879b9;
  text-align: right;
}

/* Symbol a) Bild */
.site-tile > img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

/* Symbol b) Liniengrafik mit zweizeiligem Text */
.site-tile__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #0879b9;
}
.site-tile__icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-tile__copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.site-tile__copy small {
  font-size: 9px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: .10em;
  color: #0879b9;
}
.site-tile__copy strong {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  color: #073c5f;
}

/* Symbol c) Symbolklasse – dieselbe Liniengrafik, über die Klasse gewählt */
.site-tile[class*="site-tile--icon-"]::before {
  content: "";
  width: 46px;
  height: 46px;
  background: #0879b9;
  -webkit-mask: var(--site-tile-icon) center / 34px 34px no-repeat;
  mask: var(--site-tile-icon) center / 34px 34px no-repeat;
}
.site-tile--icon-team    { --site-tile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='24' cy='15' r='6'/%3E%3Cpath d='M13 38c1-9 5-14 11-14s10 5 11 14'/%3E%3Ccircle cx='9.5' cy='20.5' r='3.8'/%3E%3Ccircle cx='38.5' cy='20.5' r='3.8'/%3E%3Cpath d='M3.5 36c.4-5 2.6-8 6-8M44.5 36c-.4-5-2.6-8-6-8'/%3E%3C/svg%3E"); }
.site-tile--icon-network { --site-tile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='24' cy='24' r='5.5'/%3E%3Ccircle cx='10' cy='11' r='3.6'/%3E%3Ccircle cx='38' cy='11' r='3.6'/%3E%3Ccircle cx='10' cy='37' r='3.6'/%3E%3Ccircle cx='38' cy='37' r='3.6'/%3E%3Cpath d='M12.7 13.5 20 20.2M35.3 13.5 28 20.2M12.7 34.5 20 27.8M35.3 34.5 28 27.8'/%3E%3C/svg%3E"); }
.site-tile--icon-award   { --site-tile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='24' cy='19' r='11'/%3E%3Cpath d='M19.3 19.3l3.3 3.3 6.3-6.6'/%3E%3Cpath d='M17 27.6 14 41l10-5 10 5-3-13.4'/%3E%3C/svg%3E"); }
.site-tile--icon-support { --site-tile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M24 15.5c-2.2-4.6-10-4-10 2 0 5.2 10 11 10 11s10-5.8 10-11c0-6-7.8-6.6-10-2z'/%3E%3Cpath d='M6 33h7l7 3.5h9'/%3E%3Cpath d='M6 41h24c3 0 8-3.5 12-8.5-2-2-4.500-1.5-7 .5l-6 3.5'/%3E%3C/svg%3E"); }

/* Schmale Bildschirme */
@media (max-width: 1000px) {
  .site-tiles { gap: 10px; }
  .site-tile { min-height: 76px; }
  .site-tile::after { display: none; }
}
@media (max-width: 680px) {
  .site-tile { min-height: 72px; }
  .site-tile:hover { transform: none; }
}
