#trip-gallery {
    width: 100%;
    margin: 30px 0;
}

.trip-gallery-status {
    margin: 0 0 12px;
    font-size: 0.95rem;
    opacity: 0.7;
}

.trip-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.trip-photo-tile {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 0;
    overflow: hidden;
    background: #eee;
    cursor: pointer;
}

.trip-photo-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 180ms ease;
}

.trip-photo-tile:hover img {
    transform: scale(1.03);
}

.trip-photo-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 9px 9px;
    color: white;
    text-align: left;
    font-size: 0.86rem;
    line-height: 1.25;
    background: linear-gradient(
        transparent,
        rgba(0,0,0,0.78)
    );
}

.trip-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.93);
    padding: 40px;
}

.trip-lightbox.is-open {
    display: flex;
}

.trip-lightbox-content {
    max-width: min(1200px, 92vw);
    max-height: 92vh;
    text-align: center;
}

.trip-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    margin: 0 auto;
}

.trip-lightbox-caption {
    max-width: 900px;
    margin: 14px auto 4px;
    color: white;
    font-size: 1.05rem;
    line-height: 1.4;
}

.trip-lightbox-count {
    color: #bbb;
    font-size: 0.85rem;
}

.trip-lightbox-close,
.trip-lightbox-prev,
.trip-lightbox-next {
    position: absolute;
    border: 0;
    background: transparent;
    color: white;
    cursor: pointer;
    font-family: Arial, sans-serif;
}

.trip-lightbox-close {
    top: 8px;
    right: 18px;
    font-size: 42px;
}

.trip-lightbox-prev,
.trip-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    line-height: 1;
    padding: 20px;
}

.trip-lightbox-prev {
    left: 5px;
}

.trip-lightbox-next {
    right: 5px;
}

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

@media (max-width: 800px) {
    .trip-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
    }

    .trip-photo-caption {
        font-size: 0.72rem;
        padding: 24px 6px 6px;
    }

    .trip-lightbox {
        padding: 12px;
    }

    .trip-lightbox-prev,
    .trip-lightbox-next {
        font-size: 45px;
    }

    .trip-lightbox-image {
        max-height: 72vh;
    }
}

@media (max-width: 520px) {
    .trip-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trip-lightbox-prev,
    .trip-lightbox-next {
        padding: 10px;
    }
}
