/*
 * Shared DriveTest Alert/Announcement archive and single-post design.
 * File location: /assets/css/drivetest-updates.css
 */

.dt-updates-page,
.dt-updates-page * {
  box-sizing: border-box;
}

.dt-updates-page {
  width: 100%;
  margin: 0;
  padding: 0;
  color: #000000;
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
}

/* Shared full-width image hero. */
.dt-updates-hero {
  position: relative;
  z-index: 0;
  display: flex;
  min-height: 310px;
  align-items: center;
  justify-content: center;
  padding: 28px 15px;
  overflow: hidden;
  background-color: #003479;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.dt-updates-hero.no-background {
  background: #003479;
}

.dt-updates-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(0, 31, 72, .34) 0%,
    rgba(0, 31, 72, .14) 48%,
    rgba(0, 31, 72, .05) 78%,
    rgba(0, 31, 72, .10) 100%
  );
  pointer-events: none;
}

.dt-updates-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 254px;
  margin: 0 auto;
  padding: 0;
}

.dt-updates-hero__panel {
  position: relative;
  width: min(650px, calc(100% - 32px));
  max-width: 650px;
  margin: 0 auto;
  padding: 28px 30px;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 10px;
  color: #fff;
  background: rgba(12, 27, 44, .86);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .20);
  text-align: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.dt-updates-hero__label {
  display: inline-block;
  margin-bottom: 8px;
  color: #ECF0F1;
  font-size: .78rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.dt-updates-hero h1 {
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: 36px;
  line-height: 1.3;
  font-weight: 700;
}

.dt-updates-hero__rule {
  display: block;
  width: 48px;
  height: 3px;
  margin: 13px auto 0;
  background: #ffb81c;
}

.dt-updates-hero p {
  max-width: 58ch;
  margin: 16px auto 0;
  color: #ECF0F1;
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 400;
}

.dt-updates-hero__date {
  display: block;
  margin-top: 14px;
  color: #ECF0F1;
  font-size: .94rem;
  font-weight: 600;
}

/* Archive */
.dt-update-archive-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 58px;
}

.dt-update-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.dt-update-archive-card {
  display: flex;
  min-width: 0;
  min-height: 315px;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid #BDC3C7;
  background: #ECF0F1;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.dt-update-archive-card:hover,
.dt-update-archive-card:focus-within {
  border-color: #95A5A6;
  box-shadow: 0 10px 24px rgba(0, 52, 121, .12);
  transform: translateY(-3px);
}

.dt-update-archive-card__image {
  display: block;
  overflow: hidden;
}

.dt-update-archive-card__image img {
  display: block;
  width: 100%;
  height: 175px;
  object-fit: cover;
  transition: transform .25s ease;
}

.dt-update-archive-card:hover .dt-update-archive-card__image img,
.dt-update-archive-card:focus-within .dt-update-archive-card__image img {
  transform: scale(1.025);
}

.dt-update-archive-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.dt-update-archive-card time {
  margin-bottom: 9px;
  color: #7F8C8D;
  font-size: .875rem;
  font-weight: 400;
}

.dt-update-archive-card h2 {
  margin: 0 0 11px;
  font: inherit;
  font-size: 1.22rem;
  line-height: 1.3;
  font-weight: 600;
}

.dt-update-archive-card h2 a,
.dt-update-archive-card__link {
  color: #003479;
  text-decoration: none;
}

.dt-update-archive-card__excerpt {
  margin-bottom: 18px;
  color: #000000;
  font-size: .96rem;
  line-height: 1.58;
  font-weight: 400;
}

.dt-update-archive-card__excerpt p {
  margin: 0;
  font-weight: 400;
}

.dt-update-archive-card__link {
  margin-top: auto;
  font-weight: 600;
}

.dt-update-pagination {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid #BDC3C7;
}

.dt-update-pagination .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dt-update-pagination a,
.dt-update-pagination .current {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid #BDC3C7;
  color: #003479;
  background: #ECF0F1;
  text-decoration: none;
}

.dt-update-pagination .current {
  border-color: #003479;
  color: #ECF0F1;
  background: #003479;
}

.dt-update-archive-empty {
  padding: 36px;
  border: 1px solid #BDC3C7;
  background: #ECF0F1;
  text-align: center;
}

/* Single post */
.dt-update-article {
  margin: 0;
}

.dt-update-content-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.dt-update-content {
  width: min(900px, 100%);
  margin: 0 auto;
  color: #000000;
  font-size: 1.02rem;
  line-height: 1.72;
}

.dt-update-content > :first-child {
  margin-top: 0;
}

.dt-update-content p {
  margin: 0 0 1.25rem;
  font-weight: 400;
}

.dt-update-content h2,
.dt-update-content h3,
.dt-update-content h4 {
  color: #2980B9;
  font-family: inherit;
  line-height: 1.25;
  font-weight: 500;
}

.dt-update-content h2 {
  margin: 2.15rem 0 .85rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid #BDC3C7;
  font-size: 2rem;
}

.dt-update-content h3 {
  margin: 1.75rem 0 .65rem;
  font-size: 1.48rem;
}

.dt-update-content h4 {
  margin: 1.45rem 0 .55rem;
  font-size: 1.2rem;
}

.dt-update-content ul,
.dt-update-content ol {
  margin: 0 0 1.35rem;
  padding-left: 1.55rem;
}

.dt-update-content li {
  margin-bottom: .48rem;
}

.dt-update-content a {
  color: #003479;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dt-update-content a:hover,
.dt-update-content a:focus {
  color: #2980B9;
}

.dt-update-content img {
  max-width: 100%;
  height: auto;
}

.dt-update-content blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #003479;
  background: #ECF0F1;
}

.dt-update-content table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
}

