/* ROUH V8 – reference-match refinements. Loads AFTER V7 and respects all CSS theme variables. */
:root{--rouh8-gap:17px;--rouh8-ink:#102f4c}
html{scroll-behavior:smooth}body{overflow-x:clip}
.header{background:rgba(255,255,255,.99);border-bottom:1px solid #e6eff0;box-shadow:0 3px 15px #0b354209}
.header-inner{min-height:66px;gap:clamp(12px,1.3vw,24px)}
.logo{max-width:315px;gap:9px}.rouh-brand-lockup{line-height:1.1}.rouh-brand-image{max-height:51px!important;object-fit:contain}.rouh-brand-text strong{font-size:clamp(14px,1.25vw,18px);line-height:1.2}.rouh-brand-text small{line-height:1.3;margin-top:2px;letter-spacing:0}
.nav{flex-wrap:nowrap;gap:clamp(8px,1.15vw,20px)}.nav a{font-size:clamp(10px,.74vw,12px);font-weight:700}.nav a:first-child::after{bottom:-22px}.locale{padding:9px 13px;border-radius:25px}
/* Avoid oversized thyroid image and type collision; orientation-specific focal points. */
.rouh7-hero{min-height:445px;background:#06283f}
.rouh7-hero-inner{min-height:445px;align-items:center}
.rouh7-hero:before{background-image:linear-gradient(90deg,rgba(4,28,48,.95) 0%,rgba(6,43,65,.85) 31%,rgba(5,45,70,.28) 68%,rgba(6,42,64,.1) 100%),var(--rouh7-hero-image,linear-gradient(120deg,#082b45,#087a87));background-position:center,center 45%;background-size:cover;background-repeat:no-repeat}
html[dir="rtl"] .rouh7-hero:before{background-image:linear-gradient(270deg,rgba(4,28,48,.96) 0%,rgba(6,40,64,.85) 32%,rgba(6,46,68,.24) 69%,rgba(4,36,56,.12) 100%),var(--rouh7-hero-image,linear-gradient(120deg,#082b45,#087a87));background-position:center,center 45%}
.rouh7-hero-copy{max-width:min(625px,56%);padding:52px 0 65px}.rouh7-eyebrow{font-size:12px;letter-spacing:.015em}.rouh7-hero h1{font-size:clamp(31px,3.05vw,46px);line-height:1.28;max-width:630px;letter-spacing:-.025em;margin:14px 0 13px;text-wrap:balance}.rouh7-hero p{font-size:14px;line-height:1.85;max-width:575px;margin:0}
.rouh7-search{max-width:100%;min-height:55px;margin:23px 0 12px;border:1px solid #d8e8eb;padding:5px 7px 5px 14px}.rouh7-search input{font-size:13px;min-height:38px}.rouh7-search button{min-width:88px;padding:12px 17px}.rouh7-chips{font-size:11px;gap:7px}.rouh7-chips a{background:rgba(8,52,76,.38);padding:6px 12px}
.rouh7-proof{max-width:var(--rouh-max);margin-top:-28px!important;border-radius:14px;padding:18px 22px;gap:12px;box-shadow:0 12px 27px #0d3b5214}.rouh7-proof>div{gap:9px}.rouh7-proof-icon{width:43px;height:43px;border-radius:50%;font-size:22px}.rouh7-proof strong{font-size:12px}.rouh7-proof small{font-size:10px}
.rouh7-home-content{background:#fff}.rouh7-section{padding-top:44px;padding-bottom:9px}.rouh7-heading{margin-bottom:18px;align-items:end}.rouh7-heading h2{font-size:clamp(23px,2vw,29px);line-height:1.35}.rouh7-heading p{font-size:12px}.rouh7-heading>a{background:#fff;transition:background .2s}.rouh7-heading>a:hover{background:#eaf8f7}
.rouh7-ency-grid,.rouh7-content-grid{gap:var(--rouh8-gap)}.rouh7-ency-card,.rouh7-content-card{border-radius:9px;box-shadow:0 3px 14px #123b4c0d}.rouh7-ency-photo{height:148px}.rouh7-ency-description{padding:13px 13px 16px}.rouh7-ency-description h3,.rouh7-content-copy h3{font-size:14px;margin-bottom:5px}.rouh7-ency-description p{font-size:11px;line-height:1.7;margin-bottom:11px}.rouh7-test-grid{gap:11px}.rouh7-test-card{padding:15px 6px 12px;min-height:120px}.rouh7-test-ico{width:42px;height:42px}.rouh7-content-image{height:140px}.rouh7-content-copy{padding:12px}.rouh7-content-copy p{line-height:1.65}.rouh7-section-doctors .rouh7-content-image{height:205px}
/* Public listing and detail content, keeping medical text readable. */
.rouh7-listing-banner{padding:34px 0}.page-banner{padding:40px 0;background:linear-gradient(120deg,#edf9fb,#f5fbfc)}.page-banner h1{font-size:clamp(27px,2.8vw,40px);line-height:1.3}.page-banner p{max-width:760px;line-height:1.75}
.detail-layout{gap:24px}.article{line-height:1.85}.article-content{line-height:1.85}.article-content h2,.article-content h3{line-height:1.5;scroll-margin-top:95px}.article-content p{margin:0 0 1.1em}.rouh-article-featured{display:block;width:100%;height:auto;max-height:460px;object-fit:cover;border-radius:12px;margin:12px 0 25px}
/* Match layout direction while maintaining accessible language switcher and navigation. */
html[dir="rtl"] .rouh7-hero-copy{text-align:right}html[dir="rtl"] .rouh7-chips{justify-content:flex-start}
@media(min-width:1300px){.rouh7-hero:before{background-size:cover;background-position:center,center 43%}html[dir="rtl"] .rouh7-hero:before{background-position:center,center 43%}}
@media(min-width:751px) and (max-width:1100px){.rouh7-hero-copy{max-width:58%}.rouh7-hero h1{font-size:clamp(28px,3.35vw,39px)}.rouh7-proof{grid-template-columns:repeat(4,minmax(0,1fr));padding:15px}.rouh7-proof strong{font-size:10px}.rouh7-proof small{font-size:9px}}
@media(max-width:750px){
 .header-inner{min-height:63px!important;gap:9px}.logo{max-width:min(68%,300px)}.rouh-brand-image{max-height:43px!important}.rouh-brand-text strong{font-size:13px}.rouh-brand-text small{font-size:9px}.locale{padding:7px 9px;font-size:11px}.mobile-menu{z-index:70}
 .rouh7-hero,.rouh7-hero-inner{min-height:510px}
 .rouh7-hero:before{background-image:linear-gradient(0deg,rgba(3,29,49,.96) 5%,rgba(4,39,62,.9) 39%,rgba(5,46,68,.25) 81%,rgba(4,45,65,.09) 100%),var(--rouh7-hero-image,linear-gradient(120deg,#082b45,#087a87));background-size:cover;background-position:center,center 33%}
 html[dir="rtl"] .rouh7-hero:before{background-image:linear-gradient(0deg,rgba(3,29,49,.96) 5%,rgba(4,39,62,.9) 39%,rgba(5,46,68,.25) 81%,rgba(4,45,65,.09) 100%),var(--rouh7-hero-image,linear-gradient(120deg,#082b45,#087a87));background-position:center,center 33%}
 .rouh7-hero-inner{align-items:flex-end}.rouh7-hero-copy{max-width:100%;padding:190px 0 47px}.rouh7-hero h1{font-size:clamp(25px,6.5vw,35px);line-height:1.31;max-width:560px;margin:9px 0}.rouh7-hero p{font-size:12px;line-height:1.65}.rouh7-search{min-height:48px;margin:16px 0 10px}.rouh7-search button{min-width:64px;padding:10px 11px}.rouh7-chips{gap:5px}.rouh7-chips a{padding:4px 8px;font-size:10px}.rouh7-proof{margin-top:-12px!important;padding:13px 12px;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.rouh7-proof strong{font-size:10px}.rouh7-proof small{font-size:9px}.rouh7-proof-icon{height:35px;width:35px;font-size:17px}
 .rouh7-section{padding-top:33px}.rouh7-heading{gap:10px}.rouh7-heading h2{font-size:20px}.rouh7-heading p{font-size:10px}.rouh7-heading>a{padding:7px 9px;font-size:10px}.rouh7-ency-grid,.rouh7-content-grid,.rouh7-section-services .rouh7-content-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.rouh7-ency-photo,.rouh7-content-image{height:116px}.rouh7-ency-description,.rouh7-content-copy{padding:10px}.rouh7-ency-description h3,.rouh7-content-copy h3{font-size:12px}.rouh7-ency-description p,.rouh7-content-copy p{font-size:10px}.rouh7-test-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.rouh7-test-card{min-height:115px}.rouh7-section-doctors .rouh7-content-image{height:148px}.detail-layout{display:block}.article{margin-bottom:18px}.page-banner{padding:30px 0}
}
@media(max-width:390px){.rouh7-hero,.rouh7-hero-inner{min-height:530px}.rouh7-hero h1{font-size:26px}.rouh7-hero-copy{padding-top:175px}.rouh7-proof>div{gap:6px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
/* ===== ROUH Hero Alignment Fix ===== */

/* container */
.home-hero,
.rouh-hero,
.hero-section {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: right center;
    position: relative;
    overflow: hidden;
}

/* English: image on right */
html[dir="ltr"] .home-hero,
html[dir="ltr"] .rouh-hero,
html[dir="ltr"] .hero-section {
    background-position: right center !important;
}

/* Arabic: image on left */
html[dir="rtl"] .home-hero,
html[dir="rtl"] .rouh-hero,
html[dir="rtl"] .hero-section {
    background-position: left center !important;
}

/* stronger readable overlay */
.home-hero::before,
.rouh-hero::before,
.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(5, 30, 52, 0.82) 0%,
            rgba(5, 30, 52, 0.62) 34%,
            rgba(5, 30, 52, 0.22) 62%,
            rgba(5, 30, 52, 0.08) 100%
        );
    z-index: 1;
}

/* reverse overlay for Arabic */
html[dir="rtl"] .home-hero::before,
html[dir="rtl"] .rouh-hero::before,
html[dir="rtl"] .hero-section::before {
    background:
        linear-gradient(
            270deg,
            rgba(5, 30, 52, 0.82) 0%,
            rgba(5, 30, 52, 0.62) 34%,
            rgba(5, 30, 52, 0.22) 62%,
            rgba(5, 30, 52, 0.08) 100%
        );
}

/* keep content above overlay */
.home-hero > *,
.rouh-hero > *,
.hero-section > * {
    position: relative;
    z-index: 2;
}

/* limit text width */
.home-hero .hero-content,
.rouh-hero .hero-content,
.hero-section .hero-content {
    max-width: 620px;
}

/* push content away from image */
html[dir="ltr"] .home-hero .hero-content,
html[dir="ltr"] .rouh-hero .hero-content,
html[dir="ltr"] .hero-section .hero-content {
    margin-right: auto;
    margin-left: 0;
}

html[dir="rtl"] .home-hero .hero-content,
html[dir="rtl"] .rouh-hero .hero-content,
html[dir="rtl"] .hero-section .hero-content {
    margin-left: auto;
    margin-right: 0;
}

/* mobile */
@media (max-width: 991px) {
    .home-hero,
    .rouh-hero,
    .hero-section {
        background-position: center top !important;
    }

    .home-hero .hero-content,
    .rouh-hero .hero-content,
    .hero-section .hero-content {
        max-width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* ===== ROUH HERO IMAGE POSITION ===== */

/* English: medical image on the right */
html[dir="ltr"] .hero {
    background-position: 85% center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}

/* Arabic: medical image on the left */
html[dir="rtl"] .hero {
    background-position: 15% center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}

/* Keep text above the image overlay */
.hero .wrap,
.hero .hero-copy {
    position: relative;
    z-index: 2;
}

/* Mobile adjustments */
@media (max-width: 767px) {
    html[dir="ltr"] .hero {
        background-position: 70% center !important;
    }

    html[dir="rtl"] .hero {
        background-position: 30% center !important;
    }
}

/* ===== FINAL HERO IMAGE ALIGNMENT ===== */

/* English: image on right */
@media (min-width: 751px) {
    html[dir="ltr"] .rouh7-hero::before {
        background-position: center, 100% 45% !important;
        background-size: cover, 78% auto !important;
        background-repeat: no-repeat, no-repeat !important;
        background-color: #06283f;
    }

    /* Arabic: image on left */
    html[dir="rtl"] .rouh7-hero::before {
        background-position: center, 0% 45% !important;
        background-size: cover, 78% auto !important;
        background-repeat: no-repeat, no-repeat !important;
        background-color: #06283f;
    }
}

/* Mobile: preserve visible anatomy above content */
@media (max-width: 750px) {
    html[dir="ltr"] .rouh7-hero::before {
        background-position: center, 76% 30% !important;
        background-size: cover, auto 72% !important;
    }

    html[dir="rtl"] .rouh7-hero::before {
        background-position: center, 24% 30% !important;
        background-size: cover, auto 72% !important;
    }
}
/* ROUH Hero - final image size and placement */

@media (min-width: 751px) {
  html[dir="rtl"] .rouh7-hero::before {
    background-position: center, left 42% !important;
    background-size: cover, 64% auto !important;
  }

  html[dir="ltr"] .rouh7-hero::before {
    background-position: center, right 42% !important;
    background-size: cover, 64% auto !important;
  }
}
