/* =========================================================
   MAV Header Styles
   Search box, login button, social icons, cart row,
   main menu and page banner.
   Loaded site-wide from the CSS tab (after /css/style.css).

   MAV brand colours (from the brand guidelines):
     Pantone 287C  #003087  - main MAV blue
     Pantone 289C  #0c2340  - deep navy
     Light blue    #00aeef  - accents (login button, hovers)
   ========================================================= */

/* Bootstrap Icons (social icons) - must stay at the very top */
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");


/* ---------- Search ---------- */
.search .mav-search {
  display: flex; align-items: center;
  width: 240px; max-width: 100%; height: 38px;
  margin: 0; padding: 0 4px 0 16px;
  background: #fff; border: 1px solid #ced4da; border-radius: 19px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search .mav-search:focus-within {
  border-color: #00aeef;
  box-shadow: 0 0 0 3px rgba(0,174,239,.2);
}
.search .mav-search__input {
  flex: 1 1 auto; min-width: 0; height: 100%;
  border: 0; outline: 0; box-shadow: none; background: transparent;
  padding: 0; font-size: 14px; color: #333;
}
.search .mav-search__input::placeholder { color: #888; opacity: 1; }
.search .mav-search__btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: #555;
  cursor: pointer; transition: background-color .2s ease, color .2s ease;
}
.search .mav-search__btn:hover,
.search .mav-search__btn:focus { background: #00aeef; color: #fff; outline: 0; }


/* ---------- Login button ---------- */
.top_right .top_detail a.member {
  display: inline-flex; align-items: center; justify-content: center;
  height: 38px; padding: 0 24px;
  border: 0; border-radius: 19px;
  color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .05em; line-height: 1;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  transition: filter .2s ease, transform .2s ease, box-shadow .2s ease;
}
.top_right .top_detail a.member:hover,
.top_right .top_detail a.member:focus {
  color: #fff; text-decoration: none;
  filter: brightness(.92);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.top_right .top_detail a.member:focus-visible { outline: 2px solid #003087; outline-offset: 2px; }


/* ---------- Social icons + cart row ---------- */
.mav-social-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 16px; margin-top: 8px;
}
.social-links .list-inline-item:not(:last-child) { margin-right: .4rem; }
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: #f1f3f5; color: #495057; font-size: 1.05rem;
  transition: background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.social-link:hover, .social-link:focus {
  color: #fff; text-decoration: none;
  transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,.15);
}
.social-link:focus-visible { outline: 2px solid #0a66c2; outline-offset: 2px; }
.social-instagram:hover, .social-instagram:focus { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }
.social-facebook:hover,  .social-facebook:focus  { background: #1877f2; }
.social-linkedin:hover,  .social-linkedin:focus  { background: #0a66c2; }
.social-youtube:hover,   .social-youtube:focus   { background: #ff0000; }

.mav-account { margin-left: auto; font-size: 14px; color: #888; }
.mav-account .list-inline-item:not(:last-child) { margin-right: 1rem; }
.mav-account a { color: #888; }
.mav-account a:hover { color: #00aeef; text-decoration: none; }


/* ---------- Main menu: white bar with MAV blue text ---------- */
header .nav_sec {
  background: #fff !important;   /* !important beats the old navy set in style.css */
  border-top: 1px solid #e6e9ef;
  border-bottom: 1px solid #e6e9ef;
}
header .nav_sec .navbar,
header .nav_sec .navbar-collapse {
  background: transparent !important;
}

/* Menu text - !important because style.css sets it to white */
header .nav_sec .nav-link,
header .nav_sec .navbar-nav a {
  color: #003087 !important;
}
header .nav_sec .navbar-nav .nav-link {
  position: relative;
  font-weight: 600;
  letter-spacing: .03em;
}

/* Dropdown items */
header .nav_sec .dropdown-menu a,
header .nav_sec .dropdown-menu .dropdown-item {
  display: block;
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  background: transparent;
  transition: background-color .15s ease, color .15s ease;
}
header .nav_sec .dropdown-menu a:hover,
header .nav_sec .dropdown-menu a:focus {
  color: #0077b3 !important;
  background: #e8f7fd !important;
  text-decoration: none;
}

/* Mobile menu button: blue lines so it shows up on white */
header .nav_sec .navbar-toggler {
  border-color: rgba(0,48,135,.25);
}
header .nav_sec .navbar-toggler span {
  background-color: #003087;
}
header .nav_sec .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23003087' stroke-linecap='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Desktop only */
@media (min-width: 992px) {

  /* Sliding light-blue underline on hover (::after is taken by the dropdown arrow) */
  header .nav_sec .navbar-nav .nav-link::before {
    content: "";
    position: absolute;
    left: 1rem; right: 1rem;   /* change 1rem if the line is wider/narrower than the text */
    bottom: 6px;
    height: 3px;
    border-radius: 3px;
    background: #00aeef;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
  }
  header .nav_sec .navbar-nav .nav-link:hover::before,
  header .nav_sec .navbar-nav .nav-link:focus::before,
  header .nav_sec .navbar-nav .dropdown:hover > .nav-link::before {
    transform: scaleX(1);
  }
  header .nav_sec .dropdown-menu .nav-link::before { display: none; }

  /* Smaller dropdown arrow that flips when open */
  header .nav_sec .navbar-nav .dropdown-toggle::after {
    vertical-align: .18em;
    border-top-width: .28em;
    border-left-width: .28em;
    border-right-width: .28em;
    opacity: .7;
    transition: transform .2s ease;
  }
  header .nav_sec .navbar-nav .dropdown:hover > .dropdown-toggle::after {
    transform: rotate(180deg);
  }

  /* Dropdown panel */
  header .nav_sec .dropdown-menu {
    margin-top: 0;               /* no gap, so the menu doesn't close as you move onto it */
    min-width: 240px;
    padding: 8px;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(12,35,64,.14);
    animation: mavMenuIn .18s ease-out;
  }
  header .nav_sec .dropdown-menu a,
  header .nav_sec .dropdown-menu .dropdown-item {
    white-space: nowrap;
  }
}

@keyframes mavMenuIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}


/* ---------- Page banner: one consistent colour on every page ---------- */
/* following_sec = body template, banner_sec = landing template */
.following_sec,
.banner_sec {
  background: #003087 !important;   /* Pantone 287C */
  /* Alternative - brand gradient, 287C into 289C:
  background: linear-gradient(90deg, #003087 0%, #0c2340 100%) !important; */
}


/* =========================================================
   Accordion (e.g. MAV Board page)
   Pure CSS: each item has a hidden checkbox.
   Checked = closed, unchecked = open.
   Stays inside its column, so the right-hand panels are unaffected.
   ========================================================= */
.accordion .accordion__wrapper {
  list-style: none !important;
  margin: 20px 0 0 !important;
  padding: 0 !important;
}

/* Each person = one card */
.accordion .accordion__item {
  position: relative;
  list-style: none !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  border: 1px solid #e3e8f0 !important;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  animation: none !important;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.accordion .accordion__item:hover {
  border-color: #c9d6ea !important;
  box-shadow: 0 4px 14px rgba(0,48,135,.08);
}

/* The invisible checkbox covers the card and does the opening/closing */
.accordion .accordion__item > input[type="checkbox"] {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

/* Header row: name + role */
.accordion .accordion__item > h4 {
  position: relative;
  margin: 0 !important;
  padding: 18px 60px 18px 22px !important;
  background: #fff !important;
  color: #5a6478 !important;          /* role / organisation in grey */
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  text-transform: none !important;
  border: 0 !important;
  transition: background-color .2s ease;
}
.accordion .accordion__item > h4 strong,
.accordion .accordion__item > h4 b {
  display: block;                      /* name on its own line */
  margin-bottom: 2px;
  color: #003087;                      /* Pantone 287C */
  font-size: 18px;
  font-weight: 700;
}
.accordion .accordion__item:hover > h4 { background: #f6f9fd !important; }

/* Chevron on the right */
.accordion .accordion__item > h4::after {
  content: "";
  position: absolute;
  right: 24px; top: 50%;
  width: 10px; height: 10px;
  margin-top: -7px;
  border-right: 2px solid #003087;
  border-bottom: 2px solid #003087;
  transform: rotate(45deg);            /* pointing down = closed */
  transition: transform .25s ease;
}
.accordion .accordion__item > input:not(:checked) ~ h4::after {
  transform: rotate(-135deg);          /* pointing up = open */
  margin-top: -2px;
}
.accordion .accordion__item > h4::before { display: none !important; }

/* Keyboard focus */
.accordion .accordion__item > input:focus-visible ~ h4 {
  outline: 2px solid #00aeef;
  outline-offset: -2px;
}

/* Open state: a light line under the header */
.accordion .accordion__item > input:not(:checked) ~ h4 {
  border-bottom: 1px solid #e3e8f0 !important;
}

/* The bio panel */
.accordion .accordion__item > .accpanel {
  position: relative;
  z-index: 2;                          /* sits above the checkbox, so text can be selected and links clicked */
  display: flow-root;                  /* contains the floated photo */
  max-height: 4000px;
  margin: 0 !important;
  padding: 20px 22px 8px !important;
  background: #fff;
  color: #3b4250;
  font-size: 15px;
  line-height: 1.65;
  opacity: 1;
  transform: none !important;
  transition: max-height .35s ease, opacity .25s ease, padding .25s ease;
}
.accordion .accordion__item > input:checked ~ .accpanel {
  max-height: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  opacity: 0;
  overflow: hidden;
}
.accordion .accpanel p { margin: 0 0 14px; }

/* Headshots: same size and shape for everyone */
.accordion .accpanel img {
  float: left !important;
  width: 104px !important;
  height: 128px !important;
  object-fit: cover;
  object-position: top center;
  margin: 4px 20px 10px 0 !important;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(12,35,64,.12);
}

/* Phones: stack the photo above the text */
@media (max-width: 575px) {
  .accordion .accordion__item > h4 { padding: 16px 52px 16px 16px !important; }
  .accordion .accordion__item > .accpanel { padding: 16px 16px 4px !important; }
  .accordion .accpanel img {
    float: none !important;
    display: block;
    margin: 0 0 14px 0 !important;
  }
}

/* =========================================================
   Image tiles with buttons (home page quick links)
   ========================================================= */
.mav-tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-align: center;
}

/* Image: same shape for every tile, rounded, gentle zoom on hover */
.mav-tile .mav-tile__img {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(12,35,64,.10);
  transition: box-shadow .25s ease, transform .25s ease;
}
.mav-tile .mav-tile__img img {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  transition: transform .4s ease;
}
.mav-tile:hover .mav-tile__img {
  box-shadow: 0 8px 22px rgba(12,35,64,.18);
  transform: translateY(-2px);
}
.mav-tile:hover .mav-tile__img img { transform: scale(1.05); }

/* Button: outline in MAV blue, fills on hover */
.mav-tile .mav-tile__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: 14px;
  padding: 10px 14px;
  min-height: 48px;
  border: 2px solid #003087;
  border-radius: 24px;
  background: #fff;
  color: #003087 !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none !important;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.mav-tile .mav-tile__btn:hover,
.mav-tile .mav-tile__btn:focus {
  background: #003087 !important;
  border-color: #003087 !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(0,48,135,.25);
}
.mav-tile .mav-tile__btn:focus-visible { outline: 2px solid #00aeef; outline-offset: 2px; }

/* =========================================================
   Footer refresh (content in cmsPanel05)
   Deep navy background (Pantone 289C) with white text.
   ========================================================= */
.mav-footer {
  background: #0c2340 !important;
  color: rgba(255,255,255,.78);
  padding: 56px 0 0 !important;
  font-size: 15px;
  line-height: 1.6;
}
.mav-footer a { color: rgba(255,255,255,.88); text-decoration: none; transition: color .2s ease; }
.mav-footer a:hover, .mav-footer a:focus { color: #00aeef; text-decoration: none; }
.mav-footer .mav-footer__col { margin-bottom: 36px; }

.mav-footer .mav-footer__logo { display: block; max-width: 220px; height: auto; margin: 0 0 18px; }
.mav-footer .mav-footer__blurb { margin: 0; max-width: 340px; color: rgba(255,255,255,.72); }

.mav-footer .mav-footer__heading {
  margin: 0 0 18px !important; padding: 0 0 12px !important; position: relative;
  color: #fff !important; font-size: 13px !important; font-weight: 700 !important;
  letter-spacing: .12em; text-transform: uppercase; background: none !important; border: 0 !important;
}
.mav-footer .mav-footer__heading::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 32px; height: 3px; border-radius: 3px; background: #00aeef;
}

.mav-footer ul.mav-footer__list,
.mav-footer ul.mav-footer__contact { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.mav-footer .mav-footer__list li { margin: 0 0 10px !important; padding: 0 !important; background: none !important; }
.mav-footer .mav-footer__list a { display: inline-flex; align-items: center; gap: 8px; }
.mav-footer .mav-footer__list a i { font-size: 12px; color: #00aeef; transition: transform .2s ease; }
.mav-footer .mav-footer__list a:hover i { transform: translateX(3px); }

.mav-footer .mav-footer__cta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 22px;
  border-radius: 24px; background: #00aeef; color: #fff !important; font-size: 14px; font-weight: 700;
  transition: filter .2s ease, transform .2s ease;
}
.mav-footer .mav-footer__cta:hover,
.mav-footer .mav-footer__cta:focus { color: #fff !important; filter: brightness(.92); transform: translateY(-1px); }

.mav-footer .mav-footer__contact li {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 0 0 14px !important; padding: 0 !important; background: none !important;
}
.mav-footer .mav-footer__contact li > i {
  flex: 0 0 auto; width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(0,174,239,.14); color: #00aeef; font-size: 15px;
}
.mav-footer .mav-footer__contact li > a { padding-top: 5px; }

.mav-footer .mav-footer__social { display: flex; gap: 10px; margin-top: 20px; }
.mav-footer .mav-footer__social a {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; font-size: 16px;
  transition: background-color .2s ease, transform .2s ease;
}
.mav-footer .mav-footer__social a:hover,
.mav-footer .mav-footer__social a:focus { background: #00aeef; color: #fff; transform: translateY(-2px); }

.mav-footer .mav-footer__bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 24px; padding: 20px 0 24px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: 13px; color: rgba(255,255,255,.6);
}
.mav-footer .mav-footer__bottom p { margin: 0; }
.mav-footer .mav-footer__legal { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none !important; margin: 0 !important; padding: 0 !important; }
.mav-footer .mav-footer__legal li { margin: 0 !important; padding: 0 !important; background: none !important; }
.mav-footer .mav-footer__legal a { color: rgba(255,255,255,.7); }
.mav-footer .mav-footer__legal a:hover { color: #00aeef; }

#return-to-top {
  width: 46px !important; height: 46px !important; border-radius: 50% !important;
  background: #003087 !important; box-shadow: 0 6px 18px rgba(12,35,64,.3);
  text-align: center; line-height: 46px !important; color: #fff !important;
}
#return-to-top i { color: #fff !important; font-size: 18px; line-height: 46px !important; position: static !important; margin: 0 !important; }
#return-to-top:hover { background: #00aeef !important; }


/* =========================================================
   Feature cards (home page: Common Denominator, Annual Report)
   ========================================================= */
.card.mav-feature {
  position: relative; overflow: hidden;
  border: 0 !important; border-radius: 16px !important;
  padding: 40px !important;
  box-shadow: 0 6px 24px rgba(12,35,64,.10);
}
.mav-feature--dark  { background: #003087 !important; color: rgba(255,255,255,.85); }
.mav-feature--light { background: #eef4fb !important; color: #3b4250; }

.mav-feature::before {
  content: ""; position: absolute; right: -90px; top: -90px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255,255,255,.06); pointer-events: none;
}
.mav-feature--light::before { background: rgba(0,48,135,.05); }

.mav-feature .mav-feature__inner { position: relative; display: flex; align-items: center; gap: 32px; }
.mav-feature .mav-feature__text { flex: 1 1 auto; min-width: 0; }

.mav-feature .mav-feature__eyebrow {
  display: inline-block; margin-bottom: 12px; padding: 4px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.mav-feature--dark  .mav-feature__eyebrow { background: rgba(0,174,239,.2); color: #7fd8f7; }
.mav-feature--light .mav-feature__eyebrow { background: rgba(0,48,135,.08); color: #003087; }

.mav-feature .mav-feature__title {
  margin: 0 0 12px !important; padding: 0 !important;
  font-size: 26px !important; font-weight: 700 !important; line-height: 1.25 !important;
  text-transform: none !important; background: none !important;
}
.mav-feature--dark  .mav-feature__title { color: #fff !important; }
.mav-feature--light .mav-feature__title { color: #003087 !important; }

.mav-feature .mav-feature__desc { margin: 0 0 24px !important; font-size: 16px; line-height: 1.6; color: inherit !important; }

.mav-feature .mav-feature__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.mav-feature .mav-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px;
  border: 2px solid transparent; border-radius: 24px;
  font-size: 14px; font-weight: 700; line-height: 1.2; text-decoration: none !important;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.mav-feature .mav-btn:hover, .mav-feature .mav-btn:focus { transform: translateY(-1px); }
.mav-feature .mav-btn i { font-size: 15px; }
.mav-feature .mav-btn--primary { background: #00aeef; color: #fff !important; }
.mav-feature .mav-btn--primary:hover, .mav-feature .mav-btn--primary:focus { background: #0098d1; }
.mav-feature--light .mav-btn--primary { background: #003087; }
.mav-feature--light .mav-btn--primary:hover, .mav-feature--light .mav-btn--primary:focus { background: #0c2340; }
.mav-feature .mav-btn--ghost { border-color: rgba(255,255,255,.55); color: #fff !important; background: transparent; }
.mav-feature .mav-btn--ghost:hover, .mav-feature .mav-btn--ghost:focus { background: #fff; color: #003087 !important; border-color: #fff; }

.mav-feature .mav-feature__cover { flex: 0 0 auto; display: block; width: 180px; margin: 0; }
.mav-feature .mav-feature__cover img {
  display: block; width: 100% !important; height: auto !important;
  border-radius: 6px; box-shadow: 0 12px 28px rgba(0,0,0,.28);
  transform: rotate(2deg); transition: transform .3s ease, box-shadow .3s ease;
}
.mav-feature .mav-feature__cover:hover img { transform: rotate(0) translateY(-4px); box-shadow: 0 16px 34px rgba(0,0,0,.32); }

@media (max-width: 767px) {
  .card.mav-feature { padding: 28px !important; }
  .mav-feature .mav-feature__inner { flex-direction: column-reverse; align-items: flex-start; gap: 24px; }
  .mav-feature .mav-feature__cover { width: 150px; }
}

/* =========================================================
   Sidebar widget (e.g. The Common Denominator)
   Swap the class in the HTML to change colour:
     mav-widget--blue   Pantone 287C, white text
     mav-widget--light  soft 287C tint, blue text
   ========================================================= */
.widget.mav-widget {
  position: relative; overflow: hidden; margin-bottom: 24px;
  padding: 30px 24px !important; border: 0 !important; border-radius: 16px !important;
  text-align: center; box-shadow: 0 6px 20px rgba(12,35,64,.10);
}
.widget.mav-widget--blue  { background: #003087 !important; color: #fff; }
.widget.mav-widget--light { background: #eef4fb !important; color: #003087; }

.mav-widget::before {
  content: ""; position: absolute; right: -70px; top: -70px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,.07); pointer-events: none;
}
.mav-widget--light::before { background: rgba(0,48,135,.05); }

.mav-widget .mav-widget__eyebrow {
  position: relative; display: inline-block; margin-bottom: 10px; padding: 4px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.mav-widget--blue  .mav-widget__eyebrow { background: rgba(0,174,239,.22); color: #7fd8f7; }
.mav-widget--light .mav-widget__eyebrow { background: rgba(0,48,135,.08); color: #003087; }

.mav-widget .mav-widget__title {
  position: relative; margin: 0 0 20px !important; padding: 0 !important;
  font-size: 21px !important; font-weight: 700 !important; line-height: 1.3 !important;
  text-transform: none !important; background: none !important;
}
.mav-widget--blue  .mav-widget__title { color: #fff !important; }
.mav-widget--light .mav-widget__title { color: #003087 !important; }

.mav-widget .mav-widget__cover { position: relative; display: block; width: 72%; max-width: 210px; margin: 0 auto 24px; }
.mav-widget .mav-widget__cover img {
  display: block; width: 100% !important; height: auto !important; border-radius: 6px;
  box-shadow: 0 12px 28px rgba(0,0,0,.30); transform: rotate(-2deg);
  transition: transform .3s ease, box-shadow .3s ease;
}
.mav-widget .mav-widget__cover:hover img { transform: rotate(0) translateY(-4px); box-shadow: 0 16px 34px rgba(0,0,0,.34); }

.mav-widget .mav-widget__btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: 24px; font-size: 14px; font-weight: 700; line-height: 1.2;
  text-decoration: none !important; transition: background-color .2s ease, transform .2s ease;
}
.mav-widget .mav-widget__btn:hover, .mav-widget .mav-widget__btn:focus { transform: translateY(-1px); }
.mav-widget--blue  .mav-widget__btn { background: #00aeef; color: #fff !important; }
.mav-widget--blue  .mav-widget__btn:hover, .mav-widget--blue .mav-widget__btn:focus { background: #0098d1; }
.mav-widget--light .mav-widget__btn { background: #003087; color: #fff !important; }
.mav-widget--light .mav-widget__btn:hover, .mav-widget--light .mav-widget__btn:focus { background: #0c2340; }

/* =========================================================
   Sidebar Quicklinks widget
   ========================================================= */
.widget.mav-links {
  position: relative; overflow: hidden; margin-bottom: 24px;
  padding: 26px 16px 14px !important; border: 0 !important; border-radius: 16px !important;
  background: #eef4fb !important; box-shadow: 0 6px 20px rgba(12,35,64,.08);
}
.mav-links .mav-links__title {
  position: relative; margin: 0 8px 16px !important; padding: 0 0 12px !important;
  color: #003087 !important; font-size: 21px !important; font-weight: 700 !important;
  line-height: 1.3 !important; text-transform: none !important; background: none !important;
}
.mav-links .mav-links__title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 32px; height: 3px; border-radius: 3px; background: #00aeef;
}
.mav-links ul.mav-links__list { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.mav-links .mav-links__list li { margin: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; }
.mav-links .mav-links__list li::before { display: none !important; }
.mav-links .mav-links__list a {
  display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px;
  color: #0c2340 !important; font-size: 15px; font-weight: 600; line-height: 1.35;
  text-decoration: none !important; transition: background-color .2s ease, color .2s ease;
}
.mav-links .mav-links__list a > i:first-child {
  flex: 0 0 auto; width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #fff; color: #003087; font-size: 15px;
  box-shadow: 0 1px 4px rgba(12,35,64,.08); transition: background-color .2s ease, color .2s ease;
}
.mav-links .mav-links__list a > i:last-child {
  margin-left: auto; font-size: 12px; color: #7a8aa6; transition: transform .2s ease, color .2s ease;
}
.mav-links .mav-links__list a:hover,
.mav-links .mav-links__list a:focus { background: #fff; color: #003087 !important; }
.mav-links .mav-links__list a:hover > i:first-child,
.mav-links .mav-links__list a:focus > i:first-child { background: #003087; color: #fff; }
.mav-links .mav-links__list a:hover > i:last-child,
.mav-links .mav-links__list a:focus > i:last-child { transform: translateX(3px); color: #00aeef; }

/* =========================================================
   Sidebar section menu (<%cmsPanelMenu%>)
   ========================================================= */
.widget.mav-submenu {
  margin-bottom: 24px; padding: 12px !important;
  border: 1px solid #e3e8f0 !important; border-radius: 16px !important;
  background: #fff !important; box-shadow: 0 6px 20px rgba(12,35,64,.06);
}
.mav-submenu ul { list-style: none !important; margin: 0 !important; padding: 0 !important; background: none !important; }
.mav-submenu li { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
.mav-submenu li::before { display: none !important; }

.mav-submenu a {
  position: relative; display: flex !important; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 2px !important; padding: 11px 14px !important; border: 0 !important; border-radius: 10px;
  background: transparent !important; color: #0c2340 !important;
  font-family: inherit !important; font-size: 15px !important; font-weight: 600 !important; line-height: 1.35 !important;
  text-decoration: none !important; text-transform: none !important;
  transition: background-color .2s ease, color .2s ease;
}
.mav-submenu a::after {
  content: ""; flex: 0 0 auto; width: 7px; height: 7px;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor;
  transform: rotate(45deg); opacity: 0; transition: opacity .2s ease, transform .2s ease;
}
.mav-submenu a:hover,
.mav-submenu a:focus { background: #eef4fb !important; color: #003087 !important; }
.mav-submenu a:hover::after,
.mav-submenu a:focus::after { opacity: .7; transform: translateX(2px) rotate(45deg); }

/* Current page */
.mav-submenu .active > a, .mav-submenu a.active,
.mav-submenu .current > a, .mav-submenu a.current,
.mav-submenu .selected > a, .mav-submenu a.selected,
.mav-submenu a[aria-current] { background: #003087 !important; color: #fff !important; }
.mav-submenu .active > a::after, .mav-submenu a.active::after,
.mav-submenu .current > a::after, .mav-submenu a.current::after,
.mav-submenu .selected > a::after, .mav-submenu a.selected::after,
.mav-submenu a[aria-current]::after { opacity: 1; }

/* Second-level pages */
.mav-submenu ul ul { margin: 2px 0 6px 14px !important; padding-left: 10px !important; border-left: 2px solid #e3e8f0 !important; }
.mav-submenu ul ul a { font-size: 14px !important; font-weight: 500 !important; padding: 8px 12px !important; }

/* =========================================================
   Home page: Upcoming Events cards
   ========================================================= */
.event_sec .row > [class*="col-"] { display: flex; }
.event_sec .block {
  position: relative; flex: 1 1 auto; display: flex; align-items: flex-start; gap: 22px;
  margin: 0 0 28px !important; padding: 26px 26px 58px !important;
  border: 1px solid #e3e8f0; border-radius: 16px; background: #fff !important;
  box-shadow: 0 4px 16px rgba(12,35,64,.06);
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.event_sec .block:hover { transform: translateY(-3px); border-color: #c9d6ea; box-shadow: 0 12px 28px rgba(12,35,64,.12); }

/* Date badge */
.event_sec .date_info {
  flex: 0 0 76px; width: 76px !important; margin: 0 !important; padding: 0 !important;
  overflow: hidden; border-radius: 12px; background: #eef4fb !important; text-align: center;
}
.event_sec .date_info,
.event_sec .date_info * { color: #003087 !important; background-color: transparent !important; border: 0 !important; }
.event_sec .date_info > :first-child {
  display: block; padding: 6px 0 !important; background-color: #003087 !important; color: #fff !important;
  font-size: 13px !important; font-weight: 700 !important; letter-spacing: .12em; text-transform: uppercase;
}
.event_sec .date_info > :first-child * { color: #fff !important; }

/* Text column: fixed height with a soft fade */
.event_sec .detail {
  flex: 1 1 auto; min-width: 0; height: 200px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}

/* Title */
.event_sec .detail h3 { margin: 0 0 8px !important; font-size: 19px !important; line-height: 1.3 !important; }
.event_sec .detail h3 a { color: #0c2340 !important; text-decoration: none !important; transition: color .2s ease; }
.event_sec .block:hover .detail h3 a { color: #003087 !important; }
.event_sec .detail h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 16px; }

/* Consistent description text */
.event_sec .detail > :not(h3),
.event_sec .detail > :not(h3) * {
  margin: 0 !important; padding: 0 !important; font-family: inherit !important;
  font-size: 15px !important; font-weight: 400 !important; font-style: normal !important;
  line-height: 1.55 !important; color: #4a5568 !important; background: none !important;
  text-align: left !important; list-style: none !important;
}
.event_sec .detail > :not(h3) + :not(h3) { margin-top: 6px !important; }
.event_sec .detail img { display: none !important; }

/* Date line under the title */
.event_sec .detail > h3 + *,
.event_sec .detail > h3 + * * {
  margin-bottom: 8px !important; font-size: 13px !important; font-weight: 700 !important;
  letter-spacing: .06em; text-transform: uppercase; color: #00a0dc !important;
}

/* "View event" label */
.event_sec .block::after {
  content: "View event \2192"; position: absolute; left: 124px; bottom: 22px;
  color: #003087; font-size: 14px; font-weight: 700; transition: transform .2s ease;
}
.event_sec .block:hover::after { transform: translateX(4px); }

@media (max-width: 575px) {
  .event_sec .block { gap: 16px; padding: 20px 18px 54px !important; }
  .event_sec .date_info { flex-basis: 62px; width: 62px !important; }
  .event_sec .block::after { left: 96px; }
}

/* Events: also style description text that isn't wrapped in a paragraph */
.event_sec .detail {
  font-family: inherit !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
  color: #4a5568 !important;
}

/* =========================================================
   Pasted-formatting clean-up (site-wide content areas)
   ========================================================= */
.main_content [style*="font-family"],
.event_sec   [style*="font-family"],
.card_sec    [style*="font-family"],
.main_content font[face],
.event_sec   font[face],
.card_sec    font[face] {
  font-family: inherit !important;
}

.main_content [style*="color: rgb(0, 0, 0)"],
.main_content [style*="color:rgb(0,0,0)"],
.main_content [style*="color: #000000"],
.main_content [style*="color:#000000"],
.main_content [style*="color: black"],
.main_content font[color="#000000"],
.event_sec   [style*="color: rgb(0, 0, 0)"],
.event_sec   [style*="color:rgb(0,0,0)"],
.event_sec   [style*="color: #000000"],
.event_sec   [style*="color:#000000"],
.event_sec   [style*="color: black"],
.event_sec   font[color="#000000"],
.card_sec    [style*="color: rgb(0, 0, 0)"],
.card_sec    [style*="color:rgb(0,0,0)"],
.card_sec    [style*="color: #000000"],
.card_sec    [style*="color:#000000"],
.card_sec    [style*="color: black"],
.card_sec    font[color="#000000"] {
  color: inherit !important;
}

.main_content span[style*="font-size"],
.event_sec   span[style*="font-size"],
.card_sec    span[style*="font-size"],
.main_content font[size],
.event_sec   font[size],
.card_sec    font[size] {
  font-size: inherit !important;
}

/* Text pasted from Word / Outlook (MsoNormal etc.): reset colour, font and size */
.main_content [class*="Mso"], .main_content [class*="Mso"] *,
.event_sec   [class*="Mso"], .event_sec   [class*="Mso"] *,
.card_sec    [class*="Mso"], .card_sec    [class*="Mso"] * {
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  background: none !important;
}

/* Outlook's default near-black text colour */
.main_content [style*="color: rgb(36, 36, 36)"],
.event_sec   [style*="color: rgb(36, 36, 36)"],
.card_sec    [style*="color: rgb(36, 36, 36)"] {
  color: inherit !important;
}

/* =========================================================
   Home page: "Valuing mathematics in society" banner
   ========================================================= */
.society_sec.mav-hero { position: relative; overflow: hidden; }
.society_sec.mav-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(90deg, rgba(12,35,64,.94) 0%, rgba(0,48,135,.80) 42%, rgba(0,48,135,.10) 100%) !important;
  opacity: 1 !important; pointer-events: none;
}
.society_sec.mav-hero .container { position: relative; z-index: 1; }
.society_sec.mav-hero .block { max-width: 640px; margin: 0 !important; padding: 0 !important; background: none !important; text-align: left; }

.mav-hero .mav-hero__eyebrow {
  display: inline-block; margin-bottom: 16px; padding: 5px 14px; border-radius: 20px;
  background: rgba(0,174,239,.22); color: #7fd8f7;
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.mav-hero .mav-hero__title {
  margin: 0 0 16px !important; color: #fff !important;
  font-size: 44px !important; font-weight: 700 !important; line-height: 1.15 !important; text-transform: none !important;
}
.mav-hero .mav-hero__text { margin: 0 0 32px !important; color: rgba(255,255,255,.88) !important; font-size: 20px !important; line-height: 1.55 !important; }

.mav-hero .mav-hero__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.mav-hero .mav-hero__btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px !important;
  border: 2px solid transparent; border-radius: 30px !important;
  font-size: 15px !important; font-weight: 700 !important; line-height: 1.2 !important;
  letter-spacing: 0 !important; text-transform: none !important; text-decoration: none !important; box-shadow: none !important;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.mav-hero .mav-hero__btn i { transition: transform .2s ease; }
.mav-hero .mav-hero__btn:hover, .mav-hero

/* =========================================================
   Home page: newsletter sign-up card
   ========================================================= */
.newsletter_sec.mav-cta { position: relative !important; margin: 0 !important; padding: 56px 0 !important; background: #fff !important; transform: none !important; }
.newsletter_sec.mav-cta::before,
.newsletter_sec.mav-cta::after { display: none !important; }

.mav-cta .mav-cta__card {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 28px;
  padding: 36px 40px; border-radius: 20px; background: #eef4fb;
}
.mav-cta .mav-cta__card::before {
  content: ""; position: absolute; right: -80px; top: -80px;
  width: 240px; height: 240px; border-radius: 50%; background: rgba(0,48,135,.05); pointer-events: none;
}
.mav-cta .mav-cta__icon {
  flex: 0 0 auto; width: 64px; height: 64px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #003087; color: #fff; font-size: 26px;
}
.mav-cta .mav-cta__text { position: relative; flex: 1 1 auto; min-width: 0; }
.mav-cta .mav-cta__title {
  margin: 0 0 6px !important; padding: 0 !important; color: #003087 !important;
  font-size: 26px !important; font-weight: 700 !important; line-height: 1.25 !important; text-transform: none !important;
}
.mav-cta .mav-cta__desc { margin: 0 !important; color: #4a5568 !important; font-size: 16px; line-height: 1.55; }

.mav-cta .mav-cta__actions { position: relative; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mav-cta .mav-cta__btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 32px; border-radius: 30px;
  background: #003087; color: #fff !important; font-size: 15px; font-weight: 700; line-height: 1.2;
  text-decoration: none !important; transition: background-color .2s ease, transform .2s ease;
}
.mav-cta .mav-cta__btn i { transition: transform .2s ease; }
.mav-cta .mav-cta__btn:hover, .mav-cta .mav-cta__btn:focus { background: #0c2340; transform: translateY(-2px); }
.mav-cta .mav-cta__btn:hover i, .mav-cta .mav-cta__btn:focus i { transform: translateX(3px); }
.mav-cta .mav-cta__link {
  color: #003087 !important; font-size: 14px; font-weight: 600;
  text-decoration: underline !important; text-underline-offset: 3px; text-decoration-color: rgba(0,48,135,.35) !important;
}
.mav-cta .mav-cta__link:hover { text-decoration-color: #00aeef !important; }

@media (max-width: 767px) {
  .mav-cta .mav-cta__card { flex-direction: column; align-items: flex-start; padding: 28px 24px; gap: 18px; }
  .mav-cta .mav-cta__actions { align-items: flex-start; }
}

/* Home page news: interim tidy-up until the card styles are added */
.mav-news .mav-news__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 28px;
  padding-bottom: 14px; border-bottom: 1px solid #e3e8f0;
}
.mav-news .mav-news__head h2 { margin: 0 !important; color: #003087 !important; text-transform: none !important; }
.mav-news .mav-news__head .news_link { position: static !important; margin: 0 !important; color: #003087 !important; font-weight: 700; text-transform: none !important; }
.mav-news .mav-news__list { max-width: 900px; }