/* Post Cards Grid */
.post-cards-wrapper {
    /* padding: 40px 0; */
    /* max-width: 1200px; */
    /* margin: 0 auto; */
}

.post-cards-grid {
    /* display: grid; */
    /* grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); */
    /* gap: 24px; */
    /* padding: 0 20px; */
}

.post-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
	height: 100%;
	    display: flex;
    flex-direction: column;
}

.post-card:hover {
/* transform: translateY(-4px); */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Card update animation */
.post-card.card-updated {
    animation: cardPulse 1s ease;
}

@keyframes cardPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); box-shadow: 0 12px 32px rgba(102, 126, 234, 0.3); }
}

.post-card-image {
    position: relative;
    width: 100%;
    /* height: 200px; */
    /* overflow: hidden; */
    /* background: #f3f4f6; */
	height: 314px;
}
.post-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
	height: 314px;
}
.post-card:hover .post-card-image img {
    transform: scale(1.02);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.post-card-content {
    /* padding: 20px; */
	padding: 16px 16px 10px;
	display: flex;
    flex-direction: column;
    height: 100%;
    row-gap: 0;
    justify-content: space-between;
}



.post-card-title {
    /* font-size: 18px; */
    /* font-weight: 700; */
    /* color: #2B343B; */
    /* margin: 0 0 12px 0; */
	 font-size: 16px; 
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 14px;
    color: #6b7280;
}
.meta-likes,
.meta-comments {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-likes svg,
.meta-comments svg {
    stroke: #9ca3af;
}

/* Custom Modal Styles (No Bootstrap) */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    overflow: hidden;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 9998;
    display: none;
}

.modal-backdrop.show {
    display: block;
    opacity: 1;
}

body.modal-open {
    overflow: hidden;
}

.modal-dialog {
    position: relative;
    width: 90%;
    max-width: 1100px;
    margin: 20px auto;
    z-index: 9999;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    max-height: 90vh;
}

.modal-body {
    padding: 0;
    width: 100%;
}
#postModal .modal-dialog {
    max-width: 1100px;
}

#postModal .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#postModal .modal-body {
    padding: 0;
}
.row {
    display: flex;
    margin: 0;
}

.g-0 {
    gap: 0;
}

.col-lg-7 {
    flex: 0 0 58.33%;
    max-width: 58.33%;
}

.col-lg-5 {
    flex: 0 0 41.67%;
    max-width: 41.67%;
}

.btn-close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close-modal:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.btn-close-modal svg {
    stroke: white;
}
/* Modal Image Section */
.modal-image-section {
    background: #1a1a1a;
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-carousel {
    width: 100%;
    height: 100%;
}

.modal-slider {
    width: 100%;
    height: 600px;
}
.slick-track
{
    display: flex !important;
}

.slick-slide
{
    /* height: inherit !important; */
}
.slide-item {
    height: 600px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.slide-item img {
    max-width: 100%;
    max-height: 100%;
    height: 600px;
    object-fit: contain;
}

/* Custom Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
    position: relative;
}

.spinner {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-image-placeholder-modal {
    width: 100%;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 18px;
    font-weight: 600;
}

/* Carousel Navigation */


.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgb(138 198 70);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-nav:hover {
    background: #7ab03c;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-nav.prev-slide {
    left: 20px;
}

.carousel-nav.next-slide {
    right: 20px;
}

.carousel-nav svg {
    /* stroke: #2B343B; */
    stroke: #fff;
}

/* Slick dots customization */

.modal-slider .slick-dots {
    bottom: 38px;
}

.modal-slider .slick-dots li button:before {
    color: white;
    background: white;
    font-size: 10px;
    opacity: 0.5;
}

.modal-slider .slick-dots li.slick-active button:before {
    opacity: 1;
    color: white;
}

/* Modal Content Section */
.modal-content-section {
    display: flex;
    flex-direction: column;
    max-height: 600px;
    overflow: hidden;
}

.modal-header-info {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.post-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.author-badge {
    /* display: inline-block; */
    /* padding: 4px 12px; */
    /* background: #84cc16; */
    /* color: white; */
    /* border-radius: 20px; */
    /* font-size: 11px; */
    /* font-weight: 700; */
    /* letter-spacing: 0.5px; */
}

.post-date-modal {
    /* font-size: 13px; */
    /* color: #6b7280; */
}
.post-title-modal {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.4;
}

.post-content-modal {
    padding: 16px 24px;
    font-size: 14px;
    /* color: #4b5563; */
    color: #2B343B;
    line-height: 1.6;
    border-bottom: 1px solid #e5e7eb;
}

.modal-stats {
    display: flex;
    gap: 24px;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    /* color: var(--color-light-grey); */
    color: #79797A;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-item svg {
    fill: #9ca3af;
    transition: all 0.2s ease;
}

/* Make likes clickable */
.stat-item-likes {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 6px 10px;
    border-radius: 20px;
    margin: -6px -10px;
    user-select: none;
}

.stat-item-likes:hover {
    background: #f3f4f6;
}

.stat-item-likes:active {
    transform: scale(0.95);
}

.stat-item-likes svg {
    stroke: currentColor !important;
    stroke-width: 2 !important;
}

.stat-item-likes:hover svg {
    stroke: #ef4444 !important;
    transform: scale(1.1);
}

.stat-item-likes.liked {
    color: #ef4444;
}

.stat-item-likes.liked svg {
    fill: #ef4444 !important;
    stroke: #ef4444 !important;
}

.stat-item-likes.liking {
    opacity: 0.6;
    pointer-events: none;
}

/* Pulse animation */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.stat-item-likes.pulse {
    animation: pulse 0.6s ease;
}

/* Modal Comments Section */
.modal-comments-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.modal-comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
}

.modal-comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.modal-comment-content {
    flex: 1;
    min-width: 0;
}

.modal-comment-header {
    background: #f3f4f6;
    padding: 10px 14px;
    border-radius: 18px;
}

.modal-comment-author {
    font-weight: 700;
    font-size: 13px;
    color: #111827;
    display: block;
    margin-bottom: 4px;
}

.modal-comment-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    word-wrap: break-word;
}

.modal-comment-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 6px;
    padding-left: 14px;
}

