/* Media Coverage gallery + homepage marquee */

.kn-media-page {
  background: #f4f7fb;
  padding: 36px 0 56px;
}

.kn-media-hero {
  text-align: center;
  margin-bottom: 36px;
}

.kn-media-hero h1 {
  color: #0a225f;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 12px;
}

.kn-media-hero p {
  max-width: 640px;
  margin: 0 auto;
  color: #5b6472;
  font-size: 1rem;
  line-height: 1.7;
}

.kn-media-hero .accent {
  display: inline-block;
  width: 64px;
  height: 3px;
  background: #E6AD38;
  margin-bottom: 14px;
  border-radius: 2px;
}

.kn-media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 576px) {
  .kn-media-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
  .kn-media-grid { grid-template-columns: repeat(3, 1fr); }
}

.kn-media-card {
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 34, 95, 0.06);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-align: left;
  padding: 0;
  width: 100%;
  display: block;
  color: inherit;
}

.kn-media-card:hover,
.kn-media-card:focus {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(15, 34, 95, 0.12);
  outline: none;
}

.kn-media-card-img {
  aspect-ratio: 4 / 3;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-bottom: 1px solid #edf1f7;
}

.kn-media-card-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.kn-media-card-body {
  padding: 14px 16px 16px;
}

.kn-media-card-body h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0a225f;
}

.kn-media-card-body span {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: #8a93a3;
}

/* Lightbox */
.kn-media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(10, 20, 40, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.kn-media-lightbox.is-open {
  display: flex;
}

.kn-media-lightbox-inner {
  position: relative;
  max-width: min(960px, 96vw);
  max-height: 90vh;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.kn-media-lightbox-inner img {
  display: block;
  max-width: 100%;
  max-height: calc(90vh - 72px);
  margin: 0 auto;
  object-fit: contain;
}

.kn-media-lightbox-caption {
  text-align: center;
  margin-top: 12px;
  color: #0a225f;
  font-weight: 700;
}

.kn-media-lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #E6AD38;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Homepage infinite marquee */
.kn-media-home {
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
  padding: 48px 0 40px;
  overflow: hidden;
}

.kn-media-home-head {
  text-align: center;
  margin-bottom: 28px;
  padding: 0 16px;
}

.kn-media-home-head h2 {
  color: #0a225f;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  margin: 0 0 8px;
}

.kn-media-home-head p {
  color: #5b6472;
  margin: 0 0 14px;
  font-size: 0.95rem;
}

.kn-media-home-head a {
  color: #0a225f;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid #E6AD38;
  padding-bottom: 2px;
}

.kn-media-home-head a:hover {
  color: #E6AD38;
}

.kn-media-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.kn-media-marquee-track {
  display: flex;
  width: max-content;
  gap: 18px;
  animation: knMediaMarquee 40s linear infinite;
  will-change: transform;
}

.kn-media-marquee:hover .kn-media-marquee-track {
  animation-play-state: paused;
}

.kn-media-marquee-item {
  flex: 0 0 auto;
  width: 220px;
  height: 140px;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 34, 95, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.kn-media-marquee-item:hover {
  box-shadow: 0 10px 24px rgba(15, 34, 95, 0.12);
  transform: translateY(-2px);
}

.kn-media-marquee-item img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

@keyframes knMediaMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 767px) {
  .kn-media-marquee-item {
    width: 160px;
    height: 110px;
    padding: 10px 12px;
  }

  .kn-media-marquee-track {
    gap: 12px;
    animation-duration: 32s;
  }

  .kn-media-home {
    padding: 36px 0 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kn-media-marquee-track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
  }

  .kn-media-marquee-track .kn-media-marquee-clone {
    display: none;
  }
}
