/* Product site (Classic, Pro, Cloud Pro, compare, AI, API): PharmaflySite.go.
   Loaded after home.css and home-showcase.css, which give the palette, header, buttons and footer.
   Logical properties keep the layout right in Arabic (RTL) and English (LTR). */

.pharmafly-home {
  --surface: #fff;
  --muted: #5d6e66;
  --teal-ink: #0f4f51;
  --ai: #5b3fd1;
  --ai-soft: #efebff;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

.pharmafly-site .site-nav { gap: 1.25rem; }
.pharmafly-site .site-nav__ai { position: relative; color: var(--ai); }
.pharmafly-site .site-nav__ai::after {
  content: '';
  position: absolute;
  inset-block-start: 1.35rem;
  inset-inline-end: -0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ai);
}

.pharmafly-site code,
.pharmafly-site pre { font-family: var(--mono); }

.pharmafly-site code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: #eef3f1;
  font-size: 0.85em;
  overflow-wrap: anywhere;
}

/* ---------- hero ---------- */

.p-hero {
  padding-block: 4rem 3.5rem;
  background: linear-gradient(180deg, #fff 0%, var(--paper) 100%);
  border-block-end: 1px solid #dce7e1;
}

.p-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.p-hero__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
}

.p-hero h1,
.p-hero__title {
  margin: 0 0 1.1rem;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.35;
  text-wrap: balance;
}

.p-hero h1:lang(en),
.p-hero__title:lang(en) { line-height: 1.1; letter-spacing: -0.035em; }

/* edition pages: the H1 is the small name line (edition + search phrase), the tagline is the big line under it */
.p-hero h1.p-hero__name {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: normal;
}

.p-hero__summary {
  max-width: 44rem;
  margin: 0;
  color: #3f4d47;
  font-size: 1.05rem;
}

.p-hero--compact { padding-block: 3.5rem 2.5rem; }
.p-hero--compact .p-hero__summary { margin-block-start: 0.25rem; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  background: var(--ai-soft);
  color: var(--ai);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.8;
}

