select.selectpicker {
    padding: 5px 5px 5px 30px !important;
}

@media (max-width: 767px) {
#id-mediathek_allformats_section .modal {
 padding: 0 !important; 
}
}

#id-mediathek_allformats_section .additional::before {
    content: '\f02c';
    display: inline-block;
    font-family: fontAwesome;
    height: auto;
    color: #777;
}

@media (min-width: 1201px) { 
  #id-mediathek_allformats_section .filterbar {
 margin-bottom: 40px; 
}

#id-mediathek_allformats_section .filterbar .thema.span3 .form-group {
  position: relative;
}

#id-mediathek_allformats_section .filterbar .thema.span3 .form-group::before {
  content: "\f02c";
  font-family: fontAwesome;
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
#id-mediathek_allformats_section .filterbar .thema.span3 select {
  padding-left: 20px;
}

#id-mediathek_allformats_section .filterbar .category.span3 .form-group {
  position: relative;
}

#id-mediathek_allformats_section .filterbar .category.span3 .form-group::before {
  content: "\f15b";
  font-family: "FontAwesome";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
#id-mediathek_allformats_section .filterbar .category.span3 select {
  padding-left: 32px;
}

#id-mediathek_allformats_section .filterbar .search.span3 .form-group {
  position: relative;
}

#id-mediathek_allformats_section .filterbar .search.span3 .form-group::before {
  content: "\f002";
  font-family: "FontAwesome";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}

#id-mediathek_allformats_section .filterbar .search.span3 input {
  padding-left: 32px !important;
}

#id-mediathek_allformats_section abbr.thema-tag.sectors {
    align-content: center;
    background-color: #c8c8c8;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    color: #777;
    margin: 0;
    padding: 5px;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
    overflow: hidden;
    height: auto;
  line-height: 120% !important;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}

#id-mediathek_allformats_section .additional {
  font-size: 12px;
  padding-left: 20px;
  padding-right: 20px;
  text-overflow: ellipsis;
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
  gap: 10px;
  padding-bottom: 20px;
}

@media (max-width: 599px) {
  #id-mediathek_allformats_section .additional {
  flex-wrap: wrap;
}
}

#id-mediathek_allformats_section .additional p {
  color: #777777;
  line-height: 140%;
  margin: 0;
  font-size: 12px;
  padding-top: 10px;
}

.single-item-container.hidden {
  display: none !important;
}

@media (min-width: 1000px) {
#id-mediathek_allformats_section .filterbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  width: 100%;
}
}
  
@media (max-width: 999px) {
  #id-mediathek_allformats_section .filterbar .span3 {
   margin-bottom: 20px; 
  } 
}

#id-mediathek_allformats_section .filterbar .span3 {
 width: 100%; 
}

#id-mediathek_allformats_section .filterbar .form-group {
 margin-top: 0;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
  .filterbar .row-fluid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

select.selectpicker.form-control {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  border-radius: 5px;
  border-width: 0px;
  color: rgba(255,255,255,1.0);
  padding-left: 10px;
  padding-right: 5px;
  padding-top: 5px;
  padding-bottom: 5px;
  width: 100%;
}

.media-listing-container {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1399px) {
  .media-listing-container {
    padding-left: 40px;
    padding-right: 40px;
  }
}

@media (max-width: 768px) {
  .media-listing-container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

.media-listing-container .media-listing {
  --bs-gutter-x: 40px;
  --bs-gutter-y: 40px;
  display: flex;
  flex-wrap: wrap;
  margin-left: -20px;
  margin-right: -20px;
  margin-top: 0;
}

.media-listing-container .media-listing > [class*="col-"] {
  padding: 0 20px 40px 20px;
}

.single-item-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mediathek_allformats_box {
  position: relative;
  margin: 0;
  width: 100%;
  border-radius: 20px;
  border: 1px solid #777777;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mediathek_allformats_box .card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-grow: 1;
  text-decoration: none;
}

.mediathek_allformats_box .topic-link {
  display: inline-block;
  font-size: 16px;
  font-weight: 500;
  line-height: 120%;
  padding: 3px 30px;
  border-bottom-right-radius: 20px;
  border-top-left-radius: 18px;
  margin-bottom: 7px;
  font-variant: all-small-caps;
  position: absolute;
  top: 0px;
  left: 0px;
  z-index: 1;
  letter-spacing: 0.1em;
  background-color: #777777;
  color: #ffffff;
  height: 30px;
}

.mediathek_allformats_image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
  display: block;
  border-radius: 19px 19px 0 0 !important;
  margin: 0;
  flex-shrink: 0;
}

.mediathek_allformats_image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
  object-position: center !important;
  display: block;
}

img.onScreen, img {
  transform: none !important;
  transition: none !important;
}

