/* Outer container ensuring full viewport width */
.ccb-mason-container {
    display: flex;
    flex-wrap: wrap;            /* Allow items to wrap to the next line */
    width: 90vw;                /* Set to 90% of the viewport width */
    max-width: 100%;            /* Ensure it doesn't exceed the screen width */
    box-sizing: border-box;     /* Include padding and borders in width */
    padding: 0;                 /* Remove padding to avoid overflow */
    margin: 0 auto;             /* Center the container */
    overflow-x: hidden;         /* Prevent horizontal scrolling */
    background-color: white !important; /* Force white background */
    color: black !important;    /* Force black text */
}

/* Masonry items */
.ccb-mason-item {
    background-color: #f9f9f9; /* Very light grey background */
    border: 1px solid #d3d3d3; /* Slightly darker border */
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.1); /* Oblique tight shadow */
    margin: 10px;              /* Updated margin for a gap of 20px */
    padding: 15px;
    flex: 1 1 calc(33.333% - 20px); /* Three items per row, adjusted calculation */
    box-sizing: border-box;     /* Include padding and border in width */
    min-width: 0;               /* Prevent items from exceeding the container */
    border-radius: 8px;         /* Rounded corners */
    transition: all 0.3s ease;  /* Smooth transitions on hover */
}

/* Shadow increase on hover */
.ccb-mason-item:hover {
    box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.2); /* More pronounced shadow on hover */
}

/* Media query for medium screens */
@media (max-width: 1100px) {
    .ccb-mason-item {
        flex: 1 1 calc(50% - 20px); /* Two items per row on medium screens */
    }
}

/* Media query for small screens */
@media (max-width: 768px) {
    .ccb-mason-item {
        flex: 1 1 calc(100% - 20px); /* One item per row on small screens */
        margin: 10px 0;  /* Adjust margin for better spacing on small screens */
    }

    .ccb-mason-container {
        width: 100%; /* Set container width to 100% for small screens */
    }
}

/* Reset body and html to ensure no overflow */
html, body {
    margin: 0;                 /* Remove default margin */
    padding: 0;                /* Remove default padding */
    width: 100%;               /* Ensure full width */
    overflow-x: hidden;        /* Prevent horizontal scrolling */
}

/* Additional styles to ensure proper width management */
.ccb-mason-container::after {
    content: "";               /* Clearfix */
    display: table;
    clear: both;               /* Clear floats */
}

/* Prevent overflow by adjusting the width of the outer container */
.ccb-mason-container {
    margin-left: 0;           /* Remove left margin */
    margin-right: 0;          /* Remove right margin */
}
