/* ============================================================
   Crown Church Orlando — Dynamic Events Section
   File: assets/css/events-dynamic.css
   All rules scoped under .cc-events-dynamic-section
   Enqueued via functions.php (crown-events-dynamic-style)
   ============================================================ */


/* ----------------------------------------------------------
   Section wrapper
   ---------------------------------------------------------- */
.cc-events-dynamic-section {
	background: #f9f9fc;
	padding: 80px 0 80px 0;
	position: relative;
}


/* ----------------------------------------------------------
   Inner container
   ---------------------------------------------------------- */
.cc-events-dynamic-inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 24px;
	box-sizing: border-box;
}


/* ----------------------------------------------------------
   Eyebrow label
   ---------------------------------------------------------- */
.cc-events-dynamic-eyebrow {
	font-family: 'Poppins', sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: #cfae6b;
	text-align: center;
	margin: 0 0 14px 0;
}


/* ----------------------------------------------------------
   Section headline
   ---------------------------------------------------------- */
.cc-events-dynamic-headline {
	font-family: 'Poppins', sans-serif;
	font-size: 36px;
	font-weight: 700;
	color: #1b252f;
	text-align: center;
	margin: 0 0 16px 0;
	line-height: 1.2;
}


/* ----------------------------------------------------------
   Gold underline accent bar
   ---------------------------------------------------------- */
.cc-events-dynamic-accent {
	width: 48px;
	height: 3px;
	background: #cfae6b;
	border-radius: 2px;
	margin: 0 auto 48px auto;
}


/* ----------------------------------------------------------
   Card grid — 3 columns desktop
   ---------------------------------------------------------- */
.cc-events-card-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}


/* ----------------------------------------------------------
   Individual event card
   Card is an <a> tag — reset link styles here
   ---------------------------------------------------------- */
.cc-event-card-dynamic {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	text-decoration: none;
	color: inherit;
	border-top: 3px solid transparent;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
	transition: transform 0.20s ease, box-shadow 0.20s ease,
	            border-color 0.20s ease;
}

.cc-event-card-dynamic:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.13);
	border-top-color: #cfae6b;
	text-decoration: none;
	color: inherit;
}


/* ----------------------------------------------------------
   Card image
   ---------------------------------------------------------- */
.cc-event-card-img-wrap {
	width: 100%;
	height: 200px;
	overflow: hidden;
	flex-shrink: 0;
}

.cc-event-card-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.cc-event-card-dynamic:hover .cc-event-card-img {
	transform: scale(1.04);
}


/* ----------------------------------------------------------
   Image placeholder (shown when no image URL is returned)
   ---------------------------------------------------------- */
.cc-event-card-img-placeholder {
	width: 100%;
	height: 200px;
	background: #f0ece4;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.cc-event-card-img-placeholder svg {
	width: 40px;
	height: 40px;
	opacity: 0.55;
}


/* ----------------------------------------------------------
   Card body
   ---------------------------------------------------------- */
.cc-event-card-body {
	padding: 20px 22px 22px 22px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.cc-event-card-title {
	font-family: 'Poppins', sans-serif;
	font-size: 17px;
	font-weight: 700;
	color: #1b252f;
	margin: 0 0 8px 0;
	line-height: 1.35;
}

.cc-event-card-date {
	font-family: 'Poppins', sans-serif;
	font-size: 13px;
	font-weight: 600;
	color: #cfae6b;
	letter-spacing: 1px;
	text-transform: uppercase;
	margin: 0 0 auto 0;
	padding-bottom: 16px;
}

.cc-event-card-link {
	font-family: 'Poppins', sans-serif;
	font-size: 13px;
	font-weight: 600;
	color: #cfae6b;
	display: inline-block;
	margin-top: 12px;
	transition: letter-spacing 0.18s ease;
}

.cc-event-card-dynamic:hover .cc-event-card-link {
	letter-spacing: 0.04em;
}


/* ----------------------------------------------------------
   Empty state
   ---------------------------------------------------------- */
.cc-events-empty {
	font-family: 'Poppins', sans-serif;
	font-size: 15px;
	color: #626567;
	text-align: center;
	margin: 0 auto;
	padding: 40px 0;
}


/* ----------------------------------------------------------
   Tablet — 2 columns
   ---------------------------------------------------------- */
@media (max-width: 900px) {
	.cc-events-card-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 22px;
	}
}


/* ----------------------------------------------------------
   Mobile — 1 column
   ---------------------------------------------------------- */
@media (max-width: 640px) {
	.cc-events-dynamic-section {
		padding: 60px 0 60px 0;
	}

	.cc-events-dynamic-headline {
		font-size: 26px;
	}

	.cc-events-card-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}
}


/* ============================================================
   CPT-BASED EVENTS SECTION
   Homepage: .cc-events-section  →  3 featured cards (light theme)
   /events/ page: uses same card classes inside .cc-events-page-wrap
   ============================================================ */


/* ── Homepage section wrapper ─────────────────────────────────── */
.cc-events-section {
	background: #f9f9fc;
	padding: 80px 0;
	border-top: 1px solid #e8e8e8;
	border-bottom: 1px solid #e8e8e8;
}

