/* ==========================================================================
   Eternal Pharma - Enterprise Pharmaceutical Design System (RTL)
   Theme: Authoritative Clinical Corporate & Bio-Medical
   Typography: IBM Plex Sans Arabic & Cairo
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@500;600;700;800&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
  /* Corporate Clinical Palette */
  --navy-950: #060d17;
  --navy-900: #0b1727;
  --navy-800: #112237;
  --navy-700: #1a3250;
  --navy-600: #25446b;

  /* Clinical Emerald Accent (Used strictly & with restraint) */
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-50:  #ecfdf5;

  /* Neutral Slate Grayscale */
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white:     #ffffff;

  /* Status Colors */
  --status-success-bg: #f0fdf4;
  --status-success-border: #86efac;
  --status-success-text: #166534;

  --status-warning-bg: #fffbeb;
  --status-warning-border: #fcd34d;
  --status-warning-text: #92400e;

  --status-danger-bg: #fef2f2;
  --status-danger-border: #fca5a5;
  --status-danger-text: #991b1b;

  /* Typography */
  --font-main: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Cairo', 'IBM Plex Sans Arabic', sans-serif;

  /* Restrained Elevation */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.07), 0 4px 6px -4px rgba(15, 23, 42, 0.03);

  /* Radius (Crisp & Architectural) */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  direction: rtl;
  text-align: right;
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background-color: #ffffff;
  color: var(--slate-800);
  line-height: 1.75;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--navy-900);
  font-weight: 700;
  line-height: 1.35;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

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

input, button, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.container-narrow {
  max-width: 820px;
}

/* ==========================================================================
   Corporate Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #ffffff;
  border-bottom: 1px solid var(--slate-200);
  transition: box-shadow 0.2s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo img {
  height: 46px;
  width: auto;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--emerald-700);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--slate-700);
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--navy-900);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: 0;
  left: 0;
  height: 2px;
  background-color: var(--navy-900);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-verify-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: var(--navy-900);
  color: #ffffff;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid var(--navy-900);
  transition: all 0.15s ease;
}

.btn-verify-nav:hover {
  background-color: var(--navy-800);
  color: #ffffff;
}

.btn-verify-nav svg {
  width: 16px;
  height: 16px;
  color: var(--emerald-500);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--navy-900);
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   Buttons & Core Components
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  line-height: 1.4;
  text-align: center;
}

.btn-primary {
  background-color: var(--navy-900);
  color: #ffffff;
  border-color: var(--navy-900);
}

.btn-primary:hover {
  background-color: var(--navy-800);
  color: #ffffff;
}

.btn-accent {
  background-color: var(--emerald-700);
  color: #ffffff;
  border-color: var(--emerald-700);
}

.btn-accent:hover {
  background-color: var(--emerald-800);
  color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  color: var(--navy-900);
  border-color: var(--slate-300);
}

.btn-outline:hover {
  background-color: var(--slate-100);
  border-color: var(--slate-400);
}

.btn-agent {
  background-color: #15803d;
  color: #ffffff;
  border-color: #15803d;
}

.btn-agent:hover {
  background-color: #166534;
  color: #ffffff;
}

.btn-lg {
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
}

/* ==========================================================================
   Hero Section (Corporate Editorial)
   ========================================================================== */
.hero-section {
  padding: 4.5rem 0 4rem;
  background-color: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--emerald-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--navy-900);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--slate-600);
  max-width: 580px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.hero-trust-bar {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--slate-200);
  display: flex;
  gap: 2rem;
  color: var(--slate-600);
  font-size: 0.85rem;
  font-weight: 500;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.trust-item svg {
  width: 18px;
  height: 18px;
  color: var(--emerald-700);
  flex-shrink: 0;
}

/* Hero Verification Terminal Card */
.hero-verify-card {
  background-color: #ffffff;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.verify-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--slate-200);
}

.verify-card-header svg {
  width: 24px;
  height: 24px;
  color: var(--emerald-700);
}

.verify-card-header h3 {
  font-size: 1.2rem;
  color: var(--navy-900);
}

.hero-verify-card p {
  font-size: 0.9rem;
  color: var(--slate-600);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.verify-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon svg {
  position: absolute;
  right: 0.85rem;
  width: 18px;
  height: 18px;
  color: var(--slate-400);
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  padding: 0.75rem 2.4rem 0.75rem 0.85rem;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background-color: #ffffff;
  color: var(--navy-900);
  transition: border-color 0.15s ease;
  text-transform: uppercase;
  font-family: monospace, inherit;
}

.input-with-icon input:focus {
  outline: none;
  border-color: var(--navy-900);
  box-shadow: 0 0 0 2px rgba(11, 23, 39, 0.1);
}

.verify-card-footer {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--slate-500);
}

/* ==========================================================================
   Section Layouts & Monograph Showcase
   ========================================================================== */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background-color: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
}

.section-header {
  margin-bottom: 2.75rem;
}

.section-header.center {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--navy-900);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--slate-600);
  font-size: 1rem;
  line-height: 1.7;
}

/* Clinical Product Showcase */
.product-clinical-box {
  background-color: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.clinical-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 3rem;
  align-items: center;
}

.clinical-image-col {
  background-color: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 2rem;
  text-align: center;
}