.badge--soon { background: #fff1e6; color: #a2470d; }

.price-note {
  display: inline-flex;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  background: var(--mint);
  color: var(--teal-ink);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Technical support is paid per request, for every edition. */
.support-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  max-width: 40rem;
  margin: 0.75rem 0 0;
  padding: 0.7rem 1rem;
  border: 1px solid #f0bf8c;
  border-radius: 6px;
  background: #fff7ee;
  color: #6b3a0c;
  font-size: 0.82rem;
  line-height: 1.8;
}

.support-note strong { color: #a2470d; }

.support-note__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 1.3rem;
  height: 1.3rem;
  margin-block-start: 0.2rem;
  border-radius: 50%;
  background: #d9822b;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
}

.edition-card__support {
  color: #a2470d;
  font-size: 0.78rem;
  font-weight: 600;
}

.showcase-pricing__support {
  display: block;
  margin-block-start: 0.2rem;
  font-size: 0.78em;
  font-weight: 600;
  opacity: 0.85;
}

.p-hero__spot {
  display: grid;
  gap: 0.75rem;
}

.spot-kicker {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.spot-card {
  display: grid;
  gap: 0.3rem;
  padding: 1.15rem 1.3rem;
  border: 1px solid #dce7e1;
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.spot-card strong { color: var(--ink); font-size: 1rem; font-weight: 700; }
a.spot-card:hover { border-color: var(--green); transform: translateY(-2px); }

.spot-card--ai { border-color: #d7cffb; background: linear-gradient(135deg, #fff 40%, var(--ai-soft)); }
a.spot-card--ai:hover { border-color: var(--ai); }

.spot-code {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--teal-ink);
  overflow-wrap: anywhere;
}

/* ---------- stats ---------- */

.stats { background: var(--teal-ink); color: #d3e7e2; }

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  padding-block: 2rem;
}

.stat { display: grid; gap: 0.15rem; }
.stat strong { color: #fff; font-size: 1.9rem; font-weight: 800; line-height: 1.3; }
.stat span { font-size: 0.8rem; }

/* ---------- sections ---------- */

.p-section { padding-block: 4rem; }
.p-section + .p-section { border-block-start: 1px solid #e3ebe7; }
.p-section--features { background: #fff; }

.who-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.who-list li {
  display: flex;
  gap: 0.6rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid #dce7e1;
  border-radius: 10px;
  background: #fff;
  font-size: 0.92rem;
}

/* the homepage's red "+" mark, instead of a coloured side border */
.who-list li::before {
  content: '+';
  flex: none;
  color: var(--red);
  font-weight: 800;
}

/* feature groups */

.fgroups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 1.25rem;
}

.fgroup {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.6rem;
  border: 1px solid #dce7e1;
  border-radius: 10px;
  background: var(--paper);
}

.fgroup h3 { margin: 0 0 0.35rem; font-size: 1.2rem; font-weight: 700; line-height: 1.6; }
.fgroup h3:lang(en) { line-height: 1.3; }
.fgroup__benefit { margin: 0 0 0.9rem; color: var(--green); font-size: 0.85rem; font-weight: 600; }

.fgroup ul { margin: 0; padding: 0; list-style: none; }

.fgroup li {
  position: relative;
  padding-block: 0.45rem;
  padding-inline-start: 1.1rem;
  color: #46564f;
  font-size: 0.85rem;
  line-height: 1.85;
}

.fgroup li::before {
  content: '';
  position: absolute;
  inset-block-start: 1.05rem;
  inset-inline-start: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.fgroup--ai,
.fgroup--api { border-color: #d7cffb; background: linear-gradient(160deg, #fff 30%, var(--ai-soft)); }
.fgroup--ai .fgroup__benefit,
.fgroup--api .fgroup__benefit { color: var(--ai); }
.fgroup--ai li::before,
.fgroup--api li::before { background: var(--ai); }

.fgroup__more {
  margin-block-start: auto;
  padding-block-start: 0.9rem;
  color: var(--ai);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.fgroup__more:hover { text-decoration: underline; }

/* editions */

.edition-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.25rem;
}

.edition-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.5rem;
  border: 1px solid #dce7e1;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.edition-card:hover { border-color: var(--green); transform: translateY(-2px); }

.edition-card__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 800;
}

.edition-card__price {
  margin-block-start: auto;
  padding-block-start: 0.6rem;
  border-block-start: 1px dashed #d3ded8;
  color: var(--teal-ink);
  font-weight: 600;
}

.edition-card--cloudpro { border-color: #b9d6d2; box-shadow: 0 10px 30px -18px #0f4f5166; }

/* downloads */

.dl-card:hover { transform: none; border-color: #dce7e1; }
.dl-card--beta { border-color: #f0d2b8; }
.dl-card--beta:hover { border-color: #f0d2b8; }
.dl-card__version { align-self: flex-start; color: var(--ink); font-size: 1.6rem; font-weight: 800; line-height: 1.3; }
.dl-card__meta { font-size: 0.8rem; }
.dl-card__btn { align-self: flex-start; margin-block-start: auto; }
.dl-card__md5 { font-size: 0.72rem; overflow-wrap: anywhere; }

/* faq */

.faq__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 3rem; }
.faq__item h3 { margin: 0 0 0.3rem; font-size: 1.05rem; font-weight: 700; line-height: 1.7; }
.faq__item p { margin: 0 0 1.25rem; color: var(--muted); font-size: 0.88rem; }
.faq__item p:has(+ .faq__points) { margin-bottom: 0.4rem; }
.faq__points { margin: 0 0 1.25rem; padding-inline-start: 1.2rem; color: var(--muted); font-size: 0.88rem; }
.faq__points li { margin-bottom: 0.3rem; }

/* call to action */

.site-cta { padding-block: 3.5rem; background: var(--mint); text-align: center; }
.site-cta h2 { margin: 0 0 0.5rem; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
.site-cta p { max-width: 40rem; margin: 0 auto 1.5rem; color: #3f4d47; font-size: 0.92rem; }
.site-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }

/* footer links */

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  max-width: 62rem;
  margin: 1.5rem auto 0;
  padding-inline: var(--gutter);
  font-size: 0.78rem;
}

.footer-links a { color: var(--teal-ink); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- compare table ---------- */

.compare-title { margin: 0 0 1.25rem; font-size: 1.5rem; font-weight: 700; }

.compare-wrap {
  position: relative; /* keeps the absolutely positioned visually-hidden labels inside the scroll box */
  overflow-x: auto;
  border: 1px solid #dce7e1;
  border-radius: 10px;
  background: #fff;
}

.compare {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.compare th,
.compare td {
  padding: 0.8rem 1rem;
  border-block-end: 1px solid #edf2ef;
  text-align: start;
  vertical-align: middle;
}

.compare thead th {
  position: sticky;
  top: 0;
  background: #f4f8f6;
  font-size: 0.9rem;
  font-weight: 800;
}

.compare thead th a { color: var(--ink); text-decoration: none; }
.compare thead th a:hover { color: var(--green); }
.compare tbody th { width: 40%; font-weight: 600; }
.compare td { color: var(--muted); }
.compare tbody tr:hover { background: #f8fbfa; }

.compare tbody th[scope="row"] {
  position: sticky;
  inset-inline-start: 0;
  background: #fff;
}

.mark { font-size: 1.1rem; font-weight: 800; }
.mark--yes { color: var(--green); }
.mark--no { color: #b8c4be; }

/* ---------- AI page ---------- */

.chat-demo {
  margin: 0;
  padding: 1.25rem;
  border: 1px solid #d7cffb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 40px -28px #5b3fd166;
}

.chat-demo figcaption { margin-block-end: 0.75rem; color: var(--muted); font-size: 0.72rem; font-weight: 600; }

.chat-demo__q {
  margin: 0 0 0.9rem;
  margin-inline-start: auto;
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border-end-end-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
}

.chat-demo__a {
  max-width: 92%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border-end-start-radius: 4px;
  background: var(--ai-soft);
  font-size: 0.85rem;
}

.chat-demo__a p { margin: 0; }

.chat-demo__tool {
  display: inline-block;
  margin-block-end: 0.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  background: #fff;
  color: var(--ai);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.ask-grid,
.report-grid,
.secure-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ask-grid li {
  padding: 1rem 1.2rem;
  border: 1px solid #d7cffb;
  border-radius: 12px;
  background: #fff;
  font-size: 0.9rem;
}

.ask-grid li::before { content: '“'; color: var(--ai); font-weight: 800; margin-inline-end: 0.25rem; }
.ask-grid li:lang(ar)::before,
[dir="rtl"] .ask-grid li::before { content: '«'; }

.report-grid li,
.secure-list li {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #dce7e1;
  color: var(--muted);
  font-size: 0.85rem;
}

.report-grid strong,
.secure-list strong { color: var(--ink); font-size: 0.95rem; }

.secure { background: var(--teal-ink); color: #d3e7e2; }
.secure .section-label { color: #9cc4bd; }
.secure .section-heading h2 { color: #fff; }
.secure .secure-list li { border-color: #2c6b6c; background: #155c5e; color: #cfe4df; }
.secure .secure-list strong { color: #fff; }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  gap: 0.3rem;
  padding: 1.2rem 1.3rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #dce7e1;
  color: var(--muted);
  font-size: 0.85rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
}

.steps strong { color: var(--ink); font-size: 1rem; }

.connector-url {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-block-end: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px dashed #b7a8f5;
  border-radius: 10px;
  background: var(--ai-soft);
  font-size: 0.85rem;
  font-weight: 600;
}

.connector-url code { padding: 0.35rem 0.7rem; background: #fff; font-size: 0.95rem; color: var(--ai); }

.connect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1.25rem;
}

.connect-card {
  padding: 1.4rem 1.5rem;
  border: 1px solid #dce7e1;
  border-radius: 10px;
  background: #fff;
  font-size: 0.85rem;
}

.connect-card h3 { margin: 0 0 0.3rem; font-family: 'Manrope', 'Segoe UI', sans-serif; font-size: 1.3rem; font-weight: 800; }
.connect-card__plan { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.78rem; }
.connect-card ol { margin: 0; padding-inline-start: 1.2rem; }
.connect-card li { margin-block-end: 0.45rem; }

/* ---------- developer page ---------- */

.dev > p { max-width: 52rem; color: #3f4d47; font-size: 0.9rem; }
.dev h3 { margin: 2rem 0 0.6rem; font-size: 1.15rem; font-weight: 700; }

.pharmafly-site pre {
  margin: 0 0 1rem;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  border-radius: 10px;
  background: #102b2c;
  color: #e1f0ec;
  font-size: 0.8rem;
  line-height: 1.7;
  text-align: left;
}

.pharmafly-site pre code { padding: 0; background: none; color: inherit; font-size: inherit; overflow-wrap: normal; }

.endpoints tbody th { width: 45%; }
.endpoints code { background: none; padding: 0; color: var(--teal-ink); font-weight: 600; }

.spec {
  display: grid;
  gap: 0;
  margin: 1.5rem 0;
  border: 1px solid #dce7e1;
  border-radius: 10px;
  background: #fff;
  font-size: 0.85rem;
}

.spec div {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.8rem 1.1rem;
  border-block-end: 1px solid #edf2ef;
}

.spec div:last-child { border-block-end: 0; }
.spec dt { font-weight: 700; }
.spec dd { margin: 0; color: var(--muted); }
.spec dd code { display: inline-block; margin: 0.15rem; }

/* ---------- small screens ---------- */

@media (max-width: 68rem) {
  .pharmafly-site .site-nav { gap: 0.9rem; }
}

@media (max-width: 52rem) {
  .p-hero__inner { grid-template-columns: 1fr; gap: 2rem; }
  .stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq__list { grid-template-columns: 1fr; }
  .pharmafly-site .site-nav { overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
}

@media (max-width: 36rem) {
  .p-hero { padding-block: 2.5rem 2rem; }
  .p-section { padding-block: 2.75rem; }
  .fgroup { padding: 1.25rem; }
  .spec div { grid-template-columns: 1fr; gap: 0.2rem; }
  .compare th, .compare td { padding: 0.65rem 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .spot-card, .edition-card { transition: none; }
  a.spot-card:hover, .edition-card:hover { transform: none; }
}

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

@media (max-width: 36rem) {
  .secure .secure-list { grid-template-columns: 1fr; }
}

/* ---------- homepage products section (home.html) ---------- */

.home-products { background: #fff; border-block-start: 1px solid #dce7e1; }

.ai-banner {
  display: grid;
  justify-items: start;
  gap: 0.35rem;
  margin-block-start: 1.25rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid #d7cffb;
  border-radius: 10px;
  background: linear-gradient(120deg, #fff 35%, var(--ai-soft, #efebff));
  color: #5d6e66;
  font-size: 0.88rem;
  text-decoration: none;
  transition: border-color 0.15s;
}

.ai-banner strong { color: var(--ink); font-size: 1.25rem; font-weight: 800; }
.ai-banner:hover { border-color: #5b3fd1; }
.ai-banner .badge { background: #efebff; color: #5b3fd1; }
