/* Editable homepage sections, independent of their position in the page. */
.wbs-page-content > .wbs-home-layout {
    margin: 0 !important; padding: 0; width: 100%; max-width: none;
}
.wbs-home-section {
    margin: 0 !important; padding: var(--wbs-section-space) var(--wbs-gutter);
    width: 100%; max-width: none; border: 0; border-radius: 0;
}
.wbs-home-section > :not(.alignfull) { max-width: var(--wbs-content-width); margin-inline: auto; }
.wbs-home-section :is(h2,h3,p,li):not(.has-text-color) { color: inherit; }
.wbs-home-section h2 { margin-block: 0 1.5rem; }
.wbs-home-section p { margin-block: 0 1.25rem; }
.wbs-home-pathways { color: var(--wbs-text-primary); }
.wbs-home-section .wbs-pathway-grid { gap: var(--wbs-grid-gap); }
.wbs-home-section .wbs-pathway-grid .is-style-wbs-card { height: 100%; padding: 0 !important; overflow: hidden; }
.wbs-home-section .wbs-pathway-grid .is-style-wbs-card > :not(figure) { margin-inline: 1.5rem; }
.wbs-home-section .wbs-pathway-grid .is-style-wbs-card > .wp-block-buttons { margin-block-end: 1.5rem; }
.wbs-home-section .wbs-pathway-grid figure { margin: 0 0 1.5rem; width: 100%; }
.wbs-home-section .wbs-pathway-grid figure img { display:block; width:100%; height:18rem; object-fit:cover; }
.wbs-home-section .wbs-pathway-grid h3 { font-size: var(--wbs-font-size-h3); }
.wbs-home-section .wbs-split {
    display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    align-items: stretch; gap: 0; overflow: hidden; border-radius: var(--wbs-radius-large);
}
.wbs-home-section .wbs-split > .wp-block-column { min-width: 0; margin: 0; }
.wbs-home-section .wbs-split .wbs-split-copy { padding: clamp(1.5rem,4vw,3.5rem); align-self:center; }
.wbs-home-section .wbs-split .wbs-split-media { display: flex; min-height: 30rem; }
.wbs-home-section .wbs-split-media > figure { flex: 1; margin:0; width:100%; }
.wbs-home-section .wbs-split-media img { width:100%; height:100%; object-fit:cover; border-radius:0; }
/* Match the full-width founder story; native column order remains editable. */
.wbs-home-section.wbs-sixth-form-spotlight { padding:0; }
.wbs-home-section.wbs-sixth-form-spotlight > .wbs-split { max-width:none; width:100%; padding:0; margin:0; border-radius:0; }
.wbs-home-section .wbs-founder-portraits { display:grid; grid-template-columns:1fr 1fr; gap:1rem; width:100%; align-content:center; padding:1.5rem; }
.wbs-home-section .wbs-founder-portraits figure { margin:0; }
.wbs-home-section .wbs-founder-portraits img { aspect-ratio:3/4; height:auto; border-radius:var(--wbs-radius-medium); }
.wbs-home-section .wbs-founder-portraits figcaption { color:var(--wbs-text-primary); font-family:var(--wbs-font-heading); font-size:1rem; }
.wbs-course-spotlight { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:0; overflow:hidden; border-radius:var(--wbs-radius-large); background:var(--wbs-surface-background); color:var(--wbs-text-primary); }
.wbs-course-spotlight .wbs-spotlight-media img { width:100%; height:100%; object-fit:cover; }
.wbs-course-spotlight .wbs-spotlight-copy { padding:clamp(1.5rem,4vw,3.5rem); }
.wbs-course-spotlight:has(.wbs-spotlight-media:empty) { grid-template-columns:1fr; }
.wbs-course-spotlight .wbs-spotlight-media:empty { display:none; }
.wbs-spotlight-details { border:0; padding:0.75rem 0; }
.wbs-spotlight-details summary { cursor:pointer; color:var(--wbs-action-secondary); font-family:var(--wbs-font-heading); }
.wbs-spotlight-details ul { margin-block:1rem; }
.wbs-page-main .wbs-spotlight-prerequisites { font-size:1rem; margin-block:1.5rem 0.5rem; }
.wbs-home-recognition .wbs-recognition { border:0; padding:0; margin-block:0; }
.wbs-home-section .wbs-logo-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:2rem; align-items:center; }
.wbs-home-section .wbs-logo-card { box-shadow:none; padding:1rem; }
.wbs-home-section .wbs-logo-card h3 { font-size:1rem; }
.wbs-home-section .wbs-logo-card img { width:100%; height:6rem; object-fit:contain; }
.wbs-home-section .wbs-awards-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--wbs-grid-gap); }
.wbs-home-awards, .wbs-home-awards .wbs-awards { color:var(--wbs-on-dark); }
.wbs-home-section .wbs-awards--grid .wbs-award-card { text-align:center; padding:1.5rem; box-shadow:none; background:transparent; color:var(--wbs-on-dark); }
.wbs-home-section .wbs-award-card img { width:min(100%,12rem); height:12rem; object-fit:contain; margin-inline:auto; }
.wbs-home-section .wbs-award-card h3 { font-size:1.375rem; }
.wbs-home-section .wbs-award-card .wbs-award-year { font-size:1.5rem; color:var(--wbs-gold-accent); }
.wbs-home-section .wbs-award-card h4 { color:var(--wbs-on-dark); font-size:1rem; }
.wbs-home-final { text-align:center; color:var(--wbs-on-dark); }
.wbs-home-final :is(h2,p):not(.has-text-color) { color:var(--wbs-on-dark); }
.wbs-home-final p { font-size:1.5rem; max-width:50ch; }
.wbs-home-final .wp-block-buttons { justify-content:center; }
.wbs-home-final .wp-block-button__link { background:var(--wbs-surface-background)!important; color:var(--wbs-action-secondary)!important; }
.home:has(.wbs-home-layout) .wbs-site-footer__cta { display:none; }
.home:has(.wbs-home-layout) .wbs-site-footer a { overflow-wrap:anywhere; }

