/*
 * NJSB temporary live homepage refresh.
 * Loaded only on the front page / Homepage template.
 */

:root {
    --njsb-live-blue: #2b4550;
    --njsb-live-deep: #21323b;
    --njsb-live-gold: #d5ba7f;
    --njsb-live-light: #f2f2f2;
    --njsb-live-white: #ffffff;
    --njsb-live-dark: #333333;
    --njsb-live-border: #cccccc;
    --njsb-live-muted: #666666;
    --njsb-live-disabled: #888888;
}

.page-template-template-homepage .content-area,
.page-template-template-homepage .site-main,
.page-template-template-homepage .njsb-homepage-content,
.page-template-template-homepage .njsb-homepage-content .entry-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.page-template-template-homepage .njsb-homepage-content {
    margin-bottom: 0;
}

/* Hero tightening + order count */
.home.wf-hero-page .wf-hero-section {
    min-height: 520px;
}

.home.wf-hero-page .wf-hero-section .hero-content {
    width: min(100% - 40px, 1064px);
    margin-bottom: 28px;
}

.home .wf-hero-order-count {
    margin-top: -8px;
    margin-bottom: 18px;
    color: var(--njsb-live-white);
    font-size: 18px;
    line-height: 1.4;
}

.home .wf-hero-order-count strong {
    font-family: "Roboto Slab", serif !important;
    font-weight: 800 !important;
}

/* Shared homepage layout */
.njsb-home-section {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 54px 24px;
}

.njsb-home-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.njsb-home-title {
    margin: 0 0 28px;
    color: var(--njsb-live-dark);
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.15;
    text-align: center;
}

.njsb-section-heading {
    max-width: 820px;
    margin: 0 auto 30px;
    text-align: center;
}

.njsb-section-heading .njsb-home-title {
    margin-bottom: 12px;
}

.njsb-section-heading p,
.njsb-slider-heading p {
    margin: 0;
    font-size: 18px;
    line-height: 1.55;
}

.njsb-section-action {
    margin-top: 30px;
    text-align: center;
}

.njsb-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    background: var(--njsb-live-blue);
    color: var(--njsb-live-white) !important;
    font-family: "Roboto Slab", serif !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

.njsb-button:hover,
.njsb-button:focus-visible {
    background: var(--njsb-live-gold);
    color: var(--njsb-live-dark) !important;
}

/* Offerings */
.njsb-offerings {
    padding-top: 36px;
    padding-bottom: 36px;
    background: var(--njsb-live-light);
}

.njsb-image-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.njsb-image-card {
    position: relative;
    display: flex;
    min-height: 310px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--njsb-live-deep);
    text-decoration: none !important;
}

.njsb-image-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.58);
    transition: transform 180ms ease, filter 180ms ease;
}

.njsb-image-card__title {
    position: relative;
    z-index: 1;
    padding: 18px;
    color: var(--njsb-live-white);
    font-family: "Roboto Slab", serif !important;
    font-size: clamp(24px, 2.2vw, 34px);
    font-weight: 800 !important;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
}

.njsb-image-card:hover img,
.njsb-image-card:focus-visible img {
    transform: scale(1.025);
    filter: brightness(0.68);
}

.njsb-image-card:focus-visible,
.njsb-link-card:focus-visible,
.njsb-category-card:focus-visible,
.njsb-news-feature:focus-visible,
.njsb-button:focus-visible,
.njsb-slider-button:focus-visible {
    outline: 3px solid var(--njsb-live-gold);
    outline-offset: 3px;
}