.mediathek_allformats_box .mediathek_allformats_box_text {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.mediathek_allformats_box .heading_a,
h2.heading_a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 20px !important;
  font-style: normal;
  font-weight: 400;
  line-height: 120% !important;
  height: 48px;
  margin: 0 !important;
}

.mediathek_allformats_box .mediathek_allformats_box_text .mediathek_allformats_description {
  color: #222;
  font-size: 16px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 48px;
  margin: 0;
}

.mediathek_allformats_box .mediathek_allformats_box_text .mediathek_allformats_duration {
  color: #777;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
  margin: 0;
  margin-top: auto;
}

button.button.hidden {
  display: none;
}

button.button.loadmore {
  margin: 40px auto;
  display: block;
}

.media-listing a {
  text-decoration: none;
}

/* ===== LEGACY/UNUSED STYLES (kept for compatibility) ===== */
.card-image {
  border-radius: 10px !important;
}

.card-image img {
  width: 100%;
  height: auto;
  transform: translateZ(0);
}

.media-listing .card-content h3 {
  font-size: 1.7em;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  -webkit-hyphenate-limit-before: 3;
  -webkit-hyphenate-limit-after: 4;
  -ms-hyphenate-limit-chars: 10 3 4;
  hyphenate-limit-chars: 10 3 4;
}

.media-listing .card-content {
  width: 100%;
}

.media-listing .content,
.media-listing .content .category-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.news_box {
  position: relative;
}

@media (max-width: 786px) {
  .news_box_section .row {
    margin-right: 0;
    margin-left: 0;
  }
}

@media (min-width: 576px) {
  .col-sm {
    flex: 1 0 0%;
  }
  .col-sm-12 {
    flex: 0 0 auto;
    width: 100%;
  }
}

@media (min-width: 768px) {
  .col-md {
    flex: 1 0 0%;
  }
  .col-md-6 {
    flex: 0 0 auto;
    width: 50%;
  }
  .col-md-12 {
    flex: 0 0 auto;
    width: 100%;
  }
}

@media (min-width: 992px) {
  .col-lg {
    flex: 1 0 0%;
  }
  .col-lg-4 {
    flex: 0 0 auto;
    width: 33.33333333%;
  }
  .col-lg-12 {
    flex: 0 0 auto;
    width: 100%;
  }
}

/* Video Modal */
.video-container {
  align-items: center;
  display: none;
  height: 100vh;
  justify-content: center;
  left: 0;
  position: fixed;
  top: 0;
  width: 100vw;
  background: rgba(0, 0, 0, .75);
  z-index: 1000;
}

.video {
  max-width: 800px;
  width: 100%;
  background: #FFFFFF;
  padding: 40px;
  border-radius: 5px;
  border-radius: 30px;
}

.video iframe {
 transform: none !important;
  border-radius: 0 !important;
}

/* Modal open state */
.modal-open {
  height: 100%;
  overflow: initial;
}

/* Download Modal */
.download.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  display: none;
}

.download-form {
  width: fit-content;
  background: #ffffff;
  padding: 40px;
  position: relative;
  border-radius: 30px;
}

.modal-open {
  height: 100%;
  overflow: initial;
}

/* Search input styling to match selectpicker */
.search .form-control.search-input,
#mediaSearch {
  background-color: #c8c8c8;
  border-radius: 5px !important;
  border-width: 0 !important;
  color: #555555 !important;
  padding: 4px 35px 4px 10px !important; 
  width: 100% !important;
  font-family: inherit !important;
  font-size: 18px !important;
  line-height: 150% !important;
  box-sizing: border-box !important;
  height: auto !important;
}

/* Remove any default input styling */
#mediaSearch {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Placeholder text color */
#mediaSearch::placeholder {
  color: #555555 !important;
  opacity: 1 !important;
}

#mediaSearch::-webkit-input-placeholder {
  color: #555555 !important;
}

#mediaSearch::-moz-placeholder {
  color:#555555 !important;
  opacity: 1 !important;
}

#mediaSearch:-ms-input-placeholder {
  color: #555555 !important;
}

/* Remove white background from form-group */
.search .form-group {
  position: relative !important;
  width: 100% !important;
}

/* Clear button positioning */
.btn-clear-search {
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  padding: 5px !important;
  color: #555555 !important;
  transition: color 0.2s !important;
  z-index: 10 !important;
}

.btn-clear-search:hover {
  color: #fff !important;
}

.btn-clear-search i,
.btn-clear-search .fa {
  font-size: 14px !important;
}

/* Remove any Bootstrap input-group styling that might be interfering */
.search .input-group,
.search .input-group-addon {
  width: 100% !important;
}

#reset-filters {
  font-variant: all-small-caps;
  padding: 8px 0;
  cursor: pointer;
  font-size: 24px;
  line-height: 100%;
  font-weight: 500;
  letter-spacing: 0.03em;
  display: inline-block;
}

@media (max-width: 999px) {
 #reset-filters {
    padding: 0;
  } 
}