.govuk-main-wrapper {
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 55px;
  display: block;
}

/* Added this :after pseudo-element to sectionalize footer below */
.govuk-main-wrapper::after {
  content: "";
  display: block;
  clear: both;
}

.gdsc-hero {
  width: 100vw;
  height: 410px;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.has-gdsc-gray-600-background-color {
  background-color: #184369;
}

.gdsc-hero .govuk-width-container {
  display: flex;
  flex-wrap: wrap;
  clear: both;
}

.gdsc-hero h1 {
  font-size: 48px;
  font-family: "GDS Transport Bold";
  line-height: 67px;
  font-weight: bold;
  -webkit-font-smoothing: antialiased;
  display: block;
  margin-top: 80px;
  margin-bottom: 80px;
  color: #fff !important;
}

.gdsc-hero__image {
  object-fit: cover;
  height: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  width: 100%;
}

.govuk-main-wrapper .rich-text>div+* {
  margin-top: 50px;
}


/* *** 3-COLUMN IMAGE CARDS STARTS HERE *** */

.is-layout-flex {
  display: flex;
  flex-direction: row;
  gap: 2em;
  margin-bottom: 30px;
  margin-top: 50px;
}

.gdsc-image-card__wrapper {
  display: flex;
  flex-direction: column-reverse;
  position: relative;
}


.is-layout-flex .is-layout-flow:nth-child(1) .gdsc-image-card__wrapper {
  border-top: 10px solid #e7dc32;
}

.is-layout-flex .is-layout-flow:nth-child(2) .gdsc-image-card__wrapper {
  border-top: 10px solid#3cd26e;
}

.is-layout-flex .is-layout-flow:nth-child(3) .gdsc-image-card__wrapper {
  border-top: 10px solid #15d7fa;
}

/*
.has-gdsc-blue-400-border-color {
  border-color: #1c2835 !important;
}
*/
.gdsc-hero__image-wrapper {
  width: auto;
  padding-left: 0;
}

.gdsc-image-card__text-wrapper {
  width: auto;
  padding-left: 0;
  margin-top: 30px;
}

h3 {
  color: #0b0c0c;
  font-family: "GDS Transport Bold" !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 700;
  font-size: 27px !important;
  line-height: 1.1111111111;
  display: block;
  margin-top: 0;
  margin-bottom: 15px;
}

h4 {
  margin: 21px 0 18px 0;
  font-family: "GDS Transport Bold" !important;
  font-size: 24px;
  font-stretch: normal;
  font-style: normal;
  line-height: 1.25;
  letter-spacing: normal;
  color: #0b0c0c;
}

.gdsc-image-card__heading a::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
}

.gdsc-image-card .gdsc-image-card__wrapper .gdsc-image-card__text-wrapper .gdsc-image-card__description p {
  font-size: 19px;
  position: relative;
  z-index: 2;
  margin-top: 25px;
  overflow-wrap: break-word;
  word-break: break-word;
  color: #0b0c0c;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 20px;
  font-family: "GDS Transport Light";
  min-height: 142px;
}

.gdsc-image-card__image-wrapper {
  width: auto;
  margin: 0;
}

.gdsc-image-card__image-wrapper>:first-child {
  position: relative;
  display: flex;
  height: 181px;
}

.gdsc-image-card--with-image .gdsc-image-card__text-wrapper {
  width: auto;
  padding-left: 0;
  margin-top: 30px;
}

