/* =========================================================================
   W Training — homepage visual cleanup
   -------------------------------------------------------------------------
   Every rule is scoped to .wt-home (set on <main> in index.php), so no other
   page is affected. This file is presentation only: no markup, PHP, query,
   route, or form behaviour depends on anything here.

   The goal is rhythm and consistency — one container width, one section
   padding scale, one heading scale, one radius, one button height, subtle
   1px borders instead of heavy shadows.
   ========================================================================= */

.wt-home {
    /* Spacing scale */
    --wt-sec-y: 72px;          /* standard section padding block */
    --wt-sec-y-sm: 48px;       /* mobile */
    --wt-title-gap: 36px;      /* section title -> content */

    /* Surfaces */
    --wt-surface: #ffffff;
    --wt-surface-alt: #f6f8f9; /* very light neutral separator */
    --wt-line-soft: rgba(20, 33, 40, 0.10);
    --wt-line-dark: rgba(255, 255, 255, 0.14);

    /* One dark tone for the two dark bands, taken from the existing
       locations-theme palette so the brand colours are unchanged. */
    --wt-dark: #2e3b46;
    --wt-dark-2: #3c4d5a;

    /* Geometry */
    --wt-r-card: 14px;
    --wt-r-pill: 26px;

    /* Elevation — deliberately minimal. */
    --wt-shadow: 0 1px 2px rgba(20, 33, 40, 0.05), 0 6px 18px rgba(20, 33, 40, 0.06);
}

/* --- 1. One container width across every section ------------------------ */

.wt-home .container {
    max-inline-size: 1200px;
    padding-inline: 20px;
}

/* --- 2. Standard section rhythm ----------------------------------------- */

.wt-home .section {
    padding-block: var(--wt-sec-y);
}

/* Was 250px of dead space above the courses / cities bands. */
.wt-home .custom-padding2 {
    padding-block-start: var(--wt-sec-y);
}

/* Very light neutral separates the white bands. */
.wt-home .items-grid {
    background: var(--wt-surface-alt);
}

.wt-home .client-logo-section {
    background: var(--wt-surface);
    padding-block: var(--wt-sec-y);
}

/* --- 3. Section headings ------------------------------------------------ */

/* Base rule uses `padding: 0 300px`, which squeezed longer headings into
   awkward two-line wraps. A max-width does the same job responsively. */
.wt-home .section-title {
    padding-inline: 0;
    max-inline-size: 720px;
    margin-inline: auto;
    margin-block-end: var(--wt-title-gap);
}

.wt-home .section-title h2 {
    font-size: 30px;
    line-height: 1.3;
    font-weight: 600;
    margin-block-end: 0;
}

.wt-home .section-title p {
    font-size: 15px;
    line-height: 1.6;
    margin-block-end: 0;
    padding-block-end: 16px;
}

/* An empty <p> still painted its ::before accent rule and reserved space. */
.wt-home .section-title p:empty {
    display: none;
}

/* --- 4. Specializations band ------------------------------------------- */

/* This block used height:0 on the parent plus translateY(-50%) on the inner
   card to hang over the hero, with a 25% border-radius that rendered as a
   large lens. Both the hero's bottom padding and the next section's 250px
   top padding existed only to clear it. Making it a normal section is what
   removes the biggest chunk of dead vertical space on the page. */
.wt-home .categories {
    height: auto;
    background: var(--wt-surface);
    padding-block: var(--wt-sec-y);
}

.wt-home .categories .cat-inner {
    transform: none;
    -webkit-transform: none;
    border: 1px solid var(--wt-line-soft);
    border-radius: var(--wt-r-card);
    box-shadow: none;
    background: var(--wt-surface);
    padding: 32px 24px;
}

/* Specialization cards ---------------------------------------------------
   The card is a rounded square rather than a circle. `.rounded-circle` is a
   Bootstrap utility (border-radius: 50% !important), so !important is needed
   here to win — the class is left on the element so no other markup or JS
   that might reference it breaks. */
.wt-home .categories .single-cat {
    border-radius: var(--wt-r-card) !important;
    background: var(--wt-surface);
    border: 1px solid var(--wt-line-soft);
    box-shadow: none;
    padding: 20px 14px;
    /* Stays display:block — these anchors are tiny-slider slide items, and
       changing their display breaks the slider's width calculation. */
    text-align: center;
    /* The tilt has to pivot on the card's centre, not on the inline-block
       baseline it would default to inside the slide. */
    transform-origin: 50% 50%;
    transition: transform 220ms ease, border-color 220ms ease,
        box-shadow 220ms ease;
}

/* Hover / focus emphasis. Border and shadow are the shared part; the tilt is
   added separately below so the reduced-motion and focus cases can drop it
   without losing the emphasis. */
