/* res/css/style.css */


*{margin: 0; padding: 0; box-sizing: border-box;}
body{font-family: 'Open Sans', sans-serif; font-optical-sizing: auto; font-style: normal; background-color: #f5f5f5;}


/* main{
    padding: 4rem 10rem;
    box-sizing: border-box;
} */

.ds-nda-main-wrap{ 
    position: relative; 
    /* padding: 4rem 10rem; */
}

/* [type=button], [type=submit], button{
    background: #1f1a5a !important; color: #fff;
}

[type=button]:hover, [type=submit]:hover, button:hover{
    background: #272158 !important; color: #fff;
} */

.nda-company-wrapper {
  box-sizing: border-box;
  padding: 0 0 20px 0;
}
/* Grid-Container */
.company-grid {
    position: relative;
    width: 100%;
    max-width: 1340px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    box-sizing: border-box;
}

.company-grid a{ color: #272158 !important; }
.company-grid a:hover{ color: #1f1a5a !important; opacity: .8;}

/* Tiles & Fallback */
.company-tile {
    max-width: 320px;
    height: 320px;
    background-color: #f9f9f9;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 85%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.company-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


.company-name {
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
}
  




/* Company Profile Page */

header {
    padding: 16px;
    background-color: #ffffff;
    border-bottom: 2px solid #272158;
}

header h1 {
    margin: 0;
    font-size: 24px;
    color: #272158;
}

.main-container {
    max-width: 1200px;
    margin: 24px auto;
    gap: 24px;
    font-size: 14px;
    line-height: 1.4em;
}

.main-container h1, 
.main-container h2, 
.main-container h3, 
.main-container h4, 
.main-container h5{ 
    line-height: 1.3em; 
}

.main-container aside ul li {
    text-indent: 0;
    margin-left: 10px;
    margin-bottom: 12px;
    font-size: 14px;
}

.profile-content {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.profile-content section{ display: flex; flex-direction: column; flex-wrap: wrap; margin-bottom: 60px; line-height: 1.4em; align-items: flex-start;}
.profile-content h4{ width: 100%; font-size: 1.4em; margin-bottom: 26px;}

.profile-content ul{
    position: relative;
    /* max-width: 380px; */
    width: 100%;
}
.profile-content .pdf-icon {
    font-size: 1.4em;       
    margin-left: 6px;
    vertical-align: middle;
}

.profile-content ul li {
    margin: 10px 0 10px 2em;
    font-size: 14px;
}

.profile-content ul li a{
    color: #272158 !important;
    text-decoration: none;
}

.profile-content ul li a:hover{
    color: #27215888 !important;
}

.profile-content .osm-wrapper{
    position: relative; width: 100%;
}


.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.profile-header .text {
    flex: 1;
}

.profile-header h2 {
    margin: 0;
    font-size: 28px;
    color: #272158;
}

.profile-header h3 {
    margin: 4px 0 0;
    font-size: 18px;
    color: #272158;
    font-weight: normal;
}

.profile-header .logo {
    width: 120px;
    height: 120px;
    background-repeat: no-repeat;
    background-size: 85%;
    background-position: center;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* Merkliste-Button */
.profile-controls {
    margin: 24px 0;
}

.btn-merkliste {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #272158;
    color:#fff !important;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.btn-merkliste i {
    font-size: 20px;
    line-height: 1;
}

.btn-merkliste:hover {
    background: #1f1a5a;
}


.divider {
    border-top: 2px solid #2b2b71;
    margin: 24px 0;
}

.stats {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-item .icon {
    font-size: 52px !important;
    color: #2b2b71;
    margin-bottom: 8px;
}

.stat-item .label {
    font-weight: bold;
    margin-bottom: 4px;
}

.aside {
    background-color: #2b2b71;
    color: #ffffff;
    padding: 24px;
    border-radius: 8px;
    height: fit-content;
}

.aside-section {
    margin: 0 0 60px 0;
}

.aside-section h4 {
    margin: 20px 0 12px;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aside-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aside-section ul li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 16px;
}

.aside-section ul li:before {
    content: '\203A';
    position: absolute;
    left: 0;
    color: #ffffff;
}

.aside-section p {
    margin: 0 0 12px;
    font-size: 14px;
}

/* Social Media Icons in Aside */
.aside-section.aside-socialmedia ul {
    list-style: none;
    display: flex;
    gap: 16px;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}
.aside-section.aside-socialmedia ul li {
    display: flex;
    padding: 0;
    margin: 0;
}
.aside-section.aside-socialmedia  ul li:before{
    content: '';
    display: none;
}
.aside-section.aside-socialmedia ul li i {
    font-size: 50px;
    color: rgba(255, 255, 255, .5);
    line-height: 1;
    transition: all .2s ease;
    max-width: 70px;
    padding: 10px;
    box-sizing: border-box;
}

.aside-section.aside-socialmedia ul li i:hover{
    color: rgba(255, 255, 255, 1);
}


/* Galerie-Thumbnails */
.company-gallery .gallery-thumbs img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  cursor: pointer;
  transition: all .2s ease;
}

.company-gallery .gallery-thumbs img:hover {
    opacity: .4;
}

/* Lightbox Overlay */
#lightbox-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  z-index: 9999;
}
#lightbox-content {
    position: relative;
    width: 65vw;
    max-width: 1140px;
    height: 85vh;
    max-height: 665px;
    border: 6px solid #fff;
    box-sizing: border-box;
    background: #fff;
    margin-top: 6em;
}
#lightbox-img {
    display: block;
    object-fit: cover;
    width: 100%;
    height: -webkit-fill-available;
    max-height: 100%;
}

/* Lightbox interactions */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    width: 4em;  
    height: 9em;  
    transform: translateY(-50%);
    background: #ffffff0d;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .4s ease;
}

.lightbox-arrow:hover, #lightbox-next:hover, #lightbox-prev:hover{
    background: #0000002b;
}

.lightbox-arrow::before {
    content: '';
    display: block;
    width: 2em;
    height: 2em;
    border: 1px solid #fff;
    background: #ffffff;
}

#lightbox-prev { left: -5em; }
#lightbox-next { right: -5em; }

#lightbox-prev::before {
    clip-path: polygon(70% 0%, 30% 50%, 70% 100%, 100% 100%, 60% 50%, 100% 0%);
    margin-right: 10px; 
}
#lightbox-next::before {
    clip-path: polygon(30% 0%, 70% 50%, 30% 100%, 0% 100%, 40% 50%, 0% 0%);
    margin-left: 10px;
}


