/* ===== Card Component ===== */

.card {
  background-color: var(--color-bg-elevated-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-lg), var(--glow-primary-sm);
  transform: translateY(-4px);
  border-color: var(--color-border-medium);
}

/* ===== Card Sections ===== */

.card-image {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.card-image-wrapper {
  position: relative;
  overflow: hidden;
  background-color: var(--color-bg-elevated-3);
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .card-image-wrapper img {
  transform: scale(1.05);
}

/* Fixed aspect ratios for card images */
.card-image-square {
  aspect-ratio: 1 / 1;
}

.card-image-landscape {
  aspect-ratio: 16 / 9;
}

.card-image-portrait {
  aspect-ratio: 3 / 4;
}

.card-content {
  padding: var(--spacing-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-header {
  margin-bottom: var(--spacing-md);
}

.card-title {
  font-family: var(--font-primary);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-light);
  margin-bottom: var(--spacing-xs);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted-light);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-body {
  flex: 1;
  margin-bottom: var(--spacing-md);
}

.card-body p {
  color: var(--color-text-muted-light);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-sm);
}

.card-body p:last-child {
  margin-bottom: 0;
}

.card-footer {
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
}

/* ===== Card Variants ===== */

/* Dark Card (Extra dark variant) */
.card-dark {
  background-color: var(--color-bg-primary);
  border-color: var(--color-border-subtle);
}

/* Outlined Card */
.card-outline {
  background-color: transparent;
  border: 2px solid var(--color-border-medium);
  box-shadow: none;
}

.card-outline:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md), var(--glow-primary-sm);
}

/* Elevated Card */
.card-elevated {
  box-shadow: var(--shadow-xl);
}

.card-elevated:hover {
  box-shadow: var(--shadow-2xl);
}

/* Horizontal Card */
.card-horizontal {
  flex-direction: row;
}

.card-horizontal .card-image-wrapper {
  width: 40%;
  flex-shrink: 0;
}

.card-horizontal .card-content {
  width: 60%;
}

@media (max-width: 767px) {
  .card-horizontal {
    flex-direction: column;
  }

  .card-horizontal .card-image-wrapper,
  .card-horizontal .card-content {
    width: 100%;
  }
}

/* ===== Service Card (for Leistungen) ===== */

.service-card {
  position: relative;
  text-align: center;
  padding: var(--spacing-xl);
  background: var(--color-bg-elevated-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card:hover {
  box-shadow: var(--shadow-xl), var(--glow-primary);
  transform: translateY(-8px);
  border-color: var(--color-border-primary);
}

.service-card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--radius-lg);
  color: var(--color-text-light);
  font-size: var(--font-size-3xl);
}

.service-card-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-light);
}

.service-card-description {
  color: var(--color-text-muted-light);
  margin-bottom: var(--spacing-lg);
  line-height: var(--line-height-relaxed);
  flex: 1;
}

/* ===== Package Card (for Pricing/Pakete) ===== */

.package-card {
  background: var(--color-bg-elevated-2);
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.package-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-xl), var(--glow-primary-sm);
  transform: translateY(-4px);
}

.package-card-featured {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.package-card-featured::before {
  content: 'Beliebt';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-text-light);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.package-card-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.package-card-name {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-light);
  margin-bottom: var(--spacing-xs);
}

.package-card-ideal {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted-light);
  font-style: italic;
}

.package-card-price {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.package-card-price-amount {
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-primary);
  line-height: 1;
}

.package-card-price-currency {
  font-size: var(--font-size-xl);
}

.package-card-price-period {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted-light);
  display: block;
  margin-top: var(--spacing-xs);
}

.package-card-features {
  list-style: none;
  margin-bottom: var(--spacing-xl);
  flex: 1;
}

.package-card-features li {
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--color-border-medium);
  color: var(--color-text-light);
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
}

.package-card-features li:last-child {
  border-bottom: none;
}

.package-card-features li::before {
  content: '';
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
}

/* ===== Testimonial Card ===== */

.testimonial-card {
  background: var(--color-bg-elevated-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-md);
  position: relative;
  transition: all var(--transition-base);
}

.testimonial-card:hover {
  border-color: var(--color-border-medium);
  box-shadow: var(--shadow-lg), var(--glow-primary-sm);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: var(--spacing-md);
  left: var(--spacing-md);
  font-size: 4rem;
  color: var(--color-primary);
  opacity: 0.1;
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial-text {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-light);
  margin-bottom: var(--spacing-lg);
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.testimonial-author-info {
  flex: 1;
}

.testimonial-author-name {
  font-weight: var(--font-weight-bold);
  color: var(--color-text-light);
  margin-bottom: var(--spacing-xs);
}

.testimonial-author-role {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted-light);
}

.testimonial-rating {
  color: var(--color-secondary);
  font-size: var(--font-size-lg);
}

/* Mobile Optimierung für Testimonial Cards */
@media (max-width: 767px) {
  .testimonial-card {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
  }

  .testimonial-card::before {
    font-size: 2.5rem;
    top: var(--spacing-xs);
    left: var(--spacing-xs);
  }

  .testimonial-text {
    font-size: var(--font-size-sm);
    line-height: 1.5;
    margin-bottom: var(--spacing-sm);
  }

  .testimonial-author {
    gap: var(--spacing-xs);
  }

  .testimonial-author-name {
    font-size: var(--font-size-sm);
    margin-bottom: 2px;
  }

  .testimonial-author-role {
    font-size: var(--font-size-xs);
  }

  .testimonial-rating {
    font-size: var(--font-size-sm);
  }
}

/* Extra kleine Bildschirme - noch kompaktere Cards */
@media (max-width: 479px) {
  .testimonial-card {
    padding: var(--spacing-sm);
  }

  .testimonial-card::before {
    font-size: 2rem;
  }

  .testimonial-text {
    font-size: var(--font-size-xs);
    line-height: 1.4;
  }

  .testimonial-author-name {
    font-size: var(--font-size-xs);
  }

  .testimonial-rating {
    font-size: var(--font-size-xs);
  }
}

/* ===== Project/Referenz Card ===== */

.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  transition: all var(--transition-base);
}

.project-card:hover {
  border-color: var(--color-border-primary);
  box-shadow: var(--glow-primary-sm);
}

.project-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: all var(--transition-slow);
}

.project-card:hover .project-card-image {
  transform: scale(1.1);
  opacity: 0.7;
}

.project-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-lg);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  color: var(--color-text-light);
  transform: translateY(20px);
  transition: transform var(--transition-base);
}

.project-card:hover .project-card-overlay {
  transform: translateY(0);
}

.project-card-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-light);
  margin-bottom: var(--spacing-xs);
}

.project-card-tags {
  display: flex;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
}

.project-card-tag {
  font-size: var(--font-size-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
