/*
 * Get The Coast: single event page.
 * Pairs with tribe-events/single-event.php. Every rule is scoped to .gtc-event
 * so theme, Elementor and Events Calendar styles stay out of each other's way.
 */

.gtc-event {
	--gtc-ink: #101828;
	--gtc-text: #1d2939;
	--gtc-muted: #475467;
	--gtc-label: #344054;
	--gtc-line: #e4e7ec;
	--gtc-line-strong: #d0d5dd;
	--gtc-tint: #f4f7fb;
	--gtc-accent: #166dfc;
	--gtc-accent-dark: #0b4fc4;
	--gtc-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--gtc-serif: "Source Serif 4", Georgia, "Times New Roman", serif;

	box-sizing: border-box;
	max-width: 1400px;
	margin: 0 auto;
	padding: 24px 20px 56px;
	font-family: var(--gtc-sans);
	color: var(--gtc-ink);
	line-height: 1.4;
}

.gtc-event *,
.gtc-event *::before,
.gtc-event *::after {
	box-sizing: border-box;
}

/* The plugin caps its wrapper at 1048px with an ID selector
   (#tribe-events-pg-template), so the override has to use the ID too.
   Widen it to the site's 1400px and let .gtc-event handle the padding. */
#tribe-events-pg-template:has(.gtc-event),
.tribe-events-pg-template:has(.gtc-event) {
	max-width: 1400px;
	padding-left: 0;
	padding-right: 0;
}

.gtc-event .gtc-event__icon {
	flex-shrink: 0;
}

/* ---------- Top row ---------- */

.gtc-event .gtc-event__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 16px;
	margin-bottom: 8px;
}

.gtc-event a.gtc-event__back,
.gtc-event a.gtc-event__submit {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.gtc-event a.gtc-event__back {
	color: var(--gtc-label);
}

.gtc-event a.gtc-event__submit {
	color: var(--gtc-accent);
}

.gtc-event a.gtc-event__back:hover,
.gtc-event a.gtc-event__submit:hover {
	color: var(--gtc-accent-dark);
	text-decoration: underline;
}

/* ---------- Header ---------- */

.gtc-event .gtc-event__header {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 28px;
}

.gtc-event .gtc-event__kicker,
.gtc-event .gtc-event__kicker a {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--gtc-accent);
	text-decoration: none;
}

.gtc-event h1.gtc-event__title {
	margin: 0;
	padding: 0;
	font-family: var(--gtc-sans);
	font-size: clamp(28px, 4.4vw, 46px);
	line-height: 1.1;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--gtc-ink);
	text-wrap: balance;
}

.gtc-event .gtc-event__summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	margin: 0;
	font-family: var(--gtc-sans);
	font-size: 17px;
	font-weight: 500;
	color: var(--gtc-label);
}

.gtc-event .gtc-event__summary-date {
	font-weight: 700;
	color: var(--gtc-ink);
}

.gtc-event .gtc-event__dot {
	color: #98a2b3;
}

/* ---------- Two-column layout ---------- */

/* Phones: facts card first, then image and description (source order). */
.gtc-event .gtc-event__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

.gtc-event .gtc-event__main,
.gtc-event .gtc-event__side {
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-width: 0;
}

@media (min-width: 960px) {
	.gtc-event {
		padding: 36px 24px 72px;
	}

	.gtc-event .gtc-event__layout {
		grid-template-columns: minmax(0, 1fr) 340px;
		gap: 48px;
		align-items: start;
	}
}

/* Full 1400px desktop: a slightly wider facts column. */
@media (min-width: 1240px) {
	.gtc-event .gtc-event__layout {
		grid-template-columns: minmax(0, 1fr) 380px;
		gap: 64px;
	}
}

@media (min-width: 960px) {

	.gtc-event .gtc-event__main {
		grid-column: 1;
		grid-row: 1;
		gap: 32px;
	}

	.gtc-event .gtc-event__side {
		grid-column: 2;
		grid-row: 1;
		gap: 20px;
	}
}

/* ---------- Facts card ---------- */

.gtc-event .gtc-event__facts {
	border: 1px solid var(--gtc-line);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
}

.gtc-event .gtc-event__facts-head {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 18px 20px;
	background: var(--gtc-tint);
	border-bottom: 1px solid var(--gtc-line);
}

.gtc-event .gtc-event__tile {
	width: 60px;
	flex-shrink: 0;
	border: 1px solid var(--gtc-line-strong);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	text-align: center;
}

.gtc-event .gtc-event__tile-month {
	display: block;
	padding: 4px 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #fff;
	background: var(--gtc-ink);
}

