/* =========================================================
   Cytotec Oman — Medical Premium Stylesheet
   Arabic RTL | Mobile First | Core Web Vitals focused
   ========================================================= */

:root {
  --primary: #0B4A8B;
  --primary-dark: #083A6E;
  --primary-soft: #E8F1F8;
  --secondary: #147354;
  --secondary-dark: #0F5A41;
  --secondary-soft: #E6F4EF;
  --bg: #F7FAFC;
  --text: #1E293B;
  --muted: #64748B;
  --white: #FFFFFF;
  --border: #E2E8F0;
  --warning-bg: #FFF8EB;
  --warning-border: #F59E0B;
  --danger-bg: #FEF2F2;
  --danger-border: #DC2626;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 28px rgba(11, 74, 139, 0.08);
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.05);
  --container: 1120px;
  --header-h: 72px;
  --font: "IBM Plex Sans Arabic", "Cairo", "Segoe UI", Tahoma, sans-serif;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
  background: var(--bg);
  direction: rtl;
  text-align: right;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--secondary);
}

ul, ol {
  padding-inline-start: 1.25rem;
}

h1, h2, h3, h4 {
  line-height: 1.35;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.85rem;
}

h1 { font-size: clamp(1.7rem, 4vw, 2.45rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); }
h3 { font-size: clamp(1.1rem, 2.4vw, 1.3rem); }

p { margin: 0 0 1rem; color: var(--text); }

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  background: var(--primary);
  color: var(--white);
  padding: 0.6rem 1rem;
  z-index: 1000;
  border-radius: 8px;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.05rem;
}

.logo:hover { color: var(--primary-dark); }

.logo-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text small {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: background var(--transition);
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: transform var(--transition), top var(--transition);
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

.main-nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  transform: translateY(-120%);
  opacity: 0;
  visibility: hidden;
  transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.main-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-list a {
  display: block;
  padding: 0.75rem 0.9rem;
  color: var(--text);
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.98rem;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  background: var(--primary-soft);
  color: var(--primary);
}

@media (min-width: 992px) {
  .nav-toggle { display: none; }

  .main-nav {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
    border: 0;
    padding: 0;
    max-height: none;
    overflow: visible;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
  }

  .nav-list a {
    padding: 0.45rem 0.7rem;
    font-size: 0.92rem;
    white-space: nowrap;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.4rem;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--secondary-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(11, 74, 139, 0.92) 0%, rgba(11, 74, 139, 0.78) 45%, rgba(20, 115, 84, 0.72) 100%),
    url("../images/hero-medical.webp") center/cover no-repeat;
  color: var(--white);
  min-height: clamp(420px, 72vh, 620px);
  display: flex;
  align-items: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(20, 115, 84, 0.18), transparent 35%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 3.5rem 0 3.75rem;
  max-width: 720px;
}

.hero-brand {
  display: inline-block;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.85rem;
  opacity: 0.95;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
}

.hero p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.08rem;
  max-width: 38rem;
}

.hero .btn-primary {
  background: var(--white);
  color: var(--primary);
}

.hero .btn-primary:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.hero .btn-outline {
  border-color: rgba(255, 255, 255, 0.75);
  color: var(--white);
}

.hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.page-hero {
  background: linear-gradient(135deg, var(--primary-soft) 0%, #EEF7F3 100%);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0 2.25rem;
}

.page-hero .breadcrumb {
  margin-bottom: 1rem;
}

.page-hero p.lead {
  color: var(--muted);
  max-width: 42rem;
  margin-bottom: 0;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-inline-start: 0.35rem;
  color: #94A3B8;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

/* ---------- Sections ---------- */
.section {
  padding: 3.25rem 0;
}

.section-alt {
  background: var(--white);
}

.section-head {
  max-width: 640px;
  margin-bottom: 2rem;
}

.section-head .eyebrow {
  display: inline-block;
  color: var(--secondary);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

.section-head p {
  color: var(--muted);
  margin-bottom: 0;
}

/* ---------- Cards / Grid ---------- */
.grid {
  display: grid;
  gap: 1.25rem;
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2-lg { grid-template-columns: 1.05fr 0.95fr; align-items: center; }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.card h3 {
  margin-top: 0.35rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.card-icon.green {
  background: var(--secondary-soft);
  color: var(--secondary);
}

.media-card {
  overflow: hidden;
  padding: 0;
}

.media-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.media-card .card-body {
  padding: 1.25rem 1.35rem 1.4rem;
}

/* ---------- Callouts ---------- */
.callout {
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--border);
  background: var(--white);
  margin: 1.25rem 0;
}

.callout-warning {
  background: var(--warning-bg);
  border-color: #FCD34D;
}

.callout-danger {
  background: var(--danger-bg);
  border-color: #FECACA;
}

.callout-info {
  background: var(--primary-soft);
  border-color: #BFDBFE;
}

.callout strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.callout p:last-child { margin-bottom: 0; }

/* ---------- Content layout ---------- */
.prose {
  max-width: 760px;
}

.prose h2 {
  margin-top: 2.25rem;
  padding-top: 0.5rem;
}

.prose h3 {
  margin-top: 1.5rem;
}

.content-with-aside {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 960px) {
  .content-with-aside {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
}

.aside-box {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.aside-box h3 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

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

.aside-box li + li {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}

.aside-box a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}

.aside-box a:hover { color: var(--primary); }

.figure {
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--white);
}

.figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.figure figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--white);
}

/* ---------- FAQ ---------- */
.faq-list {
  display: grid;
  gap: 0.85rem;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 650;
  position: relative;
  padding-inline-end: 2.5rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  inset-inline-end: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 500;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item .faq-answer {
  padding: 0 1.15rem 1.1rem;
  color: var(--muted);
}

.faq-item .faq-answer p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--primary) 0%, #0D5BA8 55%, var(--secondary) 100%);
  color: var(--white);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem 1.5rem;
  text-align: center;
}

.cta-band h2 {
  color: var(--white);
  margin-bottom: 0.65rem;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 36rem;
  margin-inline: auto  auto;
  margin-bottom: 1.25rem;
}

.cta-band .btn-primary {
  background: var(--white);
  color: var(--primary);
}

.cta-band .btn-primary:hover {
  background: var(--primary-soft);
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  gap: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.form-group .req { color: #DC2626; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  font: inherit;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 74, 139, 0.15);
}

.form-group textarea { min-height: 140px; resize: vertical; }

.form-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.form-error {
  color: #DC2626;
  font-size: 0.85rem;
  margin-top: 0.3rem;
  display: none;
}

.form-group.is-invalid .form-error { display: block; }
.form-group.is-invalid input,
.form-group.is-invalid textarea,
.form-group.is-invalid select {
  border-color: #DC2626;
}

.form-success {
  display: none;
  background: var(--secondary-soft);
  border: 1px solid #86EFAC;
  color: var(--secondary-dark);
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.form-success.is-visible { display: block; }

.contact-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.contact-meta {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-meta li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-meta li:last-child { border-bottom: 0; }

.contact-meta strong {
  display: block;
  margin-bottom: 0.2rem;
}

/* ---------- Tables / lists ---------- */
.info-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list li {
  position: relative;
  padding: 0.55rem 0 0.55rem 0;
  padding-inline-start: 1.4rem;
  border-bottom: 1px solid var(--border);
}

.info-list li:last-child { border-bottom: 0; }

.info-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 1rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0A2744;
  color: rgba(255, 255, 255, 0.85);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h3 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 0.9rem;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li + li { margin-top: 0.45rem; }

.footer-links a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
}

.footer-links a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-disclaimer {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 52rem;
  margin-top: 0.5rem;
}

/* ---------- Utilities ---------- */
.muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1.5rem; }

.legal-page .prose h2:first-of-type {
  margin-top: 0;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--secondary-soft);
  color: var(--secondary-dark);
}

/* ---------- Cities coverage ---------- */
.cities-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .cities-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .cities-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.cities-list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
  font-weight: 600;
  font-size: 0.98rem;
  box-shadow: var(--shadow-sm);
}

.cities-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  flex-shrink: 0;
}

.cities-note {
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.geo-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .geo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .geo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.geo-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.geo-card h3 {
  margin: 0 0 0.45rem;
  color: var(--primary);
  font-size: 1.05rem;
}

.geo-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- WhatsApp float ---------- */
.whatsapp-float {
  position: fixed !important;
  left: 18px !important;
  right: auto !important;
  bottom: 18px !important;
  z-index: 9999 !important;
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  background: #25D366 !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22) !important;
  text-decoration: none !important;
  border: 0 !important;
  cursor: pointer !important;
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
  color: #ffffff !important;
  transform: scale(1.07);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.5) !important;
  outline: none;
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  display: block;
  fill: currentColor;
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
