/* Trampolene — section patterns (home page and reusable bands).
   Builds on sections.css (original build) with WordPress block markup. */

/* ---------------------------------------------------------------- Shared */
:where(.wp-block-group) p { margin-top: 0; }
.section-head { max-width: 720px; margin: 0 0 48px; }
.section-head.is-center { max-width: 760px; margin-left: auto; margin-right: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 { margin: 0; text-wrap: balance; }
.section-intro { margin: 18px auto 0; max-width: 640px; font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--text-muted); }
.wp-block-buttons.is-centered { justify-content: center; }
.wp-block-button.is-large > .wp-block-button__link { font-size: 17px; min-height: 56px; padding: 0 34px; }

/* Icon helper: any block with .tr-ico + .tr-ico-NAME gets that icon via ::before */
.tr-ico::before { content: ''; display: block; width: 25px; height: 25px; flex-shrink: 0; background: currentColor; -webkit-mask: var(--tr-icon) center / contain no-repeat; mask: var(--tr-icon) center / contain no-repeat; }

/* Arrow / calendar on buttons */
.wp-block-button.has-arrow > .wp-block-button__link::after,
.wp-block-button.has-calendar > .wp-block-button__link::after { content: ''; width: 18px; height: 18px; flex-shrink: 0; background: currentColor; -webkit-mask: var(--tr-icon) center / contain no-repeat; mask: var(--tr-icon) center / contain no-repeat; transition: transform var(--dur) var(--ease); }
.wp-block-button.has-arrow > .wp-block-button__link { --tr-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14'/><path d='m12 5 7 7-7 7'/></svg>"); }
.wp-block-button.has-calendar > .wp-block-button__link { --tr-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M8 2v4'/><path d='M16 2v4'/><rect width='18' height='18' x='3' y='4' rx='2'/><path d='M3 10h18'/></svg>"); }
.wp-block-button.has-arrow > .wp-block-button__link:hover::after { transform: translateX(3px); }

/* Curved transitions between colour bands (replaces the original Wave component) */
[class*="wave-top-"] { position: relative; }
[class*="wave-top-"]::before { content: ''; display: block; height: 62px; margin-bottom: var(--section-y); background-size: 100% 100%; background-repeat: no-repeat; }
.wave-top-navy::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'><rect width='1440' height='100' fill='%230E2160'/><path d='M0,100 C420,-8 1020,-8 1440,100 Z' fill='%2318379E'/></svg>"); }
.wave-top-deep::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'><rect width='1440' height='100' fill='%2318379E'/><path d='M0,100 C420,-8 1020,-8 1440,100 Z' fill='%23FFFFFF'/></svg>"); }
.wave-top-white::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'><rect width='1440' height='100' fill='%23FFFFFF'/><path d='M0,100 C420,-8 1020,-8 1440,100 Z' fill='%2318379E'/></svg>"); height: 72px; }
@media (max-width: 768px) { [class*="wave-top-"]::before { height: 46px !important; } }

/* ---------------------------------------------------------------- Hero carousel */
.home-slider .hero-slides { position: relative; }
.home-slider .hero-slide { counter-increment: tr-slide; }
.home-slider .hero-slides { counter-reset: tr-slide; }
/* Front end: one slide at a time once the script is ready (editor shows all three) */
.home-slider.is-ready .hero-slide:not(.is-active) { display: none; }
.home-slider .hero-grid { margin: 0; }
.home-slider .hero-story h1 { margin-top: 0; }
.home-slider .hero-story .eyebrow { margin-bottom: 18px; }
.home-slider .hero-actions { margin: 6px 0 0; }
.home-slider .hero-actions .wp-block-button__link { box-shadow: 0 5px 16px #18379e0a; }
/* Bold words in the headline get the hand-drawn highlight */
.home-slider h1 strong, .home-slider h1 .hero-emphasis { font-weight: 650; position: relative; isolation: isolate; }
.home-slider h1 strong::after { content: ''; position: absolute; left: 0; right: 0; bottom: .02em; height: .15em; background: #bcd5ff; border-radius: 70% 30% 60% 35%; z-index: -1; transform: rotate(-2deg); }
.home-slider h1 .hero-emphasis strong { font-weight: inherit; }
/* Photo + story caption card */
.home-slider .slider-photo { margin: 0; }
.home-slider .slider-photo img { width: 100%; height: auto; }
.home-slider .slider-photo figcaption { position: relative; display: block; margin: -28px 20px 0; padding: 18px 20px 18px 84px; min-height: 72px; background: #fff; border-radius: 18px; box-shadow: 0 8px 28px #193f8a14; color: #283b65; font-size: 12px; line-height: 1.5; text-align: left; }
.home-slider .slider-photo figcaption::before { content: '0' counter(tr-slide); position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 28px; font-weight: 600; color: #3159c8; border-right: 1px solid #d6e1f4; padding-right: 14px; line-height: 1.2; }
.home-slider .slider-photo figcaption strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.home-slider .slider-photo figcaption br { display: none; }
@media (max-width: 768px) {
	.home-slider .slider-photo figcaption { margin: -18px 10px 0; padding: 14px 14px 14px 70px; }
	.home-slider .slider-photo figcaption::before { left: 14px; }
	.home-slider .slider-photo figcaption::before { font-size: 24px; }
	.home-slider .slider-photo figcaption strong { font-size: 13px; }
}
/* Controls added by trampolene.js */
.slider-controls .slider-arrow::before { content: ''; width: 21px; height: 21px; background: currentColor; -webkit-mask: var(--tr-icon) center / contain no-repeat; mask: var(--tr-icon) center / contain no-repeat; }

/* ---------------------------------------------------------------- Track record */
.track-record .page-wrap > h2 { margin-top: 0; }
.track-record .stat { color: #fff; }
.track-record .stat::before { color: #aec8ff; }
.track-record .stat p { margin: 0; }
.stat-value { font-size: 30px; font-weight: 600; line-height: 1.2; color: #fff; }
.homepage .stat-value { font-size: 36px; }
.stat-label { font-size: 14px; line-height: 1.5; color: #e0e7fa; }
@media (max-width: 768px) { .homepage .stat-value { font-size: 29px; } }

/* ---------------------------------------------------------------- Journey */
.tr-journey { background: var(--tr-blue-deep); color: #fff; padding-bottom: var(--section-y); }
.tr-journey .eyebrow { color: var(--tr-blue-200); }
.tr-journey h2 { color: #fff; }
.tr-journey .section-intro { color: rgba(255,255,255,.82); }
.journey-track { position: relative; }
.journey-track::before { content: ''; position: absolute; top: 37px; left: 10%; right: 10%; border-top: 2px dashed rgba(255,255,255,.34); }
.journey-track::after { content: ''; position: absolute; top: 36px; left: 10%; right: 10%; height: 2px; background: #bfd7ff; box-shadow: 0 0 12px #c8ddff55; transform: scaleX(0); transform-origin: left; }
.journey-track.is-revealed::after { animation: trPathAcross 1.7s ease-out both; }
@keyframes trPathAcross { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.journey-steps { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.journey-step { display: flex; flex-direction: column; align-items: center; text-align: center; }
.journey-step::before { width: 30px; height: 30px; padding: 23px; box-sizing: content-box; border-radius: 50%; background: var(--tr-blue); -webkit-mask: none; mask: none; position: relative; z-index: 1; margin-bottom: 22px; }
/* white circle with blue icon: circle via box-shadow, icon via mask on a gradient */
.journey-step::before { background: #fff; box-shadow: 0 0 0 8px var(--tr-blue-deep); }
.journey-step { position: relative; }
.journey-step::after { content: ''; position: absolute; top: 23px; left: 50%; width: 30px; height: 30px; margin-left: -15px; z-index: 2; background: var(--tr-blue); -webkit-mask: var(--tr-icon) center / contain no-repeat; mask: var(--tr-icon) center / contain no-repeat; transition: transform .3s; }
.journey-step::before { transition: transform .3s, box-shadow .3s; }
.journey-step:hover::before { transform: translateY(-5px) rotate(-5deg); box-shadow: 0 0 0 10px #ffffff18; }
.journey-step:hover::after { transform: translateY(-5px) rotate(-5deg); }
.journey-step p, .journey-step h3 { margin: 0; }
.step-num { font-size: var(--fs-caption); font-weight: 500; color: rgba(255,255,255,.55); }
.journey-step .step-title { font-size: var(--fs-h4); font-weight: 500; color: #fff; margin: 4px 0 10px; letter-spacing: 0; }
.step-desc { font-size: var(--fs-small); line-height: var(--lh-body); color: rgba(255,255,255,.78); max-width: 200px; }
.tr-journey .wp-block-buttons { margin-top: 52px; }
@media (max-width: 768px) {
	.journey-steps { grid-template-columns: 1fr; gap: 34px; }
	.journey-step { display: grid; grid-template-columns: 64px 1fr; column-gap: 18px; align-items: start; text-align: left; }
	.journey-step::before { grid-row: 1 / span 3; width: 24px; height: 24px; padding: 20px; margin: 0; }
	.journey-step::after { top: 20px; left: 32px; width: 24px; height: 24px; margin-left: -12px; }
	.journey-step .step-title { font-size: var(--fs-body); }
	.step-desc { max-width: none; }
	.journey-track::before { top: 32px; bottom: 32px; left: 31px; right: auto; border-top: 0; border-left: 2px dashed rgba(255,255,255,.34); }
	.journey-track::after { display: none; }
}

/* ---------------------------------------------------------------- Programmes */
.tr-programmes { padding-top: 0; }
.tr-programmes .section-head { margin-bottom: 44px; max-width: 680px; }
.program-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap-grid); }
.program-card { flex: 0 1 calc(33.333% - (var(--gap-grid) * 2 / 3)); min-width: 260px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border-card); border-top: 4px solid var(--programme-accent, #3159c8); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 3px 14px #18379e08; transition: transform .3s, box-shadow .3s; }
.program-card:hover, .program-card:focus-within { transform: translateY(-5px); box-shadow: 0 14px 28px #18379e16; }
.program-card .program-card-image { margin: 0; overflow: hidden; }
.program-card .program-card-image img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; transition: transform .65s cubic-bezier(.2,.7,.2,1); }
.program-card:hover .program-card-image img { transform: scale(1.045); }
.program-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.program-card-body h3 { margin: 0; font-size: var(--fs-h4); line-height: var(--lh-h4); letter-spacing: 0; }
.program-card-desc { margin: 0; flex: 1; font-size: var(--fs-small); line-height: var(--lh-body); color: var(--text-muted); }
.card-link { margin: 4px 0 0; }
.card-link a { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: var(--fs-small); color: var(--tr-blue); text-decoration: none; }
.card-link a::after { content: '→'; transition: transform .25s; }
.program-card:hover .card-link a::after { transform: translateX(5px); }
/* Programme colour strips: Trampolene blues only (client feedback 20 Oct) */
.accent-gates, .accent-project-valour, .accent-ulc { --programme-accent: #18379E; }
.accent-excel-mentor, .accent-careahead { --programme-accent: #467AF1; }
.subpage #gates, .subpage #project-valour, .subpage #ulc { --programme-accent: #18379E; }
.subpage #excel-mentor, .subpage #careahead { --programme-accent: #467AF1; }
@media (max-width: 768px) { .program-card { flex-basis: 100%; min-width: 0; } }

/* ---------------------------------------------------------------- FAQ shortcuts */
.home-faq .section-heading h2 { margin-top: 0; }
.faq-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.faq-links .faq-link { margin: 0; position: relative; color: var(--tr-blue-deep); }
.faq-links .faq-link a { padding: 23px 32px 23px 0; border-top: 1px solid #ccd5e4; display: block; text-decoration: none; color: var(--tr-blue-deep); font-size: 18px; }
.faq-links .faq-link a:hover { color: var(--tr-blue); }
.faq-links .faq-link::before { position: absolute; right: 0; top: 50%; width: 20px; height: 20px; margin-top: -10px; pointer-events: none; transition: transform var(--dur) var(--ease); }
.faq-links .faq-link:hover::before { transform: translateX(4px); }
@media (max-width: 768px) { .faq-links { grid-template-columns: 1fr; gap: 0; } .faq-links .faq-link a { font-size: 17px; } }

/* ---------------------------------------------------------------- Booking band */
.tr-booking { background: var(--tr-blue-deep); color: #fff; text-align: center; padding-bottom: 88px; }
.tr-booking::before { margin-bottom: 88px !important; }
.tr-booking h2 { color: #fff; font-size: var(--wp--preset--font-size--heading-lg); line-height: 1.12; margin: 0; text-wrap: balance; }
.tr-booking .section-intro { max-width: 620px; color: rgba(255,255,255,.82); }
.tr-booking .wp-block-buttons { margin-top: 32px; }
@media (max-width: 768px) { .tr-booking { padding-bottom: 64px; } .tr-booking::before { margin-bottom: 64px !important; } }

/* ---------------------------------------------------------------- Editor-only helpers */
.editor-styles-wrapper .home-slider .hero-slide + .hero-slide { margin-top: 48px; padding-top: 48px; border-top: 2px dashed #b4caf9; }

/* Designed sections sit flush against each other (no default block gap between bands) */
.tr-main .wp-block-post-content > * { margin-block-start: 0; margin-block-end: 0; }
.tr-main { margin-block-start: 0; }

/* Match the original's measurements */
.eyebrow { letter-spacing: .14em; }
.section-head h2 { line-height: 1.18; }
.journey-track { margin-top: 0; }
.journey-step .step-title { line-height: 1.65; }
/* Left-aligned section heads keep their intro flush left */
.section-head:not(.is-center) .section-intro { margin-left: 0; margin-right: 0; }

/* Journey: the connecting line always sits behind the step circles */
.journey-track { isolation: isolate; }
.journey-track::before, .journey-track::after { z-index: 0; }
.journey-steps { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- Testimonials (client feedback 20 Oct) */
.tr-testimonials .section-head { margin-bottom: 44px; }
.testimonial-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-grid); }
.testimonial-grid > * { margin-block: 0; }
.testimonial-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border-card); border-radius: var(--radius-lg); padding: 56px 32px 28px; box-shadow: 0 3px 14px #18379e08; }
.testimonial-card::before { content: '\201C'; position: absolute; top: 14px; left: 28px; font-size: 72px; line-height: 1; font-weight: 600; color: var(--tr-blue); }
.testimonial-card p { margin: 0; }
.testimonial-quote { flex: 1; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--tr-charcoal); }
.testimonial-name { margin-top: 20px !important; padding-top: 16px; border-top: 1px solid var(--border-card); font-weight: 600; color: var(--tr-blue-deep); }
.testimonial-role { font-size: var(--fs-small); color: var(--text-muted); }
/* Website: a swipeable carousel (added by the script); the editor still shows every card */
.testimonial-grid.is-carousel { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - var(--gap-grid)) / 2); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 12px; margin: -4px -2px 0; }
.testimonial-grid.is-carousel::-webkit-scrollbar { display: none; }
.testimonial-grid.is-carousel > .testimonial-card { scroll-snap-align: start; }
.testimonial-grid.is-carousel:focus-visible { outline: 2px solid var(--tr-blue); outline-offset: 4px; border-radius: var(--radius-lg); }
.testimonial-controls { justify-content: center; margin-top: 24px; }
@media (max-width: 768px) {
	.testimonial-grid.is-carousel { grid-auto-columns: 100%; }
	.testimonial-grid { grid-template-columns: 1fr; gap: 16px; }
	.testimonial-card { padding: 48px 22px 22px; }
	.testimonial-card::before { left: 20px; font-size: 60px; }
}

/* ---------------------------------------------------------------- Full-width hero slides (client feedback 20 Oct)
   Website only (.is-ready is added by the slider script); the editor keeps the stacked slides. */
.home-slider.is-ready { position: relative; padding: 0; overflow: hidden; background: var(--tr-blue-deep); }
.home-slider.is-ready .hero-slides,
.home-slider.is-ready .page-wrap { position: static; }
.home-slider.is-ready .hero-slide { min-height: 620px; padding: 88px 0 72px; margin: 0; }
.home-slider.is-ready .hero-copy { position: relative; z-index: 2; width: 100%; max-width: 600px; min-height: 0; flex: 1; margin: 0 auto 0 0; } /* text lines up with the logo */
/* All slides sit in the same spot, so the banner always takes the tallest slide's height: the photo crop
   and the arrows stay exactly the same on every slide, at every screen width. */
.home-slider.is-ready .hero-slides { display: grid; }
.home-slider.is-ready .hero-slide { grid-area: 1 / 1; display: flex; flex-direction: column; }
.home-slider.is-ready .hero-slide:not(.is-active) { display: flex; visibility: hidden; }
.home-slider.is-ready .slider-photo { position: absolute; inset: 0; z-index: 0; margin: 0; padding: 0; }
.home-slider.is-ready .slider-photo::before { display: none; } /* outline shape behind the photo */
.home-slider.is-ready .slider-photo img { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; object-fit: cover; border-radius: 0; box-shadow: none; }
.home-slider.is-ready .slider-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(24,55,158,.96) 0%, rgba(24,55,158,.88) 36%, rgba(24,55,158,.45) 62%, rgba(24,55,158,.08) 88%); }
.home-slider.is-ready .eyebrow { color: #c6d6ff; }
.home-slider.is-ready h1 { color: #fff; }
.home-slider.is-ready h1 strong::after, .home-slider.is-ready h1 .hero-emphasis::after { background: rgba(198,214,255,.55); }
.home-slider.is-ready .hero-intro { color: rgba(255,255,255,.88); }
.home-slider.is-ready .hero-actions .wp-block-button__link { background: #fff; color: var(--tr-blue-deep); }
.home-slider.is-ready .hero-actions .wp-block-button__link:hover { background: var(--tr-blue-050); }
.home-slider.is-ready .slider-arrow { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.home-slider.is-ready .slider-arrow:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.home-slider.is-ready .slider-dots span { background: rgba(255,255,255,.45); }
.home-slider.is-ready .slider-dots .is-active span { background: #fff; }
/* Desktop: solid blue behind the text and the photo on the right with a soft edge, so the people in the
   photo stay clear. Upload plain photos – the blue and the fade are added by the website. */
@media (min-width: 951px) {
	.home-slider.is-ready .hero-copy { max-width: min(600px, 44vw); }
	.home-slider.is-ready .slider-photo { left: auto; width: 56%; }
	.home-slider.is-ready .slider-photo::after { background: linear-gradient(90deg, #18379e 0%, rgba(24,55,158,.82) 10%, rgba(24,55,158,.35) 26%, rgba(24,55,158,0) 42%); }
}
@media (max-width: 950px) {
	.home-slider.is-ready .hero-slide { min-height: 560px; padding: 64px 0 56px; }
	.home-slider.is-ready .slider-photo::after { background: linear-gradient(90deg, rgba(24,55,158,.95) 0%, rgba(24,55,158,.8) 60%, rgba(24,55,158,.55) 100%); }
}
@media (max-width: 768px) {
	.home-slider.is-ready .hero-slide { min-height: 0; padding: 48px 0 40px; }
	.home-slider.is-ready .hero-copy { max-width: none; }
	.home-slider.is-ready .slider-photo::after { background: linear-gradient(0deg, rgba(24,55,158,.96) 0%, rgba(24,55,158,.88) 55%, rgba(24,55,158,.6) 100%); }
}
