/* ============================================================
   Chinese Theme — Main Stylesheet
   Compatible with WordPress 6.4+ / PHP 8.1+
   ============================================================ */

/* ----------------------------------------------------------
   1. CSS Custom Properties
   ---------------------------------------------------------- */
:root {
	--ct-red:          #dd0d0d;
	--ct-red-dark:     #aa0000;
	--ct-red-light:    #ff4444;
	--ct-text:         #333333;
	--ct-heading:      #1a1a1a;
	--ct-muted:        #666666;
	--ct-white:        #ffffff;
	--ct-off-white:    #f8f5f0;
	--ct-light:        #f0f0f0;
	--ct-border:       #e0e0e0;
	--ct-dark:         #1a1a1a;
	--ct-star:         #f4b400;
	--ct-shadow-sm:    0 2px 8px  rgba(0,0,0,.06);
	--ct-shadow:       0 4px 20px rgba(0,0,0,.08);
	--ct-shadow-lg:    0 8px 40px rgba(0,0,0,.12);
	--ct-radius-sm:    4px;
	--ct-radius:       10px;
	--ct-radius-lg:    16px;
	--ct-container:    1200px;
	--ct-transition:   0.3s ease;
	--ct-nav-h:        72px;
}

/* ----------------------------------------------------------
   2. Reset & Base
   ---------------------------------------------------------- */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	font-size: 1rem;
	line-height: 1.65;
	color: var(--ct-text);
	background: var(--ct-white);
	overflow-x: hidden;
}

img, video, svg {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: var(--ct-red);
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color var(--ct-transition);
}
a:hover { color: var(--ct-red-dark); }
a:focus-visible {
	outline: 2px solid var(--ct-red);
	outline-offset: 3px;
	border-radius: 2px;
}

h1, h2, h3, h4, h5, h6 {
	font-family: Georgia, 'Palatino Linotype', Palatino, serif;
	color: var(--ct-heading);
	line-height: 1.25;
	font-weight: 700;
}

h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.35rem; }

blockquote {
	border-left: 4px solid var(--ct-red);
	padding: 1rem 1.5rem;
	margin: 1.5rem 0;
	font-style: italic;
	color: var(--ct-muted);
}

code, kbd, pre {
	font-family: 'Courier New', Courier, monospace;
	font-size: 0.9em;
}

pre {
	background: var(--ct-light);
	padding: 1rem;
	border-radius: var(--ct-radius-sm);
	overflow-x: auto;
}

hr {
	border: none;
	border-top: 1px solid var(--ct-border);
	margin: 2rem 0;
}

/* ----------------------------------------------------------
   3. Layout Utilities
   ---------------------------------------------------------- */
.ct-container {
	width: 100%;
	max-width: var(--ct-container);
	margin: 0 auto;
	padding: 0 1.5rem;
}

.ct-section-header {
	text-align: center;
	margin-bottom: 3rem;
}
.ct-section-title {
	margin-bottom: 0.75rem;
}
.ct-section-subtitle {
	font-size: 1.1rem;
	color: var(--ct-muted);
	max-width: 600px;
	margin: 0 auto;
}

/* ----------------------------------------------------------
   4. Buttons
   ---------------------------------------------------------- */
.ct-btn,
.wp-block-button__link,
.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.75rem;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	border-radius: 6px;
	border: 2px solid transparent;
	cursor: pointer;
	transition: background var(--ct-transition), color var(--ct-transition), border-color var(--ct-transition), transform 0.15s ease, box-shadow 0.15s ease;
	white-space: nowrap;
}

/* Primary (red) */
.ct-btn,
.wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background: var(--ct-red);
	color: var(--ct-white);
	border-color: var(--ct-red);
}
.ct-btn:hover,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	background: var(--ct-red-dark);
	border-color: var(--ct-red-dark);
	color: var(--ct-white);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(221, 13, 13, 0.35);
}
.ct-btn:active { transform: translateY(0); }

/* Outline (red border) */
.ct-btn--outline,
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--ct-red);
	border-color: var(--ct-red);
}
.ct-btn--outline:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--ct-red);
	color: var(--ct-white);
	transform: translateY(-1px);
}

