/* NISSYO FACTORY / standalone responsive styling */
:root {
    --nf-blue: #00a5d5;
    --nf-blue-dark: #087f9f;
    --nf-button: #C6E8F4;
    --nf-button-hover: #00A5D5;
    --nf-button-text: #17334b;
    --nf-ink: #17334b;
    --nf-muted: #6c7f8e;
    --nf-stroke: #d9e8ee;
    --nf-light: #f3f8fb;
    --nf-width: 1080px
}

*,
*::before,
*::after {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px
}

body.nf-page {
    margin: 0;
    color: var(--nf-ink);
    background: #fff;
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 15px;
    line-height: 1.8
}

.nf-page a {
    color: inherit;
    text-decoration: none
}

.nf-page img {
    max-width: 100%;
    height: auto
}

.nf-page button,
.nf-page a {
    -webkit-tap-highlight-color: transparent
}

.nf-page a:focus-visible,
.nf-page button:focus-visible {
    outline: 3px solid #fcba48;
    outline-offset: 4px
}

.nf-skip {
    position: absolute;
    left: -9999px;
    top: 12px;
    padding: 8px 14px;
    background: #fff;
    color: #003b59;
    z-index: 999
}

.nf-skip:focus {
    left: 12px
}

/* Header: matched to current NISSYO turquoise, navigation kept intact */
.nf-header-top {
    background: var(--nf-blue);
    color: white
}

.nf-header-inner {
    max-width: 1080px;
    margin: auto;
    min-height: 115px;
    padding: 19px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px
}

.nf-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0
}

.nf-emblem {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex: 0 0 auto
}

.nf-brand-words {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0
}

.nf-brand-logo {
    display: block;
    width: 238px;
    height: auto;
    max-height: 47px;
    object-fit: contain;
    object-position: left
}

.nf-brand-tagline {
    font-size: 10px;
    line-height: 1.45;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, .94)
}

.nf-header-actions {
    display: flex;
    align-items: center;
    gap: 19px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700
}

.nf-sdgs img {
    display: block;
    width: 63px;
    height: auto;
    object-fit: contain
}

.nf-header-simple,
.nf-header-contact {
    transition: opacity .2s ease
}

.nf-header-simple:hover,
.nf-header-contact:hover {
    opacity: .7
}

.nf-header-contact span {
    margin-left: 3px
}

.nf-main-nav {
    border-bottom: 1px solid #d6dfe4;
    background: white
}

.nf-nav-inner {
    max-width: 1080px;
    margin: auto;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 0 20px;
    min-height: 60px
}

.nf-nav-inner a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 12px 11px;
    white-space: nowrap;
    color: var(--nf-blue-dark);
    font-size: 12px;
    font-weight: 650;
    border-bottom: 3px solid transparent;
    transition: color .2s, border-color .2s
}

.nf-nav-inner a:hover {
    color: #004966;
    border-color: var(--nf-blue)
}

.nf-breadcrumb {
    max-width: var(--nf-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px;
    color: #778c9b;
    font-size: 12px
}

.nf-breadcrumb a {
    color: var(--nf-blue-dark)
}

.nf-breadcrumb span:last-child {
    color: #41576c
}

/* Hero */
.nf-hero {
    max-width: var(--nf-width);
    margin: 0 auto;
    min-height: 445px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    align-items: center;
    background: #e6f5fb
}

.nf-hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: 50% 48%;
    z-index: -2;
    filter: brightness(1.3) saturate(0.045em) contrast(1)
}

.nf-hero-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        90deg,
        rgba(106, 182, 230, 0.3) 0%,
        rgba(100, 183, 231, 0.12) 45%,
        rgba(126, 193, 226, 0) 100%
    );
}

.nf-hero-content {
    padding: 45px 64px 55px;
    color: #fff;
    max-width: 745px;
    text-shadow: 0 2px 17px rgba(0, 25, 42, .48)
}

