/*
// Pfad: css
// Datei: bestenliste.css
*/

.bestenliste {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.bestenliste h1 {
  grid-column: 1 / -1;
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: bold;
}

/* Karte */
.bestenliste .item {
  position: relative;
  background: var(--color-white);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

/* Ranking-Fahne mit animiertem Orange-Gelb-Hintergrund */
.bestenliste .rank {
  position: absolute;
  top: 0;
  left: 0;
  padding: 10px 16px;
  background: linear-gradient(270deg, #ff7b00, #ffa41c, #ff7b00);
  background-size: 300% 300%;
  animation: orangeGlow 30s linear infinite;
  clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bestenliste .rank .rank-label {
  font-family: var(--font-family-primary);
  font-weight: 900;
  font-size: 1.8rem;
  letter-spacing: 1px;
  color: var(--color-white);
  text-shadow:
    0 0 3px rgba(0, 0, 0, 0.8),
    1px 1px 2px rgba(0, 0, 0, 0.6),
    -1px -1px 2px rgba(0, 0, 0, 0.4);
}

@keyframes orangeGlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.bestenliste img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.bestenliste .info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bestenliste .info h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.bestenliste .info .price {
  font-size: 1rem;
  color: var(--color-medium);
}

.bestenliste .rating-block {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bestenliste .rating-value {
  background: #ffa41c;
  color: var(--color-dark);
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 1rem;
}

.bestenliste .stars {
  display: inline-flex;
  gap: 2px;
  font-size: 1.5rem;
  line-height: 1;
}

.bestenliste .stars .full {
  color: #ffa41c;
}

.bestenliste .stars .half {
  color: var(--color-light);
  background: linear-gradient(90deg, #d68011 0%, #ffa41c 50%, #ccc 50%, #ccc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bestenliste .stars .empty {
  color: var(--color-light);
}

.bestenliste .btn {
  position: relative;
  overflow: hidden;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 12px;
  text-align: center;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  transition: background var(--transition-duration);
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}

.bestenliste .btn:hover {
  background: var(--color-primary-dark);
}

.bestenliste .btn::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: rgba(255,255,255,0.3);
  transform: skewX(-20deg);
}

.bestenliste .btn:hover::after {
  animation: shimmer 1s forwards;
}

@keyframes shimmer {
  to { left: 200%; }
}

.bestenliste .amazon-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--color-medium);
}

.bestenliste .amazon-meta img {
  height: 14px;
  width: auto;
}

@media (max-width: 768px) {
  .bestenliste {
    grid-template-columns: 1fr;
    padding: 0 8px;
  }
  .bestenliste .item {
    align-items: center;
    text-align: center;
  }
  .bestenliste .rating-block {
    justify-content: center;
  }
}

/* Section "besten-header" sauber unter dem Header platzieren */
.besten-header {
  max-width: 1024px;
  margin: 88px auto 0 auto;  /* 64px Header + 24px Abstand */
  padding: 0 16px 16px 16px;
  box-sizing: border-box;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.besten-header h1 {
  margin-bottom: 0.25rem;
  font-size: 1.75rem;
  font-weight: bold;
}

.besten-header .generated-date {
  color: var(--color-medium);
  font-size: 1rem;
  margin: 0;
}



/* FAQ ist EINE Card wie .item */
.faq {
  max-width: 1024px;
  margin: 2.5rem auto;
  padding: 1.5rem 1.2rem;
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  box-sizing: border-box;
}

/* Header-Balken in der Card */
.faq h2 {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 0.9rem 1.2rem 0.7rem 1.2rem;
  margin: -1.5rem -1.2rem 1.2rem -1.2rem; /* gleicht Card-Padding aus */
  border-radius: 8px 8px 0 0;
  font-size: 1.15rem;
  font-weight: bold;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(33,37,41,0.05);
}

/* Fragenliste: KEINE extra Card! */
.faq-list {
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding-left: 1.5rem;
  margin-bottom: 2em;
}

.faq-list li {
  margin-bottom: 0.45em;
  font-size: 1em;
}

/* Antworten wie gehabt */
.faq-answer {
  margin-bottom: 2em;
}
.faq-answer:last-child {
  margin-bottom: 0;
}
.faq-answer h3 {
  margin: 0 0 0.3em 0;
  font-size: 1.08rem;
  font-weight: bold;
  color: var(--color-dark);
}

/* Mobile: Card bleibt Card, Padding wie bei .item */
@media (max-width: 768px) {
  .faq {
    max-width: 100%;
    padding: 1rem 6px;
    margin-left: 10px;
    margin-right: 10px;
  }
  .faq h2 {
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: 10px;
    margin-right: 10px;
  }
  .faq-list {
    padding-left: 1rem;
  }
}