/**
 * TCDT Theme Custom Styles
 *
 * All visual styling for the theme. Structure is in templates,
 * design tokens are in theme.json, styling is here.
 *
 * @package TCDT_Theme
 */

/* ==========================================================================
   Custom Properties
   ========================================================================== */

:root {
	/* Header height: 1rem top + ~70px logo + 1rem bottom */
	--tcdt-header-height: 102px;
}

@media (max-width: 781px) {
	:root {
		--tcdt-header-height: 90px;
	}
}

/* ==========================================================================
   Header (orange background)
   ========================================================================== */

.tcdt-header {
	position: relative;
	z-index: 100;
}

/* Remove gap between header and hero */
.tcdt-main {
	margin-top: 0;
}

.tcdt-hero {
	margin-top: 0 !important;
}

/* Header content layering */
.tcdt-header .wp-block-site-logo,
.tcdt-header .wp-block-navigation {
	position: relative;
	z-index: 2;
}

/* Header right section (Instagram + burger) */
.tcdt-header__right {
	gap: var(--wp--preset--spacing--30);
	align-items: center;
}

.tcdt-header__social {
	margin: 0;
	padding: 0;
}

.tcdt-header__social .wp-social-link {
	margin: 0;
}

.tcdt-header__social .wp-social-link a {
	padding: 0;
}

/* Instagram icon - black on white, matching hamburger dimensions (SW-8) */
.tcdt-header__social .wp-social-link-instagram,
.tcdt-header__social.is-style-logos-only .wp-social-link-instagram {
	color: var(--wp--preset--color--contrast) !important;
	background-color: var(--wp--preset--color--base) !important;
	border: 2px solid var(--wp--preset--color--base);
	border-radius: 4px;
}

.tcdt-header__social .wp-social-link-instagram a {
	padding: 6px 8px !important;
}

.tcdt-header__social .wp-social-link-instagram svg {
	width: 24px !important;
	height: 24px !important;
}

.tcdt-header__social .wp-social-link-instagram:hover,
.tcdt-header__social.is-style-logos-only .wp-social-link-instagram:hover {
	color: var(--wp--preset--color--contrast) !important;
	opacity: 0.85;
}

/* Logo sizing */
.tcdt-header .wp-block-site-logo {
	width: 332px;
}

.tcdt-header .wp-block-site-logo img {
	width: 100%;
	height: auto;
}

.tcdt-header .wp-block-site-logo a:focus,
.tcdt-header .wp-block-site-logo a:active {
	outline: none !important;
	box-shadow: none !important;
}

/* Hamburger button - border with rounded corners */
.tcdt-header .wp-block-navigation__responsive-container-open {
	color: var(--wp--preset--color--base);
	border: 2px solid var(--wp--preset--color--base);
	border-radius: 4px;
	padding: 6px 8px;
	background: transparent;
	outline: none !important;
}

/* Keep border consistent on focus/hover/active */
.tcdt-header .wp-block-navigation__responsive-container-open:hover,
.tcdt-header .wp-block-navigation__responsive-container-open:focus,
.tcdt-header .wp-block-navigation__responsive-container-open:active {
	border: 2px solid var(--wp--preset--color--base) !important;
	outline: none !important;
	box-shadow: none !important;
}

/* Hamburger icon lines - equal width */
.tcdt-header .wp-block-navigation__responsive-container-open svg {
	width: 24px;
	height: 24px;
	stroke: var(--wp--preset--color--base);
	stroke-width: 1;
}

/* Ensure all hamburger lines are equal width */
.tcdt-header .wp-block-navigation__responsive-container-open svg line,
.tcdt-header .wp-block-navigation__responsive-container-open svg path,
.tcdt-header .wp-block-navigation__responsive-container-open svg rect {
	stroke: var(--wp--preset--color--base);
	stroke-width: 1;
	stroke-linecap: round;
}

/* Keep hamburger lines consistent on focus/hover/active */
.tcdt-header .wp-block-navigation__responsive-container-open:hover svg,
.tcdt-header .wp-block-navigation__responsive-container-open:focus svg,
.tcdt-header .wp-block-navigation__responsive-container-open:active svg {
	stroke: var(--wp--preset--color--base);
	stroke-width: 1 !important;
}

.tcdt-header .wp-block-navigation__responsive-container-open:hover svg line,
.tcdt-header .wp-block-navigation__responsive-container-open:hover svg path,
.tcdt-header .wp-block-navigation__responsive-container-open:focus svg line,
.tcdt-header .wp-block-navigation__responsive-container-open:focus svg path,
.tcdt-header .wp-block-navigation__responsive-container-open:active svg line,
.tcdt-header .wp-block-navigation__responsive-container-open:active svg path {
	stroke: var(--wp--preset--color--base);
	stroke-width: 1 !important;
}

/* ==========================================================================
   Navigation Dropdown Menu
   ========================================================================== */

