/* Corrections to the recovered ibmm.pl styles. Loaded last on every page.
   Each rule fixes a defect that was already present on the original site. */

/* About text: the original fixed 15px line height at 1.2em type made rows touch */
p.about_text { line-height: 1.6; }

/* News: the open article was sized by its content and spilled under the list on the right */
#news .articlewindow { width: 100%; max-width: 100%; box-sizing: border-box; overflow-wrap: break-word; }
#news .articlewindow img, #news .articlewindow table, #news .articlewindow iframe { max-width: 100%; height: auto; }
@media (min-width: 992px) {
  #news .articlewindow { padding-right: 2rem !important; }
}

/* Offer section (redesign approved 2026-12-03, mock-up "E"): photo, text, buttons and services
   on one light card; paragraph in the same light type as the About text. The original text was
   13px medium black with a 15px line height. */
.offer-img-bg { min-height: 0 !important; display: flow-root; background-position: left center !important; background-size: cover !important; }
#offer .offer-container { max-width: 660px; padding: 0; margin: 110px 0 120px; background: rgba(255,255,255,.86); border-radius: 2rem; overflow: hidden; box-shadow: 0 18px 50px rgba(48,48,128,.16); }
#offer img.offer-img { border-radius: 0; margin-bottom: 0; height: 320px; }
#offer .offer-content { padding: 2.5rem 2.75rem 2.75rem; }
#offer .offer-content p { font-size: 19px; font-weight: 300; line-height: 1.65; color: #231f20; text-align: left !important; margin: 0; }
#offer .offer-content p:empty, #offer .offer-content p:has(> a:only-child:empty) { display: none; }
#offer .list-group { margin-top: 2rem !important; justify-content: flex-start; }
#offer .services { background: none; margin-top: 2.5rem; padding: 2rem 0 0; align-items: stretch; gap: .75rem; border-top: 1px solid rgba(35,31,32,.18); border-radius: 0; }
#offer .services h2 { font-family: "STIX Two Text", serif; font-size: 1.9rem; font-weight: 600; margin-bottom: .5rem; text-align: left; }
#offer .service { max-width: none; background: #fff; color: #231f20; font-weight: 500; font-size: 17px; line-height: 1.4; border-left: 6px solid #ff9a62; border-radius: .75rem; padding: 1rem 1.25rem; box-shadow: 0 2px 10px rgba(48,48,128,.08); }
#offer .service:hover { background: #303080; color: #fff; }
@media (max-width: 991px) {
  #offer .offer-container { float: none; max-width: 660px; margin: 60px auto 70px; }
}
@media (max-width: 575px) {
  #offer .offer-container { border-radius: 1.25rem; margin: 40px auto 50px; }
  #offer img.offer-img { height: 200px; }
  #offer .offer-content { padding: 1.5rem 1.25rem 1.75rem; }
  #offer .offer-content p { font-size: 17px; }
  #offer .service { font-size: 16px; }
}

/* Institute council and founders (redesign approved 2026-12-03, mock-up "B"): all members in one row of
   cards instead of a sliding carousel. Scoped to .members-container because the tender list
   on /offers reuses the same #multi-item-example id. Covers the three structures the script
   renders (desktop, tablet, phone). */