.gdsc-image-card__image {
  position: absolute;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.has-custom-width {
  max-width: none;
}

.govuk-link-text {
  font-family: "GDS Transport Bold";
  font-size: 19px;
  color: #0b0c0c;
  line-height: 1.38em;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.govuk-link-text:hover {
  border-bottom: 4px solid currentColor;
}

.govuk-link-text:focus {
  outline: 3px solid transparent;
  color: #0b0c0c;
  background-color: #fd0;
  box-shadow: 0 -2px #fd0, 0 4px #0b0c0c;
  text-decoration: none;
  border-bottom: 0;
}

.has-gdsc-gray-background-color {
  background-color: #f3f3f4;
  display: flex;
  justify-content: center;
}

.govuk-video-wrapper {
  padding-top: 1px;
  padding-bottom: 88px;
  margin-top: 0;

}

.govuk-video-container {
  position: relative;
  width: 100%;
  max-width: 960px;
  padding-bottom: 56.25%;
  height: 0;
}

.govuk-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding-top: 15px;
}
@media only screen and (max-width: 1023px) {
  .gdsc-hero .gdsc-hero__content>* {
    padding-left : 14px;
  }
}
/* *** 3-COLUMN IMAE CARDS SECTION ENDS HERE *** */

@media (min-width: 641px) {
  .gdsc-hero .gdsc-hero__content {
    flex: 1 1 66.666%;
    display: flex;
    align-items: center;
    height: 410px;
  }

  .gdsc-hero .gdsc-hero__content p {
    font-size: 48px;
  }

  .gdsc-hero .gdsc-hero__content>* {
    padding-right: 60px;
    max-width: 528px;
  }

  .gdsc-hero__image-wrapper {
    width: 33%;
  }

  .gdsc-hero__image {
    max-width: 100vw;
    min-width: 100%;
  }

  .gdsc-hero__image-wrapper {
    width: 33%;
    height: 410px;
  }

  .govuk-grid-column-two-thirds .gdsc-image-card--with-image .alignwide {
    width: calc(150% + 15px);
  }

  .page__content {
    padding-left: 14px;
  }

  .govuk-grid-column-two-thirds {
    box-sizing: border-box;
    width: 100%;
    /* padding: 0 15px;   */
  }

  .govuk-main-wrapper .rich-text>div+* {
    margin-top: 60px;
  }

  h2,
  p {
    color: #0b0c0c;
    -webkit-font-smoothing: antialiased;
    font-weight: 700;
    display: block;
    font-size: 36px;
    line-height: 40px;
    margin-top: 18px;
    text-size-adjust: 100%;
    font-family: "GDS Transport Bold";
  }

  p {
    font-weight: 400;
    font-size: 19px;
    line-height: 25px;
    margin-bottom: 10px;
    font-family: "GDS Transport Light"
  }


  .gdsc-image-card--with-image {
    width: 272px;
    left: 0;
    margin-left: 0;
  }

  .gdsc-image-card {
    position: relative;
  }

  .govuk-grid-column-two-thirds .alignwide {
    width: calc(150% + 15px);
  }

  .is-layout-flow:not(:first-child) {
    margin-left: 26px;
  }
}

@media only screen and (min-width: 768px) and (max-width: 912px) {
  .gdsc-hero__image-wrapper {
    height: 25rem;
  }
}

@media (max-width: 640.98px) {
  .gdsc-hero .govuk-width-container {
    flex-direction: column;
  }

  .govuk-main-wrapper .rich-text>*+h2 {
    margin-top: 30px;
    padding-top: 0;
  }
}

@media (min-width: 40.0625em) {
  .page__content {
    overflow-x: hidden;
    width: auto;
  }

  .govuk-main-wrapper .rich-text>div+* {
    margin-top: 70px;
  }

  .govuk-grid-column-two-thirds {
    width: 66.6666%;
    float: left;
  }

  .govuk-main-wrapper .rich-text>*+h2 {
    margin-top: 50px;
  }

  .govuk-heading-l,
  .gdsc-hero p,
  h2 {
    font-size: 57px;
    font-size: 2.25rem;
    line-height: 1.1111111111;
    margin-top: 65px;
    text-align: center;
  }


  .govuk-body,
  p,
  .govuk-body-m {
    font-size: 19px;
  }

  .govuk-video-wrapper {
    padding-left: 14px;
    padding-right: 14px;

  }

}

@media (min-width: 1020px) {
  .gdsc-hero__image {
    width: calc(100% + ((100vw - 960px) / 2));
  }

}

@media (min-width: 960px) and (max-width: 1019px) {
  .gdsc-hero__image {
    width: calc(100% + ((100vw - 960px) / 2));
  }
}

/* MEDIA QUERIES */

/* MOBILE DEVICES */
@media screen and (max-width: 480px) {
  .gdsc-hero .gdsc-hero__content>* {
    padding-left: 14px;
    padding-right: 14px;
  }

  .gdsc-hero {
    height: 100%;
  }

  .alignwide {
    display: flex;
    flex-direction: column;
  }

  .is-layout-flex {
    margin-bottom: 0px;
  }

  .gdsc-hero__content h1 {
    height: auto;
    margin: 35px 14px 0px 0;
    font-size: 32px;
    font-weight: bold;
    font-stretch: normal;
    font-style: normal;
    line-height: 1.53;
    letter-spacing: normal;
  }

  .govuk-link-text {
    width: 100%;
    margin-top: 10px;
  }

  .rich-text h2,
  .govuk-video-wrapper h2 {
    font-size: 32px;
    line-height: 42px;
    padding-left: 14px;
    padding-right: 14px;
    margin-top: 70px;
    margin-bottom: 22px;
    font-weight: bold;
    font-family: "GDS Transport Bold";
  }
  .rich-text h2{
    text-align: center;
  }
  .rich-text h2~p {
    padding: 0 14px;
    margin-bottom: 20px;
  }


  .rich-text p {
    font-size: 16px;
    font-weight: 300;
    padding-top: 14px;
    font-stretch: normal;
    font-style: normal;
    line-height: 1.39;
    letter-spacing: normal;
    color: #0b0c0c;
    font-family: "GDS Transport Light";
  }

  .govuk-width-container--hero__image-wrapper {
    display: flex;
    flex-direction: column-reverse !important;
    background-color: #184369;
  }

  .is-layout-flow {
    padding: 14px;
  }

  .gdsc-hero__image-wrapper {
    margin-top: 0;
    width: 100%;
    height: 12em;
  }

  .page__content {
    width: 100vw;
    overflow-x: hidden;
  }

  .gdsc-hero__content {
    margin-bottom: 33px;
  }

  .gdsc-image-card__description p {
    font-size: 18px;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
  }

  .alignwide .is-layout-flow:last-child {
    margin-bottom: 0px;
  }

  .gdsc-image-card .gdsc-image-card__wrapper .gdsc-image-card__text-wrapper .gdsc-image-card__description p {
    min-height: 96px;
  }

  .govuk-video-wrapper {
    padding-left: 14px;
    padding-right: 14px;

  }

  .govuk-motGoal-infoSection {
    padding-bottom: 0px;
  }

  .govuk_motGoal-choice {
    text-align: center;
    margin: 20px 0 30px 0;
  }

  .govuk_motPillar-choice {
    text-align: center;
  }

}

/* TABLET DEVICES */
@media only screen and (min-width: 480px) and (max-width: 912px) and (-webkit-min-device-pixel-ratio: 1) {
  .gdsc-hero .gdsc-hero__content>* {
    padding-left: 14px;
  }

  .gdsc-hero {
    height: 100%;
  }


  .alignwide {
    display: flex;
    flex-direction: column;
  }

  .gdsc-hero__content h1 {
    padding: 0 14px 0 14px;
    margin: 63px 14px 0 0;
    font-size: 48px;
    font-weight: bold;
    font-stretch: normal;
    font-style: normal;
    line-height: 1.53;
    letter-spacing: normal;
  }

  .govuk-link-text {
    width: 100%;
    margin-top: 10px;
  }

  .rich-text h2,
  .govuk-video-wrapper h2 {
    font-size: 32px;
    line-height: 42px;
    padding-left: 14px;
    padding-right: 14px;
    margin-top: 70px;
    margin-bottom: 22px;
    font-weight: bold;
  }

  .rich-text h2~p {
    padding: 0 14px;
    margin-bottom: 20px;
  }

.govuk-motGoal-infoSection.rich-text ul {
  padding: 0 14px;
}

  .rich-text p {
    font-size: 18px;
    font-weight: 300;
    font-stretch: normal;
    font-style: normal;
    line-height: 1.39;
    letter-spacing: normal;
    color: #0b0c0c;
  }

  .govuk-width-container--hero__image-wrapper {
    display: flex;
    flex-direction: column-reverse !important;
    background-color: #184369;
  }


  .gdsc-hero__image-wrapper {
    margin-top: 0;
    width: 100%;
  }

  .gdsc-hero__content {
    margin-bottom: 55px;
    display: flex;
    align-content: center;
  }

  .gdsc-hero__content p {
    padding-left: 14px;
    padding-bottom: 40px;
  }

  .gdsc-image-card__description p {
    font-size: 18px;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
  }

  .alignwide .is-layout-flow:last-child {
    margin-bottom: 0px;
  }

  .page__content {
    padding-left: 0;
  }

  .govuk-grid-column-two-thirds {
    width: 100%;
    overflow-x: hidden;
  }

  .is-layout-flex {
    width: 100%;
    margin: auto;
  }

  .is-layout-flow:last-child {
    margin-bottom: 0;
  }

  .is-layout-flow:not(:first-child) {
    margin-left: 0;
  }


  .govuk-grid-column-two-thirds .alignwide {
    width: auto;
  }

  .gdsc-image-card {
    width: auto;
    padding: 14px;
  }

  .gdsc-image-card__image {
    position: absolute;
    height: 100%;
    object-fit: cover;
    width: 100%;
  }

  img {
    display: block;
    max-width: 100%;
    height: auto;
  }

  .gdsc-image-card__image-wrapper>:first-child {
    position: relative;
    display: flex;
    height: 465px;
  }

  .gdsc-image-card .gdsc-image-card__wrapper .gdsc-image-card__text-wrapper .gdsc-image-card__description p {
    min-height: 32px;
  }

  .govuk-video-wrapper {
    padding-left: 14px;
    padding-right: 14px;

  }
}

/* General Styles */
.govuk-full-width-wrapper {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* Section Styles */
.govuk-zeropadding section {
  margin-top: 0;
}

/* Heading Styles */
.govuk-motheading,
.govuk_motPillars-choice {
  text-align: center;
}

.govuk_motGoal-choice {
  text-align: center;
  margin: 90px 8.9px 49.8px 14.1px;
}

.govuk_motPillar-choice {
  text-align: center;
}

.govuk-digitalMOT {
  display: flex;
  justify-content: center;

}


/* Midlife MOT Info Section */
.govuk-motGoal-infoSection {
  padding-top: 5px;
  padding-bottom: 80px;
  max-width: 743px;
  width: 100%;
  text-align: left;
}
.govuk-motGoal-infoSection.rich-text ul {
  list-style-type: initial;
}
.govuk-motGoal-infoSection.rich-text li {
  font-family: "GDS Transport Light";
  font-weight: 400;
  font-size: 19px;
  line-height: 25px;
  margin-bottom: 10px;
  margin:  14px;
 }
/* MOT Goal Image Card Styles */
.gdsc-motGoal-image-card__wrapper {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  gap: 3.625rem;
  border-top: 10px solid #184369 !important;
}

.gdsc-motGoal-image-card--with-image .gdsc-motGoal-image-card__wrapper {
  flex-direction: row-reverse;
}


/* MOT Goal Button Styles */
.gdsc-motGoal-image-card__link-text-wrapper {
  margin-top: 24.2px;
}

.govuk-button {
  font-family: "GDS Transport Light";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.1875;
  box-sizing: border-box;
  display: inline-block;
  position: relative;
  padding: 8px 10px 7px;
  border: 2px solid #0000;
  border-radius: 0;
  color: #fff;
  background-color: #00703c;
  box-shadow: 0 2px 0 #002d18;
  text-align: center;
  vertical-align: top;
  cursor: pointer;
  text-decoration: none;
}
.govuk-button:focus:not(:active):not(:hover) {
  border-color: #fd0;
  color: #0b0c0c;
  background-color: #fd0;
  box-shadow: 0 2px 0 #0b0c0c;
}
.govuk-button:focus {
  border-color: #fd0;
  outline: 3px solid rgba(0,0,0,0);
  box-shadow: inset 0 0 0 1px #fd0;
}
.govuk-button:hover {
  background-color: #005a30;
}

/* Separator Styles */
.hr-sect {
  display: flex;
  flex-basis: 100%;
  align-items: center;
  margin-top: 82.2px;
  font-family: "GDS Transport Light";
  font-size: 24px;
  font-weight: 300;
  font-stretch: normal;
  font-style: normal;
  line-height: 1.04;
  letter-spacing: normal;
  text-align: center;
  color: #626a6e;
}

.hr-sect:before,
.hr-sect:after {
  content: "";
  flex-grow: 1;
  background: #979797;
  height: 1px;
  font-size: 0px;
  line-height: 0px;
  margin: 0px 8px;
}


/* Responsive Styles */

@media only screen and (max-width: 1023px) {
  .govuk_motGoal {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .gdsc-motGoal-image-card--with-image .gdsc-motGoal-image-card__wrapper {
    flex-direction: column-reverse;
  }

  .gdsc-motGoal-image-card__wrapper {
    border-top: none;
  }

  .gdsc-motGoal-image-card__image-wrapper {
    max-width: 100%;
    overflow: hidden;
  }

  .gdsc-motGoal-image-card__image {
    width: 100%;
    height: auto;
    /* border-top: 10px solid #0a5761; */
  }
}

@media (min-width: 641px) {
  .gdsc-motGoal-image-card--with-image .gdsc-motGoal-image-card__text-wrapper {
    width: 50%;
  }

  .gdsc-motGoal-image-card__image-wrapper {
    width: 50%;
  }
}

@media (min-width: 480px) and (max-width: 1024px) {
  .gdsc-motGoal-image-card__image-wrapper {
    width: 100%;
  }

  .gdsc-otGoal-image-card--with-image .gdsc-otGoal-image-card__text-wrapper {
    padding-left: 0px;
    width: auto;
  }

  .gdsc-motGoal-image-card--with-image .gdsc-motGoal-image-card__text-wrapper {
    width: 100%;
    padding-left: 0;
  }
}

@media only screen and (max-width: 1023px) {

  .govuk_motGoal,
  .hr-sect {
    margin-left: 14px;
    margin-right: 14px;
  }

  .gdsc-motGoal-image-card__link-text-wrapper {
    text-align: center;
  }

  .govuk-button {
    width: 100%;
  }

  .hr-sect {
    margin-top: 40px;
    margin-bottom: 0;
  }

  .gdsc-motGoal-image-card__wrapper {
    gap: 1.375rem;
  }

  .govuk_motGoal-choice {
    text-align: center;
    margin: 20px 0 30px 0;
  }

  h4 {
    font-family: "GDS Transport Bold" !important;
    font-size: 18px;
    margin-bottom: 10px;
    margin-top: 0;
    color: #0b0c0c;
  }
}

@media only screen and (max-width: 599px) {

  .govuk_motGoal,
  .hr-sect {
    text-align: justify;
  }

  .govuk-motGoal-infoSection{
    text-align: left;
  }

  .gdsc-motGoal-image-card__link-text-wrapper {
    text-align: center;
  }

  .govuk-motGoal-infoSection {
    padding-bottom: 60px;

  }
  .govuk-motGoal-infoSection.rich-text ul {
    padding: 0 14px;
   }
   .govuk-motGoal-infoSection.rich-text li {
    font-family: "GDS Transport Light";
    font-weight: 500;
    font-size: 17px;
    line-height: 25px;
   }
}