/* Dropdown container */
.tcdt-header .wp-block-navigation__responsive-container.is-menu-open {
	position: absolute;
	top: calc(100% + 2px);
	right: 0;
	left: auto;
	bottom: auto;
	width: auto;
	min-width: 250px;
	max-width: 320px;
	height: auto;
	padding: var(--wp--preset--spacing--40);
	padding-top: 0.75rem;
	background-color: var(--wp--preset--color--base);
	border: 1px solid rgba(0, 0, 0, 0.1);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	border-radius: 0.5rem;
	margin: 0;
	transform: none !important;
	z-index: 10000;
}

/* Remove full-screen overlay background */
.tcdt-header .wp-block-navigation__responsive-container.is-menu-open::before {
	display: none;
}

/* Close button - positioned at top of menu with same spacing as menu items */
.tcdt-header .wp-block-navigation__responsive-container-close {
	position: absolute;
	top: 12px;
	right: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--contrast);
}

/* Menu content wrapper */
.tcdt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	width: 100% !important;
	padding: 0;
	gap: 0 !important;
}

/* Menu items */
.tcdt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100% !important;
	display: block !important;
}

/* Menu item links - all styling here */
.tcdt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block !important;
	width: 100% !important;
	padding: 12px 0 !important;
	color: var(--wp--preset--color--contrast) !important;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	background-color: transparent !important;
	border-left: none !important;
	border-right: none !important;
	border-top: none !important;
	outline: none !important;
	box-shadow: none !important;
}

.tcdt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:last-child .wp-block-navigation-item__content {
	border-bottom: none;
}

/* Remove current-menu-item highlight (the border around Home) */
.tcdt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content,
.tcdt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover,
.tcdt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus {
	background-color: transparent !important;
	outline: none !important;
	box-shadow: none !important;
}

/* Hover color */
.tcdt-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--primary) !important;
}

/* ==========================================================================
   Hero Section (Cover block with image)
   ========================================================================== */

.tcdt-hero {
	margin-top: 0;
	/* Fill remaining viewport after header */
	min-height: calc(100vh - var(--tcdt-header-height));
	/* Fallback background for pages without featured images */
	background-image: url('../images/About-2024.jpg');
	background-size: cover;
	background-position: top center;
	overflow: visible;
}

/* Modern browsers: prefer svh for mobile address bar handling */
@supports (height: 100svh) {
	.tcdt-hero {
		min-height: calc(100svh - var(--tcdt-header-height));
	}
}

/* Position featured image from top (crops bottom, not top/bottom) */
.tcdt-hero .wp-block-cover__image-background {
	object-position: top center;
}

/* No fallback image when using video hero (front page) */
.tcdt-hero:has(.wp-block-cover__video-background),
.tcdt-hero:has(.tcdt-hero__video) {
	background-image: none;
}

/* Allow dropdown to overflow the cover block */
.tcdt-hero .wp-block-cover__inner-container {
	overflow: visible;
}

/* Responsive hero video */
.tcdt-hero__video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	position: absolute;
	top: 0;
	left: 0;
}

.tcdt-hero__video--portrait {
	display: none;
}

@media (max-width: 768px) {
	.tcdt-hero__video--landscape {
		display: none;
	}

	.tcdt-hero__video--portrait {
		display: block;
	}
}

/* Ensure hero container positions videos correctly when using custom HTML */
.tcdt-hero:has(.tcdt-hero__video) {
	position: relative;
}

/* Hero Title & Tagline (homepage + interior pages) */
.tcdt-hero-title,
.tcdt-hero-tagline,
.tcdt-hero .wp-block-post-title {
	text-shadow:
		0 2px 4px rgba(0, 0, 0, 0.8),
		0 4px 12px rgba(0, 0, 0, 0.6),
		0 8px 24px rgba(0, 0, 0, 0.4);
	letter-spacing: 0.02em;
}

.tcdt-hero-title,
.tcdt-hero .wp-block-post-title {
	margin-top: 0;
}

.tcdt-hero-title a {
	color: inherit;
	text-decoration: none;
}

.tcdt-hero-tagline {
	margin-top: var(--wp--preset--spacing--30);
}

/* ==========================================================================
   Section Base Styles
   ========================================================================== */

.tcdt-section {
	padding-block: var(--wp--preset--spacing--80);
	padding-inline: var(--wp--preset--spacing--30);
}


/* ==========================================================================
   Mission Statement Section (HP-2, HP-3)
   ========================================================================== */

.tcdt-mission {
	text-align: center;
}

.tcdt-mission__title {
	margin-bottom: var(--wp--preset--spacing--40);
}

.tcdt-mission__text {
	max-width: 800px;
	margin-inline: auto;
	margin-bottom: var(--wp--preset--spacing--40);
	line-height: 1.8;
	color: var(--wp--preset--color--body-text);
}


/* ==========================================================================
   Cards Section
   ========================================================================== */