.wt-home .categories .single-cat:hover,
.wt-home .categories .single-cat:focus-visible {
    background: var(--wt-surface);
    border-color: var(--primary-color, #97bd2e);
    box-shadow: 0 12px 26px -14px rgba(2, 33, 71, 0.35);
}

/* Alternating tilt, capped at 1.5deg. The transform is on the card, never on
   the .cat-slide that owns the layout width, so no neighbour moves and the
   card eases back on pointer-leave through the transition above.
   nth-child counts .cat-slide wrappers in DOM order, tiny-slider's loop clones
   included — every card tilts, the odd/even split just follows source order. */
.wt-home .categories .cat-slide:nth-child(odd) .single-cat:hover {
    transform: translateY(-6px) rotate(1.5deg);
}

.wt-home .categories .cat-slide:nth-child(even) .single-cat:hover {
    transform: translateY(-6px) rotate(-1.5deg);
}

/* Horizontal gap between cards ---------------------------------------------
   The slider runs with gutter: 0 and its options are untouched; the spacing is
   half the target gap on each side of the slide, so adjacent cards end up
   ~32px apart on desktop and the first/last visible card keeps the same inset
   from the viewport edge. .tns-item is box-sizing: border-box, so this eats
   into the width tiny-slider computed instead of overflowing it. */
.wt-home .categories .cat-slide {
    padding-inline: 8px;
}

@media (min-width: 768px) {
    .wt-home .categories .cat-slide {
        padding-inline: 11px;
    }
}

@media (min-width: 992px) {
    .wt-home .categories .cat-slide {
        padding-inline: 15px;
    }
}

/* Vertical room for the 6px lift plus the tilt's corner overhang. .tns-ovh
   clips at its padding box, so padding here — not margin — is what keeps the
   raised card from being cut off. (.tns-outer is padding: 0 !important in
   tiny-slider.css, which is why this sits on the inner wrapper.) */
.wt-home .categories .tns-ovh {
    padding-block: 16px;
}

/* The 56px icon tile. --cat-tint carries the per-category colour that used to
   paint the ring; these values are already pale, so they work as a flat wash
   with no gradient and no shadow. */
.wt-home .categories .single-cat .icon {
    inline-size: 56px;
    block-size: 56px;
    border-radius: 14px;
    background: var(--cat-tint, #f1f6e6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-inline: auto;
    margin-block-end: 10px;
    flex: 0 0 auto;
}

/* Same glyph, same colour — only the stray padding that pushed it off-centre
   inside the new tile is removed. */
.wt-home .categories .single-cat .icon i {
    padding-top: 0;
    line-height: 1;
    display: block;
}

.wt-home .categories .single-cat h3 {
    margin-top: 0;
    line-height: 1.35;
}

.wt-home .categories .single-cat .total {
    display: none;
}

.wt-home .categories .single-cat .cat-explore {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-block-start: 6px;
    color: var(--primary-color, #97bd2e);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.wt-home .categories .single-cat .cat-explore-arrow {
    font-size: 12px;
    line-height: 1;
    transition: transform 0.2s ease;
}

/* The glyph is a right arrow; mirror it for RTL. */
[dir="rtl"] .wt-home .categories .single-cat .cat-explore-arrow {
    transform: scaleX(-1);
}

.wt-home .categories .single-cat:hover .cat-explore-text,
.wt-home .categories .single-cat:focus-visible .cat-explore-text {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wt-home .categories .single-cat:hover .cat-explore-arrow,
.wt-home .categories .single-cat:focus-visible .cat-explore-arrow {
    transform: translateX(3px);
}

[dir="rtl"] .wt-home .categories .single-cat:hover .cat-explore-arrow,
[dir="rtl"] .wt-home .categories .single-cat:focus-visible .cat-explore-arrow {
    transform: scaleX(-1) translateX(3px);
}

/* The card itself is the link, so focus lives here. Keyboard focus is carried
   by the outline plus the border/shadow emphasis above and deliberately not by
   the tilt, so it reads identically with motion turned off. */
.wt-home .categories .single-cat:focus-visible {
    outline: 3px solid var(--primary-color, #97bd2e);
    outline-offset: 3px;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .wt-home .categories .single-cat,
    .wt-home .categories .single-cat .cat-explore-arrow {
        transition: none;
    }

    /* No lift, no tilt. Border and shadow still mark hover and focus. */
    .wt-home .categories .cat-slide:nth-child(odd) .single-cat:hover,
    .wt-home .categories .cat-slide:nth-child(even) .single-cat:hover {
        transform: none;
    }

    .wt-home .categories .single-cat:hover .cat-explore-arrow {
        transform: none;
    }

    [dir="rtl"] .wt-home .categories .single-cat:hover .cat-explore-arrow {
        transform: scaleX(-1);
    }
}

/* --- 5. Featured cities ------------------------------------------------- */

.wt-home .locations-theme {
    background: linear-gradient(180deg, var(--wt-dark) 0%, var(--wt-dark-2) 100%);
    box-shadow: none;
}

/* The "All Cities" link sat alone on its own row above the grid. Pulling it
   up beside the heading removes a whole band of empty space. */
.wt-home .featured-locations .d-flex.mb-3 {
    margin-block-start: -12px;
    margin-block-end: 20px !important;
}

/* These city articles also carry .trainer-card (a class the trainer band
   defines), so they inherit its blur and heavy shadow. Reset explicitly. */
.wt-home .featured-locations .card {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid var(--wt-line-dark) !important;
    border-radius: var(--wt-r-card) !important;
    box-shadow: none !important;
    backdrop-filter: none;
    transform: none;
    overflow: hidden;
}

.wt-home .featured-locations .card:hover {
    transform: translateY(-3px);
    box-shadow: var(--wt-shadow);
}

.wt-home .featured-locations .city-card-media {
    height: 170px;
    border-radius: 0;
}

.wt-home .featured-locations .card-body {
    padding: 16px;
}

/* Card copy was long enough to push cards to uneven heights. */
.wt-home .featured-locations .card-body > p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-block-end: 14px !important;
    line-height: 1.55;
}

/* --- 6. Course cards ---------------------------------------------------- */

/* --- 6a. Premium card (homepage only) ----------------------------------
   These rules style the 'premium' variant of render_course_card(). The classic
   card below is untouched because courses.php still renders it. Colours come
   from --primary-color (printed on :root by inc/spStyles.php from the DB
   settings) and the slate/neutral tokens at the top of this file — no new
   brand colour is introduced. --wt-cc-tint is the course's own category colour,
   passed inline by the renderer.

   Grid gap: bootstrap gutters carry both axes, so cards never touch and the
   row keeps its 3 / 2 / 1 column behaviour with no horizontal scroll. */
.wt-home .items-grid .single-head > .row {
    --bs-gutter-x: 30px;
    --bs-gutter-y: 30px;
}

.wt-home .items-grid .wt-cc-col {
    display: flex;
    /* The classic card's stacked margin would double up on the gutter. */
    margin-block-start: 0;
}

.wt-home .items-grid .wt-cc {
    position: relative;
    inline-size: 100%;
    display: flex;
    flex-direction: column;
    background: var(--wt-surface);
    border: 1px solid var(--wt-line-soft);
    border-radius: 18px;
    padding: 26px;
    /* The clip keeps the top accent line inside the rounded corners. */
    overflow: hidden;
    transition: transform 220ms ease, border-color 220ms ease,
        box-shadow 220ms ease;
}

/* Thin brand accent line — the only coloured area on the card. */
.wt-home .items-grid .wt-cc::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    block-size: 3px;
    background: var(--primary-color, #97bd2e);
    opacity: 0.55;
    transition: opacity 220ms ease;
}

.wt-home .items-grid .wt-cc:hover {
    transform: translateY(-5px);
    border-color: rgba(20, 33, 40, 0.18);
    box-shadow: 0 10px 26px -14px rgba(20, 33, 40, 0.32);
}

.wt-home .items-grid .wt-cc:hover::before,
.wt-home .items-grid .wt-cc:focus-within::before {
    opacity: 1;
}

/* Row 1: status chip on the leading side, wishlist on the trailing side. */
.wt-home .items-grid .wt-cc-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-block-end: 12px;
}

/* Keeps the wishlist button on the trailing edge when there is no chip. */
.wt-home .items-grid .wt-cc-flag-spacer {
    display: block;
    block-size: 1px;
}

/* Compact pill, deliberately quieter than the title. */
.wt-home .items-grid .wt-cc-flag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.wt-home .items-grid .wt-cc-flag i {
    font-size: 11px;
    line-height: 1;
}

/* "Starting Soon" — brand green on its own pale wash, via color-mix so the
   tint follows whatever primary_color the settings table holds. */
.wt-home .items-grid .wt-cc-flag--soon {
    color: var(--primary-color, #97bd2e);
    background: color-mix(in srgb, var(--primary-color, #97bd2e) 12%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--primary-color, #97bd2e) 30%, #ffffff);
}

/* Older browsers without color-mix() still get a readable chip. */
@supports not (background: color-mix(in srgb, #000 10%, #fff)) {
    .wt-home .items-grid .wt-cc-flag--soon {
        background: #f4f8e9;
        border-color: rgba(151, 189, 46, 0.35);
    }
}

.wt-home .items-grid .wt-cc-flag--approved {
    color: var(--wt-dark);
    background: var(--wt-surface-alt);
    border: 1px solid var(--wt-line-soft);
}

/* Wishlist button: restyled, same element and same behaviour. */
.wt-home .items-grid .wt-cc .like {
    flex: 0 0 auto;
    inline-size: 34px;
    block-size: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: 1px solid var(--wt-line-soft);
    border-radius: 50%;
    background: var(--wt-surface);
    color: var(--wt-dark);
    font-size: 15px;
    line-height: 1;
    transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
}

.wt-home .items-grid .wt-cc .like:hover,
.wt-home .items-grid .wt-cc .like.active-fav {
    color: var(--primary-color, #97bd2e);
    border-color: var(--primary-color, #97bd2e);
}

/* Strongest element on the card. */
.wt-home .items-grid .wt-cc-title {
    margin: 0 0 10px;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

/* The clamp lives on the <a>, not on the .wt-cc-title itself: the h3 is a flex
   item of .wt-cc, and flex items are blockified — display: -webkit-box would be
   computed away to a plain block and the clamp silently dropped. */
.wt-home .items-grid .wt-cc-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--wt-dark);
    text-decoration: none;
}

.wt-home .items-grid .wt-cc-title a:hover {
    color: var(--primary-color, #97bd2e);
}

/* Specialisation tags — small, tinted with the category's own colour. */
/* main.css carries a global `p { padding: 20px }`; every <p> in this card has
   to zero it or it gains 40px of dead height. */
.wt-home .items-grid .wt-cc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 12px;
    padding: 0;
}

.wt-home .items-grid .wt-cc-tag {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--wt-cc-chip, var(--wt-surface-alt));
    color: var(--wt-dark);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
}

/* UI-only clamp; the renderer still prints the full description. Same
   blockification caveat as the title — the clamp is on the inner <span>. */
.wt-home .items-grid .wt-cc-desc {
    margin: 0 0 18px;
    padding: 0;
    color: rgba(46, 59, 70, 0.72);
    font-size: 14px;
    line-height: 1.65;
}

.wt-home .items-grid .wt-cc-desc span {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Metadata strip replacing the old Locations & Dates bar. */
/* The auto margin sits here rather than on .wt-cc-foot so that the metadata
   strip and the CTA both line up across a row of equal-height cards. */
.wt-home .items-grid .wt-cc-meta {
    margin-block-start: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 12px;
    margin-block-end: 18px;
    margin-inline: 0;
    padding-block: 14px;
    border-block: 1px solid var(--wt-line-soft);
}

.wt-home .items-grid .wt-cc-meta-item {
    min-inline-size: 0;
}

.wt-home .items-grid .wt-cc-meta dt {
    margin: 0 0 3px;
    color: rgba(46, 59, 70, 0.55);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.4;
}

.wt-home .items-grid .wt-cc-meta dd {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 5px;
    color: var(--wt-dark);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    min-inline-size: 0;
}

.wt-home .items-grid .wt-cc-meta dd i {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--primary-color, #97bd2e);
}

/* Long city names wrap rather than push the card wider. */
.wt-home .items-grid .wt-cc-meta dd span {
    min-inline-size: 0;
    overflow-wrap: anywhere;
}

.wt-home .items-grid .wt-cc-nodates {
    margin-block-start: auto;
    margin-block-end: 18px;
    margin-inline: 0;
    padding-inline: 0;
    padding-block: 14px;
    border-block: 1px solid var(--wt-line-soft);
    color: rgba(46, 59, 70, 0.55);
    font-size: 13px;
}

/* Footer pinned to the bottom edge so cards in a row end level. */
.wt-home .items-grid .wt-cc-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.wt-home .items-grid .wt-cc-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color, #97bd2e);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}

.wt-home .items-grid .wt-cc-cta:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wt-home .items-grid .wt-cc-cta-arrow {
    font-size: 13px;
    line-height: 1;
    transition: transform 200ms ease;
}

.wt-home .items-grid .wt-cc-cta:hover .wt-cc-cta-arrow {
    transform: translateX(3px);
}

/* The glyph is a right arrow; mirror it for Arabic. */
[dir="rtl"] .wt-home .items-grid .wt-cc-cta-arrow {
    transform: scaleX(-1);
}

[dir="rtl"] .wt-home .items-grid .wt-cc-cta:hover .wt-cc-cta-arrow {
    transform: scaleX(-1) translateX(3px);
}

.wt-home .items-grid .wt-cc-more {
    color: rgba(46, 59, 70, 0.55);
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
}

/* Visible keyboard focus on every interactive element in the card. */
.wt-home .items-grid .wt-cc a:focus-visible,
.wt-home .items-grid .wt-cc button:focus-visible {
    outline: 3px solid var(--primary-color, #97bd2e);
    outline-offset: 3px;
    border-radius: 6px;
}

/* --- 6b. Classic card (still rendered by courses.php) ------------------- */

/* Equal heights across each row: the column, the card, and the content all
   become flex so the footer can sit on the bottom edge. */
.wt-home .items-grid .course-card {
    display: flex;
    margin-block-start: 24px;
}

.wt-home .items-grid .single-grid {
    inline-size: 100%;
    display: flex;
    flex-direction: column;
    margin-top: 0;
    border-radius: var(--wt-r-card);
    border: 1px solid var(--wt-line-soft);
    box-shadow: var(--wt-shadow) !important;
}

.wt-home .items-grid .single-grid .content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.wt-home .items-grid .single-grid .content .top-content {
    flex: 1 1 auto;
}

.wt-home .items-grid .single-grid .content .bottom-content {
    margin-block-start: auto;
}

.wt-home .items-grid .single-grid .content .top-content .title {
    font-size: 17px;
    line-height: 1.4;
}

/* Requirement 16/17: cap the preview so no card runs away in height. */
.wt-home .items-grid .info-list li a {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

/* The "Starting Soon" badge overlapped the heading on narrow cards. */
.wt-home .items-grid .single-grid .image .item-position {
    z-index: 3;
}

.wt-home .load-text {
    margin-block-start: 32px;
}

/* --- 7. Trainer spotlight ----------------------------------------------- */

/* Same dark tone as the cities band so the page reads as one system. */
.wt-home .trainer-spotlight {
    background: linear-gradient(180deg, var(--wt-dark-2) 0%, var(--wt-dark) 100%);
}

.wt-home .trainer-spotlight .trainer-card {
    border-radius: var(--wt-r-card);
    box-shadow: none;
    border: 1px solid var(--wt-line-dark);
    backdrop-filter: none;
    padding: 16px;
}

.wt-home .trainer-spotlight .trainer-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--wt-shadow);
}

/* The subtitle inherited the default dark body colour on a dark band. */
.wt-home .trainer-spotlight .section-title p,
.wt-home .locations-theme .section-title p {
    color: rgba(255, 255, 255, 0.78);
}

/* Heading (col-8) and "View all trainers" (col-4) sit on one row; align them
   on the same baseline instead of letting the button drop below. */
.wt-home .trainer-spotlight .section-title {
    margin-inline: 0;
    margin-block-end: 0;
    text-align: start;
}

/* The accent rule under the subtitle is centred by the base rule; move it to
   the start edge here so it tracks the left-aligned text (and the right edge
   under RTL, since these are logical properties). */
.wt-home .trainer-spotlight .section-title p::before {
    inset-inline-start: 0;
    margin-inline-start: 0;
    margin-left: 0;
}

.wt-home .trainer-cta {
    margin-block-start: 0 !important;
    display: flex;
    align-items: center;
}

@media only screen and (min-width: 992px) {
    .wt-home .trainer-cta {
        justify-content: flex-end;
    }
}

@media only screen and (max-width: 991px) {
    .wt-home .trainer-cta {
        margin-block-start: 16px !important;
    }

    /* Tablet: 2 cards per row (col-md-6) with a tighter gutter. */
    .wt-home .items-grid .single-head > .row {
        --bs-gutter-x: 22px;
        --bs-gutter-y: 22px;
    }

    .wt-home .items-grid .wt-cc {
        padding: 24px;
    }
}

/* mb-4 on the header row already carries the gap; the extra 36px on top of it
   was most of the section's dead space. */
.wt-home .trainer-spotlight .trainer-grid {
    margin-block-start: 8px;
}

/* --- 7a. Trainer cards --------------------------------------------------
   Light, elevated cards on the dark band, with the brand green kept for
   accents and links only. --primary-color comes from inc/spStyles.php, which
   prints it on :root from the site settings row. */

.wt-home .trainer-spotlight .wt-tr-grid {
    display: grid;
    /* Fixed three-up rather than auto-fit: with a single visible trainer the
       old auto-fit track stretched that one card across the whole container. */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

/* Fewer than a full row: hold the cards at their normal width and centre the
   row, so a short spotlight reads as deliberate rather than as a gap. Desktop
   only — below 992px the 2-up and 1-up tracks already fill the width, and an
   attribute selector would otherwise outrank those media rules. */
@media only screen and (min-width: 992px) {
    .wt-home .trainer-spotlight .wt-tr-grid[data-count="1"],
    .wt-home .trainer-spotlight .wt-tr-grid[data-count="2"] {
        grid-template-columns: repeat(auto-fit, minmax(0, 368px));
        justify-content: center;
    }
}

.wt-home .trainer-spotlight .wt-tr-card {
    display: flex;
    flex-direction: column;
    background: var(--wt-surface);
    border: 1px solid rgba(20, 33, 40, 0.08);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 22px -14px rgba(0, 0, 0, 0.5);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.wt-home .trainer-spotlight .wt-tr-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--primary-color, #97bd2e) 45%, #ffffff);
    box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.6);
}

@supports not (border-color: color-mix(in srgb, #000 10%, #fff)) {
    .wt-home .trainer-spotlight .wt-tr-card:hover {
        border-color: rgba(151, 189, 46, 0.5);
    }
}

.wt-home .trainer-spotlight .wt-tr-photo {
    inline-size: 104px;
    block-size: 104px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    display: block;
    margin-block-end: 16px;
    background: var(--wt-surface-alt);
    border: 1px solid var(--wt-line-soft);
    transition: transform 220ms ease;
}

.wt-home .trainer-spotlight .wt-tr-card:hover .wt-tr-photo {
    transform: scale(1.02);
}

.wt-home .trainer-spotlight .wt-tr-name {
    margin: 0 0 4px;
    padding: 0;
    color: var(--wt-dark);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
}

/* main.css sets a global `p { padding: 20px }`, so every <p> here zeroes it. */
.wt-home .trainer-spotlight .wt-tr-role {
    margin: 0 0 8px;
    padding: 0;
    color: rgba(46, 59, 70, 0.65);
    font-size: 13px;
    line-height: 1.45;
}

.wt-home .trainer-spotlight .wt-tr-exp {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 16px;
    padding: 0;
    color: var(--wt-dark);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
}

.wt-home .trainer-spotlight .wt-tr-exp i {
    color: var(--primary-color, #97bd2e);
    font-size: 14px;
    line-height: 1;
}

.wt-home .trainer-spotlight .wt-tr-specs-label {
    margin: 0 0 8px;
    padding: 0;
    color: rgba(46, 59, 70, 0.5);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.4;
}

.wt-home .trainer-spotlight .wt-tr-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-block-end: 18px;
}

/* Small, lightly bordered, and one fixed height so a wrapped row stays even. */
.wt-home .trainer-spotlight .wt-tr-tag {
    display: inline-flex;
    align-items: center;
    block-size: 24px;
    padding-inline: 9px;
    border: 1px solid var(--wt-line-soft);
    border-radius: 6px;
    background: var(--wt-surface-alt);
    color: var(--wt-dark);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    max-inline-size: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* inline-flex drops the whitespace text node between the count and the word,
   so the space has to come from a gap. */
.wt-home .trainer-spotlight .wt-tr-tag--more {
    gap: 4px;
    background: transparent;
    color: rgba(46, 59, 70, 0.6);
}

.wt-home .trainer-spotlight .wt-tr-link {
    margin-block-start: auto;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    color: var(--primary-color, #97bd2e);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}

.wt-home .trainer-spotlight .wt-tr-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Header action: outlined, not a large white pill. */
.wt-home .trainer-spotlight .wt-tr-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: transparent;
    color: #f7f8fa;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}

.wt-home .trainer-spotlight .wt-tr-all:hover {
    color: var(--primary-color, #97bd2e);
    border-color: var(--primary-color, #97bd2e);
    background: rgba(255, 255, 255, 0.06);
}

.wt-home .trainer-spotlight .wt-tr-arrow {
    font-size: 13px;
    line-height: 1;
    transition: transform 200ms ease;
}

.wt-home .trainer-spotlight a:hover .wt-tr-arrow {
    transform: translateX(3px);
}

/* The glyph is a right arrow; mirror it for Arabic. */
[dir="rtl"] .wt-home .trainer-spotlight .wt-tr-arrow {
    transform: scaleX(-1);
}

[dir="rtl"] .wt-home .trainer-spotlight a:hover .wt-tr-arrow {
    transform: scaleX(-1) translateX(3px);
}

/* The subtitle is redundant next to the heading; keep the text (both languages
   are dynamic) but drop it to a quiet caption. */
.wt-home .trainer-spotlight .section-title p {
    font-size: 13px;
    opacity: 0.75;
    margin-block-end: 0;
}

.wt-home .trainer-spotlight a:focus-visible {
    outline: 3px solid var(--primary-color, #97bd2e);
    outline-offset: 3px;
    border-radius: 8px;
}

@media only screen and (max-width: 991px) {
    .wt-home .trainer-spotlight .wt-tr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }
}

@media only screen and (max-width: 575px) {
    .wt-home .trainer-spotlight .wt-tr-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .wt-home .trainer-spotlight .wt-tr-card {
        padding: 20px;
    }
}

/* --- 7b. FAQ accordion --------------------------------------------------
   Sits between the white accreditations band and the green newsletter, so it
   takes the light neutral surface to keep the two white bands apart. Slate
   text; brand green is reserved for the icon, the active question and the open
   row's border. --primary-color is printed on :root by inc/spStyles.php from
   the site settings, so the accent follows the configured brand colour. */

.wt-home .faq-area {
    background: var(--wt-surface-alt);
    /* Tighter than the standard --wt-sec-y band: the accordion is a dense list
       and does not need the same air as the card sections. */
    padding-block: 76px;
}

/* Only 2px above the page's shared 30px heading, so the FAQ reads as part of
   the same system rather than as a louder section. The existing 50px green
   rule under the subtitle is the section's accent — no extra element. */
.wt-home .faq-area .section-title h2 {
    font-size: 32px;
}

.wt-home .faq-area .section-title {
    margin-block-end: 16px;
}

.wt-home .wt-faq {
    /* Wide enough to look composed on a large display, narrow enough that a
       question never runs the full width of the screen. */
    max-inline-size: 920px;
    margin-inline: auto;
    margin-block-start: 0;
}

.wt-home .wt-faq-item {
    background: var(--wt-surface);
    /* Lighter than the shared --wt-line-soft token: a closed row should barely
       announce itself, so the green border on the open row carries the state. */
    border: 1px solid rgba(20, 33, 40, 0.055);
    border-radius: 12px;
    margin-block-end: 11px;
    /* Clips the panel while it animates out, and keeps the open-state tint
       inside the rounded corners. */
    overflow: hidden;
    transition: border-color 200ms ease;
}

.wt-home .wt-faq-item:last-child {
    margin-block-end: 0;
}

.wt-home .wt-faq-item:hover,
.wt-home .wt-faq-item:focus-within {
    border-color: rgba(20, 33, 40, 0.11);
}

/* Open row: green border. Kept as its own rule because :has() is the only way
   to reach the item from the button the script toggles — in a browser without
   :has() the whole rule is dropped and the row simply keeps its neutral
   border, while the tint below (which needs no :has()) still marks the state. */
.wt-home .wt-faq-item:has(.wt-faq-btn.is-open) {
    border-color: color-mix(in srgb, var(--primary-color, #97bd2e) 50%, #ffffff);
}

/* The heading carries no visual weight of its own — it exists so the questions
   are reachable as document structure. h3 is 30px globally in main.css. */
.wt-home .wt-faq-heading {
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.wt-home .wt-faq-btn {
    inline-size: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    /* Logical padding so the question keeps its indent under RTL. */
    padding: 18px 22px;
    border: 0;
    background: transparent;
    /* The button is the row, so the label follows the reading direction. */
    text-align: start;
    color: var(--wt-dark);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    transition: color 200ms ease, background 200ms ease;
}

.wt-home .wt-faq-btn:hover {
    color: var(--primary-color, #97bd2e);
}

/* Very light green wash rather than a filled green bar. The button and the
   panel are tinted separately so the whole open row reads as one surface
   without needing to reach the item element. */
.wt-home .wt-faq-btn.is-open,
.wt-home .wt-faq-panel.is-open {
    background: color-mix(in srgb, var(--primary-color, #97bd2e) 2%, #ffffff);
}

.wt-home .wt-faq-btn.is-open {
    color: var(--wt-dark);
}

/* Browsers without color-mix() get a hand-mixed equivalent of the same wash. */
@supports not (background: color-mix(in srgb, #000 10%, #fff)) {
    .wt-home .wt-faq-btn.is-open,
    .wt-home .wt-faq-panel.is-open {
        background: #fdfefb;
    }
}

.wt-home .wt-faq-q {
    flex: 1 1 auto;
    min-inline-size: 0;
}

/* Plus / minus drawn in CSS — no new icon font, and it animates cleanly. */
.wt-home .wt-faq-icon {
    position: relative;
    flex: 0 0 auto;
    inline-size: 26px;
    block-size: 26px;
    border: 1px solid rgba(20, 33, 40, 0.07);
    border-radius: 50%;
    background: var(--wt-surface);
    transition: border-color 200ms ease, background 200ms ease;
}

/* inset:0 + margin:auto centres a fixed-size box on both axes without a
   transform. A logical inset plus translate(-50%) would disagree under RTL —
   the inset flips to the right edge while the translate still pulls left — and
   the plus lands off-centre. A plus sign is symmetric, so it must not mirror. */
.wt-home .wt-faq-icon::before,
.wt-home .wt-faq-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    background: var(--primary-color, #97bd2e);
    border-radius: 1px;
    transition: transform 200ms ease, opacity 200ms ease;
}

/* Horizontal bar of the plus (stays on as the minus when open). */
.wt-home .wt-faq-icon::before {
    inline-size: 9px;
    block-size: 2px;
}

/* Vertical bar — rotates out to turn the plus into a minus. */
.wt-home .wt-faq-icon::after {
    inline-size: 2px;
    block-size: 9px;
}

/* Neutral on hover — the green ring is reserved for the open row. */
.wt-home .wt-faq-btn:hover .wt-faq-icon {
    border-color: rgba(20, 33, 40, 0.15);
}

.wt-home .wt-faq-btn.is-open .wt-faq-icon {
    border-color: var(--primary-color, #97bd2e);
}

.wt-home .wt-faq-btn.is-open .wt-faq-icon::after {
    transform: rotate(90deg);
    opacity: 0;
}

/* Collapsed: max-height 0 for the animation, plus visibility so the text is
   also out of the accessibility tree rather than merely clipped. */
.wt-home .wt-faq-panel {
    max-block-size: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 200ms ease, visibility 0s linear 200ms;
}

.wt-home .wt-faq-panel.is-open {
    visibility: visible;
    transition: max-height 200ms ease, visibility 0s linear 0s;
}

/* A hairline between question and answer: on a tinted row the two blocks would
   otherwise read as one paragraph. It is inset to the text column so it reads
   as a separator, not as a second card edge. */
.wt-home .wt-faq-answer {
    padding-block: 10px 14px;
    padding-inline: 0;
    /* The inline inset comes from the margin so the divider stops short of the
       card edges instead of spanning them. */
    margin-inline: 22px;
    border-block-start: 1px solid rgba(20, 33, 40, 0.07);
}

.wt-home .wt-faq-answer p {
    margin: 0;
    padding: 0;
    /* Naturally capped so a line never runs the full 1100px. */
    max-inline-size: 78ch;
    color: rgba(46, 59, 70, 0.72);
    font-size: 15px;
    line-height: 1.8;
}

.wt-home .wt-faq-btn:focus-visible {
    outline: 3px solid var(--primary-color, #97bd2e);
    outline-offset: -3px;
    border-radius: 12px;
}

@media only screen and (max-width: 991px) {
    .wt-home .faq-area {
        padding-block: 56px;
    }

    .wt-home .faq-area .section-title h2 {
        font-size: 28px;
    }
}

@media only screen and (max-width: 767px) {
    .wt-home .faq-area {
        padding-block: 44px;
    }

    .wt-home .wt-faq-btn {
        /* Smaller inline padding, but the 26px icon keeps its tap target. */
        padding: 15px 15px;
        font-size: 15px;
        gap: 12px;
    }

    .wt-home .wt-faq-answer {
        padding-block: 10px 12px;
        margin-inline: 15px;
    }

    .wt-home .wt-faq-answer p {
        font-size: 14px;
        line-height: 1.75;
    }

    .wt-home .wt-faq-item {
        margin-block-end: 10px;
    }
}

/* --- 8. Newsletter ------------------------------------------------------ */

.wt-home .newsletter {
    padding: 56px 40px;
}

/* --- 9. Buttons --------------------------------------------------------- */

/* One height, one padding, one radius for every homepage CTA. */
.wt-home .btn,
.wt-home .s-btn,
.wt-home .load-text a,
.wt-home .locations-theme .btn-outline-light {
    min-block-size: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-block: 0;
    padding-inline: 22px;
    border-radius: var(--wt-r-pill);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

/* .s-btn paints `background-color: white` and relies on a ::before pseudo
   element carrying an animated 400%-wide gradient for its colour. The last
   two stops of that gradient are white, so as the 20s loop slides, part of
   every button renders white — the "half-empty pill" effect. On the homepage
   the button gets a flat brand fill and the animated layer is switched off. */
.wt-home .s-btn {
    background-color: var(--primary-color, #97bd2e);
    background-image: none;
    color: #10201a;
}

.wt-home .s-btn::before {
    content: none;
    display: none;
}

.wt-home .s-btn:hover,
.wt-home .s-btn:focus-visible {
    background-color: #10201a;
    color: #fff;
}

/* City CTA text was clipping inside a fixed-width pill. */
.wt-home .featured-locations .btn.s-btn {
    inline-size: 100%;
    white-space: normal;
    min-block-size: 44px;
    padding-inline: 16px;
    border-radius: var(--wt-r-pill) !important;
}

/* --- 10. Alignment ------------------------------------------------------ */

.wt-home .single-cat,
.wt-home .trainer-card,
.wt-home .featured-locations .card-body {
    text-align: start;
}

.wt-home .categories .single-cat {
    text-align: center;
}

/* --- 11. No horizontal overflow ----------------------------------------- */

.wt-home img,
.wt-home article,
.wt-home .card {
    max-inline-size: 100%;
}

/* The tiny-slider prev/next controls are absolutely positioned and sat about
   2px past the viewport at 768px and 1024px. `clip` (not `hidden`) stops the
   page scrolling sideways without turning <main> into a scroll container or
   affecting vertical overflow. */
.wt-home {
    overflow-x: clip;
}

/* --- 12. Mobile: tighter, still comfortable ----------------------------- */

@media only screen and (max-width: 767px) {
    .wt-home {
        --wt-sec-y: var(--wt-sec-y-sm);
        --wt-title-gap: 26px;
    }

    .wt-home .container {
        padding-inline: 16px;
    }

    .wt-home .section-title h2 {
        font-size: 24px;
    }

    .wt-home .categories .cat-inner {
        padding: 22px 16px;
    }

    .wt-home .items-grid .course-card {
        margin-block-start: 16px;
    }

    .wt-home .items-grid .single-head > .row {
        --bs-gutter-x: 18px;
        --bs-gutter-y: 18px;
    }

    .wt-home .items-grid .wt-cc {
        padding: 22px 20px;
    }

    .wt-home .newsletter {
        padding: 36px 20px;
    }
}

/* --- 13. Motion preference ---------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .wt-home .featured-locations .card:hover,
    .wt-home .trainer-spotlight .trainer-card:hover {
        transform: none;
    }

    .wt-home .items-grid .wt-cc,
    .wt-home .items-grid .wt-cc::before,
    .wt-home .items-grid .wt-cc .like,
    .wt-home .items-grid .wt-cc-cta-arrow {
        transition: none;
    }

    /* Border, shadow and the accent line still mark hover. */
    .wt-home .items-grid .wt-cc:hover {
        transform: none;
    }

    .wt-home .items-grid .wt-cc-cta:hover .wt-cc-cta-arrow {
        transform: none;
    }

    .wt-home .trainer-spotlight .wt-tr-card,
    .wt-home .trainer-spotlight .wt-tr-photo,
    .wt-home .trainer-spotlight .wt-tr-all,
    .wt-home .trainer-spotlight .wt-tr-arrow {
        transition: none;
    }

    /* Border and shadow still mark hover. */
    .wt-home .trainer-spotlight .wt-tr-card:hover {
        transform: none;
    }

    .wt-home .trainer-spotlight .wt-tr-card:hover .wt-tr-photo {
        transform: none;
    }

    .wt-home .trainer-spotlight a:hover .wt-tr-arrow {
        transform: none;
    }

    [dir="rtl"] .wt-home .trainer-spotlight a:hover .wt-tr-arrow {
        transform: scaleX(-1);
    }

    /* The panel still opens and closes; it just does so instantly. */
    .wt-home .wt-faq-item,
    .wt-home .wt-faq-btn,
    .wt-home .wt-faq-icon,
    .wt-home .wt-faq-icon::before,
    .wt-home .wt-faq-icon::after,
    .wt-home .wt-faq-panel,
    .wt-home .wt-faq-panel.is-open {
        transition: none;
    }

    .wt-home .wt-faq-btn.is-open .wt-faq-icon::after {
        transform: none;
    }

    [dir="rtl"] .wt-home .items-grid .wt-cc-cta:hover .wt-cc-cta-arrow {
        transform: scaleX(-1);
    }
}
