/* ============================================================
   YOUTHHUB CUSTOM CSS
   Paste into Appearance > Customize > Additional CSS
   ============================================================ */
/* ============================================================
   1. TOKENS
   Change a colour here and it changes everywhere.
   ============================================================ */
:root {
/* bright coral. decoration and fills only */
/* coral hover */
/* deeper red. safe for text on white (4.6:1) */
/* headings */
/* text sitting on coral */
}

/* ============================================================
   2. SINGLE POST / PAGE TITLE
   clamp() = 32px on a phone, 48px on desktop, fluid between.
   ============================================================ */
body.single-post .entry-title,
body.single .entry-title,
body.page .page-title {
	font-size: clamp(2rem, 4.5vw + 0.6rem, 3rem) !important;
	font-weight: 400 !important;
	line-height: 1.15;
	letter-spacing: -.015em;
/* large light type looks loose without this */
	color: var(--yh-ink);
	text-align: left;
	margin-bottom: .8em;
	overflow-wrap: break-word;
/* stops a long URL blowing out mobile */
}

/* ============================================================
   3. HOME / ARCHIVE CARD TITLES
   The colour rule here is the fix for red card titles.
   ============================================================ */
h2.entry-title {
	font-size: clamp(1.125rem, 0.8vw + 1rem, 1.25rem) !important;
	font-weight: 400 !important;
	line-height: 1.4;
}

h2.entry-title a,
.entry-title a,
.page-title a {
	color: var(--yh-ink);
	background-image: none;
/* no underline animation on titles */
}

h2.entry-title a:hover,
.entry-title a:hover,
.page-title a:hover {
	color: var(--yh-accent-ink);
}

/* ============================================================
   4. IN-CONTENT HEADINGS
   Note: the post title is already the page's h1, so an h1 inside
   post content is a duplicate. Use h2 as your top level. The h1
   rule below is a safety net, not an invitation.
   ============================================================ */
.entry-content h1,
.entry-content h2 {
	font-size: clamp(1.5rem, 1.8vw + 1.1rem, 1.875rem) !important;
	font-weight: 400 !important;
	line-height: 1.25;
	margin-top: 1.6em;
	margin-bottom: .5em;
}

.entry-content h3 {
	font-size: clamp(1.25rem, 1vw + 1rem, 1.5rem) !important;
	font-weight: 400 !important;
	line-height: 1.3;
	margin-top: 1.4em;
	margin-bottom: .4em;
}

.entry-content h4 {
	font-size: 1.25rem !important;
	font-weight: 500 !important;
/* 400 at 20px is too weak to read as a heading */
	margin-top: 1.2em;
	margin-bottom: .4em;
}

.entry-content h5,
.entry-content h6 {
	font-size: 1.125rem !important;
	font-weight: 500 !important;
	margin-top: 1.2em;
	margin-bottom: .4em;
}

/* Deliberately NOT restyling p strong / p b.
   Resizing every bolded word inside a paragraph wrecks the line
   rhythm. If you want a heading, write a heading. */
/* ============================================================
   5. LINKS
   Global colour, but the animated underline is scoped to content
   so it can never fight nav, footer or card markup.
   ============================================================ */
a {
	color: var(--yh-accent-ink);
	text-decoration: none;
	transition: color var(--yh-speed) ease;
}

a:hover {
	color: var(--yh-accent-ink-hi);
}

/* Wipe-in underline. Uses a background gradient rather than an
   absolutely positioned ::after so it survives links that wrap
   onto a second line. */
.entry-content a:not(.wp-block-button__link),
.post-content a:not(.wp-block-button__link) {
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0 2px;
	padding-bottom: 2px;
	transition: color var(--yh-speed) ease, background-size var(--yh-speed) ease;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.entry-content a:not(.wp-block-button__link):hover,
.post-content a:not(.wp-block-button__link):hover {
	background-size: 100% 2px;
}

/* Keyboard users. You had no focus style at all. */
a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--yh-accent-ink);
	outline-offset: 3px;
	border-radius: 2px;
}

/* ============================================================
   6. IMAGES
   Scoped to post content only. The old global img rule scaled
   logos, avatars, emoji and tracking pixels, and its transform
   transition interfered with the carousel.
   ============================================================ */
.entry-content figure.wp-block-image,
.post-content figure.wp-block-image {
	overflow: hidden;
/* zoom crops inside the frame instead of overflowing */
}

@media (hover: hover) {
	.entry-content figure.wp-block-image img,
		.post-content figure.wp-block-image img {
		transition: transform var(--yh-speed) ease;
	}
	
	.entry-content figure.wp-block-image:hover img,
		.post-content figure.wp-block-image:hover img {
		transform: scale(1.05);
	}
}

/* ============================================================
   7. BUTTONS
   Coral fill kept, label switched to near-black. White on coral
   was 3.0:1 and failed contrast; near-black on coral is 5.3:1.
   Scoped away from bare  so search and comment forms
   keep their theme styling.
   ============================================================ */
.wp-block-button__link,
input[type="submit"],
button.yh-button {
	background-color: var(--yh-accent);
	color: var(--yh-ink-strong);
	border: none;
	padding: 10px 20px;
	border-radius: 5px;
	font-weight: 500;
	transition: background-color var(--yh-speed) ease, transform var(--yh-speed) ease, box-shadow var(--yh-speed) ease;
}

.wp-block-button__link:hover,
input[type="submit"]:hover,
button.yh-button:hover {
	background-color: var(--yh-accent-hi);
	color: var(--yh-ink-strong);
	transform: translateY(-2px);
	box-shadow: 0 4px 6px rgba(0, 0, 0, .1);
}

/* ============================================================
   8. CARDS
   Only applies if your theme actually outputs .card. If nothing
   changes when you edit this, delete the block.
   ============================================================ */
.card {
	background: #fff;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
	transition: transform var(--yh-speed) ease, box-shadow var(--yh-speed) ease;
}

@media (hover: hover) {
	.card:hover {
		transform: translateY(-5px);
		box-shadow: 0 6px 12px rgba(0, 0, 0, .2);
	}
}

/* ============================================================
   9. HIDE JETPACK SHARING / LIKES
   CSS hides them but still loads the scripts. Turn them off in
   Jetpack > Settings > Sharing to actually save the page weight.
   ============================================================ */
.sharedaddy,
.sd-block-wrap,
.sd-social-icon,
.jp-relatedposts,
.wp-block-jetpack-like,
.wpl-likebox,
.like-post-wrapper,
.jetpack-likes-widget-wrapper {
	display: none !important;
}

/* ============================================================
   10. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	*,
		::before,
		::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}