/* wp-content/themes/gtmotor/assets/css/components/cards.css */

/* === Generic GTM card shell (used by bikes, parts, etc.) ============== */
a.gtm-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 32px;
  border-radius: 16px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s ease-in-out;
}

a .gtm-post-title {
  margin-top: 36px;
}

/* Restored original shadow, removed transform */
a.gtm-card:hover,
a.gtm-card-s:hover,
a.gtm-card-i:hover,
a.gtm-card-itr:hover {
  box-shadow: 0 8px 8px 0 rgba(0, 0, 0, 0.25);
  transform: none;
}

a.gtm-card .gtm-cardImage {
  display: flex;
  flex: 1 0 auto;
  justify-content: center;
  align-items: center;
}

a.gtm-card .gtm-cardImage .gtm-card-img-top {
  width: 75%;
  max-width: 75%;
  height: auto;
  margin: 0 auto;
  display: block;
}

a.gtm-card .card-body {
  padding: 0 !important;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  z-index: 2;
  position: relative;
}

.gtm-card-title {
  margin: auto 0 0 0;
  text-align: start;
  font-family: Figtree;
  font-size: 24px;
  font-weight: 700;
  line-height: 24px;
  text-transform: uppercase;
}

a.gtm-card .card-body .link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

a.gtm-card .card-body .link .gtm-chevron,
a.gtm-card-s .card-body .link .gtm-chevron,
a.gtm-card-i .card-body .link .gtm-chevron,
a.gtm-card-itr .card-body .link .gtm-chevron {
  margin: 0;
  padding: 0;
}

a.gtm-card .card-body .link .gtm-chevron .material-symbols-outlined,
a.gtm-card-s .card-body .link .gtm-chevron .material-symbols-outlined,
a.gtm-card-i .card-body .link .gtm-chevron .material-symbols-outlined,
a.gtm-card-itr .card-body .link .gtm-chevron .material-symbols-outlined {
  display: block;
  line-height: 1;
  margin: 0;
  padding: 0;
}

a.gtm-card-stock-gtm {
  background: #ffC424;
  border: 1px solid #ffC424;
}

a.gtm-card-stock-ducati {
  background: #cb1517;
  color: #fff;
}

a.gtm-card-stock-honda {
  background: #cc0000;
  color: #fff;
}

a.gtm-card-stock-kawasaki {
  background: #5bb715;
  color: #fff;
}

/* All brand stock cards - white text for contrast */
a.gtm-card-stock-ducati .gtm-card-title,
a.gtm-card-stock-ducati .brand-card-paragraph,
a.gtm-card-stock-ducati .link,
a.gtm-card-stock-honda .gtm-card-title,
a.gtm-card-stock-honda .brand-card-paragraph,
a.gtm-card-stock-honda .link,
a.gtm-card-stock-kawasaki .gtm-card-title,
a.gtm-card-stock-kawasaki .brand-card-paragraph,
a.gtm-card-stock-kawasaki .link,
a.gtm-card-stock-yamaha .gtm-card-title,
a.gtm-card-stock-yamaha .brand-card-paragraph,
a.gtm-card-stock-yamaha .link {
  color: #fff !important;
}

a.gtm-card-stock-yamaha {
  background: #001489;
  color: #fff;
}

a.gtm-card-parts {
  background: #fff;
}

a.gtm-card-parts-gtm {
  background: #6749fd;
  border: 1px solid #6749fd;
  color: #fff;
}

a.gtm-card-parts-ducati {
  border: 1px solid #cb1517;
  color: #cb1517;
}

a.gtm-card-parts-honda {
  border: 1px solid #cc0000;
  color: #cc0000;
}

a.gtm-card-parts-kawasaki {
  border: 1px solid #5bb715;
  color: #5bb715;
}

a.gtm-card-parts-yamaha {
  border: 1px solid #001489;
  color: #001489;
}

/* Parts cards - brand text on white background */
a.gtm-card-parts-ducati .gtm-card-title,
a.gtm-card-parts-ducati .brand-card-paragraph,
a.gtm-card-parts-ducati .link {
  color: #cb1517 !important;
}

a.gtm-card-parts-honda .gtm-card-title,
a.gtm-card-parts-honda .brand-card-paragraph,
a.gtm-card-parts-honda .link {
  color: #cc0000 !important;
}

