/* Latest Posts Grid - Frontend Styles with Beautiful Heading */
:root {
    --lpg-card-bg: #ffffff;
    --lpg-text-primary: #1e1e1e;
    --lpg-text-secondary: #666666;
    --lpg-accent: #0066cc;
    --lpg-accent-light: #e6f0ff;
    --lpg-border: #eaeaea;
    --lpg-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --lpg-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --lpg-transition: all 0.3s ease;
}

/* ===== Beautiful Section Header Styles ===== */
.lpg-section-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.lpg-title-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.lpg-subtitle {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--lpg-accent);
    background: var(--lpg-accent-light);
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 15px;
}

.lpg-section-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px 0;
    color: var(--lpg-text-primary);
    position: relative;
    display: inline-block;
}

/* Title Decoration */
.lpg-title-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.lpg-line {
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--lpg-accent), transparent);
}

.lpg-dot {
    width: 8px;
    height: 8px;
    background: var(--lpg-accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.lpg-title-description {
    font-size: 18px;
    color: var(--lpg-text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== Grid Container ===== */
.lpg-grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.lpg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* ===== Post Card Styles ===== */
.lpg-post-card {
    background: var(--lpg-card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--lpg-shadow);
    transition: var(--lpg-transition);
    height: 100%;
    border: 1px solid var(--lpg-border);
    position: relative;
}

.lpg-post-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--lpg-hover-shadow);
}

.lpg-post-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* Image Wrapper */
.lpg-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 65%;
    overflow: hidden;
    background: #f5f5f5;
}

.lpg-post-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.lpg-post-card:hover .lpg-post-image {
    transform: scale(1.08);
}

/* Category Badge */
.lpg-post-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 102, 204, 0.9);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* No Image Fallback */
.lpg-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 48px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Post Content */
.lpg-post-content {
    padding: 20px;
}

.lpg-post-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 12px 0;
    color: var(--lpg-text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Post Meta */
.lpg-post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--lpg-text-secondary);
}

.lpg-post-date,
.lpg-post-author {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lpg-post-date svg,
.lpg-post-author svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Post Excerpt */
.lpg-post-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--lpg-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
}

/* Read More Link */
.lpg-read-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--lpg-accent);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.lpg-post-card:hover .lpg-read-more {
    gap: 10px;
}

/* No Posts Message */
.lpg-no-posts {
    text-align: center;
    padding: 60px;
    background: #f9f9f9;
    border-radius: 12px;
    color: var(--lpg-text-secondary);
    font-size: 16px;
}

/* ===== Responsive Design ===== */

/* Tablet - 2 columns */
@media (max-width: 992px) {
    .lpg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .lpg-section-title {
        font-size: 36px;
    }
}

/* Tablet Small */
@media (max-width: 768px) {
    .lpg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .lpg-section-title {
        font-size: 32px;
    }
    
    .lpg-post-title {
        font-size: 18px;
    }
    
    .lpg-title-description {
        font-size: 16px;
    }
}

/* Mobile - 1 column */
@media (max-width: 576px) {
    .lpg-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .lpg-grid-container {
        padding: 0 15px 30px;
    }
    
    .lpg-section-title {
        font-size: 28px;
    }
    
    .lpg-post-content {
        padding: 15px;
    }
    
    .lpg-subtitle {
        font-size: 12px;
    }
}

/* Small Mobile */
@media (max-width: 400px) {
    .lpg-section-title {
        font-size: 24px;
    }
    
    .lpg-title-description {
        font-size: 14px;
    }
}

/* ===== Accessibility ===== */
.lpg-post-link:focus {
    outline: 2px solid var(--lpg-accent);
    outline-offset: 2px;
}

/* ===== Dark Mode Support ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --lpg-card-bg: #2d2d2d;
        --lpg-text-primary: #ffffff;
        --lpg-text-secondary: #b0b0b0;
        --lpg-border: #404040;
        --lpg-accent-light: #1a3a5c;
    }
    
    .lpg-no-image {
        background: linear-gradient(135deg, #4a4a4a 0%, #2d2d2d 100%);
    }
}

/* ===== Animation Classes ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lpg-post-card {
    animation: fadeInUp 0.6s ease forwards;
}

.lpg-post-card:nth-child(2) { animation-delay: 0.1s; }
.lpg-post-card:nth-child(3) { animation-delay: 0.2s; }
.lpg-post-card:nth-child(4) { animation-delay: 0.3s; }
.lpg-post-card:nth-child(5) { animation-delay: 0.4s; }
.lpg-post-card:nth-child(6) { animation-delay: 0.5s; }
.lpg-post-card:nth-child(7) { animation-delay: 0.6s; }
.lpg-post-card:nth-child(8) { animation-delay: 0.7s; }
.lpg-post-card:nth-child(9) { animation-delay: 0.8s; }
.lpg-post-card:nth-child(10) { animation-delay: 0.9s; }
.lpg-post-card:nth-child(11) { animation-delay: 1.0s; }
.lpg-post-card:nth-child(12) { animation-delay: 1.1s; }