/* Native images remain individually editable; no image URLs live in styles. */
/* User-requested, reusable text-only pathways and reversed diploma spotlight. */
.wbs-home-section .wbs-pathways-text .is-style-wbs-card { display:flex; flex-direction:column; padding-block:2rem !important; }
.wbs-home-section .wbs-pathways-text .is-style-wbs-card > .wp-block-buttons { margin-top:auto; margin-bottom:0; padding-top:1.5rem; }
.wbs-course-spotlight.wbs-image-right > .wbs-spotlight-media { grid-column:2; grid-row:1; }
.wbs-course-spotlight.wbs-image-right > .wbs-spotlight-copy { grid-column:1; grid-row:1; }
.wbs-story-enquiry-colour :is(h2,p,figcaption):not(.has-text-color) { color:var(--wbs-on-dark); }
.wbs-home-section.wbs-story-enquiry-colour :is(p,figcaption) { font-size:1.5rem; }
.wbs-story-enquiry-colour .wp-block-button__link { background:var(--wbs-surface-background)!important; color:var(--wbs-action-secondary)!important; }
.wbs-testimonial-surface { margin:0!important; padding:0; }
.wbs-testimonial-surface > .wbs-testimonials--carousel { background:transparent; color:inherit; }
.wbs-testimonial-surface .wbs-testimonials--carousel :is(h2,p,cite) { color:var(--wbs-on-dark); }
.wbs-testimonial-surface .wbs-testimonial-card { background:transparent; }
.wbs-testimonial-surface .wbs-slider-controls button { background:var(--wbs-surface-background); color:var(--wbs-action-secondary); }
.wbs-testimonial-surface .wbs-slider-controls button:disabled { background:var(--wbs-soft-background); color:var(--wbs-text-primary); }
.wbs-testimonial-surface :is(.wbs-record-grid,button):focus-visible,
.wbs-story-enquiry-colour a:focus-visible { outline:3px solid var(--wbs-on-dark)!important; outline-offset:3px!important; }
/* The same central award records now occupy a single browsable row. */
.wbs-home-section .wbs-awards-carousel > .wbs-awards-grid { display:flex; flex-wrap:nowrap; gap:1.5rem; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; }
.wbs-awards-carousel > .wbs-awards-grid::-webkit-scrollbar { display:none; }
.wbs-awards-carousel .wbs-awards-grid > .wbs-award-card { flex:0 0 calc((100% - 3rem)/3); min-width:0; scroll-snap-align:start; }
.wbs-awards-carousel .wbs-slider-controls { justify-content:space-between; }
.wbs-awards-carousel .wbs-slider-controls button { background:var(--wbs-surface-background); color:var(--wbs-action-secondary); min-width:var(--wbs-touch-target); }
.wbs-awards-carousel .wbs-slider-controls button:disabled { background:var(--wbs-soft-background); color:var(--wbs-text-primary); }
.wbs-awards-carousel :is(.wbs-awards-grid,button):focus-visible { outline:3px solid var(--wbs-on-dark)!important; outline-offset:3px!important; }
.wp-block-gallery.is-style-wbs-slider,
.wbs-testimonials--carousel > .wbs-record-grid {
    display:flex !important; flex-wrap:nowrap !important; gap:1.5rem;
    overflow-x:auto; scroll-snap-type:x mandatory; scroll-padding-inline:0;
    margin-inline:auto; padding:0.5rem 0 1rem; border-radius:0;
}
.wp-block-gallery.is-style-wbs-slider > .wp-block-image {
    flex:0 0 calc((100% - 3rem)/3); width:calc((100% - 3rem)/3)!important;
    min-width:0; margin:0!important; grid-column:auto!important; grid-row:auto!important;
    scroll-snap-align:start; border-radius:var(--wbs-radius-large); overflow:hidden;
}
.wp-block-gallery.is-style-wbs-slider > .wp-block-image img { height:26rem!important; min-height:0!important; width:100%; object-fit:cover; }
.wbs-testimonials--carousel { padding:var(--wbs-section-space) var(--wbs-gutter); background:var(--wbs-surface-background); }
.wbs-testimonials--carousel > :is(h2,.wbs-record-grid,.wbs-slider-controls) { max-width:var(--wbs-content-width); margin-inline:auto; }
.wbs-testimonials--carousel .wbs-testimonial-card { flex:0 0 100%; scroll-snap-align:start; display:grid; grid-template-columns:1fr 1fr; gap:2rem; margin:0; min-width:0; }
.wbs-testimonials--carousel .wbs-testimonial-card > img { grid-column:2; grid-row:1/6; width:100%; max-width:none; height:25rem; object-fit:cover; }
/* Text-only reviews keep their paragraphs together when no approved portrait exists. */
.wbs-testimonials--carousel .wbs-testimonial-card:not(:has(> img)) { display:block; }
.wbs-testimonials--carousel .wbs-testimonial-card:not(:has(> img)) > :is(p,cite) { max-width:70ch; margin-inline:auto; }
.wbs-testimonials--carousel .wbs-testimonial-card cite { display:block; font-style:normal; }
.wbs-slider-controls { display:flex; gap:0.75rem; justify-content:flex-end; margin-block-start:1.5rem; }
.wbs-slider-controls button { background:var(--wbs-action-primary); color:var(--wbs-on-dark); }
.wbs-slider-controls button:disabled { background:var(--wbs-soft-background); color:var(--wbs-text-primary); cursor:default; }
.wbs-home-section :is(.is-style-wbs-slider,.wbs-slider-controls button):focus-visible { outline:3px solid var(--wbs-focus); outline-offset:3px; }
@media (max-width: 48rem) {
    .wbs-course-spotlight.wbs-image-right > .wbs-spotlight-copy { grid-column:1; grid-row:1; }
    .wbs-course-spotlight.wbs-image-right > .wbs-spotlight-media { grid-column:1; grid-row:2; }
    .wbs-awards-carousel .wbs-awards-grid > .wbs-award-card { flex-basis:100%; }
    .wbs-home-section { padding-block:var(--wbs-section-space-compact); }
    .wbs-home-section .wbs-split,.wbs-course-spotlight { grid-template-columns:1fr; }
    .wbs-home-section .wbs-split .wbs-split-media { min-height:0; }
    .wbs-home-section .wbs-split-media > figure img,.wbs-course-spotlight .wbs-spotlight-media img { height:22rem; }
    .wbs-home-section .wbs-awards-grid { grid-template-columns:1fr; }
    .wbs-home-section .wbs-logo-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
    .wp-block-gallery.is-style-wbs-slider > .wp-block-image { flex-basis:88%; width:88%!important; }
    .wp-block-gallery.is-style-wbs-slider > .wp-block-image img { height:23rem!important; }
    .wbs-testimonials--carousel .wbs-testimonial-card { grid-template-columns:1fr; }
    .wbs-testimonials--carousel .wbs-testimonial-card > img { grid-column:auto; grid-row:auto; }
}
@media (prefers-reduced-motion: reduce) {
    .is-style-wbs-slider,.wbs-testimonials--carousel .wbs-record-grid,.wbs-awards-carousel .wbs-awards-grid { scroll-behavior:auto!important; }
}

