/* =========================================================================
   service-detail.css
   ---------------------------------------------------------------------
   استایل اختصاصی صفحه‌ی Detail خدمات ترحیم.
   این فایل علاوه بر services-base.css و services.css بارگذاری می‌شود
   و فقط چیزهایی را اضافه/Override می‌کند که در فایل‌های پایه نیست.
   - رعایت کامل Responsive (Mobile/Tablet/Desktop)
   - دکمه‌ها و عناصر لمسی با حداقل ۴۴×۴۴ پیکسل (Touch-Friendly)
   - رعایت RTL و راستچین
========================================================================= */

/* ----- اسکوپ صفحه ----- */
.service-detail-page {
    padding-block: 16px 32px;
}

/* ----- Breadcrumb ----- */
.service-breadcrumb {
    margin-block: 8px 16px;
    font-size: 0.92rem;
}
.service-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.service-breadcrumb-item a {
    color: #17335f;
    text-decoration: none;
    transition: color 0.18s ease;
    padding: 4px 6px;
    border-radius: 4px;
}
.service-breadcrumb-item a:hover,
.service-breadcrumb-item a:focus-visible {
    color: #8f1018;
    text-decoration: underline;
    outline: none;
}
.service-breadcrumb-item.active {
    color: #555;
    padding: 4px 6px;
    font-weight: 600;
}
.service-breadcrumb-sep {
    color: #999;
    user-select: none;
    font-size: 0.95rem;
}

/* ----- صفحه «پیدا نشد» ----- */
.service-detail-notfound {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.service-empty-state {
    border: 1px solid #e3e3e3;
    border-radius: 12px;
    background: #fff;
    padding: 36px 24px;
    text-align: center;
    color: #555;
    max-width: 560px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.service-empty-state h1 {
    color: #8f1018;
    font-size: 1.4rem;
    margin-bottom: 12px;
    font-weight: 700;
}
.service-empty-state p {
    margin-bottom: 18px;
}
.service-empty-state .btn {
    min-height: 44px;
    padding: 8px 24px;
}

/* ----- آرایش grid اصلی ----- */
.service-detail-grid {
    margin-inline: 0;
    --gap-y: 24px;
    row-gap: var(--gap-y);
}
.service-detail-grid > [class*="col-"] {
    padding-inline: 12px;
}

/* ----- گالری اصلی ----- */
.service-gallery-section .wrapper-image-service {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: #f4f4f4;
    cursor: zoom-in;
}
.service-gallery-section .service-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.service-gallery-section .wrapper-image-service:hover .service-main-image {
    transform: scale(1.03);
}

/* ----- دکمه قلب ----- */
.icon-service-like {
    background: rgba(255, 255, 255, 0.92);
    border: none;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 12px;
    color: #8f1018;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 3;
    transition: transform 0.18s ease, background 0.18s ease;
    font-size: 1.1rem;
}
.icon-service-like:hover,
.icon-service-like:focus-visible {
    background: #fff;
    transform: scale(1.06);
    outline: none;
}
.icon-service-like[aria-pressed="true"],
.icon-service-like.liked {
    color: #198754;
    background: #ffffff;
    border: 1px solid #198754;
}

/* ----- thumbnail carousel ----- */
.thumbnail-carousel-wrapper {
    position: relative;
    margin-top: 10px;
    padding-inline: 38px;
}
.thumbnail-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    padding-block: 4px;
}
.thumbnail-container::-webkit-scrollbar {
    height: 6px;
}
.thumbnail-container::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 4px;
}
.thumbnail-container .thumb-item {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    background: #f4f4f4;
    padding: 0;
    transition: border-color 0.18s ease, transform 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}
.thumbnail-container .thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.thumbnail-container .thumb-item:focus-visible {
    outline: 2px solid #8f1018;
    outline-offset: 2px;
}
.thumbnail-container .thumb-item.is-active {
    border-color: #8f1018;
}
.thumbnail-container .thumb-item:hover {
    transform: translateY(-2px);
}

.thumbnail-carousel-wrapper .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #17335f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: background 0.18s ease, color 0.18s ease;
}
.thumbnail-carousel-wrapper .arrow.right { right: 0; }
.thumbnail-carousel-wrapper .arrow.left  { left: 0; }
.thumbnail-carousel-wrapper .arrow:hover,
.thumbnail-carousel-wrapper .arrow:focus-visible {
    background: #8f1018;
    color: #fff;
    outline: none;
}

