/* =========================================================
   Deceased Memories
   ========================================================= */



/* ---------- Tabs ---------- */

#motMemoriesTabs {
    gap: 1rem;
}

#motMemoriesTabs .nav-link {
    padding: .5rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #6c757d;
    font-weight: 500;
}

#motMemoriesTabs .nav-link:hover {
    color: #00a65a;
}

#motMemoriesTabs .nav-link.active {
    color: #00a65a;
    background: transparent;
    font-weight: 700;
}


/* ---------- Header actions ---------- */

.mot-memories-actions .btn {
    min-width: 170px;
    border-radius: .55rem;
}


/* ---------- Gallery ---------- */

.mot-memory-gallery {
    position: relative;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid #ced4da;
    border-radius: 1rem;
    background: #fff;
    overflow: hidden;
}


/* ---------- Swiper ---------- */

.mot-images-swiper,
.mot-videos-swiper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.mot-images-swiper .swiper-slide,
.mot-videos-swiper .swiper-slide {
    height: auto;
}


/* ---------- Memory card ---------- */

.mot-memory-card {
    height: 100%;
    overflow: hidden;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 .2rem .35rem rgba(0, 0, 0, .18);
}

.mot-memory-card-media {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f3f4f6;
}

.mot-memory-card-media img,
.mot-memory-card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mot-memory-card-body {
    padding: 1rem;
}

.mot-memory-card-link {
    display: inline-flex;
    align-items: center;
    color: #20b875;
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
}

.mot-memory-card-link:hover {
    color: #159b61;
    text-decoration: none;
}


/* ---------- Empty state ---------- */

.mot-memory-empty {
    color: #6c757d;
}


/* =========================================================
   Memory Upload Modal
   ========================================================= */

#motMemoryUploadModal .modal-content {
    border: 0;
    border-radius: 1.25rem;
    overflow: hidden;
}

#motMemoryUploadModal .modal-header {
    border-bottom: 1px solid #eee;
}

#motMemoryUploadModal .modal-footer {
    border-top: 0;
}


/* ---------- Preview ---------- */

.mot-memory-preview {
    position: relative;
    min-height: 390px;
    overflow: hidden;
    border-radius: 1rem;
    background: #f1f1f1;
}

#motMemoryPreviewEmpty {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    padding: 2rem;
    transform: translate(-50%, -50%);
}

#motMemoryImagePreview,
#motMemoryVideoPreview {
    width: 100%;
    height: 100%;
}

#motMemoryImage {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: contain;
}

#motMemoryVideo {
    display: block;
    width: 100%;
    max-height: 520px;
    background: #000;
}


/* ---------- File footer ---------- */

.mot-memory-file-info {
    min-height: 50px;
    padding: .5rem .75rem;
    border-radius: .5rem;
    background: #e9e9e9;
}


/* ---------- Caption ---------- */

.mot-memory-form textarea {
    min-height: 115px;
    resize: vertical;
    border-radius: .8rem;
}

.mot-memory-form textarea:focus {
    box-shadow: none;
}


/* ---------- Guide ---------- */

.mot-memory-form .alert {
    border: 0;
    border-radius: 1rem;
}


/* ---------- Submit ---------- */

#btnSubmitMotMemory {
    min-width: 150px;
    min-height: 40px;
    border-radius: .65rem;
}

#btnSubmitMotMemory:disabled {
    cursor: not-allowed;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 767.98px) {

    .mot-memories-actions {
        width: 100%;
    }

    .mot-memories-actions .btn {
        flex: 1 1 auto;
        min-width: 0;
    }

    .mot-memory-gallery {
        padding: .75rem;
    }

    .mot-memory-card-media {
        height: 210px;
    }


    #motMemoryUploadModal .modal-content {
        border-radius: 1rem;
    }

    .mot-memory-preview {
        min-height: 260px;
    }

    #motMemoryImage,
    #motMemoryVideo {
        max-height: 380px;
    }

    .mot-memory-file-info {
        flex-direction: column;
        align-items: stretch !important;
    }

    #motMemoryFileMeta {
        margin-bottom: .5rem;
    }

}