.tcdt-cards {
	background-color: var(--wp--preset--color--light-bg);
	margin-block-start: 0; /* Override WP flow layout gap after hero */
}

.tcdt-cards__grid {
	gap: var(--wp--preset--spacing--50);
	align-items: stretch !important;
}

.tcdt-card {
	background-color: var(--wp--preset--color--base);
	border-radius: 0.5rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	display: flex !important;
	flex-direction: column !important;
}

/* Ensure Query Loop inside card also uses flex column layout */
.tcdt-card .wp-block-query,
.tcdt-card .wp-block-post-template {
	display: flex !important;
	flex-direction: column !important;
	flex: 1;
}

.tcdt-card .wp-block-post-template > li {
	display: flex !important;
	flex-direction: column !important;
	flex: 1;
}

/* Linked cards - entire card is clickable */
.tcdt-card--linked {
	position: relative;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tcdt-card--linked:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	transform: translateY(-2px);
}

/* Stretched link - covers entire card */
.tcdt-card--linked .tcdt-card__image a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.tcdt-card--linked .tcdt-card__image a {
	display: block;
}

.tcdt-card__image {
	margin-bottom: 0;
}

.tcdt-card__image img {
	width: 100%;
	height: auto;
	aspect-ratio: 4/3;
	object-fit: cover;
}

.tcdt-card__title {
	padding-inline: var(--wp--preset--spacing--40);
	padding-top: var(--wp--preset--spacing--40);
	margin-bottom: var(--wp--preset--spacing--20);
}

.tcdt-card__date {
	padding-inline: var(--wp--preset--spacing--40);
	padding-top: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.tcdt-card__description {
	padding-inline: var(--wp--preset--spacing--40);
	padding-bottom: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--body-text);
}

.tcdt-card__cta {
	margin-top: auto !important;
	padding-top: 1.5em;
	padding-inline: var(--wp--preset--spacing--40);
	padding-bottom: var(--wp--preset--spacing--40);
}

.tcdt-card__cta-btn {
	padding: 0.75em 1.5em;
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	text-decoration: none;
	font-weight: 600;
	border-radius: 4px;
	transition: background-color 0.2s ease;
}

.tcdt-card__cta-btn:hover {
	background-color: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--base);
}

/* ==========================================================================
   Supporters Cards (Donate page - cards without images)
   ========================================================================== */

.tcdt-supporters {
	background-color: var(--wp--preset--color--light-bg);
}

.tcdt-supporters .tcdt-card {
	padding: var(--wp--preset--spacing--40);
}

.tcdt-supporters .tcdt-card__title {
	padding-top: 0;
	padding-inline: 0;
	margin-bottom: var(--wp--preset--spacing--30);
}

.tcdt-supporters .tcdt-card__description {
	padding-inline: 0;
	padding-bottom: 0;
	line-height: 1.8;
}

/* ==========================================================================
   Single Post
   ========================================================================== */

.tcdt-post__date {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	margin-bottom: var(--wp--preset--spacing--40);
}

/* ==========================================================================
   News Section (Latest News from Query Loop)
   ========================================================================== */

.tcdt-news {
	background-color: var(--wp--preset--color--light-bg);
}

.tcdt-news__title {
	margin-bottom: var(--wp--preset--spacing--60);
}

.tcdt-news__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--wp--preset--spacing--50);
	list-style: none;
	padding: 0;
	margin: 0;
}