a.gtm-card-parts-kawasaki .gtm-card-title,
a.gtm-card-parts-kawasaki .brand-card-paragraph,
a.gtm-card-parts-kawasaki .link {
  color: #5bb715 !important;
}

a.gtm-card-parts-yamaha .gtm-card-title,
a.gtm-card-parts-yamaha .brand-card-paragraph,
a.gtm-card-parts-yamaha .link {
  color: #001489 !important;
}

a.gtm-card-finance-gtm {
  background: #342E37;
  color: #fff;
}

a.gtm-card-finance-ducati {
  background: #342E37;
  color: #fff;
}

a.gtm-card-finance-honda {
  background: #342E37;
  color: #fff;
}

a.gtm-card-finance-kawasaki {
  background: #342E37;
  color: #fff;
}

a.gtm-card-finance-yamaha {
  background: #342E37;
  color: #fff;
}

/* Finance & Training cards - white text on dark background */
a.gtm-card-finance-gtm .gtm-card-title,
a.gtm-card-finance-gtm .brand-card-paragraph,
a.gtm-card-finance-gtm .link,
a.gtm-card-finance-ducati .gtm-card-title,
a.gtm-card-finance-ducati .brand-card-paragraph,
a.gtm-card-finance-ducati .link,
a.gtm-card-finance-honda .gtm-card-title,
a.gtm-card-finance-honda .brand-card-paragraph,
a.gtm-card-finance-honda .link,
a.gtm-card-finance-kawasaki .gtm-card-title,
a.gtm-card-finance-kawasaki .brand-card-paragraph,
a.gtm-card-finance-kawasaki .link,
a.gtm-card-finance-yamaha .gtm-card-title,
a.gtm-card-finance-yamaha .brand-card-paragraph,
a.gtm-card-finance-yamaha .link,
a.gtm-card-training .gtm-card-title,
a.gtm-card-training .brand-card-paragraph,
a.gtm-card-training .link {
  color: #fff !important;
}

a.gtm-card-insurance-gtm {
  background: #fff;
  border: 1px solid #342E37;
  color: #342E37;
}

a.gtm-card-insurance-ducati {
  background: #fff;
  border: 1px solid #CB1517;
  color: #CB1517;
}

a.gtm-card-insurance-honda {
  background: #fff;
  border: 1px solid #CC0000;
  color: #CC0000;
}

a.gtm-card-insurance-kawasaki {
  background: #fff;
  border: 1px solid #5BB715;
  color: #5BB715;
}

a.gtm-card-insurance-yamaha {
  background: #fff;
  border: 1px solid #001489;
  color: #001489;
}

/* Insurance cards - brand text on white background */
a.gtm-card-insurance-gtm .gtm-card-title,
a.gtm-card-insurance-gtm .brand-card-paragraph,
a.gtm-card-insurance-gtm .link {
  color: #342E37 !important;
}

a.gtm-card-insurance-ducati .gtm-card-title,
a.gtm-card-insurance-ducati .brand-card-paragraph,
a.gtm-card-insurance-ducati .link {
  color: #CB1517 !important;
}

a.gtm-card-insurance-honda .gtm-card-title,
a.gtm-card-insurance-honda .brand-card-paragraph,
a.gtm-card-insurance-honda .link {
  color: #CC0000 !important;
}

a.gtm-card-insurance-kawasaki .gtm-card-title,
a.gtm-card-insurance-kawasaki .brand-card-paragraph,
a.gtm-card-insurance-kawasaki .link {
  color: #5BB715 !important;
}

a.gtm-card-insurance-yamaha .gtm-card-title,
a.gtm-card-insurance-yamaha .brand-card-paragraph,
a.gtm-card-insurance-yamaha .link {
  color: #001489 !important;
}

a.gtm-card-s,
a.gtm-card-i {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  transition: box-shadow 0.2s ease-in-out;
}

a.gtm-card-s .gtm-cardImage,
a.gtm-card-i .gtm-cardImage {
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  z-index: 0;
}

a.gtm-card-s .gtm-cardImage::after,
a.gtm-card-i .gtm-cardImage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 55.77%, rgba(0, 0, 0, 0.75) 89.9%), rgba(0, 0, 0, 0.35);
  z-index: 1;
  pointer-events: none;
}