.nf-hero-eyebrow {
    font-family: Arial, sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .24em
}

.nf-eyebrow-line {
    width: 29px;
    height: 2px;
    background: #54d0ef
}

.nf-hero h1 {
    margin: 17px 0 17px;
    font-size: clamp(29px, 4vw, 47px);
    line-height: 1.42;
    letter-spacing: .045em;
    font-weight: 800;
    text-wrap: balance
}

.nf-hero-content p {
    margin: 0 0 27px;
    font-size: 15px;
    font-weight: 600;
    opacity: .98;
    letter-spacing: .025em
}

.nf-hero-pipe {
    opacity: .6;
    padding: 0 7px
}

.nf-hero-button {
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    padding: 14px 21px;
    color: var(--nf-button-text) !important;
    background: var(--nf-button);
    border: 1px solid #b0dbe9;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    text-shadow: none;
    box-shadow: 0 6px 18px rgba(0, 50, 80, .12);
    transition: transform .22s, box-shadow .22s, background .22s, color .22s, border-color .22s
}

.nf-hero-button:hover {
    transform: translateY(-3px);
    background: var(--nf-button-hover);
    border-color: var(--nf-button-hover);
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(0, 110, 145, .25)
}

.nf-hero-button span {
    display: inline-grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #ffffff9c;
    font-size: 17px;
    transition: transform .2s, background .2s
}

.nf-hero-button:hover span {
    background: #ffffff35;
    transform: translate(2px, -2px)
}

.nf-hero-index {
    position: absolute;
    right: 25px;
    bottom: 23px;
    color: #fff;
    font-size: 10px;
    letter-spacing: .15em;
    font-weight: 700;
    background: rgba(8, 45, 63, .40);
    padding: 7px 11px;
    border-radius: 99px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .3)
}

.nf-hero-index span {
    margin-left: 12px
}

/* Intro */
.nf-intro {
    text-align: center;
    margin: 73px 20px 31px
}

.nf-intro-overline {
    font-family: Arial, sans-serif;
    letter-spacing: .22em;
    color: var(--nf-blue-dark);
    font-size: 11px;
    font-weight: 750
}

.nf-intro h2 {
    font-size: clamp(23px, 3vw, 31px);
    line-height: 1.45;
    letter-spacing: .04em;
    margin: 11px 0 18px
}

.nf-intro p {
    color: var(--nf-muted);
    font-size: 15px;
    line-height: 2;
    margin: 0
}

.nf-scene-nav {
    max-width: var(--nf-width);
    margin: 0 auto 48px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px
}

.nf-scene-nav a {
    min-height: 153px;
    padding: 21px 22px 21px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid #b4dbe9;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #f3fbfe 0%, var(--nf-button) 100%);
    box-shadow: 0 6px 18px rgba(22, 108, 138, .07);
    transition: transform .23s, background .23s, color .23s, border-color .23s, box-shadow .23s
}

.nf-scene-nav a::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: #00a5d5;
    transform: scaleX(.31);
    transform-origin: left;
    transition: transform .23s
}

.nf-scene-nav a:hover {
    background: #00a5d5;
    color: #fff;
    transform: translateY(-5px);
    border-color: #00a5d5;
    box-shadow: 0 17px 30px rgba(0, 111, 148, .17)
}

.nf-scene-nav a:hover::before {
    background: #fff;
    transform: scaleX(1)
}

.nf-scene-top {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 49px;
    font-family: Arial, sans-serif
}

.nf-scene-no {
    font-size: 38px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.055em;
    color: var(--nf-blue-dark);
    transition: color .2s
}

.nf-scene-en {
    max-width: 118px;
    line-height: 1.3;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    color: #527e91;
    transition: color .2s
}

.nf-scene-nav a:hover .nf-scene-no,
.nf-scene-nav a:hover .nf-scene-en {
    color: #fff
}

.nf-scene-nav a:active {
    transform: translateY(-1px)
}

