/* ============================================================
   PRAKTIKO ADVERTISEMENTS (WERBUNG)
   ============================================================ */

/* ── Common Ad Elements ────────────────────────────────────── */
.ad-badge-tag {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--color-surface);
  font-size: 0.65rem;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  z-index: 10;
  pointer-events: none;
}

/* ── Job Cards Placements ──────────────────────────────────── */
.job-card-ad {
  position: relative;
  text-decoration: none;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

/* Image Mode Ad Card */
.ad-card-image-mode {
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.ad-card-image-mode:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-primary-light);
}

.ad-card-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.75) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-5);
  color: var(--color-surface);
}

.ad-card-image-sponsor {
  font-size: var(--text-xs);
  opacity: 0.85;
  margin-bottom: var(--space-1);
}

.ad-card-image-title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
}

/* Text Mode Ad Card */
.ad-card-text-mode {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--color-border);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.ad-card-text-mode:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.ad-card-text-top {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-right: 55px;
  /* Space for the Ad Tag */
}

.ad-card-text-logo {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  background: var(--color-surface-2);
}

.ad-card-text-info {
  flex: 1;
  min-width: 0;
}

.ad-card-text-title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--color-ink);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-1);
}

.ad-card-text-sponsor {
  font-size: var(--text-xs);
  color: var(--color-muted);
  font-weight: var(--weight-medium);
}

.ad-card-text-desc {
  font-size: var(--text-sm);
  color: var(--color-ink-3);
  line-height: var(--leading-normal);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ad-card-text-footer {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
}

/* ── Hero Carousel placement ────────────────────────────────── */
.hero-split-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-8);
  width: 100%;
}

.hero-content {
  flex: 1;
}

.hero-carousel-wrapper {
  width: 100%;
  max-width: 360px;
  height: 200px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-lg);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  position: relative;
  transition: all var(--transition-base);
}

.hero-carousel-wrapper:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border-color: var(--color-primary-light);
}

.hero-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  display: flex;
  flex-direction: column;
}

.hero-carousel-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-carousel-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
}

/* Image Mode Hero Slide */
.hero-ad-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-ad-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0.75) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-4) var(--space-5);
  color: var(--color-surface);
}

.hero-ad-image-sponsor {
  font-size: 0.7rem;
  opacity: 0.85;
  margin-bottom: 2px;
}

.hero-ad-image-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}

/* Text Mode Hero Slide */
.hero-ad-text-content {
  width: 100%;
  height: 100%;
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--color-surface);
}

.hero-ad-text-top {
  display: flex;
  gap: var(--space-3);
  margin-right: 55px;
  /* Space for ad tag */
}

.hero-ad-text-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.hero-ad-text-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-ink);
  line-height: var(--leading-snug);
}

.hero-ad-text-sponsor {
  font-size: 0.65rem;
  color: var(--color-muted);
}

.hero-ad-text-desc {
  font-size: var(--text-xs);
  color: var(--color-ink-3);
  line-height: var(--leading-normal);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-block: var(--space-2);
}

.hero-ad-text-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Above-Footer Leaderboard placement ──────────────────────── */
.footer-ad-section {
  padding-block: var(--space-6);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-2);
  margin-top: var(--space-8);
}

.footer-ad-wrapper {
  max-width: 960px;
  height: 90px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  position: relative;
}

.footer-ad-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.footer-ad-slide.active {
  opacity: 1;
  visibility: visible;
}

.footer-ad-link {
  display: flex;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
  align-items: center;
}

/* Image Mode Footer Slide */
.footer-ad-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-ad-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.15) 50%, rgba(0, 0, 0, 0.6) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-8);
  color: var(--color-surface);
}

/* Text Mode Footer Slide */
.footer-ad-text-content {
  width: 100%;
  height: 100%;
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-5);
  background: var(--color-surface);
}

