body {
    font-family: Arial, sans-serif;
}

.three-blocks-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
}

.three-block-widget {
    flex: 1 1 calc(33.333% - 10px);
    box-sizing: border-box;
    max-width: 500px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    position: relative;
}

.image-wrapper {
    position: relative;
    overflow: hidden;
}

.main-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-width: 500px;
    max-height: 368px;
}

.block-content {
    padding: 10px;
    background-color: #fff;
    position: relative;
    z-index: 1;
}

.block-title {
    font-size: 1.4em;
    margin-bottom: 5px;
    color: #282E78;
    font-weight: bold;
}

.block-text {
    font-size: 0.9em;
    color: #000;
}

.three-block-widget::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #000;
    z-index: 0;
}

/* Lightbox Modal Styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    padding-top: 60px; /* Location of the box */
    left: 0;
    top: 100px; /* Push modal down below the header */
    width: 100%; /* Full width */
    height: calc(100% - 100px); /* Full height minus header offset */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.9); /* Black with opacity */
}


        .modal-content {
            margin: auto;
            display: block;
            max-width: 80%;
        }

        .modal-content:hover {
            transform: scale(1.1);
        }

        /* Caption of modal image (title) */
        .modal-caption {
            margin: auto;
            display: block;
            text-align: center;
            color: #ccc;
            padding: 10px 0;
            height: 30px;
        }

        /* Add Animation */
        .modal-content, .modal-caption {
            animation: zoom 0.6s;
        }

        @keyframes zoom {
            from {transform: scale(0)}
            to {transform: scale(1)}
        }

        /* Close button for the modal */
        .close {
            position: absolute;
            top: 15px;
            right: 35px;
            color: #f1f1f1;
            font-size: 40px;
            font-weight: bold;
            transition: 0.3s;
        }

        .close:hover,
        .close:focus {
            color: #bbb;
            text-decoration: none;
            cursor: pointer;
        }