/* =========================================================
   Photo Grid + Lightbox  –  Rambungan Marine
   ========================================================= */

/* --- Photo Grid --- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 18px;
    margin-bottom: 30px;
}

.photo-item {
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f4f8;
    border: 1px solid #d0dce8;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    position: relative;
}

.photo-item:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 14px rgba(10, 69, 149, 0.2);
}

.photo-item img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.photo-item .photo-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 44px;
    height: 44px;
    background: rgba(10, 69, 149, 0.75);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease;
    pointer-events: none;
}

.photo-item:hover .photo-zoom-icon {
    transform: translate(-50%, -50%) scale(1);
}

.photo-zoom-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.photo-caption {
    padding: 6px 8px;
    font-size: 12px;
    color: #555;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #fff;
}

/* --- Lightbox Overlay --- */
.rm-lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.93);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.rm-lightbox.active {
    display: flex;
}

.rm-lb-content {
    position: relative;
    text-align: center;
    max-width: 92vw;
}

.rm-lb-img {
    max-width: 88vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 30px rgba(0,0,0,0.6);
}

.rm-lb-caption {
    color: #fff;
    font-size: 14px;
    margin-top: 12px;
    font-weight: 500;
}

.rm-lb-counter {
    color: #aaa;
    font-size: 12px;
    margin-top: 5px;
}

/* Nav buttons */
.rm-lb-close {
    position: fixed;
    top: 14px;
    right: 18px;
    color: #fff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    background: none;
    border: none;
    opacity: 0.85;
    z-index: 1000000;
    padding: 0;
}

.rm-lb-close:hover { opacity: 1; }

.rm-lb-prev,
.rm-lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.45);
    border: none;
    padding: 14px 18px;
    border-radius: 4px;
    z-index: 1000000;
    transition: background 0.15s;
}

.rm-lb-prev { left: 8px; }
.rm-lb-next { right: 8px; }

.rm-lb-prev:hover,
.rm-lb-next:hover { background: rgba(0, 0, 0, 0.75); }

.rm-lb-prev:disabled,
.rm-lb-next:disabled { opacity: 0.3; cursor: default; }

/* --- WhatsApp Float Button --- */
.wa-float {
    position: fixed;
    bottom: 26px;
    right: 26px;
    width: 58px;
    height: 58px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.3);
    z-index: 99998;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-float:hover {
    transform: scale(1.12);
    box-shadow: 3px 3px 18px rgba(0, 0, 0, 0.4);
    text-decoration: none;
}

.wa-float svg {
    width: 34px;
    height: 34px;
    fill: #fff;
    display: block;
}

/* --- Mobile responsive --- */
@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .photo-item img { height: 130px; }

    .rm-lb-img {
        max-width: 95vw;
        max-height: 70vh;
    }

    .rm-lb-prev { left: 4px; font-size: 26px; padding: 10px 13px; }
    .rm-lb-next { right: 4px; font-size: 26px; padding: 10px 13px; }
    .rm-lb-close { font-size: 32px; top: 10px; right: 12px; }

    .wa-float { bottom: 20px; right: 18px; width: 52px; height: 52px; }
    .wa-float svg { width: 30px; height: 30px; }
}
