:root {
  --light-text-color: white;
  --normal-text-color: #556685;
  --dark-text-color: black;
  --tertiary-text-color: #2E627C;
  --highlight-bg-color: #CE3C22;
  --tertiary-button-text-color: #65747C;
  --tertiary-button-hover-color: #658c9f;
  --dark-bg-color: #004260;
  --light-bg-color: #2B536E;
  --section-bg-color: #f5f7f8;
  --section-box-shadow-color: #f5f7f8;
  --social-bg-color: white;
  --alert-background-color: #f8533d;
}

/* r41983 Custom styles for new image in PDF */
.resource-box__title:before {
  height: auto;
}

.resource-box .pdfpreview img {
  max-height: 140px;
  display: block;
  margin: 0 auto;
}

/* r41970 Fixing CSS issue with related news block in sidebar */
@media screen and (min-width: 55rem) {
  .layout__item--secondary .u-width-1-of-2-from-medium {
    width: 100%;
  }
}

.case-study-video.top {
  padding-top: 4rem;
}
.case-study-tile h3 {
  text-align: center;
  padding: 0.5rem;
}
.case-study-tile img {
  height: 245px; /* Set the height you want */
  object-fit: cover; /* This will prevent distortion */
  width: 100%; /* This will ensure the image takes the full width of the container */
}

/* For mobile devices */
@media (max-width: 480px) {
  .case-study-tile img {
    height: auto; /* Adjust the height as needed */
  }
}

/* For tablet devices */
@media (min-width: 481px) and (max-width: 1024px) {
  .case-study-tile img {
    height: 150px; /* Adjust the height as needed */
  }
}

/* For desktop devices */
@media (min-width: 1025px) {
  .case-study-tile img {
    height: 245px; /* Adjust the height as needed */
  }
}

.search_tiles {
  margin-top: 1.375rem;
}
.search_tiles .accordion__title {
  border-bottom: 2px solid #004160;
}

/* #50240: Change homepage header text.*/
.with-sub-title {
  padding: 7rem 0 5rem;
  font-size: 2.75rem;
  max-width: 31rem;
}

.hero__sub-title {
  /* Limit the max height and hide field's content if it goes over. */
  max-height: 250px;
  overflow: hidden;
  /* Sub-title field hidden by default on all displays/devices */
  display: none;
}

.hero__sub-title p {
  color: var(--light-text-color);
  font-size: 1.5rem;
  line-height: 2rem;
  padding-bottom: 1.35rem;
}

/* Display sub-title field for larger displays (monitors). */
@media screen and (min-width: 1130px) {
  .hero__sub-title {
    display: block;
  }
}

/* #50240: Changes to buttons on the homepage. Overrides main.css. */
.key-info-tile__icon {
  margin-bottom: 20px;
}

.key-info-tile .cta {
  font-size: 1.25rem;
}

@media screen and (min-width: 30rem) {
  .key-info-tile {
    padding: 1.9rem;
  }
}

.site-header {
  position: -webkit-sticky;
  position: sticky;
}

.site-header--placeholder {
  display: none;
}

.eu-cookie-compliance-buttons .eu-cookie-compliance-secondary-button {
  margin-top: 1em;
  padding: 0 8px;
}

.eu-cookie-compliance-buttons .eu-cookie-compliance-default-button,
.eu-cookie-compliance-buttons .eu-cookie-withdraw-button {
  margin-top: 1em;
  padding: 0 8px;
  color: var(--dark-text-color);
  background-color: var(--light-text-color);
}

/* Initial consent banner (top, in-flow) */
#sliding-popup:not(.eu-cookie-withdraw-wrapper) {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  max-height: none !important;
}

/* Privacy-settings / withdraw popup (fixed, bottom) */
#sliding-popup.eu-cookie-withdraw-wrapper {
  position: fixed !important;
  top: auto !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 99999;
  transform: none !important;
  background: none !important;
}

#sliding-popup.eu-cookie-withdraw-wrapper .eu-cookie-withdraw-banner {
  transform: none !important;
  display: none;
}

body.eu-cookie-compliance-popup-open #sliding-popup.eu-cookie-withdraw-wrapper .eu-cookie-withdraw-banner {
  display: block;
}

body:has(#sliding-popup) {
  margin-top: 0 !important;
}

#sliding-popup.eu-cookie-withdraw-wrapper .eu-cookie-withdraw-tab {
  transform: translate(-50%, -100%);
  padding: 4px 7px;
  margin: 0;
  background: var(--dark-bg-color);
  color: var(--light-text-color);
  border: none;
  border-radius: 5px 5px 0 0;
}

.header-nav__link.is-active {
  background-color: hsla(0,0%,100%,.1);
}

/* #64697: Fix color contrast accessibility issues. */
.button, .site-footer__submit,
.faq-filter-container a.faq-cat-changer, .faq-filter-container a.news-cat-changer,
.news-filter-container a.faq-cat-changer, .news-filter-container a.news-cat-changer {
  background-color: var(--highlight-bg-color);
}

.cta, .external-link, .content a.is-styled, .content a:not([class]) {
  color: var(--highlight-bg-color);
}

 .content p a.is-styled, .content p a:not([class]) {
  text-decoration: underline;
}

.button:focus, .button:hover, a:focus .button, a:hover .button {
  background-color: var(--highlight-bg-color);
}

.invert-colors {
  background-color: var(--light-text-color);
  color: var(--highlight-bg-color);
}

.button--big {
  font-size: 1.125em;
  padding: 0.75rem 1.25rem 0.75rem 1.5rem;
  height: unset;
  border-radius: 1.5em;
}

