/* Post Page Specific Styles */
/* This file contains styles specifically for the post detail page */

/* Post page grid cards - ensure proper separation from other pages */
.post-page .post-card-grid {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 200px;
}

.post-page .post-card-grid:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.post-page .post-card-grid-link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.post-page .post-card-grid-image-container {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: linear-gradient(135deg, #4A90E2 0%, #1E3A8A 100%);
}

.post-page .post-card-grid-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-page .post-card-grid-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4A90E2 0%, #1E3A8A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem;
}

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

.post-page .post-card-grid-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    min-height: 60px;
    position: relative;
    z-index: 2;
    background: #fff;
}

.post-page .post-card-grid-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.5rem 0;
    color: #1e3a8a !important;
    display: block !important;
    visibility: visible !important;
}

.post-page .post-card-grid-meta {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280 !important;
    margin-top: auto;
    visibility: visible !important;
}

.post-page .post-card-grid-meta small {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Ensure proper spacing for post page sections */
.post-page .mt-5 {
    margin-top: 3rem !important;
}

.post-page .mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Responsive video embeds */
.post-page .media {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 1.5rem 0;
}

.post-page .media iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* More from Category Section */
.post-page .mt-5 {
    margin-top: 2rem !important; /* Reduce gap from hero section */
}

.post-page .d-flex.justify-content-between.align-items-baseline h3 {
    margin-bottom: 0 !important;
    font-size: 1.75rem;
    font-weight: 600;
}

.post-page .d-flex.justify-content-between.align-items-baseline .btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

/* Category Section Alignment (for Index page) */
.category-header.d-flex.justify-content-between.align-items-center h2 {
    margin-bottom: 0 !important;
    font-size: 2rem;
    font-weight: 700;
}

.category-header.d-flex.justify-content-between.align-items-center .btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Tablet adjustments for More from Category section */
@media (max-width: 992px) {
    .post-page .d-flex.justify-content-between.align-items-baseline {
        flex-wrap: nowrap;
        gap: 0.75rem;
    }
    
    .post-page .d-flex.justify-content-between.align-items-baseline h3 {
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 1.5rem;
    }
    
    .post-page .d-flex.justify-content-between.align-items-baseline .btn {
        flex-shrink: 0;
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
    }
    
    /* Category Section Tablet adjustments */
    .category-header.d-flex.justify-content-between.align-items-center {
        flex-wrap: nowrap;
        gap: 0.75rem;
    }
    
    .category-header.d-flex.justify-content-between.align-items-center h2 {
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 1.5rem;
    }
    
    .category-header.d-flex.justify-content-between.align-items-center .btn {
        flex-shrink: 0;
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
    }
}

/* Post page specific responsive adjustments */
@media (max-width: 768px) {
    .post-page .post-card-grid-content {
        padding: 0.5rem;
    }
    
    .post-page .post-card-grid-title {
        font-size: 0.9rem;
    }
    
    .post-page .post-card-grid-meta {
        font-size: 0.7rem;
    }
    
    .post-page .media {
        margin: 1rem 0;
    }
    
    /* Mobile adjustments for More from Category section */
    .post-page .d-flex.justify-content-between.align-items-baseline {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }
    
    .post-page .d-flex.justify-content-between.align-items-baseline h3 {
        font-size: 1.25rem;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .post-page .d-flex.justify-content-between.align-items-baseline .btn {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        flex-shrink: 0;
    }
    
    /* Category Section Mobile adjustments */
    .category-header.d-flex.justify-content-between.align-items-center {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }
    
    .category-header.d-flex.justify-content-between.align-items-center h2 {
        font-size: 1.25rem;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .category-header.d-flex.justify-content-between.align-items-center .btn {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        flex-shrink: 0;
    }
}
