
.museum-page,
.museum-page * {
    box-sizing: border-box;
}

.museum-page {
    direction: rtl;
    color: #263746;
    min-height: 300px;
    padding: 24px 0 40px;
}

.museum-container {
    width: min(1160px, calc(100% - 28px));
    margin: 0 auto;
}

/* عنوان دليل المتاحف */

.museum-heading {
    margin: 0 0 30px;
}

.museum-heading h1 {
    font-size: clamp(27px, 3.2vw, 34px);
    line-height: 1.55;
    margin: 0 0 8px;
    letter-spacing: 0;
    font-weight: 800;
    color: #1f3b68;
}

.museum-heading p {
    margin: 0;
    color: #647180;
    font-size: 16px;
    line-height: 1.9;
    max-width: 850px;
}

/* البحث والتصفية */

.museum-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 230px) auto auto;
    align-items: end;
    gap: 10px;
    padding: 14px;
    background: #f8f6f1;
    border: 1px solid #eee9df;
    border-radius: 12px;
    margin-bottom: 18px;
}

.museum-filters label {
    font-size: 13px;
    font-weight: 700;
    grid-row: 1;
    color: #425365;
}

.museum-search-label {
    grid-column: 1;
}

.museum-filters input,
.museum-filters select {
    width: 100%;
    min-height: 43px;
    border: 1px solid #d7dce2;
    border-radius: 7px;
    background: white;
    padding: 9px 11px;
    font: inherit;
    grid-row: 2;
}

.museum-filters input {
    grid-column: 1;
}

.museum-filters select {
    grid-column: 2;
}

.museum-filters button {
    grid-row: 2;
    min-height: 43px;
    border: 0;
    border-radius: 7px;
    background: #1f3b68;
    color: #fff;
    font: inherit;
    font-weight: 700;
    padding: 0 20px;
    cursor: pointer;
}

.museum-reset {
    grid-row: 2;
    align-self: center;
    color: #1f3b68;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.museum-result-count {
    font-size: 14px;
    color: #667482;
    margin: 0 0 13px;
}

/* تجميع المتاحف حسب المحافظة */

.museum-governorate {
    margin: 0 0 32px;
}

.museum-governorate-title {
    margin: 0 0 16px;
    padding: 0 0 10px;
    border-bottom: 2px solid #e9edf2;
    color: #1f3b68;
    font-size: clamp(21px, 2.5vw, 26px);
    line-height: 1.6;
    font-weight: 800;
}

/* شبكة المتاحف */

.museum-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.museum-card {
    border: 1px solid #e7e9ec;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    min-width: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 3px 12px rgba(31, 59, 104, .06);
}

.museum-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f0f2f4;
    overflow: hidden;
}

.museum-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s ease;
}

.museum-card-image:hover img {
    transform: scale(1.025);
}

.museum-image-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7b8793;
    font-weight: 800;
    font-size: 22px;
    background: linear-gradient(135deg, #f4f1e9, #e7edf2);
}

.museum-card-content {
    padding: 15px 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
}

.museum-card h2,
.museum-card h3 {
    font-size: 18px;
    line-height: 1.65;
    margin: 0;
    font-weight: 800;
}

.museum-card h2 a,
.museum-card h3 a {
    color: #1f3b68;
    text-decoration: none;
}

.museum-card h3 a:hover {
    text-decoration: underline;
}

.museum-card-location {
    font-size: 13.5px;
    line-height: 1.8;
    color: #687582;
    margin: 0;
}

.museum-card-description {
    font-size: 14px;
    line-height: 1.9;
    color: #435466;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.museum-status {
    display: inline-flex;
    align-items: center;
    border-radius: 20px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.museum-status.is-open {
    background: #eaf6ed;
    color: #28733b;
}

.museum-status.is-closed {
    background: #fff0ee;
    color: #a23b31;
}

.museum-card-more {
    margin-top: 5px;
    padding-top: 4px;
    color: #b77b24;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
}

.museum-card-more:hover {
    text-decoration: underline;
}

/* حالة عدم وجود نتائج */

.museum-empty {
    padding: 25px 15px;
    background: #f7f8fa;
    border: 1px solid #e5e9ed;
    border-radius: 10px;
    text-align: center;
    color: #667482;
    line-height: 1.8;
}

/* ترقيم الصفحات */

.museum-pagination {
    display: flex;
    justify-content: center;
    gap: 7px;
    flex-wrap: wrap;
    margin: 25px 0 0;
}

.museum-pagination a,
.museum-pagination span {
    display: inline-flex;
    min-width: 36px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e5ea;
    border-radius: 7px;
    color: #1f3b68;
    text-decoration: none;
    padding: 5px 10px;
}

.museum-pagination .current {
    background: #1f3b68;
    color: #fff;
    border-color: #1f3b68;
}

/* مسار التنقل الداخلي */

.museum-breadcrumb {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    direction: rtl;
    width: 100%;
    margin: 0 0 16px;
    padding: 0;
    color: #7a8590;
    font-size: 14px;
    line-height: 1.8;
}

.museum-breadcrumb ol {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
}

.museum-breadcrumb li {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.museum-breadcrumb li::before {
    content: none !important;
    display: none !important;
}

.museum-breadcrumb li::marker {
    content: none !important;
}

.museum-breadcrumb a {
    color: #1f3b68;
    text-decoration: none;
}

.museum-breadcrumb a:hover {
    text-decoration: underline;
}

.museum-breadcrumb li[aria-current="page"] {
    color: #666;
}

/* تفاصيل المتحف */

.museum-detail {
    background: #fff;
    border: 1px solid #e7e9ec;
    border-radius: 12px;
    overflow: hidden;
}

.museum-detail-image {
    background: #f1f3f5;
    max-height: 440px;
    overflow: hidden;
}

.museum-detail-image img {
    display: block;
    width: 100%;
    max-height: 440px;
    object-fit: cover;
}

.museum-detail-heading {
    padding: 18px 20px;
    border-bottom: 1px solid #edf0f2;
}

.museum-detail-heading h1 {
    font-size: clamp(24px, 4vw, 32px);
    line-height: 1.5;
    color: #1f3b68;
    margin: 0 0 8px;
    font-weight: 800;
}

.museum-detail-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    color: #667482;
    font-size: 14px;
}

/* بيانات المتحف */

.museum-info-section {
    padding: 18px 20px;
    border-bottom: 1px solid #edf0f2;
}

.museum-info-section:last-of-type {
    border-bottom: 0;
}

.museum-info-section h2 {
    font-size: 20px;
    color: #1f3b68;
    margin: 0 0 13px;
    font-weight: 800;
}

.museum-info-list {
    margin: 0;
    display: grid;
    gap: 0;
}

.museum-info-list > div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #f0f2f4;
    line-height: 1.8;
}

