/**
 * @file
 * Frontpage Modular Component Styles for Adler-Apotheke (adlapo_b5).
 * Covers all 6 homepage modules: Slider, Opening, Services, Offers, News, Jobs.
 * WCAG 2.1 AA / BFSG compliant.
 */

/* ==========================================================================
   Modul 1: Hero-Slider (WCAG 2.2.2)
   ========================================================================== */
.adl-front-slider-section {
  position: relative;
  margin-bottom: 2rem;
}

.adl-slider {
  position: relative;
  border-radius: var(--adl-radius-lg);
  overflow: hidden;
  box-shadow: var(--adl-shadow-md);
  background-color: #000000;
}

.adl-slider__media-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  min-height: 280px;
  max-height: 520px;
  overflow: hidden;
  background-color: #212529;
}

.adl-slider__media-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.adl-slider .carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 3rem 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
  text-align: left;
}

.adl-slider__title {
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.adl-slider__desc {
  color: #f8f9fa;
  font-size: 1.05rem;
  margin-bottom: 0;
  max-width: 800px;
}

/* WCAG 2.2.2 Pause/Play Controller Button */
.adl-carousel-controls-top {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

.adl-carousel-pause-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(33, 37, 41, 0.8);
  color: #ffffff;
  border: 2px solid #ffffff;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  backdrop-filter: blur(4px);
}

.adl-carousel-pause-btn:hover,
.adl-carousel-pause-btn:focus-visible {
  background-color: var(--adl-purple);
  border-color: #ffffff;
  transform: scale(1.08);
  outline: 3px solid var(--adl-purple);
  outline-offset: 2px;
}

.adl-carousel-pause-btn--paused {
  background-color: var(--adl-purple);
}

.adl-carousel-pause-icon {
  font-size: 1.35rem;
  line-height: 1;
}

/* Indicators */
.adl-slider .carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 5px;
  background-color: #ffffff;
  opacity: 0.6;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.adl-slider .carousel-indicators button.active {
  opacity: 1;
  background-color: var(--adl-purple);
  border-color: #ffffff;
  transform: scale(1.25);
}

/* Mobile Slider Adjustments */
@media (max-width: 767.98px) {
  .adl-slider__media-wrapper {
    aspect-ratio: 16 / 9;
    min-height: 200px;
  }
  .adl-slider .carousel-caption {
    padding: 1.25rem 1rem;
  }
  .adl-slider__title {
    font-size: 1.25rem;
  }
}

/* ==========================================================================
   Modul 2: Öffnungszeiten Card (.adl-opening-card)
   ========================================================================== */
.adl-opening-card {
  border-radius: var(--adl-radius-lg);
  box-shadow: var(--adl-shadow-sm);
  border: 1px solid var(--adl-border-subtle) !important;
  background-color: #ffffff;
  overflow: hidden;
}

.adl-opening-card__icon {
  font-size: 1.35rem;
}

.adl-opening-card__title {
  color: var(--adl-purple);
  font-weight: 700;
}

.adl-opening-card__table-wrapper .table {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.adl-opening-card__table-wrapper .office-hours-status {
  display: none; /* Replaced by our top-bar & card header live badges */
}

.adl-opening-card__table-wrapper .office-hours__item-current {
  background-color: var(--adl-purple-light) !important;
  font-weight: 700;
  border-left: 4px solid var(--adl-purple);
}

.adl-opening-card__table-wrapper td {
  padding: 0.65rem 0.85rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--adl-border-subtle);
}

.adl-opening-card__table-wrapper .office-hours__item-label {
  width: 38%;
  color: var(--adl-text-main);
  font-weight: 600;
}

.adl-opening-card__table-wrapper .office-hours__item-slots {
  color: var(--adl-purple);
  font-weight: 600;
  white-space: nowrap;
}

.adl-opening-card__table-wrapper .office-hours__item-comments {
  font-size: 0.85rem;
  color: var(--adl-text-muted);
}

/* ==========================================================================
   Modul 3: Zufällige Leistungen (.adl-service-card)
   ========================================================================== */
.adl-front-services {
  position: relative;
}

.adl-service-card {
  background-color: #ffffff;
  border-radius: var(--adl-radius-lg);
  border: 1px solid var(--adl-border-color);
  box-shadow: var(--adl-shadow-sm);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.adl-service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--adl-shadow-md);
  border-color: var(--adl-purple);
}

.adl-service-card__image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--adl-purple-light);
}

.adl-service-card__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.adl-service-card:hover .adl-service-card__image-wrapper img {
  transform: scale(1.04);
}

