.factory-hero {
    position: relative;
    min-height: 405px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: url('../images/about_building.jpg') center / cover no-repeat;
}

.factory-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 30, 66, .94), rgba(0, 43, 92, .65) 45%, rgba(0, 43, 92, .1) 82%);
}

.factory-hero-content {
    position: relative;
    z-index: 1;
}

.factory-crumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 23px;
    font-size: .84rem;
    font-weight: 600;
}

.factory-crumb i {
    font-size: .62rem;
}

.factory-hero h1 {
    margin: 0;
    font-size: clamp(2.6rem, 5vw, 4rem);
    letter-spacing: -.05em;
}

.factory-hero-content>span {
    display: block;
    width: 50px;
    height: 3px;
    margin: 22px 0;
    background: var(--accent);
}

.factory-hero p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.75;
}

.factory-gallery {
    padding: 52px 0 78px;
    background: #fff;
}

.factory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 35px 24px;
}

.factory-card {
    display: block;
    width: 100%;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    text-align: center;
}

.factory-card img {
    width: 100%;
    height: 205px;
    border-radius: 9px;
    object-fit: cover;
    /* box-shadow: 0 6px 18px rgba(0, 43, 92, .12); */
    transition: transform .35s ease, filter .35s ease;
}

.factory-card span {
    display: block;
    margin-top: 13px;
    color: #17243c;
    font-size: .94rem;
    font-weight: 800;
}

.factory-card:hover img {
    filter: brightness(.78);
    transform: scale(1.05);
}

.factory-card:hover span {
    color: var(--accent);
}

.certification-card img {
    object-fit: contain;
    padding: 12px;
    /* background: #f8fafc; */
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 58px 86px;
    opacity: 0;
    visibility: hidden;
    background: rgba(0, 16, 38, .88);
    transition: opacity .25s, visibility .25s;
}

.image-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.image-lightbox figure {
    display: flex;
    max-width: min(1160px, 100%);
    max-height: 100%;
    flex-direction: column;
    align-items: center;
    margin: 0;
    transform: scale(.96);
    transition: transform .25s;
}

.image-lightbox.is-open figure {
    transform: scale(1);
}

.image-lightbox figure img {
    max-width: 100%;
    max-height: calc(100vh - 135px);
    border-radius: 6px;
    object-fit: contain;
    box-shadow: 0 20px 55px rgba(0, 0, 0, .45);
}

.image-lightbox figcaption {
    margin-top: 13px;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.lightbox-close,
.lightbox-arrow {
    position: absolute;
    z-index: 1;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .55);
    color: #fff;
    background: rgba(0, 43, 92, .42);
    transition: background .2s, transform .2s;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
    background: var(--accent);
    transform: scale(1.08);
}

.lightbox-close {
    top: 24px;
    right: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.05rem;
}

.lightbox-arrow {
    top: 50%;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    transform: translateY(-50%);
}

.lightbox-arrow:hover {
    transform: translateY(-50%) scale(1.08);
}

.lightbox-prev {
    left: 25px;
}

.lightbox-next {
    right: 25px;
}

body.lightbox-open {
    overflow: hidden;
}

@media (max-width: 1000px) {
    .factory-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .factory-card img {
        height: 185px;
    }
}

@media (max-width: 768px) {
    .factory-hero {
        min-height: 320px;
        background-position: 60% center;
    }

    .factory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px 14px;
    }

    .factory-card img {
        height: 145px;
    }

    .factory-card span {
        margin-top: 9px;
        font-size: .78rem;
    }

    .image-lightbox {
        padding: 55px 18px 75px;
    }

    .lightbox-arrow {
        top: auto;
        bottom: 18px;
        transform: none;
    }

    .lightbox-arrow:hover {
        transform: scale(1.08);
    }

    .lightbox-prev {
        left: calc(50% - 54px);
    }

    .lightbox-next {
        right: calc(50% - 54px);
    }
}
