/**
 * Posts Grid Styles
 *
 * @package Travelnbc-Extras\Assets
 */

 #tnbc-posts-grid .tnbc-posts {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

#tnbc-posts-grid .tnbc-post {
    display: flex;
    flex-direction: column;
    text-align: left;
    align-items: flex-start;
    margin-bottom: 3em;
    width: 33.33%;
    padding: 1em;
}

#tnbc-posts-grid .tnbc-post-image {
    margin-bottom: 1em;
    position: relative;
    background-color: grey;
    background-image: repeating-linear-gradient(45deg, #eee, #eee 10px, #ddd 10px, #ddd 20px);
    width: 100%;
}

#tnbc-posts-grid .tnbc-post-image-fixed-ratio {
    padding-bottom: 100%;
    background-size: cover;
    background-position: center center;
}

#tnbc-posts-grid .tnbc-post-image-date-overlay {
    position: absolute;
    top: 1em;
    right: 1em;
    font-size: .7em;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: .7em 1em;
    font-weight: bold;
    -webkit-font-smoothing: antialiased;
}

#tnbc-posts-grid .tnbc-post-title {
    font-size: 1.5em;
    line-height: 1.2em;
}

#tnbc-posts-grid .tnbc-post-content {
    margin-top: 1em;
    margin-bottom: 1em;
}

#tnbc-posts-grid a.tnbc-read-more {
    display: inline-block;
    margin-top: auto;
}

#tnbc-posts-grid .tnbc-read-more {
    font-size: 0.8em;
    color: white;
    background-color: #004b55;
    text-decoration: none;
    padding: 0.75em 1.5em;
    line-height: 1;
    border-radius: 3px;
    display: inline-block;
}

/* Lazy loading styles */
.tnbc-load-more-container {
    text-align: center;
    margin: 2rem 0;
}

.tnbc-load-more-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    color: white;
    background-color: #004b55;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.tnbc-load-more-btn:hover {
    background-color: #003840;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 75, 85, 0.3);
}

.tnbc-load-more-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 75, 85, 0.3);
}

.tnbc-lazy-load-indicator {
    text-align: center;
    padding: 2rem;
    margin: 2rem 0;
}

.tnbc-lazy-load-indicator p {
    color: #666;
    font-size: 1rem;
    margin-top: 1rem;
}

.tnbc-loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #004b55;
    border-radius: 50%;
    animation: tnbc-spin 1s linear infinite;
}

@keyframes tnbc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tnbc-lazy-load-end {
    text-align: center;
    padding: 2rem;
    margin: 2rem 0;
    border-top: 1px solid #e0e0e0;
}

.tnbc-lazy-load-end p {
    color: #999;
    font-size: 0.9rem;
    font-style: italic;
    margin: 0;
}

/* Responsive styles */
@media (max-width: 1024px) {
    #tnbc-posts-grid .tnbc-post {
        width: 50%;
    }
}

@media (max-width: 768px) {
    #tnbc-posts-grid .tnbc-post {
        width: 100%;
    }
}