.members-container #multi-item-example .controls-top,
.members-container #multi-item-example .carousel-indicators { display: none !important; }
.members-container #multi-item-example .carousel-inner { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.25rem; margin: 0 !important; padding: 0 0 1.5rem !important; overflow: visible; }
.members-container #multi-item-example .carousel-inner::after { display: none; }
.members-container #multi-item-example .carousel-item,
.members-container #multi-item-example .carousel-item > .row { display: contents !important; }
.members-container .slider-item,
.members-container #multi-item-example .carousel-item .slider-item { padding: 0; margin: 0 !important; max-width: none; min-width: 0 !important; flex: none !important; width: auto; text-align: left; }
.members-container .card { height: 100%; border: 0; display: flex; flex-direction: column; background: #fff; border-radius: 1.25rem; overflow: hidden; box-shadow: 0 10px 30px rgba(48,48,128,.16) !important; }
.members-container .card img.card-img { width: 100%; height: auto; aspect-ratio: 4 / 4.4; padding: 0; margin: 0; object-fit: cover; object-position: center 12%; border-radius: 0; }
.members-container .card .card-block { min-height: 0 !important; max-height: none !important; flex: 1; display: flex; flex-direction: column; justify-content: flex-start; text-align: left; padding: 1.1rem 1.1rem 1.25rem; border-top: 4px solid #ff9a62; }
.members-container .card h4.card-title { margin: 0 !important; font-family: Ubuntu, sans-serif; font-size: 17px; font-weight: 600; line-height: 1.3; text-align: left; }
.members-container .card h4.card-title span { display: block; font-size: 14px; font-weight: 400; color: #555; }
.members-container .card .card-block p:first-of-type { font-size: 14px; font-weight: 500; color: #303080; margin: .35rem 0 .8rem; text-align: left; line-height: 1.35; }
.members-container .card .card-text { font-size: 15px; font-weight: 300; line-height: 1.55; color: #231f20; text-align: left; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 1rem; }
.members-container .card a.read-more { margin-top: auto; font-size: 14px; font-weight: 600; color: #231f20; text-align: left; }
.members-container .card a.read-more::after { content: " \2192"; color: #ff7a33; }
@media (max-width: 1099px) { .members-container #multi-item-example .carousel-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .members-container #multi-item-example .carousel-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 15px !important; padding-right: 15px !important; } }
@media (max-width: 499px)  { .members-container #multi-item-example .carousel-inner { grid-template-columns: minmax(0, 340px); justify-content: center; } }

/* Founders: the same cards, on the same five-column grid so they line up with the council below */
.members-container .management-wrapper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.25rem; margin: 0 !important; padding: 0 0 1.5rem !important; }
@media (max-width: 1099px) { .members-container .management-wrapper { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .members-container .management-wrapper { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 15px !important; padding-right: 15px !important; } }
@media (max-width: 499px)  { .members-container .management-wrapper { grid-template-columns: minmax(0, 340px); justify-content: center; } }
.members-container .management-wrapper .card { padding: 0 !important; }
.members-container .founders_title { margin-bottom: 30px; }

/* Founders (approved 2026-12-03, mock-up "B"): two landscape cards filling the row,
   photo left and text right. One per row on tablets; upright like the council cards on phones. */
.members-container .management-wrapper { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; }
.members-container .management-wrapper .card { flex-direction: row; }
.members-container .management-wrapper .card img.card-img { width: 40%; flex: 0 0 40%; height: 100%; min-height: 290px; aspect-ratio: auto; }
.members-container .management-wrapper .card .card-block { border-top: 0; border-left: 4px solid #ff9a62; padding: 1.6rem 1.75rem; }
.members-container .management-wrapper .card h4.card-title { font-size: 20px; }
.members-container .management-wrapper .card .card-block p:first-of-type { font-size: 15px; margin-bottom: 1rem; }
.members-container .management-wrapper .card .card-text { font-size: 16px; -webkit-line-clamp: 7; }
@media (max-width: 991px) {
  .members-container .management-wrapper { grid-template-columns: minmax(0, 640px); gap: 1.5rem; justify-content: center; }
}
@media (max-width: 767px) {
  .members-container .management-wrapper { padding-left: 15px !important; padding-right: 15px !important; }
}
@media (max-width: 499px) {
  .members-container .management-wrapper { grid-template-columns: minmax(0, 340px); gap: 1.25rem; }
  .members-container .management-wrapper .card { flex-direction: column; }
  .members-container .management-wrapper .card img.card-img { width: 100%; flex: none; height: auto; min-height: 0; aspect-ratio: 4 / 4.4; }
  .members-container .management-wrapper .card .card-block { border-left: 0; border-top: 4px solid #ff9a62; padding: 1.1rem 1.1rem 1.25rem; }
  .members-container .management-wrapper .card h4.card-title { font-size: 17px; }
  .members-container .management-wrapper .card .card-text { font-size: 15px; -webkit-line-clamp: 5; }
}

/* Founders, second pass (approved 2026-12-03, mock-up "A" of round 2): photo one third of the card,
   card height set by the text, smaller titles, five lines of biography. */
@media (min-width: 500px) {
  .members-container .management-wrapper .card { position: relative; display: block; }
  .members-container .management-wrapper .card img.card-img { position: absolute; left: 0; top: 0; width: 33%; height: 100%; min-height: 0; flex: none; }
  .members-container .management-wrapper .card .card-block { margin-left: 33%; height: 100%; box-sizing: border-box; padding: 1.25rem 1.5rem 1.2rem; }
  .members-container .management-wrapper .card h4.card-title { font-size: 18px; }
  .members-container .management-wrapper .card .card-block p:first-of-type { font-size: 14px; margin: .3rem 0 .75rem; }
  .members-container .management-wrapper .card .card-text { font-size: 16px; -webkit-line-clamp: 5; margin-bottom: .9rem; }
}

/* Contact page (2026-12-03): a 2 x 2 mini gallery in place of the Google map, and more room
   between the form and the pictures (the original gap was 30px). */
#contact .map-container-section { height: auto !important; padding: 0 !important; overflow: visible; border-radius: 0; box-shadow: none !important; }
#contact .contact-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#contact .contact-gallery img { display: block; width: 100%; aspect-ratio: 6 / 5; object-fit: cover; border-radius: 1.25rem; box-shadow: 0 10px 30px rgba(48,48,128,.16); }
@media (min-width: 992px) {
  #contact .row > .col-lg-6 + .col-lg-6 { padding-left: 4.5rem; }
}

/* Logo (approved 2026-12-03, mock-up "B"): mark without the tiny drawn tagline, institute name as text */
.ibmm-logo { display: inline-flex; flex-direction: column; align-items: flex-start; text-align: left; }
.ibmm-logo img { height: 64px; width: auto; display: block; }
.ibmm-logo .logo-name { margin-top: 8px; font: 500 12.5px/1.35 Ubuntu, sans-serif; letter-spacing: .07em; text-transform: uppercase; color: #fff; white-space: nowrap; }
nav.navbar .logo-mobile .ibmm-logo img { height: 46px; }
nav.navbar .logo-mobile .ibmm-logo .logo-name { margin-top: 5px; font-size: 9.5px; letter-spacing: .06em; }
footer .ibmm-logo { margin-top: 15px; }
footer .ibmm-logo img { height: 58px; }

/* Careers page: notice shown while there are no openings */
#career .career-note { max-width: 660px; margin-left: auto; background: rgba(255,255,255,.86); border-radius: 2rem; padding: 2.5rem 2.75rem; box-shadow: 0 18px 50px rgba(48,48,128,.16); border-top: 4px solid #ff9a62; }
#career .career-note h2 { font-family: "STIX Two Text", serif; font-size: 1.9rem; font-weight: 600; margin: 0 0 1.25rem; color: #231f20; }
#career .career-note p { font-size: 19px; font-weight: 300; line-height: 1.65; color: #231f20; text-align: left; margin: 0 0 1rem; }
#career .career-note p:last-child { margin-bottom: 0; }
#career .career-note a { color: #303080; font-weight: 500; border-bottom: 2px solid #ff9a62; }
@media (max-width: 991px) { #career .subpage-img-bg { padding: 40px 15px 60px; } #career .career-note { margin: 0 auto; } }
@media (max-width: 575px) { #career .career-note { padding: 1.5rem 1.25rem; border-radius: 1.25rem; } #career .career-note p { font-size: 17px; } #career .career-note h2 { font-size: 1.5rem; } }
@media (min-width: 576px) {
  nav.navbar .logo-mobile .ibmm-logo img { height: 54px; }
  nav.navbar .logo-mobile .ibmm-logo .logo-name { font-size: 11px; margin-top: 6px; }
}

/* Header between 1200 and 1250px wide: the original layout pushed the logo off the left edge of the
   screen (the wide-screen logo was hidden and the phone one sat outside the page). Show the
   wide-screen logo here and tighten the menu so it fits on one line. */
@media (min-width: 1200px) and (max-width: 1250px) {
  nav.navbar .logo-pc { display: inline-block !important; }
  nav.navbar .logo-mobile { display: none !important; }
  nav.navbar a.nav-link { margin: 0; padding-left: .22rem; padding-right: .22rem; font-size: 14.5px; white-space: nowrap; }
  nav.navbar .nav-links-container { width: auto !important; order: 0 !important; display: block !important; }
  nav.navbar .navbar-nav { margin-top: 0 !important; }
  nav.navbar .langLogo { margin: 0 !important; }
}

/* Logo, final form (approved 2026-12-03, mock-up "E" of round 3): on wide screens and in the footer
   the institute name sits in the space under the IBMM underline, left of the dots, sized so the
   longer of its two lines spans the underline (161px at an 80px logo). Polish and English differ
   in length, so each has its own size. Phones and tablets keep the name below the mark. */
nav.navbar a.logo-pc .ibmm-logo, footer .ibmm-logo { position: relative; display: inline-block; padding-bottom: 4px; }
nav.navbar a.logo-pc .ibmm-logo img, footer .ibmm-logo img { height: calc(80px * var(--s, 1)); }
nav.navbar a.logo-pc .ibmm-logo .logo-name, footer .ibmm-logo .logo-name { position: absolute; left: .4%; top: 68%; margin: 0; white-space: nowrap; font: 500 11.4px/1.22 Ubuntu, sans-serif; font-size: calc(11.4px * var(--s, 1)); letter-spacing: 0; text-transform: uppercase; color: #fff; }
html[lang="en"] nav.navbar a.logo-pc .ibmm-logo .logo-name, html[lang="en"] footer .ibmm-logo .logo-name { font-size: calc(10.7px * var(--s, 1)); }
nav.navbar a.logo-pc + div .navbar-brand.mt-2 { margin-top: 14px !important; }
.ibmm-logo .logo-name span { display: block; }

/* Logo name as a block (approved 2026-12-03, mock-up "F"): each of the two lines is letter-spaced so
   it spans the IBMM underline exactly (160.7px at an 80px logo). The values come from measuring the
   lines in Ubuntu Medium; if the name or the size changes they must be measured again. */
nav.navbar a.logo-pc .ibmm-logo .logo-name span:nth-child(1), footer .ibmm-logo .logo-name span:nth-child(1) { letter-spacing: calc(.467px * var(--s, 1)); }
nav.navbar a.logo-pc .ibmm-logo .logo-name span:nth-child(2), footer .ibmm-logo .logo-name span:nth-child(2) { letter-spacing: calc(.034px * var(--s, 1)); }
html[lang="en"] nav.navbar a.logo-pc .ibmm-logo .logo-name span:nth-child(1), html[lang="en"] footer .ibmm-logo .logo-name span:nth-child(1) { letter-spacing: 0; }
html[lang="en"] nav.navbar a.logo-pc .ibmm-logo .logo-name span:nth-child(2), html[lang="en"] footer .ibmm-logo .logo-name span:nth-child(2) { letter-spacing: calc(.851px * var(--s, 1)); }

/* Size of the logo in the top menu, as a fraction of the 80px design size (requested 2026-12-03).
   Change this one number to resize the mark and its text together; the footer logo stays at 100%. */
nav.navbar a.logo-pc .ibmm-logo { --s: .8; }

/* Wide-screen header (requested 2026-12-03): the menu is lifted so its text shares a centre line
   with the two-line institute name under the logo; the language flags are nudged onto the same line.
   Tied to the logo size above: if --s changes, these two offsets need measuring again. */
@media (min-width: 1200px) {
  nav.navbar .navbar-nav { position: relative; top: var(--menu-lift, 0px); }
  nav.navbar .nav-links-container { position: relative; top: var(--flags-drop, 0px); }
}

/* EU flag (requested 2026-12-03): on wide screens it moves from under the logo to the end of the
   main menu, as a small flag with its caption on one line; the header becomes much shorter.
   Phones and tablets keep the original flag block in the header. */
nav.navbar a.nav-eu { display: none; }
@media (min-width: 1200px) {
  nav.navbar a.logo-pc + div { display: none; }
  /* an ordinary menu link, so its caption shares the baseline of the other items; the flag is taller
     than the text line and uses negative margins so that it does not push the caption down */
  nav.navbar a.nav-eu { display: block; white-space: nowrap; }
  nav.navbar a.nav-eu img { height: 30px; width: auto; display: inline-block; vertical-align: middle; margin: -10px 8px -8px 0; }
}

/* Wide-screen header, final arrangement (2026-12-03). One line: logo, menu ending with the EU flag,
   then the language flags above the text-size buttons, that pair centred on the menu line.
   --menu-lift and --flags-drop put the menu text and the pair on the centre line of the institute
   name; they depend on the logo size (--s) and must be re-measured if it changes. */
@media (min-width: 1200px) {
  nav.navbar { --menu-lift: 22px; --flags-drop: 27px; padding-top: 28px; padding-bottom: 30px; }
  nav.navbar a.nav-link { white-space: nowrap; }
}
@media (min-width: 1200px) and (max-width: 1385px) {
  nav.navbar a.nav-eu span { display: none; }          /* no room for the caption: flag only */
}
@media (min-width: 1251px) and (max-width: 1300px) {
  nav.navbar a.nav-link { margin: 0 1px; padding-left: .3rem; padding-right: .3rem; font-size: 15px; }
}
@media (min-width: 1301px) and (max-width: 1560px) {
  nav.navbar a.nav-link { margin: 0 1px; padding-left: .35rem; padding-right: .35rem; }
}

/* Contact form: the status line is pulled up beside the right-aligned send button (margin-top: -40px in
   the site's styles); keep longer messages clear of the button, or they cover it and it cannot be clicked */
#contact #status { padding-right: 150px; min-height: 40px; font-size: 16px; }

/* Business form: messages shown by js/business-form.js */
#business .business-status { margin: 1rem 0 0; font-weight: 500; color: #c0392b; }
#business .business-status.ok { color: #303080; }
#business .business-sent { background: rgba(255,255,255,.86); border-radius: 2rem; border-top: 4px solid #ff9a62; padding: 2.5rem 2.75rem; box-shadow: 0 18px 50px rgba(48,48,128,.16); max-width: 660px; margin: 2rem auto; }
#business .business-sent h2 { font-family: "STIX Two Text", serif; font-size: 1.9rem; font-weight: 600; margin: 0 0 1rem; }
#business .business-sent p { font-size: 19px; font-weight: 300; line-height: 1.65; margin: 0; }

/* News list (right-hand column, requested 2026-12-03). The excerpts are pasted-in text that carries its
   own fonts, sizes, margins and justification (Times, Calibri, Segoe; 10-12pt), so every item looked
   different. Everything in an item now uses one type scale on a 20px line grid; the excerpt is cut
   on a whole line and fades out. The full article on the left is not affected. */
#news .article-list .single-news .row .text-truncate1 { width: auto; height: auto; max-height: 172px; margin-left: 0; padding-left: 0; overflow: hidden; line-height: 20px; -webkit-mask-image: linear-gradient(#000 calc(100% - 24px), transparent); mask-image: linear-gradient(#000 calc(100% - 24px), transparent); }
#news .article-list .single-news .row .text-truncate1 .article-list-date { font-size: 13px; line-height: 20px; font-weight: 500; letter-spacing: .04em; color: #c2571c; margin: 0 0 4px; text-transform: none; }
#news .article-list .single-news .row .text-truncate1 .article-list-title { font-size: 15px; line-height: 20px; font-weight: 600; color: #231f20; margin: 0 0 8px; text-transform: uppercase; }
#news .article-list .text-truncate1 > :not(.article-list-date):not(.article-list-title),
#news .article-list .text-truncate1 > :not(.article-list-date):not(.article-list-title) * {
  font-family: Ubuntu, sans-serif !important; font-size: 14px !important; line-height: 20px !important; font-weight: 300 !important;
  font-style: normal !important; color: #231f20 !important; text-align: left !important; text-indent: 0 !important;
  margin: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; letter-spacing: 0 !important;
}
#news .article-list .text-truncate1 > :not(.article-list-date):not(.article-list-title) strong,
#news .article-list .text-truncate1 > :not(.article-list-date):not(.article-list-title) b { font-weight: 500 !important; }
#news .article-list .text-truncate1 img, #news .article-list .text-truncate1 br + br { display: none !important; }
#news .article-list .text-truncate1 .article-list-text:empty { display: none; }
