/* ============================================================
   SM FREIGHT — HOMEPAGE
   Loaded on top of styles/style.css by template-home.php
   ============================================================ */

.trust-actions,
.about-actions { margin-top: 30px; }

/* Framework cards: give the H&T card room for its wider letter mark */
.home-page .framework-letter { font-size: 44px; }
.home-page .framework-card:last-child .framework-letter { font-size: 34px; }

/* Services sit on white; the number watermark needs a touch more contrast */
.home-page .services { background: var(--white); }
.home-page .service-number { color: #eef2f7; }

/* -------------------- GALLERY -------------------- */
.gallery { background: var(--light-bg); }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    /* Source photos are a mix of portrait and landscape; a fixed ratio plus
       object-fit keeps the grid even without cropping decisions per image. */
    aspect-ratio: 4 / 3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 39, 66, .88) 0%, rgba(2, 39, 66, .35) 42%, transparent 70%);
    transition: opacity .3s ease;
}

.gallery-item figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 22px 22px 20px;
    color: var(--white);
}

.gallery-item figcaption strong {
    font-family: var(--font-head);
    display: block;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.2px;
}

.gallery-item figcaption span {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, .78);
    margin-top: 5px;
}

.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover::after { opacity: .82; }

/* Process steps get a connecting rule on wide screens */
@media screen and (min-width: 1101px) {
    .process-grid::before {
        content: '';
        position: absolute;
        top: 62px;
        left: 12%;
        width: 76%;
        height: 2px;
        background: repeating-linear-gradient(90deg, var(--border) 0 8px, transparent 8px 16px);
        z-index: 0;
    }

    .process-step { z-index: 1; }
}

/* Hero panel scrolls internally if the viewport is short */
@media screen and (min-width: 981px) {
    .hero-panel {
        max-height: 620px;
        overflow-y: auto;
    }
}

@media screen and (max-width: 980px) {
    .home-page .hero-panel { padding: 28px 24px; }
    .home-page .hero-stats { margin-top: 36px; }

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

@media screen and (max-width: 700px) {
    .home-page .hero-panel-item { padding: 11px 0; }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gallery-item { aspect-ratio: 16 / 10; }
    .home-page .hero-panel-letter {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}
