/*
Theme Name: MEDRA Landing
Theme URI: https://medra.health
Author: MR1 Smart Solutions
Author URI: https://mr1-sa.com
Description: قالب ووردبريس مخصص لصفحة هبوط MEDRA لمنصة المتابعة الصحية عن بُعد. تصميم عربي RTL كامل بألوان MEDRA (navy/teal)، مبني بـ HTML5/CSS3/JavaScript بدون أي مكتبات خارجية. الصفحة الرئيسية فقط تستخدم front-page.php؛ باقي الصفحات والمقالات تُعرض بمحتواها الحقيقي عبر page.php/single.php/index.php.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: medra-landing
Tags: healthcare, rtl, arabic, one-page, custom-theme
*/

/* =========================================================
   MEDRA — Remote Patient Monitoring Landing Page
   Design system: navy / teal, clean clinical aesthetic
   ========================================================= */

:root{
  --medra-navy: #113B68;
  --medra-navy-dark: #082E55;
  --medra-blue: #126D9B;
  --medra-teal: #16A3AA;
  --medra-teal-light: #DFF5F5;

  --background: #FFFFFF;
  --background-soft: #F5F8FB;
  --background-blue: #EDF4F8;

  --text-primary: #12385F;
  --text-secondary: #64748B;
  --border: #DDE7EF;
  --white: #FFFFFF;

  --font-ar: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 10px rgba(17, 59, 104, 0.06);
  --shadow-md: 0 10px 30px rgba(17, 59, 104, 0.08);

  --ease: cubic-bezier(.22,.68,0,1);
}

