/*
 * Responsive fixes for the public site. Loaded after css/main.css so it only adjusts layout:
 * colors, fonts and the theme are unchanged.
 */

/* Home page: "Our services" cards (white rounded tiles with a shadow, coloured icon and title) */
.service-card {
  width: 180px;
  height: 180px;
  margin: 0 auto;
  background: #fff;
  border-radius: 40px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-card i {
  font-size: 56px;
}
.service-title {
  font-size: 34px;
  font-weight: 300;
  text-transform: uppercase;
  margin: 18px 0 0;
  line-height: 1.1;
}
.service-text {
  font-size: 15px;
  color: #555;
  margin-top: 8px;
}

@media (max-width: 767.98px) {
  .service-card {
    width: 130px;
    height: 130px;
    border-radius: 30px;
  }
  .service-card i {
    font-size: 40px;
  }
  .service-title {
    font-size: 22px;
  }
}

/* About Us: "Our services" cards. The original cards had fixed 200px tiles with oversized text,
   so the icon and title spilled over the edges. Size the tile to its content instead. */
.about-us-page .cards-list .card {
  width: 200px;
  height: auto;
  min-height: 200px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.about-us-page .cards-list .card_image {
  width: 100%;
  height: auto;
  gap: 12px;
}
.about-us-page .cards-list .card-about {
  font-size: 36px;
  line-height: 1;
}
.about-us-page .cards-list .card-about h5 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: center;
}
@media (max-width: 767.98px) {
  .about-us-page .cards-list .card {
    width: 180px;
  }
}

/* Header buttons are <div>s so the link inside them is valid HTML (links cannot sit inside <button>) */
header .btn,
header .btn2 {
  display: inline-block;
}

/* Header top row on desktop: buttons and social icons stay on one line */
@media (min-width: 992px) {
  header .header-top {
    flex-wrap: nowrap;
    gap: 16px;
  }
  header .header-top .icons {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    white-space: nowrap;
  }
  header .header-top .icons a {
    display: inline-block;
  }
  /* The logo keeps its size; the buttons and icons make room for it */
  header .header-top .logo {
    flex: 0 0 auto;
  }
  header .header-top .logo img {
    width: auto;
    max-width: 190px;
    height: auto;
  }
  header .header-top .icons i {
    padding: 6px 5px !important;
  }
  header .header-top > .btn,
  header .header-top > .btn a {
    font-size: 13px;
    padding: 9px 12px;
  }
  header .header-top > .btn,
  header .header-top > .btn a {
    white-space: nowrap;
    padding: 10px 16px;
  }
  header .nav_buttons_user {
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 8px;
  }
  header .nav_buttons_user .btn2,
  header .nav_buttons_user .btn2 a {
    white-space: nowrap;
  }
  header .nav_buttons_user .btn2 {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* Header: space between the Online Application button and the user icon */
header .nav_buttons_user .dropdown {
  position: relative;
  display: inline-block;
  margin-left: 18px;
  margin-right: 56px; /* room on the right for the centred Employer Login menu */
  vertical-align: middle;
}

/* Header: "Employer Login" opens below the user icon instead of over the buttons */
header .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  right: auto;
  transform: translateX(-50%); /* centred under the user icon */
  /* The transparent top padding pushes the menu below the tallest button without breaking hover:
     the pointer stays on the dropdown while it moves from the icon down to the link. */
  padding-top: 24px; /* starts just below the bottom of the Online Application button */
  min-width: 170px;
  background: transparent;
  z-index: 1000;
  text-align: left;
  font-family: Montserrat, Arial, sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
}
header .dropdown:hover .dropdown-content,
header .dropdown:focus-within .dropdown-content {
  display: block;
}
header .dropdown-content a {
  display: block;
  padding: 12px 16px;
  background-color: #fff; /* same white as the website header */
  border: 1px solid #dde8ee;
  border-radius: 8px;
  box-shadow: none;
  color: #003e53 !important;
  text-decoration: none;
  white-space: nowrap;
}
header .dropdown-content a:hover {
  background-color: #fff;
  border-color: #55bce7;
  color: #c01c2f !important;
}

/* Contact page */
.contact-section {
  padding: 56px 0 64px;
  background: #f4f9fc;
}
.contact-kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #c01c2f;
  margin: 0 0 10px;
}
.contact-title {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 900;
  color: #003e53;
  line-height: 1.2;
  margin: 0 0 16px;
  text-wrap: balance;
}
.contact-lead {
  font-size: 16px;
  line-height: 1.7;
  color: #3d4a54;
  margin-bottom: 28px;
}
.contact-lead p {
  margin: 0;
}
.contact-list {
  display: grid;
  gap: 12px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #dde8ee;
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: #1d2730;
}
a.contact-item:hover {
  border-color: #55bce7;
  box-shadow: 0 4px 14px rgba(0, 62, 83, 0.08);
}
.contact-item small {
  display: block;
  font-size: 12px;
  color: #5d6b75;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.contact-item strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #003e53;
}
.contact-icon {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 50%;
  background: #e3f3fb;
  color: #003e53;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.contact-card {
  background: #fff;
  border: 1px solid #dde8ee;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0, 62, 83, 0.07);
}
.contact-card-title {
  font-size: 22px;
  font-weight: 900;
  color: #003e53;
  margin: 0 0 4px;
}
.contact-card-sub {
  font-size: 14px;
  color: #5d6b75;
  margin: 0 0 22px;
}
.contact-alert {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 18px;
}
.contact-alert-success {
  background: #e6f6ec;
  color: #14532d;
}
.contact-alert-danger {
  background: #fdecec;
  color: #8a1622;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
}
.contact-full {
  grid-column: 1 / -1;
}
.contact-form label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #003e53;
  margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #c9d8e0;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 15px;
  color: #1d2730;
  background: #fff;
  box-sizing: border-box;
  font-family: inherit;
}
.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #55bce7;
  box-shadow: 0 0 0 3px rgba(85, 188, 231, 0.25);
}
.contact-submit {
  margin-top: 22px;
  width: 100%;
  background: #c01c2f;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.contact-submit:hover {
  background: #a31626;
}
@media (max-width: 575.98px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .contact-card {
    padding: 22px 18px;
  }
}