.gtc-event .gtc-event__tile-day {
	display: block;
	padding: 4px 0 6px;
	font-size: 24px;
	line-height: 1.1;
	font-weight: 800;
	color: var(--gtc-ink);
}

.gtc-event .gtc-event__facts-when {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.gtc-event .gtc-event__facts-date {
	font-size: 18px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--gtc-ink);
}

.gtc-event .gtc-event__facts-time {
	font-size: 15px;
	font-weight: 500;
	color: var(--gtc-label);
}

.gtc-event dl.gtc-event__rows {
	margin: 0;
	padding: 4px 20px;
}

.gtc-event .gtc-event__row {
	display: flex;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--gtc-line);
	color: var(--gtc-muted);
}

.gtc-event .gtc-event__row:last-child {
	border-bottom: 0;
}

.gtc-event .gtc-event__row > .gtc-event__icon {
	margin-top: 2px;
}

.gtc-event .gtc-event__row-body {
	min-width: 0;
}

.gtc-event .gtc-event__row dt {
	margin: 0 0 3px;
	padding: 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--gtc-muted);
}

.gtc-event .gtc-event__row dd {
	margin: 0;
	padding: 0;
}

.gtc-event .gtc-event__value,
.gtc-event a.gtc-event__value {
	font-size: 16px;
	font-weight: 700;
	color: var(--gtc-ink);
	text-decoration: none;
	overflow-wrap: anywhere;
}

.gtc-event a.gtc-event__value--accent {
	color: var(--gtc-accent);
}

.gtc-event a.gtc-event__value:hover {
	color: var(--gtc-accent-dark);
	text-decoration: underline;
}

.gtc-event .gtc-event__sub {
	display: block;
	margin-top: 3px;
	font-size: 14px;
	line-height: 1.45;
	font-weight: 400;
	color: var(--gtc-muted);
}

/* ---------- Buttons ---------- */

.gtc-event .gtc-event__actions {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 6px 20px 20px;
}

.gtc-event a.gtc-event__button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 8px 16px;
	border-radius: 10px;
	background: var(--gtc-accent);
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	text-align: center;
	text-decoration: none;
}

.gtc-event a.gtc-event__button:hover {
	background: var(--gtc-accent-dark);
	color: #fff;
}

.gtc-event .gtc-event__cal {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.gtc-event .gtc-event__cal-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--gtc-label);
}

.gtc-event .gtc-event__cal-links {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
	gap: 8px;
}

.gtc-event a.gtc-event__cal-link {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 6px 8px;
	border: 1px solid var(--gtc-line-strong);
	border-radius: 10px;
	background: #fff;
	font-size: 14px;
	font-weight: 600;
	color: var(--gtc-ink);
	text-decoration: none;
}

.gtc-event a.gtc-event__cal-link:hover {
	border-color: var(--gtc-accent);
	color: var(--gtc-accent-dark);
}

.gtc-event a:focus-visible {
	outline: 2px solid var(--gtc-accent);
	outline-offset: 2px;
}

/* ---------- Map card ---------- */

.gtc-event .gtc-event__map {
	border: 1px solid var(--gtc-line);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
}

.gtc-event .gtc-event__map iframe,
.gtc-event .gtc-event__map > div {
	display: block;
	width: 100% !important;
	max-width: 100%;
	margin: 0;
	border: 0;
}

.gtc-event a.gtc-event__directions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 48px;
	padding: 0 18px;
	font-size: 14px;
	font-weight: 700;
	color: var(--gtc-accent);
	text-decoration: none;
}

.gtc-event a.gtc-event__directions:hover {
	color: var(--gtc-accent-dark);
}

/* ---------- Image ---------- */

.gtc-event figure.gtc-event__photo,
.gtc-event figure.gtc-event__flyer {
	margin: 0;
	padding: 0;
}

/* Landscape photo: fills the column. */
.gtc-event .gtc-event__photo img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
}

/* Portrait or square flyer: shown whole on a tinted panel. */
.gtc-event figure.gtc-event__flyer {
	display: flex;
	justify-content: center;
	padding: 20px;
	border-radius: 12px;
	background: var(--gtc-tint);
}

.gtc-event .gtc-event__flyer a {
	display: block;
	width: 100%;
	max-width: 250px;
}

.gtc-event .gtc-event__flyer img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
}

@media (min-width: 600px) {
	.gtc-event figure.gtc-event__flyer {
		padding: 28px;
	}

	.gtc-event .gtc-event__flyer a {
		max-width: 360px;
	}
}

/* ---------- Description ---------- */

.gtc-event .gtc-event__description {
	font-family: var(--gtc-serif);
	font-size: 18px;
	line-height: 1.65;
	color: var(--gtc-text);
	overflow-wrap: break-word;
	/* Keeps lines readable (about 75 characters) in the wider column. */
	max-width: 760px;
}

