.ctc-freebie-hidden {
	display: none !important;
}

.ctc-freebie-no-scroll {
	overflow: hidden;
}

.ctc-freebie-popup {
	position: fixed;
	inset: 0;
	z-index: 9999;
}

.ctc-freebie-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 22, 34, 0.48);
	backdrop-filter: blur(4px);
}

.ctc-freebie-popup__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100%;
	padding: 24px;
}

.ctc-freebie-popup__inner {
	position: relative;
	width: min(100%, 520px);
	padding: 28px 28px 26px;
	background: #fff;
	border: 1px solid rgba(128, 198, 237, 0.45);
	border-radius: 30px;
	box-shadow: 0 28px 80px rgba(17, 110, 166, 0.18);
	text-align: center;
}

.ctc-freebie-popup__close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 50%;
	background: rgba(223, 242, 246, 0.95);
	color: var(--ctc-color-text, #0c2230);
	font-size: 1.8rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.ctc-freebie-popup__close:hover,
.ctc-freebie-popup__close:focus {
	background: #dff2f6;
	color: #116ea6;
	box-shadow: 0 8px 20px rgba(143, 216, 238, 0.22);
	transform: translateY(-1px);
}

.ctc-freebie-popup__eyebrow {
	margin: 0 0 10px;
	font-family: var(--ctc-font-button);
	font-size: 0.95rem;
	color: var(--ctc-color-primary);
}

.ctc-freebie-popup__title {
	margin: 0 0 10px;
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.02;
	color: var(--ctc-color-text);
}

.ctc-freebie-popup__subtitle {
	margin: 0 auto 18px;
	max-width: 34ch;
	font-size: 1rem;
	line-height: 1.7;
	color: var(--ctc-color-text-soft);
}

.ctc-freebie-popup__image-wrap {
	margin: 0 auto 18px;
	max-width: 250px;
}

.ctc-freebie-popup__image {
	display: block;
	width: 100%;
	height: auto;
}

.ctc-freebie-popup__form {
	display: grid;
	gap: 14px;
}

.ctc-freebie-popup__input {
	width: 100%;
	min-height: 56px;
	padding: 0 18px;
	border: 2px solid rgba(128, 198, 237, 0.4);
	border-radius: 999px;
	background: #fff;
	color: var(--ctc-color-text);
	font-size: 1rem;
	text-align: center;
	box-shadow: 0 8px 18px rgba(17, 110, 166, 0.05);
}

.ctc-freebie-popup__input:focus {
	outline: none;
	border-color: var(--ctc-color-primary);
	box-shadow: 0 0 0 4px rgba(17, 110, 166, 0.1);
}

.ctc-freebie-popup__notice {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.65;
	color: var(--ctc-color-text-soft);
}

.ctc-freebie-popup__error {
	margin: 0;
	padding: 12px 14px;
	border-radius: 16px;
	background: rgba(255, 232, 232, 0.92);
	color: #a83b3b;
	font-size: 0.92rem;
	line-height: 1.5;
}

.ctc-freebie-popup__submit,
.ctc-freebie-popup__download,
.ctc-freebie-popup__secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0 20px;
	border-radius: 999px;
	font-family: var(--ctc-font-button);
	font-size: 1rem;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.ctc-freebie-popup__submit,
.ctc-freebie-popup__download {
	border: 1px solid var(--ctc-color-primary);
	background: var(--ctc-color-primary);
	color: #fff;
}

.ctc-freebie-popup__submit:hover,
.ctc-freebie-popup__submit:focus,
.ctc-freebie-popup__download:hover,
.ctc-freebie-popup__download:focus {
	background: #8fd8ee;
	border-color: #8fd8ee;
	color: #0b2230;
	box-shadow: 0 10px 24px rgba(143, 216, 238, 0.35);
	transform: translateY(-1px);
}

.ctc-freebie-popup__secondary {
	border: 1px solid rgba(128, 198, 237, 0.45);
	background: #fff;
	color: var(--ctc-color-primary);
}

.ctc-freebie-popup__secondary:hover,
.ctc-freebie-popup__secondary:focus {
	background: #dff2f6;
	border-color: #b8e4ef;
	color: #116ea6;
	box-shadow: 0 8px 20px rgba(143, 216, 238, 0.22);
	transform: translateY(-1px);
}

.ctc-freebie-popup__success {
	display: grid;
	gap: 14px;
}

.ctc-freebie-popup__success-title {
	margin: 0;
	font-size: 1.55rem;
	line-height: 1.1;
	color: var(--ctc-color-text);
}

.ctc-freebie-popup__success-copy {
	margin: 0;
	font-size: 0.98rem;
	line-height: 1.7;
	color: var(--ctc-color-text-soft);
}

.ctc-freebie-popup__success-actions {
	display: grid;
	gap: 12px;
}

.ctc-freebie-popup__honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.ctc-freebie-popup__submit.is-loading {
	opacity: 0.72;
	pointer-events: none;
}

/* Floating mascot only */
.ctc-freebie-floating-trigger {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 9998;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	width: auto;
	height: auto;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	backdrop-filter: none;
	cursor: pointer;
}

.ctc-freebie-floating-trigger:hover,
.ctc-freebie-floating-trigger:focus {
	background: transparent;
	box-shadow: none;
}

.ctc-freebie-floating-trigger__image {
	display: block;
	width: 128px;
	height: auto;
	max-width: none;
	object-fit: contain;
	filter: drop-shadow(0 12px 24px rgba(17, 110, 166, 0.22));
	transition: transform 0.25s ease, filter 0.25s ease, opacity 0.25s ease;
}

.ctc-freebie-floating-trigger:hover .ctc-freebie-floating-trigger__image,
.ctc-freebie-floating-trigger:focus .ctc-freebie-floating-trigger__image {
	transform: translateY(-4px) scale(1.04);
	filter: drop-shadow(0 14px 28px rgba(143, 216, 238, 0.34));
}

.ctc-freebie-floating-trigger__label {
	display: none;
}

/* Freebies page */
body.page-template-page-freebies,
body.page-template-page-freebies .site,
body.page-template-page-freebies .site-content,
body.page-template-page-freebies .content-area,
body.page-template-page-freebies .site-main {
	background: var(--ctc-color-surface-alt);
}

body.page-template-page-freebies .content-area,
body.page-template-page-freebies #primary,
body.page-template-page-freebies .site-main {
	width: 100%;
	max-width: 100%;
	margin: 0;
	float: none;
}

body.page-template-page-freebies #right-sidebar,
body.page-template-page-freebies #left-sidebar,
body.page-template-page-freebies .sidebar {
	display: none !important;
}

body.page-template-page-freebies .inside-article {
	background: transparent;
	box-shadow: none;
	padding: 0;
}

.ctc-freebies-page {
	padding: 36px 0 72px;
}

.ctc-freebies-page__shell {
	width: min(1180px, calc(100% - 32px));
	margin: 0 auto;
}

.ctc-freebies-page__hero,
.ctc-freebies-page__empty {
	padding: 30px;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid var(--ctc-color-border);
	border-radius: 30px;
	box-shadow: var(--ctc-shadow-soft);
}

.ctc-freebies-page__hero {
	margin-bottom: 24px;
}

.ctc-freebies-page__eyebrow {
	margin: 0 0 12px;
	color: var(--ctc-color-primary);
	font-family: var(--ctc-font-button);
	font-size: 0.98rem;
}

.ctc-freebies-page__title {
	margin: 0 0 14px;
	font-size: clamp(2.3rem, 5vw, 4.4rem);
	line-height: 0.98;
	color: var(--ctc-color-text);
}

.ctc-freebies-page__intro {
	margin: 0;
	max-width: 56ch;
	font-size: 1.06rem;
	line-height: 1.8;
	color: var(--ctc-color-text-soft);
}

.ctc-freebies-page__grid-wrap {
	padding: 28px;
	background: rgba(255, 255, 255, 0.88);
	border: 1px solid var(--ctc-color-border);
	border-radius: 30px;
	box-shadow: var(--ctc-shadow-soft);
}

.ctc-freebies-page__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
}

