/* Qatar Care — Open Horizon staging skin.
   Presentation only: no application scripts, translations, content or CMS data change.
   Scoped to the existing public header; admin screens retain their original styling. */
body:has(header nav) {
  --background: 0 0% 100%;
  --foreground: 241 41% 33%;
  --primary: 243 40% 48%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 40% 33%;
  --secondary-foreground: 0 0% 100%;
  --muted: 220 24% 97%;
  --muted-foreground: 230 9% 42%;
  --accent: 243 30% 54%;
  --border: 225 20% 89%;
  --ring: 243 40% 48%;
  background: #fff;
  color: #333278;
}
body:has(header nav) :is(main, footer) :is(h1,h2,h3,h4) { font-weight: 400; }
body:has(header nav) main h2 { font-size: clamp(1.85rem,3vw,2.7rem); line-height: 1.3; font-weight: 300; }
body:has(header nav) main p { line-height: 1.85; }
body:has(header nav) main > section:not(#home) { padding-block: 88px; }
body:has(header nav) .max-w-7xl { max-width: 1280px; padding-inline: 6%; }
body:has(header nav) main section { scroll-margin-top: 150px; }
body:has(header nav) main .text-gradient,
body:has(header nav) main .text-gradient-gold { background: none; color: #49458d; -webkit-text-fill-color: currentColor; }
body:has(header nav) main [class*="shadow"],
body:has(header nav) footer [class*="shadow"] { box-shadow: none; }
body:has(header nav) main [class*="rounded-3xl"],
body:has(header nav) main [class*="rounded-2xl"] { border-radius: 5px; }

/* Spacious two-level header. All eleven existing navigation links remain. */
body:has(header nav) header {
  position: relative; background: #fff; padding: 22px 0 0; border: 0;
  box-shadow: none; backdrop-filter: none; color: #333278;
}
body:has(header nav) header > .max-w-7xl > .flex {
  display: grid; grid-template-columns: 1fr auto; row-gap: 21px;
}
body:has(header nav) header > .max-w-7xl > .flex > div:first-child { grid-column: 1; grid-row: 1; }
body:has(header nav) header img {
  content: url('/images/qatar-care-logo-clean.png'); width: 183px; height: 70px;
  object-fit: contain; filter: none !important;
}
/* Redundant wordmark text remains in the accessibility tree. */
body:has(header nav) header img + div {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
body:has(header nav) header nav {
  grid-column: 1 / -1; grid-row: 2; justify-content: space-between; flex-wrap: wrap;
  gap: 0; border-radius: 0; border: 0; border-top: 1px solid #e4e6ed;
  border-bottom: 1px solid #e4e6ed; box-shadow: none; background: #fff;
  padding: 8px 0; backdrop-filter: none;
}
body:has(header nav) header nav a { padding: 12px 7px; font-size: 11px; font-weight: 500; border-radius: 0; color: #333278; }
body:has(header nav) header > .max-w-7xl > .flex > div:nth-of-type(2) { grid-row: 1; grid-column: 2; }
body:has(header nav) header button { color: #49458d; background: #fff; border-color: #dedde9; box-shadow: none; font-weight: 500; }
body:has(header nav) header [data-slot="button"] { background: transparent; color: #49458d; border: 1px solid #aaa5d3; box-shadow: none; font-size: 12px; font-weight: 500; }
body:has(header nav) header > .max-w-7xl a[href="/#contact"]:not(nav a) { background: transparent; color: #49458d; border: 1px solid #aaa5d3; box-shadow: none; font-size: 12px; font-weight: 500; }
body:has(header nav) header > div:last-child { background: #fff; border-color: #e4e6ed; }
body:has(header nav) header > div:last-child a { color: #333278; }

/* Original hero copy and all three actions, with the approved artwork. */
#home { min-height: 760px; background: #eef4f6; padding: 48px 0 60px; }
#home > div:first-child { background: #eef4f6 url('/__skin/open-horizon-hero.jpg') center / cover no-repeat; }
#home > div:first-child > img { opacity: 0; }
#home > div:first-child > div { display: none; }
#home > .absolute:not(:first-child) { display: none; }
#home > .relative:has(h1):not(.max-w-7xl) { display: block; width: 100%; max-width: 1280px; margin-inline: auto; padding: 0 6% 22px; }
#home > .relative:has(h1):not(.max-w-7xl) > div { text-align: start; }
#home > .relative:has(h1):not(.max-w-7xl) h1 { font-size: 13px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; }
#home h1 .text-white { color: #555575; }
#home > .max-w-7xl { padding-bottom: 0; }
#home .max-w-3xl { max-width: 60%; }
#home .max-w-3xl > div:first-child > span {
  padding: 0; margin-bottom: 22px; border: 0; border-radius: 0;
  background: none; backdrop-filter: none; color: #666678; font-size: 11px;
  font-weight: 500; letter-spacing: 1.5px;
}
#home .max-w-3xl h1 { font-size: clamp(36px,3.55vw,54px); line-height: 1.16; font-weight: 300; letter-spacing: -1.5px; color: #333278; margin-bottom: 27px; }
#home .max-w-3xl h1 span { color: #333278; }
#home .max-w-3xl p { font-size: 15px; line-height: 1.85; color: #575e71; max-width: 530px; margin-bottom: 28px; }
#home .max-w-3xl > div:last-child { flex-wrap: wrap; gap: 12px; }
#home .max-w-3xl a {
  border: 1px solid #aaa6d4; background: rgba(255,255,255,.45); color: #454080;
  padding-inline: 23px; height: 46px; font-size: 12px; font-weight: 500;
  box-shadow: none; backdrop-filter: none; transform: none;
}
#home .max-w-3xl a:hover { background: #f5f3ff; border-color: #7770b6; }
#home .max-w-3xl a svg { width: 16px; height: 16px; }
html[dir="rtl"] #home > div:first-child { transform: scaleX(-1); }
html[dir="rtl"] #home .max-w-3xl h1 { font-weight: 400; letter-spacing: 0; line-height: 1.55; font-size: clamp(32px,3.1vw,47px); }
html[dir="rtl"] #home .max-w-3xl p { line-height: 2; }
html[dir="rtl"] #home .max-w-3xl > div:first-child > span { letter-spacing: 0; }

/* Quiet, open sections. Existing images, prose, statistics and links stay visible. */
#about, #services, #news, #patient-rights { background: #fff; }
#about > .absolute { display: none; }
#about .bg-secondary { background: linear-gradient(110deg,#edf0f8,#f0f6f3); color: #333278; }
#about .bg-secondary [class*="text-white"] { color: #626575; }
#about .bg-secondary h3 { color: #333278; }
#about .bg-secondary > .absolute { display: none; }
#about .text-primary { color: #55508c; }
#about img { border-radius: 3px; }
#about .absolute:has(.bg-accent\/20) { position: relative; inset: auto; border: 0; padding-inline: 0; }
#services > div > .text-center { max-width: none; text-align: start; margin-bottom: 48px; }
#services > div > .grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 48px; }
#services > div > .grid > div {
  display: grid; grid-template-columns: 46px 1fr; column-gap: 20px;
  align-content: start; padding: 30px 0; border: 0; border-top: 1px solid #e1e3eb;
  border-radius: 0; overflow: visible; background: transparent; transform: none !important;
}
#services > div > .grid > div > .absolute { display: none; }
#services > div > .grid > div > .w-12 { grid-column: 1; grid-row: 1 / 4; background: #f1f3f8; color: #5b5794; width: 40px; height: 40px; border-radius: 50%; margin: 0; }
#services > div > .grid > div > :is(h3,p,.flex:not(.w-12)) { grid-column: 2; }
#services > div > .grid > div > h3 { font-size: 21px; font-weight: 400; line-height: 1.4; margin-bottom: 12px; }
#services > div > .grid > div > p { font-size: 14px; }
#services > div > .grid > div > .flex:not(.w-12) { border: 0; padding-top: 5px; font-size: 12px; font-weight: 500; }
#services > div > .grid > div > div:has(> img) { grid-column: 1 / -1; width: 100%; margin: 0 0 20px; padding: 0; border-radius: 3px; }
#services > div > .grid > div:has(img) > .w-12 { grid-row: 2 / 5; }
#why-us { background: #f0f3f8; color: #333278; }
#why-us [class*="text-white"] { color: #626575; }
#why-us :is(h2,h3) { color: #333278; }
#why-us > .absolute { display: none; }
#why-us [class*="bg-white/"] { background: #fff; border-color: #e2e5ed; }
#news .grid > div { border: 0; border-radius: 0; }
#news .grid > div > .p-5 { padding-inline: 0; }
#contact { background: #f6f7fa; }
#contact input,#contact textarea { background: #fff; border-color: #d9dce8; border-radius: 4px; }
#contact .bg-slate-50 { background: #fff; }
#contact button[type="submit"] { box-shadow: none; font-weight: 500; }
body:has(header nav) footer { background: #f2f4f8; color: #333278; border-top: 1px solid #e2e5eb; }
body:has(header nav) footer [class*="text-secondary-foreground/"] { color: #626575; }
body:has(header nav) footer [class*="border-white/"] { border-color: #dce0e9; }
body:has(header nav) footer p { line-height: 1.85; }
body:has(header nav) footer img { filter: none; }
body:has(header nav) a.fixed[href*="wa.me"] { background: #536c65; box-shadow: 0 3px 15px #22344918; }
body:has(header nav) a.fixed[href*="wa.me"]:hover { background: #405950; }

/* Inner pages retain their structure and use the same indigo palette. */
body:has(header nav) .min-h-screen:has(> header) { background: #fff; }
body:has(header nav) main > section:first-child:not(#home):has(h1) { background: linear-gradient(110deg,#edf0f8,#eef6f3); color: #333278; padding-block: 66px; }
body:has(header nav) main > section:first-child:not(#home):has(h1) > .absolute { display: none; }
body:has(header nav) main > section:first-child:not(#home):has(h1) :is(h1,h2) { color: #333278; font-weight: 300; }
body:has(header nav) main > section:first-child:not(#home):has(h1) p { color: #626575; }
body:has(header nav) main [class*="text-teal-"] { color: #5b5794; }
body:has(header nav) main [class~="bg-teal-600"] { background: #59539e; color: #fff; }
body:has(header nav) main [class~="bg-teal-50"] { background: #f0f1f7; }
body:has(header nav) main.pt-24 { padding-top: 60px; }
body:has(header nav) section[aria-labelledby="services-heading"] article { border: 0; border-top: 1px solid #dce0e9; border-radius: 0; padding: 28px 0; }
body:has(header nav) section[aria-labelledby="services-heading"] .grid { gap: 36px; }
body:has(header nav) .min-h-screen[class*="bg-[#0F172A]"]:has(> header) { color: #333278; }
body:has(header nav) .min-h-screen[class*="bg-[#0F172A]"]:has(> header) main [class*="text-white"] { color: #55596c; }
body:has(header nav) .min-h-screen[class*="bg-[#0F172A]"]:has(> header) main :is(h1,h2,h3) { color: #333278; }
body:has(header nav) .min-h-screen[class*="bg-[#0F172A]"]:has(> header) main [class*="border-white/"] { border-color: #dce0e9; }
body:has(header nav) .min-h-screen[class*="bg-[#0F172A]"]:has(> header) main [class*="bg-white/"] { background: #f5f6fa; }
body:has(header nav) .min-h-screen[class*="bg-[#0F172A]"]:has(> header) main :is(input,select,textarea,option) { background: #fff; color: #333278; border-color: #d5d8e3; }
body:has(header nav) .min-h-screen[class*="bg-[#0F172A]"]:has(> header) main ::placeholder { color: #767989; }
body:has(header nav) .min-h-screen[class*="bg-[#0F172A]"]:has(> header) main button[class*="bg-teal-"] { color: #fff; }
body:has(header nav) #contact [class*="text-[#25D366]"] { color: #4d7466; }
body:has(header nav) main > .bg-secondary { background: #eef2f8; color: #333278; }
body:has(header nav) main > .bg-secondary [class*="text-white"] { color: #535574; }
body:has(header nav) header ~ section[class*="pt-32"] { padding-top: 65px; background: linear-gradient(110deg,#edf0f8,#eef6f3); color: #333278; }
body:has(header nav) header ~ section[class*="pt-32"] > .absolute { display: none; }
body:has(header nav) header ~ section[class*="pt-32"] :is(h1,h2,h3) { color: #333278; font-weight: 300; }
body:has(header nav) header ~ section[class*="pt-32"] :is(p,button) { color: #626575; }
body:has(header nav) header ~ section:not(#home) h2 { font-weight: 400; }
html[dir="rtl"] body:has(header nav) main h2 { font-weight: 400; line-height: 1.6; }
html[dir="rtl"] body:has(header nav) header nav a { font-size: 12px; }
@media(min-width:768px) and (max-width:1100px) {
  body:has(header nav) header nav { justify-content: flex-start; gap: 0 10px; }
  body:has(header nav) header nav a { font-size: 11px; padding: 10px 5px; }
  #home .max-w-3xl { max-width: 66%; }
  #home > div:first-child { background-position: 57% center; }
}
@media(max-width:767px) {
  body:has(header nav) header { padding: 14px 0; }
  body:has(header nav) header > .max-w-7xl > .flex { display: flex; gap: 16px; }
  body:has(header nav) header img { width: 150px; height: 58px; }
  body:has(header nav) header nav { display: none; }
  body:has(header nav) header > div:last-child { max-height: min(85vh,800px); overflow-y: auto; }
  body:has(header nav) header > div:last-child.max-h-0 { max-height: 0; }
  #home { min-height: 0; padding: 32px 0 345px; }
  #home > div:first-child {
    top: auto; bottom: 0; height: 350px; background-position: 75% center;
    mask-image: linear-gradient(to bottom,transparent,#000 25%);
  }
  #home .max-w-3xl { max-width: 100%; }
  #home .max-w-3xl h1 { font-size: clamp(29px,7.5vw,43px); line-height: 1.3; letter-spacing: -.9px; }
  #home .max-w-3xl p { font-size: 14px; line-height: 1.85; }
  #home .max-w-3xl > div:last-child { flex-direction: row; }
  #home .max-w-3xl a { padding-inline: 18px; font-size: 12px; }
  html[dir="rtl"] #home .max-w-3xl h1 { font-size: 31px; line-height: 1.6; }
  body:has(header nav) main > section:not(#home) { padding-block: 56px; }
  #services > div > .grid { grid-template-columns: 1fr; gap: 0; }
  body:has(header nav) main section { scroll-margin-top: 20px; }
}
@media(prefers-reduced-motion:reduce) {
  body:has(header nav) .animate-scroll { animation: none; }
}