/* White (on dark background) */
.ct-btn--white {
	background: var(--ct-white);
	color: var(--ct-red);
	border-color: var(--ct-white);
}
.ct-btn--white:hover {
	background: rgba(255,255,255,.9);
	color: var(--ct-red-dark);
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

/* Outline white (on dark background) */
.ct-btn--outline-white {
	background: transparent;
	color: var(--ct-white);
	border-color: rgba(255,255,255,.7);
}
.ct-btn--outline-white:hover {
	background: rgba(255,255,255,.15);
	border-color: var(--ct-white);
	color: var(--ct-white);
	transform: translateY(-1px);
}

/* Small button */
.ct-btn--sm { padding: 0.5rem 1.25rem; font-size: 0.875rem; }

/* ----------------------------------------------------------
   5. Header
   ---------------------------------------------------------- */
.ct-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--ct-dark);
	box-shadow: 0 2px 12px rgba(0,0,0,.25);
	height: var(--ct-nav-h);
}

.ct-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	height: 100%;
	max-width: var(--ct-container);
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* Logo in header */
.ct-header .wp-block-site-logo,
.ct-header .custom-logo-link,
.ct-header .wp-block-site-logo a {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}
.ct-header .wp-block-site-logo img,
.ct-header .custom-logo {
	max-height: 52px;
	width: auto;
	max-width: 240px;
}

/* Navigation */
.ct-header .wp-block-navigation,
.ct-header .wp-block-navigation__container {
	gap: 0;
}
.ct-header .wp-block-navigation-item__content,
.ct-header .wp-block-navigation a {
	font-size: 0.9rem;
	font-weight: 500;
	color: rgba(255,255,255,.85) !important;
	text-decoration: none;
	padding: 0.5rem 0.9rem !important;
	border-radius: var(--ct-radius-sm);
	transition: color var(--ct-transition), background var(--ct-transition);
}
.ct-header .wp-block-navigation a:hover {
	color: var(--ct-white) !important;
	background: rgba(255,255,255,.1);
}

/* Log In button in header */
.ct-header-login-wrap {
	flex-shrink: 0;
	display: flex;
	align-items: center;
}
.ct-nav-login-btn,
.ct-nav-login-btn:link,
.ct-nav-login-btn:visited {
	display: inline-flex !important;
	align-items: center;
	background: var(--ct-red) !important;
	color: var(--ct-white) !important;
	border-radius: 6px !important;
	padding: 0.4rem 1rem !important;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background var(--ct-transition);
}
.ct-nav-login-btn:hover,
.ct-nav-login-btn:focus {
	background: var(--ct-red-dark) !important;
	color: var(--ct-white) !important;
	text-decoration: none !important;
}

/* Mobile hamburger */
.ct-header .wp-block-navigation__responsive-container-open {
	color: var(--ct-white);
	background: none;
	border: none;
	cursor: pointer;
}
.ct-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--ct-dark);
}
.ct-header .wp-block-navigation__responsive-container-content a {
	color: var(--ct-white) !important;
}

/* ----------------------------------------------------------
   6. Hero Slider
   ---------------------------------------------------------- */
.ct-hero {
	position: relative;
	overflow: hidden;
	height: clamp(420px, 60vh, 700px);
	background: var(--ct-dark);
}

.ct-hero__track {
	position: relative;
	height: 100%;
}

.ct-slide {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0;
	transition: opacity 0.8s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ct-slide--active { opacity: 1; }

.ct-slide__overlay {
	display: none;
}

.ct-slide__content {
	position: relative;
	z-index: 2;
	text-align: center;
	padding: 2rem 1.5rem;
	max-width: 760px;
}

.ct-slide__title {
	font-size: clamp(2rem, 5vw, 3.25rem);
	color: var(--ct-white);
	margin-bottom: 1rem;
	text-shadow: 0 2px 8px rgba(0,0,0,.5);
}

.ct-slide__text {
	font-size: clamp(1rem, 2.5vw, 1.25rem);
	color: rgba(255,255,255,.95);
	margin-bottom: 2rem;
	text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

/* Slider arrows */
.ct-hero__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(255,255,255,.15);
	border: 2px solid rgba(255,255,255,.4);
	color: var(--ct-white);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background var(--ct-transition), border-color var(--ct-transition);
	backdrop-filter: blur(4px);
}
.ct-hero__arrow:hover {
	background: rgba(255,255,255,.3);
	border-color: rgba(255,255,255,.8);
}
.ct-hero__arrow--prev { left: 1.5rem; }
.ct-hero__arrow--next { right: 1.5rem; }

/* Dots */
.ct-dots {
	position: absolute;
	bottom: 1.5rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 0.5rem;
	z-index: 10;
}
.ct-dots__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgba(255,255,255,.4);
	border: none;
	cursor: pointer;
	transition: background var(--ct-transition), transform var(--ct-transition);
	padding: 0;
}
.ct-dots__dot--active,
.ct-dots__dot:hover {
	background: var(--ct-white);
	transform: scale(1.3);
}