/* Job detail page */
.job-hero {
  background: #eef6fa;
  border-bottom: 1px solid #d5e6ee;
  padding: 28px 0 32px;
}
.job-hero .breadcrumb {
  font-size: 13px;
}
.job-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  color: #003e53;
  line-height: 1.2;
  margin: 0 0 14px;
  text-wrap: balance;
}
.job-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.job-chip {
  background: #fff;
  border: 1px solid #c9dfea;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 14px;
  color: #003e53;
}
.job-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}
.job-chip i {
  font-size: 14px !important;
  line-height: 1;
  width: 16px;
  text-align: center;
  color: #185fa5;
  margin: 0;
}
.job-apply {
  display: inline-block;
  background: #c01c2f;
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 30px;
  border-radius: 6px;
}
.job-apply:hover {
  background: #a31626;
}
.job-apply-block {
  display: block;
  text-align: center;
  margin-top: 20px;
}
.job-panel {
  background: #fff;
  border: 1px solid #dde8ee;
  border-radius: 12px;
  padding: 24px;
}
.job-panel-title {
  font-size: 20px;
  font-weight: 900;
  color: #003e53;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #c01c2f;
  display: inline-block;
}
.job-description {
  font-size: 16px;
  line-height: 1.75;
  color: #1d2730;
}
.job-description p {
  margin: 0 0 14px;
}
.job-description h2,
.job-description h3,
.job-description h4 {
  font-size: 18px;
  font-weight: 700;
  color: #003e53;
  margin: 22px 0 10px;
}
.job-description ul,
.job-description ol {
  padding-left: 22px;
  margin: 0 0 16px;
}
.job-description li {
  margin-bottom: 6px;
}
.job-description strong {
  color: #003e53;
}
.job-details {
  margin: 0;
}
.job-details > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #e6eef2;
}
.job-details > div:last-child {
  border-bottom: 0;
}
.job-details dt {
  font-size: 14px;
  font-weight: 500;
  color: #5d6b75;
  margin: 0;
}
.job-details dd {
  font-size: 14px;
  font-weight: 700;
  color: #1d2730;
  margin: 0;
  text-align: right;
}
.job-note {
  font-size: 13px;
  color: #5d6b75;
  margin: 12px 0 0;
  text-align: center;
}
.job-back {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 14px;
  color: #185fa5;
  text-decoration: none;
}
@media (max-width: 767.98px) {
  .job-panel {
    padding: 18px;
  }
  .job-apply {
    width: 100%;
    text-align: center;
  }
}