.adl-service-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--adl-purple);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.adl-service-card__title a {
  color: inherit;
  text-decoration: none;
}

.adl-service-card__title a:hover,
.adl-service-card__title a:focus {
  color: var(--adl-purple-hover);
  text-decoration: underline;
}

.adl-service-card__teaser {
  color: var(--adl-text-main);
  font-size: 0.925rem;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.adl-service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--adl-purple);
  text-decoration: none;
  transition: gap 0.15s ease, color 0.15s ease;
}

.adl-service-card__link:hover,
.adl-service-card__link:focus {
  color: var(--adl-purple-hover);
  gap: 0.65rem;
  text-decoration: underline;
}

/* ==========================================================================
   Modul 4: Monatsangebote (.node--type-mdc-offer)
   ========================================================================== */
.adl-front-offers {
  position: relative;
}

.node--type-mdc-offer.node--view-mode-teaser {
  background-color: #ffffff;
  border-radius: var(--adl-radius-lg);
  border: 1px solid var(--adl-border-color);
  box-shadow: var(--adl-shadow-sm);
  padding: 1.5rem;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.node--type-mdc-offer.node--view-mode-teaser:hover {
  transform: translateY(-3px);
  box-shadow: var(--adl-shadow-md);
  border-color: var(--adl-red);
}

.node--type-mdc-offer.node--view-mode-teaser h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.node--type-mdc-offer.node--view-mode-teaser h2 a {
  color: var(--adl-text-main);
  text-decoration: none;
}

.node--type-mdc-offer.node--view-mode-teaser h2 a:hover {
  color: var(--adl-purple);
  text-decoration: underline;
}

.node--type-mdc-offer .field--name-field-offer-price .field__item {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--adl-red);
  letter-spacing: -0.5px;
}

.node--type-mdc-offer .field--name-field-offer-price .field__label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--adl-text-muted);
}

.node--type-mdc-offer .field--name-field-pzn {
  font-size: 0.85rem;
  color: var(--adl-text-muted);
}

/* ==========================================================================
   Modul 5: News & Gesundheitstipps (.adl-front-news)
   ========================================================================== */
.adl-front-news .views-row {
  margin-bottom: 1.5rem;
}

.adl-front-news article {
  background-color: #ffffff;
  border-radius: var(--adl-radius-md);
  border: 1px solid var(--adl-border-subtle);
  padding: 1.25rem;
  box-shadow: var(--adl-shadow-sm);
  transition: all 0.2s ease;
}

.adl-front-news article:hover {
  border-color: var(--adl-purple);
  box-shadow: var(--adl-shadow-md);
}

.adl-front-news article h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.adl-front-news article h2 a {
  color: var(--adl-purple);
  text-decoration: none;
}

.adl-front-news article h2 a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Modul 6: Karriere-Highlight-Banner (.adl-jobs-banner)
   ========================================================================== */
.adl-front-jobs {
  position: relative;
}

.adl-jobs-banner {
  background: linear-gradient(135deg, rgba(112, 0, 110, 0.05) 0%, rgba(69, 125, 0, 0.05) 100%);
  border: 2px solid var(--adl-purple);
  border-radius: var(--adl-radius-lg);
  padding: 2.25rem;
  position: relative;
  box-shadow: var(--adl-shadow-sm);
  overflow: hidden;
}

.adl-jobs-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background-color: var(--adl-purple);
}

.adl-jobs-banner__title {
  color: var(--adl-purple);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.adl-jobs-banner__title a {
  color: inherit;
  text-decoration: none;
}

.adl-jobs-banner__title a:hover,
.adl-jobs-banner__title a:focus {
  text-decoration: underline;
}

.adl-jobs-banner__teaser {
  font-size: 1.05rem;
  color: var(--adl-text-main);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.adl-jobs-banner__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.adl-jobs-banner__media-wrapper {
  border-radius: var(--adl-radius-md);
  overflow: hidden;
  box-shadow: var(--adl-shadow-md);
  aspect-ratio: 4 / 3;
  background-color: var(--adl-purple-light);
}

.adl-jobs-banner__media-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.adl-jobs-banner__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--adl-purple-light);
  color: var(--adl-purple);
}

.adl-jobs-banner__icon {
  font-size: 4rem;
  opacity: 0.6;
}

/* Mobile Adjustments for Jobs Banner */
@media (max-width: 991.98px) {
  .adl-jobs-banner {
    padding: 1.5rem 1.25rem;
  }
  .adl-jobs-banner__title {
    font-size: 1.25rem;
  }
  .adl-jobs-banner__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .adl-jobs-banner__actions .btn {
    width: 100%;
    text-align: center;
  }
}
