/*
Theme Name: Ottawa Fence Company
Template: Divi
Description: A custom theme for Ottawa Fence Company.
Author: Rep Jump
Author URI: https://repjump.com
Version: 1.0.0
*/

/* === Masonry Layout === */
.modern-masonry .et_pb_gallery_items {
    display: block !important;
    column-count: 3;
    column-gap: 16px; /* tighter horizontal gap */
}

.modern-masonry .et_pb_gallery_item {
    float: none !important;
    width: 100% !important;
    display: inline-block;
    margin: 0 0 16px; /* tighter vertical gap */
    break-inside: avoid;
    padding: 0 !important;
}

/* Remove any forced heights */
.modern-masonry .et_pb_gallery_image,
.modern-masonry .et_pb_gallery_item_inner {
    height: auto !important;
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}

/* Image styling */
.modern-masonry img {
    width: 100%;
    height: auto !important;
    display: block;
    border-radius: 14px;
    transition: transform .4s ease;
}

/* Soft modern shadow */
.modern-masonry .et_pb_gallery_item {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform .25s ease, box-shadow .25s ease;
}

.modern-masonry .et_pb_gallery_item:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

/* === FIX OVERLAY === */
.modern-masonry .et_overlay {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 14px;
    background: rgba(0,0,0,0.35);
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s ease;
}

/* Show overlay on hover */
.modern-masonry .et_pb_gallery_item:hover .et_overlay {
    opacity: 1;
}

/* Style the + icon */
.modern-masonry .et_overlay:before {
    font-size: 28px;
    color: #fff;
}

/* Smooth image zoom */
.modern-masonry .et_pb_gallery_item:hover img {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 980px) {
    .modern-masonry .et_pb_gallery_items {
        column-count: 2;
    }
}

@media (max-width: 767px) {
    .modern-masonry .et_pb_gallery_items {
        column-count: 1;
    }
}

.mfp-title {
    display: none !important;
}