/* =========================================================
   MISR — QUALITY PAGE
   Unified with About / Technology / Process
   HTML + CONTENT: UNCHANGED
   ========================================================= */

/* ---------- HERO ---------- */

.quality-hero {
    position: relative;
    overflow: hidden;
    padding: 78px 0 64px;
    background:
        radial-gradient(circle at 88% 18%, rgba(216,183,122,.12), transparent 27%),
        linear-gradient(180deg, #fbfcfb 0%, #f4f7f4 100%);
}



.quality-hero::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    left: -220px;
    bottom: -275px;
    border: 1px solid rgba(216,183,122,.16);
    border-radius: 50%;
    box-shadow:
        0 0 0 25px rgba(216,183,122,.025),
        0 0 0 50px rgba(216,183,122,.016);
    pointer-events: none;
}

.quality-hero .container {
    position: relative;
    z-index: 1;
    max-width: 1180px;
}

.quality-hero h1 {
    max-width: 760px;
    margin: 15px 0 17px;
    color: var(--ink);
    font-size: clamp(1.65rem, 2.7vw, 2.45rem);
    line-height: 1.22;
    font-weight: 800;
    letter-spacing: -.015em;
}

.quality-hero .lead {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.82;
}

/* ---------- GENERAL RHYTHM ---------- */

.section {
    padding: 78px 0;
}

.soft-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #f7f9f7 0%, #f2f6f3 100%);
}

.soft-section::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    left: -260px;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid rgba(216,183,122,.10);
    border-radius: 50%;
    pointer-events: none;
}

/* ---------- INTRO / QUALITY APPROACH ---------- */

.quality-hero + .section {
    background: #fff;
}

.quality-hero + .section .split {
    align-items: center;
    gap: 58px;
}

.quality-hero + .section h2 {
    max-width: 620px;
    margin-top: 14px;
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    line-height: 1.3;
    letter-spacing: -.012em;
}

.quality-hero + .section .lead {
    max-width: 650px;
    font-size: .86rem;
    line-height: 1.85;
}

.quote-panel {
    position: relative;
    overflow: hidden;
    padding: 31px 30px 30px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 90% 0%, rgba(216,183,122,.14), transparent 34%),
        var(--ink);
    box-shadow: 0 18px 42px rgba(9,35,49,.10);
}

.quote-panel::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -75px;
    bottom: -75px;
    border: 1px solid rgba(216,183,122,.18);
    border-radius: 50%;
    pointer-events: none;
}

.quote-panel h3 {
    position: relative;
    z-index: 1;
    margin: 13px 0 12px;
    color: #fff;
    font-size: 1.15rem;
    line-height: 1.4;
}

.quote-panel p {
    position: relative;
    z-index: 1;
    max-width: 430px;
    margin: 0;
    color: rgba(255,255,255,.72);
    font-size: .80rem;
    line-height: 1.8;
}

/* ---------- FEATURED TESTS ---------- */

.featured-tests {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 18px;
    margin-top: 34px;
}

.featured-test {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(9,35,49,.035);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.featured-test:hover {
    transform: translateY(-5px);
    border-color: rgba(216,183,122,.48);
    box-shadow: 0 17px 38px rgba(9,35,49,.07);
}

.featured-test-visual {
    position: relative;
    min-height: 126px;
    display: flex;
    align-items: flex-end;
    padding: 17px;
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 20%, rgba(216,183,122,.16), transparent 35%),
        linear-gradient(135deg, rgba(9,35,49,.045), rgba(216,183,122,.065));
}

.featured-test-visual::before {
    content: "";
    position: absolute;
    width: 100px;
    height: 100px;
    top: 22px;
    left: 28px;
    border: 1px solid rgba(9,35,49,.07);
    border-radius: 50%;
}

.featured-test-visual::after {
    content: "";
    position: absolute;
    width: 145px;
    height: 145px;
    top: -82px;
    right: -42px;
    border: 1px solid rgba(216,183,122,.28);
    border-radius: 50%;
}

.featured-test-number {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(216,183,122,.50);
    border-radius: 50%;
    background: rgba(255,255,255,.90);
    color: var(--gold);
    font-size: .60rem;
    font-weight: 900;
}