/* Damascus routing */
.njsb-damascus {
    position: relative;
    background-color: var(--njsb-live-deep);
    background-image: url("https://newjerseysteelbaron.com/wp-content/uploads/2026/08/power-hammer-setting-welds-forge-welding-damascus-1-scaled.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-blend-mode: multiply;
    color: var(--njsb-live-white);
}

.njsb-damascus .njsb-home-title,
.njsb-damascus .njsb-section-heading p {
    color: var(--njsb-live-white);
}

.njsb-link-card-grid {
    display: grid;
    gap: 20px;
}

.njsb-link-card-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.njsb-link-card {
    display: flex;
    min-height: 185px;
    flex-direction: column;
    padding: 24px;
    border: 2px solid var(--njsb-live-gold);
    background: var(--njsb-live-deep);
    color: var(--njsb-live-white) !important;
    text-decoration: none !important;
}

.njsb-link-card h3 {
    margin: 0 0 10px;
    color: var(--njsb-live-gold);
    font-size: 23px;
    line-height: 1.25;
}

.njsb-link-card p {
    margin: 0 0 18px;
    color: var(--njsb-live-white);
    line-height: 1.5;
}

.njsb-link-card__cta {
    margin-top: auto;
    color: var(--njsb-live-gold);
    font-family: "Roboto Slab", serif !important;
    font-weight: 800 !important;
}

.njsb-link-card:hover,
.njsb-link-card:focus-visible {
    border-color: var(--njsb-live-white);
    background: var(--njsb-live-blue);
}

/* Steel category slider */
.njsb-steel-sale {
    background: var(--njsb-live-white);
}

.njsb-slider-heading {
    margin-bottom: 26px;
    text-align: center;
}

.njsb-slider-heading .njsb-home-title {
    margin-bottom: 8px;
}

.njsb-category-slider-shell {
    position: relative;
    padding: 0 58px;
}

.njsb-slider-button {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0 0 4px;
    border: 0;
    background: var(--njsb-live-blue);
    color: var(--njsb-live-white);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.njsb-slider-prev {
    left: 0;
}

.njsb-slider-next {
    right: 0;
}

.njsb-slider-button:hover:not(:disabled),
.njsb-slider-button:focus-visible:not(:disabled) {
    background: var(--njsb-live-gold);
    color: var(--njsb-live-dark);
}

.njsb-slider-button:disabled {
    background: var(--njsb-live-disabled);
    color: var(--njsb-live-white);
    cursor: default;
}

.njsb-category-track {
    display: grid;
    grid-auto-columns: minmax(245px, 1fr);
    grid-auto-flow: column;
    gap: 18px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 3px 3px 12px;
    scroll-behavior: smooth;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.njsb-category-track::-webkit-scrollbar {
    display: none;
}

.njsb-category-card {
    position: relative;
    display: block;
    min-width: 0;
    height: 260px;
    overflow: hidden;
    background: var(--njsb-live-deep);
    color: var(--njsb-live-white) !important;
    scroll-snap-align: start;
    text-decoration: none !important;
}

.njsb-category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 180ms ease, filter 180ms ease;
}

.njsb-category-card__title {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    padding: 15px 16px;
    background: var(--njsb-live-deep);
    color: var(--njsb-live-white);
    font-family: "Roboto Slab", serif !important;
    font-size: 20px;
    font-weight: 800 !important;
    line-height: 1.2;
    text-align: center;
}

.njsb-category-card:hover img,
.njsb-category-card:focus-visible img {
    transform: scale(1.035);
    filter: brightness(0.8);
}

.njsb-category-card:hover .njsb-category-card__title,
.njsb-category-card:focus-visible .njsb-category-card__title {
    background: var(--njsb-live-gold);
    color: var(--njsb-live-dark);
}

/* News & announcements */
.njsb-news {
    background: var(--njsb-live-light);
}

.njsb-news-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.njsb-news-feature {
    display: grid;
    grid-template-columns: minmax(180px, 40%) 1fr;
    min-height: 225px;
    overflow: hidden;
    border: 1px solid var(--njsb-live-border);
    background: var(--njsb-live-white);
    color: var(--njsb-live-dark) !important;
    text-decoration: none !important;
}

.njsb-news-feature__image {
    min-height: 225px;
    overflow: hidden;
    background: var(--njsb-live-deep);
}

.njsb-news-feature__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 180ms ease;
}

.njsb-news-feature__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
}