.modal-comment-date {
    font-size: 12px;
    color: #79797A;
    /* height: 14px; */
}
.modal-like-heart {
    position: absolute;
    right: 0;
    top: 0;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-like-heart svg {
    stroke: #9ca3af;
    transition: all 0.2s ease;
}

.modal-like-heart:hover svg {
    stroke: #ef4444;
    transform: scale(1.1);
}

.modal-like-heart.liked svg {
    fill: #ef4444;
    stroke: #ef4444;
}

.modal-like-heart.pulse {
    animation: pulse 0.6s ease;
}

.no-comments-modal {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* Modal Comment Form */
.modal-comment-form {
    border-top: 1px solid #e5e7eb;
    padding: 16px 24px;
    background: #f9fafb;
}

.comment-form-wrapper-modal {
    display: flex;
    gap: 12px;
    align-items: center;
}

.comment-avatar-modal {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-input-modal {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 24px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.comment-input-modal:focus {
    outline: none;
    border-color: #3b82f6;
}

.comment-input-modal::placeholder {
    color: #9ca3af;
}

.submit-comment-modal {
 padding: 12px 25px;
    background: #8AC646;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
    display: inline-block;
    height: 38px;
	    font-size: 15px;
    font-style: normal;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.56px;
}

.submit-comment-modal:hover {
    /* background: #2563eb; */
    background: #7ab03c;
    /* transform: scale(1.05); */
}


.submit-comment-modal:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 12px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.error-message {
    padding: 40px;
    text-align: center;
    color: #ef4444;
}

/* Responsive Design */
@media (max-width: 991px) {
    .modal-dialog {
        max-width: 95%;
        margin: 1rem auto;
    }
    
    .modal-image-section {
        min-height: 400px;
    }
    
    .modal-slider,
    .slide-item,
    .no-image-placeholder-modal {
        height: 400px;
    }
    
    .modal-content {
        flex-direction: column;
    }
    
    .col-lg-7,
    .col-lg-5 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .post-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
    
    .modal-content-section {
        max-height: none;
    }
    
    .modal-slider,
    .slide-item,
    .no-image-placeholder-modal {
        height: 300px;
    }
    
    .btn-close-modal {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
    }
    
    .carousel-nav.prev-slide {
        left: 10px;
    }
    
    .carousel-nav.next-slide {
        right: 10px;
    }
}

/* Scrollbar styling for comments list */
.modal-comments-list::-webkit-scrollbar {
    width: 6px;
}

.modal-comments-list::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.modal-comments-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.modal-comments-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}