.gtc-event .gtc-event__description p,
.gtc-event .gtc-event__description li {
	font-family: var(--gtc-serif);
	font-size: inherit;
	line-height: inherit;
	color: inherit;
}

.gtc-event .gtc-event__description p {
	margin: 0 0 18px;
}

.gtc-event .gtc-event__description > :last-child {
	margin-bottom: 0;
}

.gtc-event .gtc-event__description a {
	color: var(--gtc-accent);
	text-decoration: underline;
}

.gtc-event .gtc-event__description img,
.gtc-event .gtc-event__description iframe {
	max-width: 100%;
	height: auto;
}

@media (min-width: 960px) {
	.gtc-event .gtc-event__description {
		font-size: 19px;
	}
}

/* ---------- Ad slot ---------- */

/* Takes no space until AdButler fills it. */
.gtc-event .gtc-event__ad:not(:has(a, img, iframe)) {
	display: none;
}

/* ---------- Section label ---------- */

.gtc-event h2.gtc-event__section-label {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 16px;
	padding: 0;
	font-family: var(--gtc-sans);
	font-size: 11px;
	line-height: 1.4;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--gtc-label);
}

.gtc-event h2.gtc-event__section-label::after {
	content: "";
	flex-grow: 1;
	height: 1px;
	background: var(--gtc-line);
}

/* ---------- More events ---------- */

.gtc-event .gtc-event__more {
	margin-top: 40px;
}

/* Phones: compact rows with a square thumbnail. */
.gtc-event .gtc-event__more-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

.gtc-event .gtc-event__card {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--gtc-line);
}

.gtc-event .gtc-event__card-media {
	width: 80px;
	height: 80px;
	flex-shrink: 0;
	border-radius: 10px;
	overflow: hidden;
	background: var(--gtc-tint);
}

.gtc-event .gtc-event__card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 30%;
}

.gtc-event .gtc-event__card-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.gtc-event .gtc-event__card-kicker {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--gtc-accent);
}

.gtc-event h3.gtc-event__card-title {
	margin: 0;
	padding: 0;
	font-family: var(--gtc-sans);
	font-size: 16px;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: 0;
}

.gtc-event .gtc-event__card-title a {
	color: var(--gtc-ink);
	text-decoration: none;
}

/* One link, whole card clickable. */
.gtc-event .gtc-event__card-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.gtc-event .gtc-event__card:hover .gtc-event__card-title a {
	color: var(--gtc-accent-dark);
}

@media (min-width: 720px) {
	.gtc-event .gtc-event__more {
		margin-top: 56px;
	}

	.gtc-event .gtc-event__more-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 24px;
	}

	.gtc-event .gtc-event__card {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 0;
		border: 1px solid var(--gtc-line);
		border-radius: 12px;
		overflow: hidden;
		background: #fff;
	}

	.gtc-event .gtc-event__card-media {
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 3;
		border-radius: 0;
	}

	.gtc-event .gtc-event__card-body {
		gap: 6px;
		padding: 16px 18px 18px;
	}

	.gtc-event .gtc-event__card-kicker {
		font-size: 12px;
	}

	.gtc-event h3.gtc-event__card-title {
		font-size: 18px;
		line-height: 1.25;
		font-weight: 800;
	}
}

/* ---------- Previous / next ---------- */

.gtc-event .gtc-event__nav {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
	margin-top: 40px;
	padding-top: 16px;
	border-top: 2px solid var(--gtc-ink);
}

.gtc-event .gtc-event__nav a {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 3px;
	min-height: 48px;
	text-decoration: none;
}

.gtc-event .gtc-event__nav-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--gtc-muted);
}

.gtc-event .gtc-event__nav-title {
	font-size: 16px;
	font-weight: 700;
	color: var(--gtc-ink);
}

.gtc-event .gtc-event__nav a:hover .gtc-event__nav-title {
	color: var(--gtc-accent-dark);
}

@media (min-width: 720px) {
	.gtc-event .gtc-event__nav {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}

	.gtc-event .gtc-event__nav-next a {
		align-items: flex-end;
		text-align: right;
	}
}

/* ---------- Plugin leftovers ---------- */

/* Safety net: this page prints its own versions of these. */
.gtc-event .tribe-events-cal-links,
.gtc-event .tribe-events-related-events-title,
.gtc-event .tribe-related-events {
	display: none;
}

/* Phones: skip the embedded map so the flyer and description come sooner.
   The "Get directions" link stays. */
@media (max-width: 959px) {
	.gtc-event .gtc-event__map iframe,
	.gtc-event .gtc-event__map > div {
		display: none;
	}
}
