/* =========================
   WHITE PAINTING PORTFOLIO
   Continuous slider + clickable image gallery
   ========================= */
.portfolio-hero {
    background-color: blueviolet;
    color: #fff;
    padding: 20px;
}

.portfolio-section {
    padding: 90px 0 100px;
    background: #fff;
    overflow: hidden;
}

.portfolio-heading {
    max-width: 900px;
    margin: 0 auto 45px;
    text-align: center;
}

.portfolio-heading span {
    color: #777;
    font-weight: 700;
    letter-spacing: 4px;
    font-size: 13px;
}

.portfolio-heading h2 {
    color: #17121F;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 800;
    margin: 10px 0 12px;
}

.portfolio-heading p { display: none; }

.portfolio-color-line {
    width: 72px;
    height: 4px;
    margin: 18px auto 0;
    border-radius: 20px;
    background: #D6A64A;
}

/* The track always moves. There is deliberately no hover-pause behavior. */
.portfolio-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0 auto 90px;
}

.portfolio-track {
    display: flex;
    align-items: center;
    gap: 18px;
    width: max-content;
    animation: portfolioContinuousLoop 85s linear infinite;
    will-change: transform;
}

@keyframes portfolioContinuousLoop {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.portfolio-slide {
    flex: 0 0 clamp(250px, 31vw, 430px);
    height: clamp(220px, 29vw, 360px);
    overflow: hidden;
    border-radius: 16px;
    background: #f3f3f3;
    box-shadow: 0 12px 35px rgba(0,0,0,.10);
}

.portfolio-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    cursor: zoom-in;
    /* No hover animation or scaling. */
}

.portfolio-gallery-heading {
    margin-top: 0;
    margin-bottom: 38px;
}

/* Clean gallery grid: photographs only, with no text overlay. */
.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.portfolio-gallery-item {
    display: block;
    position: relative;
    width: 100%;
    height: 260px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    background: #f3f3f3;
    cursor: zoom-in;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.portfolio-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Full-screen expanded picture viewer */
.portfolio-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: rgba(12, 10, 16, .92);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.portfolio-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.portfolio-lightbox img {
    display: block;
    max-width: min(1200px, 94vw);
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
}

.portfolio-lightbox-close {
    position: absolute;
    top: 12px;
    right: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 46px;
    line-height: 1;
    cursor: pointer;
}

body.portfolio-lightbox-open { overflow: hidden; }

@media (max-width: 991px) {
    .portfolio-section { padding: 70px 0 80px; }
    .portfolio-track { gap: 14px; animation-duration: 70s; }
    .portfolio-slide { flex-basis: 42vw; height: 300px; }
    .portfolio-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .portfolio-gallery-item { height: 230px; }
}

@media (max-width: 576px) {
    .portfolio-section { padding: 55px 0 65px; }
    .portfolio-heading { margin-bottom: 30px; }
    .portfolio-heading h2 { font-size: 38px; }
    .portfolio-heading span { font-size: 11px; letter-spacing: 3px; }
    .portfolio-slider { margin-bottom: 60px; }
    .portfolio-track { 
        gap: 12px;
        animation-duration: 120s;
        will-change: transform;
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    .portfolio-slide { flex-basis: 78vw; height: 245px; border-radius: 12px; }
    .portfolio-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .portfolio-gallery-item { height: 175px; border-radius: 9px; }
    .portfolio-lightbox { padding: 42px 12px; }
    .portfolio-lightbox img { max-width: 96vw; max-height: 82vh; }
    .portfolio-lightbox-close { right: 14px; top: 8px; }
}

/* Respect visitors who request reduced motion, while keeping the standard loop continuous. */
@media (prefers-reduced-motion: reduce) {
    .portfolio-track { animation-duration: 180s; }
}

/* Mobile width/overflow safety fix */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    overflow-x: clip;
}

@supports not (overflow: clip) {
    html,
    body {
        overflow-x: hidden;
    }
}

@media (max-width: 576px) {
    .portfolio-hero,
    .portfolio-section,
    .portfolio-slider,
    .portfolio-gallery {
        width: 100%;
        max-width: 100%;
    }

    .portfolio-section {
        padding-left: 0;
        padding-right: 0;
    }

    .portfolio-section > .container-fluid {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

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