p {
    text-align: left;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

main h2 {
    text-align: center;
}

main h3 {
    margin: 0;
}

main span {
    font-size: 80%;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    align-items: stretch;
    max-width: 1280px;
    box-sizing: content-box;
    width: 100%;
    margin-top: 40px;
}

.grid a {
    border: 1px solid #4f4f4f;
    color: white;
    text-decoration: none;
    transition-duration: .2s;
    border-radius: 10px;
}

.grid a img {
    min-width: 320px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.grid a:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 10px 5px #0055ff;
}

.grid a:nth-child(2):hover {
    box-shadow: 0 0 10px 5px #00ffff;
}

.image-container {
    position: relative;
    border-bottom: 1px solid #ddd;
    height: 250px;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.content-container {
    padding: 20px;
}

.post-details {
    margin-bottom: 10px;
    color: #00ddff;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
}

.content-container h6 {
    color: white;
}

.excerpt {
    margin-bottom: 20px;
}

.text-button {
    display: flex;
    flex-flow: column;
    align-items: self-end;
    position: relative;
    font-weight: 500;
    text-decoration: none;
    font-size: 16px;
    line-height: 16px;
    z-index: 1;
}

.text-button::after {
    display: block;
    z-index: -1;
    content: "";
    position: relative;
    width: calc(100% + 10px);
    height: 6px;
    margin-top: 2px;
    bottom: 0;
    right: -10px;
    background: #2F8AFF;
    transform-origin: bottom right;
    transition: width 0.2s ease-out;
}

.grid a:nth-child(2) .text-button::after {
    background: #00ffff;
}

.text-button:hover::after {
    width: 6px;
}

.button-container {
    margin-top: auto;
    display: flex;
    gap: 20px;
    align-items: center;
    color: white;
}

.post-details span {
    color: white;
}