.dt-update-content th,
.dt-update-content td {
  padding: .75rem;
  border: 1px solid #BDC3C7;
  text-align: left;
  vertical-align: top;
}

.dt-update-content th {
  background: #ECF0F1;
  font-weight: 600;
}

.dt-update-back-link {
  margin-top: 2.4rem !important;
  padding-top: 1.5rem;
  border-top: 1px solid #BDC3C7;
  text-align: left;
}

.dt-update-back-link a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border: 1px solid #003479;
  border-radius: 4px;
  color: #003479;
  background: #ECF0F1;
  font-weight: 600;
  text-decoration: none;
}

.dt-update-back-link a:hover,
.dt-update-back-link a:focus {
  color: #ECF0F1;
  background: #003479;
  text-decoration: none;
}

/* Existing parent-theme cleanup classes added by functions.php. */
body.dt-clean-update-active .dt-clean-update-layout,
body.dt-clean-update-archive-active .dt-clean-update-archive-layout {
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

body.dt-clean-update-active aside,
body.dt-clean-update-active #secondary,
body.dt-clean-update-active #sidebar,
body.dt-clean-update-active .sidebar,
body.dt-clean-update-active .widget-area,
body.dt-clean-update-active .widgets-area,
body.dt-clean-update-active [class*="sidebar"],
body.dt-clean-update-active [id*="sidebar"],
body.dt-clean-update-active .comments-area,
body.dt-clean-update-active #comments,
body.dt-clean-update-active .comment-respond,
body.dt-clean-update-active .post-navigation,
body.dt-clean-update-active .entry-meta,
body.dt-clean-update-active .entry-footer,
body.dt-clean-update-active .post-meta,
body.dt-clean-update-archive-active aside,
body.dt-clean-update-archive-active #secondary,
body.dt-clean-update-archive-active #sidebar,
body.dt-clean-update-archive-active .sidebar,
body.dt-clean-update-archive-active .widget-area,
body.dt-clean-update-archive-active .widgets-area,
body.dt-clean-update-archive-active [class*="sidebar"],
body.dt-clean-update-archive-active [id*="sidebar"] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .dt-update-archive-card,
  .dt-update-archive-card__image img {
    transition: none;
  }
}

