/* ==========================================================================
   Integrations, Blog and Events sections

   Homepage resource sections; load after foundation.css.
   Replaces the thin .cx-integrations badge strip with a grouped layout.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Seamless integration with your workflow: pictorial logo strip
   Seven tiles, sized to sit on one row at desktop width.
   -------------------------------------------------------------------------- */

.cx-integrate {
  padding: 92px 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.cx-integrate .cx-intro {
  margin-bottom: 42px;
}

.cx-logos {
  /* Wrapping flex rows of fixed column widths, so a short last row sits centred. */
  --cx-logo-cols: 7;
  --cx-logo-gap: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--cx-logo-gap);
  padding: 0;
  margin: 0;
  list-style: none;
}

.cx-logo {
  display: flex;
  flex: 0 0 calc((100% - (var(--cx-logo-cols) - 1) * var(--cx-logo-gap)) / var(--cx-logo-cols));
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 20px 8px 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
  transition:
    border-color 240ms var(--ease),
    box-shadow 240ms var(--ease),
    transform 240ms var(--ease);
}

.cx-logo:hover {
  border-color: var(--blue);
  box-shadow: 0 16px 34px -24px rgba(6, 78, 94, 0.28);
  transform: translateY(-3px);
}

.cx-logo.cx-logo-linked {
  padding: 0;
}
.cx-logo-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 100%;
  padding: 20px 8px 17px;
  border-radius: inherit;
  text-decoration: none;
}
.cx-logo-link:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.cx-logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  transition: transform 240ms var(--ease);
}

.cx-logo:hover img {
  transform: scale(1.08);
}

.cx-logo span {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.cx-logo:hover span {
  color: var(--blue-dark);
}

@media (max-width: 1060px) {
  .cx-logos {
    --cx-logo-cols: 4;
  }
}

@media (max-width: 700px) {
  .cx-logos {
    --cx-logo-cols: 3;
    --cx-logo-gap: 10px;
  }

  .cx-logo {
    padding: 16px 6px 14px;
  }

  .cx-logo-link {
    padding: 16px 6px 14px;
  }

  .cx-logo img {
    width: 20px;
    height: 20px;
  }

  .cx-logo span {
    font-size: 0.72rem;
  }
}

@media (max-width: 420px) {
  .cx-logos {
    --cx-logo-cols: 2;
  }
}

/* --------------------------------------------------------------------------
   Latest from our blog
   -------------------------------------------------------------------------- */

.cx-blog {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.cx-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(292px, 1fr));
  gap: 20px;
}

.cx-post {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition:
    border-color 240ms var(--ease),
    box-shadow 240ms var(--ease),
    transform 240ms var(--ease);
}

.cx-post:hover {
  border-color: var(--blue);
  box-shadow: 0 26px 52px -28px rgba(6, 78, 94, 0.28);
  transform: translateY(-4px);
}

.cx-post-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ice-subtle);
  border-bottom: 1px solid var(--line);
}

.cx-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}

.cx-post:hover .cx-post-thumb img {
  transform: scale(1.04);
}

.cx-post-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 100px;
  color: var(--blue-deep);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.cx-post-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 22px 22px;
}

.cx-post-meta {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}

.cx-post-body h3 {
  margin: 10px 0 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.024em;
  line-height: 1.25;
}

.cx-post-body p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.58;
}

.cx-post-more {
  margin: auto 0 0;
  padding-top: 18px;
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.cx-post-more span {
  display: inline-block;
  transition: transform 200ms var(--ease);
}

.cx-post:hover .cx-post-more span {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Events & webinars
   -------------------------------------------------------------------------- */

.cx-events {
  padding: 100px 0;
  background: var(--blue-tint);
  border-top: 1px solid var(--line);
}

.cx-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 18px;
}

.cx-event {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid #bfe6ee;
  border-radius: var(--radius);
  text-decoration: none;
  transition:
    border-color 240ms var(--ease),
    box-shadow 240ms var(--ease),
    transform 240ms var(--ease);
}

.cx-event:hover,
a.cx-event:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 24px 48px -28px rgba(6, 78, 94, 0.3);
  transform: translateY(-4px);
}

.cx-event-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.cx-event-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.cx-event-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 20px 20px;
}

.cx-event-kind {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--blue-soft);
  border-radius: 100px;
  color: var(--blue-deep);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cx-event-body h3 {
  margin: 12px 0 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.28;
}

.cx-event-body p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.cx-event-when {
  margin: auto 0 0;
  padding-top: 16px;
  color: var(--blue-dark);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Shared "see all" link
   -------------------------------------------------------------------------- */

.cx-seeall {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

@media (max-width: 780px) {
  .cx-integrate,
  .cx-blog,
  .cx-events {
    padding: 72px 0;
  }
}