.nf-scene-nav strong {
    font-size: 17px;
    line-height: 1.5;
    letter-spacing: .01em;
    color: var(--nf-ink);
    padding-right: 27px;
    transition: color .2s
}

.nf-scene-nav a:hover strong {
    color: #fff
}

.nf-scene-arrow {
    position: absolute;
    right: 17px;
    bottom: 18px;
    color: var(--nf-blue-dark);
    font-size: 19px;
    line-height: 1;
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #ffffff9c;
    transition: transform .23s, background .23s, color .23s
}

.nf-scene-nav a:hover .nf-scene-arrow {
    color: #fff;
    background: #ffffff38;
    transform: translate(2px, -2px)
}

/* Sections */
.nf-content {
    max-width: var(--nf-width);
    margin: 0 auto 100px;
    padding: 0
}

.nf-section {
    padding: 65px 0 76px;
    border-bottom: 1px solid #e3edf1
}

.nf-section:last-child {
    border-bottom: 0;
    padding-bottom: 0
}

.nf-section-heading {
    max-width: 800px;
    margin-bottom: 29px
}

.nf-section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    font-family: Arial, sans-serif;
    letter-spacing: .13em;
    font-size: 11px;
    font-weight: 800;
    color: var(--nf-blue-dark);
    margin-bottom: 17px;
    padding: 6px 16px 6px 6px;
    background: #eaf8fd;
    border: 1px solid #d0e9f3;
    border-radius: 999px
}

.nf-section-no {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    color: var(--nf-ink);
    background: var(--nf-button);
    border-radius: 50%;
    font-size: 15px;
    letter-spacing: normal
}

.nf-section h2 {
    margin: 0 0 13px;
    font-size: clamp(23px, 2.8vw, 29px);
    line-height: 1.5;
    font-weight: 800;
    letter-spacing: .028em
}

.nf-section-heading>p {
    margin: 0;
    color: #667c8b;
    font-size: 14px;
    line-height: 2
}

.nf-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px
}

.nf-gallery--workplace {
    grid-template-columns: repeat(6, minmax(0, 1fr))
}

.nf-gallery--workplace .nf-photo {
    grid-column: span 2
}

.nf-gallery--workplace .nf-photo:nth-child(1),
.nf-gallery--workplace .nf-photo:nth-child(2) {
    grid-column: span 3
}

.nf-gallery--meeting {
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

.nf-photo {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    isolation: isolate;
    background: #d9edf4;
    aspect-ratio: 1.56;
    box-shadow: 0 6px 22px rgba(24, 75, 94, .06)
}

.nf-gallery--meeting .nf-photo {
    aspect-ratio: 1.24
}

.nf-photo img {
    display: block;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    filter: brightness(1.08) saturate(1.05);
    transition: transform .36s ease, filter .36s ease
}

.nf-photo:hover img {
    transform: scale(1.04);
    filter: brightness(1.13) saturate(1.08)
}

.nf-photo::after {
    content: "";
    position: absolute;
    inset: 58% 0 0;
    background: linear-gradient(transparent, rgba(10, 29, 43, .46));
    pointer-events: none
}

.nf-photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    z-index: 1;
    padding: 14px 19px;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: .025em
}

.nf-photo-zoom {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border: 1px solid #ffffff80;
    border-radius: 100%;
    font-size: 17px;
    line-height: 1
}