#lightbox-close {
    position: absolute;
    top: -16px;
    right: -16px;
    background: #fff;
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    line-height: 1.2em;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 50px;
    transition: none !important;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s ease;
}

#lightbox-close span{
    color: #000;
    font-size: 34px;
    margin-left: 6px;
    margin-top: -2px;
    line-height: 1.5em;
    transform: rotate(45deg);
    display: inline-flex;
}

#lightbox-close:hover span{ color: #fff; }
#lightbox-close:hover{ background: #2b2b71; }

.hidden {
    visibility: hidden;
}

.contact {
    display: flex;
    justify-content: space-between;
}

.company_contact_person{
    width: 100%;
    min-width: 164px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    line-height: 1.4em;
    border: 1px solid #dddddd;
    border-radius: 8px;
    padding: 20px;
}

.company_contact_person a{
    color: #fff;
    transition: all .2s ease;
    background: rgba(43, 43, 113, .5);
    padding: 10px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    font-size: 18px; 
    line-height: 1.1em;
    border-radius: 100px;
}

.company_contact_person a:hover{
    background: rgba(43, 43, 113, 1);
}

.contact img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.profile-details p {
    margin: 8px 0;
}

.profile-details strong {
    display: inline-block;
    width: 120px;
}
    
/* Map Stuff */
.leaflet-control-attribution a[href^="https://leafletjs.com"],
.leaflet-control-attribution .leaflet-attribution-flag {
  display: none !important;
}