/* Site-wide unboxed carousel arrows. Keep generous invisible hit areas and
 * keyboard-only focus rings; never remove navigation accessibility. */
.wbs-slider-controls button,
.wbs-slider-controls button:is(:hover,:active,:focus,:disabled) {
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    color:var(--wbs-action-secondary)!important;
    opacity:1!important;
    min-width:3rem!important;
    min-height:3rem!important;
    padding:.5rem!important;
    font-size:1.75rem!important;
    line-height:1!important;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}
.wbs-slider-controls button:disabled { color:var(--wbs-color-teal-muted)!important; cursor:default; }
.wbs-slider-controls button:hover:not(:disabled) { color:var(--wbs-color-text)!important; }
.wbs-slider-controls button:focus:not(:focus-visible) { outline:none!important; }
.wbs-slider-controls button:focus-visible,
body .wbs-awards-carousel .wbs-slider-controls button:focus-visible,
body .wbs-awards-carousel .wbs-awards-grid:focus-visible {
    outline:3px solid var(--wbs-action-secondary)!important;
    outline-offset:3px!important;
}
/* Preserve contrast when an independently reusable slider is placed on dark teal. */
.wbs-testimonial-surface .wbs-slider-controls button,
.has-teal-deep-background-color .wbs-slider-controls button,
.has-structural-background-color .wbs-slider-controls button { color:var(--wbs-on-dark)!important; }
.wbs-testimonial-surface .wbs-slider-controls button:focus-visible,
.has-teal-deep-background-color .wbs-slider-controls button:focus-visible,
.has-structural-background-color .wbs-slider-controls button:focus-visible { outline-color:var(--wbs-on-dark)!important; }

/* The inherited back-to-top arrow follows the same unboxed treatment. */
#ast-scroll-top,
#ast-scroll-top:is(:hover,:active,:focus) {
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    color:var(--wbs-action-secondary)!important;
    width:3rem;
    height:3rem;
    line-height:3rem;
}
#ast-scroll-top svg { fill:currentColor; stroke:var(--wbs-color-white); stroke-width:.6px; }
#ast-scroll-top:focus:not(:focus-visible) { outline:none; }
#ast-scroll-top:focus-visible { outline:3px solid var(--wbs-action-secondary); outline-offset:3px; }
