/*
 Theme Name:   clickvn.comm
 Theme URI:    https://clickvn.com
 Description:  A part of clickvn.com
 Author:       ChiasePremium
 Author URI:   https://clickvn.com
 Template:     generatepress
 Version:      0.1
*/




@import url("../generatepress/style.css");

.post-grid-note-cspr {
    font-size: 13px;
    background: #fff9c4;
    color: #222;
    padding: 10px 16px;
    border-radius: 6px;
    margin-top: 10px;
}

/* Post Grid Styles */
.post-grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.post-grid-header {
    text-align: center;
    margin-bottom: 3rem;
}

.post-grid-title {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    font-weight: bold;
    color: #1a202c;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-grid-description {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: #718096;
    max-width: 62rem;
    margin: 0 auto;
    line-height: 1.6;
}

/* Category Filters */
.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.category-filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    background: white;
    color: #4a5568;
    border-radius: 9999px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.category-filter-btn:hover {
    border-color: #3182ce;
    color: #3182ce;
    transform: translateY(-1px);
}

.category-filter-btn.active {
    background: #3182ce;
    border-color: #3182ce;
    color: white;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.post-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.2s ease;
    transform: translateY(0);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

/* Post Image */
.post-card-image {
    position: relative;
    overflow: hidden;
    height: 12rem;
    flex-shrink: 0;
    background-color: #f7fafc;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

/* Category Badge */
.post-category-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: #3182ce;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    z-index: 2;
    transition: background-color 0.2s ease;
}

.post-category-badge:hover {
    background: #2c5aa0;
    text-decoration: none;
}

/* Warning Message Overlay - FIXED POSITION */
.post-warning-message-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    z-index: 10;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

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

.post-card-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1a202c;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    cursor: pointer;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.post-card-title:hover {
    color: #3182ce;
}

.post-card-excerpt {
    color: #718096;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4.8rem;
}

/* Post Badge Styles */
.post-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0.75rem 0 0 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.post-badge-custom {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.post-badge-default {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

/* Post Warning Message - Simple and Clean */
.post-warning-message {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
    width: 100%;
    display: block;
}

/* Post Meta */
.post-card-meta {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    background-color: #f8fafc;
}

.post-meta-left {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #718096;
}

.post-meta-item a {
    color: #718096;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-meta-item a:hover {
    color: #3182ce;
}

.meta-icon {
    font-size: 0.75rem;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.load-more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.load-more-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modal Styles */
.post-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    backdrop-filter: blur(2px);
}

.post-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.post-modal {
    background: white;
    border-radius: 0.5rem;
    max-width: min(1000px, 90vw);
    width: 100%;
    max-height: 95vh;
    height: 95vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.2s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.post-modal-overlay.active .post-modal {
    transform: scale(1);
}

.post-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000000;
    background: #dc2626;
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
    transition: box-shadow 0.2s ease;
    font-size: 1.75rem;
    color: #ffffff;
}

.post-modal-close:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
    background: #b91c1c;
}

.post-modal-content {
    max-height: 100%;
    height: 100%;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.post-modal-header {
    padding: 3rem 3rem 2rem 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.post-modal-title {
    font-size: clamp(1.5rem, 3vw, 1.875rem);
    font-weight: bold;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.3;
    text-align: center;
}

.post-modal-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    flex-wrap: wrap;
    text-align: center;
}

.meta-latest,
.meta-categories,
.meta-tags {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.meta-separator {
    color: rgba(255, 255, 255, 0.6);
    font-weight: normal;
}

.meta-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
    padding: 5px 5px 5px 5px;
}

.meta-link:hover {
    color: rgba(255, 255, 255, 1);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
}

.post-modal-meta-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    flex-wrap: wrap;
    text-align: center;
    margin-top: 1rem;
    padding-top: 0;
}

.meta-action-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.meta-action-link:hover {
    color: rgba(255, 255, 255, 1);
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.post-modal-body {
    padding: 2rem 3rem 3rem 3rem;
    color: #4a5568;
    line-height: 1.7;
    background: white;
    flex: 1;
}

/* Modal Body Typography */
.post-modal-body h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: bold;
    color: #1a202c;
    margin: 2rem 0 1rem 0;
}

.post-modal-body h3 {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    font-weight: 600;
    color: #2d3748;
    margin: 1.5rem 0 0.75rem 0;
}

.post-modal-body p {
    margin-bottom: 1rem;
}

.post-modal-body ul,
.post-modal-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.post-modal-body li {
    margin-bottom: 0.5rem;
}

.post-modal-body blockquote {
    border-left: 4px solid #3182ce;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #4a5568;
    background-color: #f7fafc;
    padding: 1rem;
    border-radius: 0.25rem;
}

.post-modal-body code {
    background-color: #f7fafc;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.post-modal-body pre {
    background-color: #f7fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.post-modal-body pre code {
    background-color: transparent;
    padding: 0;
}

.post-modal-body a {
    color: #3182ce;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.post-modal-body a:hover {
    color: #2c5aa0;
}

.post-modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Loading and Error States */
.modal-loading,
.modal-error,
.grid-loading,
.grid-error,
.no-posts-found {
    padding: 2rem;
    text-align: center;
    color: #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.modal-error,
.grid-error {
    color: #e53e3e;
}

.modal-loading::after,
.grid-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #3182ce;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .post-modal-overlay {
        padding: 1rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .post-modal {
        max-width: 95vw;
        max-height: 90vh;
        height: 90vh;
    }
    
    .post-modal-header {
        padding: 2rem 2rem 1.5rem 2rem;
    }
    
    .post-modal-body {
        padding: 1.5rem 2rem 2rem 2rem;
    }
    
    .post-modal-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .post-modal-meta-actions {
        flex-direction: row;
        gap: 0.75rem;
        margin-top: 0.75rem;
    }
    
    .meta-action-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.8125rem;
    }
    
    .post-card-image {
        height: 10rem;
    }
    
    .post-modal-close {
        top: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.5rem;
    }
    
    .category-filters {
        gap: 0.5rem;
    }
    
    .category-filter-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .post-grid-container {
        color: #e2e8f0;
    }
    
    .post-card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .post-modal {
        background: #2d3748;
        color: #e2e8f0;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body.modal-open {
    overflow: hidden;
}