.featured-test-body {
    flex: 1;
    padding: 21px 20px 23px;
}

.featured-test-body .eyebrow {
    margin-bottom: 9px;
}

.featured-test-body h3 {
    margin: 0 0 8px;
    font-size: .94rem;
    line-height: 1.4;
}

.featured-test-body p {
    margin: 0;
    color: var(--muted);
    font-size: .77rem;
    line-height: 1.75;
}

/* ---------- TESTING MATRIX ---------- */

.quality-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 14px;
    margin-top: 34px;
}

.test-card {
    position: relative;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    padding: 21px 20px 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 7px 21px rgba(9,35,49,.03);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.test-card::after {
    content: "";
    position: absolute;
    width: 70px;
    height: 70px;
    top: -35px;
    right: -28px;
    border: 1px solid rgba(216,183,122,.16);
    border-radius: 50%;
    pointer-events: none;
}

.test-card:hover {
    transform: translateY(-4px);
    border-color: rgba(216,183,122,.45);
    box-shadow: 0 14px 32px rgba(9,35,49,.065);
}

.test-card .num {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-bottom: 13px;
    border: 1px solid rgba(216,183,122,.42);
    border-radius: 9px;
    background: rgba(216,183,122,.05);
    color: var(--gold);
    font-size: .57rem;
    font-weight: 900;
}

.test-card h3 {
    margin: 0 0 7px;
    font-size: .86rem;
    line-height: 1.4;
}

.test-card p {
    margin: 0;
    color: var(--muted);
    font-size: .74rem;
    line-height: 1.72;
}

/* ---------- QUALITY FRAMEWORK ---------- */

.quality-callout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1.05fr) minmax(390px,.95fr);
    gap: 48px;
    align-items: center;
    padding: 42px 44px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        radial-gradient(circle at 100% 0%, rgba(216,183,122,.09), transparent 31%),
        #fff;
    box-shadow: 0 14px 42px rgba(9,35,49,.045);
}

.quality-callout::before {
    content: "";
    position: absolute;
    width: 270px;
    height: 270px;
    left: -175px;
    bottom: -175px;
    border: 1px solid rgba(9,35,49,.05);
    border-radius: 50%;
    pointer-events: none;
}

.quality-callout::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    top: 30px;
    right: 32px;
    border-radius: 50%;
    background: var(--gold);
    opacity: .5;
    box-shadow: 0 0 0 6px rgba(216,183,122,.07);
}

.quality-callout-content {
    position: relative;
    z-index: 1;
}

.quality-callout-content h2 {
    max-width: 620px;
    margin: 13px 0 16px;
    font-size: clamp(1.35rem, 2.1vw, 1.85rem);
    line-height: 1.35;
    letter-spacing: -.012em;
}

.quality-callout-content .lead {
    max-width: 600px;
    font-size: .82rem;
    line-height: 1.8;
}

.standards {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
}

.standard {
    position: relative;
    min-height: 155px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 17px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fbfcfb;
    box-shadow: 0 6px 18px rgba(9,35,49,.025);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.standard::before {
    content: "";
    position: absolute;
    width: 75px;
    height: 75px;
    top: -40px;
    right: -25px;
    border: 1px solid rgba(216,183,122,.16);
    border-radius: 50%;
    pointer-events: none;
}

.standard:hover {
    transform: translateY(-4px);
    border-color: rgba(216,183,122,.46);
    box-shadow: 0 13px 28px rgba(9,35,49,.06);
}

.standard img {
    display: block;
    width: 100%;
    max-width: 105px;
    height: 58px;
    margin: 0 0 10px;
    object-fit: contain;
    object-position: left center;
    transition: transform .3s ease;
}

.standard:hover img {
    transform: scale(1.025);
}

.standard strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-size: .84rem;
    font-weight: 800;
}

.standard span {
    display: block;
    max-width: 175px;
    color: var(--muted);
    font-size: .64rem;
    line-height: 1.5;
}

/* ---------- SAFETY ---------- */

.safety-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 15px;
    margin-top: 34px;
}

.safety-card {
    position: relative;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(9,35,49,.03);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.safety-card::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    top: -45px;
    right: -32px;
    border: 1px solid rgba(216,183,122,.18);
    border-radius: 50%;
    pointer-events: none;
}