a.gtm-card-s .gtm-cardImage {
  height: 0;
  padding-bottom: 56%;
}

a.gtm-card-s .card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #fff;
  z-index: 2;
  background: none;
}

a.gtm-card-i {
  height: 100%;
}

a.gtm-card-i .gtm-cardImage {
  height: 100%;
}

a.gtm-card-i .card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #fff;
  z-index: 2;
  background: none;
}

a.gtm-card-s .card-body .link,
a.gtm-card-i .card-body .link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

a.gtm-card-training {
  background: #342E37;
  color: #fff;
}

a.gtm-card-itr {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  border-radius: 16px;
  padding: 32px;
  text-decoration: none;
  transition: box-shadow 0.2s ease-in-out;
}

a.gtm-card-itr .gtm-cardImage {
  position: absolute;
  top: 24px;
  right: 24px;
  width: auto;
  height: auto;
  display: block;
  flex: none;
  z-index: 1;
}

a.gtm-card-itr .gtm-cardImage img {
  width: auto;
  max-width: 60px;
  height: auto;
  margin: 0;
}

a.gtm-card-itr .card-body {
  margin-top: auto;
  position: relative;
  z-index: 2;
  padding-right: 70px !important;
}

.gt-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
}

a.gtm-card-legends .gtm-cardImage {
  background-image: url('../../../img/legends.jpg');
}

a.gtm-card-performance .gtm-cardImage {
  background-image: url('../../../img/performance.jpg');
}

@media (max-width:767.98px) {
  .homeCards>[class*='col-'] {
    margin: 0;
  }

  .homeCards>[class*='col-']:last-child {
    margin-bottom: 0;
  }

  .gt-stack {
    gap: 0;
    height: auto;
  }

  a.gtm-card,
  a.gtm-card-itr {
    padding: 0 24px;
    height: auto;
    min-height: 96px;
    flex: initial;
    justify-content: center;
    margin-bottom: 16px;
  }

  a.gtm-card .gtm-cardImage,
  a.gtm-card-itr .gtm-cardImage {
    display: none;
  }

  a.gtm-card-s,
  a.gtm-card-i {
    height: auto;
    min-height: 96px;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    margin-bottom: 16px;
  }

  a.gtm-card-s .gtm-cardImage,
  a.gtm-card-i .gtm-cardImage {
    width: 100%;
    height: 100%;
    padding-bottom: 0;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    border-radius: 16px;
  }

  a.gtm-card .card-body,
  a.gtm-card-itr .card-body,
  a.gtm-card-s .card-body,
  a.gtm-card-i .card-body {
    padding: 0 !important;
    margin: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-right: 0 !important;
    width: 100%;
    position: relative;
    z-index: 2;
    background: none;
    margin-top: 0;
  }

  .gtm-card-title,
  a.gtm-card-s .gtm-card-title,
  a.gtm-card-i .gtm-card-title,
  a.gtm-card-itr .gtm-card-title {
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.2;
  }

  a.gtm-card .card-body .brand-card-paragraph,
  a.gtm-card-s .card-body .brand-card-paragraph,
  a.gtm-card-i .card-body .brand-card-paragraph,
  a.gtm-card-itr .card-body .brand-card-paragraph {
    display: none;
  }

  a.gtm-card .card-body .link,
  a.gtm-card-itr .card-body .link,
  a.gtm-card-s .card-body .link,
  a.gtm-card-i .card-body .link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
  }

  a.gtm-card .card-body .link .gtm-chevron .material-symbols-outlined,
  a.gtm-card-s .card-body .link .gtm-chevron .material-symbols-outlined,
  a.gtm-card-i .card-body .link .gtm-chevron .material-symbols-outlined,
  a.gtm-card-itr .card-body .link .gtm-chevron .material-symbols-outlined {
    margin: 0;
    font-size: 16px;
    line-height: 1;
  }
}