.clinical-image-col img {
  max-height: 320px;
  margin: 0 auto;
  object-fit: contain;
}

.clinical-content h3 {
  font-size: 1.75rem;
  color: var(--navy-900);
  margin-bottom: 0.25rem;
}

.clinical-subtitle {
  font-size: 0.95rem;
  color: var(--emerald-700);
  font-weight: 600;
  margin-bottom: 1rem;
}

.clinical-desc {
  color: var(--slate-700);
  font-size: 0.98rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.clinical-spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.75rem;
  font-size: 0.9rem;
}

.clinical-spec-table th {
  text-align: right;
  padding: 0.65rem 0;
  color: var(--slate-500);
  font-weight: 600;
  width: 130px;
  border-bottom: 1px solid var(--slate-200);
  vertical-align: top;
}

.clinical-spec-table td {
  padding: 0.65rem 0;
  color: var(--slate-900);
  border-bottom: 1px solid var(--slate-200);
  vertical-align: top;
}

/* ==========================================================================
   Services Section (Architectural 3-Column)
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background-color: #ffffff;
  border: 1px solid var(--slate-200);
  border-top: 3px solid var(--navy-900);
  border-radius: var(--radius-sm);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease;
}

.service-card:hover {
  border-top-color: var(--emerald-700);
}

.service-num {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--slate-300);
  margin-bottom: 0.75rem;
}

.service-card h3 {
  font-size: 1.25rem;
  color: var(--navy-900);
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--slate-600);
  font-size: 0.92rem;
  line-height: 1.75;
  flex: 1;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--navy-900);
  font-weight: 600;
  font-size: 0.88rem;
  margin-top: 1.25rem;
}

.service-link:hover {
  color: var(--emerald-700);
}

/* ==========================================================================
   Verification Dedicated Page
   ========================================================================== */
.verify-page-wrapper {
  padding: 3.5rem 0 5rem;
}

.verify-box-main {
  background-color: #ffffff;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.verify-modes-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--slate-200);
  padding-bottom: 1rem;
  margin-bottom: 1.75rem;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  background-color: var(--slate-100);
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn.active {
  background-color: var(--navy-900);
  color: #ffffff;
  border-color: var(--navy-900);
}

.scanner-viewport {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 1.5rem;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  background-color: #000000;
  color: #ffffff;
  text-align: center;
}

/* Verification Result States */
.verification-result {
  margin-top: 1.75rem;
  border-radius: var(--radius-sm);
  padding: 1.75rem;
  border: 1px solid transparent;
}

.verification-result.original_first_check {
  background-color: var(--status-success-bg);
  border-color: var(--status-success-border);
  color: var(--status-success-text);
}

.verification-result.already_verified {
  background-color: var(--status-warning-bg);
  border-color: var(--status-warning-border);
  color: var(--status-warning-text);
}

.verification-result.invalid_code {
  background-color: var(--status-danger-bg);
  border-color: var(--status-danger-border);
  color: var(--status-danger-text);
}

.verification-result.suspended_code {
  background-color: var(--slate-100);
  border-color: var(--slate-300);
  color: var(--slate-700);
}

.result-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.result-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.result-icon svg {
  width: 24px;
  height: 24px;
}

.result-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.result-meta-item {
  background-color: rgba(255, 255, 255, 0.6);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.result-meta-item span {
  display: block;
  font-size: 0.78rem;
  color: var(--slate-500);
  margin-bottom: 0.15rem;
}

.result-meta-item strong {
  font-size: 0.9rem;
  color: var(--slate-900);
}

/* ==========================================================================
   Forms & Contact
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: flex-start;
}

.form-card {
  background-color: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  background-color: #ffffff;
  color: var(--navy-900);
  transition: border-color 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--navy-900);
  box-shadow: 0 0 0 2px rgba(11, 23, 39, 0.1);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.contact-info-card {
  background-color: var(--navy-900);
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: 2.25rem;
}

.contact-info-card h3 {
  color: #ffffff;
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.info-icon {
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald-500);
  flex-shrink: 0;
}

.info-icon svg {
  width: 18px;
  height: 18px;
}

.info-text h5 {
  color: var(--slate-400);
  font-size: 0.82rem;
  margin-bottom: 0.15rem;
}

.info-text p, .info-text a {
  color: #ffffff;
  font-size: 0.95rem;
}

.agent-box {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.agent-box h4 {
  color: var(--emerald-400);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.agent-box p {
  color: var(--slate-300);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */
.alert {
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.alert-success {
  background-color: var(--status-success-bg);
  border: 1px solid var(--status-success-border);
  color: var(--status-success-text);
}

.alert-error {
  background-color: var(--status-danger-bg);
  border: 1px solid var(--status-danger-border);
  color: var(--status-danger-text);
}

/* ==========================================================================
   Corporate Footer
   ========================================================================== */
.site-footer {
  background-color: var(--navy-950);
  color: var(--slate-400);
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--slate-400);
  max-width: 320px;
}

.footer-heading {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--slate-400);
  font-size: 0.88rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--slate-500);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid,
  .clinical-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background-color: #ffffff;
    flex-direction: column;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--slate-200);
    gap: 0.75rem;
  }

  .nav-links.open {
    display: flex;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-trust-bar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .verify-box-main {
    padding: 1.5rem;
  }
}