.museum-info-list > div:last-child {
    border-bottom: 0;
}

.museum-info-list dt {
    font-weight: 800;
    color: #46586a;
}

.museum-info-list dd {
    margin: 0;
    color: #263746;
    overflow-wrap: anywhere;
}

.museum-info-list a {
    color: #1f3b68;
    text-decoration: underline;
}

/* وصف المتحف */

.museum-description div {
    line-height: 1.95;
    color: #35495c;
    font-size: 16px;
    white-space: normal;
}

/* خطوط السير والأتوبيسات */

.museum-section-intro {
    margin: 0 0 10px;
    color: #667482;
    font-size: 14px;
    line-height: 1.8;
}

.museum-transport-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.museum-transport-list li {
    border: 1px solid #e8edf1;
    border-radius: 8px;
    padding: 10px 12px;
    line-height: 1.7;
}

.museum-transport-list a {
    color: #1f3b68;
    text-decoration: none;
    font-weight: 700;
}

.museum-transport-list a:hover {
    text-decoration: underline;
}

/* آخر تحديث */

.museum-updated {
    font-size: 12px;
    color: #77828d;
    margin: 0;
    padding: 13px 20px;
    border-top: 1px solid #edf0f2;
}

/* رابط العودة - إن استُخدم في صفحات أخرى */

.museum-back-link {
    display: inline-block;
    margin: 16px 0;
    color: #1f3b68;
    text-decoration: none;
    font-weight: 800;
}

.museum-back-link:hover {
    text-decoration: underline;
}

/* الشاشات المتوسطة */

@media (max-width: 850px) {

    .museum-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .museum-filters {
        grid-template-columns: minmax(0, 1fr) minmax(140px, .7fr) auto;
    }

    .museum-reset {
        grid-column: 1 / -1;
        grid-row: 3;
        justify-self: start;
    }

    .museum-filters label {
        display: none;
    }
}

/* الهواتف */

@media (max-width: 560px) {

    .museum-page {
        padding: 20px 0 36px;
    }

    .museum-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .museum-card {
        display: flex;
        flex-direction: column;
    }

    .museum-card-image {
        aspect-ratio: 16 / 9;
        height: auto;
        min-height: 0;
    }

    .museum-card-content {
        padding: 12px 13px 14px;
        gap: 7px;
    }

    .museum-card h3 {
        font-size: 17px;
        line-height: 1.65;
    }

    .museum-card-location {
        font-size: 13px;
    }

    .museum-card-description {
        font-size: 14px;
        line-height: 1.85;
        -webkit-line-clamp: 3;
    }

    .museum-heading {
        margin-bottom: 24px;
    }

    .museum-heading h1 {
        font-size: 26px;
    }

    .museum-heading p {
        font-size: 15px;
        line-height: 1.85;
    }

    .museum-governorate {
        margin-bottom: 26px;
    }

    .museum-governorate-title {
        font-size: 21px;
        margin-bottom: 12px;
    }

    .museum-detail-heading,
    .museum-info-section {
        padding: 15px;
    }

    .museum-info-list > div {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 9px 0;
    }

    .museum-info-list dt {
        font-size: 13px;
    }

    .museum-info-list dd {
        font-size: 14px;
    }

    .museum-updated {
        padding: 12px 15px;
    }

    .museum-breadcrumb {
        gap: 6px;
        font-size: 13px;
        margin-bottom: 14px;
    }

    .museum-breadcrumb ol {
        gap: 6px;
    }
}




/* Museum breadcrumb - match bus page */

.museum-page .museum-breadcrumb {
    display: block;
    width: 100%;
    margin: 0 0 24px;
    padding: 0;
    direction: rtl;
    text-align: right;
    background: transparent;
    border: 0;
}

.museum-page .museum-breadcrumb ol {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.museum-page .museum-breadcrumb li {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    color: #999;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.8;
}

.museum-page .museum-breadcrumb li a {
    color: #bd8b36;
    text-decoration: none;
    font-weight: 700;
}

.museum-page .museum-breadcrumb li a:hover {
    color: #1e3a5f;
}

.museum-page .museum-breadcrumb li[aria-hidden="true"] {
    color: #999;
    font-weight: 400;
}

.museum-page .museum-breadcrumb li[aria-current="page"] {
    color: #bd8b36;
    font-weight: 700;
}

@media (max-width: 600px) {
    .museum-page .museum-breadcrumb {
        margin-bottom: 18px;
    }

    .museum-page .museum-breadcrumb ol {
        gap: 0 8px;
    }

    .museum-page .museum-breadcrumb li {
        font-size: 15px;
    }
}