.tcdt-news__item {
	background-color: var(--wp--preset--color--base);
	border-radius: 0.5rem;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tcdt-news__image {
	margin: 0;
	/* Default image for posts without featured images */
	background-color: var(--wp--preset--color--light-bg);
	background-image: url('/wp-content/uploads/2015/03/logo1-1.png');
	background-size: 60%;
	background-position: center;
	background-repeat: no-repeat;
	aspect-ratio: 4/3;
}

.tcdt-news__image img {
	width: 100%;
	height: 100%;
	aspect-ratio: 4/3;
	object-fit: cover;
	display: block;
}

.tcdt-news__item-title {
	padding: var(--wp--preset--spacing--40);
	padding-bottom: 0;
	margin: 0;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.3;
}

.tcdt-news__item-title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.tcdt-news__item-title a:hover {
	color: var(--wp--preset--color--primary);
}

.tcdt-news__date {
	padding-inline: var(--wp--preset--spacing--40);
	padding-top: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.tcdt-news__excerpt {
	padding: var(--wp--preset--spacing--40);
	padding-top: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--body-text);
	font-size: var(--wp--preset--font-size--small);
}

.tcdt-news__excerpt .wp-block-post-excerpt__more-link {
	display: inline;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	font-weight: 500;
}

.tcdt-news__excerpt .wp-block-post-excerpt__more-link:hover {
	text-decoration: underline;
}

.tcdt-news__buttons {
	margin-top: var(--wp--preset--spacing--60);
}

/* News archive pagination */
.tcdt-news--archive .wp-block-query-pagination {
	margin-top: var(--wp--preset--spacing--60);
	gap: var(--wp--preset--spacing--20);
}

.tcdt-news--archive .wp-block-query-pagination a,
.tcdt-news--archive .wp-block-query-pagination-numbers .current {
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	border: 1px solid var(--wp--preset--color--muted);
	border-radius: 4px;
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.tcdt-news--archive .wp-block-query-pagination a:hover {
	background-color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.tcdt-news--archive .wp-block-query-pagination-numbers .current {
	background-color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

@media (max-width: 1024px) {
	.tcdt-news__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.tcdt-news__grid {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   Quotes Section (Carousel)
   ========================================================================== */

/* HP-12: Full-width section with split background */
.tcdt-quotes {
	position: relative;
	background-color: var(--wp--preset--color--base);
	padding-block: 0;
	padding-inline: 0;
	margin-block: 0;
}

/* Split background: white left, orange right */
.tcdt-quotes::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	right: 0;
	background-color: var(--wp--preset--color--primary);
	z-index: 0;
}

/* Ensure content stays above background */
.tcdt-quotes > * {
	position: relative;
	z-index: 1;
}

.tcdt-quotes__layout {
	gap: var(--wp--preset--spacing--60);
	align-items: center;
}

/* Column stretches to match image height */
.tcdt-quotes__carousel-col {
	display: flex;
	justify-content: center;
}

/* Carousel fills the column */
.tcdt-quotes__carousel {
	position: relative;
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Stack all quotes absolutely */
.tcdt-quotes__carousel .tcdt-quote {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	transform: translateY(-50%);
	padding: 0;
	opacity: 0;
	border-left: none;
	padding-left: 0;
	margin-bottom: 0;
	text-align: center;
	animation: quote-fade 15s infinite;
}

/* Explicit delays per quote - no JS dependency */
.tcdt-quotes__carousel .tcdt-quote:nth-child(1) { animation-delay: 0s; }
.tcdt-quotes__carousel .tcdt-quote:nth-child(2) { animation-delay: 5s; }
.tcdt-quotes__carousel .tcdt-quote:nth-child(3) { animation-delay: 10s; }

/* Fade animation - ~1 second transition, no gap */
@keyframes quote-fade {
	0%, 27% { opacity: 1; }
	33%, 100% { opacity: 0; }
}

.tcdt-quote {
	border: none;
	padding: 0;
	text-align: center;
	margin-block: var(--wp--preset--spacing--60);
}

.tcdt-quote p {
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	font-size: clamp(1.25rem, 4vw, 2rem);
	color: var(--wp--preset--color--primary);
	line-height: 1.4;
	margin: 0 auto var(--wp--preset--spacing--30);
	max-width: 90%;
}

.tcdt-quote cite {
	font-style: normal;
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--muted);
	display: block;
	text-align: center;
}

/* Standalone quotes (outside homepage carousel) — smaller font for interior pages */
.entry-content > .tcdt-quote p,
.wp-block-post-content > .tcdt-quote p {
	font-size: clamp(1.05rem, 2.5vw, 1.35rem);
}

.tcdt-quotes__image img {
	border-radius: 0.5rem;
}

/* Latest News in Quotes Section (HP-9, HP-12) */

/* HP-12: News column padding (background now handled at section level) */
.tcdt-quotes__news {
	padding: var(--wp--preset--spacing--60);
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.tcdt-quotes__news-title {
	margin-bottom: var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--base);
}

.tcdt-news-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap;
	justify-content: center;
	gap: var(--wp--preset--spacing--40);
	width: 100%;
}

.tcdt-news-list > li {
	flex: 1 1 0;
	min-width: 0;
	display: block;
}

@media (max-width: 781px) {
	.tcdt-news-list {
		flex-direction: column !important;
		max-width: 24rem;
		margin-inline: auto;
	}
}

.tcdt-news-item {
	flex: 1 1 0;
	min-width: 0;
	gap: var(--wp--preset--spacing--20);
	align-items: center;
}

.tcdt-news-item__image {
	flex-shrink: 0;
	margin: 0;
}

.tcdt-news-item__image img {
	border-radius: 4px;
	object-fit: cover;
}

.tcdt-news-item__title {
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
	margin-bottom: 0;
	text-align: center;
}

.tcdt-news-item__title a {
	color: var(--wp--preset--color--base);
	text-decoration: none;
}

.tcdt-news-item__title a:hover {
	color: var(--wp--preset--color--light-bg);
}

.tcdt-news-item__date {
	font-size: var(--wp--preset--font-size--small);
	color: rgba(255, 255, 255, 0.8);
}

.tcdt-quotes__news-cta {
	margin-top: var(--wp--preset--spacing--40);
}

/* Reverse button style: white background normally, outline on hover */
.tcdt-news-button .wp-block-button__link {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border: 2px solid var(--wp--preset--color--base);
}

.tcdt-news-button .wp-block-button__link:hover,
.tcdt-news-button .wp-block-button__link:focus,
.tcdt-news-button .wp-block-button__link:active {
	background-color: transparent;
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--base);
	outline: none;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.tcdt-cta {
	padding-block: var(--wp--preset--spacing--70);
	margin-top: 0; /* HP-12: Remove WP block margin so quotes section orange extends to edge */
}

.tcdt-cta__title {
	color: var(--wp--preset--color--base);
	margin-bottom: var(--wp--preset--spacing--30);
}

.tcdt-cta__text {
	color: var(--wp--preset--color--base);
	max-width: 600px;
	margin-inline: auto;
	margin-bottom: var(--wp--preset--spacing--40);
}

.tcdt-cta .is-style-outline .wp-block-button__link {
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--base);
	background-color: transparent;
}

.tcdt-cta .is-style-outline .wp-block-button__link:hover,
.tcdt-cta .is-style-outline .wp-block-button__link:focus,
.tcdt-cta .is-style-outline .wp-block-button__link:active {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	outline: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

/* Flex layout now handled by WordPress via layout attribute in footer.html */

.tcdt-footer__nav a {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}

.tcdt-footer__nav a:hover {
	color: var(--wp--preset--color--contrast);
}

.tcdt-footer__logo {
	margin: 0;
}

.tcdt-footer__logo a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.tcdt-footer__copyright {
	color: var(--wp--preset--color--muted);
	margin: 0;
}

/* Footer Option B - Centered/Stacked
   ---------------------------------------- */
.tcdt-footer--option-b .tcdt-footer__logo {
	font-size: var(--wp--preset--font-size--large);
}

/* Footer Option C - Two-Row Compact
   ---------------------------------------- */
.tcdt-footer--option-c .tcdt-footer__row-1 {
	margin-bottom: 0;
}

.tcdt-footer--option-c .tcdt-footer__row-2 {
	margin-bottom: 0;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 781px) {
	.tcdt-section {
		padding-block: var(--wp--preset--spacing--60);
	}

	.tcdt-cards__grid {
		flex-direction: column;
	}

	.tcdt-quotes__layout {
		flex-direction: column;
	}

	.tcdt-quotes__image {
		order: -1;
	}

	/* HP-12: Section padding override for mobile */
	.tcdt-quotes {
		padding-block: 0;
	}

	/* HP-12: Carousel needs height since quotes are absolutely positioned */
	.tcdt-quotes__carousel {
		min-height: 200px;
		padding-block: var(--wp--preset--spacing--60);
	}

	/* HP-12: Hide split background on mobile (stacked layout) */
	.tcdt-quotes::before {
		display: none;
	}

	/* HP-12: Full orange background for news on mobile */
	.tcdt-quotes__news {
		background-color: var(--wp--preset--color--primary);
		margin-inline: calc(-1 * var(--wp--preset--spacing--50));
		padding-inline: var(--wp--preset--spacing--50);
	}

	/* HP-14: Center heading and button on mobile */
	.tcdt-quotes__news-title {
		text-align: center;
	}

	.tcdt-quotes__news-cta {
		justify-content: center !important;
	}
}

/* ==========================================================================
   Timeline Section (AB-3)
   ========================================================================== */

.tcdt-timeline {
	/* Background handled by WP block (primary color) */
}

.tcdt-timeline__title {
	margin-bottom: var(--wp--preset--spacing--70);
	font-size: var(--wp--preset--font-size--xx-large);
}

.tcdt-timeline__container {
	position: relative;
	padding-left: var(--wp--preset--spacing--60);
}

/* Vertical line */
.tcdt-timeline__container::before {
	content: "";
	position: absolute;
	left: 8px;
	top: 0;
	bottom: 0;
	width: 2px;
	background-color: var(--wp--preset--color--base);
	opacity: 0.5;
}

.tcdt-timeline__item {
	position: relative;
	margin-bottom: var(--wp--preset--spacing--60);
}

.tcdt-timeline__item:last-child {
	margin-bottom: 0;
}

/* Year heading - no marker */


.tcdt-timeline__year {
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 700;
	margin-bottom: var(--wp--preset--spacing--30);
	line-height: 1;
}

.tcdt-timeline__content {
	position: relative;
	line-height: 1.7;
	margin-bottom: var(--wp--preset--spacing--20);
	opacity: 0.95;
}

/* Dot marker on each event */
.tcdt-timeline__content::before {
	content: "";
	position: absolute;
	/* Center on line: line is at 8px (2px wide, center at 9px), circle is 14px wide */
	left: calc(-1 * var(--wp--preset--spacing--60) + 2px);
	/* Align to first line of text (line-height 1.7, approx center at 0.85em) */
	top: calc(1em * 0.85 - 7px);
	width: 14px;
	height: 14px;
	background-color: var(--wp--preset--color--base);
	border-radius: 50%;
}

.tcdt-timeline__content:last-child {
	margin-bottom: 0;
}

/* Nested lists within timeline (committee members, contributors) */
.tcdt-timeline__item ul {
	margin-top: var(--wp--preset--spacing--20);
	margin-bottom: var(--wp--preset--spacing--20);
	padding-left: 1.5em;
	list-style: disc;
	opacity: 0.95;
}

.tcdt-timeline__item ul li {
	margin-bottom: 0.25em;
	color: var(--wp--preset--color--base);
}

/* Responsive: Mobile */
@media (max-width: 600px) {
	.tcdt-timeline__container {
		padding-left: var(--wp--preset--spacing--50);
	}

	.tcdt-timeline__content::before {
		/* Center on line: circle is 10px wide, line center at 9px, so left at 4px */
		left: calc(-1 * var(--wp--preset--spacing--50) + 4px);
		/* Align with mobile text */
		top: calc(1em * 0.85 - 5px);
		width: 10px;
		height: 10px;
	}

	.tcdt-timeline__year {
		font-size: var(--wp--preset--font-size--xx-large);
	}
}

/* Reversed timeline variant (2025 at top, arrow pointing up) */
.tcdt-timeline--reversed .tcdt-timeline__container {
	/* Flex prevents margin collapse on first child */
	display: flex;
	flex-direction: column;
}

.tcdt-timeline--reversed .tcdt-timeline__container::before {
	/* Line starts below the arrowhead */
	top: 16px;
}

.tcdt-timeline--reversed .tcdt-timeline__container::after {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	/* Triangle pointing up */
	width: 0;
	height: 0;
	border-left: 9px solid transparent;
	border-right: 9px solid transparent;
	border-bottom: 16px solid var(--wp--preset--color--base);
	opacity: 0.5;
}

.tcdt-timeline--reversed .tcdt-timeline__item:first-child {
	/* Add clearance between arrow head and first event marker */
	margin-top: 32px;
}

/* ==========================================================================
   People Accordion (AB-2)
   ========================================================================== */

.tcdt-people-accordion {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.tcdt-person {
	/* Removed border dividers */
}

.tcdt-person__header {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--30);
	background: transparent;
	border: none;
	cursor: pointer;
	text-align: center;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast);
	transition: color 0.2s ease;
}

.tcdt-person__header:hover {
	color: var(--wp--preset--color--primary);
}

.tcdt-person__header:focus {
	outline: none;
}

.tcdt-person__header:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.tcdt-person__name {
	font-weight: 500;
}

/* Plus/minus icon */
.tcdt-person__icon {
	position: relative;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	margin-left: 0.75em;
}

.tcdt-person__icon::before,
.tcdt-person__icon::after {
	content: "";
	position: absolute;
	background-color: currentColor;
	transition: transform 0.2s ease;
}

/* Horizontal bar */
.tcdt-person__icon::before {
	top: 50%;
	left: 0;
	width: 100%;
	height: 2px;
	transform: translateY(-50%);
}

/* Vertical bar (rotates to horizontal when expanded) */
.tcdt-person__icon::after {
	top: 0;
	left: 50%;
	width: 2px;
	height: 100%;
	transform: translateX(-50%);
}

/* Rotate vertical bar to horizontal when expanded */
.tcdt-person__header[aria-expanded="true"] .tcdt-person__icon::after {
	transform: translateX(-50%) rotate(90deg);
}

/* Bio content panel */
.tcdt-person__bio {
	overflow: hidden;
}

.tcdt-person__bio[hidden] {
	display: none;
}

.tcdt-person__bio-content {
	padding: 0 var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--body-text);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.7;
}

.tcdt-person__bio-content p {
	margin-bottom: var(--wp--preset--spacing--20);
}

.tcdt-person__bio-content p:last-child {
	margin-bottom: 0;
}

/* People section cards - no longer using card description for names */
.tcdt-people .tcdt-card__description {
	padding-bottom: var(--wp--preset--spacing--40);
}

/* ==========================================================================
   Workshop & Work Experience Single Pages
   ========================================================================== */

.tcdt-workshop-content,
.tcdt-workexperience-content {
	max-width: 800px;
	margin-inline: auto;
}

.tcdt-workshop-nav,
.tcdt-workexperience-nav {
	margin-bottom: var(--wp--preset--spacing--40);
}

.tcdt-workshop-nav a,
.tcdt-workexperience-nav a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.tcdt-workshop-nav a:hover,
.tcdt-workexperience-nav a:hover {
	text-decoration: underline;
}

.tcdt-workshop-nav--bottom,
.tcdt-workexperience-nav--bottom {
	margin-top: var(--wp--preset--spacing--60);
	margin-bottom: 0;
}

.tcdt-workshop-meta,
.tcdt-workexperience-meta {
	background-color: var(--wp--preset--color--light-bg);
	padding: var(--wp--preset--spacing--40);
	border-radius: 0.5rem;
	margin-bottom: var(--wp--preset--spacing--40);
}

.tcdt-workshop-meta p,
.tcdt-workexperience-meta p {
	margin-bottom: var(--wp--preset--spacing--20);
}

.tcdt-workshop-meta p:last-child,
.tcdt-workexperience-meta p:last-child {
	margin-bottom: 0;
}

.tcdt-workshop-section-title,
.tcdt-workexperience-section-title {
	font-size: var(--wp--preset--font-size--large);
	margin-bottom: var(--wp--preset--spacing--30);
	margin-top: var(--wp--preset--spacing--40);
}

.tcdt-workshop-description,
.tcdt-workexperience-description {
	line-height: 1.8;
	margin-bottom: var(--wp--preset--spacing--40);
}

.tcdt-workshop-description p,
.tcdt-workexperience-description p {
	margin-bottom: var(--wp--preset--spacing--30);
}

.tcdt-workshop-apply,
.tcdt-workexperience-apply {
	margin-top: var(--wp--preset--spacing--40);
	margin-bottom: var(--wp--preset--spacing--40);
}

.tcdt-apply-button {
	display: inline-block;
	padding: 1em 2em;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	text-decoration: none;
	border-radius: 4px;
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	transition: background-color 0.2s ease;
}

.tcdt-apply-button:hover {
	background-color: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--base);
}

.tcdt-apply-button--disabled {
	background-color: var(--wp--preset--color--muted);
	color: var(--wp--preset--color--base);
	cursor: not-allowed;
	pointer-events: none;
}

.tcdt-apply-button--disabled:hover {
	background-color: var(--wp--preset--color--muted);
}

/* ==========================================================================
   Workshop & Work Experience Listings
   ========================================================================== */

/* Add spacing before section headings and listing containers */
.tcdt-listing__section-heading,
.tcdt-listing--workshops {
	margin-top: var(--wp--preset--spacing--60);
}

.tcdt-listing {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--50);
}