.safety-card:hover {
    transform: translateY(-4px);
    border-color: rgba(216,183,122,.46);
    box-shadow: 0 14px 32px rgba(9,35,49,.065);
}

.safety-card .num {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-bottom: 13px;
    border: 1px solid rgba(216,183,122,.42);
    border-radius: 9px;
    background: rgba(216,183,122,.05);
    color: var(--gold);
    font-size: .57rem;
    font-weight: 900;
}

.safety-card h3 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: .87rem;
    line-height: 1.42;
}

/* ---------- RTL ---------- */

html[dir="rtl"] .quality-hero,
html[dir="rtl"] .featured-test,
html[dir="rtl"] .test-card,
html[dir="rtl"] .quality-callout,
html[dir="rtl"] .standard,
html[dir="rtl"] .safety-card,
.rtl .quality-hero,
.rtl .featured-test,
.rtl .test-card,
.rtl .quality-callout,
.rtl .standard,
.rtl .safety-card {
    direction: rtl;
}

html[dir="rtl"] .quality-hero::before,
.rtl .quality-hero::before {
    right: auto;
    left: -20px;
}

html[dir="rtl"] .quality-hero::after,
.rtl .quality-hero::after {
    left: auto;
    right: -220px;
}

html[dir="rtl"] .soft-section::before,
.rtl .soft-section::before {
    left: auto;
    right: -260px;
}

html[dir="rtl"] .test-card::after,
html[dir="rtl"] .safety-card::after,
html[dir="rtl"] .standard::before,
.rtl .test-card::after,
.rtl .safety-card::after,
.rtl .standard::before {
    right: auto;
    left: -28px;
}

html[dir="rtl"] .quality-callout::before,
.rtl .quality-callout::before {
    left: auto;
    right: -175px;
}

html[dir="rtl"] .quality-callout::after,
.rtl .quality-callout::after {
    right: auto;
    left: 32px;
}

html[dir="rtl"] .standard img,
.rtl .standard img {
    object-position: right center;
}

/* ---------- TABLET ---------- */