/* Profession List */
.nda-professions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: none !important;
  flex-direction: column;
  /* display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); */
  gap: 16px;
}

.nda-professions-list li{
    width: 100%;
}

.nda-category-list{list-style: none;}

.nda-professions-search{
    width: 100% !important;
    padding: 8px 12px !important;
    margin-bottom: 50px !important;
    font-size: 22px !important;
    box-sizing: border-box !important;
}

.nda-category-item {
  margin: 24px 0 0 0;
}

ul li.nda-category-item h4.nda-category-heading {
  display: block;
  padding: 20px 24px;
  background-color: #f0f0f0 !important;
  color: #2b2b71 !important;
  text-decoration: none;
  border-radius: 4px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3em;
  transition: background-color 0.2s ease, color 0.2s ease;
  border: 1px solid #2b2b71;
  margin: 0 !important;
  cursor: pointer;
}

ul li.nda-category-item h4.nda-category-heading span{
  display: none;
}

ul li.nda-category-item h4.nda-category-heading span.open {
  display: inline-block;
}

ul li.nda-category-item h4.nda-category-heading.active {
  border-radius: 4px 4px 0px 0px;
  border: 1px solid #2b2b71;
  background: #fff !important;
}

.nda-category-item .nda-category-heading.active + .nda-profession-wrapper {
  display: block;
}

.nda-category-item .nda-category-heading.active span.open {
  display: none;
}

.nda-category-item .nda-category-heading.active span.close {
  display: inline-block;
}

.nda-profession-wrapper{
  display: none;
  box-sizing: border-box;
  position: relative;
  padding: 12px 24px;
  background: #fff;
  border: 1px solid #2b2b71;
}

.nda-profession-link {
  display: block;
  padding: 10px 12px;
  background-color: #f0f0f0 !important;
  color: #2b2b71 !important;
  text-decoration: none;
  border-radius: 4px;
  font-size: 22px;
  line-height: 1.3em;
  transition: background-color 0.2s ease, color 0.2s ease;
  margin: 20px 0 0 0;
}  

.nda-professions-list.active {
  display: flex !important;
}

.nda-professions-list .nda-profession-link {
  background-color: #f0f0f0 !important;
  margin: 0 !important;
}

/* .nda-profession-link:hover,
.nda-profession-link:focus {
  background-color: #2b2b71 !important;
  color: #fff !important;
} */

.nda-profession-link.active {
  background-color: #2b2b71;
  color: #fff;
  font-weight: bold;
}

.nda-outline-icon {
  height: .8em;
  width: .8em;
  line-height: .8em;
  aspect-ratio: auto;
  fill: #2b2b71;
}

.nda-accordeon-icon {
  height: 20px;
  width: 28px;
  aspect-ratio: auto;
  fill: #2b2b71;
}

.nda-profession-link h4 a b{
  color: #2b2b71 !important;
}

.nda-profession-link p{
  font-size: .8em;
  line-height: 1em;
  color: #272158;
}

/* .nda-profession-link:hover p,
.nda-profession-link:focus p{
  color: #fff;
} */

/* .nda-profession-link:hover h4 a b, 
.nda-profession-link:focus h4 a b, 
.nda-profession-link:hover a.nda-outline-link, 
.nda-profession-link:focus a.nda-outline-link{
  color: #fff !important;
} */

/* .nda-profession-link:hover .nda-outline-icon,
.nda-profession-link:focus .nda-outline-icon{
  fill: #fff;
} */

.nda-profession-link h4:hover a b, 
.nda-profession-link a.nda-outline-link:hover {
  color: #2b2b71;
  opacity: .6;
}

.nda-profession-link a.nda-outline-link{
  font-size: .8em;
  color: #2b2b71;
  font-weight: 500;
}