.tcdt-listing__empty {
	text-align: center;
	color: var(--wp--preset--color--muted);
	font-style: italic;
	padding: var(--wp--preset--spacing--60) 0;
}

.tcdt-listing__item {
	display: flex;
	gap: var(--wp--preset--spacing--40);
	background-color: var(--wp--preset--color--base);
	border-radius: 0.5rem;
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}

.tcdt-listing__item:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Fixed-width image container; height stretches to card */
.tcdt-listing__image-link {
	flex-shrink: 0;
	width: 250px;
	min-height: 188px;
	align-self: stretch;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background-color: #e8e6e3;
}

.tcdt-listing__image-link img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Logo fallback: don't stretch, keep original size centered */
.tcdt-listing__image-link img[src*="logo1-1"] {
	width: auto;
	height: auto;
	max-width: 150px;
	max-height: 150px;
	object-fit: contain;
}

.tcdt-listing__content {
	flex: 1;
	padding: var(--wp--preset--spacing--40);
	display: flex;
	flex-direction: column;
}

/* Title: Heading font, larger size, underline on hover */
.tcdt-listing__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.25rem, 2.5vw, 1.5rem);
	font-weight: 500;
	margin-top: 0;
	margin-bottom: var(--wp--preset--spacing--20);
	line-height: 1.3;
}