.ctc-freebie-card {
	display: grid;
	grid-template-rows: auto 1fr;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--ctc-color-border);
	border-radius: 28px;
	box-shadow: 0 16px 34px rgba(17, 110, 166, 0.07);
}

.ctc-freebie-card__media {
	padding: 22px 22px 0;
}

.ctc-freebie-card__image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 24px;
	background: #fff;
}

.ctc-freebie-card__body {
	display: grid;
	gap: 14px;
	padding: 20px 22px 24px;
}

.ctc-freebie-card__title {
	margin: 0;
	font-size: clamp(1.4rem, 2.2vw, 2rem);
	line-height: 1.08;
	color: var(--ctc-color-text);
}

.ctc-freebie-card__description {
	margin: 0;
	font-size: 1rem;
	line-height: 1.75;
	color: var(--ctc-color-text-soft);
}

.ctc-freebie-card__actions {
	margin-top: 4px;
}

.ctc-freebie-card__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 0 22px;
	border: 1px solid var(--ctc-color-primary);
	border-radius: 999px;
	background: var(--ctc-color-primary);
	color: #fff;
	font-family: var(--ctc-font-button);
	font-size: 1rem;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.ctc-freebie-card__button:hover,
.ctc-freebie-card__button:focus {
	background: #8fd8ee;
	border-color: #8fd8ee;
	color: #0b2230;
	box-shadow: 0 10px 24px rgba(143, 216, 238, 0.35);
	transform: translateY(-1px);
}

