/*
 * SJB Electrical Training — conversion-focused homepage styles
 * Replace the existing central page stylesheet:
 * /wp-content/plugins/sjb-central-styles/assets/css/pages/_front-page.css
 *
 * This file contains homepage-only CSS. Keep sjb-shared.css loaded for the footer.
 */

/* The theme outputs a second page-title H1 above the editable content. */
#tt-pageContent h1.page-title,
#tt-pageContent h1.page-title + .divider {
    display: none !important;
}

.sjb-home {
    --sjb-navy: #102633;
    --sjb-dark: #081820;
    --sjb-blue: #0876a8;
    --sjb-blue-dark: #075c82;
    --sjb-orange: #f47b20;
    --sjb-orange-dark: #d96612;
    --sjb-green: #438d3d;
    --sjb-ink: #273942;
    --sjb-muted: #5f7078;
    --sjb-light: #f4f7f8;
    --sjb-pale-blue: #eaf5fa;
    --sjb-border: #dce5e8;
    --sjb-white: #fff;
    color: var(--sjb-ink);
    font-family: inherit;
    line-height: 1.65;
    overflow: hidden;
}

.sjb-home *,
.sjb-home *::before,
.sjb-home *::after {
    box-sizing: border-box;
}

.sjb-home img {
    display: block;
    max-width: 100%;
    height: auto;
}

.sjb-home a {
    text-decoration: none;
}

.sjb-home h1,
.sjb-home h2,
.sjb-home h3,
.sjb-home p,
.sjb-home figure {
    margin-top: 0;
}

.sjb-home h1,
.sjb-home h2,
.sjb-home h3 {
    color: var(--sjb-navy);
    line-height: 1.15;
}

.sjb-home h1 {
    max-width: 780px;
    margin-bottom: 22px;
    color: var(--sjb-white);
    font-size: clamp(39px, 5vw, 64px);
    letter-spacing: -1.3px;
}

.sjb-home h2 {
    margin-bottom: 16px;
    font-size: clamp(29px, 3.7vw, 43px);
    letter-spacing: -.5px;
}

.sjb-home h3 {
    margin-bottom: 10px;
    font-size: 21px;
}

.sjb-home__container {
    width: min(1160px, calc(100% - 40px));
    margin-inline: auto;
}

.sjb-home__section {
    padding: 72px 0;
}

.sjb-home__section--light {
    background: var(--sjb-light);
}

.sjb-home__eyebrow {
    margin-bottom: 12px;
    color: var(--sjb-orange);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.35px;
    line-height: 1.3;
    text-transform: uppercase;
}

.sjb-home__section-heading {
    max-width: 790px;
    margin-bottom: 34px;
}

.sjb-home__section-heading > p:last-child {
    max-width: 690px;
    margin-bottom: 0;
    color: var(--sjb-muted);
    font-size: 18px;
}

.sjb-home__section-heading--split {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    max-width: none;
}

.sjb-home__section-heading--split > div {
    max-width: 760px;
}

.sjb-home__section-heading--compact {
    margin-bottom: 25px;
}

.sjb-home__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.sjb-home__actions--center {
    justify-content: center;
}

.sjb-home__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 51px;
    padding: 13px 22px;
    border: 2px solid transparent;
    border-radius: 5px;
    font-weight: 800;
    line-height: 1.2;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.sjb-home__button:hover,
.sjb-home__button:focus-visible {
    transform: translateY(-2px);
}

.sjb-home__button--email {
    background: var(--sjb-orange);
    color: var(--sjb-white) !important;
}

.sjb-home__button--email:hover,
.sjb-home__button--email:focus-visible {
    background: var(--sjb-orange-dark);
}

.sjb-home__button--book {
    border-color: var(--sjb-blue);
    background: var(--sjb-white);
    color: var(--sjb-blue) !important;
}

.sjb-home__button--book:hover,
.sjb-home__button--book:focus-visible {
    background: var(--sjb-blue);
    color: var(--sjb-white) !important;
}

.sjb-home__button--light {
    background: var(--sjb-white);
    color: var(--sjb-navy) !important;
}

.sjb-home__button--light:hover,
.sjb-home__button--light:focus-visible {
    background: var(--sjb-pale-blue);
}

.sjb-home__button--wide {
    width: 100%;
}

.sjb-home__text-link {
    color: var(--sjb-blue) !important;
    font-weight: 800;
}

.sjb-home__text-link::after {
    content: " →";
}

.sjb-home__text-link:hover,
.sjb-home__text-link:focus-visible {
    color: var(--sjb-orange-dark) !important;
}

.sjb-home__text-link--large {
    font-size: 16px;
    white-space: nowrap;
}

/* Hero */

.sjb-home__hero {
    padding: 72px 0 78px;
    background: linear-gradient(120deg, var(--sjb-dark), var(--sjb-navy) 62%, #0a5b7e);
}

.sjb-home__hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
    align-items: center;
    gap: 54px;
}

.sjb-home__hero .sjb-home__eyebrow {
    color: #ff9f5b;
}

.sjb-home__hero-lead {
    max-width: 720px;
    margin-bottom: 27px;
    color: #e8f2f6;
    font-size: 19px;
}

