/* Header-Bereich */
.header-logos-bar {
  background-color: #fff;
  border-bottom: 1px solid #eaeaea;
  padding: 0.3rem 0;

  @media (max-width: 768px) {
    .container .d-flex {
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      flex-wrap: nowrap; /* Verhindert ungewolltes Umbrechen */
    }

    a.px-3 img {
      height: 45px; /* Noch etwas kleiner für bessere mobile Darstellung */
    }

    /* Container für Social Media und Language */
    .d-flex.align-items-center.gap-4 {
      flex: 0 0 auto;
      margin-left: auto;
      gap: 0.25rem !important;
    }
  }
}

/* Einheitliche Größen für die Logos */
.header-logos-bar img {
  transition: opacity 0.3s ease;
  opacity: 0.9;
}

.header-logos-bar img:hover {
  opacity: 1;
}

/* Hauptnavigation */
.navbar {
  background-color: #f8f9fa;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.navbar .nav-link {
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  padding: 1rem 1.5rem !important;
  color: #343a40;
}

/* Aktiver Nav-Link: keine eigene Farbe */
.navbar .nav-link.active {
  color: #343a40;
}

/* Unterstrichen-Effekt für Navigation */
.navbar .nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: #7098B3;
  transition: all 0.3s ease;
}

.navbar .nav-link:hover::after {
  width: 80%;
  left: 10%;
}

/* Hero Section - Überarbeitet für vollständige Anzeige */
.hero-section {
  background-image: url('../img/cover.jpg');
  background-size: cover; /* Ändert sich von cover zu contain */
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 150px);
  display: flex;
  align-items: center;
  justify-content: center;
  
  @media (max-width: 768px) {
    min-height: calc(100vh - 120px);
    padding: 2rem 1rem;
    background-position: center;
    text-align: center;
  }

  @media (max-width: 576px) {
    background-size: contain; /* Ändert sich von cover zu contain */
    padding: 1rem;
    background-attachment: scroll;
    /* ensure we show the full image */
    


  }
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(1,99,238,0.1) 0%, rgba(255,255,255,0.2) 100%);
  z-index: 1;
}

.hero-section h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  
  @media (max-width: 768px) {
    font-size: 2.5rem;
  }
  
  @media (max-width: 576px) {
    font-size: 2rem;
  }
}

.hero-logo {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 5px;
  border-radius: 5px;
  max-height: 160px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

/* Card Styles */
.card-img-wrapper {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;

  @media (max-width: 576px) {
    height: 150px;
  }
}

.card-img-top {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.card-body {
  height: 150px;
  
  @media (max-width: 576px) {
    height: auto;
    min-height: 120px;
  }
}

.card-title {
  font-size: 1rem;
  line-height: 1.4;
}

/* News Cards */
.card-news {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border: none;
  box-shadow: 0 4px 6px rgba(0,0,0,0.04);
}

.card-news .card-img-top {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.card-news .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-news .card-title {
  font-size: 1.25rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.card-news .card-text {
  flex-grow: 1;
}

.card-news .small {
  color: #6c757d;
}

/* Hover Effects */
.card-news.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Team Member Cards */
.team-member-card {
  max-width: 250px;
  height: auto;
  border-radius: 0.25rem 0.25rem 0 0;
}

.team-member-card .card-img-top {
  margin-top: 1rem;
  max-height: 200px;
}

.team-member-card .card-body {
  height: 120px;
}

.team-member-card .card-title {
  font-size: 0.9rem;
}

/* PPZ Image Styles */
.ppz-image-wrapper {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.ppz-image {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* Toast Styling */
.custom-toast {
  background-color: #fff;
  border: none;
  border-radius: 6px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  max-width: 320px;
  width: 100%;
  margin: 1rem;
  font-size: 0.9rem;
}

.custom-toast .toast-header {
  background-color: #fff;
  color: #E69535;
  padding: 0.75rem 0.75rem 0.25rem 0.75rem;
}

.custom-toast .toast-body {
  color: #343a40;
  padding: 0.25rem 0.75rem 0.75rem 0.75rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

.custom-toast .custom-image {
  max-width: 200px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.custom-toast .btn-close {
  padding: 0.5rem;
  font-size: 0.8rem;
}

.custom-toast .btn-primary {
  background-color: #5AA6DB;
  border-color: #5AA6DB;
  padding: 0.375rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Header and Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 1020;
  background-color: #fff;
}

/* Social Media Icons */
.social-icon {
  display: flex;
  align-items: center;
  padding: 0.25rem !important;
}

.social-icon img {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-icon:hover img {
  transform: scale(1.1);
  opacity: 1;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

/* Language Switcher */
.language-switcher {
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
}

.lang-btn {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.7;
  display: flex;
  align-items: center;
}

.lang-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.lang-btn.active {
  opacity: 1;
}

.lang-btn.active::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
}

/* Footer */
footer {
  background-color: #f8f9fa;
  border-top-color: #eaeaea;
}

footer a:hover {
  color: #7098B3 !important;
  text-decoration: none;
}

footer h5 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* Links */
.more-info-link,
.ppz-info-link {
  color: black;
  font-size: 1rem;
  text-decoration: none;
}

.ppz-info-link {
  font-weight: 600;
}

/* Article Styles */
article {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

article:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
}

article img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
  .navbar .nav-link {
    text-align: center;
    padding: 0.75rem !important;
  }
  
  .navbar .nav-link::after {
    display: none;
  }

  .navbar {
    padding: 0.5rem 0;
  }

  .navbar-toggler {
    margin-right: 0.5rem;
  }

  .navbar-collapse {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0.5rem;
  }

  .language-switcher {
    margin: 0.5rem 0;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  [style*="text-align: justify"] {
    text-align: left !important;
  }
}

@media (max-width: 576px) {

  .toast-container {
    padding: 0.75rem !important;
  }

  .custom-toast {
    margin: 0;
    max-width: 280px;
  }

  .social-icon {
    padding: 0.15rem !important;
  }

  .social-icon img {
    height: 28px;
  }

  .d-flex.align-items-center.gap-4 {
    flex-wrap: nowrap;
    gap: 0.5rem !important;
  }

  .language-switcher {
    margin-left: 0.25rem;
  }

  .lang-btn {
    padding: 0.15rem;
  }

  .lang-btn img {
    width: 20px;
    height: 20px;
  }
}