/* Home page of the Shaheed Sayyid Abdul Majid al-Khoei (/ar/Abdul-Majid-Khoei).
   Moved out of client/pages/AbdulmajidKhoei.blade.php so the browser can cache it.
   The inner pages use the small <style> in AbdulmajidKhoeiPerson.blade.php.

   TABLE OF CONTENTS, in page order (search for the quoted title)
    1. Text sections (birth, study, activities, institutional work) ... "Text sections"
    2. Mid-page banner ..................... "Mid-page banner"
    3. Image + text (activities, institutional work) ... "Image + text split"
    4. Interfaith dialogue ................. "Interfaith dialogue"
    5. Videos (swipe row) .................. "Multi-video gallery"
    6. Photo album (bricks) ................ "Photo gallery" and "Gallery bricks"
    7. Taqrib / seminars (timeline) ........ "Taqrib / seminars"
    8. Quote (hero overlay) ................ "Quote hero overlay"
    9. Martyrdom ........................... "Martyrdom"
   10. Condolences & echoes ................ "Condolences & echoes"
   11. Name in calligraphy (h1) ............ "h1 of the home page"
   12. Small helpers (hero image, prose text, bottom banners, ambitions section) ... "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).
*/

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

.tp-ShahidSection-2.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;
}

/* ── Mid-page banner ── */
.tp-ShahidSection-4 {
    overflow: hidden;
    line-height: 0;
}

.tp-ShahidSection-4 img {
    width: 100%;
    height: auto;
    display: block;
    min-height: 0;
    /* soft fade at the top and bottom edges so the photo blends into the page */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 6%, #000 90%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 6%, #000 90%, transparent 100%);
}

/* Phone <= 767px — Mid-page banner */
@media (max-width: 767px) {
    .tp-ShahidSection-4 {
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }

    .tp-ShahidSection-4 img {
        width: 100%;
        height: clamp(220px, 58vw, 280px);
        object-fit: cover;
        object-position: center 28%;
        min-height: 0;
    }
}

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

.mk-split--alt {
    background: #fafbfc;
}

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

.mk-split__media {
    line-height: 0;
}

.mk-split__media img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center top;
    border: 1px solid rgba(42, 86, 135, 0.1);
}

.mk-split__media--fit img {
    aspect-ratio: auto;
    object-fit: unset;
    object-position: unset;
    background: none;
    height: auto;
}

.mk-split__content {
    direction: rtl;
}

/* Tablet <= 991px — Image + text split */
@media (max-width: 991px) {
    .mk-split__media {
        margin-bottom: 1.5rem;
    }

    .mk-split__media img {
        aspect-ratio: 16 / 10;
    }

    .mk-split__media--fit img {
        aspect-ratio: auto;
    }
}

/* ── Interfaith dialogue — editorial two-column ── */
.mk-dialogue {
    direction: rtl;
    padding: 4rem 0;
    background: linear-gradient(180deg, #eef3f8 0%, #fff 65%);
}

.mk-dialogue__intro {
    text-align: center;
    margin-bottom: 2.5rem;
}

.mk-dialogue__title {
    margin: 0 0 1rem;
    font-size: clamp(1.45rem, 3vw, 2rem);
    color: #2a5687;
}

.mk-dialogue__ornament {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
}

.mk-dialogue__ornament span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2a5687;
    opacity: 0.3;
}

.mk-dialogue__ornament span:nth-child(2) {
    opacity: 0.65;
    transform: scale(1.25);
}

.mk-dialogue__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    position: relative;
}

.mk-dialogue__body::after {
    content: "";
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    right: 50%;
    width: 1px;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(42, 86, 135, 0.2) 20%,
        rgba(42, 86, 135, 0.2) 80%,
        transparent
    );
    transform: translateX(50%);
}

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

.mk-dialogue__closing {
    margin: 2.25rem auto 0;
    padding-top: 1.5rem;
    max-width: 34rem;
    border-top: 1px solid rgba(42, 86, 135, 0.12);
    text-align: center;
    color: #2a5687;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Tablet <= 991px — Interfaith dialogue — editorial two-column */
@media (max-width: 991px) {
    .mk-dialogue__body {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .mk-dialogue__body::after {
        display: none;
    }

    .mk-dialogue__col + .mk-dialogue__col {
        padding-top: 1.25rem;
        border-top: 1px solid rgba(42, 86, 135, 0.1);
    }
}

/* ── Taqrib / seminars — vertical timeline ── */
.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__lead {
    margin: 0 0 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(42, 86, 135, 0.1);
    color: #4a5568;
    font-size: 17px;
    line-height: 1.95;
    text-align: justify;
}

.mk-chronicle__timeline {
    position: relative;
    padding-right: 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;
}

/* ── Quote hero overlay ── */
.tp-ShahidSection-11-wrap {
    width: 100%;
    margin: 3rem 0;
}

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

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

.mk-quote__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.58) 0%,
        rgba(42, 86, 135, 0.48) 50%,
        rgba(20, 45, 70, 0.56) 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-quote > .mk-quote__overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

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

.mk-quote__panel::before {
    content: "\201D";
    position: absolute;
    bottom: 0.5rem;
    left: 1rem;
    font-size: 4rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.08);
    font-family: Georgia, serif;
    pointer-events: none;
}

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