.sjb-home__hero .sjb-home__button--book {
    border-color: rgba(255, 255, 255, .5);
    background: transparent;
    color: var(--sjb-white) !important;
}

.sjb-home__hero .sjb-home__button--book:hover,
.sjb-home__hero .sjb-home__button--book:focus-visible {
    border-color: var(--sjb-white);
    background: var(--sjb-white);
    color: var(--sjb-navy) !important;
}

.sjb-home__response-note {
    margin: 15px 0 0;
    color: #c9dbe3;
    font-size: 13px;
}

.sjb-home__hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.sjb-home__hero-points li {
    position: relative;
    padding-left: 18px;
    color: var(--sjb-white);
    font-size: 14px;
    font-weight: 700;
}

.sjb-home__hero-points li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #77c96f;
}

.sjb-home__hero-media {
    position: relative;
    margin-bottom: 0;
}

.sjb-home__hero-media img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 24px 55px rgba(0, 0, 0, .28);
}

.sjb-home__hero-media figcaption {
    position: absolute;
    right: 15px;
    bottom: 15px;
    left: 15px;
    padding: 11px 13px;
    border-radius: 5px;
    background: rgba(8, 24, 32, .87);
    color: var(--sjb-white);
    font-size: 12px;
    font-weight: 700;
}

/* Proof strip */

.sjb-home__proof {
    background: var(--sjb-white);
    box-shadow: 0 10px 28px rgba(16, 38, 51, .09);
}

.sjb-home__proof-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.sjb-home__proof p {
    margin: 0;
    padding: 22px 18px;
    text-align: center;
    border-right: 1px solid var(--sjb-border);
}

.sjb-home__proof p:last-child {
    border-right: 0;
}

.sjb-home__proof strong,
.sjb-home__proof span {
    display: block;
}

.sjb-home__proof strong {
    color: var(--sjb-blue);
    font-size: 19px;
}

.sjb-home__proof span {
    margin-top: 2px;
    color: var(--sjb-muted);
    font-size: 12px;
}

/* Conversion paths */

.sjb-home__path-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 17px;
}

.sjb-home__path {
    min-height: 100%;
    padding: 25px;
    border: 1px solid var(--sjb-border);
    border-radius: 7px;
    background: var(--sjb-white);
    box-shadow: 0 7px 18px rgba(16, 38, 51, .04);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.sjb-home__path:hover,
.sjb-home__path:focus-visible {
    border-color: #9cc9dc;
    box-shadow: 0 13px 26px rgba(16, 38, 51, .1);
    transform: translateY(-3px);
}

.sjb-home__path-number {
    display: block;
    margin-bottom: 15px;
    color: var(--sjb-orange);
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
}

.sjb-home__path p {
    color: var(--sjb-muted);
    font-size: 14px;
}

/* Course cards */

.sjb-home__course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.sjb-home__course-card {
    overflow: hidden;
    border: 1px solid var(--sjb-border);
    border-radius: 8px;
    background: var(--sjb-white);
    box-shadow: 0 8px 22px rgba(16, 38, 51, .06);
}

.sjb-home__course-image {
    display: block;
    overflow: hidden;
}

.sjb-home__course-image img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform .3s ease;
}

.sjb-home__course-card:hover .sjb-home__course-image img {
    transform: scale(1.025);
}

.sjb-home__course-body {
    padding: 24px;
}

.sjb-home__course-body > p:not(.sjb-home__tag) {
    min-height: 48px;
    color: var(--sjb-muted);
    font-size: 14px;
}

.sjb-home__tag {
    display: inline-block;
    margin-bottom: 11px;
    padding: 5px 8px;
    border-radius: 3px;
    background: var(--sjb-pale-blue);
    color: var(--sjb-blue-dark);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .65px;
    text-transform: uppercase;
}

.sjb-home__link-list {
    margin: 18px 0 0;
    padding: 17px 0 0;
    border-top: 1px solid var(--sjb-border);
    list-style: none;
}

.sjb-home__link-list li + li {
    margin-top: 8px;
}

.sjb-home__link-list a {
    color: var(--sjb-blue) !important;
    font-size: 14px;
    font-weight: 800;
}

.sjb-home__link-list a::after {
    content: " →";
}

.sjb-home__link-list a:hover,
.sjb-home__link-list a:focus-visible {
    color: var(--sjb-orange-dark) !important;
}

/* Email conversion band */

.sjb-home__email-band {
    padding: 49px 0;
    background: linear-gradient(110deg, #0c2b3a, var(--sjb-blue));
    color: var(--sjb-white);
}

.sjb-home__email-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .55fr);
    align-items: center;
    gap: 48px;
}

.sjb-home__email-band h2 {
    color: var(--sjb-white);
}

.sjb-home__email-band .sjb-home__eyebrow {
    color: #ffad71;
}

.sjb-home__email-band p:last-child {
    max-width: 740px;
    margin-bottom: 0;
    color: #e5f2f7;
}

.sjb-home__email-action span {
    display: block;
    margin-top: 10px;
    color: #cfe3ec;
    font-size: 12px;
    text-align: center;
}

