/* heritage-taxonomy.css - أنماط صفحات أرشيف التصنيفات */

.taxonomy-archive-page .site-main-full-width {
    background-color: #FDFBF5;
    padding-bottom: 40px;
}

.taxonomy-archive-header {
    padding: 40px 20px 30px;
    text-align: center;
    background: linear-gradient(to bottom, rgba(212, 195, 168, 0.3), rgba(212, 195, 168, 0) 80%);
    border-bottom: 1px solid #D4C3A8;
    margin-bottom: 40px;
}

.heritage-breadcrumbs-taxonomy {
    font-size: 0.85em;
    color: #7A6A53;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.heritage-breadcrumbs-taxonomy a {
    color: #9B8766;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: initial;
}

.heritage-breadcrumbs-taxonomy a:hover {
    color: #C8A97E;
    text-decoration: underline;
}

.taxonomy-page-title {
    font-size: 3em;
    color: #4A3F35;
    margin-bottom: 5px;
    font-family: 'Scheherazade New', Times, serif;
}

.taxonomy-page-subtitle {
    font-size: 1.1em;
    color: #8C7B65;
    margin-top: 0;
    font-style: italic;
}

.taxonomy-items-showcase-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.heritage-terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.heritage-term-card {
    background-color: #fff;
    border: 1px solid #E0D8CC;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.5s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform 1.5s cubic-bezier(0.25, 0.8, 0.25, 1),
        box-shadow 1.3s ease,
        border-color 1.3s ease;
}

.heritage-term-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.heritage-term-card.is-visible:hover {
    transform: translateY(-8px);
}

.heritage-term-card::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 100px;
    height: 100px;
    background-color: rgba(212, 195, 168, 0.15);
    border-radius: 50%;
    transform: rotate(45deg);
    transition: transform 0.5s ease;
    z-index: 1;
}

.heritage-term-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: #C8A97E;
}

.heritage-term-card:hover::before {
    transform: scale(1.5) rotate(60deg);
}

.heritage-term-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    z-index: 2;
}

.term-icon {
    margin-bottom: 15px;
    color: #9B8766;
    transition: transform 0.3s ease;
}

.heritage-term-card:hover .term-icon {
    transform: scale(1.1) rotate(-5deg);
}

.term-icon svg {
    width: 50px;
    height: 50px;
}

.heritage-term-name {
    font-size: 1.5em;
    color: #5C4D3C;
    margin-bottom: 8px;
    font-weight: 600;
}

.heritage-term-description {
    font-size: 0.85em;
    color: #8C7B65;
    line-height: 1.5;
}

.heritage-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.heritage-item-card {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.5s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform 1.5s cubic-bezier(0.25, 0.8, 0.25, 1),
        box-shadow 1.3s ease;
}

.heritage-item-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.heritage-item-card.is-visible:hover {
    transform: translateY(-6px);
}

.heritage-item-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.09);
}

.heritage-item-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.heritage-item-thumbnail {
    height: 200px;
    overflow: hidden;
}

.heritage-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.heritage-item-card:hover .heritage-item-thumbnail img {
    transform: scale(1.05);
}

.heritage-item-thumbnail.placeholder-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0eae2;
}

.heritage-item-thumbnail.placeholder-thumbnail .term-icon svg {
    width: 60px;
    height: 60px;
    opacity: 0.5;
    color: #A0927F;
}

.heritage-item-content {
    padding: 20px;
}

.heritage-item-title {
    font-size: 1.3em;
    color: #4A3F35;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.heritage-item-excerpt {
    font-size: 0.9em;
    color: #7A6A53;
    line-height: 1.6;
    margin-top: 10px;
}

/* --- شارة نوع التراث --- */
.heritage-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-tangible {
    background: linear-gradient(135deg, #00a32a 0%, #007a1f 100%);
    color: #fff;
}

.badge-intangible {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    color: #fff;
}

/* --- بيانات العنصر التراثي --- */
.heritage-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #E8E1D5;
}

.heritage-item-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8em;
    color: #8C7B65;
}

.heritage-item-meta .meta-item svg {
    color: #C8A97E;
    flex-shrink: 0;
}

/* --- تمرير ناعم للصفحة --- */
html {
    scroll-behavior: smooth;
}

.no-results-message {
    text-align: center;
    padding: 40px 20px;
    font-size: 1.2em;
    color: #8C7B65;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

@media (max-width: 992px) {
    .taxonomy-page-title {
        font-size: 2.4em;
    }

    .heritage-terms-grid,
    .heritage-items-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .taxonomy-archive-header {
        padding: 30px 15px 20px;
    }

    .taxonomy-page-title {
        font-size: 2em;
    }

    .taxonomy-page-subtitle {
        font-size: 1em;
    }

    .heritage-terms-grid,
    .heritage-items-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .term-icon svg {
        width: 40px;
        height: 40px;
    }

    .heritage-term-name {
        font-size: 1.3em;
    }
}

/* ===================================
   مربع البحث
   =================================== */
.heritage-search-box {
    margin-bottom: 30px;
    text-align: center;
}

.heritage-search-form {
    display: inline-block;
    width: 100%;
    max-width: 500px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 2px solid #E0D8CC;
    border-radius: 50px;
    padding: 5px 10px 5px 20px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: #C8A97E;
    box-shadow: 0 4px 15px rgba(200, 169, 126, 0.2);
}

.heritage-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1em;
    padding: 12px 10px;
    background: transparent;
    color: #4A3F35;
}

.heritage-search-input::placeholder {
    color: #A0927F;
}

.heritage-search-button {
    background-color: #C8A97E;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    color: #fff;
}

.heritage-search-button:hover {
    background-color: #9B8766;
    transform: scale(1.05);
}

.heritage-clear-search {
    display: inline-block;
    margin-top: 10px;
    color: #9B8766;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.2s ease;
}

.heritage-clear-search:hover {
    color: #C8A97E;
}

.heritage-search-results-count {
    margin-top: 15px;
    color: #7A6A53;
    font-size: 0.95em;
}

/* ===================================
   الترقيم (Pagination)
   =================================== */
.heritage-pagination {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #E0D8CC;
    text-align: center;
}

.pagination-info {
    color: #8C7B65;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.heritage-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.heritage-pagination li {
    display: inline-block;
}

.heritage-pagination a,
.heritage-pagination span.current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 15px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.heritage-pagination a {
    background-color: #fff;
    color: #5C4D3C;
    border: 1px solid #E0D8CC;
}

.heritage-pagination a:hover {
    background-color: #C8A97E;
    color: #fff;
    border-color: #C8A97E;
}

.heritage-pagination span.current {
    background-color: #C8A97E;
    color: #fff;
    border: 1px solid #C8A97E;
}

.heritage-pagination .prev,
.heritage-pagination .next {
    padding: 0 20px;
}

.pagination-arrow {
    font-size: 1.2em;
    margin: 0 5px;
}

.heritage-pagination .dots {
    color: #A0927F;
    padding: 0 10px;
}

/* Responsive للبحث والترقيم */
@media (max-width: 768px) {
    .heritage-search-form {
        max-width: 100%;
    }

    .search-input-wrapper {
        padding: 3px 8px 3px 15px;
    }

    .heritage-search-input {
        font-size: 0.9em;
        padding: 10px 8px;
    }

    .heritage-search-button {
        width: 38px;
        height: 38px;
    }

    .heritage-pagination ul {
        gap: 5px;
    }

    .heritage-pagination a,
    .heritage-pagination span.current {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 0.85em;
    }

    .heritage-pagination .prev,
    .heritage-pagination .next {
        padding: 0 12px;
    }
}