/* ----------------------------------------------------------
   7. Stats Bar
   ---------------------------------------------------------- */
.ct-stats {
	background: var(--ct-red);
	padding: 1.5rem 0;
}
.ct-stats__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	text-align: center;
}
.ct-stat__number {
	display: block;
	font-family: Georgia, serif;
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	color: var(--ct-white);
	line-height: 1;
}
.ct-stat__label {
	display: block;
	font-size: 0.8rem;
	color: rgba(255,255,255,.8);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-top: 0.25rem;
}

@media (max-width: 600px) {
	.ct-stats__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.5rem;
	}
}

/* ----------------------------------------------------------
   8. Features Grid
   ---------------------------------------------------------- */
.ct-features-section {
	padding: 5rem 0;
	background: var(--ct-off-white);
}

.ct-features-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.75rem;
}

.ct-feature-card {
	background: var(--ct-white);
	border-radius: var(--ct-radius);
	padding: 2rem 1.75rem;
	text-align: center;
	box-shadow: var(--ct-shadow-sm);
	border: 1px solid var(--ct-border);
	transition: transform var(--ct-transition), box-shadow var(--ct-transition);
	display: flex;
	flex-direction: column;
	align-items: center;
}
.ct-feature-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--ct-shadow);
}

.ct-feature-card__icon {
	width: 60px;
	height: 60px;
	background: rgba(221,13,13,.08);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1.25rem;
	color: var(--ct-red);
	flex-shrink: 0;
}
.ct-feature-card__icon svg {
	width: 28px;
	height: 28px;
}

.ct-feature-card__title {
	font-size: 1.2rem;
	margin-bottom: 0.75rem;
}

.ct-feature-card__text {
	font-size: 0.95rem;
	color: var(--ct-muted);
	line-height: 1.6;
	margin-bottom: 1.5rem;
	flex: 1;
}

@media (max-width: 900px) {
	.ct-features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
	.ct-features-grid { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------
   9. Testimonials Carousel
   ---------------------------------------------------------- */
.ct-testimonials-section {
	padding: 5rem 0;
	background: var(--ct-white);
}

.ct-testimonials {
	position: relative;
	max-width: 800px;
	margin: 0 auto;
	min-height: 280px;
}

.ct-testimonial {
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.6s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 2.5rem;
	background: var(--ct-white);
	border-radius: var(--ct-radius-lg);
	box-shadow: var(--ct-shadow);
	border: 1px solid var(--ct-border);
}
.ct-testimonial--active {
	opacity: 1;
	pointer-events: auto;
	position: relative;
}

.ct-stars {
	color: var(--ct-star);
	font-size: 1.5rem;
	letter-spacing: 2px;
	margin-bottom: 1.25rem;
	display: block;
}

.ct-testimonial__text {
	font-family: Georgia, serif;
	font-size: 1.1rem;
	line-height: 1.7;
	color: var(--ct-heading);
	font-style: italic;
	margin-bottom: 1.5rem;
	flex: 1;
}

.ct-testimonial__author {
	font-style: normal;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
}
.ct-testimonial__author strong {
	font-size: 1rem;
	color: var(--ct-heading);
	font-family: inherit;
}
.ct-testimonial__role {
	font-size: 0.85rem;
	color: var(--ct-muted);
}

/* Testimonial navigation arrows */
.ct-testimonials__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--ct-white);
	border: 2px solid var(--ct-border);
	color: var(--ct-text);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color var(--ct-transition), color var(--ct-transition), box-shadow var(--ct-transition);
	box-shadow: var(--ct-shadow-sm);
}
.ct-testimonials__arrow:hover {
	border-color: var(--ct-red);
	color: var(--ct-red);
	box-shadow: var(--ct-shadow);
}
.ct-testimonials__arrow--prev { left: -56px; }
.ct-testimonials__arrow--next { right: -56px; }

/* Testimonial dots */
.ct-dots--testimonials {
	position: static;
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1.75rem;
	transform: none;
	left: auto;
	bottom: auto;
}
.ct-dots--testimonials .ct-dots__dot {
	background: var(--ct-border);
}
.ct-dots--testimonials .ct-dots__dot--active,
.ct-dots--testimonials .ct-dots__dot:hover {
	background: var(--ct-red);
}

@media (max-width: 900px) {
	.ct-testimonials__arrow--prev { left: -24px; }
	.ct-testimonials__arrow--next { right: -24px; }
}
@media (max-width: 600px) {
	.ct-testimonials__arrow { display: none; }
	.ct-testimonial { padding: 1.75rem 1.25rem; }
	.ct-testimonial__text { font-size: 1rem; }
}

