/* =========================
   Ocean 2026 UI Patch (RTL)
   ========================= */

:root{
  --bg: #F6FAFF;
  --bg2:#ECF7FF;
  --ink:#0B1B2A;
  --muted:#4C647A;

  --aqua:#23B6D6;
  --sky:#2D7CFF;
  --mint:#43E6C6;

  --card:#FFFFFF;
  --stroke: rgba(20, 35, 55, 0.10);
  --shadow: 0 18px 55px rgba(10, 40, 80, .12);

  --radius: 18px;
  --radius2: 26px;
}

/* Base — ocean background (must win over other stylesheets) */
html,body{ height:100%; }
html{
  background: var(--bg) !important;
}
body{
  background:
    radial-gradient(1100px 650px at 70% -10%, rgba(45,124,255,.20), transparent 60%),
    radial-gradient(900px 600px at 15% 10%, rgba(35,182,214,.18), transparent 55%),
    radial-gradient(900px 600px at 85% 60%, rgba(67,230,198,.14), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2)) !important;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  direction: rtl;
}

/* Subtle animated “water light” */
@keyframes drift {
  0%{ transform: translate3d(0,0,0) scale(1); opacity:.65; }
  50%{ transform: translate3d(18px,-10px,0) scale(1.03); opacity:.9; }
  100%{ transform: translate3d(0,0,0) scale(1); opacity:.65; }
}
.oceanGlow{
  position: fixed;
  inset: -200px;
  pointer-events: none;
  background:
    radial-gradient(550px 320px at 30% 30%, rgba(35,182,214,.18), transparent 60%),
    radial-gradient(620px 360px at 70% 40%, rgba(45,124,255,.16), transparent 60%),
    radial-gradient(520px 320px at 55% 75%, rgba(67,230,198,.12), transparent 60%);
  filter: blur(14px);
  animation: drift 10s ease-in-out infinite;
  opacity: .75;
}

/* Override dark theme variables for light theme */
:root{
  --bg0: var(--bg);
  --bg1: var(--bg);
  --bg2: var(--bg2);
  --surface: rgba(255,255,255,.72);
  --surface2: rgba(255,255,255,.85);
  --card: var(--card);
  --line: var(--stroke);
  --line2: rgba(20, 35, 55, 0.15);
  --text: var(--ink);
  --muted: var(--muted);
  --muted2: rgba(76, 100, 122, 0.7);
  --brand: var(--sky);
  --brand2: var(--aqua);
  --brand3: var(--mint);
}

/* Top nav */
.topbar, header, nav{
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--stroke);
}
.topbar__inner, .container{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.topbar__actions{
  margin-right: auto;
}
.brand, .brand__name{
  color: var(--ink);
}
.nav a, nav a, .topbar a{
  color: var(--muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 14px;
  transition: .18s ease;
}
.nav a:hover, nav a:hover, .topbar a:hover{
  color: var(--ink);
  background: rgba(45,124,255,.08);
}
.nav__link--active{
  color: var(--ink);
  background: rgba(45,124,255,.12);
  font-weight: 800;
}
/* Pull nav in from the right so "تجارب المرضى" (last link) isn’t on the edge and doesn’t get cut off */
.topbar .nav{
  padding-inline-end: 2rem;
}

/* Hero */
.hero{
  max-width: 1060px;
  margin: 0 auto;
  padding: 56px 24px 22px;
  position: relative;
}
.hero--centered{
  text-align: center;
}
.hero__content{
  max-width: 700px;
  margin: 0 auto;
}
.hero__subtitle{
  max-width: 60ch;
  margin: 12px auto 0;
}
.badge{
  display: inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(35,182,214,.10);
  border: 1px solid rgba(35,182,214,.22);
  color: #0E5670;
  font-weight: 700;
  font-size: 13px;
}
.badge--compact{
  width: fit-content;
  margin: 0 auto;
  display: inline-flex;
}
.badge::before{
  content:"";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aqua), var(--mint));
  box-shadow: 0 0 0 4px rgba(35,182,214,.14);
}