/* Filter Panel */
.nda-filter-panel {
    background: #2b2b71;
    padding: 16px;
    border-radius: 8px;
    color: #fff;
}
.nda-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.nda-filter-group {
    flex: 1;
    min-width: 200px;
    max-width: calc(50% - 2%);
}
.nda-filter-group label {
    display: block;
    margin-bottom: 4px;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
}
.nda-filter-select {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    box-sizing: border-box;
}
/* Button */
.nda-filter-button {
    background: #C5C1EB;
    color: #2b2b71;
    border: 1px solid #2b2b71;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.nda-filter-button:hover, .nda-filter-button:focus{
    background: #2b2b71;
    color: #fff;
    border: 1px solid #fff;
}

.nda-filter-checkbox-label {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}
.nda-filter-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
}
.nda-filter-checkbox-bg {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 20px;
    transition: background-color .2s;
}
.nda-filter-checkbox-handle {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
}

.nda-filter-checkbox:checked + .nda-filter-checkbox-bg {
    background-color: #4caf50;
}
.nda-filter-checkbox:checked + .nda-filter-checkbox-bg + .nda-filter-checkbox-handle {
    transform: translateX(20px);
}


@media (max-width: 768px) {
    .nda-filter-row {
        flex-direction: column;
    }
    .nda-filter-row .nda-filter-group {
        width: 100% !important;
        min-width: 100%;
        margin-bottom: 12px;
    }
}



/* Search Module */
.nda-company-search-wrapper {
    position: relative;
    max-width: 600px;
    min-width: 350px;
    margin: 0 20px;
}
.nda-company-search-input {
    width: 100%;
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
.nda-company-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: none;
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}
.nda-company-search-results.has-results {
    border: 1px solid #ccc; 
    border-radius: 4px;
    padding: 8px 0;
    margin-top: 10px;
}

/* Search-Item */
.nda-company-search-item {
    display: flex;
    align-items: center;
    padding: 8px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}
.nda-company-search-item:hover {
    color: #272158 !important;
    background-color: #27215861;
}
.nda-company-search-item:last-child {
    border-bottom: none;
}
.nda-company-search-item-logo {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
}
.nda-company-search-item-text {
    display: flex;
    flex-direction: column;
}
.nda-company-search-item-name {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 2px;
}
.nda-company-search-item-address {
    font-size: 12px;
    color: #666;
}

/* Keine Ergebnisse */
.nda-search-noresults {
    padding: 8px;
    color: #666;
    font-size: 14px;
}

.nda-noselect {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}




/* Einspaltiges Layout auf Mobil (bis 768px) */
@media (max-width: 768px) {
    .nda-company-wrapper{padding: 0px 25px 100px 25px;}
    main{ padding: 4rem 3rem; }
    .main-container {
        flex-direction: column;
        overflow: hidden;
        width: 100% !important;
        min-width: 100vw;
    }
    .profile-content,
    .aside {
        width: 100% !important;
        margin: 0 0 24px 0;
    }   

    #lightbox-content {
        max-width: 768px;
        height: 55vh;
    }
    .nda-filter-row{gap: 0px;}
    .company-tile{ max-width: 100%; }

    .nda-profession-wrapper{padding: 12px;}
    .nda-category-item h4.nda-category-heading{font-size: 16px !important; text-wrap: wrap; text-wrap-mode: wrap; word-wrap: break-word;}
    .nda-accordeon-icon {height: 12px; width: 12px;}
    .nda-profession-link h4{ font-size: 16px; text-wrap: wrap; text-wrap-mode: wrap; word-wrap: break-word;}
    .nda-profession-link p{ text-wrap: wrap; text-wrap-mode: wrap; word-wrap: break-word;}
}

@media (max-width: 320px) {
    main{ max-width: 320px; padding: 4rem 1rem; }
    .company-tile{ max-width: 100%; }

    .stats{ flex-direction: column; }
    .stat-item { text-align: left; display: flex; flex-direction: row; align-items: center; gap: 20px; }
    .stats-label-wrap{ display: flex; flex-direction: column; width: 100%; }
    .company_contact_person{ width: 100%; }
    .company-gallery .gallery-thumbs{ display: flex; flex-direction: column; flex-wrap: wrap; }
    .company-gallery .gallery-thumbs img{ width: 275px; }
}