/* ----------------------------------------------------------
   10. CTA Section
   ---------------------------------------------------------- */
.ct-cta-section {
	background: linear-gradient(135deg, #cc0000 0%, #dd0d0d 50%, #e63030 100%);
	padding: 5rem 0;
	text-align: center;
}
.ct-cta__title {
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	color: var(--ct-white);
	margin-bottom: 1rem;
}
.ct-cta__text {
	font-size: 1.1rem;
	color: rgba(255,255,255,.9);
	max-width: 600px;
	margin: 0 auto 2rem;
}
.ct-cta__buttons {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
}

/* ----------------------------------------------------------
   11. Page Content Area
   ---------------------------------------------------------- */
.ct-main {
	min-height: 60vh;
}

/* Content padding for non-front pages */
.ct-content-wrap {
	max-width: var(--ct-container);
	margin: 0 auto;
	padding: 3rem 1.5rem;
}

.ct-post-header {
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--ct-border);
}
.ct-post-header .entry-title {
	margin-bottom: 0.5rem;
}
.ct-post-meta {
	font-size: 0.875rem;
	color: var(--ct-muted);
}
.ct-post-meta a { color: inherit; }

.ct-entry-content {
	max-width: 820px;
}
.ct-entry-content > * + * { margin-top: 1.5rem; }
.ct-entry-content img {
	border-radius: var(--ct-radius-sm);
}

/* Post navigation — previous left, next right */
.ct-post-nav {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: space-between;
	align-items: stretch;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--ct-border);
}

/* Each nav-link block takes half the width */
.ct-post-nav .wp-block-post-navigation-link,
.ct-post-nav .post-navigation-link-previous,
.ct-post-nav .post-navigation-link-next {
	flex: 1 1 calc(50% - 0.5rem);
	min-width: 0;
}

/* Anchor styling */
.wp-block-post-navigation-link a {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 1rem 1.25rem;
	background: var(--ct-off-white);
	border-radius: var(--ct-radius);
	text-decoration: none;
	border: 1.5px solid var(--ct-border);
	height: 100%;
	box-sizing: border-box;
	transition: border-color var(--ct-transition), box-shadow var(--ct-transition);
}
.wp-block-post-navigation-link a:hover {
	border-color: var(--ct-red);
	box-shadow: var(--ct-shadow-sm);
	color: var(--ct-heading);
}

/* Label: "← Previous Lesson" / "Next Lesson →" */
.wp-block-post-navigation-link .post-navigation-link__label {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--ct-red);
}

/* Post title within the link */
.wp-block-post-navigation-link .post-navigation-link__title {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--ct-heading);
	line-height: 1.35;
}

/* Next link — align content right */
.post-navigation-link-next a {
	text-align: right;
	align-items: flex-end;
}

@media (max-width: 500px) {
	.ct-post-nav {
		flex-direction: column !important;
	}
	.ct-post-nav .wp-block-post-navigation-link {
		flex: 1 1 100%;
	}
	.post-navigation-link-next a {
		text-align: left;
		align-items: flex-start;
	}
}

/* ----------------------------------------------------------
   12. Archive / Lesson List
   ---------------------------------------------------------- */
.ct-archive-header {
	background: var(--ct-dark);
	color: var(--ct-white);
	padding: 3rem 0;
	text-align: center;
}
.ct-archive-header h1 { color: var(--ct-white); margin-bottom: 0.5rem; }
.ct-archive-header p { color: rgba(255,255,255,.7); }

.ct-posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 1.5rem;
	padding: 3rem 0;
}

.ct-post-card {
	background: var(--ct-white);
	border-radius: var(--ct-radius);
	overflow: hidden;
	box-shadow: var(--ct-shadow-sm);
	border: 1px solid var(--ct-border);
	transition: transform var(--ct-transition), box-shadow var(--ct-transition);
	display: flex;
	flex-direction: column;
}
.ct-post-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--ct-shadow);
}
.ct-post-card__thumb img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}
.ct-post-card__body {
	padding: 1.25rem;
	flex: 1;
	display: flex;
	flex-direction: column;
}
.ct-post-card__title {
	font-size: 1rem;
	margin-bottom: 0.5rem;
}
.ct-post-card__title a { color: var(--ct-heading); text-decoration: none; }
.ct-post-card__title a:hover { color: var(--ct-red); }
.ct-post-card__excerpt {
	font-size: 0.9rem;
	color: var(--ct-muted);
	flex: 1;
	margin-bottom: 1rem;
}
.ct-post-card__meta {
	font-size: 0.8rem;
	color: var(--ct-muted);
}