/* Contact block */
.nf-cta {
    background: linear-gradient(115deg, #f1fbfe, #d6f1fa);
    color: var(--nf-ink);
    padding: 61px 24px;
    border-top: 1px solid #c6e8f4
}

.nf-cta-inner {
    max-width: var(--nf-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px
}

.nf-cta-copy>span {
    font-family: Arial, sans-serif;
    letter-spacing: .2em;
    font-weight: 750;
    font-size: 11px;
    color: var(--nf-blue-dark)
}

.nf-cta h2 {
    font-size: clamp(22px, 3.5vw, 34px);
    line-height: 1.48;
    margin: 12px 0 15px;
    letter-spacing: .03em
}

.nf-cta p {
    font-size: 14px;
    margin: 0;
    color: #557082
}

.nf-cta-button {
    padding: 17px 23px;
    min-width: 270px;
    background: var(--nf-button);
    border: 1px solid #abd5e6;
    border-radius: 10px;
    color: var(--nf-button-text) !important;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    font-size: 14px;
    box-shadow: 0 8px 22px rgba(11, 107, 144, .08);
    transition: transform .22s, background .22s, box-shadow .22s, color .22s, border-color .22s
}

.nf-cta-button:hover {
    transform: translateY(-3px);
    background: var(--nf-button-hover);
    border-color: var(--nf-button-hover);
    color: #fff !important;
    box-shadow: 0 12px 26px rgba(0, 113, 156, .18)
}

.nf-footer {
    background: #12344b;
    color: #e1ecf1
}

.nf-footer-inner {
    max-width: var(--nf-width);
    padding: 40px 0 32px;
    margin: 0 auto;
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 30px
}

.nf-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 5px
}

.nf-footer-brand strong {
    font-size: 20px;
    letter-spacing: .08em
}

.nf-footer-brand span {
    font-size: 11px;
    color: #b4cdd8
}

.nf-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 12px
}

.nf-footer-links a:hover {
    text-decoration: underline
}

.nf-footer-bottom {
    text-align: center;
    border-top: 1px solid #ffffff20;
    padding: 15px 15px 20px;
    color: #a7c3d1;
    font-family: Arial, sans-serif;
    font-size: 11px
}

/* Lightbox */
.nf-lightbox {
    border: 0;
    background: transparent;
    padding: 52px 54px 36px;
    color: #fff;
    max-width: min(94vw, 1220px);
    max-height: 94vh;
    overflow: visible
}

.nf-lightbox::backdrop {
    background: rgba(1, 18, 30, .92)
}

.nf-lightbox-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px
}

.nf-lightbox-center img {
    display: block;
    max-width: min(78vw, 1040px);
    max-height: 76vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    background: #274352
}

.nf-lightbox-caption {
    font-size: 14px;
    text-align: center;
    color: #fff
}

.nf-lightbox button {
    border: 0;
    background: #ffffff20;
    color: #fff;
    border-radius: 50%;
    font-family: Arial, sans-serif;
    cursor: pointer;
    position: absolute;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    font-size: 29px;
    line-height: 1
}

.nf-lightbox button:hover {
    background: #ffffff55
}

.nf-lightbox-close {
    right: 16px;
    top: 4px
}

.nf-lightbox-prev {
    top: 50%;
    left: 0;
    transform: translateY(-50%)
}

.nf-lightbox-next {
    top: 50%;
    right: 0;
    transform: translateY(-50%)
}

@media(max-width:1115px) {

    .nf-breadcrumb,
    .nf-hero,
    .nf-content,
    .nf-scene-nav {
        margin-left: 22px;
        margin-right: 22px
    }

    .nf-scene-nav {
        margin-bottom: 30px
    }

    .nf-section {
        padding: 55px 0
    }

    .nf-footer-inner {
        padding-left: 22px;
        padding-right: 22px
    }
}

@media(max-width:820px) {
    .nf-header-inner {
        min-height: 98px
    }

    .nf-header-simple {
        display: none
    }

    .nf-brand-logo {
        width: 190px
    }

    .nf-brand-tagline {
        font-size: 9px
    }

    .nf-nav-inner {
        overflow-x: auto;
        justify-content: flex-start;
        gap: 1px;
        scrollbar-width: thin
    }

    .nf-nav-inner a {
        flex: 0 0 auto;
        padding: 10px 15px
    }

    .nf-hero {
        min-height: 420px
    }

    .nf-hero-content {
        padding: 40px 35px
    }

    .nf-scene-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px
    }

    .nf-gallery {
        gap: 14px
    }

    .nf-photo-caption {
        font-size: 12px;
        padding: 10px 13px
    }

    .nf-gallery--meeting {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .nf-cta-inner {
        align-items: flex-start;
        flex-direction: column
    }

    .nf-footer-inner {
        flex-direction: column
    }
}