@media (max-width: 980px) {
  .dt-update-archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dt-updates-hero__panel {
    width: min(720px, 78%);
  }

  .dt-update-feedback {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .dt-update-feedback__actions {
    grid-column: 2;
  }

  .dt-update-feedback__message {
    grid-column: 2;
  }
}

@media (max-width: 767px) {
  .dt-updates-hero {
    min-height: 250px;
    padding: 18px 15px;
  }

  .dt-updates-hero__inner {
    min-height: 214px;
    width: 100%;
    padding: 0;
  }

  .dt-updates-hero__panel {
    width: 100%;
    max-width: none;
    padding: 22px 20px;
    border-radius: 8px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .dt-updates-hero h1 {
    font-size: 30px;
    line-height: 1.3;
  }

  .dt-updates-hero p {
    font-size: .92rem;
  }

  .dt-update-archive-content {
    width: 100%;
    padding: 30px 16px 42px;
  }

  .dt-update-archive-grid {
    display: block;
  }

  .dt-update-archive-card {
    min-height: 0;
    margin-bottom: 14px;
  }

  .dt-update-content-shell {
    width: 100%;
    padding: 32px 20px 44px;
  }

  .dt-update-content {
    font-size: .98rem;
    line-height: 1.66;
  }

  .dt-update-content h2 {
    font-size: 1.65rem;
  }

}

/* Strong theme overrides for the custom updates templates. */
.dt-update-archive-page .dt-update-archive-card h2 a,
.dt-update-archive-page .dt-update-archive-card__link,
.dt-update-page .dt-update-back-link a {
  color: #003479 !important;
}

.dt-update-archive-page .dt-update-archive-card h2 a {
  font-size: inherit !important;
  line-height: inherit !important;
  text-decoration: none !important;
}

.dt-update-archive-page .dt-update-archive-card__excerpt,
.dt-update-archive-page .dt-update-archive-card__excerpt p,
.dt-update-page .dt-update-content,
.dt-update-page .dt-update-content p {
  font-weight: 400 !important;
}

body.dt-clean-update-active .dt-updates-page,
body.dt-clean-update-archive-active .dt-updates-page {
  width: 100% !important;
  max-width: none !important;
}

/* Single Announcement / Alert: remove the unused parent-theme title area. */
body.dt-clean-update-active.single-post .em-title,
body.dt-clean-update-active.single-post .em-breadcrumbs {
  display: none !important;
}

body.dt-clean-update-active.single-post main#main > .container,
body.dt-clean-update-active.single-post main#main > .container > .row,
body.dt-clean-update-active.single-post main#main > .container > .row > .col-md-8 {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.dt-clean-update-active.single-post main#main > .container > .row {
  display: block !important;
}

body.dt-clean-update-active.single-post main#main > .container > .row > .col-md-8 {
  float: none !important;
  flex: 0 0 100% !important;
}

body.dt-clean-update-active.single-post .dt-update-page {
  position: relative;
  z-index: 1;
  margin-top: 0 !important;
}

/* =========================================================
   DriveTest Updates v6: existing theme alignment
   Matches main.css / em-main.css foundations.
   ========================================================= */

.dt-updates-page,
.dt-updates-page * {
  font-family: "Open Sans", Helvetica, Arial, sans-serif !important;
}

.dt-updates-page {
  color: #474747;
  font-size: 14px;
  line-height: 26px;
}

/* Hero card follows the existing .em-title treatment. */
.dt-updates-hero {
  background-color: #003479;
}

.dt-updates-hero__panel {
  color: #fff;
  background: rgba(12, 27, 44, .86);
  border-color: rgba(255, 255, 255, .20);
}

.dt-updates-hero h1 {
  color: #fff;
  font-size: 36px;
  line-height: 1.3;
  font-weight: 700;
}

.dt-updates-hero__label,
.dt-updates-hero__date {
  color: #fff;
}

.dt-updates-hero__rule {
  background: #F1C40F;
}

/* Single-post content follows the theme body and heading system. */
.dt-update-content {
  color: #474747;
  font-size: 14px;
  line-height: 26px;
}

.dt-update-content p,
.dt-update-content li {
  color: #474747;
  font-size: 14px;
  line-height: 26px;
}

.dt-update-content h2 {
  color: #2676AB;
  font-size: 36px;
  line-height: 34px;
  font-weight: 600;
  border-bottom-color: #BDC3C7;
}