/* Post navigation block */
.wp-block-post-navigation-link a {
	display: flex;
	flex-direction: column;
	padding: 1rem 1.25rem;
	background: var(--ct-off-white);
	border-radius: var(--ct-radius);
	text-decoration: none;
	border: 1px solid var(--ct-border);
	transition: border-color var(--ct-transition), box-shadow var(--ct-transition);
	font-weight: 600;
	color: var(--ct-heading);
}
.wp-block-post-navigation-link a:hover {
	border-color: var(--ct-red);
	box-shadow: var(--ct-shadow-sm);
	color: var(--ct-red);
}

/* ----------------------------------------------------------
   13. 404 Page
   ---------------------------------------------------------- */
.ct-404 {
	text-align: center;
	padding: 5rem 1.5rem;
}
.ct-404__code {
	font-size: clamp(5rem, 15vw, 10rem);
	font-family: Georgia, serif;
	font-weight: 700;
	color: var(--ct-red);
	line-height: 1;
	margin-bottom: 0;
}
.ct-404__title {
	font-size: 1.75rem;
	margin-bottom: 1rem;
}
.ct-404__text {
	color: var(--ct-muted);
	max-width: 480px;
	margin: 0 auto 2rem;
}

/* ----------------------------------------------------------
   14. Footer
   ---------------------------------------------------------- */
.ct-footer {
	background: var(--ct-dark);
	color: rgba(255,255,255,.7);
}

.ct-footer__main {
	padding: 3.5rem 0 2.5rem;
}
.ct-footer__grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 3rem;
}

.ct-footer__brand img {
	max-height: 50px;
	width: auto;
	margin-bottom: 1rem;
	opacity: 0.9;
}
.ct-footer__tagline {
	font-size: 0.9rem;
	line-height: 1.6;
	color: rgba(255,255,255,.6);
	margin-bottom: 1.5rem;
}

.ct-footer__social {
	display: flex;
	gap: 0.75rem;
}
.ct-footer__social a {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255,255,255,.1);
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255,255,255,.7);
	text-decoration: none;
	transition: background var(--ct-transition), color var(--ct-transition);
}
.ct-footer__social a:hover {
	background: var(--ct-red);
	color: var(--ct-white);
}
.ct-footer__social svg { width: 16px; height: 16px; }

.ct-footer__heading {
	font-family: inherit;
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ct-white);
	margin-bottom: 1rem;
}

.ct-footer__links {
	list-style: none;
	padding: 0;
	margin: 0;
}
.ct-footer__links li { margin-bottom: 0.5rem; }
.ct-footer__links a {
	color: rgba(255,255,255,.6);
	text-decoration: none;
	font-size: 0.9rem;
	transition: color var(--ct-transition);
}
.ct-footer__links a:hover { color: var(--ct-white); }

.ct-footer__bottom {
	border-top: 1px solid rgba(255,255,255,.1);
	padding: 1.25rem 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}
.ct-footer__copy {
	font-size: 0.85rem;
	color: rgba(255,255,255,.4);
}
.ct-footer__bottom-nav {
	display: flex;
	gap: 1.5rem;
}
.ct-footer__bottom-nav a {
	font-size: 0.85rem;
	color: rgba(255,255,255,.4);
	text-decoration: none;
	transition: color var(--ct-transition);
}
.ct-footer__bottom-nav a:hover { color: rgba(255,255,255,.8); }

@media (max-width: 900px) {
	.ct-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 540px) {
	.ct-footer__grid { grid-template-columns: 1fr; gap: 1.5rem; }
	.ct-footer__bottom { flex-direction: column; text-align: center; }
}

/* ----------------------------------------------------------
   15. WordPress Block Overrides
   ---------------------------------------------------------- */

/* Align wide/full inside constrained layout */
.wp-block-group.alignfull {
	max-width: none;
}

/* Search form */
.wp-block-search__input {
	border: 1px solid var(--ct-border);
	border-radius: var(--ct-radius-sm);
	padding: 0.6rem 1rem;
}
.wp-block-search__button {
	border-radius: var(--ct-radius-sm);
	background: var(--ct-red);
	color: var(--ct-white);
	border: none;
	padding: 0.6rem 1.2rem;
	font-weight: 600;
	cursor: pointer;
}
.wp-block-search__button:hover { background: var(--ct-red-dark); }