.tcdt-listing__title a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	transition: border-color 0.2s ease;
}

.tcdt-listing__title a:hover {
	color: var(--wp--preset--color--primary);
	border-bottom-color: var(--wp--preset--color--primary);
}

/* Meta: Venue and dates styling */
.tcdt-listing__meta {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin-bottom: var(--wp--preset--spacing--30);
	line-height: 1.6;
}

.tcdt-listing__venue {
	display: block;
	font-weight: 500;
	color: var(--wp--preset--color--body-text);
	margin-bottom: 0.25em;
}

.tcdt-listing__dates {
	display: block;
}

/* Excerpt (kept for backwards compatibility) */
.tcdt-listing__excerpt {
	color: var(--wp--preset--color--body-text);
	line-height: 1.7;
	margin-bottom: var(--wp--preset--spacing--30);
	flex-grow: 1;
}

/* Buttons container */
.tcdt-listing__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	margin-top: auto;
}

/* Button base styling - uppercase with letter-spacing like theme buttons */
.tcdt-listing__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.875em 1.5em;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	text-decoration: none;
	border-radius: 4px;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

/* Info button (orange/primary) with icon */
.tcdt-listing__btn--info {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.tcdt-listing__btn--info::before {
	content: "\2139";
	font-weight: 700;
	font-size: 1.1em;
}

.tcdt-listing__btn--info:hover {
	background-color: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--base);
	transform: translateY(-1px);
}