.njsb-news-feature h3 {
    margin: 0 0 8px;
    color: var(--njsb-live-blue);
    font-size: 24px;
}

.njsb-news-feature p {
    margin: 0 0 16px;
    line-height: 1.5;
}

.njsb-news-feature__content > span {
    color: var(--njsb-live-blue);
    font-family: "Roboto Slab", serif !important;
    font-weight: 800 !important;
}

.njsb-news-feature:hover img,
.njsb-news-feature:focus-visible img {
    transform: scale(1.025);
}

.njsb-latest-news {
    margin-top: 42px;
}

.njsb-latest-news__title {
    margin: 0 0 8px;
    color: var(--njsb-live-dark);
    font-size: 27px;
    text-align: left;
}

.njsb-post-list {
    border-top: 1px solid var(--njsb-live-border);
}

.njsb-post-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 20px;
    align-items: center;
    padding: 22px 0;
    border-bottom: 1px solid var(--njsb-live-border);
}

.njsb-post-card__image {
    display: block;
    width: 112px;
    height: 112px;
    overflow: hidden;
    background: var(--njsb-live-white);
}

.njsb-post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.njsb-post-card__content {
    text-align: left;
}

.njsb-post-card__content time {
    display: block;
    margin-bottom: 5px;
    color: var(--njsb-live-muted);
    font-size: 13px;
}

.njsb-post-card__content h4 {
    margin: 0 0 6px;
    font-size: 20px;
    line-height: 1.3;
}

.njsb-post-card__content h4 a {
    color: var(--njsb-live-blue);
}

.njsb-post-card__content p {
    margin: 0;
    line-height: 1.5;
}

@media (min-width: 1000px) {
    .njsb-category-track {
        grid-auto-columns: calc((100% - 54px) / 4);
    }
}

@media (max-width: 900px) {
    .njsb-image-card-grid,
    .njsb-link-card-grid--three {
        grid-template-columns: 1fr;
    }

    .njsb-image-card {
        min-height: 240px;
    }

    .njsb-link-card {
        min-height: 0;
    }

    .njsb-news-feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .home.wf-hero-page .wf-hero-section {
        min-height: 430px;
    }

    .home.wf-hero-page .wf-hero-section .hero-content {
        width: min(100% - 28px, 1064px);
        margin-bottom: 22px;
    }

    .home .wf-hero-order-count {
        margin-top: -8px;
        margin-bottom: 14px;
        font-size: 15px;
    }

    .njsb-home-section {
        padding: 38px 18px;
    }

    .njsb-offerings {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .njsb-home-title {
        margin-bottom: 22px;
    }

    .njsb-section-heading {
        margin-bottom: 22px;
    }

    .njsb-section-heading p,
    .njsb-slider-heading p {
        font-size: 16px;
    }

    .njsb-image-card {
        min-height: 210px;
    }

    .njsb-link-card {
        padding: 22px;
    }

    .njsb-slider-heading .njsb-home-title {
        margin-bottom: 5px;
    }

    .njsb-category-slider-shell {
        padding: 0 46px;
    }

    .njsb-category-track {
        grid-auto-columns: minmax(78%, 78%);
    }

    .njsb-category-card {
        height: 220px;
    }

    .njsb-news-feature {
        grid-template-columns: 1fr;
    }

    .njsb-news-feature__image {
        min-height: 190px;
        height: 190px;
    }

    .njsb-news-feature__content {
        padding: 20px;
    }

    .njsb-post-card {
        grid-template-columns: 86px 1fr;
        gap: 14px;
        padding: 18px 0;
    }

    .njsb-post-card__image {
        width: 86px;
        height: 86px;
    }

    .njsb-post-card__content p {
        display: none;
    }
}

@media (max-width: 480px) {
    .njsb-category-slider-shell {
        padding: 0 42px;
    }

    .njsb-slider-button {
        width: 40px;
        height: 40px;
    }

    .njsb-category-track {
        grid-auto-columns: 86%;
    }
}
