/* heritage-single.css - أنماط صفحة عرض المقال التراثي */

/* --- أنماط عامة لصفحة المقال --- */

.heritage-article-container {
    max-width: 1100px;
    margin: 0 auto;
    background-color: #FFFFFF;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding-bottom: 30px;
}

/* --- تصميم رأس المقال --- */
.heritage-article-header {
    position: relative;
    color: #fff;
    background-color: #4A3F35;
    min-height: 300px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 40px;
    margin-bottom: 30px;
}

.heritage-article-header.has-featured-image {
    min-height: 50vh;
    max-height: 600px;
}

.heritage-featured-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.heritage-featured-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 10s ease-in-out, filter 0.5s ease;
    filter: brightness(0.9);
}

.heritage-article-container:hover .heritage-featured-image-wrapper img {
    filter: brightness(1);
}

.featured-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.75) 100%);
    z-index: 2;
}

.heritage-header-content-wrapper {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 30px;
    text-align: center;
    animation: fadeInHeaderContent 1s ease-out 0.3s forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes fadeInHeaderContent {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.heritage-breadcrumbs-single {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.heritage-breadcrumbs-single a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

.heritage-breadcrumbs-single a:hover {
    color: #fff;
    text-decoration: underline;
}

.heritage-breadcrumbs-single span {
    color: #fff;
    font-weight: 500;
}

.heritage-article-title {
    font-size: 3em;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    font-family: 'Scheherazade New', 'Times New Roman', Times, serif;
}

.heritage-article-meta-header {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.85);
}

.heritage-article-meta-header .meta-item {
    margin: 0 10px 5px 0;
    display: inline-block;
    opacity: 0.9;
    white-space: nowrap;
}

.heritage-article-meta-header .meta-item i {
    margin-left: 5px;
    opacity: 0.8;
    font-size: 0.9em;
}

/* --- تصميم جسم المقال --- */
.heritage-article-body {
    padding: 5px 40px;
    animation: fadeInContent 0.8s ease-out 0.6s forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInContent {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.heritage-entry-content {
    font-size: 1.4em;
    line-height: 1.8;
    color: #333;
    font-family: 'Scheherazade New', 'Tahoma', sans-serif;
}

.heritage-entry-content p {
    margin-bottom: 1.5em;
}

.heritage-entry-content h2,
.heritage-entry-content h3,
.heritage-entry-content h4 {
    font-family: 'Scheherazade New', 'Times New Roman', Times, serif;
    color: #4A3F35;
    margin-top: 2em;
    margin-bottom: 0.8em;
    line-height: 1.3;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #E0D8CC;
}

.heritage-entry-content h2 {
    font-size: 1.8em;
}

.heritage-entry-content h3 {
    font-size: 1.5em;
}

.heritage-entry-content h4 {
    font-size: 1.3em;
}

.heritage-entry-content a {
    color: #B08D57;
    text-decoration: none;
    border-bottom: 1px dotted #B08D57;
    transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

.heritage-entry-content a:hover {
    color: #8C6F45;
    border-bottom-color: #8C6F45;
}

.heritage-entry-content blockquote {
    border-right: 4px solid #D4C3A8;
    border-left: none;
    margin: 1.5em 0;
    padding: 10px 20px 10px 0;
    font-style: italic;
    color: #7A6A53;
    background-color: #FDFBF5;
    border-radius: 0 4px 4px 0;
}

.heritage-entry-content blockquote p {
    margin-bottom: 0.5em;
}

.heritage-entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.heritage-entry-content img,
.heritage-entry-content .wp-caption {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.heritage-entry-content .aligncenter {
    margin-left: auto;
    margin-right: auto;
}

.heritage-entry-content .alignright {
    float: left;
    margin: 5px 0 1em 20px;
}

.heritage-entry-content .alignleft {
    float: right;
    margin: 5px 20px 1em 0;
}

.page-links {
    margin-top: 30px;
    margin-bottom: 20px;
    clear: both;
    font-weight: bold;
    text-align: center;
}

.page-links .page-number {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #D4C3A8;
    border-radius: 4px;
    color: #7A6A53;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.page-links .page-number:hover,
.page-links>span.page-number {
    background-color: #B08D57;
    color: #fff;
    border-color: #B08D57;
}

/* --- تذييل المقال --- */
.heritage-entry-footer {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px dashed #E0D8CC;
}

/* --- قسم أزرار المشاركة --- */
.heritage-share-buttons-container {
    margin-top: 10px;
    padding-top: 15px;
    text-align: center;
}

.share-buttons-title {
    font-size: 1.8em;
    color: #f0c15a;
    margin-bottom: 20px;
    font-weight: 600;
    font-family: 'Scheherazade New', 'Times New Roman', Times, serif;
}

.heritage-share-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
    min-width: 140px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.share-button i {
    margin-left: 10px;
    font-size: 1.2em;
}

.share-button span {
    line-height: 1;
}

.share-button.share-facebook {
    background-color: #1877F2;
    color: #fff;
}

.share-button.share-facebook:hover {
    background-color: #166FE5;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(24, 119, 242, 0.3);
}

.share-button.share-twitter {
    background-color: #1DA1F2;
    color: #fff;
}

.share-button.share-twitter:hover {
    background-color: #1A91DA;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(29, 161, 242, 0.3);
}

.share-button.share-whatsapp {
    background-color: #25D366;
    color: #fff;
}

.share-button.share-whatsapp:hover {
    background-color: #1FAF54;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.share-button.share-copy-link {
    background-color: #6c757d;
    color: #fff;
    cursor: pointer;
}

.share-button.share-copy-link:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(108, 117, 125, 0.3);
}

.share-button.share-copy-link.copied {
    background-color: #28a745;
    cursor: default;
}

.share-button.share-copy-link.copied:hover {
    background-color: #218838;
}

/* --- قسم المواضيع ذات الصلة --- */
.related-heritage-items {
    margin-top: 50px;
    padding: 40px 50px;
    background-color: #F4F6F8;
    border-top: 1px solid #DEE2E6;
}

.related-items-title {
    text-align: center;
    font-size: 2.1em;
    color: #343A40;
    margin-bottom: 35px;
    font-family: 'Scheherazade New', 'Times New Roman', Times, serif;
    position: relative;
    padding-bottom: 15px;
}

.related-items-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #005A9C;
    border-radius: 2px;
}

.related-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 30px;
}

.related-item-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.related-item-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.related-item-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.related-item-thumbnail {
    height: 180px;
    overflow: hidden;
    background-color: #E9ECEF;
}

.related-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-item-card:hover .related-item-thumbnail img {
    transform: scale(1.08);
}

.related-item-thumbnail.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-item-thumbnail.placeholder .term-icon svg {
    width: 50px;
    height: 50px;
    opacity: 0.4;
    color: #6C757D;
}

.related-item-content {
    padding: 18px 20px;
    text-align: right;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.related-item-title {
    font-size: 1.15em;
    color: #212529;
    margin: 0 0 8px 0;
    font-weight: 600;
    line-height: 1.35;
}

.related-item-country {
    font-size: 0.85em;
    color: #6C757D;
    display: block;
    margin-top: auto;
}

/* --- تعديلات للشاشات الأصغر --- */
@media (max-width: 768px) {
    .heritage-article-header.has-featured-image {
        min-height: 40vh;
    }

    .heritage-article-title {
        font-size: 2.2em;
    }

    .heritage-article-body,
    .related-heritage-items {
        padding: 5px 25px;
    }

    .heritage-entry-content {
        font-size: 1em;
    }

    .heritage-entry-content h2 {
        font-size: 1.6em;
    }

    .heritage-entry-content h3 {
        font-size: 1.4em;
    }

    .related-items-title {
        font-size: 1.8em;
    }

    .related-items-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px;
    }

    .heritage-share-buttons {
        flex-direction: column;
        align-items: center;
    }

    .share-button {
        width: 90%;
        max-width: 300px;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .heritage-article-title {
        font-size: 1.9em;
    }

    .heritage-article-meta-header .meta-item {
        margin-right: 8px;
        font-size: 0.85em;
    }

    .related-items-grid {
        grid-template-columns: 1fr;
    }
}