/**
 * Capricorn Competitions — front-end styles.
 * Neutral, theme-friendly; brand red used for calls to action.
 */

.ccomp-grid,
.ccomp-detail,
.ccomp-listings {
	--cc-red: #e11b22;
	--cc-ink: #16181d;
	--cc-muted: #6b7178;
	--cc-line: #e7e8ea;
	--cc-radius: 14px;
	box-sizing: border-box;
}
.ccomp-grid *,
.ccomp-detail * { box-sizing: border-box; }

/* ---------- Listings sections ---------- */
.ccomp-listings__heading {
	font-size: clamp(1.2rem, 2.2vw, 1.6rem);
	font-weight: 700;
	line-height: 1.15;
	margin: 36px 0 14px;
	display: flex;
	align-items: center;
	gap: 12px;
}
.ccomp-listings > .ccomp-listings__heading:first-child { margin-top: 0; }
.ccomp-listings__heading::before {
	content: "";
	flex: 0 0 auto;
	width: 5px;
	height: 1.05em;
	background: var(--cc-red);
	border-radius: 3px;
}

/* ---------- Listings grid ---------- */
.ccomp-grid {
	display: grid;
	grid-template-columns: repeat(var(--ccomp-cols, 2), 1fr);
	gap: clamp(16px, 2.4vw, 28px);
	margin: 1em 0;
}

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

.ccomp-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--cc-line);
	border-radius: var(--cc-radius);
	overflow: hidden;
	color: var(--cc-ink);
	transition: box-shadow .18s ease, border-color .18s ease;
}
.ccomp-card:hover { border-color: #d6d7da; box-shadow: 0 10px 30px rgba(16,18,22,.10); }

.ccomp-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background: #101216;
	line-height: 0;
}
.ccomp-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ccomp-card__img--ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg,#1b1e26,#0a0b0f); }

.ccomp-is-closed .ccomp-card__media { filter: grayscale(0.6); opacity: .85; }

.ccomp-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #fff;
	background: #1a7f37;
}
.ccomp-badge--upcoming { background: #b26a00; }
.ccomp-badge--closed { background: #646970; }

.ccomp-card__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.ccomp-card__time { margin: 0; color: var(--cc-red); font-weight: 600; font-size: .9em; }
.ccomp-is-closed .ccomp-card__time { color: var(--cc-muted); }
.ccomp-card__title { margin: 0; font-size: 1.24em; line-height: 1.2; font-weight: 700; }
.ccomp-card__title a { color: inherit; text-decoration: none; }
.ccomp-card__title a:hover { color: var(--cc-red); }
.ccomp-card__prize { margin: 0; color: var(--cc-ink); font-weight: 600; }
.ccomp-card__excerpt { margin: 0; color: var(--cc-muted); font-size: .93em; line-height: 1.5; }
.ccomp-card__winner { margin: 0; color: #1a7f37; font-weight: 600; }

.ccomp-btn {
	display: inline-block;
	align-self: flex-start;
	margin-top: 8px;
	background: var(--cc-red);
	color: #fff !important;
	text-decoration: none;
	font-weight: 600;
	padding: 9px 18px;
	border-radius: 8px;
	line-height: 1.2;
	transition: background .15s ease, transform .1s ease;
}
.ccomp-btn:hover { background: #b3151b; }
.ccomp-btn:active { transform: scale(.98); }
.ccomp-btn--lg { padding: 13px 26px; font-size: 1.05em; }
.ccomp-is-closed .ccomp-btn { background: #646970; }

.ccomp-empty { color: var(--cc-muted); font-style: italic; }

/* ---------- Detail page ---------- */
.ccomp-detail { margin: 0 0 1.4em; color: var(--cc-ink); }
.ccomp-detail__banner { border-radius: var(--cc-radius); overflow: hidden; margin: 0 0 18px; line-height: 0; }
.ccomp-detail__img { width: 100%; height: auto; display: block; }

.ccomp-detail__bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 16px;
	margin: 0 0 14px;
}
.ccomp-detail__bar .ccomp-badge { position: static; }
.ccomp-detail__dates { color: var(--cc-muted); font-weight: 600; }
.ccomp-countdown {
	margin-left: auto;
	background: #fef2f2;
	color: var(--cc-red);
	font-weight: 700;
	padding: 5px 12px;
	border-radius: 999px;
	font-variant-numeric: tabular-nums;
}

.ccomp-detail__prize {
	margin: 0 0 18px;
	font-size: 1.1em;
	font-weight: 600;
}
.ccomp-detail__prize span {
	display: inline-block;
	font-size: .7em;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--cc-muted);
	margin-right: 8px;
}

.ccomp-detail__after { margin-top: 8px; }
.ccomp-section { margin: 22px 0; }
.ccomp-section h3 { margin: 0 0 10px; font-size: 1.15em; }
.ccomp-cta { margin: 22px 0; }
.ccomp-note {
	margin: 20px 0;
	padding: 14px 16px;
	background: #f6f7f8;
	border-radius: 10px;
	color: var(--cc-ink);
}
.ccomp-note--closed { background: #f1f2f3; }

.ccomp-terms {
	margin: 24px 0 0;
	border-top: 1px solid var(--cc-line);
	padding-top: 12px;
}
.ccomp-terms > summary {
	cursor: pointer;
	font-weight: 600;
	list-style: none;
	padding: 6px 0;
}
.ccomp-terms > summary::-webkit-details-marker { display: none; }
.ccomp-terms > summary::before { content: "▸"; margin-right: 8px; color: var(--cc-muted); }
.ccomp-terms[open] > summary::before { content: "▾"; }
.ccomp-terms__body { color: var(--cc-muted); font-size: .93em; line-height: 1.6; padding: 4px 0 8px; }