/* ----- دسته‌بندی + عنوان ----- */
.dissection-service .label-service {
    color: #777;
    font-size: 0.92rem;
    margin-bottom: 8px;
    line-height: 1.7;
}
.dissection-service .title-service {
    color: #17335f;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    margin-block: 0 8px;
}
.dissection-service .time-share-service {
    color: #999;
    font-size: 0.86rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.service-view-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ----- جدول مشخصات ----- */
.description-service {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.description-service-name,
.description-service-value {
    display: flex;
    flex-direction: column;
}
.description-service-name > div,
.description-service-value > div {
    padding-block: 8px;
    border-bottom: 1px dashed #f0f0f0;
    line-height: 1.7;
    word-wrap: break-word;
}
.description-service-name > div:last-child,
.description-service-value > div:last-child {
    border-bottom: none;
}
.description-service-name > div { color: #777; font-size: 0.92rem; }
.description-service-value > div { color: #222; font-weight: 500; }

/* ----- توضیحات بلند ----- */
.description-tex-service {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #ececec;
}
.description-title-service {
    color: #8f1018;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.service-description-text {
    color: #333;
    font-size: 0.95rem;
    line-height: 2;
    text-align: justify;
}

/* ----- دکمه‌های اقدام و share ----- */
.buttons-wrapper-service {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    align-items: stretch;
    flex-wrap: wrap;
}
.buttons-wrapper-service .custom-btn-service {
    flex: 1 1 200px;
    min-height: 44px;          /* Touch target */
    padding: 8px 16px;
    background: #8f1018;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.18s ease;
    cursor: pointer;
}
.buttons-wrapper-service .custom-btn-service:hover,
.buttons-wrapper-service .custom-btn-service:focus-visible {
    background: #6f0c12;
    outline: none;
}

.box-icon-share {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}
.box-icon-share > a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3f5f8;
    color: #17335f;
    font-size: 1.05rem;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}
.box-icon-share > a:hover,
.box-icon-share > a:focus-visible {
    background: #17335f;
    color: #fff;
    transform: translateY(-2px);
    outline: none;
}

/* ----- بلاک تماس ----- */
.call-number-service-wrapper {
    margin-top: 14px;
    border: 1px dashed #d0d6df;
    border-radius: 10px;
    padding: 12px 14px;
    background: #fafbfc;
}
.call-number-service-wrapper[hidden] {
    display: none !important;
}
.call-number-service {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-block: 6px;
}
.call-number-service + .call-number-service {
    border-top: 1px dashed #e2e6ed;
}
.call-number-service .phone {
    color: #777;
    font-size: 0.86rem;
}
.call-number-service .phone-number {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.call-number-service .phone-number a {
    direction: ltr;
    font-family: "Vazirmatn", "Tahoma", sans-serif;
    color: #17335f;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.18s ease, background 0.18s ease;
}
.call-number-service .phone-number a:hover,
.call-number-service .phone-number a:focus-visible {
    color: #8f1018;
    background: #fff5f5;
    outline: none;
}
.copy-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #d0d6df;
    background: #fff;
    color: #17335f;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, color 0.18s ease;
}
.copy-btn:hover,
.copy-btn:focus-visible {
    background: #17335f;
    color: #fff;
    outline: none;
}
.copy-message {
    display: none;
    margin-top: 6px;
    color: #1f7a3a;
    font-size: 0.86rem;
}
.copy-message.is-visible {
    display: block;
}

/* ============== Lightbox modal ============== */
.modal-header-service { border-bottom: 1px solid #f0f0f0; }
.modal-body-service { padding: 14px; }
.modal-main-image-style {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    border-radius: 8px;
}
.wrapper-image-service-modal {
    aspect-ratio: 16 / 10;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

/* ============== Media Queries ============== */

/* تبلت (≥768) */
@media (min-width: 768px) {
    .service-detail-page { padding-block: 24px 40px; }
    .dissection-service .title-service { font-size: 1.6rem; }
    .description-service { padding: 20px; }
    .thumbnail-container .thumb-item { width: 88px; height: 88px; }
}

/* دسکتاپ (≥992) */
@media (min-width: 992px) {
    .service-detail-page { padding-block: 32px 56px; }
    .service-gallery-section .wrapper-image-service { aspect-ratio: 4 / 3; }
    .dissection-service .title-service { font-size: 1.75rem; }
    .description-service-name > div,
    .description-service-value > div { padding-block: 10px; }
}

/* دسکتاپ بزرگ (≥1200) */
@media (min-width: 1200px) {
    .dissection-service .title-service { font-size: 1.9rem; }
}

/* موبایل (<576) */
@media (max-width: 575.98px) {
    .service-detail-page { padding-block: 12px 24px; }
    .service-breadcrumb { font-size: 0.84rem; }
    .dissection-service .title-service { font-size: 1.25rem; }
    .description-service { padding: 12px; border-radius: 10px; }
    .description-service-name > div,
    .description-service-value > div { padding-block: 6px; font-size: 0.92rem; }
    .buttons-wrapper-service { flex-direction: column; }
    .buttons-wrapper-service .custom-btn-service { width: 100%; }
    .box-icon-share { justify-content: center; }
    .thumbnail-container .thumb-item { width: 64px; height: 64px; }
    .thumbnail-carousel-wrapper { padding-inline: 30px; }
    .thumbnail-carousel-wrapper .arrow { width: 28px; height: 28px; }
}

/* ============== Accessibility ============== */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.001s !important;
        animation-duration: 0.001s !important;
    }
}

/* ============== Print ============== */
@media print {
    .buttons-wrapper-service,
    .icon-service-like,
    .thumbnail-carousel-wrapper,
    .call-number-service-wrapper,
    .service-breadcrumb,
    .box-icon-share { display: none !important; }
    .service-detail-page { padding: 0; }
    .description-service { box-shadow: none; border: 1px solid #ccc; }
}