@media (min-width:768px) and (max-width:991.98px) {
  .gt-stack {
    gap: 16px;
  }

  a.gtm-card-s .gtm-cardImage {
    padding-bottom: 8rem;
  }

  a.gtm-card-s .card-body,
  a.gtm-card-i .card-body {
    padding: 16px 24px;
  }

  a.gtm-card-itr .gtm-cardImage {
    display: none;
  }

  a.gtm-card-itr {
    padding: 16px 24px;
  }

  a.gtm-card-itr .card-body {
    padding-right: 0 !important;
  }

  a.gtm-card .gtm-card-title,
  a.gtm-card-s .gtm-card-title,
  a.gtm-card-i .gtm-card-title,
  a.gtm-card-itr .gtm-card-title {
    font-size: 16px;
    line-height: 16px;
  }

  a.gtm-card .card-body .link .gtm-chevron .material-symbols-outlined,
  a.gtm-card-s .card-body .link .gtm-chevron .material-symbols-outlined,
  a.gtm-card-i .card-body .link .gtm-chevron .material-symbols-outlined,
  a.gtm-card-itr .card-body .link .gtm-chevron .material-symbols-outlined,
  a.gtm-card .card-body .brand-card-paragraph,
  a.gtm-card-s .card-body .brand-card-paragraph,
  a.gtm-card-i .card-body .brand-card-paragraph,
  a.gtm-card-itr .card-body .brand-card-paragraph {
    font-size: 12px;
    letter-spacing: 1.4px;
    line-height: 12px;
  }
}

.gtm-card-open {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 16px 0 16px 32px;
  border-left: 4px solid var(--c-active-brand, #342E37);
}

.gtm-card-open-subtitle {
  font-weight: 300;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text);
  margin-bottom: 8px;
  display: block;
}

.gtm-card-open-title {
  font-weight: 900;
  font-size: 32px;
  line-height: 40px;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: 16px;
}

.gtm-card-open-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  margin-bottom: 32px;
  max-width: 540px;
}

@media (max-width:991.98px) {
  .gtm-card-open {
    padding: 0 0 32px 0;
    border-left: none;
  }

  .gtm-card-open-title {
    font-size: 28px;
    line-height: 1.2;
  }

  .gtm-card-workshop,
  .gtm-card-service {
    min-height: 300px;
  }
}

.gtm-card-open-link {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  padding-left: 32px;
  border-left: 4px solid var(--line-color, #342E37);
  height: 100%;
  justify-content: center;
}

.gtm-col-content {
  display: flex;
  flex-direction: column;
  /* Between-group rhythm: heading -> body -> button. A touch more air than the
     old flat 24px so the block feels less cramped. */
  gap: 28px;
  align-items: flex-start;
}

.gtm-pre-heading {
  color: var(--c-primary, #342E37);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

/* Bind the eyebrow to its heading: they are one label+title unit, so the gap
   between them must be visibly smaller than the group rhythm (proximity). The
   negative margin nets the 28px flex gap down to ~8px for this pair only.
   Applies wherever the eyebrow directly precedes the heading (dealer, intro,
   MOT, servicing, loyalty blocks + the homepage dealer band). */
.gtm-col-content .gtm-pre-heading + .gtm-heading-lg {
  margin-top: -20px;
}

.gtm-heading-lg {
  color: var(--c-primary, #342E37);
  font-size: 32px;
  font-weight: 900;
  line-height: 40px;
  text-transform: uppercase;
  margin: 0;
}

.gtm-body-text {
  color: var(--c-primary, #342E37);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  margin: 0;
}

/* When the body copy holds multiple paragraphs, give them a consistent,
   comfortable rhythm instead of the browser default (which read as either
   cramped or uneven). Last paragraph flush so the group gap stays exact. */
.gtm-body-text p {
  margin: 0 0 16px 0;
}

.gtm-body-text p:last-child {
  margin-bottom: 0;
}

.gtm-mobile-media {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: none;
  margin: 8px 0;
}

.gtm-mobile-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  object-fit: cover;
}

@media (max-width:767.98px) {
  .gtm-card-open-link {
    padding-left: 24px;
    border-left-width: 4px;
  }

  .gtm-heading-lg {
    font-size: 28px;
    line-height: 1.2;
  }
}

.gtm-img-card-simple {
  width: 100%;
  height: 400px;
  border-radius: 16px;
  background-color: #e0e0e0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none;
}

@media (max-width:991.98px) {
  .gtm-img-card-simple {
    height: 300px;
  }
}