.tec-ec {
  width: 100%;
}

.tec-ec-header {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}

.tec-ec-btn {
  appearance: none;
  border: 1px solid currentColor;
  background: transparent;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.tec-ec-viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  outline: none;
}

/* Fallback columns if JS does not run */
.tec-ec { --tec-cols: 1; }

@media (min-width: 600px) {
  .tec-ec { --tec-cols: 2; }
}

@media (min-width: 1024px) {
  .tec-ec { --tec-cols: 3; }
}

.tec-ec-track {
  --tec-gap: 16px;
  gap: var(--tec-gap);

  display: grid;
  grid-auto-flow: column;

  grid-auto-columns: calc(
    (100% - (var(--tec-gap) * (var(--tec-cols) - 1))) / var(--tec-cols)
  );
}

.tec-ec-card {
  scroll-snap-align: start;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.tec-ec-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.tec-ec-image img {
  display: block;
  width: 100%;
  height: auto;
}

.tec-ec-body {
  padding: 14px;
}

.tec-ec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 8px;
}

.tec-ec-title {
  margin: 0 0 10px;
  font-size: 18px;
}

.tec-ec-excerpt {
  margin: 0 0 12px;
  font-size: 14px;
  opacity: 0.9;
}

.tec-ec-cta {
  display: inline-block;
  font-size: 14px;
  text-decoration: underline;
}

/* Push content so button sits at the bottom */
.tec-ec-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tec-ec-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Button wrapper centred at bottom */
.tec-ec-cta-wrap {
  margin-top: auto;
  display: flex;
  justify-content: center;
  padding-top: 12px;
}

/* Button styling */
.tec-ec-cta-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s ease;
}

/* Hover / focus */
.tec-ec-card-link:hover .tec-ec-cta-btn,
.tec-ec-card-link:focus .tec-ec-cta-btn {
  background: #222;
  transform: translateY(-1px);
}
/* Hide horizontal scrollbar but keep scrolling */
.tec-ec-viewport {
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE / old Edge */
}

.tec-ec-viewport::-webkit-scrollbar {
  display: none;                /* Chrome, Safari, iOS */
}