/* SLM real photos (photos.php): product page strips/galleries, home Projects & Products links. */

/* ---------- Product pages ---------- */
.slm-photos {
    margin: 2.5rem 0;
}

.slm-photos__title {
    margin: 0 0 1rem;
    color: #3B2A1F;
    font-family: Montserrat, system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
}

.slm-photos__grid {
    display: grid;
    gap: 1rem;
}

.slm-photos--strip .slm-photos__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.slm-photos--grid .slm-photos__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.slm-photos__item {
    margin: 0;
}

.slm-photos__item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    background: #F3E6D6;
}

.slm-photos__item figcaption {
    margin-top: .45rem;
    color: #4A4038;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.35;
}

@media (max-width: 767px) {
    .slm-photos--strip .slm-photos__grid,
    .slm-photos--grid .slm-photos__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .75rem;
    }

    /* Strip of 3 on phones: the third photo spans the row. */
    .slm-photos--strip .slm-photos__item:nth-child(3):last-child {
        grid-column: 1 / -1;
    }

    .slm-photos--strip .slm-photos__item:nth-child(3):last-child img {
        aspect-ratio: 2 / 1;
    }
}

/* ---------- Home: Projects & Products tiles link to their product page ---------- */
.ocf-projects-products__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.ocf-projects-products__link img {
    transition: transform 320ms ease;
}

.ocf-projects-products__link:hover img,
.ocf-projects-products__link:focus-visible img {
    transform: scale(1.04);
}

.ocf-projects-products__link:hover figcaption,
.ocf-projects-products__link:focus-visible figcaption {
    text-decoration: underline;
}

.ocf-projects-products__link:focus-visible {
    outline: 3px solid #B5522F;
    outline-offset: 3px;
    border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
    .ocf-projects-products__link img {
        transition: none;
    }
}
