/*
 * INTEGRATION INDEX PAGES
 * Shared styles for: marketplaces, webshops, vervoerders, boekhoud, fulfilment, software
 */

/* CLS fix: Reserve space for hero section to prevent reflow */
.page--dark .hero-section {
  min-height: 120px;
}

.page--dark .hero-section h1 {
  line-height: 1.2;
}

.page--dark .hero-section .hero-description {
  line-height: 1.6;
}

/* Dark theme overrides for content sections */
.page--dark .image-right-section,
.page--dark .image-left-section {
  max-width: 100%;
  margin-top: 80px;
  grid-template-columns: 1fr 1fr;
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}

.page--dark .image-right-section h2,
.page--dark .image-left-section h2 {
  color: rgba(204, 229, 255, 0.95);
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.2;
}

.page--dark .image-right-section p,
.page--dark .image-left-section p {
  color: rgba(204, 229, 255, 0.95);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.page--dark .image-right-section p:last-child,
.page--dark .image-left-section p:last-child {
  margin-bottom: 0;
}

.page--dark .image-right-section-image,
.page--dark .image-left-section-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.page--dark .image-right-section-image img,
.page--dark .image-left-section-image img {
  max-width: 100%;
  height: auto;
}

/* Section grouping (software page) */
.integrations-section {
  margin-bottom: 48px;
}

.integrations-section__title {
  color: rgba(204, 229, 255, 0.95);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.3;
}

/* Integration grid */
.integrations-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
  contain: layout style;
}

.integration-item {
  background: #002345;
  border: 1px solid #05386B;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  contain: layout style;
  min-height: 72px;
  box-sizing: border-box;
}

.integration-item:focus-visible {
  outline: 2px solid #00dd8d;
  outline-offset: 2px;
  border-color: rgba(0, 221, 141, 0.4);
}

.integration-item:hover {
  border-color: rgba(0, 221, 141, 0.4);
}

.integration-item.hidden {
  display: none;
}

.integration-item__logo {
  width: 56px;
  height: 56px;
  margin: -8px 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
}

.integration-item__logo img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.integration-item__placeholder {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05386B;
  border-radius: 6px;
  font-size: 24px;
  font-weight: 700;
  color: rgba(204, 229, 255, 0.95);
}

.integration-item__name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: rgba(204, 229, 255, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.integration-item__arrow {
  display: flex;
  width: 32px;
  height: 32px;
  padding: 8px;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  border-radius: 96px;
  background: #002B57;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.integration-item__arrow svg {
  width: 16px;
  height: 16px;
  color: rgba(204, 229, 255, 0.95);
  transition: color 0.25s ease;
}

.integration-item:hover .integration-item__arrow,
.integration-item:focus-visible .integration-item__arrow {
  background: #00dd8d;
  box-shadow: 0 0 12px rgba(0, 221, 141, 0.4);
}

.integration-item:hover .integration-item__arrow svg,
.integration-item:focus-visible .integration-item__arrow svg {
  color: #001c38;
}

/* Bottom section */
.integrations-bottom {
  display: flex;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 80px;
  overflow: visible;
}

.missing-card {
  background: #002345;
  border: 1px solid #05386B;
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  transition: border-color 0.25s ease;
  flex: 1;
  min-height: 88px;
  box-sizing: border-box;
}

.missing-card:focus-visible {
  outline: 2px solid #00dd8d;
  outline-offset: 2px;
  border-color: rgba(0, 221, 141, 0.4);
}

.missing-card:hover {
  border-color: rgba(0, 221, 141, 0.4);
}

.missing-card__icon {
  display: flex;
  width: 56px;
  height: 56px;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  aspect-ratio: 1/1;
  border-radius: 100px;
  border: 1px solid rgba(204, 229, 255, 0.95);
  background: #05386B;
  font-size: 24px;
  font-weight: 700;
  color: rgba(204, 229, 255, 0.95);
}

.missing-card__text {
  flex: 1;
}

.missing-card__title {
  font-size: 16px;
  font-weight: 700;
  color: rgba(204, 229, 255, 0.95);
  margin-bottom: 6px;
  line-height: 1.6;
}

.missing-card__subtitle {
  font-size: 16px;
  color: rgba(204, 229, 255, 0.95);
  font-weight: 400;
  line-height: 1.6;
}

.missing-card__arrow {
  display: flex;
  width: 32px;
  height: 32px;
  padding: 8px;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  border-radius: 96px;
  background: #002B57;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.missing-card__arrow svg {
  width: 16px;
  height: 16px;
  color: rgba(204, 229, 255, 0.95);
  transition: color 0.25s ease;
}

.missing-card:hover .missing-card__arrow,
.missing-card:focus-visible .missing-card__arrow {
  background: #00dd8d;
  box-shadow: 0 0 12px rgba(0, 221, 141, 0.4);
}

.missing-card:hover .missing-card__arrow svg,
.missing-card:focus-visible .missing-card__arrow svg {
  color: #001c38;
}

.fun-fact-bubble {
  background: #002345;
  border: 1px solid #05386B;
  border-radius: 12px;
  padding: 20px 24px;
  position: relative;
  flex: 1;
  min-height: 88px;
  box-sizing: border-box;
}

.fun-fact-bubble__label {
  color: rgba(204, 229, 255, 0.95);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  display: block;
}

.fun-fact-bubble p {
  color: rgba(204, 229, 255, 0.95);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
}

/* Highlight links */
.page--dark a.highlight {
  color: #00dd8d;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.page--dark a.highlight:hover {
  color: #FFFFFF;
}

.page--dark a.highlight:focus-visible {
  outline: 2px solid #00dd8d;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Contact simple spacing for category pages */
.page--dark .contact-simple {
  max-width: 50%;
  margin-top: 80px;
  margin-bottom: 40px;
}

/* Pricing notice */
.page--dark .pricing-notice {
  margin-top: 80px;
  max-width: 50%;
  margin-left: 0;
  min-height: 200px;
  box-sizing: border-box;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .integration-item,
  .integration-item__arrow,
  .integration-item__arrow svg,
  .missing-card,
  .missing-card__arrow,
  .missing-card__arrow svg {
    transition: none;
  }
}

/* Responsive */
@media (max-width: 1200px) {
  .integrations-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .integrations-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .integrations-bottom {
    flex-direction: column;
  }

  .missing-card,
  .fun-fact-bubble {
    width: 100%;
  }

  .page--dark .image-right-section-image,
  .page--dark .image-left-section-image {
    display: none;
  }

  .page--dark .image-right-section,
  .page--dark .image-left-section {
    grid-template-columns: 1fr;
  }

  .page--dark .pricing-notice,
  .page--dark .contact-simple {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .integrations-grid {
    grid-template-columns: 1fr;
  }
}