.mk-quote__block {
    border: none;
    margin: 0;
    padding: 0;
}

.mk-quote__opening {
    color: #fff;
    font-size: clamp(1.2rem, 2.4vw, 1.5rem);
    text-align: right;
    margin: 0 0 0.85rem;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.mk-quote__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 0 1rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.mk-quote__closing {
    color: #fff;
    font-size: clamp(1.2rem, 2.4vw, 1.5rem);
    text-align: left;
    margin: 0;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

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

.mk-quote__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;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.mk-quote__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 — Quote hero overlay */
@media (max-width: 767px) {
    .tp-ShahidSection-11-wrap {
        margin: 1.5rem 0;
    }

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

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

    /* In-flow overlay so section keeps height on mobile */
    .tp-ShahidSection-11.mk-quote > .mk-quote__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-quote__panel {
        padding: 1.15rem 1rem;
        border-radius: 12px;
        background: rgba(15, 35, 55, 0.72);
    }

    .mk-quote__panel::before {
        font-size: 2.75rem;
        bottom: 0.35rem;
        left: 0.65rem;
    }

.mk-quote__context {
        font-size: 0.95rem;
        line-height: 1.75;
        margin: 0 0 0.9rem;
        text-align: right;
    }

    .mk-quote__opening {
        font-size: 1.1rem;
        margin: 0 0 0.7rem;
        text-align: right;
    }

    .mk-quote__body {
        font-size: 0.92rem;
        line-height: 1.95;
        text-align: justify;
        margin: 0 0 0.85rem;
    }

    .mk-quote__closing {
        font-size: 1.1rem;
        line-height: 1.7;
        text-align: left;
    }

    .mk-quote__footer {
        padding-top: 1rem;
        margin-top: 0.85rem;
    }

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

/* ── Martyrdom — memorial with date highlight ── */
.mk-memorial {
    direction: rtl;
    padding: 4rem 0;
    background: linear-gradient(180deg, #f4f6f9 0%, #fff 100%);
}

.mk-memorial__header {
    text-align: center;
    margin-bottom: 2rem;
}

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

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

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

.mk-memorial__moment {
    margin: 2rem 0;
    padding: clamp(1.5rem, 3vw, 2rem);
    background: #fff;
    border: 1px solid rgba(42, 86, 135, 0.12);
    border-right: 3px solid #2a5687;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(42, 86, 135, 0.06);
}

.mk-memorial__date {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(42, 86, 135, 0.1);
}

.mk-memorial__date-h {
    font-size: clamp(1.15rem, 2.2vw, 1.35rem);
    color: #2a5687;
}

.mk-memorial__date-sep {
    color: rgba(42, 86, 135, 0.35);
    font-size: 1.1rem;
}

.mk-memorial__date-g {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: #539ba5;
}

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

.mk-memorial__epitaph {
    margin: 2rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(42, 86, 135, 0.12);
    color: #2a5687;
    font-size: 1.02rem;
    line-height: 1.9;
    text-align: center;
}

/* ── Condolences & echoes — patterned panel ── */
.tp-ShahidSection-7.mjd-ambitions {
    background-image: url("/assets/imgs/majidkhoei/bg-pattern.jpg");
    background-size: 262px 391px;
    background-repeat: repeat;
}

.mk-echoes {
    padding: 4rem 0;
    background-color: #eef3f8;
    background-image: url("/assets/imgs/majidkhoei/bg-pattern.jpg");
    background-size: 262px 391px;
    background-repeat: repeat;
}

.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: center;
}

.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;
}

.mk-echoes__actions {
    display: grid;
    grid-template-columns: repeat(3, 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);
}

/* 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;
    }

    .mk-echoes__actions {
        grid-template-columns: 1fr;
    }
}

/* ── 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;
}

/* Gallery bricks: 6 random photos in 3 columns (2 on phones), different heights.
   A flex column that wraps at a fixed height puts photos 1-2 / 3-4 / 5-6 into the columns the same way in every browser. */
.mk-gallery__bricks {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: space-between;
    height: 420px;
}

.mk-gallery__bricks .mk-gallery__slide {
    width: calc((100% - 1.2rem) / 3);
    margin-bottom: 0.6rem;
}

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

.mk-gallery__bricks .mk-gallery__slide:nth-child(1) { height: 250px; }
.mk-gallery__bricks .mk-gallery__slide:nth-child(2) { height: 150px; }
.mk-gallery__bricks .mk-gallery__slide:nth-child(3) { height: 170px; }
.mk-gallery__bricks .mk-gallery__slide:nth-child(4) { height: 230px; }
.mk-gallery__bricks .mk-gallery__slide:nth-child(5) { height: 210px; }
.mk-gallery__bricks .mk-gallery__slide:nth-child(6) { height: 190px; }

.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 — Gallery bricks */
@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__bricks {
        height: 435px;
    }

    .mk-gallery__bricks .mk-gallery__slide {
        width: calc((100% - 0.6rem) / 2);
    }

    .mk-gallery__bricks .mk-gallery__slide:nth-child(1) { height: 175px; }
    .mk-gallery__bricks .mk-gallery__slide:nth-child(2) { height: 105px; }
    .mk-gallery__bricks .mk-gallery__slide:nth-child(3) { height: 120px; }
    .mk-gallery__bricks .mk-gallery__slide:nth-child(4) { height: 150px; }
    .mk-gallery__bricks .mk-gallery__slide:nth-child(5) { height: 135px; }
    .mk-gallery__bricks .mk-gallery__slide:nth-child(6) { height: 120px; }
}

/* ── Multi-video gallery ── */
.tp-ShahidSection-7b.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-7b.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 as Taqi and the Imam) */
.mjd-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) {
    .mjd-name-title {
        margin-top: 1.1rem;
    }
}

