/* Velocity Hub 1.5.65 — Related Content Contract
   Normalizes related Event sections on Service and Portfolio pages. */

body.single-vh_service .vh-related-events-section,
body.single-vh_portfolio .vh-related-events-section {
  background: #f8fafc;
}

body.single-vh_service .vh-related-events-grid,
body.single-vh_portfolio .vh-related-events-grid {
  align-items: stretch;
}

body.single-vh_service .vh-related-events-grid .vh-event-card,
body.single-vh_portfolio .vh-related-events-grid .vh-event-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  text-decoration: none;
}

body.single-vh_service .vh-related-events-grid .vh-event-card__media,
body.single-vh_portfolio .vh-related-events-grid .vh-event-card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

body.single-vh_service .vh-related-events-grid .vh-event-card__media img,
body.single-vh_portfolio .vh-related-events-grid .vh-event-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.single-vh_service .vh-related-events-grid .vh-event-card__body,
body.single-vh_portfolio .vh-related-events-grid .vh-event-card__body {
  flex: 1 1 auto;
}

@media (max-width: 991.98px) {
  body.single-vh_service .vh-related-events-section .content-section-heading .mb-5,
  body.single-vh_portfolio .vh-related-events-section .content-section-heading .mb-5 {
    margin-bottom: 1.5rem !important;
  }
}

@media (max-width: 599.98px) {
  body.single-vh_service .vh-related-events-section,
  body.single-vh_portfolio .vh-related-events-section {
    padding-top: 2.75rem !important;
    padding-bottom: 2.75rem !important;
  }
}

/* Velocity Hub 1.5.66 — Related Services + Blog Posts Contract
   Extends related-content cards beyond events while keeping service,
   portfolio, and event pages visually consistent. */
body.single-vh_service .vh-related-posts-section,
body.single-vh_portfolio .vh-related-posts-section,
body.single-vh_event .vh-related-services-section,
body.single-vh_event .vh-related-posts-section {
  background: #f8fafc;
}

body.single-vh_event .vh-related-events-section,
body.single-vh_event .vh-related-services-section,
body.single-vh_event .vh-related-posts-section {
  background: #f8fafc;
}

.vh-related-card-grid {
  align-items: stretch;
}

.vh-related-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 1.25rem;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.vh-related-card:hover,
.vh-related-card:focus {
  transform: translateY(-2px);
  border-color: rgba(163, 177, 15, 0.45);
  color: #0f172a;
  text-decoration: none;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.vh-related-card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e5e7eb;
}

.vh-related-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vh-related-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
}

.vh-related-card__eyebrow {
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  background: rgba(163, 177, 15, 0.12);
  color: #647000;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 0.45rem 0.65rem;
  text-transform: uppercase;
}

.vh-related-card__title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  line-height: 1.15;
}

.vh-related-card__body p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.vh-related-card__link {
  margin-top: auto;
  color: #7c8700;
  font-weight: 800;
}

@media (max-width: 991.98px) {
  .vh-related-services-section .content-section-heading .mb-5,
  .vh-related-posts-section .content-section-heading .mb-5 {
    margin-bottom: 1.5rem !important;
  }
}

@media (max-width: 599.98px) {
  .vh-related-services-section,
  .vh-related-posts-section {
    padding-top: 2.75rem !important;
    padding-bottom: 2.75rem !important;
  }

  .vh-related-card__body {
    padding: 1rem;
  }
}

/* Velocity Hub 1.5.68 — Page/Post Related Content Front-End Contract
   Extends the related-content visual system to default Pages and Blog Posts. */
body.page .vh-related-services-section,
body.page .vh-related-portfolio-section,
body.page .vh-related-events-section,
body.page .vh-related-posts-section,
body.page .vh-related-faq-section,
body.single-post .vh-related-services-section,
body.single-post .vh-related-portfolio-section,
body.single-post .vh-related-events-section,
body.single-post .vh-related-posts-section,
body.single-post .vh-related-faq-section,
.vh-related-portfolio-section,
.vh-related-faq-section {
  background: #f8fafc;
}

.vh-related-portfolio-section .content-section-heading .mb-5,
.vh-related-faq-section .content-section-heading .mb-5 {
  margin-bottom: 2.5rem !important;
}

.vh-related-faq-section .accordion-item {
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.95rem !important;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

.vh-related-faq-section .accordion-item + .accordion-item {
  margin-top: 1rem;
}

.vh-related-faq-section .accordion-button {
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
}

.vh-related-faq-section .accordion-button:not(.collapsed) {
  color: #1d4ed8;
  background: #eaf2ff;
  box-shadow: none;
}

.vh-related-faq-section .vh-faq-accordion-title {
  min-width: 0;
  flex: 1 1 auto;
}

@media (max-width: 991.98px) {
  .vh-related-portfolio-section .content-section-heading .mb-5,
  .vh-related-faq-section .content-section-heading .mb-5 {
    margin-bottom: 1.5rem !important;
  }
}

@media (max-width: 599.98px) {
  .vh-related-portfolio-section,
  .vh-related-faq-section {
    padding-top: 2.75rem !important;
    padding-bottom: 2.75rem !important;
  }

  .vh-related-faq-section .accordion-button {
    padding: 1rem;
  }
}

/* Velocity Hub 1.5.73 — WO70 Related odd-card grid contract.
   Bootstrap row + justify-content-center made orphan cards center and feel
   smaller/out of place at tablet and 1024px widths. This establishes a default
   CSS Grid baseline. Phase 3 inline Velocity Hub Settings still load after this
   file and can override explicit columns/gaps when the admin sets them. */
.vh-related-card-grid,
.vh-related-events-grid {
  display: grid !important;
  align-items: stretch !important;
  justify-content: initial !important;
  justify-items: stretch !important;
}

.vh-related-card-grid > [class*="col-"],
.vh-related-events-grid > [class*="col-"] {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.vh-related-card-grid > [class*="col-"] > .vh-related-card,
.vh-related-events-grid > [class*="col-"] > .vh-event-card {
  width: 100% !important;
}

@media (min-width: 992px) {
  .vh-related-card-grid,
  .vh-related-events-grid {
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)) !important;
    gap: 1.5rem !important;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .vh-related-card-grid,
  .vh-related-events-grid {
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)) !important;
    gap: 1.25rem !important;
  }
}

@media (max-width: 767.98px) {
  .vh-related-card-grid,
  .vh-related-events-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1rem !important;
  }
}