*, *::before, *::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body{
  margin: 0;
  font-family: var(--font-ar);
  color: var(--text-primary);
  background: var(--background);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3{
  color: var(--medra-navy);
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 14px;
}

p{ margin: 0 0 12px; color: var(--text-secondary); }

a{ color: inherit; text-decoration: none; }

img{ max-width: 100%; display: block; }

ul, ol{ margin: 0; padding: 0; list-style: none; }

button{ font-family: inherit; cursor: pointer; }

input, select{ font-family: inherit; }

.container{
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 24px;
}

.skip-link{
  position: absolute;
  right: -9999px;
  top: 0;
  background: var(--medra-navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 0 8px;
  z-index: 999;
}
.skip-link:focus{ right: 0; }

:focus-visible{
  outline: 3px solid var(--medra-teal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-2px); }

.btn-primary{
  background: var(--medra-navy);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover{ background: var(--medra-navy-dark); box-shadow: var(--shadow-md); }

.btn-ghost{
  background: transparent;
  color: var(--medra-navy);
  border-color: var(--border);
}
.btn-ghost:hover{ border-color: var(--medra-teal); color: var(--medra-teal); }

.btn-accent{
  background: var(--medra-teal);
  color: #fff;
}
.btn-accent:hover{ background: #128f95; }

.btn-lg{ padding: 15px 34px; font-size: 16px; }
.btn-block{ width: 100%; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.scrolled{
  border-bottom-color: var(--border);
  box-shadow: 0 2px 16px rgba(17,59,104,0.05);
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
  color: var(--medra-navy);
  letter-spacing: 0.5px;
}
.brand-mark{ display: inline-flex; }
.brand-logo-img{
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}
.brand-mark--footer .brand-logo-img{
  width: 60px;
  height: 60px;
}

.nav-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.nav-toggle span{
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: var(--medra-navy);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity: 0; }
.nav-toggle.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.primary-nav{
  display: flex;
  align-items: center;
  gap: 28px;
}
.primary-nav ul{
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-link{
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-primary);
  position: relative;
  padding: 6px 0;
  transition: color .2s;
}
.nav-link::after{
  content: '';
  position: absolute;
  right: 0; left: 0; bottom: -2px;
  height: 2px;
  background: var(--medra-teal);
  transform: scaleX(0);
  transition: transform .25s var(--ease);
}
.nav-link:hover{ color: var(--medra-teal); }
.nav-link.active{ color: var(--medra-navy); font-weight: 700; }
.nav-link.active::after{ transform: scaleX(1); }

/* =========================================================
   SECTION SCAFFOLDING
   ========================================================= */
.section{ padding: 90px 0; }
.section--soft{ background: var(--background-soft); }
.section--tint{ background: var(--background-blue); }

.section-head{
  text-align: center;
  max-width: 720px;
  margin: 0 auto 52px;
}
.section-head--start{
  text-align: right;
  margin: 0 0 40px;
  max-width: none;
}

.eyebrow{
  display: inline-block;
  color: var(--medra-teal);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
  position: relative;
  padding-inline-start: 22px;
}
.eyebrow::before{
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 2px;
  background: var(--medra-teal);
}
.eyebrow--center{ padding-inline-start: 0; }
.eyebrow--center::before{ display: none; }

.section-head h2{
  font-size: clamp(26px, 3vw, 36px);
}
.section-intro{
  font-size: 16.5px;
  margin-top: 10px;
}

/* =========================================================
   HERO
   ========================================================= */
.hero{
  padding: 76px 0 90px;
  background:
    radial-gradient(1000px 500px at 100% -10%, rgba(22,163,170,0.06), transparent 60%),
    var(--background);
  overflow: hidden;
}
.hero-grid{
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-copy .eyebrow{ padding-inline-start: 0; }
.hero-copy .eyebrow::before{ display: none; }

.hero-copy h1{
  font-size: clamp(34px, 4.4vw, 52px);
  margin-bottom: 6px;
}
.brand-word{ color: var(--medra-teal); direction: ltr; display: inline-block; }

.hero-subhead{
  font-size: 19px;
  font-weight: 600;
  color: var(--medra-blue);
  margin-bottom: 18px;
}

.hero-text{ font-size: 16px; max-width: 560px; }

.hero-actions{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 26px;
}

.pill-row{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pill{
  background: var(--medra-teal-light);
  color: var(--medra-navy);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(22,163,170,0.25);
}

/* hero phone mock */
.hero-visual{
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-blob{
  position: absolute;
  inset: 0;
  margin: auto;
  width: 380px;
  height: 380px;
  background: var(--medra-teal-light);
  border-radius: 50%;
  filter: blur(0px);
  z-index: 0;
  opacity: .8;
}

.hero-portrait{
  position: relative;
  z-index: 1;
  width: 360px;
  max-width: 100%;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 6px solid #fff;
}
.hero-portrait img{
  width: 100%;
  height: 440px;
  object-fit: cover;
  display: block;
}
.hero-portrait-tag{
  position: absolute;
  top: 18px;
  left: 18px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--shadow-sm);
  min-width: 118px;
}
.hero-portrait-badge{
  position: absolute;
  bottom: 18px;
  right: 18px;
  background: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--medra-navy);
  box-shadow: var(--shadow-sm);
}
.hero-portrait-badge .badge-dot{
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--medra-teal);
  animation: pulse 1.6s infinite ease-in-out;
}

.phone-mock{
  position: relative;
  z-index: 1;
  width: 280px;
  background: var(--medra-navy);
  border-radius: 40px;
  padding: 14px;
  box-shadow: var(--shadow-md);
}
.phone-mock--sm{ width: 240px; }
.phone-notch{
  width: 70px;
  height: 8px;
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
  margin: 0 auto 12px;
}
.phone-screen{
  background: var(--background-soft);
  border-radius: 26px;
  padding: 18px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 460px;
  position: relative;
}

.app-topbar{
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-avatar{
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--medra-teal-light);
  border: 2px solid var(--medra-teal);
  flex-shrink: 0;
}
.app-title-lines{ display: flex; flex-direction: column; gap: 6px; flex: 1; }
.app-title-lines span{ display: block; height: 7px; border-radius: 4px; background: var(--border); }
.app-title-lines span:first-child{ width: 70%; background: var(--medra-navy); opacity: .8; }
.app-title-lines span:last-child{ width: 45%; }

.app-card{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.app-card--vitals{ display: flex; flex-direction: column; gap: 4px; }
.app-card-label{ font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.app-card-value{ font-size: 22px; font-weight: 800; color: var(--medra-navy); direction: ltr; text-align: right; }
.app-card-value small{ font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.app-card-status{ font-size: 11.5px; font-weight: 600; color: var(--medra-teal); }
.app-card-status.ok::before{ content: '● '; }

.app-card--chart{ padding-bottom: 6px; }
.app-chart{ width: 100%; height: 44px; margin-top: 4px; }

.app-card--sync{
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--medra-blue);
}
.sync-dot{
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--medra-teal);
  animation: pulse 1.6s infinite ease-in-out;
}
.app-card--device{
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-secondary); font-weight: 600;
}
.device-dot{ width: 7px; height: 7px; border-radius: 50%; background: var(--medra-teal); }

@keyframes pulse{
  0%, 100%{ opacity: 1; transform: scale(1); }
  50%{ opacity: .4; transform: scale(1.4); }
}

.app-fab{
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--medra-teal);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 6px 16px rgba(22,163,170,0.4);
}

/* =========================================================
   ROLE TABS
   ========================================================= */
.role-tabs{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}
.role-tab{
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14.5px;
  padding: 11px 26px;
  border-radius: 999px;
  transition: background .2s, color .2s, border-color .2s;
}
.role-tab:hover{ color: var(--medra-navy); border-color: var(--medra-teal); }
.role-tab.is-active{
  background: var(--medra-navy);
  color: #fff;
  border-color: var(--medra-navy);
}

.role-panel{ display: none; }
.role-panel.is-active{ display: block; }

.role-panel-grid{
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 44px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.role-panel-grid--wide{ grid-template-columns: 0.7fr 1.3fr; }

.role-panel-kicker{
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--medra-teal);
  background: var(--medra-teal-light);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.role-panel-desc{ font-size: 15.5px; margin-bottom: 20px; }
.role-caps{ display: flex; flex-direction: column; gap: 12px; }
.role-caps li{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--medra-navy);
}
.role-cap-icon{ display: inline-flex; flex-shrink: 0; }
.role-cap-icon svg{ width: 20px; height: 20px; }

.role-panel-visual{ display: flex; justify-content: center; }
.role-panel-visual--wide{ overflow-x: auto; }

.dash-mock--sm{ width: 100%; max-width: 340px; }

.app-card--consult{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--medra-navy);
  background: var(--medra-teal-light);
  border-color: transparent;
}
.consult-icon{ display: inline-flex; flex-shrink: 0; }
.consult-icon svg{ width: 20px; height: 20px; }

/* =========================================================
   ADMIN DASHBOARD MOCKUP
   ========================================================= */
.admin-dash{
  display: grid;
  grid-template-columns: 150px 1fr;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  min-width: 620px;
  direction: ltr;
  text-align: left;
}
.admin-dash-sidebar{
  background: var(--medra-navy-dark);
  color: rgba(255,255,255,0.75);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-dash-brand{
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}
.admin-dash-nav{ display: flex; flex-direction: column; gap: 2px; }
.admin-dash-link{
  font-size: 11.5px;
  padding: 7px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-dash-link.is-active{ background: rgba(255,255,255,0.12); color: #fff; font-weight: 700; }
.admin-dash-link em{
  font-style: normal;
  background: #E0733F;
  color: #fff;
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 999px;
}
.admin-dash-navgroup{
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: rgba(255,255,255,0.4);
  margin: 10px 0 2px 8px;
}

.admin-dash-main{ padding: 18px 20px; }
.admin-dash-topbar{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.admin-dash-topbar h4{ font-size: 15px; margin: 0 0 2px; color: var(--medra-navy); }
.admin-dash-topbar span{ font-size: 10.5px; color: var(--text-secondary); }
.admin-dash-actions{ display: flex; gap: 8px; }
.admin-btn{
  font-size: 10.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--medra-navy);
  color: #fff;
}
.admin-btn--ghost{ background: #fff; color: var(--medra-navy); border: 1px solid var(--border); }

.admin-dash-stats{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.admin-stat{
  background: var(--background-soft);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-stat-value{ font-size: 16px; font-weight: 800; color: var(--medra-navy); }
.admin-stat-label{ font-size: 9.5px; color: var(--text-secondary); font-weight: 600; }

.admin-dash-panels{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}
.admin-panel{
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.admin-panel-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--medra-navy);
  margin-bottom: 10px;
}
.admin-panel-link{ font-size: 10px; color: var(--medra-teal); font-weight: 600; }

.admin-patient-row{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
}
.admin-patient-row:last-child{ border-bottom: none; }
.admin-avatar{
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--medra-teal-light);
  color: var(--medra-navy);
  font-size: 9px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.admin-patient-info{ display: flex; flex-direction: column; flex: 1; min-width: 0; }
.admin-patient-info strong{ font-size: 11px; color: var(--text-primary); }
.admin-patient-info em{ font-style: normal; font-size: 9.5px; color: var(--text-secondary); }
.admin-patient-vitals{ font-size: 11px; font-weight: 700; color: var(--medra-navy); }
.admin-badge{
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.admin-badge--critical{ background: #FBE4E0; color: #C1401F; }
.admin-badge--high{ background: #FBE9E0; color: #C1531F; }
.admin-badge--stable{ background: var(--medra-teal-light); color: var(--medra-teal); }

.admin-alert-list{ display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.admin-alert-list li{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--text-primary);
}
.admin-alert-list li span{ flex: 1; }
.admin-alert-list li em{ font-style: normal; color: var(--text-secondary); font-size: 9.5px; }
.admin-alert-dot{ width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.admin-alert-dot.critical{ background: #D9534F; }
.admin-alert-dot.high{ background: #E0733F; }

.admin-severity-counts{
  display: flex;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--text-secondary);
}
.admin-severity-counts strong{ color: var(--medra-navy); }

/* =========================================================
   ALERT LEVELS
   ========================================================= */
.alert-levels-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 56px;
}
.alert-level-card{
  background: #fff;
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--level-color, var(--medra-teal));
  border-radius: var(--radius-md);
  padding: 26px 22px;
}
.alert-level-card h3{ font-size: 17px; margin-bottom: 14px; }
.alert-level-card ul{ display: flex; flex-direction: column; gap: 9px; }
.alert-level-card li{
  font-size: 13.5px;
  color: var(--text-secondary);
  padding-inline-start: 16px;
  position: relative;
}
.alert-level-card li::before{
  content: '';
  position: absolute;
  right: 0;
  top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--level-color, var(--medra-teal));
}
.alert-level-badge{
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--level-color, var(--medra-teal));
  background: var(--level-bg, var(--medra-teal-light));
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.level-low{ --level-color: #16A3AA; --level-bg: #DFF5F5; }
.level-medium{ --level-color: #C99A1F; --level-bg: #FBF3DC; }
.level-high{ --level-color: #C1531F; --level-bg: #FBE9E0; }
.level-critical{ --level-color: #C1401F; --level-bg: #FBE4E0; }

/* =========================================================
   STATS ROW
   ========================================================= */
.stats-row{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  border-top: 1px solid var(--border);
  padding-top: 40px;
}
.stat-item{
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-number{
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  color: var(--medra-navy);
  direction: ltr;
}
.stat-label{ font-size: 13.5px; color: var(--text-secondary); font-weight: 600; }

/* =========================================================
   FEATURE GRID (WHY MEDRA)
   ========================================================= */
.feature-grid{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 34px 28px;
}
.feature-item{ text-align: center; }
.feature-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--medra-teal-light);
  margin-bottom: 16px;
}
.feature-icon svg{ width: 26px; height: 26px; }
.feature-item h3{ font-size: 16.5px; margin-bottom: 6px; }
.feature-item p{ font-size: 14px; margin: 0; }

/* =========================================================
   HOW IT WORKS / TIMELINE
   ========================================================= */
.how-grid{
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: start;
}

.timeline{
  position: relative;
  padding-inline-start: 0;
}
.timeline::before{
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  right: 23px;
  width: 2px;
  background: var(--border);
}
.timeline-step{
  position: relative;
  display: flex;
  gap: 20px;
  padding-inline-end: 0;
  padding-bottom: 34px;
}
.timeline-step:last-child{ padding-bottom: 0; }
.timeline-num{
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--medra-navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 17px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 6px var(--background);
}
.timeline-body h3{ font-size: 17px; margin-bottom: 4px; }
.timeline-body p{ font-size: 14.5px; margin: 0; }

.how-visual{ display: flex; justify-content: center; }

/* =========================================================
   CLINICAL FLOW
   ========================================================= */
.clinical-grid{
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.dash-mock{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-md);
}
.dash-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: var(--medra-navy);
  font-size: 14.5px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.dash-live{
  font-size: 11.5px;
  background: var(--medra-teal-light);
  color: var(--medra-teal);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}
.dash-row{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13.5px;
}
.dash-row:last-of-type{ border-bottom: none; }
.dash-dot{ width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dash-dot.ok{ background: var(--medra-teal); }
.dash-dot.alert{ background: #E0733F; }
.dash-name{ flex: 1; color: var(--text-primary); font-weight: 500; }
.dash-tag{
  font-size: 11px;
  font-weight: 700;
  background: #FBE9E0;
  color: #C1531F;
  padding: 3px 10px;
  border-radius: 999px;
}
.dash-tag.ok{ background: var(--medra-teal-light); color: var(--medra-teal); }
.dash-row--alert{ background: #FFF7F3; margin: 0 -10px; padding: 10px; border-radius: 8px; border-bottom: none; }
.dash-chart{ margin-top: 14px; }
.dash-chart svg{ width: 100%; height: 60px; }

.clinical-steps{
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}
.clinical-steps li{
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.cstep-num{
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--medra-teal-light);
  color: var(--medra-navy);
  font-weight: 800;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.clinical-steps p{ margin: 0; padding-top: 3px; font-size: 15px; color: var(--text-primary); }

.info-box{
  background: var(--background-blue);
  border-inline-start: 4px solid var(--medra-navy);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
}
.info-box p{ margin: 0; color: var(--medra-navy); font-weight: 600; font-size: 15.5px; }

/* =========================================================
   CAPABILITIES TABLE
   ========================================================= */
.cap-table{
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}
.cap-row{
  display: grid;
  grid-template-columns: 260px 1fr;
}
.cap-row > *{
  padding: 18px 24px;
  font-size: 14.5px;
}
.cap-row:not(.cap-row--head):nth-of-type(odd){ background: var(--background-soft); }
.cap-row + .cap-row{ border-top: 1px solid var(--border); }
.cap-row--head{
  background: var(--medra-navy);
  color: #fff;
  font-weight: 700;
}
.cap-service{ font-weight: 700; color: var(--medra-navy); }

/* =========================================================
   DEVICES
   ========================================================= */
.device-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.device-card{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  text-align: center;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.device-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-md); }
.device-thumb{
  width: 100%;
  height: 110px;
  display: flex; align-items: center; justify-content: center;
  background: var(--background-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.device-thumb svg{ width: 64px; height: 64px; object-fit: contain; }
.device-thumb img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  mix-blend-mode: multiply;
}
.device-card h3{ font-size: 16px; margin-bottom: 4px; direction: ltr; }
.device-cat{ font-size: 13.5px; margin-bottom: 10px; }
.device-conn{
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--medra-teal);
  background: var(--medra-teal-light);
  padding: 4px 12px;
  border-radius: 999px;
  direction: ltr;
}

/* =========================================================
   SECURITY GRID
   ========================================================= */
.security-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 28px;
}
.security-item{
  text-align: center;
  padding: 8px;
}
.security-item h3{ font-size: 16px; margin-bottom: 6px; }
.security-item p{ font-size: 13.5px; margin: 0; }

/* =========================================================
   USE CASES
   ========================================================= */
.usecase-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.usecase-card{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 30px 26px;
}
.usecase-card h3{ font-size: 17px; margin-bottom: 8px; }
.usecase-card p{ font-size: 14px; margin: 0; }

/* =========================================================
   WHY DIFFERENT / FLOW
   ========================================================= */
#different .section-head{ margin-bottom: 44px; }
.flow-row{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
.flow-row li{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--medra-navy);
}
.flow-icon{
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.flow-icon svg{ width: 22px; height: 22px; }
.flow-sep{ color: var(--medra-teal); font-size: 18px; font-weight: 700; }

/* =========================================================
   REGISTRATION CTA + FORM
   ========================================================= */
.register-cta{
  background: var(--medra-navy-dark);
  position: relative;
  overflow: hidden;
}
.register-pattern{
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(22,163,170,0.16) 0, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(22,163,170,0.12) 0, transparent 45%);
  pointer-events: none;
}
.register-inner{
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.register-head h2{ color: #fff; font-size: clamp(26px, 3.4vw, 36px); }
.register-head p{ color: rgba(255,255,255,0.75); font-size: 16px; max-width: 480px; }
.register-tagline{ color: var(--medra-teal); font-weight: 700; margin-top: 18px; }

.register-form{
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}
.form-title{ font-size: 19px; margin-bottom: 20px; }
.form-row{ margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row label{ font-size: 14px; font-weight: 600; color: var(--medra-navy); }
.form-row input[type="text"],
.form-row input[type="tel"],
.form-row input[type="email"],
.form-row select{
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  background: var(--background-soft);
  color: var(--text-primary);
  transition: border-color .2s, background .2s;
}
.form-row input:focus,
.form-row select:focus{
  border-color: var(--medra-teal);
  background: #fff;
  outline: none;
}
.form-row select{ appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%2364748B' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 14px center; }

.form-row.invalid input,
.form-row.invalid select{ border-color: #D9534F; background: #FFF6F6; }

.field-error{
  font-size: 12.5px;
  color: #D9534F;
  min-height: 16px;
  display: block;
}

.form-row--checkbox{
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
}
.form-row--checkbox input{ margin-top: 3px; width: 18px; height: 18px; accent-color: var(--medra-teal); flex-shrink: 0; }
.form-row--checkbox label{ font-weight: 500; font-size: 14px; color: var(--text-primary); }

.form-success{
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--medra-teal-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.form-success .success-icon{ width: 26px; height: 26px; flex-shrink: 0; }
.form-success .success-icon svg{ width: 100%; height: 100%; }
.form-success p{ margin: 0; color: var(--medra-navy); font-weight: 600; font-size: 14px; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer{
  background: var(--medra-navy-dark);
  color: rgba(255,255,255,0.7);
  padding: 30px 0;
}
.footer-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-brand{
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #fff;
  direction: ltr;
}
.footer-copy{ margin: 0; font-size: 13.5px; }

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.reveal{
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px){
  .feature-grid{ grid-template-columns: repeat(3, 1fr); }
  .security-grid, .usecase-grid, .device-grid{ grid-template-columns: repeat(2, 1fr); }
  .hero-grid{ gap: 40px; }
  .how-grid, .clinical-grid, .register-inner{ gap: 40px; }
  .role-panel-grid, .role-panel-grid--wide{ grid-template-columns: 1fr; text-align: center; }
  .role-caps li{ justify-content: center; }
  .alert-levels-grid{ grid-template-columns: repeat(2, 1fr); }
  .stats-row{ grid-template-columns: repeat(2, 1fr); gap: 30px; }
}

@media (max-width: 900px){
  .primary-nav{
    position: fixed;
    inset-inline-start: 0;
    top: 76px;
    width: 82%;
    max-width: 340px;
    height: calc(100vh - 76px);
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 28px 24px;
    gap: 24px;
    box-shadow: var(--shadow-md);
    transform: translateX(-105%);
    transition: transform .35s var(--ease);
    overflow-y: auto;
  }
  [dir="rtl"] .primary-nav{ transform: translateX(105%); }
  .primary-nav.open{ transform: translateX(0); }
  .primary-nav ul{ flex-direction: column; align-items: flex-start; gap: 18px; }
  .nav-toggle{ display: flex; }
  .nav-cta{ align-self: flex-start; }

  .hero-grid{ grid-template-columns: 1fr; }
  .hero-visual{ order: -1; margin-bottom: 10px; }
  .phone-mock{ width: 230px; }
  .phone-screen{ min-height: 380px; }
  .hero-portrait{ width: 280px; }
  .hero-portrait img{ height: 340px; }

  .how-grid{ grid-template-columns: 1fr; }
  .how-visual{ order: -1; }

  .clinical-grid{ grid-template-columns: 1fr; }
  .clinical-visual{ order: -1; }

  .register-inner{ grid-template-columns: 1fr; }

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

@media (max-width: 640px){
  .section{ padding: 60px 0; }
  .container{ padding-inline: 20px; }

  .feature-grid{ grid-template-columns: 1fr 1fr; gap: 26px 18px; }
  .security-grid, .usecase-grid, .device-grid{ grid-template-columns: 1fr; }

  .hero-actions{ flex-direction: column; align-items: stretch; }
  .hero-actions .btn{ width: 100%; }

  .cap-row{ grid-template-columns: 1fr; }
  .cap-row > *{ padding: 12px 18px; }
  .cap-row--head{ display: none; }
  .cap-row:not(.cap-row--head){
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin: 12px;
    overflow: hidden;
  }
  .cap-row:not(.cap-row--head) > *::before{
    content: attr(data-label);
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--medra-teal);
    margin-bottom: 4px;
  }
  .cap-table{ border: none; background: transparent; padding: 0; }
  .cap-row:not(.cap-row--head){ background: #fff !important; }

  .flow-row{ flex-direction: column; }
  .flow-sep{ transform: rotate(90deg); }

  .register-form{ padding: 24px; }

  .role-tabs{ gap: 8px; }
  .role-tab{ padding: 9px 18px; font-size: 13.5px; }
  .role-panel-grid, .role-panel-grid--wide{ padding: 26px 20px; gap: 26px; }
  .alert-levels-grid{ grid-template-columns: 1fr; }
  .stats-row{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px){
  .feature-grid{ grid-template-columns: 1fr; }
  .btn-lg{ padding: 14px 22px; }
}
