/* GTM Relations – front‑end cards & sections
   This intentionally mirrors the styling we used on marketizing.xyz
   so that related sections look like clean GTMStack cards.
*/

:root {
  --gtm-primary:       #4F46E5;
  --gtm-primary-soft:  #6366F1;
  --gtm-pink:          #EC4899;
  --gtm-orange:        #F97316;
  --gtm-dark:          #111827;
  --gtm-text:          #1F2937;
  --gtm-muted:         #6B7280;
  --gtm-bg:            #F5F7FB;
  --gtm-card:          #FFFFFF;
  --gtm-border:        #E5E7EB;
}

/* Section wrapper */
.gtmstack-section {
  max-width: 1290px;
  margin: 0 auto 4rem auto;
  padding: 0 1.5rem;
}

/* Section heading */
.gtmstack-section-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
  color: var(--gtm-dark);
}

/* Grid layout */
.gtmstack-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .gtmstack-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .gtmstack-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Card */
.gtmstack-card {
  position: relative;
  display: block;
  background: var(--gtm-card);
  border-radius: 18px;
  padding: 1.6rem 1.6rem 1.7rem 1.6rem;
  border: 1px solid rgba(148, 163, 184, 0.9);
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.10),
    0 0 0 1px rgba(255, 255, 255, 0.6);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    border-color 0.18s ease-out,
    background-color 0.18s ease-out;
}

/* Colored bar on the left for emphasis */
.gtmstack-card::before {
  content: "";
  position: absolute;
  inset-block: 0.9rem;
  left: 0.9rem;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    var(--gtm-primary),
    var(--gtm-pink),
    var(--gtm-orange)
  );
  opacity: 0.8;
}

/* Content spacing */
.gtmstack-card h3 {
  margin: 0 0 0.4rem 0;
  padding-left: 0.9rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gtm-dark);
}

.gtmstack-card p {
  margin: 0;
  padding-left: 0.9rem;
  font-size: 0.96rem;
  line-height: 1.5;
  color: var(--gtm-muted);
}

/* Hover / focus state */
.gtmstack-card:hover,
.gtmstack-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--gtm-primary-soft);
  background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.06), #ffffff);
  box-shadow:
    0 22px 45px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.gtmstack-card:hover h3,
.gtmstack-card:focus-visible h3 {
  color: var(--gtm-primary);
}

.gtmstack-card:hover::before,
.gtmstack-card:focus-visible::before {
  opacity: 1;
}

/* Extra space under the last related section */
.gtmstack-section:last-of-type {
  margin-bottom: 5rem;
}