.mjd-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-7.mjd-ambitions {
    padding: 80px 0;
}

/* ==========================================================================
   EDGES (the home page of the Martyr Abdul Majid): the sections «ولادته», «دراسته», «نشاطاته», «العمل المؤسساتي», «طموحاته ورؤاه الفكرية», «المرئيات» (the white frame), «الحوار بين الأديان», «دوره في التقريب بين المذاهب»: the titles and the texts 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 columns of the texts of «نشاطاته», «العمل المؤسساتي» and «طموحاته» (class col-sm-12 / col-12) had 15px of padding on the phone and the iPad: the text was 15px inside the edge. The other sections are not changed.
   ========================================================================== */
:is(.tp-ShahidSection-2, .tp-ShahidSection-3, .tp-ShahidSection-5, .tp-ShahidSection-6, .tp-ShahidSection-7, .tp-ShahidSection-7b, .tp-ShahidSection-8, .tp-ShahidSection-9, .tp-ShahidSection-10, .tp-ShahidSection-12) > .container {
    padding-left: 25px;
    padding-right: 25px;
}

@media (max-width: 743.98px), (max-width: 991.98px) and (max-height: 500px) {
    :is(.tp-ShahidSection-2, .tp-ShahidSection-3, .tp-ShahidSection-5, .tp-ShahidSection-6, .tp-ShahidSection-7, .tp-ShahidSection-7b, .tp-ShahidSection-8, .tp-ShahidSection-9, .tp-ShahidSection-10, .tp-ShahidSection-12) > .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 991.98px) {
    :is(.tp-ShahidSection-5, .tp-ShahidSection-6) .mk-split__content,
    .tp-ShahidSection-7 > .container > .col-12 {
        padding-left: 0;
        padding-right: 0;
    }
}

/* «دوره في التقريب بين المذاهب»: the same as the chronicle of the page of the Martyr Muhammad Taqi: less space above (it was 64px of padding + the space under the box above), and 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 blue lines after the titles of the sections whose header is a column on the phone (the album, the videos): they had flex: 1, so in a column their height was 0 and the line
   was not seen at all (the same fix as the page of the Martyr Muhammad Taqi). */
@media (max-width: 767.98px) {
    .mk-gallery__rule,
    .mk-video__rule {
        flex: none;
        height: 2px;
    }
}

/* «تعازي وأصداء» on the phone (the same as «شهادته» of the page of the Martyr Muhammad Taqi): the panel is on the edge (16px), its text is closer to it (the padding of the panel
   12px instead of 32px), and the blue line is in front of the title, in the same row (the rule of 767px made the header a column and the line 0px high). */
@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;
    }
}

@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;
    }
}
