/* Swift Post Grid Styles */
.swift-post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.swift-post-card {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 0;
    transition: all 0.3s ease;
}

.swift-post-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

.swift-post-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.swift-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.swift-post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background-color: rgba(0, 102, 204, 0.85);
    display: flex;
    align-items: flex-end;
    padding: 30px;
    z-index: 2;
    transition: all 0.4s ease;
}

.swift-post-card:hover .swift-post-overlay {
    height: 100%;
    background-color: rgba(0, 51, 102, 0.95);
}

.swift-post-content {
    width: 100%;
}

.swift-post-title {
    color: #ffffff;
    font-size: 32px;
    font-weight: 400;
    line-height: 1.3;
    margin: 0 0 15px 0;
    transition: all 0.3s ease;
}

.swift-post-excerpt {
    color: #ffffff;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    transform: translateY(20px);
}

.swift-post-card:hover .swift-post-excerpt {
    opacity: 1;
    max-height: 200px;
    transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .swift-post-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .swift-post-card {
        height: 350px;
    }

    .swift-post-title {
        font-size: 28px;
    }

    .swift-post-excerpt {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .swift-post-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .swift-post-card {
        height: 300px;
    }

    .swift-post-overlay {
        padding: 20px;
    }

    .swift-post-title {
        font-size: 24px;
    }

    .swift-post-excerpt {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .swift-post-card {
        height: 250px;
    }

    .swift-post-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .swift-post-overlay {
        padding: 15px;
    }
}

/* Animation for smooth transitions */
.swift-post-card {
    transform: translateZ(0);
    backface-visibility: hidden;
}

.swift-post-card:hover {
    transform: translateY(-5px);
}

/* Ensure proper stacking context */
.swift-post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 0;
}