.mot-memory-crop-tools {
    padding: .75rem;
    border-radius: .75rem;
    background: #f5f5f5;
}

.mot-memory-crop-tools .btn {
    white-space: nowrap;
}

/*
 * هنگام فعال بودن Cropper باید تصویر
 * فضای مناسبی برای ویرایش داشته باشد.
 */
#motMemoryImagePreview.is-cropping {
    min-height: 420px;
}

#motMemoryImagePreview.is-cropping #motMemoryImage {
    display: block;
    max-width: 100%;
}

@media (max-width: 767.98px) {

    #motMemoryImagePreview.is-cropping {
        min-height: 300px;
    }

    .mot-memory-crop-tools .btn {
        font-size: .75rem;
    }

}



/* استایل برای انیمیشن زوم و وضعیت پایه */
#modalImage {
    transition: transform 0.3s ease; /* اضافه کردن یک انتقال نرم برای زوم */
    transform-origin: center center; /* زوم از مرکز تصویر */
    cursor: default;
}
.zoom-control {
    width: 40px;
    margin: 0 5px;
    font-size: 18px;
    font-weight: bold;
}

/* استایل‌های جدید برای محفظه تصویر زوم‌شده */
#imageWrapper {
    /* کل فضای داخل modal-body را اشغال کند */
    width: 100%;
    height: calc(90vh - 60px); /* 90 درصد ارتفاع دید، منهای فضای دکمه‌ها و حاشیه‌ها */
    overflow: auto; /* مهمترین قسمت: فعال کردن اسکرول داخلی */
    text-align: center;
}

#modalImage {
    transition: transform 0.3s ease;
    transform-origin: center center;
    cursor: default;
    /* تنظیم اولیه تصویر برای محفظه */
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* افزایش z-index دکمه‌ها برای اطمینان از قرارگیری در بالاترین لایه */
.modal-footer {
    z-index: 1051; /* بالاتر از z-index پیش‌فرض بوت‌استرپ */
    position: relative;
}
/* Custom CSS for Panning */
#imageWrapper {
    /* نشانگر دست باز برای زمانی که قابلیت جابجایی وجود دارد */
    cursor: grab;
    /* این خاصیت برای جلوگیری از انتخاب متن در حین درگ کردن است */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

#imageWrapper.is-dragging {
    /* نشانگر دست بسته برای زمانی که کاربر در حال کشیدن تصویر است */
    cursor: grabbing;
}

/* ============================================= */
/* ===== اسلایدر مراسمات متوفی ===== */
/* ============================================= */

.ceremonies-swiper-container {
    position: relative;
}

.ceremonies-swiper {
    overflow: hidden !important;
    padding: 10px 0 45px 0;
}

.ceremonies-swiper .swiper-slide {
    width: auto;
    height: auto;
}

.ceremonies-swiper .swiper-slide .card {
    width: 100%;
    max-width: 300px;

    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.ceremonies-swiper .swiper-slide .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

/* ===== دکمه‌های ناوبری ===== */
.ceremonies-swiper-prev,
.ceremonies-swiper-next {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.25s ease;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    font-size: 16px;
}

.ceremonies-swiper-prev {
    left: -12px;
    right: auto;
}

.ceremonies-swiper-next {
    right: -12px;
    left: auto;
}

.ceremonies-swiper-prev:hover,
.ceremonies-swiper-next:hover {
    background: #f3f4f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #1f2937;
    transform: translateY(-50%) scale(1.05);
}

/* ===== صفحه‌بندی ===== */
.ceremonies-swiper-pagination {
    bottom: 0 !important;
    position: relative !important;
    margin-top: 20px;
    text-align: center;
}

.ceremonies-swiper-pagination .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: #cbd5e1;
    opacity: 1;
    margin: 0 5px;
}

