/*
 * testimonial.css  —  shared component styles for the testimonials suite
 * ------------------------------------------------------------------
 * Stage 5c: STATIC CSS extracted from the inline <style> blocks in
 *   parts/testimonials/hero.php, parts/testimonials/cta.php,
 *   parts/testimonials/quick-facts.php, single-testimonials.php.
 * The DYNAMIC, ACF-colour-driven rules (hero/CTA gradient overlays, contrast
 * buttons, per-testimonial theme colour) stay inline in those templates: they
 * are computed per post from the `colour_theme` ACF value and cannot be a
 * static class. Only their literal ACF fallbacks remain inline (marked).
 *
 * Colour tokenised to CURRENT rendered values:
 *   - white text on the coloured hero/CTA -> var(--text-on-dark)
 *   - white backgrounds/borders -> var(--surface)
 *   - white overlays -> rgba(var(--overlay-light-rgb), a)
 *   - black shadows -> rgba(var(--shadow-rgb), a)
 *   - navy/teal/slate text -> --text-heading / --blue / --text (Phase 3a)
 *
 * ENQUEUE: not yet wired. Needs adding to the components block of
 * dncg_enqueue_cascade() (loaded with card/slider/etc). See audit doc.
 */

/* ==========================================================================
   Testimonial Quick Facts  (quick-facts.php; also inlined in cta.php)
   ========================================================================== */

.testimonial-quick-facts {
	background: var(--neutral-50);
	padding: 1.25rem 1rem;
}

.testimonial-quick-facts-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 2rem 3rem;
}

.quick-fact {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.quick-fact-label {
	font-family: var(--font-body);
	font-size: 1.1rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--neutral-500);
	margin-bottom: 0.25rem;
}

.quick-fact-value {
	font-family: var(--font-body);
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--text-heading);
}

.quick-fact-progression .quick-fact-value a {
	color: var(--blue-text);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease;
}

.quick-fact-progression .quick-fact-value a:hover {
	border-bottom-color: currentColor;
}

@media screen and (max-width: 600px) {
	.testimonial-quick-facts-inner {
		gap: 1.25rem 2rem;
	}

	.quick-fact-value {
		font-size: 1.1rem;
	}
}


/* ==========================================================================
   Testimonial Hero - Magazine Pull Quote Style  (hero.php)
   Dynamic colour overlay (.testimonial-hero::after background) and the
   image-wrapper fallback gradient are set inline from ACF.
   ========================================================================== */

.testimonial-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Background image layer */
.testimonial-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.testimonial-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Colour overlay - gradient set via inline PHP */
.testimonial-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* Inner container */
.testimonial-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3.5rem 2rem;
    /* padding-inline-start clears an overhanging site logo (--logo-clear in
       tokens.css, 0 for every brand but UCNL, and 0 below 64em on UCNL too).
       single-testimonials.php renders this hero straight after the header. */
    padding-inline-start: calc(2rem + var(--logo-clear));
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}


/* Left Side: Quote Block (Magazine Style) */

.testimonial-hero-content {
    display: flex;
    flex-direction: column;
}

.testimonial-hero-quote-block {
    position: relative;
    padding-left: 0;
}

.testimonial-hero-quote-text {
    border-left: none;
    padding-left: 0;
}

.testimonial-hero-quote-mark {
    position: absolute;
    top: -1.75rem;
    left: -0.75rem;
    font-family: var(--font-display);
    font-size: 8rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(var(--overlay-light-rgb), 0.15);
    pointer-events: none;
    user-select: none;
}

.testimonial-hero-quote-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-on-dark);
    margin: 0;
    position: relative;
    z-index: 1;
}

.testimonial-hero-divider {
    width: 80px;
    height: 3px;
    background: rgba(var(--overlay-light-rgb), 0.4);
    margin: 1.75rem 0;
    position: relative;
}

.testimonial-hero-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 100%;
    background: var(--surface);
}

.testimonial-hero-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.testimonial-hero-title {
    font-family: var(--font-display);
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text-on-dark);
    line-height: 1.1;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.testimonial-hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(var(--overlay-light-rgb), 0.85);
    margin: 0;
}


/* Right Side: Photo */

