/* Additions on top of the original Drupal theme CSS (which is loaded unchanged from /sites/default/files/css/). */

/* Dropdown menus open on hover in the original CSS; also open them for keyboard focus. */
.primaryMenu .menuList .listItem.expaned:focus-within .menuList-second { display: block; }
/* Home "What we offer": only the Project Management column is kept, so centre it. */
#h_c_wrap { display: flex; justify-content: center; }
#h_c_wrap > div { float: none !important; }

/* Mobile menu (old site used the "sidr" plugin below 960px). */
.msc-menu-toggle { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.msc-menu-toggle span { display: block; width: 25px; height: 3px; margin: 5px 0; border-radius: 3px; background: #000; }
@media (max-width: 960px) {
  .msc-menu-toggle { display: block; position: absolute; right: 12px; top: 18px; z-index: 100; }
  .l-header .primaryMenu { display: none; }
  body.msc-menu-open .l-header .primaryMenu { display: block; position: absolute; left: 0; right: 0; top: 100%; z-index: 99; background: #fff; border-bottom: 4px solid #007bff; box-shadow: 0 2px 5px #666; }
  body.msc-menu-open .primaryMenu .menuList { margin: 0; padding: 0; float: none; }
  body.msc-menu-open .primaryMenu .menuList li { display: block; float: none; border-bottom: 1px solid #ddd; padding: 10px; margin: 0; }
  body.msc-menu-open .primaryMenu .menuList-second { display: block !important; position: static; box-shadow: none; border: 0; padding-left: 12px; }
  .l-header { position: relative; }
}

/* Blog masonry: the old site positioned cards with a jQuery plugin; CSS columns give the same look. */
.msc-masonry { column-count: 3; column-gap: 8px; height: auto !important; }
.msc-masonry .masonry-item { position: static !important; display: inline-block; width: 100% !important; float: none !important; break-inside: avoid; margin: 0 0 8px; box-sizing: border-box; }
@media (max-width: 960px) { .msc-masonry { column-count: 2; } }
@media (max-width: 600px) { .msc-masonry { column-count: 1; } }
.msc-masonry img { max-width: 100%; height: auto; }
.msc-more-title { color: #007bff; text-align: center; margin: 40px 0 16px; }
.msc-post-cats { margin-top: 6px; font-size: 13px; }

/* Home "Latest from the Blog" (replaces the old jCarousel). */
.msc-latest { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; margin: 16px auto 0; max-width: 1100px; }
.msc-latest-item { flex: 1 1 300px; max-width: 340px; text-align: center; }
.msc-latest-item .views-field-title a { color: #000; font-size: 18px; font-weight: 500; }
.msc-latest-meta { margin: 12px 0; color: #333; font-size: 14px; }
.msc-latest-meta .sep { color: #ccc; margin: 0 6px; }

/* FAQ accordion + filter */
.msc-accordion .ui-accordion-header { cursor: pointer; }
.msc-accordion .ui-accordion-content[hidden] { display: none !important; }
.msc-accordion .ui-accordion-content { display: block; }

/* Small pages */
.msc-coming-soon { max-width: 760px; margin: 30px auto 80px; font-size: 17px; line-height: 1.6; text-align: center; }
.msc-back { max-width: 1000px; margin: 30px auto; }

/* Content safety: never let migrated embeds/images overflow on phones. */
.l-content img { max-width: 100%; height: auto; }
.l-content iframe { max-width: 100%; }

/* Investor portal (/investors). Reuses the theme's form-item / form-text / form-submit styles. */
.msc-portal { max-width: 640px; margin: 20px auto 80px; font-size: 16px; line-height: 1.6; }
.msc-portal-wide { max-width: 1140px; }
.msc-portal-form { margin: 16px 0; }
.msc-portal-form .form-item { margin: 0 0 14px; }
.msc-portal-form .form-item label { display: block; float: none; width: auto; font-weight: 500; margin-bottom: 4px; }
.msc-portal .msc-portal-form input.form-text { width: 100%; max-width: 420px; box-sizing: border-box; padding: 8px 10px; font-size: 16px; border: 1px solid #bbb; border-radius: 3px; }
.msc-portal-form #msc-code { max-width: 180px; letter-spacing: 4px; font-size: 20px; }
.msc-portal-search { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.msc-portal-search .form-item { flex: 0 1 420px; margin: 0; }
.msc-portal-search .form-submit { margin: 0 !important; }
.msc-portal-msg { min-height: 1.6em; margin: 12px 0; }
.msc-portal-error { color: #b00020; }
.msc-portal-small { font-size: 14px; margin-top: 12px; }
.msc-linkbtn { background: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; color: #007bff !important; text-decoration: underline; cursor: pointer; font: inherit !important; text-transform: none !important; min-width: 0 !important; box-shadow: none !important; }
.msc-portal-help { margin-top: 32px; padding-top: 16px; border-top: 1px solid #ddd; font-size: 15px; color: #333; }
.msc-portal-signedin { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.msc-portal-table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 15px; }
.msc-portal-table th, .msc-portal-table td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid #ddd; }
.msc-portal-table th { background: #f4f6f8; font-weight: 500; }
.msc-portal-table a { word-break: break-word; }
.msc-doc { display: inline-block; margin-right: 10px; }
@media (max-width: 760px) {
  .msc-portal-table thead { display: none; }
  .msc-portal-table, .msc-portal-table tbody, .msc-portal-table tr, .msc-portal-table td { display: block; width: 100%; box-sizing: border-box; }
  .msc-portal-table tr { border: 1px solid #ddd; margin-bottom: 14px; padding: 6px 0; }
  .msc-portal-table td { border: 0; padding: 4px 10px; }
  .msc-portal-table td::before { content: attr(data-label); display: block; font-size: 12px; color: #666; text-transform: uppercase; }
}