@media(max-width:620px) {
    .nf-header-inner {
        min-height: 86px;
        padding: 13px 16px;
        gap: 10px
    }

    .nf-brand {
        gap: 7px
    }

    .nf-emblem {
        width: 34px;
        height: 34px
    }

    .nf-brand-logo {
        width: 151px;
        max-height: 37px
    }

    .nf-brand-tagline {
        display: none
    }

    .nf-header-actions {
        gap: 8px
    }

    .nf-sdgs {
        display: none
    }

    .nf-header-contact {
        font-size: 11px;
        padding: 7px 9px;
        border: 1px solid #ffffff66;
        border-radius: 5px
    }

    .nf-main-nav .nf-nav-inner {
        min-height: 49px;
        padding: 0 9px
    }

    .nf-nav-inner a {
        font-size: 11px;
        padding: 10px 13px
    }

    .nf-breadcrumb {
        padding: 13px 17px;
        margin: 0
    }

    .nf-hero {
        margin: 0 12px;
        border-radius: 11px;
        min-height: 428px;
        align-items: end
    }

    .nf-hero-photo {
        object-position: 66% 50%
    }

  .nf-hero-shade {
    background: linear-gradient(
        0deg,
        rgba(5,30,45,.48),
        rgba(5,30,45,.12) 68%,
        transparent
    );
}

    .nf-hero-content {
        padding: 35px 23px 48px
    }

    .nf-hero h1 {
        font-size: 29px;
        margin: 17px 0 11px
    }

    .nf-hero-content p {
        font-size: 12px;
        margin: 0 0 24px
    }

    .nf-hero-button {
        padding: 10px 17px;
        font-size: 12px
    }

    .nf-hero-index {
        font-size: 9px;
        right: 15px;
        bottom: 11px
    }

    .nf-intro {
        margin: 58px 20px 29px
    }

    .nf-intro h2 {
        font-size: 23px
    }

    .nf-intro p {
        font-size: 13px;
        line-height: 1.9
    }

    .nf-wide-only {
        display: none
    }

    .nf-scene-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 0 12px 18px
    }

    .nf-scene-nav a {
        min-height: 133px;
        padding: 16px 13px;
        border-radius: 11px;
        gap: 11px
    }

    .nf-scene-top {
        gap: 8px;
        min-height: 36px
    }

    .nf-scene-no {
        font-size: 28px
    }

    .nf-scene-en {
        font-size: 8px;
        letter-spacing: .075em
    }

    .nf-scene-nav strong {
        font-size: 13px;
        line-height: 1.4;
        padding-right: 22px
    }

    .nf-scene-arrow {
        right: 9px;
        bottom: 10px;
        width: 25px;
        height: 25px;
        font-size: 15px
    }

    .nf-content {
        margin: 0 15px 63px
    }

    .nf-section {
        padding: 49px 0 56px
    }

    .nf-section h2 {
        font-size: 22px
    }

    .nf-section-heading {
        margin-bottom: 20px
    }

    .nf-section-heading>p {
        font-size: 13px
    }

    .nf-gallery,
    .nf-gallery--meeting {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px
    }

    .nf-gallery--workplace {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .nf-gallery--workplace .nf-photo,
    .nf-gallery--workplace .nf-photo:nth-child(1),
    .nf-gallery--workplace .nf-photo:nth-child(2) {
        grid-column: span 1
    }

    .nf-gallery--workplace .nf-photo:nth-child(1) {
        grid-column: span 2;
        aspect-ratio: 1.65
    }

    .nf-gallery--meeting .nf-photo:last-child {
        grid-column: span 2;
        aspect-ratio: 1.65
    }

    .nf-photo {
        aspect-ratio: 1.2;
        border-radius: 7px
    }

    .nf-photo-caption {
        font-size: 11px;
        padding: 9px 9px
    }

    .nf-photo-zoom {
        width: 23px;
        height: 23px;
        font-size: 14px
    }

    .nf-cta {
        padding: 48px 19px
    }

    .nf-cta h2 {
        font-size: 24px
    }

    .nf-cta p {
        font-size: 12px
    }

    .nf-cta-button {
        width: 100%;
        min-width: 0;
        font-size: 13px
    }

    .nf-footer-inner {
        padding: 37px 22px 29px
    }

    .nf-lightbox {
        padding: 40px 10px 45px;
        max-width: 100vw;
        max-height: 100vh
    }

    .nf-lightbox-center img {
        max-width: 92vw;
        max-height: 72vh
    }

    .nf-lightbox-prev {
        left: 0;
        top: calc(100% - 25px)
    }

    .nf-lightbox-next {
        right: 0;
        top: calc(100% - 25px)
    }

    .nf-lightbox-close {
        right: 8px;
        top: 0
    }
}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto
    }

    .nf-page *,
    .nf-page *::before,
    .nf-page *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important
    }
}