/* Comments */
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 1rem; border-bottom: 1px solid var(--ct-border); }

/* Pagination */
.wp-block-query-pagination {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	margin-top: 2rem;
}
.page-numbers {
	padding: 0.5rem 0.875rem;
	border-radius: var(--ct-radius-sm);
	text-decoration: none;
	color: var(--ct-text);
	background: var(--ct-light);
	transition: background var(--ct-transition), color var(--ct-transition);
}
.page-numbers:hover,
.page-numbers.current {
	background: var(--ct-red);
	color: var(--ct-white);
}

/* Separator */
.wp-block-separator {
	border-color: var(--ct-border);
}

/* Cover block overlay fix */
.wp-block-cover .wp-block-cover__background { border-radius: 0; }

/* Pullquote */
.wp-block-pullquote {
	border-top: 4px solid var(--ct-red);
	border-bottom: 4px solid var(--ct-red);
	padding: 2rem 3rem;
	margin: 2.5rem 0;
}
.wp-block-pullquote blockquote p {
	font-size: 1.35rem;
	font-style: italic;
}

/* ----------------------------------------------------------
   16. Accessibility & Focus States
   ---------------------------------------------------------- */
:focus-visible {
	outline: 2px solid var(--ct-red);
	outline-offset: 3px;
}
.skip-link {
	position: absolute;
	top: -999px;
	left: 0;
	padding: 1rem;
	background: var(--ct-red);
	color: var(--ct-white);
	z-index: 9999;
}
.skip-link:focus { top: 0; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
	.ct-slide { transition: none; }
	.ct-testimonial { transition: none; }
}

/* ----------------------------------------------------------
   17. Logo in header (shortcode output)
   ---------------------------------------------------------- */

.ct-logo-link {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none;
	line-height: 0;
}
.ct-logo {
	max-height: 52px;
	width: auto;
	max-width: 220px;
	display: block;
}

