/**
 * Fullwidth Parallax Section Styles
 */

.fullwidth-parallax {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-origin: border-box;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  /* Override global section padding from base.css */
  padding: 0 !important;
}

/* When fullwidth-parallax also has paragraph-section-wrapper class, adjust positioning */
.fullwidth-parallax.paragraph-section-wrapper,
.fullwidth-parallax.paragraph--type--fullwidth_parallax {
  /* Already has full width from paragraph-section-wrapper, no need for margin trick */
  margin-left: -50vw;
  margin-right: -50vw;
  /* Remove any padding to prevent background showing in padding area */
  padding: 0 !important;
  /* Ensure background covers entire element including any inherited padding */
  background-origin: border-box;
}

/* Dunkles Overlay für bessere Lesbarkeit */
.parallax-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* Container für den Inhalt */
.fullwidth-parallax .container {
  position: relative;
  z-index: 2;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Container max-width und padding kommen von paragraph-spacing.css */
}

/* Header Bereich */
.parallax-header {
  text-align: center;
  margin-top: 15px;
  margin-bottom: 15px;
}

.parallax-headline {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.parallax-subline {
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  color: #ffffff !important;
  line-height: 1.5;
  max-width: 650px;
  margin: 0 auto;
}

/* Alle Elemente innerhalb der parallax-subline müssen weiß sein */
.parallax-subline *,
.parallax-subline p,
.parallax-subline span,
.parallax-subline div {
  color: #ffffff !important;
}

/* Grid Layout für Items - Optimiert für maximal 4 Items */
.parallax-items-grid,
.field--name-field-parallax-items,
.field--name-field-parallax-items > .field__items {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  max-width: 1400px;
  gap: 25px;
  margin: 15px auto 15px;
  justify-items: stretch;
  padding: 0 20px;
}

/* Spezifische Layouts basierend auf Anzahl der Items */
.parallax-items--1 .parallax-items-grid {
  grid-template-columns: 1fr !important;
  max-width: 400px;
}

.parallax-items--2 .parallax-items-grid {
  grid-template-columns: repeat(2, 1fr) !important;
  max-width: 800px;
}

.parallax-items--3 .parallax-items-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  max-width: 1000px;
}

/* Responsive Grid Layouts */
@media (min-width: 768px) and (max-width: 1199px) {
  .parallax-items-grid,
  .field--name-field-parallax-items,
  .field--name-field-parallax-items > .field__items {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 767px) {
  .parallax-items-grid,
  .field--name-field-parallax-items,
  .field--name-field-parallax-items > .field__items {
    grid-template-columns: 1fr !important;
    gap: 20px;
    padding: 0 15px;
  }
}

.parallax-items-grid > *,
.field--name-field-parallax-items > .field__items > * {
  display: block;
  width: 100%;
  max-width: none;
}

/* Parallax Item Styles */
.parallax-item {
  text-align: center;
  padding: 15px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  color: #ffffff;
}

/* Alle Textelemente im Parallax Item sollen weiß sein */
.parallax-item *,
.parallax-item h1,
.parallax-item h2,
.parallax-item h3,
.parallax-item h4,
.parallax-item h5,
.parallax-item h6,
.parallax-item p,
.parallax-item span,
.parallax-item div {
  color: #ffffff !important;
}

.parallax-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.parallax-item__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Icon Container - Optimiert für SVGs */
.parallax-item__icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-primary, #005D92);
  border-radius: 50%;
  padding: 18px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.parallax-item__icon img,
.parallax-item__icon svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* SVG als <img> wird weiß gefiltert - mit höchster Priorität */
.fullwidth-parallax .parallax-item__icon img[src$=".svg"],
.fullwidth-parallax .parallax-item__icon img.img-fluid,
.parallax-item .parallax-item__icon img {
  filter: brightness(0) invert(1) !important;
}

/* Fallback für alle Image-Icons */
.fullwidth-parallax .parallax-item__icon img {
  filter: brightness(0) invert(1) !important;
}

/* Inline-SVG Styles falls vorhanden */
.parallax-item__icon svg {
  fill: #ffffff;
}

.parallax-item__icon svg path,
.parallax-item__icon svg circle,
.parallax-item__icon svg rect,
.parallax-item__icon svg polygon {
  fill: currentColor;
  color: #ffffff;
}

.parallax-item:hover .parallax-item__icon {
  transform: scale(1.1);
  border-color: var(--color-primary-light, #0077B5);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 25px rgba(0, 93, 146, 0.5);
}

/* Titel mit gelber Unterstreichung */
.parallax-item__title {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.parallax-item__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: var(--color-primary, #005D92);
}

/* Beschreibung */
.parallax-item__description {
  font-size: clamp(0.85rem, 1.3vw, 0.95rem);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  max-width: 100%;
}

.parallax-item__description p {
  margin: 0;
}

/* Responsive Anpassungen */
@media (max-width: 767px) {
  .fullwidth-parallax {
    background-attachment: scroll;
  }

  .fullwidth-parallax .container {
    /* Padding wird von paragraph-spacing.css gehandhabt */
  }
  
  .parallax-header {
    margin-top: 12px;
    margin-bottom: 12px;
  }
  
  .parallax-items-grid,
  .field--name-field-parallax-items,
  .field--name-field-parallax-items > .field__items {
    gap: 18px;
    margin: 12px auto 12px;
  }

  .parallax-items-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .parallax-item__icon {
    width: 70px;
    height: 70px;
    padding: 16px;
  }
}

/* Print Styles */
@media print {
  .fullwidth-parallax {
    background-attachment: scroll;
    page-break-inside: avoid;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .fullwidth-parallax {
    background-attachment: scroll;
  }

  .parallax-item__icon,
  .parallax-item:hover .parallax-item__icon {
    transform: none;
    transition: none;
  }
}