/* Factory switcher automatically appears when multiple factories are published */
.nf-factory-switch {
    max-width: var(--nf-width);
    margin: 54px auto 0;
    padding: 0
}

.nf-switch-heading {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 16px
}

.nf-switch-heading small {
    color: var(--nf-blue-dark);
    font-family: Arial, sans-serif;
    font-size: 10px;
    letter-spacing: .2em;
    font-weight: 750
}

.nf-switch-heading h2 {
    font-size: 20px;
    line-height: 1.5;
    margin: 0;
    color: var(--nf-ink)
}

.nf-factory-switch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 13px
}

.nf-factory-choice {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 94px;
    gap: 18px;
    overflow: hidden;
    border: 1px solid #b5dce9;
    border-radius: 11px;
    background: linear-gradient(135deg, #f7fcfe, var(--nf-button));
    transition: transform .18s, border-color .18s, box-shadow .18s, background .18s
}

.nf-factory-choice:hover {
    transform: translateY(-3px);
    border-color: var(--nf-button-hover);
    background: #d8f4fc;
    box-shadow: 0 10px 26px #0b789025
}

.nf-factory-choice.is-active {
    border: 2px solid var(--nf-blue);
    background: #eaf8fc
}

.nf-factory-choice>img {
    width: 115px;
    height: 94px !important;
    object-fit: cover;
    display: block
}

.nf-factory-choice>span {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0
}

.nf-factory-choice>span small {
    font-size: 10px;
    color: #547b8c;
    font-family: Arial, sans-serif;
    letter-spacing: .1em
}

.nf-factory-choice>span strong {
    font-size: 16px;
    letter-spacing: .02em
}

.nf-factory-choice>b {
    margin-left: auto;
    padding-right: 17px;
    font-size: 18px;
    color: var(--nf-blue-dark)
}

@media(max-width:1115px) {
    .nf-factory-switch {
        margin-left: 22px;
        margin-right: 22px
    }
}

@media(max-width:620px) {
    .nf-factory-switch {
        margin: 37px 15px 0
    }

    .nf-switch-heading {
        gap: 10px
    }

    .nf-factory-switch-grid {
        grid-template-columns: 1fr
    }

    .nf-factory-choice {
        min-height: 80px
    }

    .nf-factory-choice>img {
        width: 99px;
        height: 80px !important
    }

    .nf-factory-choice>span strong {
        font-size: 14px
    }

    .nf-scene-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

/* WORKPLACE - bố cục ảnh PC */
@media (min-width: 621px) {
  .nf-gallery--workplace {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows:
      clamp(240px, 28vw, 370px)
      clamp(170px, 18vw, 235px);
  }

  .nf-gallery--workplace .nf-photo {
    grid-column: span 2;
    aspect-ratio: auto;
    height: 100%;
  }

  /* Ảnh thanh gỗ - nhỏ bên trái */
  .nf-gallery--workplace .nf-photo:nth-child(1) {
    grid-column: span 2;
  }

  /* Ảnh nhà ăn - lớn bên phải */
  .nf-gallery--workplace .nf-photo:nth-child(2) {
    grid-column: span 4;
  }
}

/* WORKPLACE - bố cục ảnh điện thoại */
@media (max-width: 620px) {
  .nf-gallery--workplace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .nf-gallery--workplace .nf-photo,
  .nf-gallery--workplace .nf-photo:nth-child(1),
  .nf-gallery--workplace .nf-photo:nth-child(2) {
    grid-column: span 1;
    aspect-ratio: 1.2;
    height: auto;
  }

  /* Ảnh nhà ăn thứ hai rộng cả hàng */
  .nf-gallery--workplace .nf-photo:nth-child(3) {
    grid-column: span 2;
    aspect-ratio: 1.6;
  }
}

/* Bo lop phu den tren cac anh nho */
.nf-gallery .nf-photo::after {
    display: none !important;
}

/* Giu kieu chu thich cu tren anh */
.nf-gallery .nf-photo-caption {
    background: transparent;
    color: #FFFFFF;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.65);
}

/* Tang do sang anh khi bam phong to */
.nf-lightbox-center img {
    filter: brightness(1.18) saturate(1.08);
    transition: filter 0.3s ease;
}

/* ================================
   BACK TO TOP - NISSYO
   ================================ */

.nf-back-to-top {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 100;
    width: 62px;
    height: 62px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;

    background: #C6E8F4;
    color: #17617D;
    border: 1px solid #ABD5E6;
    border-radius: 16px;

    box-shadow: 0 5px 20px rgba(0, 75, 110, 0.16);
    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease,
        background 0.25s ease,
        color 0.25s ease;
}

/* Hien thi khi cuon xuong */
.nf-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Mui ten */
.nf-back-arrow {
    font-size: 27px;
    line-height: 1;
    font-weight: 500;
}

/* Chu TOP */
.nf-back-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

/* Hieu ung hover */
.nf-back-to-top:hover {
    background: #00A5D5;
    color: #FFFFFF;
    border-color: #00A5D5;
    transform: translateY(-4px);
    box-shadow: 0 9px 26px rgba(0, 125, 165, 0.25);
}

/* Dien thoai */
@media (max-width: 620px) {
    .nf-back-to-top {
        width: 52px;
        height: 52px;
        right: 14px;
        bottom: calc(16px + env(safe-area-inset-bottom));
        border-radius: 13px;
    }

    .nf-back-arrow {
        font-size: 23px;
    }

    .nf-back-label {
        font-size: 9px;
    }
}

/* Tieu de FACTORY - dong bo NISSYO */
.nf-page-heading {
    max-width: 1080px;
    margin: 34px auto 30px;
    padding: 16px 0 26px;
    border-top: 3px solid #00A5D5;
    border-bottom: 3px solid #00A5D5;
    background: #FFFFFF;
}

.nf-page-heading-en {
    margin: 0;
    color: #00A5D5;
    font-family: Futura, "Century Gothic", Arial, sans-serif;
    font-size: 60px;
    font-weight: 300;
    line-height: 1.2;
}

.nf-page-heading-ja {
    margin: 8px 0 0;
    color: #111111;
    font-size: 16px;
}

/* Dien thoai */
@media (max-width: 1120px) {
    .nf-page-heading {
        margin-left: 20px;
        margin-right: 20px;
    }
}

@media (max-width: 620px) {
    .nf-page-heading-en {
        font-size: 42px;
    }

    .nf-page-heading {
        margin-top: 22px;
        padding: 12px 0 18px;
    }
}