/* Fix: shortcode output inside flex header should not stretch */
.ct-header__inner > .wp-block-shortcode {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

/* ----------------------------------------------------------
   18. Footer / content bottom padding
   ---------------------------------------------------------- */

/* Space between content and footer on pages and single posts */
.ct-main {
	padding-bottom: 4rem;
}

/* ----------------------------------------------------------
   19. Single Post (Lesson) — Player & Content Layout
   ---------------------------------------------------------- */

/* Breathing room between sticky header and page/post title */
.ct-main > .wp-block-group {
	padding-top: 3.5rem;
}

/* Page & post titles */
.ct-page-title.wp-block-post-title {
	font-size: clamp(1.1rem, 2vw, 1.4rem);
	line-height: 1.3;
	margin-bottom: 1rem;
}

/* Post title */
.ct-post-title.wp-block-post-title {
	font-size: clamp(1.1rem, 2vw, 1.4rem);
	line-height: 1.3;
	margin-bottom: 0.5rem;
}

/* Post meta row */
.ct-post-meta {
	font-size: 0.875rem;
	color: var(--ct-muted);
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.5rem;
}
.ct-post-meta .wp-block-post-date,
.ct-post-meta .wp-block-post-author {
	font-size: 0.875rem;
	color: var(--ct-muted);
}

/* Entry content typography */
.ct-entry-content {
	font-size: 1.05rem;
	line-height: 1.75;
}
.ct-entry-content > * + * {
	margin-top: 1.25rem;
}
.ct-entry-content p {
	margin-bottom: 1.1rem;
}
.ct-entry-content h2,
.ct-entry-content h3,
.ct-entry-content h4 {
	margin-top: 2rem;
	margin-bottom: 0.75rem;
}
.ct-entry-content a {
	color: var(--ct-red);
	font-weight: 500;
}
.ct-entry-content img {
	border-radius: var(--ct-radius-sm);
	height: auto;
	max-width: 100%;
}
.ct-entry-content ul,
.ct-entry-content ol {
	padding-left: 1.75rem;
	margin-bottom: 1rem;
}
.ct-entry-content li {
	margin-bottom: 0.4rem;
	line-height: 1.6;
}
.ct-entry-content blockquote {
	border-left: 3px solid var(--ct-red);
	padding: 0.75rem 1.25rem;
	background: var(--ct-off-white);
	border-radius: 0 var(--ct-radius-sm) var(--ct-radius-sm) 0;
	font-style: italic;
	color: var(--ct-muted);
}
.ct-entry-content strong {
	color: var(--ct-heading);
}

/* ----------------------------------------------------------
   20. PowerPress Audio Player
   ---------------------------------------------------------- */

/* Player container */
.powerpress_player,
div[class*="powerpress_player"] {
	background: var(--ct-off-white);
	border: 1px solid var(--ct-border);
	border-radius: var(--ct-radius);
	padding: 1.25rem 1.5rem;
	margin: 1.75rem 0;
	box-shadow: var(--ct-shadow-sm);
}

/* Audio element — full width */
.powerpress_player audio,
.powerpress_player .wp-audio-shortcode {
	width: 100% !important;
	max-width: 100% !important;
	display: block;
	border-radius: 4px;
}

/* Subscribe links row */
p.powerpress_links,
p.powerpress_subscribe_links {
	font-size: 0.85rem;
	color: var(--ct-muted);
	margin: 1rem 0 0.5rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0;
	line-height: 1.8;
}

p.powerpress_links a,
p.powerpress_subscribe_links a {
	text-decoration: none;
	font-weight: 500;
	padding: 0.2rem 0.6rem;
	border-radius: 3px;
	transition: background var(--ct-transition), color var(--ct-transition);
}

/* Platform-specific subtle colours */
.powerpress_link_subscribe_itunes    { color: #fc3c44; }
.powerpress_link_subscribe_spotify   { color: #1db954; }
.powerpress_link_subscribe_amazon    { color: #ff9900; }
.powerpress_link_subscribe_android   { color: #3ddc84; }
.powerpress_link_subscribe_tunein    { color: #2196f3; }
.powerpress_link_subscribe_more      { color: var(--ct-red); }

p.powerpress_links a:hover,
p.powerpress_subscribe_links a:hover {
	background: var(--ct-light);
	text-decoration: underline;
}

/* "Learn on" lead text */
p.powerpress_subscribe_links::before {
	content: "";
}

/* ----------------------------------------------------------
   21. Comment Form — Wider Fields, Polished Styling
   ---------------------------------------------------------- */

/* Comments section wrapper */
.wp-block-comments,
.ct-entry-content + .wp-block-comments {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--ct-border);
}

/* Section title */
.wp-block-comments-title,
h2.comments-title,
h3.comments-title {
	font-size: 1.5rem;
	margin-bottom: 1.5rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--ct-red);
	display: inline-block;
}

/* Reply title */
h3#reply-title,
.comment-reply-title {
	font-size: 1.25rem;
	margin-bottom: 1.5rem;
	color: var(--ct-heading);
}
.comment-reply-title small {
	font-size: 0.875rem;
	margin-left: 0.5rem;
}
.comment-reply-title small a {
	color: var(--ct-muted);
	text-decoration: none;
	font-weight: normal;
}
.comment-reply-title small a:hover { color: var(--ct-red); }

/* Comment form layout */
#respond,
.wp-block-post-comments-form {
	background: var(--ct-off-white);
	border-radius: var(--ct-radius);
	padding: 2rem;
	border: 1px solid var(--ct-border);
	margin-top: 2.5rem;
}

/* Three-column row: Name | Email | Website */
.comment-form {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.comment-form-fields-row {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

/* Labels */
.comment-form label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label,
.comment-form-comment label {
	display: block;
	font-weight: 600;
	font-size: 0.875rem;
	margin-bottom: 0.4rem;
	color: var(--ct-heading);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* All text inputs and textarea */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.wp-block-post-comments-form input[type="text"],
.wp-block-post-comments-form input[type="email"],
.wp-block-post-comments-form input[type="url"],
.wp-block-post-comments input:not([type="submit"]):not([type="checkbox"]),
.wp-block-post-comments textarea {
	width: 100% !important;
	display: block;
	padding: 0.75rem 1rem !important;
	border: 1.5px solid var(--ct-border) !important;
	border-radius: var(--ct-radius-sm) !important;
	font-family: inherit !important;
	font-size: 1rem !important;
	color: var(--ct-text) !important;
	background: var(--ct-white) !important;
	transition: border-color var(--ct-transition), box-shadow var(--ct-transition) !important;
	box-sizing: border-box !important;
	line-height: 1.5 !important;
	-webkit-appearance: none;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.wp-block-post-comments-form input:not([type="submit"]):focus,
.wp-block-post-comments-form textarea:focus,
.wp-block-post-comments input:not([type="submit"]):focus,
.wp-block-post-comments textarea:focus {
	border-color: var(--ct-red) !important;
	box-shadow: 0 0 0 3px rgba(221, 13, 13, 0.12) !important;
	outline: none !important;
}

/* Textarea */
.comment-form textarea#comment,
.wp-block-post-comments-form textarea,
.wp-block-post-comments textarea {
	min-height: 140px;
	resize: vertical;
	width: 100% !important;
	margin-bottom: 1.25rem;
}

/* Individual field wrappers */
.comment-form-author,
.comment-form-email,
.comment-form-url {
	margin-bottom: 0;
}
.comment-form-comment {
	margin-bottom: 1.25rem;
}

/* Cookies consent */
.comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
	font-size: 0.875rem;
	color: var(--ct-muted);
}
.comment-form-cookies-consent input[type="checkbox"] {
	margin-top: 0.2rem;
	accent-color: var(--ct-red);
	flex-shrink: 0;
}

/* Submit button */
.comment-form .form-submit,
.wp-block-post-comments-form .form-submit {
	margin-top: 0.5rem;
}
.comment-form input[type="submit"],
.wp-block-post-comments-form input[type="submit"],
#submit {
	display: inline-flex !important;
	align-items: center !important;
	padding: 0.75rem 2rem !important;
	background: var(--ct-red) !important;
	color: var(--ct-white) !important;
	border: 2px solid var(--ct-red) !important;
	border-radius: 6px !important;
	font-family: inherit !important;
	font-size: 1rem !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	transition: background var(--ct-transition), transform 0.15s ease !important;
	text-transform: none !important;
	letter-spacing: normal !important;
}
.comment-form input[type="submit"]:hover,
.wp-block-post-comments-form input[type="submit"]:hover,
#submit:hover {
	background: var(--ct-red-dark) !important;
	border-color: var(--ct-red-dark) !important;
	transform: translateY(-1px) !important;
}

/* Three-column layout for author/email/url on desktop */
.comment-form .comment-form-author,
.comment-form .comment-form-email,
.comment-form .comment-form-url {
	flex: 1;
}

/* Wrap author/email/url in a grid row */
.comment-form > .comment-form-author {
	display: contents;
}

/* Apply 3-col layout via CSS to the form's p elements for name/email/url */
/* WordPress wraps each field in a <p> by default */
.comment-form p.comment-form-author,
.comment-form p.comment-form-email,
.comment-form p.comment-form-url {
	margin-bottom: 0;
}

/* Grid wrapper — use ::before hack to group the 3 fields */
.comment-form {
	display: grid;
	grid-template-columns: 1fr;
}

/* Existing comment list */
.wp-block-comment-template ol,
ol.commentlist {
	list-style: none;
	padding: 0;
	margin: 0 0 2rem;
}

.comment-body {
	padding: 1.25rem;
	border-bottom: 1px solid var(--ct-border);
	margin-bottom: 0.5rem;
}
.comment-author {
	font-weight: 600;
	margin-bottom: 0.25rem;
}
.comment-author .url { color: var(--ct-red); }
.comment-meta {
	font-size: 0.8rem;
	color: var(--ct-muted);
	margin-bottom: 0.75rem;
}
.comment-content p {
	line-height: 1.65;
	margin-bottom: 0.5rem;
}
.reply { margin-top: 0.5rem; }
.reply a {
	font-size: 0.85rem;
	color: var(--ct-red);
	text-decoration: none;
	font-weight: 500;
}
.reply a:hover { text-decoration: underline; }

/* No comments message */
.no-comments {
	color: var(--ct-muted);
	font-style: italic;
	padding: 1rem 0;
}

/* JS-wrapped 3-col row for Name / Email / Website */
.ct-comment-fields-row {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 1rem;
	margin-bottom: 1.25rem;
}
.ct-comment-fields-row > p {
	margin: 0 !important;
}

/* Mobile: stack name/email/url */
@media (max-width: 640px) {
	#respond,
	.wp-block-post-comments-form {
		padding: 1.25rem;
	}
	.ct-comment-fields-row {
		grid-template-columns: 1fr;
		gap: 0.75rem;
	}
	.comment-form p.comment-form-author,
	.comment-form p.comment-form-email,
	.comment-form p.comment-form-url {
		margin-bottom: 0;
	}
}

/* ----------------------------------------------------------
   22. Page content area — bottom padding before footer
   ---------------------------------------------------------- */

/* Ensure the page template's group has bottom padding */
.ct-main > .wp-block-group {
	padding-bottom: 2rem;
}

/* ----------------------------------------------------------
   23. Print
   ---------------------------------------------------------- */
@media print {
	.ct-header, .ct-hero, .ct-footer, .ct-cta-section { display: none; }
	body { color: #000; font-size: 12pt; }
	a { text-decoration: underline; color: #000; }
}