.hero h1{
  margin: 14px 0 10px;
  font-size: clamp(30px, 4.2vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.hero p{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

/* Buttons */
.btnRow{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  justify-content: center;
}
.hero--centered .btnRow{
  justify-content: center;
}
.btn{
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.78);
  color: var(--ink);
  padding: 12px 16px;
  border-radius: 16px;
  font-weight: 800;
  cursor:pointer;
  transition: .18s ease;
  box-shadow: 0 10px 25px rgba(10,40,80,.08);
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 16px 35px rgba(10,40,80,.12); }

.btnPrimary{
  border: none;
  color: white;
  background: linear-gradient(135deg, var(--sky), var(--aqua));
  box-shadow: 0 18px 45px rgba(45,124,255,.22);
}
.btnPrimary:hover{ filter: brightness(1.04); }

.btnSoft{
  border: 1px solid rgba(35,182,214,.26);
  background: rgba(35,182,214,.08);
  color: #0E5670;
}

/* Feature cards */
.grid{
  max-width: 1060px;
  margin: 18px auto 0;
  padding: 0 24px 40px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.grid--rtl{
  direction: rtl;
}
@media (max-width: 900px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  background: rgba(255,255,255,.72);
  border: 1px solid var(--stroke);
  border-radius: var(--radius2);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.card--rtl{
  text-align: right;
  direction: rtl;
}
.card::after{
  content:"";
  position:absolute;
  inset: -60px -80px auto auto;
  width: 220px; height: 220px;
  background: radial-gradient(circle at 30% 30%, rgba(67,230,198,.28), transparent 60%),
              radial-gradient(circle at 70% 60%, rgba(45,124,255,.24), transparent 60%);
  filter: blur(10px);
  opacity: .7;
}
.card h3{
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
  text-align: inherit;
}
.card p{
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
  text-align: inherit;
}

/* Footer year */
.footer{
  text-align:center;
  padding: 26px 10px 40px;
  color: rgba(76,100,122,.85);
  font-weight: 700;
}

/* Override dark theme components for light theme */
.page{
  padding: 26px 0 54px;
  background: transparent;
}

/* Stats cards */
.stat{
  background: rgba(255,255,255,.72);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}
.stat__num{
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  margin: 0;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum";
}
.stat__label{
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* Panel/Sidebar */
.panel{
  background: rgba(255,255,255,.72);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

/* Cards */
.card{
  background: rgba(255,255,255,.72);
  border: 1px solid var(--stroke);
}

/* Buttons */
.btn{
  background: rgba(255,255,255,.78);
  border: 1px solid var(--stroke);
  color: var(--ink);
}
.btn--ghost{
  background: rgba(255,255,255,.50);
  border: 1px solid var(--stroke);
  color: var(--ink);
}
.btn--primary{
  background: linear-gradient(135deg, var(--sky), var(--aqua));
  border: none;
  color: white;
  box-shadow: 0 18px 45px rgba(45,124,255,.22);
}

/* Inputs */
.input, .select, .textarea{
  background: rgba(255,255,255,.85);
  border: 1px solid var(--stroke);
  color: var(--ink);
}
.input:focus, .select:focus, .textarea:focus{
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(45,124,255,.12);
}

/* Pills and badges */
.pill{
  background: rgba(255,255,255,.60);
  border: 1px solid var(--stroke);
  color: var(--muted);
}
.pill--brand{
  background: rgba(45,124,255,.12);
  border-color: rgba(45,124,255,.30);
  color: #0E5670;
}

.badge{
  background: rgba(35,182,214,.10);
  border: 1px solid rgba(35,182,214,.22);
  color: #0E5670;
}
.badge--brand{
  background: rgba(45,124,255,.12);
  border-color: rgba(45,124,255,.30);
  color: #0E5670;
}
.badge--teal{
  background: rgba(45,124,255,.12);
  border-color: rgba(45,124,255,.30);
  color: #0E5670;
}

/* Drug cards */
.drugCard{
  background: rgba(255,255,255,.72);
  border: 1px solid var(--stroke);
}
.drugCard__count{
  background: rgba(45,124,255,.12);
  border-color: rgba(45,124,255,.30);
}

/* A-Z Keyboard */
.azKey{
  background: rgba(255,255,255,.60);
  border: 1px solid var(--stroke);
  color: var(--ink);
}
.azKey:hover{
  background: rgba(45,124,255,.15);
  border-color: rgba(45,124,255,.40);
  color: var(--ink);
}
.azKey--active{
  background: rgba(45,124,255,.20);
  border-color: rgba(45,124,255,.50);
  color: var(--ink);
}
.azKey__letter{
  color: var(--ink);
}
.azKey__count{
  color: var(--muted);
}

/* Chips */
.chip{
  background: rgba(255,255,255,.50);
  border: 1px solid var(--stroke);
  color: var(--muted);
}
.chip:hover{
  background: rgba(255,255,255,.70);
  color: var(--ink);
}
.chip--active{
  background: rgba(45,124,255,.12);
  border-color: rgba(45,124,255,.30);
  color: #0E5670;
}

/* Results bar */
.resultsBar{
  color: var(--ink);
}

/* Notice */
.notice{
  background: linear-gradient(180deg, rgba(45,124,255,.10), rgba(255,255,255,.60));
  border: 1px solid rgba(45,124,255,.25);
}
.notice__icon{
  background: rgba(45,124,255,.15);
  border-color: rgba(45,124,255,.35);
}
.notice__text{
  color: var(--muted);
}

/* Kicker */
.kicker{
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* H1, H2, etc */
.h1, h1{
  color: var(--ink);
}
.sub{
  color: var(--muted);
}

/* HR */
.hr{
  border-top: 1px solid var(--stroke);
  margin: 16px 0;
}

/* Modal styling for ocean theme */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.modal__card {
  position: relative;
  width: min(600px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--stroke);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  z-index: 1001;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.8);
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal__title {
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
  margin: 0;
}

.modal__body {
  padding: 20px;
  color: var(--ink);
}

.iconBtn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
}

.iconBtn:hover {
  background: rgba(45, 124, 255, 0.12);
  border-color: rgba(45, 124, 255, 0.3);
  transform: scale(1.05);
}
