/* Company Posts Grid Styles */

.publications-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (max-width: 1200px) {
    .publications-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .publications-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .publications-grid {
        grid-template-columns: 1fr;
    }
}

.publication-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #f9fafb;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.publication-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: #c8102e;
}

.publication-media {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.publication-media img,
.publication-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.publication-media video {
    background: #000;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.publication-card:hover .play-overlay {
    background: rgba(200, 16, 46, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.youtube-thumbnail {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.youtube-icon {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.publication-card:hover .youtube-icon {
    opacity: 1;
    transform: scale(1.1);
}

.publication-text-only {
    padding: 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.publication-text-only p {
    color: #374151;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.publication-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    padding: 1rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.publication-card:hover .publication-overlay {
    opacity: 1;
}

.publication-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.publication-date {
    font-size: 0.75rem;
    opacity: 0.9;
}

.view-more-card {
    background: linear-gradient(135deg, #c8102e 0%, #a00d24 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.view-more-content {
    text-align: center;
    color: white;
    padding: 1rem;
}

.view-more-content svg {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.view-more-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.remaining-count {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
}

.posts-count-badge {
    background: #c8102e;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Post Detail Modal */
.post-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    overflow-y: auto;
}

.post-detail-modal.active {
    display: block;
}

.post-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    min-height: 100vh;
    align-items: start;
}

.post-detail-main {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.post-detail-media {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: #000;
    display: block;
}

.post-detail-content {
    padding: 2rem;
}

.post-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.post-detail-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c8102e, #a00d24);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.post-detail-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.post-detail-info h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.post-detail-info p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.post-detail-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
}

.post-detail-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.post-detail-sidebar {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.interaction-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.interaction-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
}

.interaction-btn:hover {
    background: #f3f4f6;
    border-color: #c8102e;
    color: #c8102e;
}

.interaction-btn.active {
    background: #fee2e2;
    border-color: #c8102e;
    color: #c8102e;
}

.interaction-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.comments-section {
    max-height: 400px;
    overflow-y: auto;
}

.comment-item {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c8102e, #a00d24);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.comment-author {
    font-weight: 600;
    font-size: 0.875rem;
    color: #111827;
}

.comment-date {
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: auto;
}

.comment-content {
    font-size: 0.9375rem;
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

.comment-form {
    margin-top: 1.5rem;
}

.comment-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9375rem;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.comment-input:focus {
    outline: none;
    border-color: #c8102e;
}

.comment-submit {
    margin-top: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: #c8102e;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.comment-submit:hover {
    background: #a00d24;
}

.close-modal {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: #c8102e;
    color: white;
    transform: scale(1.1);
}

.close-modal svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 1024px) {
    .post-detail-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .post-detail-sidebar {
        position: relative;
        top: 0;
        max-height: none;
    }
}


