/* Layout fixes stay in the child theme so parent updates remain possible. */
.entry-content, .panel-grid-cell, .department-content-wrapper { min-width: 0; }
#content .init-animate { animation: none !important; transform: none !important; opacity: 1 !important; visibility: visible !important; }
.entry-content > div[style*="width"] { max-width: 100%; }
.entry-content .bioservices-fluid-block { width: 100% !important; max-width: 100%; min-width: 0; }
.bioservices-table-scroll {
    width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch; margin-bottom: 24px;
}
.bioservices-table-scroll:focus-visible { outline: 2px solid #0074cc; outline-offset: 3px; }
.bioservices-table-scroll table { min-width: 640px; margin-bottom: 12px !important; }
.entry-content .jumbotron { max-width: 100%; overflow-wrap: anywhere; }
.entry-content .jumbotron h1, .entry-content .jumbotron h2, .entry-content .jumbotron h3, .entry-content .jumbotron h4 { font-size: clamp(20px, 3vw, 28px); }
main#content .col-md-6[style*="left"] { left: 0 !important; }
main#content .image-gallery { display: grid; gap: 20px; max-width: 100%; text-align: center; }
main#content .image-gallery a { display: block; min-width: 0; }
main#content .image-gallery a img { display: block; width: 100%; max-width: 500px; height: auto; margin: 0 auto; transform: none !important; opacity: 1 !important; }
main#content .pdf-buttons { flex-wrap: wrap; }
.activities-nav { display: flex; gap: 16px; overflow-x: auto; padding: 16px 4px 24px; scroll-snap-type: x proximity; }
.activities-nav a { flex: 0 0 130px; text-align: center; scroll-snap-align: start; font-size: 12px; }
.activities-nav img { width: 110px; height: 110px; object-fit: contain; display: block; margin: 0 auto 12px; }
.activities-section { margin: 32px 0 52px; scroll-margin-top: 95px; }
.activities-section h2 { background: linear-gradient(100deg, #0074cc, #329cef); color: #fff; padding: 18px; border-radius: 6px; font-size: 24px; }
.activities-section .description { padding: 8px 0 18px; }
.bioservices-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.bioservices-gallery a { min-width: 0; display: block; }
.bioservices-gallery img { width: 100%; height: auto; max-height: 480px; object-fit: contain; border-radius: 4px; }
.bioservices-services { width: 100%; max-width: 1170px; box-sizing: border-box; padding: 32px 15px 52px; }
.bioservices-services > .row { margin-left: 0; margin-right: 0; }
.bioservices-services .department-title-wrapper { right: auto; left: auto; padding: 0; }
.bioservices-services .department-title button {
    appearance: none; width: 100%; text-align: left; border: 0; border-radius: 0; background: #fff;
    color: #555; padding: 16px 18px; line-height: 1.6; font: inherit; white-space: normal; overflow-wrap: anywhere;
}
.bioservices-services .department-title.active button { color: #0074cc; font-weight: 700; background: #edf7ff; }
.bioservices-services .department-title button:focus-visible { outline: 2px solid #0074cc; outline-offset: -2px; }
.bioservices-services .department-content-wrapper { padding: 24px; }
.bioservices-services .service-icon { width: 84px; height: 84px; object-fit: contain; margin: 0 0 20px; }
.bioservices-services .department-item-content[hidden] { display: none; }
.bioservices-services .department-item-content:not([hidden]) { display: block; }
.lightbox { z-index: 3000; padding: 24px; }
.bioservices-image-dialog { border: 0; background: #fff; padding: 45px 16px 16px; max-width: 94vw; max-height: 94vh; border-radius: 8px; }
.bioservices-image-dialog::backdrop { background: rgba(0, 0, 0, .82); }
.bioservices-image-dialog img { max-width: 86vw; max-height: 78vh; object-fit: contain; }
.bioservices-close { position: absolute; right: 8px; top: 6px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: #0074cc; color: #fff; font-size: 26px; line-height: 36px; text-align: center; cursor: pointer; z-index: 2; }
.bioservices-close:hover, .bioservices-close:focus-visible { background: #005a9e; outline: 2px solid #fff; outline-offset: -4px; }
.lightbox .bioservices-close { position: fixed; top: 16px; right: 16px; }
.page-template-composants .team-image img { height: auto; }
.bioservices-component-caption { margin: 14px 0 0; font-size: 20px; line-height: 1.4; text-align: center; color: #0074cc; }
.bioservices-contact { padding-top: 40px; padding-bottom: 45px; }
.bioservices-contact .wpcf7-list-item { display: block; margin: 8px 0; }
.bioservices-contact .wpcf7-list-item label { display: flex; align-items: flex-start; gap: 8px; width: 100%; }
.bioservices-contact .wpcf7-list-item input[type="checkbox"], .bioservices-contact .wpcf7-list-item input[type="radio"] { flex: 0 0 auto; width: auto; margin: 6px 0 0; }
.bioservices-contact .contact-page-content { margin-left: 0; }
.bioservices-contact textarea { line-height: 1.6; min-height: 140px; }
.bioservices-contact .wpcf7-form-control { max-width: 100%; }
.bioservices-contact .map-responsive { margin: 20px 0 !important; }
.bioservices-contact .map-responsive iframe { display: block; width: 100%; height: 300px; border: 0; }
.bioservices-contact-details { list-style: none; margin: 20px 0; padding: 0; }
.bioservices-contact-details li { padding: 15px 0; border-bottom: 1px solid #eee; }
.bioservices-contact-details .fa { color: #0074cc; margin-right: 8px; }
.bioservices-about-content { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 30px; align-items: start; }
.bioservices-about-content iframe { width: 100%; max-width: 100%; border: 0; }
.bioservices-about-content > * { min-width: 0; }
.bioservices-about-page { padding-top: 40px; padding-bottom: 45px; }
.bioservices-news, .bioservices-certificate, .bioservices-activity-summary { padding-top: 40px; padding-bottom: 45px; }
.bioservices-news-card { margin-bottom: 35px; }
.bioservices-news-card img { width: 100%; height: 240px; object-fit: contain; }
.bioservices-certificate > img { max-width: 100%; max-height: 650px; width: auto; height: auto; }
.inner-main-title .trail-items { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.inner-main-title .trail-item + .trail-item::before { content: '›'; margin-right: 8px; }
/* Keep the title inside its banner while the navigation wraps or becomes sticky. */
.inner-main-title .entry-header,
.inner-main-title .breadcrumbs {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}
/* News must remain readable even when its entrance animation does not run. */
.widget_mercantile_posts_col .init-animate {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}
/* Home sections and footer remain visible independently of scroll animations. */
.home .init-animate,
.page-template-front-page .init-animate,
.site-footer .init-animate {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}
#navbar .bioservices-submenu > a { padding-right: 30px; }
#navbar .bioservices-submenu:hover > a,
#navbar .bioservices-submenu:focus-within > a,
#navbar .bioservices-submenu.submenu-open > a { color: #0074cc; background: #f5f9fc; }
#navbar .bioservices-submenu-toggle {
    position: absolute; right: 2px; top: 15px; width: 24px; height: 32px;
    padding: 0; border: 0; background: transparent; color: inherit;
    line-height: 1; font-size: 18px; cursor: pointer;
}
#navbar .bioservices-submenu-toggle:focus-visible { outline: 2px solid #0074cc; }
#navbar .bioservices-submenu > .sub-menu {
    display: none; left: 0; right: auto; width: 310px; min-width: 0; max-width: 90vw;
    margin: 0; padding: 6px; background: #fff; border: 1px solid #e5e7eb;
    border-radius: 6px; box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
}
#navbar .bioservices-submenu.submenu-open > .sub-menu { display: block; }
#navbar .bioservices-submenu > .sub-menu > li { display: block; float: none; width: 100%; margin: 0; border: 0; }
#navbar .bioservices-submenu > .sub-menu a {
    display: block; width: 100%; padding: 10px 14px; color: #334155;
    font-size: 14px; line-height: 1.5; white-space: normal; overflow-wrap: break-word;
    border-radius: 4px; box-sizing: border-box;
}
#navbar .bioservices-submenu > .sub-menu a:hover,
#navbar .bioservices-submenu > .sub-menu a:focus { color: #0074cc; background: #edf7ff; }
#navbar .pll-parent-menu-item > .sub-menu { min-width: 90px; width: 90px; white-space: normal; }
/* One flag per line in every language (IT nowrap on #primary-menu was laying them out horizontally). */
#navbar .pll-parent-menu-item > .sub-menu > li { display: block; float: none; width: 100%; }
/* Parent theme gives sub-menu links width:200px; keep the flag hover inside the 90px dropdown. */
@media (min-width: 1024px) {
    #navbar .pll-parent-menu-item > .sub-menu { overflow: hidden; padding: 0; }
    #navbar .pll-parent-menu-item > .sub-menu a { display: block; width: 100%; box-sizing: border-box; padding: 12px 0; text-align: center; }
    #navbar .pll-parent-menu-item > .sub-menu a .pll-switcher-flag { vertical-align: middle; }
}
#navbar .pll-parent-menu-item:hover > .sub-menu,
#navbar .pll-parent-menu-item:focus-within > .sub-menu,
#navbar .pll-parent-menu-item.submenu-open > .sub-menu { left: auto; right: 0; }
@media (min-width: 1024px) {
    #navbar .pll-parent-menu-item.bioservices-submenu > .sub-menu { width: 90px; }
    html[lang^="it"] #navbar > .container { display: flex; align-items: center; }
    html[lang^="it"] #navbar .navbar-header { float: none; flex: 0 0 190px; max-width: 190px; }
    html[lang^="it"] #navbar .navbar-header .custom-logo { width: 100%; max-width: 165px; height: auto; }
    html[lang^="it"] #navbar .main-navigation { flex: 1 1 auto; min-width: 0; margin-left: auto; }
    html[lang^="it"] #navbar .desktop-only { order: 3; flex: 0 0 32px; }
    html[lang^="it"] #primary-menu { display: flex; justify-content: flex-end; white-space: nowrap; }
    html[lang^="it"] #primary-menu > li > a { padding-left: 10px; padding-right: 10px; }
    html[lang^="it"] #primary-menu > .bioservices-submenu > a { padding-right: 26px; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
    html[lang^="it"] #navbar .navbar-header { flex-basis: 145px; max-width: 145px; }
    html[lang^="it"] #primary-menu > li > a { font-size: 14px; padding-left: 7px; padding-right: 7px; }
    html[lang^="it"] #primary-menu > .bioservices-submenu > a { padding-right: 24px; }
}
.page-template-page-urology .jumbotron-section > .container,
.page-template-page-urology .at-department > .container {
    width: calc(100% - 30px) !important; max-width: 1170px;
    margin-left: auto !important; margin-right: auto !important;
}
.page-template-page-urology .jumbotron-text p { font-size: 16px; line-height: 1.7; text-align: left; }
@media (max-width: 1023px) {
    #navbar .navbar-header .custom-logo { width: 165px; max-width: 100%; height: auto; }
    .page-template-page-urology .jumbotron-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 24px 0; }
    .page-template-page-urology .jumbotron-text { max-width: 100%; margin: 0; }
    .page-template-page-urology .jumbotron-image { position: static; width: 100%; height: auto; }
    .page-template-page-urology .jumbotron-image img { height: auto; max-height: 400px; object-fit: contain; clip-path: none; }
    .page-template-page-urology .department-title-wrapper { font-size: 18px !important; }
    #navbar .bioservices-submenu-toggle { top: 0; right: 0; width: 44px; height: 44px; }
    #navbar .bioservices-submenu > a { padding-right: 50px; }
    #navbar .bioservices-submenu > .sub-menu { position: static; width: 100%; max-width: 100%; margin: 0 0 8px; padding: 4px 6px 4px 12px; border: 0; border-left: 2px solid #2196f3; border-radius: 0; box-shadow: none; background: #f5f9fc; }
    #navbar .bioservices-submenu > .sub-menu a { min-height: 44px; padding: 12px; }
    #navbar .navbar-collapse.in { max-height: calc(100dvh - 170px); overflow-y: auto; }
}
.bioservices-login { padding: 45px 15px; max-width: 480px; min-height: 420px; }
.bioservices-login label { display: block; }
.bioservices-login input[type="text"], .bioservices-login input[type="password"] { width: 100%; }
.bioservices-login .login-remember label { display: flex; align-items: center; gap: 8px; }
@media (max-width: 767px) {
    .page-template-page-urology .jumbotron-content { grid-template-columns: minmax(0, 1fr); }
    .bioservices-about-content { grid-template-columns: minmax(0, 1fr); }
    .inner-main-title .trail-items { justify-content: flex-start; }
    .activities-section h2 { font-size: 20px; }
    .activities-nav { gap: 8px; }
    .activities-nav a { flex-basis: 125px; }
    .bioservices-services .department-content-wrapper { padding: 24px 15px; }
    .page-template-composants .acme-teams .row .col-md-6 { max-width: 100%; width: 100%; }
    .map-responsive { margin-left: 0 !important; }
    .map-responsive iframe { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