.footer-ad-text-logo {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.footer-ad-text-middle {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-ad-text-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.footer-ad-text-title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--color-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-ad-text-sponsor {
  font-size: var(--text-xs);
  color: var(--color-muted);
  font-weight: var(--weight-medium);
}

.footer-ad-text-desc {
  font-size: var(--text-xs);
  color: var(--color-ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-ad-text-right {
  flex-shrink: 0;
  padding-right: 55px;
  /* Space for the Ad Tag */
}

/* ── Responsive adjustments ─────────────────────────────────── */
@media (max-width: 768px) {
  .hero-split-container {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-6);
  }

  .hero-carousel-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }

  .footer-ad-wrapper {
    height: 178px;
    max-width: 100%;
  }

  .footer-ad-text-content {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    grid-template-rows: auto auto auto;
    gap: 4px var(--space-3);
    padding: 10px var(--space-4) 8px;
    align-items: center;
    align-content: center;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .footer-ad-text-logo {
    grid-column: 1;
    grid-row: 1;
    width: 2.5rem;
    height: 2.5rem;
  }

  .footer-ad-text-middle {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .footer-ad-text-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    min-width: 0;
  }

  .footer-ad-text-title {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: var(--text-sm);
    line-height: 1.3;
  }

  .footer-ad-text-sponsor {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .footer-ad-text-desc {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    grid-column: 2;
  }

  .footer-ad-text-right {
    grid-column: 1 / span 2;
    grid-row: 3;
    width: 100%;
    text-align: right;
    padding-right: 0;
  }

  .footer-ad-text-right .btn {
    padding: 6px 12px;
    font-size: var(--text-xs);
    max-width: 100%;
    white-space: nowrap;
  }

  .footer-ad-section .ad-badge-tag {
    top: 6px;
    right: 6px;
    font-size: 0.6rem;
  }
}

/* ── Image scaling fit helpers ──────────────────────────────── */
img.ad-fit-cover {
  object-fit: cover !important;
}

img.ad-fit-contain {
  object-fit: contain !important;
  background-color: var(--color-surface-2) !important;
}

.ad-fit-cover {
  background-size: cover !important;
}

.ad-fit-contain {
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-color: var(--color-surface-2) !important;
}

/* ── Visual Showcase Carousel ────────────────────────────────── */
.showcase-carousel-wrapper {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-slide {
  position: absolute;
  width: 340px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out, z-index 0.5s ease-in-out;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

.showcase-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
  cursor: pointer;
  transition: all 0.3s;
}

.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  z-index: 10;
  transition: all var(--transition-fast);
}

.carousel-nav-btn:hover {
  background: var(--color-surface-2);
  transform: translateY(-50%) scale(1.05);
  box-shadow: var(--shadow-md);
}

.carousel-nav-btn.prev-btn {
  left: -20px;
}

.carousel-nav-btn.next-btn {
  right: -20px;
}

@media (max-width: 900px) {
  .carousel-nav-btn.prev-btn {
    left: var(--space-2);
  }

  .carousel-nav-btn.next-btn {
    right: var(--space-2);
  }
}

@media (max-width: 768px) {
  .showcase-carousel-wrapper {
    height: 385px;
  }

  .showcase-slide {
    width: 250px;
  }
}

/* Advertise-Vorschau (aus lp/advertise.php extrahiert) */
.enterprise-layout-grid {
      display: grid;
      grid-template-columns: 1.2fr 1fr;
      gap: var(--space-8);
      align-items: start;
      max-width: 1200px;
      margin: 0 auto;
    }

    @media (max-width: 992px) {
      .enterprise-layout-grid {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 768px) {
      .advertise-main {
        padding: var(--space-6) 0 !important;
      }

      .enterprise-layout-grid {
        gap: var(--space-4);
        overflow-x: hidden;
      }

      /* Verhindert, dass Grid-Elemente breiter als der Bildschirm werden */
      .enterprise-layout-grid>div {
        min-width: 0;
        max-width: 100%;
      }

      .preview-panel-card {
        position: static;
        padding: var(--space-4);
        max-width: 100%;
      }

      .preview-container-job-card {
        max-width: 100%;
        height: 300px;
      }

      .hero-carousel-wrapper {
        max-width: 100% !important;
        height: auto;
        aspect-ratio: 16 / 9;
      }

      .footer-ad-wrapper {
        max-width: 100% !important;
        height: auto;
        aspect-ratio: 16 / 4;
      }
    }

    .preview-panel-card {
      position: sticky;
      top: var(--space-6);
      background: var(--color-surface);
      padding: var(--space-6);
      border-radius: var(--radius-xl);
      border: 1.5px solid var(--color-border);
      box-shadow: var(--shadow-sm);
    }

    .preview-container-job-card {
      width: 100%;
      max-width: 320px;
      height: 340px;
      border: 1.5px solid var(--color-border);
      border-radius: var(--radius-xl);
      background: var(--color-surface);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      position: relative;
    }