/* Experience */

.sjb-home__experience {
    background: var(--sjb-white);
}

.sjb-home__experience-grid {
    display: grid;
    grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
    align-items: center;
    gap: 56px;
}

.sjb-home__experience-media {
    margin-bottom: 0;
}

.sjb-home__experience-media img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 9px;
    box-shadow: 0 18px 40px rgba(16, 38, 51, .16);
}

.sjb-home__experience-copy > p:not(.sjb-home__eyebrow) {
    max-width: 680px;
    color: var(--sjb-muted);
    font-size: 17px;
}

.sjb-home__experience-copy .sjb-home__actions {
    margin-top: 25px;
}

/* Client and sector logos */

.sjb-home__logo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    gap: 14px;
}

.sjb-home__logo-grid img {
    width: 100%;
    height: 86px;
    padding: 14px;
    object-fit: contain;
    border: 1px solid var(--sjb-border);
    border-radius: 6px;
    background: var(--sjb-white);
}

/* FAQ */

.sjb-home__faq-layout {
    display: grid;
    grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
    align-items: start;
    gap: 58px;
}

.sjb-home__faq-intro {
    position: sticky;
    top: 30px;
}

.sjb-home__faq-intro > p:not(.sjb-home__eyebrow) {
    color: var(--sjb-muted);
}

.sjb-home__faq-list details {
    margin-bottom: 11px;
    padding: 0 20px;
    border: 1px solid var(--sjb-border);
    border-radius: 6px;
    background: var(--sjb-white);
}

.sjb-home__faq-list summary {
    position: relative;
    padding: 18px 35px 18px 0;
    color: var(--sjb-navy);
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}

.sjb-home__faq-list summary::-webkit-details-marker {
    display: none;
}

.sjb-home__faq-list summary::after {
    content: "+";
    position: absolute;
    top: 13px;
    right: 0;
    color: var(--sjb-orange);
    font-size: 25px;
    line-height: 1;
}

.sjb-home__faq-list details[open] summary::after {
    content: "−";
}

.sjb-home__faq-list details p {
    padding: 0 0 18px;
    color: var(--sjb-muted);
}

/* Final CTA */

.sjb-home__final {
    padding: 70px 0;
    background: var(--sjb-dark);
    color: var(--sjb-white);
    text-align: center;
}

.sjb-home__final h2 {
    color: var(--sjb-white);
}

.sjb-home__final > .sjb-home__container > p:not(.sjb-home__eyebrow) {
    max-width: 700px;
    margin: 0 auto 26px;
    color: #d6e5eb;
    font-size: 18px;
}

.sjb-home__final .sjb-home__eyebrow {
    color: #ff9f5b;
}

/* Focus and motion */

.sjb-home a:focus-visible,
.sjb-home summary:focus-visible {
    outline: 3px solid #ffb37d;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .sjb-home *,
    .sjb-home *::before,
    .sjb-home *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* Responsive */

@media (max-width: 980px) {
    .sjb-home__hero-grid,
    .sjb-home__email-grid,
    .sjb-home__experience-grid,
    .sjb-home__faq-layout {
        grid-template-columns: 1fr;
    }

    .sjb-home__hero-grid {
        gap: 40px;
    }

    .sjb-home__hero-media {
        max-width: 720px;
    }

    .sjb-home__path-grid,
    .sjb-home__course-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sjb-home__logo-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sjb-home__experience-media {
        max-width: 620px;
    }

    .sjb-home__faq-intro {
        position: static;
    }
}

@media (max-width: 700px) {
    .sjb-home__container {
        width: calc(100% - 28px);
    }

    .sjb-home__section {
        padding: 54px 0;
    }

    .sjb-home__hero {
        padding: 57px 0 62px;
    }

    .sjb-home__proof-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sjb-home__proof p:nth-child(2) {
        border-right: 0;
    }

    .sjb-home__proof p:nth-child(-n + 2) {
        border-bottom: 1px solid var(--sjb-border);
    }

    .sjb-home__path-grid,
    .sjb-home__course-grid {
        grid-template-columns: 1fr;
    }

    .sjb-home__section-heading--split {
        display: block;
    }

    .sjb-home__section-heading--split .sjb-home__text-link {
        display: inline-block;
        margin-top: 6px;
    }

    .sjb-home__course-body > p:not(.sjb-home__tag) {
        min-height: 0;
    }

    .sjb-home__logo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sjb-home__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .sjb-home__button {
        width: 100%;
    }

    .sjb-home__experience-copy .sjb-home__text-link {
        align-self: flex-start;
    }
}

@media (max-width: 420px) {
    .sjb-home h1 {
        font-size: 36px;
    }

    .sjb-home h2 {
        font-size: 28px;
    }

    .sjb-home__proof-grid,
    .sjb-home__logo-grid {
        grid-template-columns: 1fr;
    }

    .sjb-home__proof p {
        border-right: 0;
        border-bottom: 1px solid var(--sjb-border);
    }

    .sjb-home__proof p:last-child {
        border-bottom: 0;
    }
}