/* Images never overflow their container */
img {
  max-width: 100%;
  height: auto;
}

/* Home slider: keep each slide image filling the banner without distortion */
.banner .carousel-item img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

/* Home intro: image and text sit side by side on wide screens, stack on small screens */
.homePage .img_doc {
  max-width: 100%;
  height: auto;
  width: auto;
}

/* Tablets and smaller */
@media (max-width: 991.98px) {
  .banner .carousel-item img {
    height: 380px;
  }
  .homePage .sub_amt_sec > div {
    width: 100% !important;
    padding: 0 12px;
  }
}

/* Phones */
@media (max-width: 767.98px) {
  .banner .carousel-item img {
    height: 240px;
  }

  /* Show the slide text on phones, over the image, in a smaller size */
  .banner .carousel-caption {
    display: block !important;
    top: 12%;
    bottom: auto;
    left: 12px;
    right: 12px;
    padding: 12px 14px;
    background: rgba(0, 62, 83, 0.72);
    border-radius: 6px;
  }
  .banner .carousel-caption,
  .banner .carousel-caption * {
    color: #fff !important;
  }
  .banner .carousel-caption * {
    white-space: normal !important;
    position: static !important;
    width: auto !important;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: center;
    word-break: break-word;
  }
  .banner .carousel-caption .banner-1-1,
  .banner .carousel-caption h2 {
    font-size: 22px;
    line-height: 1.2;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  }
  .banner .carousel-caption p {
    font-size: 14px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  }

  .homePage .img_doc {
    margin: 16px auto 0;
    display: block;
  }

  /* Contact strip under the banner: one column */
  .home_carousel .col-md-4,
  .carousel_extra .col-md-4 {
    width: 100%;
    padding: 10px 0;
  }

  /* Find a Job table: rows wrap instead of running off the screen */
  .find_table tr {
    flex-wrap: wrap;
    gap: 8px 16px !important;
    padding: 12px 0;
  }
  .find_table tr td,
  .find_table tr td:first-child,
  .find_table tr td:nth-child(3),
  .find_table tr td:nth-child(4),
  .find_table tr td:nth-child(5) {
    width: auto !important;
    font-size: 14px;
  }
  .find_table tr td:first-child img {
    width: 48px;
  }
  .find_table tr td:last-child {
    width: 100%;
  }

  /* Find a Job filters: full width fields */
  .findajob_section_2 {
    flex-direction: column;
    gap: 10px;
  }
  .findajob_section_2 select,
  .findajob_section_2 input,
  .findajob_section_2 .magnify,
  .findajob_section_2 a.magnify {
    width: 100% !important;
  }

  /* Page headings scale down */
  .find_heading {
    font-size: 26px !important;
  }

  /* CMS page content: wide tables scroll sideways, not the whole page */
  .cms-page table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }
  .cms-page iframe,
  .cms-page video {
    max-width: 100%;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .banner .carousel-item img {
    height: 210px;
  }
  .banner .carousel-caption .banner-1-1,
  .banner .carousel-caption h2 {
    font-size: 19px;
  }
}