.testimonial-hero-photo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.testimonial-hero-image-wrapper {
    position: relative;
    min-width: 280px;
    min-height: 320px;
    max-width: 360px;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow:
        0 8px 30px rgba(var(--shadow-rgb), 0.3),
        0 2px 8px rgba(var(--shadow-rgb), 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Fallback gradient background for transparent PNGs - set via PHP */
}

.testimonial-hero-image-wrapper img {
    width: 100%;
    height: 100%;
    min-width: 280px;
    min-height: 320px;
    object-fit: cover;
    object-position: center top;
    display: block;
}


@media screen and (max-width: 960px) {
    .testimonial-hero {
        min-height: auto;
    }

    .testimonial-hero-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 2.5rem 1.5rem;
    }

    .testimonial-hero-photo {
        order: -1;
    }

    .testimonial-hero-image-wrapper {
        min-width: 240px;
        min-height: 280px;
        max-width: 300px;
    }

    .testimonial-hero-image-wrapper img {
        min-width: 240px;
        min-height: 280px;
    }

    .testimonial-hero-content {
        text-align: center;
        align-items: center;
    }

    .testimonial-hero-quote-block {
        padding-left: 0;
    }

    .testimonial-hero-quote-mark {
        left: 50%;
        transform: translateX(-50%);
        top: -2rem;
        font-size: 6rem;
    }

    .testimonial-hero-quote-text {
        font-size: 1.25rem;
    }

    .testimonial-hero-title {
        font-size: 2.25rem;
    }
}

@media screen and (max-width: 480px) {
    .testimonial-hero-inner {
        padding: 2rem 1rem;
        gap: 2rem;
    }

    .testimonial-hero-image-wrapper {
        min-width: 200px;
        min-height: 240px;
        max-width: 260px;
    }

    .testimonial-hero-image-wrapper img {
        min-width: 200px;
        min-height: 240px;
    }

    .testimonial-hero-quote-mark {
        font-size: 5rem;
        top: -1.5rem;
    }

    .testimonial-hero-quote-text {
        font-size: 1.1rem;
    }

    .testimonial-hero-title {
        font-size: 1.75rem;
    }

    .testimonial-hero-subtitle {
        font-size: 1.1rem;
    }

    .testimonial-hero-divider {
        width: 60px;
        margin: 1.25rem 0;
    }
}


/* ==========================================================================
   Testimonial CTA  (cta.php)
   Primary button background/colour/hover are set inline from ACF (contrast).
   ========================================================================== */

.testimonial-cta {
	position: relative;
	padding: 4rem 1rem;
	text-align: center;
	overflow: hidden;
}

/* Colour overlay - set via PHP */
.testimonial-cta::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

.testimonial-cta-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.testimonial-cta-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.testimonial-cta-inner {
	position: relative;
	z-index: 2;
	max-width: 700px;
	margin: 0 auto;
}

.testimonial-cta h2 {
	font-family: var(--font-display);
	font-size: 2rem;
	font-weight: 700;
	color: var(--text-on-dark);
	margin-bottom: 0.75rem;
}

.testimonial-cta p {
	font-family: var(--font-body);
	font-size: 1.1rem;
	color: rgba(var(--overlay-light-rgb), 0.85);
	margin-bottom: 2rem;
}

.testimonial-cta-buttons {
	display: flex;
	justify-content: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.testimonial-cta .btn {
	display: inline-block;
	padding: 0.875rem 2rem;
	font-family: var(--font-body);
	font-size: 1.1rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 4px;
	transition: all 0.2s ease;
	box-shadow: 0 4px 15px rgba(var(--shadow-rgb), 0.2);
}

/* Primary button colours set via PHP for contrast */
.testimonial-cta .btn-primary {
	/* background and color set dynamically */
}

.testimonial-cta .btn-primary:hover {
	/* background set dynamically */
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(var(--shadow-rgb), 0.25);
}

.testimonial-cta .btn-secondary {
	background: transparent;
	color: var(--text-on-dark);
	border: 2px solid rgba(var(--overlay-light-rgb), 0.6);
	box-shadow: none;
}

.testimonial-cta .btn-secondary:hover {
	border-color: var(--surface);
	background: rgba(var(--overlay-light-rgb), 0.1);
}

@media screen and (max-width: 600px) {
	.testimonial-cta {
		padding: 3rem 1rem;
	}

	.testimonial-cta h2 {
		font-size: 1.5rem;
	}

	.testimonial-cta p {
		font-size: 1.1rem;
	}

	.testimonial-cta-buttons {
		flex-direction: column;
	}

	.testimonial-cta .btn {
		width: 100%;
	}
}


/* ==========================================================================
   Testimonial story body  (single-testimonials.php)
   Heading colours, pull-quote and Q markers are ACF-theme-driven and stay
   inline; only these fixed-colour rules move here.
   ========================================================================== */

.testimonial-story p {
	line-height: 1.8;
	color: var(--text);
	margin-bottom: 1.5rem;
}

/* Intro paragraph - slightly larger */
.testimonial-story p:first-child {
	font-size: 1.6rem;
	color: var(--text-heading);
}

/* Q&A Answer */
.qa-answer {
	padding-left: 2rem;
	margin-bottom: 1.5rem;
}
