/* ========================================
   Post Article Page - Modern Design
   ======================================== */

/* إلغاء الأنيميشن من صفحة المقالة */
.post-article,
.post-article.post {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

/* Article Container */
.post-article {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    min-width: 0;
}

@media (max-width: 767px) {
    .post-article {
        border-radius: 16px;
    }
}

/* Article Header */
.post-article .heading {
    padding: 50px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 3px solid #3498db;
}

.post-article .heading h1 {
    font-size: 2.5rem;
}

@media (max-width: 767px) {
    .post-article .heading {
        padding: 25px 18px;
    }
    
    .post-article .heading h1 {
        font-size: 1.75rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .post-article .heading {
        padding: 30px 20px;
    }
    
    .post-article .heading h1 {
        font-size: 2rem;
    }
}

.post-article .entry-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: #2c3e50;
    margin: 0;
    line-height: 1.3;
    font-weight: 700;
    text-align: right;
}

/* Article Meta Info */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 20px 50px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: #6c757d;
}

@media (max-width: 767px) {
    .article-meta {
        padding: 15px 18px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .article-meta {
        padding: 20px;
    }
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-meta-item i {
    color: #3498db;
    font-size: 1rem;
}

/* Article Featured Image */
.post-article .postcontent > img:first-of-type {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

/* Article Content */
.post-article .postcontent {
    padding: 0;
}

.post-article .postcontent [itemprop="articleBody"] {
    display: block;
    padding: 50px;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

@media (max-width: 767px) {
    .post-article .postcontent [itemprop="articleBody"] {
        padding: 25px 18px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .post-article .postcontent [itemprop="articleBody"] {
        padding: 30px 20px;
    }
}

.post-article .postcontent [itemprop="articleBody"] p {
    margin-bottom: 1rem;
    text-align: justify;
    line-height: 1.8;
}

.post-article .postcontent [itemprop="articleBody"] p:first-child {
    margin-top: 0;
}

.post-article .postcontent [itemprop="articleBody"] p:last-child {
    margin-bottom: 0;
}

.post-article .postcontent [itemprop="articleBody"] h2,
.post-article .postcontent [itemprop="articleBody"] h3,
.post-article .postcontent [itemprop="articleBody"] h4 {
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.post-article .postcontent [itemprop="articleBody"] h2 {
    font-size: 1.75rem;
    border-right: 4px solid #3498db;
    padding-right: 1rem;
}

.post-article .postcontent [itemprop="articleBody"] h3 {
    font-size: 1.5rem;
}

.post-article .postcontent [itemprop="articleBody"] h4 {
    font-size: 1.25rem;
}

.post-article .postcontent [itemprop="articleBody"] ul,
.post-article .postcontent [itemprop="articleBody"] ol {
    margin: 1rem 0;
    padding-right: 2rem;
}

.post-article .postcontent [itemprop="articleBody"] li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.post-article .postcontent [itemprop="articleBody"] blockquote {
    background: #f8f9fa;
    border-right: 4px solid #3498db;
    padding: 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #555;
    border-radius: 4px;
    line-height: 1.6;
}

.post-article .postcontent [itemprop="articleBody"] a {
    color: #3498db;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.post-article .postcontent [itemprop="articleBody"] a:hover {
    color: #e74c3c;
}

/* Article Images Grid */
.article-images-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 50px;
    background: #f8f9fa;
    margin-top: 0;
}

@media (max-width: 767px) {
    .article-images-grid {
        padding: 25px 18px;
        gap: 30px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .article-images-grid {
        padding: 30px 20px;
        gap: 30px;
    }
}

@media (min-width: 768px) {
    .article-images-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (min-width: 1024px) {
    .article-images-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

.article-images-grid .grid-item {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 767px) {
    .article-images-grid .grid-item {
        border-radius: 12px;
    }
}

.article-images-grid .grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.article-images-grid .wp-caption {
    margin: 0 !important;
    position: relative;
}

.article-images-grid img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

@media (min-width: 768px) {
    .article-images-grid img {
        height: 350px;
    }
}

@media (min-width: 1024px) {
    .article-images-grid img {
        height: 400px;
    }
}

.article-images-grid .grid-item:hover img {
    transform: scale(1.05);
}

.article-images-grid .image-caption {
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.5)) !important;
    padding: 1.25rem !important;
    margin-top: -80px !important;
    position: relative !important;
    z-index: 2 !important;
    text-align: right !important;
}

.article-images-grid .image-caption a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-images-grid .image-caption h3 {
    margin: 0 0 0.5rem 0 !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    transition: color 0.3s ease !important;
}

.article-images-grid .image-caption a:hover h3 {
    color: #ffd700 !important;
}

.article-images-grid .image-caption p {
    margin: 0 !important;
    font-size: 0.875rem !important;
    color: #f0f0f0 !important;
    line-height: 1.5 !important;
}

/* Breadcrumb */
.article-breadcrumb {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

@media (max-width: 767px) {
    .article-breadcrumb {
        padding: 15px 18px;
        border-radius: 12px;
        margin-bottom: 20px;
    }
}

.article-breadcrumb a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-breadcrumb a:hover {
    color: #e74c3c;
}

.article-breadcrumb span {
    color: #6c757d;
    margin: 0 0.5rem;
}

/* Article Tags */
.article-tags {
    padding: 50px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

@media (max-width: 767px) {
    .article-tags {
        padding: 25px 18px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .article-tags {
        padding: 30px 20px;
    }
}

.article-tags h3,
.article-tags h4 {
    font-size: 1.25rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-tags h3 i,
.article-tags h4 i {
    color: #3498db;
    font-size: 1.1rem;
}

.article-tags .tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.article-tags .tag-item,
.article-tags .tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #fff;
    color: #3498db;
    border: 2px solid #3498db;
    border-radius: 20px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.article-tags .tag-item:hover,
.article-tags a.tag:hover {
    background: #3498db;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.article-tags span.tag {
    background: #e9ecef;
    color: #6c757d;
    border-color: #dee2e6;
    cursor: default;
}

/* Share Buttons */
.article-share {
    padding: 50px;
    border-top: 1px solid #e9ecef;
    background: #fff;
}

@media (max-width: 767px) {
    .article-share {
        padding: 25px 18px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .article-share {
        padding: 30px 20px;
    }
}

.article-share h3 {
    font-size: 1.25rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn.telegram {
    background: #0088cc;
}

.share-btn.linkedin {
    background: #0077b5;
}

/* Related Articles */
.related-articles {
    margin-top: 40px;
    padding: 50px;
    background: #f8f9fa;
    border-radius: 24px;
}

@media (max-width: 767px) {
    .related-articles {
        padding: 25px 18px;
        border-radius: 16px;
        margin-top: 30px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .related-articles {
        padding: 30px 20px;
    }
}

.related-articles h2 {
    font-size: 1.75rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-weight: 700;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.related-articles h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #3498db;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .related-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .related-articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .post-article .heading {
        padding: 1.5rem;
    }
    
    .post-article .postcontent [itemprop="articleBody"] {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .article-meta {
        padding: 1rem 1.5rem;
        gap: 1rem;
    }
    
    .article-images-grid {
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .article-tags,
    .article-share {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .article-share,
    .related-articles,
    .article-tags {
        display: none;
    }
    
    .post-article {
        box-shadow: none;
    }
}

/* No Images Message */
.no-images-message {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
    font-size: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 2rem;
}

.no-images-message i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
    display: block;
}
