/* Home page of the Shaheed Sayyid Muhammad Taqi al-Khoei (/ar/Muhammad-Taqi-Khoei).
   Moved out of client/pages/MohammadTaqiKhoei.blade.php so the browser can cache it.

   TABLE OF CONTENTS, in page order (search for the quoted title)
    0. Overrides of global styles ......... "Overrides of global styles"
    1. Text sections (birth and study, social services, travels) ... "Text sections"
    2. Scientific credentials (accordion) . "Scientific credentials accordion"
    3. Audio samples ...................... "Audio / teaching samples"
    4. Photo album (mosaic) ............... "Photo gallery" and "Gallery mosaic"
    5. Uprising chronicle (timeline) ...... "Uprising chronicle"
    6. Institutional-work banner .......... "Banner feature"
    7. Image + text (travels) ............. "Image + text split"
    8. Videos (swipe row) ................. "Multi-video gallery"
    9. Martyrdom / echoes ................. "Condolences & echoes"
   10. Name in calligraphy (h1) ........... "h1 of the home page"
   11. Small helpers (hero image, prose text, bottom banners) ... "Small helpers"

  Screen sizes used in this file (only two):
    Phone  <= 767px   ->  @media (max-width: 767px)
    Tablet <= 991px   ->  @media (max-width: 991px)
  Each section keeps its own phone/tablet rules at the end of that section (look for the "Phone" / "Tablet" comments).
*/

/* ── Overrides of global styles (Bootstrap accordion look) ── */
.accordion-button::after {
    display: none !important;
    content: none !important;
}

.accordion-body {
    padding: 0px !important;
}

.accordion-item:first-of-type .accordion-button {
    margin-top: -1px !important;
    border-radius: 0px !important;
}

.accordion-item:last-of-type .accordion-button.collapsed {
    margin-top: -1px !important;
    border-radius: 0px !important;
}

.accordion-button {
    margin-top: -1px !important;
    box-shadow: none !important;
}

.accordion-button:focus {
    margin-top: -1px !important;
    box-shadow: none !important;
}

.accordion-button:hover {
    margin-top: -1px !important;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    margin-top: -1px !important;
    box-shadow: none !important;
    color: white !important;
}

/* ── Overrides of global styles (carousel) ── */
.tg-postbook .tg-bookimg {
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    -ms-transform-style: preserve-3d;
    -o-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-transform: perspective(1000px) rotateY(180deg) rotateZ(0deg);
    -moz-transform: perspective(1000px) rotateY(180deg) rotateZ(0deg);
    -ms-transform: perspective(1000px) rotateY(180deg) rotateZ(0deg);
    -o-transform: perspective(1000px) rotateY(180deg) rotateZ(0deg);
    transform: none !important;
}

.Book {
    background-color: transparent !important;
    background: none !important;
}

/* ── Text sections — full-width sleek block ── */
.tp-ShahidSection-2.mk-section,
.tp-ShahidSection-3.mk-section,
.tp-ShahidSection-8.mk-section {
    direction: rtl;
    text-align: justify;
    padding: 3rem 0;
}

.tp-ShahidSection-2.mk-section,
.tp-ShahidSection-8.mk-section {
    background: #fff;
}

.tp-ShahidSection-3.mk-section {
    background: #fafbfc;
}

.mk-section__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mk-section__title {
    margin: 0;
    font-size: clamp(1.35rem, 2.5vw, 1.65rem);
    color: #2a5687;
    flex-shrink: 0;
}