.button--big:hover {
  color: var(--light-text-color);
}

.button--big:after {
  content: url(../images/chevron-right.svg);
  display: inline-block;
  height: 1em;
  width: 1em;
  vertical-align: baseline;
  margin-left: 0.375em;
}

.button--big:hover:after {
  transform: translateX(0.3em);
  filter: brightness(0) invert(1);
}

.button--tertiary {
  background-color: transparent;
  color: var(--tertiary-button-text-color);
  box-shadow: inset 0 0 0 1px var(--tertiary-button-text-color);;
}

.button--tertiary:hover {
  background-color: var(--tertiary-button-hover-color);
}

.site-footer {
  font-size: 1em;
  background: var(--light-bg-color);
  font-weight: 500;
}

.site-footer__social-icon {
  background: var(--social-bg-color);
}

.site-footer__text--phone {
  color: inherit;
}

.site-footer__details {
  color: var(--light-text-color);
  font-size: 0.875rem;
  border-top-color: var(--light-text-color);
}

.site-footer__input,
.email.site-footer__input {
  color: var(--tertiary-text-color);
}

body {
  color: var(--normal-text-color);
}

.content-pagination__description, .h5, .news-tile__date, .page-header__category,
.refine__title, .search-result__category, .site-header__popup-bar, h5, .toc {
  color: #65747C;
}

.faq-filter-container a.faq-cat-changer.active, .faq-filter-container a.news-cat-changer.active,
.news-filter-container a.faq-cat-changer.active, .news-filter-container a.news-cat-changer.active {
  color: var(--highlight-bg-color);
  border-color: var(--highlight-bg-color);
}

.contact-message-contact-us-form .form-actions {
  text-align: center;
  margin-top: 0.5em;
}

/**
No sidebar styles
 */
.section--no-sidebar {
  width: 100%;
  height: 100%;
  padding: 40px 40px 0 40px;
  margin-bottom: 4rem;
  background: var(--section-bg-color);
  box-shadow: 0 3px 0 var(--section-bg-color);
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 40px;
  display: inline-flex;
}
.section--no-sidebar:last-child {
  margin-bottom: 0;
}

div.section--no-sidebar--title--wrapper {
  align-self: stretch;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 32px;
  display: flex;
}

.content div.section--no-sidebar--title--wrapper h2 {
  color: var(--tertiary-text-color);
  font-size: 30px;
  font-weight: 500;
  word-wrap: break-word;
  padding: 0;
}
.content div.section--no-sidebar--body--wrapper {
  margin-bottom: -2rem;
}

.section--no-sidebar--nested--wrapper {
  columns: 2;
  column-gap: 3rem;
}

/**
Modals
 */
.modal-list--container {
  display: inline-block;
}

@media screen and (max-width: 600px) {
  .section--no-sidebar--nested--wrapper {
    columns: 1;
  }
}

.paragraph--type--modal-list h3 {
  color: var(--tertiary-text-color);
  font-size: 18px;
  font-weight: 500;
  word-wrap: break-word;
  margin-bottom: 1rem;
}

.paragraph--type--modal-list .modal--items {
  align-self: stretch;
  padding-bottom: 3rem;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 16px;
  display: flex;
}

.paragraph--type--modal {
  padding: 12px 32px;
  background: var(--highlight-bg-color);
  border-radius: 40px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  display: inline-flex;
}

.paragraph--type--modal-list .paragraph--type--modal a {
  color: var(--light-text-color);
  font-size: 14px;
  font-weight: 500;
  word-wrap: break-word;
}

/**
The Dialog.
 */
.ui-dialog {
  font-family: GT Walsheim Pro, Gill Sans, Century Gothic, Franklin Gothic, sans-serif;
}

.ui-dialog .ui-dialog-titlebar {
  background: none;
  border: none;
}

.ui-dialog .ui-dialog-titlebar .ui-dialog-title {
  padding: 1rem 1rem 0 1.5rem;
  margin: 0;
  color: var(--tertiary-text-color);
  font-size: 30px;
  font-weight: 500;
  word-wrap: break-word;
  white-space: normal;
}

.ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close {
  position: relative;
  margin-top: 1.5rem;
  right: -5%;
}

.ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close .ui-button-icon {
  background-image: url('../images/icon-close.svg');
  background-position: center;
}

.ui-dialog .ui-dialog-content {
  padding: 32px 40px;
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 32px;
  word-wrap: break-word;
  color: var(--normal-text-color);
}

.ui-dialog .ui-dialog-content a {
  color: var(--highlight-bg-color);
  font-size: 18px;
  font-weight: 400;
  line-height: 32px;
  word-wrap: break-word;
}

.ui-dialog .ui-dialog-content .modal--field-link--title {
  color: var(--normal-text-color);
  font-size: 20px;
  font-weight: 400;
  line-height: 32px;
  word-wrap: break-word;
}

.ui-dialog .ui-dialog-content .modal--field-link--list {
  list-style-type: none;
  padding-left: 0;
  margin-top: 16px;
}

.ui-dialog .ui-dialog-buttonpane {
  border: none;
}

@media (min-width: 55rem) {
  .wrapper.wrapper--gutter .column-content.wrapper.wrapper--gutter > ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .wrapper.wrapper--gutter .column-content.wrapper.wrapper--gutter > ul > li {
    padding: 16px;
    margin: 0;
    width: 100%;
  }
}

.localgov-alert-banner--upd-alert {
  background: var(--alert-background-color);
}