.cc-events-inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 24px;
	box-sizing: border-box;
}


/* ── Section header ───────────────────────────────────────────── */
.cc-events-header {
	text-align: center;
	margin-bottom: 48px;
}

.cc-events-eyebrow {
	font-family: 'Poppins', sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: #cfae6b;
	margin: 0 0 14px 0;
}

.cc-events-headline {
	font-family: 'Poppins', sans-serif;
	font-size: 36px;
	font-weight: 700;
	color: #1b252f;
	margin: 0 0 16px 0;
	line-height: 1.2;
}

.cc-events-accent {
	width: 48px;
	height: 3px;
	background: #cfae6b;
	border-radius: 2px;
	margin: 0 auto;
}


/* ── Card grid ────────────────────────────────────────────────── */
.cc-events-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 28px;
}


/* ── Individual card ──────────────────────────────────────────── */
.cc-event-cpt-card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	text-decoration: none;
	color: inherit;
	border-top: 3px solid transparent;
	transition: transform 0.20s ease, box-shadow 0.20s ease, border-color 0.20s ease;
}

.cc-event-cpt-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.13);
	border-top-color: #cfae6b;
	text-decoration: none;
	color: inherit;
}


/* ── Card image zone ──────────────────────────────────────────── */
.cc-event-cpt-img {
	position: relative;
	width: 100%;
	height: 220px;
	overflow: hidden;
	flex-shrink: 0;
}

.cc-event-cpt-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.35s ease;
}

.cc-event-cpt-card:hover .cc-event-cpt-img img {
	transform: scale(1.04);
}

.cc-event-cpt-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(27, 37, 47, 0.40) 0%, transparent 55%);
	pointer-events: none;
}

.cc-event-cpt-img-placeholder {
	width: 100%;
	height: 100%;
	background: #f0ece4;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cc-event-cpt-img-placeholder svg {
	width: 40px;
	height: 40px;
	opacity: 0.55;
}


/* ── Card meta zone ───────────────────────────────────────────── */
.cc-event-cpt-meta {
	padding: 20px 22px 22px;
	display: flex;
	flex-direction: column;
	flex: 1;
	justify-content: space-between;
}

.cc-event-cpt-date {
	font-family: 'Poppins', sans-serif;
	font-size: 11px;
	font-weight: 700;
	color: #cfae6b;
	letter-spacing: 2px;
	text-transform: uppercase;
	margin: 0 0 8px 0;
}

.cc-event-cpt-title {
	font-family: 'Poppins', sans-serif;
	font-size: 16px;
	font-weight: 700;
	color: #1b252f;
	line-height: 1.35;
	margin: 0 0 auto 0;
	padding-bottom: 14px;
}

.cc-event-cpt-link {
	font-family: 'Poppins', sans-serif;
	font-size: 12px;
	font-weight: 600;
	color: #cfae6b;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	display: inline-block;
	margin-top: 12px;
	transition: letter-spacing 0.18s ease;
}

.cc-event-cpt-card:hover .cc-event-cpt-link {
	letter-spacing: 0.12em;
}


/* ── Section footer — "View All" button ───────────────────────── */
.cc-events-footer {
	text-align: center;
	margin-top: 40px;
}

.cc-events-view-all {
	display: inline-block;
	padding: 12px 36px;
	border: 1px solid rgba(207, 174, 107, 0.50);
	border-radius: 999px;
	color: #cfae6b;
	font-family: 'Poppins', sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.cc-events-view-all:hover {
	background: rgba(207, 174, 107, 0.10);
	border-color: #cfae6b;
	text-decoration: none;
}

.cc-events-empty {
	font-family: 'Poppins', sans-serif;
	font-size: 15px;
	color: #626567;
	text-align: center;
	padding: 40px 0;
	margin: 0;
}


/* ── Responsive ───────────────────────────────────────────────── */
/* Default is already 2-col — no 900px breakpoint needed */
@media (max-width: 640px) {
	.cc-events-section  { padding: 60px 0; }
	.cc-events-headline { font-size: 26px; }
	.cc-events-grid     { grid-template-columns: 1fr; gap: 18px; }
}


/* ── /events/ page — dark header override ─────────────────────── */
/* Mirrors the same pattern used for body.crown-sermons-page       */
body.crown-events-page .cc-header {
	background-color: #1b252f !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
body.crown-events-page .cc-header--scrolled {
	box-shadow: 0 2px 24px rgba(0, 0, 0, 0.45) !important;
}
body.crown-events-page .cc-nav-list li a {
	color: rgba(255, 255, 255, 0.85) !important;
}
body.crown-events-page .cc-nav-list li a:hover {
	color: #cfae6b !important;
}
body.crown-events-page .cc-hamburger span {
	background-color: #ffffff !important;
}
@media (max-width: 767px) {
	body.crown-events-page .cc-nav {
		background-color: #1b252f !important;
	}
	body.crown-events-page .cc-nav-list li a {
		border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
	}
}