.mk-section__rule {
    flex: 1;
    height: 2px;
    background: linear-gradient(to left, #2a5687, rgba(42, 86, 135, 0.08));
    border-radius: 1px;
}

.mk-section__text {
    color: #4a5568;
    font-size: 17px;
    line-height: 1.95;
    text-align: justify;
}

.mk-section__text p {
    margin: 0 0 1rem;
}

.mk-section__text p:last-child {
    margin-bottom: 0;
}

/* ── Scientific credentials accordion ── */
.tp-ShahidSection-7.mtq-certs {
    padding: 4rem 0;
    background-color: #eef3f8;
    background-image: url("/assets/imgs/BgVectorShahid.svg");
    background-size: cover;
    background-position: center;
}

.tp-ShahidSection-7.mtq-certs > .container {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(42, 86, 135, 0.1);
    border-radius: 12px;
    padding: clamp(2rem, 3vw, 2.75rem);
    box-shadow: 0 4px 24px rgba(42, 86, 135, 0.08);
}

.mtq-certs__intro {
    direction: rtl;
    margin-bottom: 2rem;
}

.mtq-certs__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.mtq-certs__title {
    margin: 0;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    color: #2a5687;
}

.mtq-certs__rule {
    flex: 1;
    height: 2px;
    background: linear-gradient(to left, #2a5687, rgba(42, 86, 135, 0.08));
    border-radius: 1px;
    align-self: flex-end;
    margin-bottom: 0.35rem;
}

.mtq-certs__lead {
    margin: 0;
    color: #4a5568;
    font-size: 17px;
    line-height: 1.95;
    text-align: justify;
}

.tp-ShahidSection-7.mtq-certs .accordion {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(42, 86, 135, 0.12);
}

.tp-ShahidSection-7.mtq-certs .accordion-item {
    border: none;
    border-bottom: 1px solid rgba(42, 86, 135, 0.1);
    display: block !important;
}

.tp-ShahidSection-7.mtq-certs .accordion-item:last-child {
    border-bottom: none;
}

.tp-ShahidSection-7.mtq-certs .accordion-header {
    width: 100% !important;
    margin: 0 !important;
}

.tp-ShahidSection-7.mtq-certs .accordion-collapse {
    width: 100% !important;
}

.tp-ShahidSection-7.mtq-certs .accordion-button {
    width: 100% !important;
    min-height: unset !important;
    height: auto !important;
    padding: 1.1rem 1.25rem !important;
    background: #fff !important;
    color: #2a5687 !important;
    font-size: 1rem !important;
    border: none !important;
    box-shadow: none !important;
    margin-top: 0 !important;
    border-radius: 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    direction: rtl;
    transition: background 0.25s ease, color 0.25s ease;
}

.tp-ShahidSection-7.mtq-certs .accordion-button:not(.collapsed),
.tp-ShahidSection-7.mtq-certs .accordion-button[aria-expanded="true"] {
    background: #2a5687 !important;
    color: #fff !important;
}

.tp-ShahidSection-7.mtq-certs .accordion-button span {
    border-left: none !important;
    border-right: 3px solid rgba(42, 86, 135, 0.2);
    padding: 0 0.85rem 0 0 !important;
    flex: 1;
    text-align: right;
}

.tp-ShahidSection-7.mtq-certs .accordion-button:not(.collapsed) span,
.tp-ShahidSection-7.mtq-certs .accordion-button[aria-expanded="true"] span {
    border-right-color: rgba(255, 255, 255, 0.35);
}

.tp-ShahidSection-7.mtq-certs .accordion-button i {
    color: #2a5687;
    transition: transform 0.3s ease;
}

.tp-ShahidSection-7.mtq-certs .accordion-button:not(.collapsed) i,
.tp-ShahidSection-7.mtq-certs .accordion-button[aria-expanded="true"] i {
    color: #fff;
    transform: rotate(180deg);
}

.tp-ShahidSection-7.mtq-certs .accordion-body {
    display: block !important;
    overflow: visible !important;
    padding: 0 !important;
    background: #fafbfc;
}

.tp-ShahidSection-7.mtq-certs .mtq-cert-image {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    background: linear-gradient(135deg, #eef3f8, #fff);
    padding: 1.5rem;
    text-align: center;
}

.tp-ShahidSection-7.mtq-certs .mtq-cert-image img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: min(70vh, 640px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(42, 86, 135, 0.12);
    margin: 0 auto;
    display: block;
}

.tp-ShahidSection-7.mtq-certs .mtq-cert-text {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    padding: 1.5rem 1.75rem !important;
    direction: rtl;
    text-align: justify;
    line-height: 2;
    color: #4a5568;
    font-size: 0.98rem;
    display: block !important;
    box-sizing: border-box;
}

.tp-ShahidSection-7.mtq-certs .mtq-cert-text p {
    margin: 0;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Phone <= 767px — Scientific credentials accordion */
@media (max-width: 767px) {
    .tp-ShahidSection-7.mtq-certs {
        padding: 2rem 0;
    }

    .tp-ShahidSection-7.mtq-certs > .container {
        padding: 1.25rem 1rem;
        border-radius: 10px;
    }

    .mtq-certs__intro {
        margin-bottom: 1.25rem;
    }

    .mtq-certs__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;
        margin-bottom: 0.9rem;
    }

    .mtq-certs__rule {
        width: 100%;
        align-self: stretch;
    }

    .mtq-certs__title {
        font-size: 1.25rem;
    }

    /* Avoid Arabic justify gaps on narrow screens */
    .mtq-certs__lead {
        font-size: 0.95rem;
        line-height: 1.9;
        text-align: right;
        word-spacing: normal;
        letter-spacing: normal;
        text-justify: auto;
    }

    .tp-ShahidSection-7.mtq-certs .accordion-button {
        padding: 0.95rem 1rem !important;
        font-size: 0.92rem !important;
        gap: 0.65rem;
    }

    .tp-ShahidSection-7.mtq-certs .accordion-button span {
        padding: 0 0.65rem 0 0 !important;
        font-size: 0.92rem;
        line-height: 1.55;
    }

    .tp-ShahidSection-7.mtq-certs .mtq-cert-image {
        padding: 1rem;
    }

    .tp-ShahidSection-7.mtq-certs .mtq-cert-image img {
        max-height: 42vh;
    }

    .tp-ShahidSection-7.mtq-certs .mtq-cert-text,
    .tp-ShahidSection-7.mtq-certs .mtq-cert-text p,
    .tp-ShahidSection-7.mtq-certs .accordion-body.TJus,
    .tp-ShahidSection-7.mtq-certs .accordion-body.TJus p {
        text-align: justify !important;
        word-spacing: normal !important;
        letter-spacing: normal !important;
    }

    .tp-ShahidSection-7.mtq-certs .mtq-cert-text {
        padding: 1.1rem 1rem !important;
        font-size: 0.92rem;
        line-height: 1.9;
    }
}

/* ── Audio / teaching samples ── */
.mtq-audio {
    direction: rtl;
    padding: 4rem 0;
    background: #fff;
}

.mtq-audio__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mtq-audio__title {
    margin: 0;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    color: #2a5687;
}

.mtq-audio__rule {
    flex: 1;
    height: 2px;
    background: linear-gradient(to left, #2a5687, rgba(42, 86, 135, 0.08));
    border-radius: 1px;
    align-self: flex-end;
    margin-bottom: 0.35rem;
}

.mtq-audio__grid {
    --bs-gutter-y: 1.25rem;
}

.mtq-audio .SoundBtn {
    border-radius: 14px;
    border: 1px solid rgba(42, 86, 135, 0.12) !important;
    background-color: #f7f9fc !important;
    box-shadow: 0 4px 16px rgba(42, 86, 135, 0.06);
    transition: transform 0.28s ease,
    box-shadow 0.28s ease,
    background-color 0.28s ease,
    border-color 0.28s ease;
    margin-bottom: 0;
    min-height: 72px;
    padding: 1rem 1.1rem;
    gap: 0.75rem;
}

/* Hover — subtle lift, no full blue wash */
.mtq-audio .SoundBtn:hover:not(.SoundBtnActive) {
    background-color: #fff !important;
    border-color: rgba(42, 86, 135, 0.28) !important;
    border-right: 3px solid #2a5687;
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(42, 86, 135, 0.12);
}

.mtq-audio .SoundBtn:hover:not(.SoundBtnActive) > p {
    color: #2a5687 !important;
}

.mtq-audio .SoundBtn:hover:not(.SoundBtnActive) > div.downloadIcon > i,
.mtq-audio .SoundBtn:hover:not(.SoundBtnActive) > div.downloadIcon > a,
.mtq-audio .SoundBtn:hover:not(.SoundBtnActive) > div.downloadIcon > a > i {
    color: #2a5687 !important;
}

.mtq-audio .SoundBtn:hover:not(.SoundBtnActive) > .progress {
    display: none !important;
}

/* Active / playing */
.mtq-audio .SoundBtn.SoundBtnActive {
    background: linear-gradient(135deg, #2a5687 0%, #1e4468 100%) !important;
    border-color: #2a5687 !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(42, 86, 135, 0.22);
}

.mtq-audio .SoundBtn.SoundBtnActive > p {
    color: #fff !important;
}

.mtq-audio .SoundBtn.SoundBtnActive > div.downloadIcon > i,
.mtq-audio .SoundBtn.SoundBtnActive > div.downloadIcon > a,
.mtq-audio .SoundBtn.SoundBtnActive > div.downloadIcon > a > i {
    color: #fff !important;
}

.mtq-audio .SoundBtn > p {
    font-size: 0.95rem;
    line-height: 1.6;
    padding-left: 0.5rem;
    transition: color 0.25s ease;
}

.mtq-audio .SoundBtn > div.downloadIcon > i,
.mtq-audio .SoundBtn > div.downloadIcon > a > i {
    transition: color 0.25s ease, transform 0.25s ease;
}

.mtq-audio .SoundBtn:hover > div.downloadIcon > i.fa-play-circle,
.mtq-audio .SoundBtn:hover > div.downloadIcon > i.fa-pause-circle {
    transform: scale(1.1);
}

.mtq-audio .SoundBtn > div.downloadIcon > i.fa-play-circle:hover,
.mtq-audio .SoundBtn > div.downloadIcon > i.fa-pause-circle:hover {
    color: #539ba5 !important;
}

.mtq-audio .SoundBtn > div.downloadIcon > a > i.fa-cloud-download-alt:hover,
.mtq-audio .SoundBtn > div.downloadIcon > i.fa-share-alt:hover {
    color: #539ba5 !important;
}

.mtq-audio .SoundBtn.SoundBtnActive > div.downloadIcon > i.fa-play-circle:hover,
.mtq-audio .SoundBtn.SoundBtnActive > div.downloadIcon > i.fa-pause-circle:hover,
.mtq-audio .SoundBtn.SoundBtnActive > div.downloadIcon > a > i:hover,
.mtq-audio .SoundBtn.SoundBtnActive > div.downloadIcon > i.fa-share-alt:hover {
    color: rgba(255, 255, 255, 0.85) !important;
}

.mtq-audio .SoundBtn .SocialIconsSound {
    background-color: rgba(42, 86, 135, 0.96);
    border-radius: 14px;
}

.mtq-audio .SoundBtn .SocialIconsSound > div:last-child > a > i {
    color: rgba(255, 255, 255, 0.9);
}

.mtq-audio .SoundBtn .SocialIconsSound > div:last-child > a > i:hover {
    color: #fff !important;
}

.mtq-audio .SoundBtn .SocialIconsSound > div:first-child > i:hover {
    color: #f0c674 !important;
}

.mtq-audio .SoundBtn .progress {
    background-color: rgba(255, 255, 255, 0.25);
}

.mtq-audio .SoundBtn .progress > span {
    background-color: #7ec8a3;
}

/* Phone <= 767px — Audio / teaching samples */
@media (max-width: 767px) {
    .mtq-audio__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .mtq-audio__rule {
        width: 100%;
        align-self: stretch;
    }
}

/* ── Photo gallery ── */
.tp-ShahidSection-9.mk-gallery {
    padding: 4rem 0;
    background: linear-gradient(180deg, #f0f4f9 0%, #fff 100%);
}

.mk-gallery__card {
    direction: rtl;
    background: #fff;
    border: 1px solid rgba(42, 86, 135, 0.1);
    border-radius: 12px;
    padding: clamp(1.75rem, 3vw, 2.5rem);
    box-shadow: 0 4px 24px rgba(42, 86, 135, 0.08);
    overflow: hidden;
    position: relative;
}

.mk-gallery__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #539ba5, #2a5687, #539ba5);
}

.mk-gallery__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.mk-gallery__title-wrap {
    flex-shrink: 0;
}

.mk-gallery__title {
    margin: 0;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    color: #2a5687;
}

.mk-gallery__rule {
    flex: 1;
    height: 2px;
    background: linear-gradient(to left, #2a5687, rgba(42, 86, 135, 0.08));
    border-radius: 1px;
    align-self: flex-end;
    margin-bottom: 0.35rem;
}

.mk-gallery__slide {
    display: block;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(42, 86, 135, 0.12);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    line-height: 0;
}

.mk-gallery__slide::after {
    content: "+";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    background: rgba(42, 86, 135, 0);
    transition: background 0.35s ease;
    pointer-events: none;
}

.mk-gallery__slide:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(42, 86, 135, 0.2);
}

.mk-gallery__slide:hover::after {
    background: rgba(42, 86, 135, 0.45);
}

.mk-gallery__slide img {
    display: block;
    width: 300px;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.mk-gallery__slide:hover img {
    transform: scale(1.06);
}

.mk-gallery__footer {
    display: flex;
    justify-content: center;
    padding-top: 1.75rem;
    margin-top: 1rem;
    border-top: 1px solid rgba(42, 86, 135, 0.1);
}

.mk-gallery__btn {
    border-radius: 999px;
    padding: 0.65rem 2rem;
    min-width: 12rem;
    transition: all 0.3s ease;
}

.mk-gallery__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(42, 86, 135, 0.25);
}

/* Phone <= 767px — Photo gallery */
@media (max-width: 767px) {
    .mk-gallery__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .mk-gallery__rule {
        width: 100%;
        align-self: stretch;
    }

    .mk-gallery__slide img {
        width: 260px;
        height: 190px;
    }
}

/* Gallery mosaic: one large photo + four small ones (5 random photos of the album) */
.mk-gallery__mosaic {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 200px 200px;
    gap: 0.6rem;
}

.mk-gallery__mosaic .mk-gallery__slide {
    width: 100%;
    height: 100%;
}

.mk-gallery__mosaic .mk-gallery__slide:first-child {
    grid-row: 1 / span 2;
}

.mk-gallery__mosaic .mk-gallery__slide img {
    width: 100%;
    height: 100%;
}

/* Phone <= 767px — Gallery mosaic */
@media (max-width: 767px) {
    /* row 1 = the large photo (full width), rows 2-3 = the four small photos (2 per row) */
    .mk-gallery__mosaic {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 210px 120px 120px;
        grid-auto-rows: 120px;
    }

    .mk-gallery__mosaic .mk-gallery__slide:first-child {
        grid-column: 1 / -1;
        grid-row: 1;
    }
}

/* ── Uprising chronicle — vertical timeline ── */
.tp-ShahidSection-10.mk-chronicle {
    direction: rtl;
    padding: 4rem 0;
    background: linear-gradient(180deg, #fff 0%, #f7f9fc 100%);
}

.mk-chronicle__header {
    margin-bottom: 1.75rem;
}

.mk-chronicle__title {
    margin: 0;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    color: #2a5687;
}

.mk-chronicle__timeline {
    position: relative;
    padding-right: 2rem;
    margin-bottom: 2rem;
}

.mk-chronicle__timeline::before {
    content: "";
    position: absolute;
    top: 0.4rem;
    bottom: 0.4rem;
    right: 5px;
    width: 2px;
    background: linear-gradient(
        180deg,
        #2a5687 0%,
        rgba(42, 86, 135, 0.25) 100%
    );
    border-radius: 1px;
}

.mk-chronicle__item {
    position: relative;
    padding-bottom: 1.75rem;
}

.mk-chronicle__item:last-child {
    padding-bottom: 0;
}

.mk-chronicle__marker {
    position: absolute;
    right: -2rem;
    top: 0.45rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #2a5687;
    box-shadow: 0 0 0 3px rgba(42, 86, 135, 0.08);
}

.mk-chronicle__item p {
    margin: 0;
    color: #4a5568;
    font-size: 17px;
    line-height: 1.95;
    text-align: justify;
}

.mk-chronicle__footer {
    display: flex;
    justify-content: center;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(42, 86, 135, 0.1);
}

.mk-chronicle__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    border-radius: 12px;
    padding: 0.85rem 2rem;
    min-width: 16rem;
    max-width: 90%;
    background-color: #2a5687;
    color: #fff;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mk-chronicle__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 86, 135, 0.3);
}

.mk-chronicle__btn-title {
    font-size: 1rem;
    line-height: 1.4;
}

.mk-chronicle__btn-sub {
    font-size: 0.88rem;
    opacity: 0.9;
    line-height: 1.5;
    white-space: nowrap;
}

/* ── Banner feature — institutional hero ── */
.tp-ShahidSection-11-wrap {
    width: 100%;
    margin: 3rem 0;
}

.tp-ShahidSection-11.mk-feature {
    position: relative;
    width: 100%;
    min-height: 520px;
    overflow: hidden;
}

.tp-ShahidSection-11.mk-feature > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.mk-feature__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(
        135deg,
        rgba(20, 45, 70, 0.88) 0%,
        rgba(42, 86, 135, 0.78) 50%,
        rgba(20, 45, 70, 0.86) 100%
    ) !important;
    background-color: transparent !important;
}

/* Re-declares the overlay that the global style.css gives to ".tp-ShahidSection-11 > div" (dark layer covering the photo) */
.tp-ShahidSection-11.mk-feature > .mk-feature__overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.mk-feature__panel {
    direction: rtl;
    width: 100%;
    background: rgba(15, 35, 55, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    padding: clamp(1.5rem, 2.5vw, 2.25rem);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.mk-feature__panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #539ba5, rgba(255, 255, 255, 0.6), #539ba5);
}

.mk-feature__title {
    color: #fff;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    text-align: center;
    margin: 0 0 1.25rem;
    line-height: 1.5;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.mk-feature__body {
    color: rgba(255, 255, 255, 0.96);
    font-size: clamp(1rem, 1.8vw, 1.05rem);
    line-height: 2.05;
    text-align: justify;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.mk-feature__footer {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mk-feature__btn {
    display: inline-block;
    background-color: #fff !important;
    color: #2a5687 !important;
    border: 2px solid #fff !important;
    border-radius: 999px;
    padding: 0.65rem 2rem;
    min-width: 10.5rem;
    transition: all 0.3s ease;
}

.mk-feature__btn:hover {
    background-color: #eef3f8 !important;
    color: #1e3d5c !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Phone <= 767px — Banner feature — institutional hero */
@media (max-width: 767px) {
    .tp-ShahidSection-11-wrap {
        margin: 1.5rem 0;
    }

    .tp-ShahidSection-11.mk-feature {
        min-height: 0;
        height: auto;
        overflow: visible;
    }

    .tp-ShahidSection-11.mk-feature > img {
        object-position: center top;
    }

    /* In-flow overlay so long Arabic text isn't clipped on mobile */
    .tp-ShahidSection-11.mk-feature > .mk-feature__overlay {
        position: relative !important;
        inset: auto;
        left: auto;
        top: auto;
        height: auto !important;
        width: 100%;
        padding: 1.5rem 0.65rem;
        align-items: stretch;
        display: flex;
    }

    .mk-feature__panel {
        padding: 1.15rem 1rem;
        border-radius: 12px;
        background: rgba(15, 35, 55, 0.78);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }

    

    .mk-feature__title {
        font-size: 1.2rem;
        line-height: 1.55;
        margin: 0 0 0.9rem;
        text-align: right;
    }

    .mk-feature__body {
        font-size: 0.92rem;
        line-height: 1.95;
        text-align: justify;
    }

    .mk-feature__footer {
        padding-top: 1rem;
        margin-top: 0.9rem;
    }

    .mk-feature__btn {
        padding: 0.55rem 1.4rem;
        min-width: 9rem;
        font-size: 0.88rem;
    }
}

/* ── Image + text split ── */
.tp-ShahidSection-5.mk-split {
    padding: 3rem 0;
    background: #fff;
}

.mk-split__row {
    direction: rtl;
    align-items: center;
}

.mk-split__content {
    direction: rtl;
}

/* ── Condolences & echoes — patterned panel ── */
.tp-ShahidSection-13.mk-echoes {
    padding: 4rem 0;
    background-color: #eef3f8;
    background-image: url("/assets/imgs/BgVectorShahid.svg");
    background-size: cover;
    background-position: center;
}

.mk-echoes__panel {
    direction: rtl;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(42, 86, 135, 0.1);
    border-radius: 12px;
    padding: clamp(2rem, 3vw, 2.75rem);
    box-shadow: 0 4px 24px rgba(42, 86, 135, 0.08);
}

.mk-echoes__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mk-echoes__title-wrap {
    flex-shrink: 0;
}

.mk-echoes__title {
    margin: 0;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    color: #2a5687;
}

.mk-echoes__rule {
    flex: 1;
    height: 2px;
    background: linear-gradient(to left, #2a5687, rgba(42, 86, 135, 0.08));
    border-radius: 1px;
    align-self: flex-end;
    margin-bottom: 0.35rem;
}

.mk-echoes__text p {
    margin: 0 0 1rem;
    color: #4a5568;
    font-size: 17px;
    line-height: 1.95;
    text-align: justify;
}

.mk-echoes__text p:last-child {
    margin-bottom: 0;
}

.mk-echoes__figure {
    margin: 2rem 0 0;
    text-align: center;
    line-height: 0;
}

.mk-echoes__figure img {
    max-width: min(800px, 100%);
    width: 100%;
    height: auto;
    opacity: 0.92;
}

.tp-ShahidSection-13.mk-echoes .mk-echoes__actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(42, 86, 135, 0.1);
}

.mk-echoes__actions .Mybtn {
    width: 100%;
    text-align: center;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    transition: all 0.3s ease;
}

.mk-echoes__actions .Mybtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(42, 86, 135, 0.2);
}

/* Tablet <= 991px — Condolences & echoes — patterned panel */
@media (max-width: 991px) {
    .tp-ShahidSection-13.mk-echoes .mk-echoes__actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Phone <= 767px — Condolences & echoes — patterned panel */
@media (max-width: 767px) {
    .mk-echoes__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .mk-echoes__rule {
        width: 100%;
        align-self: stretch;
    }

    .tp-ShahidSection-13.mk-echoes .mk-echoes__actions {
        grid-template-columns: 1fr;
    }
}

/* ── Multi-video gallery ── */
.tp-ShahidSection-5b.mk-video {
    padding: 2.25rem 0;
    background: linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
}

.mk-video__card {
    direction: rtl;
    background: #fff;
    border: 1px solid rgba(42, 86, 135, 0.1);
    border-radius: 10px;
    padding: clamp(1.1rem, 2vw, 1.5rem);
    box-shadow: 0 3px 16px rgba(42, 86, 135, 0.07);
    overflow: hidden;
    position: relative;
}

.mk-video__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #539ba5, #2a5687, #539ba5);
}

.mk-video__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.mk-video__title-wrap {
    flex-shrink: 0;
}

.mk-video__title {
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    color: #2a5687;
}

.mk-video__rule {
    flex: 1;
    height: 2px;
    background: linear-gradient(to left, #2a5687, rgba(42, 86, 135, 0.08));
    border-radius: 1px;
    align-self: center;
}

.mk-video__grid {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.mk-video__grid::-webkit-scrollbar {
    display: none;
}

.mk-video__item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 0 0 23%;
    scroll-snap-align: start;
}

.mk-video__stage {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #0f2337;
    box-shadow: 0 4px 14px rgba(42, 86, 135, 0.12);
    text-decoration: none;
    cursor: pointer;
}

.mk-video__stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.4s ease;
}

.mk-video__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(15, 35, 55, 0.1) 0%,
        rgba(15, 35, 55, 0.28) 50%,
        rgba(15, 35, 55, 0.62) 100%
    );
    transition: background 0.3s ease;
    pointer-events: none;
}

.mk-video__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    pointer-events: none;
}

.mk-video__play::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    margin-left: 2px;
    border-style: solid;
    border-width: 7px 0 7px 11px;
    border-color: transparent transparent transparent #2a5687;
}

.mk-video__stage:hover img {
    transform: scale(1.04);
}

.mk-video__stage:hover .mk-video__veil {
    background: linear-gradient(
        160deg,
        rgba(15, 35, 55, 0.18) 0%,
        rgba(42, 86, 135, 0.38) 50%,
        rgba(15, 35, 55, 0.72) 100%
    );
}

.mk-video__stage:hover .mk-video__play {
    transform: translate(-50%, -50%) scale(1.08);
    background: #fff;
    box-shadow: 0 6px 18px rgba(42, 86, 135, 0.3);
}

.mk-video__caption {
    margin: 0.55rem 0 0;
    color: #2a5687;
    font-size: 0.88rem;
    line-height: 1.5;
    text-align: right;
}

/* Tablet <= 991px — Multi-video gallery */
@media (max-width: 991px) {
    .mk-video__item {
        flex: 0 0 45%;
    }
}

/* Phone <= 767px — Multi-video gallery */
@media (max-width: 767px) {
    .tp-ShahidSection-5b.mk-video {
        padding: 1.75rem 0;
    }

    .mk-video__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .mk-video__rule {
        width: 100%;
    }

    .mk-video__grid {
        gap: 0.7rem;
    }

    .mk-video__item {
        flex: 0 0 72%;
    }

    .mk-video__play {
        width: 36px;
        height: 36px;
    }

    .mk-video__play::after {
        border-width: 6px 0 6px 9px;
    }
}

/* h1 of the home page: the name in calligraphy (same idea as the Imam's home page) */
.mtq-name-title {
    max-width: 750px;
    width: 90%;
    text-align: center;
    margin: 1.75rem auto 0;
    background: #ffffff;
}

/* Phone <= 767px — h1 of the home page */
@media (max-width: 767px) {
    .mtq-name-title {
        margin-top: 1.1rem;
    }
}

.mtq-name-title img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ── Small helpers (formerly inline style="" attributes) ── */
.tp-ShahidSection-1 img {
    width: 100%;
}

.mk-prose {
    font-size: 17px;
    line-height: 1.95;
    text-align: justify;
}

.mk-video__caption a {
    color: inherit;
}

/* two download banners at the bottom of the page */
.W100.mk-banners {
    margin: 0;
}

.mk-banners > div {
    position: relative;
    padding: 0;
}

.mk-banners img {
    height: 100%;
    width: 100%;
}

.tp-ShahidSection-3.mtq-works {
    direction: rtl;
    text-align: justify;
}

/* ==========================================================================
   EDGES (the home page of the Martyr Muhammad Taqi): the sections «ولادته ودراسته», «نماذج من تدريس», «مؤلفاته», «خدماته الاجتماعية», «ألبوم الصور»,
   «دوره في الانتفاضة», «أسفاره», «المرئيات»: the texts, the cards and the white frames are on the edge of the header: 16px on the phone (the menu icon, up to 743px or a
   phone on its side), 25px from 744px; from 992px the container is in the middle (960px / 1140px wide), so the same 25px of its padding is the line of the icons of the
   blue bar (57px at 1024px, 95px at 1280px). The container had the 12px of Bootstrap. The other sections are not changed here.
   ========================================================================== */
:is(.tp-ShahidSection-2, .mtq-audio, .tp-ShahidSection-3, .tp-ShahidSection-8, .tp-ShahidSection-9, .tp-ShahidSection-10, .tp-ShahidSection-5, .tp-ShahidSection-5b) > .container {
    padding-left: 25px;
    padding-right: 25px;
}
@media (max-width: 743.98px), (max-width: 991.98px) and (max-height: 500px) {
    :is(.tp-ShahidSection-2, .mtq-audio, .tp-ShahidSection-3, .tp-ShahidSection-8, .tp-ShahidSection-9, .tp-ShahidSection-10, .tp-ShahidSection-5, .tp-ShahidSection-5b) > .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ==========================================================================
   The home page of the Martyr Muhammad Taqi: fixes after the first check on the phone
   ========================================================================== */

/* «نماذج من تدريس»: on the phone the sound cards are on the edge (the columns of the row had 15px of padding: 31px), and the icons are the icons of the sounds page:
   one row, the same centre line, boxes of 24 x 26px with 3px on both sides (from 768px 26px, 6px and icons of 22px). */
@media (max-width: 743.98px), (max-width: 991.98px) and (max-height: 500px) {
    .mtq-audio__grid > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }
}

.mtq-audio .SoundBtn > div.downloadIcon {
    align-items: center;
}

.mtq-audio .SoundBtn > div.downloadIcon > i,
.mtq-audio .SoundBtn > div.downloadIcon > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 26px;
    margin: 0 3px;
    line-height: 1;
}

.mtq-audio .SoundBtn > div.downloadIcon > a > i {
    display: block;
    line-height: 1;
}

/* the cards of this page have a SEPARATE pause icon (it is hidden until a sound plays: main.js shows it and hides the play icon); the box rule above must not show it */
.mtq-audio .SoundBtn > div.downloadIcon > i.fa-pause-circle {
    display: none;
}

@media (min-width: 768px) {
    .mtq-audio .SoundBtn > div.downloadIcon > i,
    .mtq-audio .SoundBtn > div.downloadIcon > a {
        width: 26px;
        margin: 0 6px;
    }

    .mtq-audio .SoundBtn > div.downloadIcon > i,
    .mtq-audio .SoundBtn > div.downloadIcon > a > i {
        font-size: 22px;
    }
}

/* «دوره في الانتفاضة الشعبانية»: less space above (it was 64px of padding + the 64px under the album box); on the phone the line of the timeline is 6px outside the edge
   and the text has 14px more room. */
.tp-ShahidSection-10.mk-chronicle {
    padding-top: 2rem;
}

@media (max-width: 743.98px), (max-width: 991.98px) and (max-height: 500px) {
    .tp-ShahidSection-10.mk-chronicle {
        padding-top: 0.5rem;
    }

    .mk-chronicle__timeline {
        margin-right: -6px;
        padding-right: 1.5rem;
    }

    .mk-chronicle__marker {
        right: -1.5rem;
    }
}

/* «أسفاره»: the column of the text (class col-12) had 15px of padding on the phone and the iPad: the title was 15px inside the edge. */
@media (max-width: 991.98px) {
    .mk-split__content {
        padding-left: 0;
        padding-right: 0;
    }
}

/* the blue lines after the titles of the sections whose header is a column on the phone (the album, the videos, the audio, the certificates): they had flex: 1,
   so in a column their height was 0 and the line was not seen at all. */
@media (max-width: 767.98px) {
    .mtq-certs__rule,
    .mtq-audio__rule,
    .mk-gallery__rule,
    .mk-video__rule {
        flex: none;
        height: 2px;
    }
}

/* «شهادته»: on the phone the panel is on the edge (16px) and its text is closer to it (the padding of the panel 12px instead of 32px). */
@media (max-width: 743.98px), (max-width: 991.98px) and (max-height: 500px) {
    .tp-ShahidSection-13.mk-echoes > .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .mk-echoes__panel {
        margin-left: 0;
        margin-right: 0;
        padding: 0.75rem;
    }
}

/* «شهادته» on the phone: the blue line is in front of the title (in the same row, like the other sections), not under it (the rule of 767px above made the header a column). */
@media (max-width: 767.98px) {
    .mk-echoes__header {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .mk-echoes__rule {
        flex: 1;
        width: auto;
        height: 2px;
        align-self: flex-end;
        margin-bottom: 0.35rem;
    }
}

/* the echoes («شهادته» / «تعازي وأصداء») on the iPad and the desktop: the white panel is on the edge of the header too (25px; 57px at 1024px, 95px at 1280px). Before: 12px
   on the iPad. (The phone, up to 743px or a phone on its side, has its own rule above: 16px.) */
@media (min-width: 744px) and (min-height: 501px), (min-width: 992px) {
    .tp-ShahidSection-13.mk-echoes > .container {
        padding-left: 25px;
        padding-right: 25px;
    }

    .mk-echoes__panel {
        margin-left: 0;
        margin-right: 0;
    }
}