/* Apply button (black/contrast) with icon */
.tcdt-listing__btn--apply {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.tcdt-listing__btn--apply::before {
	content: "\2192";
	font-weight: 700;
}

.tcdt-listing__btn--apply:hover {
	background-color: var(--wp--preset--color--body-text);
	color: var(--wp--preset--color--base);
	transform: translateY(-1px);
}

/* Applications Open Later (gray, disabled) */
.tcdt-listing__btn--later {
	background-color: var(--wp--preset--color--muted);
	color: var(--wp--preset--color--base);
	cursor: default;
	opacity: 0.9;
}

.tcdt-listing__btn--later::before {
	content: "\23F0";
}

/* Applications Closed (gray, disabled) */
.tcdt-listing__btn--closed {
	background-color: var(--wp--preset--color--muted);
	color: var(--wp--preset--color--base);
	cursor: default;
	opacity: 0.9;
}

.tcdt-listing__btn--closed::before {
	content: "\2715";
}

/* Responsive: Stack on mobile */
@media (max-width: 781px) {
	.tcdt-listing__item {
		flex-direction: column;
	}

	.tcdt-listing__image-link {
		width: 100%;
		height: 200px;
	}

	.tcdt-listing__buttons {
		flex-direction: column;
	}

	.tcdt-listing__btn {
		justify-content: center;
		width: 100%;
	}
}

/* Previous Listings (archive pages)
   -------------------------------------------------------------------------- */

.tcdt-listing--previous .wp-block-post {
	margin-bottom: 0;
}

.tcdt-listing__item--previous {
	border-bottom: 1px solid var(--wp--preset--color--contrast-3, #ddd);
}

.tcdt-listing__item--previous:last-child {
	border-bottom: none;
}

.tcdt-listing__item--previous .tcdt-listing__title {
	margin-bottom: 0.25em;
}

.tcdt-listing__summary {
	margin-top: 0.75em;
	color: var(--wp--preset--color--contrast-2, #555);
	font-size: var(--wp--preset--font-size--small, 0.9rem);
	line-height: 1.6;
}

.tcdt-listing__nav {
	margin-block: var(--wp--preset--spacing--40);
}

.tcdt-listing__nav a {
	color: var(--wp--preset--color--primary, #b9975b);
	text-decoration: none;
	font-weight: 500;
}

.tcdt-listing__nav a:hover {
	text-decoration: underline;
}

.tcdt-listing__pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	justify-content: center;
	margin-block: var(--wp--preset--spacing--50);
}

.tcdt-listing__pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	padding: 0.35rem 0.6rem;
	border: 1px solid var(--wp--preset--color--primary, #b9975b);
	color: var(--wp--preset--color--primary, #b9975b);
	text-decoration: none;
	font-weight: 500;
	line-height: 1;
	border-radius: 2px;
}

.tcdt-listing__pagination .page-numbers:hover,
.tcdt-listing__pagination .page-numbers.current {
	background: var(--wp--preset--color--primary, #b9975b);
	color: #fff;
}

.tcdt-listing__pagination .page-numbers.dots {
	border: 0;
	background: transparent;
	color: inherit;
}

/* ==========================================================================
   Evaluation Scores (Schools page)
   ========================================================================== */

.tcdt-eval {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--40);
	justify-content: center;
	margin-block: var(--wp--preset--spacing--60);
}

.tcdt-eval__item {
	flex: 1 1 140px;
	max-width: 180px;
	text-align: center;
	padding: var(--wp--preset--spacing--40);
	background-color: var(--wp--preset--color--base);
	border-radius: 0.5rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tcdt-eval__score {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(2rem, 5vw, 2.75rem);
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	line-height: 1.2;
}

.tcdt-eval__label {
	display: block;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin-top: var(--wp--preset--spacing--20);
}

/* Homepage carousel quotes: reset block margin (carousel handles positioning) */
.tcdt-quotes__carousel .tcdt-quote {
	margin-block: 0;
}

/* ==========================================================================
   Schools Workshop Grid (vertical cards)
   ========================================================================== */

.tcdt-schools-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--wp--preset--spacing--50);
	margin-block: var(--wp--preset--spacing--60);
}

.tcdt-schools-grid__card {
	display: flex;
	flex-direction: column;
	background-color: var(--wp--preset--color--base);
	border-radius: 0.5rem;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.2s ease;
}

.tcdt-schools-grid__card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.tcdt-schools-grid__image {
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-color: #e8e6e3;
}

.tcdt-schools-grid__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tcdt-schools-grid__content {
	padding: var(--wp--preset--spacing--40);
	flex: 1;
}

.tcdt-schools-grid__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.1rem, 2vw, 1.35rem);
	color: var(--wp--preset--color--primary);
	margin: 0 0 var(--wp--preset--spacing--30);
}

.tcdt-schools-grid__description {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--body-text);
	line-height: 1.7;
	margin: 0;
}

@media (max-width: 768px) {
	.tcdt-schools-grid {
		grid-template-columns: 1fr;
	}
}
