/* 
 * Display Posts Shortcode Styles
 * Beautiful styles for post display templates
 */

/* Base styles for all layouts */
.posts-grid,
.posts-list {
    margin: 2rem 0;
    max-width: var(--max-width);
}

/* Common elements styling */
.post-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.post-title a {
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-meta {
    color: var(--gray-color);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.post-excerpt {
    margin: 0.75rem 0;
    color: var(--dark-color);
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    position: relative;
    padding-right: 1.5rem;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--primary-dark);
}

.read-more:after {
    content: "→";
    position: absolute;
    right: 0;
    top: 0;
    transition: var(--transition);
}

.read-more:hover:after {
    right: -3px;
}

.thumbnail {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.post-thumbnail a {
    display: block;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.post-thumbnail a:hover .thumbnail {
    transform: scale(1.03);
}

.no-posts {
    padding: 2rem;
    text-align: center;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    color: var(--gray-color);
}

/* Grid/Column Layout */
.posts-grid {
    display: grid;
    grid-gap: 2rem;
}

.column-1 {
    grid-template-columns: 1fr;
}

.column-2 {
    grid-template-columns: repeat(2, 1fr);
}

.column-3 {
    grid-template-columns: repeat(3, 1fr);
}

.column-4 {
    grid-template-columns: repeat(4, 1fr);
}

.post-card {
    display: flex;
    flex-direction: column;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 20px -7px rgba(0, 0, 0, 0.15), 0 6px 8px -4px rgba(0, 0, 0, 0.08);
}

.post-card .post-thumbnail {
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    overflow: hidden;
}

.post-card .post-thumbnail a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.post-card .thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card .post-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-card .post-excerpt {
    flex-grow: 1;
}

/* List Layout */
.posts-list {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2.5rem;
}

.post-item {
    display: flex;
    flex-direction: column;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid var(--light-gray);
}

.post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.12), 0 6px 12px -6px rgba(0, 0, 0, 0.05);
}

.post-item .post-thumbnail {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
}

.post-item .thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.post-item:hover .thumbnail {
    transform: scale(1.05);
}

.post-item .post-content {
    padding: 1.75rem;
    flex-grow: 1;
    background-color: var(--light-color);
    display: flex;
    flex-direction: column;
}

.post-item .post-meta {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
}

.post-item .post-date {
    position: relative;
    padding-left: 1.25rem;
}

.post-item .post-date:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0.85rem;
    height: 0.85rem;
    background-color: var(--primary-light);
    opacity: 0.6;
    border-radius: 50%;
}

.post-item .post-title {
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
}

.post-item .post-excerpt {
    margin-bottom: 1rem;
    color: var(--gray-color);
}

.post-item .read-more {
    margin-top: auto;
    padding-top: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .column-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .column-3,
    .column-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .post-item .post-thumbnail {
        height: 220px;
    }
}

@media (max-width: 576px) {
    .column-2,
    .column-3,
    .column-4 {
        grid-template-columns: 1fr;
    }
    
    .post-item .post-thumbnail {
        height: 200px;
    }
} 