/* IMDTEC Portal — Business Suite
   Design refresh (Meta-style cards + page hero)
   Version: v7
*/

/* Page title: use the Portal Shell H1 (.ps-page-title) as the canonical title for Business pages. */
.imd-biz {
  padding: 0 0 32px;
}

.imd-biz a {
  color: inherit;
  text-decoration: none;
}

/* -------------------------------------------------
   Page hero (Business landing)
------------------------------------------------- */
.imd-page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 8px 0 18px;
}

.imd-page-hero__content {
  flex: 1 1 auto;
  min-width: 0;
}

.imd-page-hero__title {
  font-size: 52px;
  line-height: 1.05;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}

.imd-page-hero__subtitle {
  font-size: 18px;
  line-height: 1.7;
  color: #64748b;
  margin: 14px 0 0;
  max-width: 64ch;
}

.imd-page-hero__media {
  flex: 0 0 520px;
  max-width: 520px;
  /* Reserve vertical space early to avoid CLS/jitter while the image loads */
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.imd-page-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.10);
}

@media (max-width: 980px) {
  .imd-page-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .imd-page-hero__media {
    width: 100%;
    max-width: 100%;
    flex-basis: auto;
  }
  .imd-page-hero__title {
    font-size: 40px;
  }
}

/* -------------------------------------------------
   Sectors (stacked) + carousel
------------------------------------------------- */
.imd-biz-section {
  padding: 26px 0 10px;
  border-top: 1px solid #eef2f7;
}

.imd-biz-section:first-of-type {
  border-top: 0;
}

.imd-biz-section__head {
  display: flex;
  gap: 30px;
  justify-content: space-between;
  align-items: baseline;
  margin: 6px 0 14px;
}

.imd-biz-section__title {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.01em;
}

.imd-biz-section__subtitle {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: #64748b;
  max-width: 80ch;
}

.imd-biz-section__more a {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.imd-biz-carousel {
  position: relative;
}

.imd-biz-carousel__nav {
  position: absolute;
  top: -6px;
  right: 0;
  display: flex;
  gap: 10px;
  z-index: 2;
}

.imd-biz-carousel__btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  color: #0f172a;
}

.imd-biz-carousel__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.imd-biz-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-snap-type: x mandatory;
  /* Avoid scroll-jank on some devices/browsers; JS buttons still use smooth */
  scroll-behavior: auto;
}

/* Hide scrollbar (best-effort) */
.imd-biz-track {
  scrollbar-width: none;
}
.imd-biz-track::-webkit-scrollbar {
  display: none;
}

/* 4 cards visible on large screens */
.imd-biz-card {
  flex: 0 0 calc((100% - 90px) / 4);
  scroll-snap-align: start;
}

@media (max-width: 1200px) {
  .imd-biz-card {
    flex-basis: calc((100% - 48px) / 3);
  }
}

@media (max-width: 900px) {
  .imd-biz-card {
    flex-basis: calc((100% - 24px) / 2);
  }
}

@media (max-width: 560px) {
  .imd-biz-card {
    flex-basis: 85%;
  }
}

/* -------------------------------------------------
   Meta-style cards (image + title)
------------------------------------------------- */
.imd-biz-card__link {
  display: block;
  height: 100%;
}

.imd-biz-card__inner {
  height: 100%;
  background: #f1f5f9;
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.imd-biz-card__media {
  width: 100%;
  border-radius: 18px;
  background-color: #e2e8f0;
  background-size: cover;
  background-position: center;
  aspect-ratio: 16 / 9;
}

.imd-biz-card__body {
  padding: 2px 4px 6px;
}

.imd-biz-card__label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 8px;
}

.imd-biz-card__title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

.imd-biz-card__link:hover .imd-biz-card__inner {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

/* -------------------------------------------------
   Sector hero (sector page)
------------------------------------------------- */
.imd-sector-hero {
  display: flex;
  gap: 26px;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 22px;
}

.imd-sector-hero__content {
  flex: 1 1 auto;
  min-width: 0;
}

.imd-sector-hero__kicker {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.imd-sector-hero__title {
  font-size: 44px;
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0;
}

.imd-sector-hero__subtitle {
  font-size: 17px;
  line-height: 1.65;
  color: #64748b;
  margin: 12px 0 0;
  max-width: 70ch;
}

.imd-sector-hero__media {
  flex: 0 0 420px;
  max-width: 420px;
  /* Reserve vertical space early to avoid CLS/jitter while the image loads */
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.imd-sector-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.10);
}

@media (max-width: 980px) {
  .imd-sector-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .imd-sector-hero__media {
    width: 100%;
    max-width: 100%;
    flex-basis: auto;
  }
  .imd-sector-hero__title {
    font-size: 36px;
  }
}

/* Empty state */
.imd-biz-empty {
  margin: 20px 0 0;
  padding: 14px 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  color: #475569;
  background: #f8fafc;
}

/* ------------------------------------------------------------------
   Meta-style cards (based on template-services-meta.php)
-------------------------------------------------------------------*/
.imdtec-meta-card {
  scroll-snap-align: start;
  min-width: 0;
}

.imdtec-meta-card a {
  display: block;
  background: #ffffff;
  border: 1px solid #e9eef7;
  border-radius: 20px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(10, 20, 50, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.imdtec-meta-card a:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(10, 20, 50, 0.10);
}

.imdtec-meta-media {
  height: 190px;
  border-radius: 16px;
  margin: 14px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.imdtec-meta-pill {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-weight: 600;
  /* NOTE: backdrop-filter can trigger "jitter"/repaint issues on some GPUs.
     We keep the visual by relying on the semi-opaque background only. */
  backdrop-filter: none;
}

.imdtec-meta-meta {
  padding: 0 16px 16px 16px;
}

.imdtec-meta-meta .k {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 6px;
}

.imdtec-meta-meta .t {
  font-size: 18px;
  line-height: 1.2;
  margin: 0;
}

.imdtec-meta-meta .d {
  margin-top: 8px;
  color: #5f6b7a;
  font-size: 14px;
  line-height: 1.35;
}