.ctc-freebies-page__footnote {
	margin-top: 24px;
	text-align: center;
}

.ctc-freebies-page__footnote p {
	margin: 0;
	font-size: 0.96rem;
	line-height: 1.7;
	color: var(--ctc-color-text-soft);
}

.ctc-freebies-page__empty h2 {
	margin: 0 0 12px;
	font-size: 2rem;
	line-height: 1.08;
}

.ctc-freebies-page__empty p {
	margin: 0;
	color: var(--ctc-color-text-soft);
	font-size: 1rem;
	line-height: 1.75;
}

@media (max-width: 991px) {
	.ctc-freebies-page__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	.ctc-freebie-popup__dialog {
		padding: 14px;
	}

	.ctc-freebie-popup__inner {
		padding: 24px 18px 20px;
		border-radius: 24px;
	}

	.ctc-freebie-popup__title {
		font-size: clamp(1.65rem, 8vw, 2.25rem);
	}

	.ctc-freebie-popup__subtitle {
		font-size: 0.96rem;
	}

	.ctc-freebie-popup__image-wrap {
		max-width: 190px;
	}

	.ctc-freebie-popup__submit,
	.ctc-freebie-popup__download,
	.ctc-freebie-popup__secondary {
		width: 100%;
	}

	.ctc-freebie-floating-trigger {
		right: 10px;
		bottom: 10px;
	}

	.ctc-freebie-floating-trigger__image {
		width: 96px;
	}

	.ctc-freebies-page {
		padding: 24px 0 56px;
	}

	.ctc-freebies-page__shell {
		width: min(100%, calc(100% - 20px));
	}

	.ctc-freebies-page__hero,
	.ctc-freebies-page__grid-wrap,
	.ctc-freebies-page__empty {
		padding: 18px;
		border-radius: 22px;
	}

	.ctc-freebies-page__title {
		font-size: clamp(1.9rem, 9vw, 2.7rem);
		line-height: 1.02;
	}

	.ctc-freebies-page__intro {
		font-size: 0.98rem;
		line-height: 1.72;
	}

	.ctc-freebies-page__grid {
		gap: 16px;
	}

	.ctc-freebie-card {
		border-radius: 22px;
	}

	.ctc-freebie-card__media {
		padding: 16px 16px 0;
	}

	.ctc-freebie-card__image {
		border-radius: 18px;
	}

	.ctc-freebie-card__body {
		padding: 16px 16px 18px;
		gap: 12px;
	}

	.ctc-freebie-card__title {
		font-size: 1.35rem;
		line-height: 1.1;
	}

	.ctc-freebie-card__description {
		font-size: 0.96rem;
		line-height: 1.68;
	}

	.ctc-freebie-card__button {
		width: 100%;
		min-height: 48px;
	}
}