/* Make entire card clickable */
#list-page .card-link-wrapper,
#recent-posts .card-link-wrapper {
    display: block;
    color: var(--text-color) !important;
    text-decoration: none;
}

#list-page .card-link-wrapper:hover,
#recent-posts .card-link-wrapper:hover {
    text-decoration: none;
    color: var(--text-color) !important;
}

#list-page .card-link-wrapper *,
#recent-posts .card-link-wrapper * {
    color: inherit;
}

#list-page .card-link-wrapper h5,
#recent-posts .card-link-wrapper h5 {
    color: var(--text-color) !important;
}

#list-page .card-link-wrapper .card-text,
#recent-posts .card-link-wrapper .card-text {
    color: var(--text-color) !important;
}

#list-page .card-link-wrapper .post-footer,
#recent-posts .card-link-wrapper .post-footer {
    color: var(--text-color) !important;
}

#list-page .card-link-wrapper .card,
#recent-posts .card-link-wrapper .card {
    cursor: pointer;
    transition: all 0.3s ease-out;
}

#list-page .card-link-wrapper:hover .card,
#recent-posts .card-link-wrapper:hover .card {
    transform: translateY(-7px);
    box-shadow: 0px 12px 64px rgba(15, 80, 100, 0.24);
}

/* Horizontal card layout for posts */
#list-page .card .row {
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
}

#list-page .card .post-image-col {
    padding: 0;
    display: flex;
    align-items: stretch;
    width: 220px;
    flex: 0 0 220px;
}

#list-page .card .post-image-col {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 180px;
}

#list-page .card .card-img-left {
    width: 100%;
    height: 100%;
    min-height: 180px;
    max-height: 180px;
    object-fit: cover;
    border-radius: .75rem 0 0 .75rem;
}

#list-page .card .post-content-col {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

#list-page .card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#list-page .post-footer .btn {
    pointer-events: none;
}

/* Recent Posts section - same styling as list page */
#recent-posts .card {
    background-color: var(--secondary-color) !important;
    box-shadow: 0px 8px 56px rgba(15, 80, 100, 0.16);
    border-radius: .75rem;
    overflow: hidden;
    border: none;
}

#recent-posts .card-link-wrapper h5 {
    color: var(--text-color) !important;
}


#recent-posts .card-text * {
    background-color: var(--secondary-color) !important;
}

#recent-posts .post-footer {
    padding: .5rem 1rem;
    background-color: var(--secondary-color) !important;
    color: var(--text-color) !important;
    border-top: 1px solid rgba(15, 80, 100, 0.16);
    opacity: 0.9;
}

#recent-posts .post-footer .btn {
    background-color: var(--secondary-color) !important;
    color: var(--text-secondary-color) !important;
    border-color: var(--primary-color) !important;
    transition: none;
    pointer-events: none;
}

#recent-posts .card .row {
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
}

#recent-posts .card .post-image-col {
    padding: 0;
    display: flex;
    align-items: stretch;
    width: 220px;
    flex: 0 0 220px;
}

#recent-posts .card .post-image-col {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 180px;
}

#recent-posts .card .card-img-left {
    width: 100%;
    height: 100%;
    min-height: 180px;
    max-height: 180px;
    object-fit: cover;
    border-radius: .75rem 0 0 .75rem;
}

#recent-posts .card .post-content-col {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

#recent-posts .card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--secondary-color) !important;
}

/* Responsive: stack on mobile */
@media (max-width: 767.98px) {
    /* Allow row to wrap on mobile */
    #list-page .card .row,
    #recent-posts .card .row {
        flex-wrap: wrap !important;
    }
    
    #list-page .card .post-image-col,
    #recent-posts .card .post-image-col {
        width: 100%;
        flex: 0 0 100%;
        max-height: 200px;
    }
    
    #list-page .card .post-image-col,
    #recent-posts .card .post-image-col {
        min-height: 200px;
    }
    
    #list-page .card .card-img-left,
    #recent-posts .card .card-img-left {
        border-radius: .75rem .75rem 0 0;
        max-height: 200px;
        min-height: 200px;
    }
    
    /* Ensure content column is visible */
    #list-page .card .post-content-col,
    #recent-posts .card .post-content-col {
        width: 100%;
        flex: 1 1 100%;
    }
    
    /* Add padding to card body on mobile */
    #list-page .card .card-body,
    #recent-posts .card .card-body {
        padding: 1rem !important;
    }
}