.ceremonies-swiper-pagination .swiper-pagination-bullet-active {
    background: #3b82f6;
    width: 20px;
    border-radius: 4px;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 768px) {
    .ceremonies-swiper-prev { left: -8px; }
    .ceremonies-swiper-next { right: -8px; }
    .ceremonies-swiper-prev,
    .ceremonies-swiper-next {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {

    .ceremonies-swiper-prev { left: -6px; }
    .ceremonies-swiper-next { right: -6px; }
    .ceremonies-swiper-prev,
    .ceremonies-swiper-next {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}


/* ============================================= */
/* ===== اسلایدر بنرهای ابراز همدردی ===== */
/* ============================================= */

.sympathy-banners-swiper-container {
    position: relative;
}

.sympathy-banners-swiper {
    overflow: hidden !important;
    padding: 10px 0 45px 0;
}

.sympathy-banners-swiper .swiper-slide {
    width: auto;
    height: auto;
}

.sympathy-banners-swiper .swiper-slide .card {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.sympathy-banners-swiper .swiper-slide .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

/* ===== دکمه‌های ناوبری ===== */
.sympathy-banners-swiper-prev,
.sympathy-banners-swiper-next {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.25s ease;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    font-size: 16px;
}

.sympathy-banners-swiper-prev {
    left: -12px;
    right: auto;
}

.sympathy-banners-swiper-next {
    right: -12px;
    left: auto;
}

.sympathy-banners-swiper-prev:hover,
.sympathy-banners-swiper-next:hover {
    background: #f3f4f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #1f2937;
    transform: translateY(-50%) scale(1.05);
}

/* ===== صفحه‌بندی ===== */
.sympathy-banners-swiper-pagination {
    bottom: 0 !important;
    position: relative !important;
    margin-top: 20px;
    text-align: center;
}

.sympathy-banners-swiper-pagination .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: #cbd5e1;
    opacity: 1;
    margin: 0 5px;
}

.sympathy-banners-swiper-pagination .swiper-pagination-bullet-active {
    background: #3b82f6;
    width: 20px;
    border-radius: 4px;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 768px) {
    .sympathy-banners-swiper-prev { left: -8px; }
    .sympathy-banners-swiper-next { right: -8px; }
    .sympathy-banners-swiper-prev,
    .sympathy-banners-swiper-next {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {

    .sympathy-banners-swiper-prev { left: -6px; }
    .sympathy-banners-swiper-next { right: -6px; }
    .sympathy-banners-swiper-prev,
    .sympathy-banners-swiper-next {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* زنگوله غیرفعال (پیش‌فرض) */
#bellIcon .bell-icon {
    opacity: 0.5;
    transition: all 0.3s ease;
    cursor: pointer;
}

#bellIcon:hover .bell-icon {
    opacity: 0.8;
    transform: scale(1.1);
}

/* زنگوله فعال (دنبال می‌کند) */
#bellIcon.bell-active .bell-icon {
    opacity: 1;
    filter: invert(72%) sepia(61%) saturate(500%) hue-rotate(360deg);
}

#bellIcon.bell-active:hover .bell-icon {
    transform: scale(1.1);
}
/* =========================================================
   Deceased profile hero - unified desktop and Figma mobile
   ========================================================= */
#motProfileHero{direction:rtl;background:#fff;padding:24px 0 20px;}
#motProfileHero *{box-sizing:border-box;}
#motProfileHero > .container{max-width:1280px;}
.mot-profile-hero-grid{display:grid;grid-template-columns:minmax(200px,.85fr) minmax(310px,1.23fr) minmax(320px,1.48fr);grid-template-areas:"person center media" "ceremony ceremony media" "cta cta media";gap:18px 27px;align-items:start;}
.mot-profile-hero-summary{display:contents;}
.mot-profile-hero-person{grid-area:person;min-width:0;}
.mot-profile-hero-center{grid-area:center;min-width:0;}
.mot-profile-hero-ceremony{grid-area:ceremony;min-width:0;}
.mot-profile-hero-media{grid-area:media;min-width:0;}
.mot-profile-primary-actions{grid-area:cta;display:flex;justify-content:center;align-items:center;margin-top:8px;}
.mot-profile-primary-actions .start_donate{color:#fff!important;min-height:43px;border-radius:10px;font-weight:700;}
.mot-profile-primary-actions .start_donate:hover,.mot-profile-primary-actions .start_donate:focus{color:#fff!important;}
.mot-profile-announcement{width:100%;min-width:0;}
.mot-profile-announcement-shell{display:flex;direction:rtl;align-items:flex-start;gap:11px;min-width:0;}
.mot-profile-media-actions{position:static;z-index:1;display:flex;flex:0 0 42px;flex-direction:column;gap:10px;padding-top:6px;}
.mot-profile-media-action{display:inline-flex;width:40px;height:40px;align-items:center;justify-content:center;border:1px solid #e4e9e8;border-radius:11px;color:#73818c;background:#f5f8fa;box-shadow:0 2px 6px rgba(0,0,0,.035);transition:background .18s,transform .18s;text-decoration:none;cursor:pointer;}
.mot-profile-media-action:hover{background:#edf6f1;transform:translateY(-1px);text-decoration:none;}
.mot-profile-media-action img{width:17px;height:17px;object-fit:contain;}
#bellIcon .bell-icon{opacity:.55;}
#bellIcon.bell-active .bell-icon{opacity:1;filter:invert(72%) sepia(61%) saturate(500%) hue-rotate(360deg);}
.mot-profile-announcement-frame.image-container{display:flex;min-width:0;flex:1 1 auto;align-items:center;justify-content:center;height:570px;min-height:570px;padding:8px;border:1px solid #e3e7e6;border-radius:15px;background:#fafbfc;overflow:hidden;box-shadow:0 3px 12px rgba(0,0,0,.04);}
.mot-profile-announcement-frame .mot-profile-announcement-image{display:block;width:100%;height:100%!important;max-width:100%;max-height:none;object-fit:contain;background:transparent;}
.mot-profile-person-card{display:flex;align-items:flex-start;gap:12px;min-width:0;}
.mot-profile-person-avatar{display:flex;flex:0 0 auto;align-items:center;justify-content:center;width:88px;height:88px;border:1px solid #e4e8e9;border-radius:50%;background:#f0f2f4;color:#a3adb4;font-size:32px;overflow:hidden;}
.mot-profile-person-avatar img{width:100%;height:100%;object-fit:cover;}
.mot-profile-person-content{min-width:0;}
.mot-profile-person-name{color:#243d36;font-size:17px;line-height:1.75;font-weight:800;overflow-wrap:anywhere;}
.mot-profile-person-meta{color:#586760;display:flex;flex-wrap:wrap;gap:4px;font-size:12px;line-height:1.8;margin-top:7px;}
.mot-profile-person-label{color:#819089;}
.mot-profile-info-line{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-height:30px;color:#3a4742;font-size:13px;line-height:1.8;}
.mot-profile-info-label{position:relative;display:inline-flex;align-items:center;gap:8px;color:#727e78;font-weight:600;white-space:nowrap;}
.mot-profile-info-label::before{display:inline-block;min-width:15px;color:#7c8986;font-family:"Font Awesome 5 Free";font-size:14px;text-align:center;}
.mot-profile-death-date .mot-profile-info-label::before{content:"\f073";font-weight:400;}
.mot-profile-grave-summary .mot-profile-info-label::before{content:"\f3c5";font-weight:900;}
.mot-profile-info-value{color:#394c43;font-weight:700;overflow-wrap:anywhere;}
.mot-profile-grave{margin-top:10px;}
.mot-profile-grave-actions{margin-top:8px;}
.mot-profile-grave-actions .mot-grave-actions-content{display:flex;flex-direction:column;align-items:flex-start;}
.mot-profile-grave-actions .mot-grave-actions-content>.small{display:none;}
.mot-profile-grave-actions .mot-grave-actions-content>.d-flex{gap:7px;}
.mot-profile-grave-actions .btn{display:inline-flex;align-items:center;justify-content:center;gap:3px;min-height:34px;padding:6px 10px;border-radius:10px;background:#fff;font-size:12px;font-weight:700;}
.mot-profile-grave-actions .map-link-btn{border:1px solid #48a77c;color:#226b4b;}
.mot-profile-grave-actions .mot-grave-form-trigger{border:1px solid #4dbb89;color:#279768;}
.mot-profile-grave-actions .btn:hover{background:#f2faf6;}
.mot-profile-ceremonies{min-width:0;}
.mot-profile-ceremony-card{min-width:0;border-top:1px solid #e9eeec;padding-top:12px;}
.mot-profile-ceremony-head{display:flex;align-items:center;justify-content:space-between;gap:8px 14px;min-width:0;margin-bottom:13px;}
.mot-profile-ceremony-heading{display:inline-flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:7px;min-width:0;}
.mot-profile-ceremony-title{margin:0;color:#216e55;font-size:17px;font-weight:800;line-height:1.75;}
/* رنگ Badge صرفاً از کلاس‌های قدیمی badge-success/badge-secondary/badge-pink گرفته می‌شود. */
.mot-profile-ceremony-route{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border:1px solid #c5cdcb;border-radius:9px;background:#fff;color:#5c6562;font-size:12px;line-height:1.7;white-space:nowrap;}
.mot-profile-ceremony-route:hover{background:#f6faf8;color:#316e54;}
.mot-profile-ceremony-route i{font-size:15px;}
.mot-profile-ceremony-navigation>.dropdown-menu{font-size:12px;text-align:right;}
.mot-profile-ceremony-audiences{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start;}
.mot-profile-ceremony-audience{min-width:0;padding:10px 0;border-top:1px solid #eef1f0;}
.mot-profile-ceremony-address-label{display:block;margin:0 0 7px;color:#319675;font-size:13px;font-weight:800;line-height:1.7;}
.mot-profile-ceremony-address{display:flex;align-items:flex-start;gap:7px;min-width:0;color:#3a4744;font-size:12px;line-height:2;overflow-wrap:anywhere;}
.mot-profile-ceremony-address i{flex:0 0 14px;margin-top:6px;color:#5c6768;font-size:12px;}
.mot-profile-ceremony-audience-meta{display:flex;flex-direction:column;gap:4px;margin-top:10px;}
.mot-profile-ceremony-meta-item{display:flex;align-items:flex-start;gap:7px;color:#3c4642;font-size:12px;line-height:1.8;overflow-wrap:anywhere;}
.mot-profile-ceremony-meta-item i{flex:0 0 14px;margin-top:3px;color:#656f6c;text-align:center;font-size:12px;}
.mot-profile-countdown{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:7px;min-height:42px;margin-top:10px;padding:8px 10px;border:1px solid #dcece4;border-radius:10px;background:#f7fbf9;color:#315d49;font-size:12px;}
.mot-profile-countdown.is-ending{border-color:#f0dbdb;background:#fff8f8;color:#9c5555;}
.mot-profile-countdown-label{white-space:nowrap;}
.mot-profile-countdown .countdown-wrapper{gap:4px;}
.mot-profile-empty-state{padding:18px;border:1px dashed #dae3de;border-radius:10px;color:#65736b;text-align:center;font-size:12px;}
.mot-profile-skeleton{position:relative;overflow:hidden;background:#edf1ef;border-radius:12px;}
.mot-profile-skeleton::after{content:"";position:absolute;inset:0;transform:translateX(100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.7),transparent);animation:motProfileSkeleton 1.5s infinite;}
.mot-profile-skeleton-image{min-height:340px;}
.mot-profile-skeleton-person{width:100%;min-height:95px;}
@keyframes motProfileSkeleton{to{transform:translateX(-100%);}}
#motProfileHero .mot-profile-media-action:focus-visible,#motProfileHero .mot-profile-ceremony-route:focus-visible{outline:2px solid #2b9b70;outline-offset:3px;}
@media(max-width:1199.98px) and (min-width:992px){
    .mot-profile-hero-grid{grid-template-columns:minmax(180px,.8fr) minmax(250px,1.2fr) minmax(280px,1.35fr);gap:18px 22px;}
    .mot-profile-announcement-frame.image-container{height:510px;min-height:510px;}
}
@media(max-width:991.98px) and (min-width:768px){
    .mot-profile-hero-grid{grid-template-columns:minmax(0,1fr) minmax(280px,1fr);grid-template-areas:"person media" "center media" "ceremony ceremony" "cta cta";gap:16px 22px;}
    .mot-profile-announcement-frame.image-container{height:460px;min-height:460px;}
    .mot-profile-person-avatar{width:78px;height:78px;}
    .mot-profile-ceremony-audiences{gap:20px;}
}
@media(max-width:767.98px){
    #motProfileHero{padding:10px 0 18px;background:#f7f8fd;}
    #motProfileHero>.container{padding-right:11px;padding-left:11px;}
    .mot-profile-hero-grid{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"summary" "ceremony" "media" "cta";gap:12px;}
    .mot-profile-hero-summary{grid-area:summary;display:block;min-width:0;min-height:121px;padding:9px 13px 10px;border-radius:27px;background:#fff;}
    .mot-profile-hero-person,.mot-profile-hero-center{width:100%;}
    .mot-profile-person-card{display:grid;direction:rtl;grid-template-columns:76px minmax(0,1fr) minmax(63px,.76fr);grid-template-rows:auto auto;gap:0 8px;min-height:78px;padding:0;align-items:start;}
    .mot-profile-person-avatar{grid-column:1;grid-row:1/span 2;display:flex;width:76px;height:76px;font-size:27px;}
    .mot-profile-person-content{display:contents;}
    .mot-profile-person-name{grid-column:2;grid-row:1;margin:5px 0 0;font-size:12px;line-height:1.45;font-weight:800;text-align:right;}
    .mot-profile-person-spouse{grid-column:2;grid-row:2;align-self:start;margin:0;display:block;font-size:11px;line-height:1.45;}
    .mot-profile-person-father{grid-column:3;grid-row:1;display:block;align-self:start;margin:6px 0 0;text-align:center;font-size:10px;line-height:1.6;}
    .mot-profile-person-meta .mot-profile-person-label{color:#56655e;}
    .mot-profile-hero-center{display:grid;direction:rtl;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;gap:7px;margin-top:-34px;}
    .mot-profile-death-date{grid-column:1;align-self:end;}
    .mot-profile-grave{grid-column:2;grid-row:1;align-self:start;margin-top:0;}
    .mot-profile-info-line{display:flex;align-items:center;gap:3px;min-height:0;font-size:10px;line-height:1.7;}
    .mot-profile-info-label{gap:4px;font-size:10px;}
    .mot-profile-info-label::before{min-width:12px;font-size:12px;}
    .mot-profile-info-value{font-size:10px;font-weight:600;}
    .mot-profile-grave-actions{margin-top:6px;}
    .mot-profile-grave-actions .btn{min-height:28px;padding:3px 7px;border-radius:10px;font-size:10px;line-height:1.65;}
    .mot-profile-grave-actions .mot-grave-actions-content>.d-flex{gap:4px;flex-wrap:wrap;}
    .mot-profile-hero-ceremony{min-width:0;padding:11px 15px 13px;border-radius:27px;background:#fff;}
    .mot-profile-ceremony-card{border:0;padding:0;}
    .mot-profile-ceremony-head{align-items:center;gap:7px;min-width:0;margin-bottom:10px;}
    .mot-profile-ceremony-heading{gap:5px;}
    .mot-profile-ceremony-title{font-size:12px;line-height:1.65;}
    .mot-profile-ceremony-route{min-height:27px;padding:3px 7px;border-radius:10px;font-size:10px;}
    .mot-profile-ceremony-route i{font-size:13px;}
    .mot-profile-ceremony-navigation>.dropdown-menu{font-size:11px;}
    .mot-profile-ceremony-audiences{grid-template-columns:minmax(0,1fr);gap:8px;}
    .mot-profile-ceremony-audience{padding:0;border:0;}
    .mot-profile-ceremony-address-label{margin:0 0 4px;font-size:11px;}
    .mot-profile-ceremony-address{gap:6px;font-size:11px;line-height:1.9;}
    .mot-profile-ceremony-address i{flex-basis:12px;margin-top:6px;font-size:11px;}
    .mot-profile-ceremony-audience-meta{align-items:stretch;gap:3px;margin-top:7px;}
    .mot-profile-ceremony-meta-item{gap:6px;font-size:10.5px;line-height:1.75;}
    .mot-profile-ceremony-meta-item i{flex-basis:12px;margin-top:3px;font-size:11px;}
    .mot-profile-countdown{min-height:34px;justify-content:flex-start;gap:4px;margin-top:9px;padding:4px 7px;border-radius:9px;background:#fff;font-size:10px;}
    .mot-profile-hero-media{width:calc(100% - 26px);max-width:460px;margin:10px auto 0;min-width:0;}
    .mot-profile-announcement-shell{display:flex;direction:rtl;align-items:flex-start;gap:8px;padding:8px;border:1px solid #dce0eb;border-radius:19px;background:#f7f8fd;}
    .mot-profile-media-actions{flex-basis:29px;gap:5px;padding-top:0;}
    .mot-profile-media-action{width:28px;height:28px;border-radius:8px;background:#f7f8fc;box-shadow:none;}
    .mot-profile-media-action img{width:15px;height:15px;}
    .mot-profile-announcement-frame.image-container{height:300px;min-height:300px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;}
    .mot-profile-announcement-frame .mot-profile-announcement-image{width:100%;height:100%!important;max-height:none;object-fit:contain;}
    .mot-profile-primary-actions{margin-top:4px;margin-bottom:2px;}
    .mot-profile-primary-actions .start_donate.w-50{width:90%!important;max-width:350px;min-height:45px;color:#fff!important;}
    .mot-profile-skeleton-image{min-height:300px;}
}
@media(max-width:359.98px){
    .mot-profile-hero-summary{padding:9px 10px;}
    .mot-profile-person-card{grid-template-columns:68px minmax(0,1fr) minmax(53px,.7fr);gap:0 5px;}
    .mot-profile-person-avatar{width:68px;height:68px;}
    .mot-profile-hero-ceremony{padding:11px 12px;}
    .mot-profile-announcement-frame.image-container{height:278px;min-height:278px;}
}
@media(min-width:768px){
    .mot-profile-person-spouse,.mot-profile-person-father{display:flex;}
}

/* ===== اصلاحات نهایی Hero: تصویر، مسیریابی و مودال ===== */
#motProfileHero .mot-profile-image-trigger{display:block;min-width:0;max-width:100%;width:100%;margin:0;padding:0;border:0;outline-offset:3px;background:transparent;cursor:zoom-in;-webkit-appearance:none;appearance:none;}
#motProfileHero .mot-profile-image-trigger:focus-visible{outline:2px solid #2b9b70;}
#motProfileHero .mot-profile-ceremony-route.font-small{font-size:11px;}
#motProfileHero .mot-profile-grave-actions .map-link-btn.font-small{font-size:11px;}
.mot-profile-image-modal .modal-dialog{max-width:min(96vw,1100px);}
.mot-profile-image-modal .modal-content{border:0;border-radius:15px;overflow:hidden;}
.mot-profile-image-modal .modal-header{padding:12px 18px;}
.mot-profile-image-modal .modal-title{font-size:15px;}
.mot-profile-image-modal .modal-body{padding:12px;background:#f7f8fb;}
.mot-profile-image-modal #motAnnouncementModalImage{display:block;width:auto;max-width:100%;max-height:calc(100dvh - 175px);height:auto;object-fit:contain;margin:auto;}
.mot-profile-image-modal .modal-footer{padding:10px 14px;}
.mot-profile-route-modal .modal-dialog{max-width:420px;}
.mot-profile-route-modal .modal-content{border:0;border-radius:16px;overflow:hidden;}
.mot-profile-route-modal .modal-title{font-size:15px;}
.mot-profile-route-destination{padding:8px 12px;margin-bottom:12px;border-radius:9px;background:#f3f7f5;color:#2c5744;font-size:12px;line-height:1.9;overflow-wrap:anywhere;}
.mot-profile-route-choices{display:flex;flex-direction:column;gap:8px;}
.mot-profile-route-choice{display:flex;align-items:center;gap:12px;min-height:48px;padding:11px 14px;border:1px solid #dce6df;border-radius:11px;background:#fff;color:#245b44;font-size:13px;font-weight:700;text-decoration:none;}
.mot-profile-route-choice:hover,.mot-profile-route-choice:focus{border-color:#3f9b70;background:#f3faf6;color:#21563f;text-decoration:none;}
.mot-profile-route-choice>i:first-child{width:22px;text-align:center;font-size:17px;}
.mot-profile-route-choice-arrow{margin-right:auto;font-size:11px;color:#899991;}
.mot-profile-route-note{margin-top:12px;color:#77837e;font-size:11px;line-height:1.9;}
@media(max-width:767.98px){
    #motProfileHero .mot-profile-ceremony-route.font-small{font-size:10px;}
    #motProfileHero .mot-profile-grave-actions .map-link-btn{font-size:10px;}
    .mot-profile-image-modal .modal-dialog{max-width:none;margin:8px;}
    .mot-profile-image-modal .modal-body{padding:8px;}
    .mot-profile-image-modal #motAnnouncementModalImage{max-height:calc(100dvh - 150px);}
    .mot-profile-route-modal .modal-dialog{margin:12px;max-width:none;}
}

/* ===== اصلاحات مرحله بعد: ترتیب موبایل و هماهنگی آیکن مسیر ===== */
#motProfileHero .mot-profile-ceremony-route i,
#motProfileHero .mot-profile-grave-actions .map-link-btn i{font-size:1em!important;line-height:1;vertical-align:middle;}
@media(max-width:767.98px){
    #motProfileHero .mot-profile-hero-grid{grid-template-areas:"summary" "ceremony" "cta" "media";}
    #motProfileHero .mot-profile-primary-actions{margin-top:2px;margin-bottom:0;}
    #motProfileHero .mot-profile-hero-media{margin-top:2px;}
}
/* پنجره جایگزین اشتراک‌گذاری برای مرورگرهای فاقد Web Share */
.mot-profile-share-modal .modal-dialog{max-width:420px;}
.mot-profile-share-modal .modal-content{border:0;border-radius:16px;overflow:hidden;}
.mot-profile-share-modal .modal-title{font-size:15px;}
.mot-profile-share-description{font-size:12px;color:#64716b;line-height:1.9;}
.mot-profile-share-link-group .form-control{height:40px;font-size:12px;direction:ltr;text-align:left;}
.mot-profile-share-link-group .btn{font-size:12px;}
.mot-profile-share-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.mot-profile-share-option{display:flex;justify-content:center;align-items:center;gap:8px;min-height:43px;padding:7px 12px;border:1px solid #dbe9e2;border-radius:10px;color:#236b4b;font-size:13px;font-weight:700;text-decoration:none;background:#f7fbf9;}
.mot-profile-share-option:hover,.mot-profile-share-option:focus{color:#19563d;background:#e9f5ef;text-decoration:none;}
.mot-profile-share-option i{font-size:17px;}
@media(max-width:767.98px){.mot-profile-share-modal .modal-dialog{max-width:none;margin:12px;}}
