/* Comms.Church PCO → TEC — front.css
   Scoped to .cctec-* classes. --cctec-brand is set per-shortcode via inline style. */

:root {
  --cctec-brand:   #1a4a8a;
  --cctec-radius:  8px;
  --cctec-gap:     1.25rem;
  --cctec-card-bg: #ffffff;
  --cctec-shadow:  0 2px 12px rgba(0,0,0,.07);
  --cctec-text:    #1e293b;
  --cctec-muted:   #64748b;
  --cctec-border:  #e2e8f0;
  --cctec-font-sm: .875rem;
  --cctec-font-xs: .8rem;
}

/* ── Register button ─────────────────────────────────────────────────────── */
.cctec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem 1.4rem;
  border-radius: calc(var(--cctec-radius) / 1.5);
  font-size: var(--cctec-font-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: filter .15s, opacity .15s;
  white-space: nowrap;
  line-height: 1.4;
}

.cctec-btn-primary {
  background-color: var(--cctec-brand);
  color: #fff !important;
}

.cctec-btn-primary:hover {
  filter: brightness(1.12);
  color: #fff !important;
  text-decoration: none;
}

/* ── Event card ──────────────────────────────────────────────────────────── */
.cctec-event-card {
  background: var(--cctec-card-bg);
  border-radius: var(--cctec-radius);
  box-shadow: var(--cctec-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
  max-width: 480px; /* prevents it stretching full-width in wide layouts */
}

.cctec-event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.11);
}

/* ── Card image ──────────────────────────────────────────────────────────── */
.cctec-card-image {
  position: relative;
  overflow: hidden;
  background: #f1f5f9;
}

.cctec-shape-cinematic { padding-top: 56.25%; } /* 16:9 */
.cctec-shape-square    { padding-top: 100%;    } /* 1:1 */
.cctec-shape-portrait  { padding-top: 133%;    } /* 3:4 */

.cctec-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cctec-image-placeholder {
  position: absolute;
  inset: 0;
  background: var(--cctec-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem;
  text-align: center;
}

/* ── Card body ───────────────────────────────────────────────────────────── */
.cctec-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
}

.cctec-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cctec-text);
  margin: 0 0 .2rem;
  line-height: 1.3;
}

.cctec-card-title a {
  color: inherit;
  text-decoration: none;
}

.cctec-card-title a:hover {
  color: var(--cctec-brand);
  text-decoration: none;
}

/* ── Meta row (date / location / price) ─────────────────────────────────── */
.cctec-card-meta {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.cctec-meta-date,
.cctec-meta-location,
.cctec-meta-price {
  display: flex;
  align-items: flex-start;
  gap: .35rem;
  font-size: var(--cctec-font-sm);
  color: var(--cctec-muted);
  margin: 0;
}

.cctec-meta-date svg,
.cctec-meta-location svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--cctec-brand);
}

/* ── Price ───────────────────────────────────────────────────────────────── */
.cctec-price      { font-weight: 600; color: var(--cctec-brand); }
.cctec-price-free { font-weight: 600; color: #16a34a; }

/* ── Description ─────────────────────────────────────────────────────────── */
.cctec-card-desc {
  font-size: var(--cctec-font-sm);
  color: var(--cctec-muted);
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* ── Actions ─────────────────────────────────────────────────────────────── */
.cctec-card-actions {
  margin-top: auto;
  padding-top: .75rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .cctec-event-card { max-width: 100%; }
  .cctec-btn { width: 100%; text-align: center; }
}

/* ── Auto-injected button on TEC single event pages ─────────────────────── */
.cctec-single-register {
  margin: 1.5rem 0;
}

.cctec-single-register .cctec-btn {
  font-size: 1rem;
  padding: .65rem 1.75rem;
}