.dt-update-content h3 {
  color: #2676AB;
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
}

.dt-update-content h4 {
  color: #474747;
  font-size: 18px;
  line-height: 23px;
  font-weight: 600;
}

.dt-update-content a {
  color: #1E8349;
}

.dt-update-content a:hover,
.dt-update-content a:focus {
  color: #1E8349;
}

.dt-update-content blockquote,
.dt-update-content th {
  background: #ECF0F1;
}

.dt-update-content blockquote {
  border-left-color: #003479;
}

.dt-update-content th,
.dt-update-content td,
.dt-update-content table {
  border-color: #BDC3C7;
}

/* Archive/card styling uses the approved theme palette. */
.dt-update-archive-card,
.dt-update-list-item,
.dt-update-archive-toolbar,
.dt-update-archive-empty {
  border-color: #BDC3C7;
}

.dt-update-archive-card,
.dt-update-list-item {
  background: #fff;
}

.dt-update-archive-toolbar,
.dt-update-archive-empty,
.dt-update-list-item__date {
  background: #ECF0F1;
}

.dt-update-archive-card h2,
.dt-update-list-item__title {
  color: #2676AB;
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
}

.dt-update-archive-card h2 a,
.dt-update-list-item__title a,
.dt-update-archive-card__link,
.dt-update-list-item__link {
  color: #1E8349 !important;
}

.dt-update-archive-card time,
.dt-update-list-item__year,
.dt-update-archive-results {
  color: #7F8C8D;
}

.dt-update-list-item__month {
  color: #003479;
}

.dt-update-list-item__excerpt,
.dt-update-list-item__excerpt p,
.dt-update-archive-card__excerpt,
.dt-update-archive-card__excerpt p {
  color: #474747;
  font-size: 14px;
  line-height: 26px;
}

/* Buttons and pagination use the established DriveTest blue. */
.dt-update-archive-button,
.dt-update-pagination .page-numbers,
.dt-update-back-link a {
  border-color: #003479;
  color: #003479 !important;
}

.dt-update-archive-button--primary,
.dt-update-pagination .page-numbers.current,
.dt-update-pagination .page-numbers:hover,
.dt-update-pagination .page-numbers:focus,
.dt-update-back-link a:hover,
.dt-update-back-link a:focus {
  color: #fff !important;
  background: #003479;
}

/* Existing site focus treatment. */
.dt-updates-page a:focus-visible,
.dt-updates-page button:focus-visible,
.dt-updates-page input:focus-visible,
.dt-updates-page select:focus-visible {
  outline: 4px solid transparent;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px #F1C40F;
}

@media (max-width: 767px) {
  .dt-updates-hero h1 {
    font-size: 30px;
    line-height: 1.3;
  }

  .dt-update-content h2 {
    font-size: 30px;
    line-height: 36px;
  }

  .dt-update-content h3,
  .dt-update-archive-card h2,
  .dt-update-list-item__title {
    font-size: 18px;
    line-height: 24px;
  }
}

@media (max-width: 600px) {
  .dt-updates-hero h1 {
    font-size: 24px;
    line-height: 1.2;
  }

  .dt-update-content h2 {
    font-size: 24px;
    line-height: 31px;
  }

  .dt-update-content h3,
  .dt-update-archive-card h2,
  .dt-update-list-item__title {
    font-size: 16px;
    line-height: 22px;
  }
}

/* =========================================================
   Archive heading colour correction
   Match interior-page heading blue while keeping action links green.
   ========================================================= */

.dt-update-list-item__title,
.dt-update-archive-card h2 {
  color: #2676AB !important;
}

.dt-update-list-item__title a,
.dt-update-archive-card h2 a {
  color: #2676AB !important;
  text-decoration: none !important;
}

.dt-update-list-item__title a:hover,
.dt-update-list-item__title a:focus,
.dt-update-archive-card h2 a:hover,
.dt-update-archive-card h2 a:focus {
  color: #2676AB !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

/* Keep the action links using the site's established green link colour. */
.dt-update-list-item__link,
.dt-update-archive-card__link {
  color: #1E8349 !important;
}