@media (max-width: 1050px) {
    .quality-hero {
        padding: 68px 0 55px;
    }

    .quality-hero h1 {
        font-size: 1.95rem;
    }

    .section {
        padding: 68px 0;
    }

    .quality-hero + .section .split {
        gap: 38px;
    }

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

    .quality-callout {
        grid-template-columns: 1fr;
        gap: 34px;
        padding: 38px;
    }

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

/* ---------- MOBILE ---------- */

@media (max-width: 760px) {
    .quality-hero {
        padding: 58px 0 46px;
    }

    .quality-hero::before {
        font-size: 3.5rem;
        top: 18px;
    }

    .quality-hero h1 {
        max-width: 650px;
        font-size: 1.48rem;
        line-height: 1.25;
    }

    .quality-hero .lead {
        font-size: .79rem;
        line-height: 1.78;
    }

    .section {
        padding: 56px 0;
    }

    .quality-hero + .section .split {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .quality-hero + .section h2 {
        font-size: 1.38rem;
    }

    .quality-hero + .section .lead {
        font-size: .79rem;
    }

    .quote-panel {
        padding: 25px 22px;
        border-radius: 16px;
    }

    .quote-panel h3 {
        font-size: 1rem;
    }

    .quote-panel p {
        font-size: .76rem;
    }

    .featured-tests,
    .quality-grid,
    .safety-grid {
        grid-template-columns: 1fr;
        gap: 13px;
        margin-top: 27px;
    }

    .featured-test-visual {
        min-height: 112px;
    }

    .featured-test-body {
        padding: 19px 18px 21px;
    }

    .featured-test-body h3 {
        font-size: .88rem;
    }

    .featured-test-body p,
    .test-card p {
        font-size: .73rem;
    }

    .test-card {
        min-height: 0;
        padding: 19px 18px 20px;
    }

    .quality-callout {
        padding: 30px 21px;
        gap: 27px;
        border-radius: 19px;
    }

    .quality-callout-content h2 {
        font-size: 1.25rem;
    }

    .quality-callout-content .lead {
        font-size: .77rem;
    }

    .standards {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .standard {
        min-height: 140px;
        padding: 17px;
    }

    .standard img {
        max-width: 105px;
        height: 55px;
    }

    .safety-card {
        min-height: 125px;
        padding: 19px 18px;
    }
}

/* ---------- SMALL MOBILE ---------- */

@media (max-width: 430px) {
    .quality-hero {
        padding: 52px 0 42px;
    }

    .quality-hero h1 {
        font-size: 1.36rem;
    }

    .quality-hero .lead {
        font-size: .76rem;
    }

    .section {
        padding: 50px 0;
    }

    .quality-hero + .section h2 {
        font-size: 1.28rem;
    }

    .featured-test-body p,
    .test-card p {
        font-size: .71rem;
    }

    .quality-callout {
        padding: 27px 18px;
        border-radius: 17px;
    }

    .quality-callout-content h2 {
        font-size: 1.16rem;
    }

    .standard {
        min-height: 132px;
        padding: 16px;
    }

    .safety-card {
        min-height: 118px;
        padding: 17px 16px;
    }
}

/* ---------- REDUCED MOTION ---------- */

@media (prefers-reduced-motion: reduce) {
    .featured-test,
    .test-card,
    .standard,
    .safety-card,
    .standard img {
        transition: none;
    }
}
 html[dir="rtl"] .quality-hero .eyebrow,
.rtl .quality-hero .eyebrow {
    font-size: 2rem !important;
    letter-spacing: 0 !important;
}
/* =========================================================
   ARABIC TYPOGRAPHY SCALE — QUALITY PAGE
   Arabic only
========================================================= */

html[dir="rtl"] .quality-hero .eyebrow,
.rtl .quality-hero .eyebrow {
    font-size: 2rem !important;
    letter-spacing: 0 !important;
}

html[dir="rtl"] .quality-hero h1,
.rtl .quality-hero h1 {
    font-size: clamp(1.9rem, 3vw, 2.8rem) !important;
}

html[dir="rtl"] .quality-hero .lead,
.rtl .quality-hero .lead {
    font-size: 1rem !important;
    line-height: 1.9 !important;
}


/* INTRO */
html[dir="rtl"] .quality-hero + .section h2,
.rtl .quality-hero + .section h2 {
    font-size: clamp(1.7rem, 2.5vw, 2.2rem) !important;
}

html[dir="rtl"] .quality-hero + .section .lead,
.rtl .quality-hero + .section .lead {
    font-size: 1rem !important;
}


/* QUOTE PANEL */
html[dir="rtl"] .quote-panel h3,
.rtl .quote-panel h3 {
    font-size: 1.3rem !important;
}

html[dir="rtl"] .quote-panel p,
.rtl .quote-panel p {
    font-size: .95rem !important;
}


/* FEATURED TESTS */
html[dir="rtl"] .featured-test-body .eyebrow,
.rtl .featured-test-body .eyebrow {
    font-size: 1rem !important;
    letter-spacing: 0 !important;
}

html[dir="rtl"] .featured-test-body h3,
.rtl .featured-test-body h3 {
    font-size: 1.1rem !important;
}

html[dir="rtl"] .featured-test-body p,
.rtl .featured-test-body p {
    font-size: 1rem !important;
}


/* TESTING CARDS */
html[dir="rtl"] .test-card h3,
.rtl .test-card h3 {
    font-size: 1rem !important;
}

html[dir="rtl"] .test-card p,
.rtl .test-card p {
    font-size: .88rem !important;
}


/* QUALITY FRAMEWORK */
html[dir="rtl"] .quality-callout-content h2,
.rtl .quality-callout-content h2 {
    font-size: clamp(1.55rem, 2.3vw, 2rem) !important;
}

html[dir="rtl"] .quality-callout-content .lead,
.rtl .quality-callout-content .lead {
    font-size: .92rem !important;
}


/* STANDARDS */
html[dir="rtl"] .standard strong,
.rtl .standard strong {
    font-size: .95rem !important;
}

html[dir="rtl"] .standard span,
.rtl .standard span {
    font-size: .78rem !important;
}


/* SAFETY */
html[dir="rtl"] .safety-card h3,
.rtl .safety-card h3 {
    font-size: 1rem !important;
}