.image-text-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2em;
    padding-top: 1.5em;
    padding-left: auto;
    padding-right: auto;
    width: 70%;
    align-items: stretch;
    column-gap: 4rem;
}

.grid-item {
    display: flex;
    flex-direction: column;
    text-align: left;
    height: 100%;
    text-decoration: none;
}

.grid-item:hover h2,
.grid-item:hover h4,
.grid-item:hover p {
    animation: pulse 1s;
}

.grid-item h2 {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 0.5em;
}

.grid-item h4 {
    width: 100%;
    margin-top: 30px;
}

.grid-item p {
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 1em;
    max-width: 100%;
    margin-top: 0px;
}

.grid-item img {
    max-width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 1024px) {
    .image-text-grid {
        width: 80%;
        column-gap: 3rem;
    }
}

@media (max-width: 768px) {
    .image-text-grid {
        grid-template-columns: 1fr;
        width: 85%;
        gap: 2rem;
        column-gap: 2rem;
    }

    .grid-item h4 {
        margin-top: 20px;
        font-size: 1.4rem;
    }

    .grid-item p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .image-text-grid {
        width: 90%;
        gap: 1.5rem;
    }

    .grid-item h4 {
        font-size: 1.2rem;
        margin-top: 15px;
    }

    .grid-item p {
        font-size: 0.9rem;
    }
}
