/* Equal-height card media + team + news + blog gallery grid */

.opc-card-media {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 200px;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
}

.opc-card-media:has(.opc-card-media__placeholder) {
  background: linear-gradient(145deg, #eef1f5 0%, #dde3eb 100%);
}

.opc-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}

.opc-card-media:hover img {
  transform: scale(1.03);
}

.opc-card-media__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
  padding: 1rem;
  text-align: center;
  color: rgba(12, 35, 64, 0.45);
}

.opc-card-media__icon {
  font-size: 1.75rem;
  opacity: 0.55;
}

.opc-card-media__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
  max-width: 12rem;
}

/* Team — larger portrait cards */
.opc-team-card {
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(12, 35, 64, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.opc-team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(12, 35, 64, 0.12);
}

.opc-card-media--team {
  aspect-ratio: 3 / 4;
  min-height: 0;
  background: #fff;
}

.opc-card-media--team img {
  object-position: center top;
}

.opc-team-card__body {
  padding: 1rem 1.1rem 1.25rem;
  text-align: center;
  background: #fff;
}

.opc-team-card__name {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--opc-navy, #0c2340);
}

.opc-team-card__role {
  font-size: 0.8rem;
  color: #6c757d;
  margin: 0;
}

.opc-team-card__bio {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0.5rem 0 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* News — whole card clickable */
.opc-news-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.opc-news-card-link:hover {
  color: inherit;
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(12, 35, 64, 0.12) !important;
}

.opc-card-media--news {
  flex-shrink: 0;
  aspect-ratio: 16 / 10;
  min-height: 0;
  border-radius: 1rem 1rem 0 0;
}

.opc-blog-card .opc-card-media--news {
  border-radius: 0;
}

.opc-blog-card {
  border-radius: 1rem;
  overflow: hidden;
}

.opc-blog-card__body {
  padding: 0.65rem 0.85rem 0.85rem;
}

.opc-blog-card__meta {
  margin-bottom: 0.25rem !important;
}

.opc-blog-card__title {
  font-size: 1rem;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.opc-blog-card__readall {
  color: var(--opc-navy, #0c2340);
}

.opc-blog-card__readall:hover {
  color: var(--opc-gold, #c5a037);
}

.opc-news-card-link__body {
  padding: 1rem 1.15rem 1.2rem;
  flex: 1 1 auto;
}

.opc-news-card-link__date {
  font-size: 0.75rem;
  color: #6c757d;
  margin: 0 0 0.35rem;
}

.opc-news-card-link__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: var(--opc-navy, #0c2340);
}

/* Portfolio / learn cards using opc-card-media inside articles */
.dt-work-card .opc-card-media,
.card .opc-card-media--learn {
  border-radius: 0;
}

.opc-card-media--learn {
  min-height: 220px;
}

.dt-work-card {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  overflow: hidden;
  border: 0;
  background: #fff;
  box-shadow: 0 8px 28px rgba(12, 35, 64, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dt-work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(12, 35, 64, 0.12);
}

.dt-work-card .opc-card-media {
  flex-shrink: 0;
  border-radius: 0;
  min-height: 220px;
}

.dt-work-card > .p-3 {
  flex: 1 1 auto;
  background: #fff;
}

/* Blog detail — full image visible (no crop), compact thumb strip */
.dt-blog-gallery-main {
  margin-bottom: 0.75rem;
}

.dt-blog-gallery-main .carousel-inner {
  background: #eef1f5;
}

.dt-blog-gallery-main .carousel-item {
  background: #eef1f5;
}

.dt-blog-gallery-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: min(48vh, 440px);
  padding: 0.65rem;
  background: #eef1f5;
}

.dt-blog-gallery-main .dt-blog-gallery-img,
.dt-blog-gallery-slide .dt-blog-gallery-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(58vh, 520px);
  margin: 0 auto;
  object-fit: contain;
  object-position: center center;
  border-radius: 0.35rem;
}

.dt-blog-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 0.45rem;
  max-width: 100%;
  margin-top: 0.65rem;
}

.dt-blog-gallery-grid__btn {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid rgba(12, 35, 64, 0.12);
  border-radius: 0.5rem;
  overflow: hidden;
  background: #f1f3f5;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  opacity: 0.85;
}

.dt-blog-gallery-grid__btn:hover {
  opacity: 1;
  border-color: rgba(12, 35, 64, 0.35);
}

.dt-blog-gallery-grid__btn.active {
  opacity: 1;
  border-color: var(--opc-gold, #c5a572);
  box-shadow: 0 0 0 1px var(--opc-gold, #c5a572);
}

.dt-blog-gallery-grid__btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 768px) {
  .dt-blog-gallery-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    max-width: 420px;
  }
}

/* Partner cards — equal media, logo-friendly */
.opc-partner-card .opc-card-media--partner {
  border-radius: 0;
}

.opc-card-media--partner img {
  object-fit: contain;
  padding: 1.25rem;
  background: #fff;
}

.opc-partner-card .opc-partner-card__category {
  z-index: 3;
  pointer-events: none;
}

/* Homepage About — rich teaser + tags + read more */
.opc-about-home__lead {
  font-size: 1.05rem;
  line-height: 1.5;
}

.opc-about-home__teaser {
  font-size: 0.95rem;
  line-height: 1.65;
  max-height: calc(1.65em * 7);
  overflow: hidden;
  position: relative;
}

.opc-about-home__teaser::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.5rem;
  background: linear-gradient(180deg, transparent, #fff);
  pointer-events: none;
}

.opc-about-home__teaser p:last-child {
  margin-bottom: 0;
}

.opc-about-home__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.opc-about-home__tags .badge {
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.35rem 0.65rem;
}

@media (max-width: 575.98px) {
  .opc-card-media--team {
    aspect-ratio: 3 / 4;
  }

  .opc-card-media--news {
    min-height: 180px;
  }

  .opc-about-home__teaser {
    max-height: calc(1.65em * 6);
  }
}

/* Blog prev/next navigation cards */
.opc-blog-nav-card {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(12, 35, 64, 0.08);
  background: #fff;
  box-shadow: 0 6px 20px rgba(12, 35, 64, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.opc-blog-nav-card:hover {
  color: inherit;
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(12, 35, 64, 0.1);
}

.opc-blog-nav-card__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.opc-blog-nav-card--next .opc-blog-nav-card__inner {
  text-align: right;
}

.opc-card-media--nav {
  aspect-ratio: 16 / 9;
  min-height: 140px;
}

.opc-blog-nav-card__body {
  padding: 0.85rem 1rem 1rem;
  flex: 1 1 auto;
}

.opc-blog-nav-card__label {
  display: block;
  margin-bottom: 0.35rem;
}

.opc-blog-nav-card__title {
  color: var(--opc-navy, #0c2340);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .opc-blog-nav-card__inner {
    flex-direction: row;
    align-items: stretch;
  }

  .opc-blog-nav-card--next .opc-blog-nav-card__inner {
    flex-direction: row-reverse;
  }

  .opc-blog-nav-card__media {
    flex: 0 0 42%;
    max-width: 42%;
  }

  .opc-card-media--nav {
    min-height: 100%;
    aspect-ratio: auto;
    height: 100%;
  }

  .opc-blog-nav-card__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 1.15rem;
  }
}
