/* ==========================================================================
   OBSAVE ERP - Core Unified Design System (Responsive, LTR & RTL)
   ========================================================================== */

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

:root {
  --primary: #0056b3;
  --primary-hover: #003d82;
  --primary-light: #e8f2ff;
  --primary-gradient: linear-gradient(135deg, #0056b3 0%, #002d62 100%);
  --secondary: #0f172a;
  --accent: #2563eb;
  --accent-glow: rgba(37, 99, 235, 0.15);
  --success: #10b981;
  --dark: #0a0a0a;
  --dark-light: #1e293b;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --card-hover-shadow: 0 20px 35px -5px rgba(0, 86, 179, 0.15), 0 10px 10px -5px rgba(0, 86, 179, 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-en: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-ar: 'Cairo', system-ui, -apple-system, Tahoma, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-en);
  background: var(--bg-white);
  color: var(--text-main);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

/* RTL Specific Rules */
body[dir="rtl"], html[dir="rtl"] body {
  font-family: var(--font-ar);
  direction: rtl;
  text-align: right;
}

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

/* ==========================================================================
   Top Announcement & Language Bar
   ========================================================================== */
.top-bar {
  background: var(--dark);
  color: #cbd5e1;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid #1e293b;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.top-bar-contact {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-bar-contact a {
  color: #cbd5e1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.top-bar-contact a:hover {
  color: #60a5fa;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.lang-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.logo-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-brand img {
  height: 52px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  transition: var(--transition);
}

.logo-brand:hover img {
  transform: scale(1.02);
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--secondary);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 4px;
  position: relative;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

body[dir="rtl"] .nav-link::after {
  left: auto;
  right: 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 86, 179, 0.3);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 86, 179, 0.4);
}

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

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

.btn-white {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 17px;
  border-radius: var(--radius-md);
}

/* Mobile Hamburger */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--dark);
}

.mobile-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--dark);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 70px 0 80px;
  background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
  text-align: center;
  overflow: hidden;
}

.hero-banner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

.hero-ayat-img {
  max-width: 580px;
  width: 90%;
  height: auto;
  object-fit: contain;
  margin-bottom: 30px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.06));
}

.hero-logo-img {
  max-width: 680px;
  width: 90%;
  height: auto;
  object-fit: contain;
  margin-bottom: 25px;
  transition: var(--transition);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 18px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 86, 179, 0.2);
}

.hero-title {
  font-size: 34px;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1.35;
  max-width: 900px;
  margin: 0 auto 20px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 35px;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Page Headers (About, Services, Contact)
   ========================================================================== */
.page-banner {
  background: var(--primary-gradient);
  color: #fff;
  padding: 70px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.page-banner h1 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.page-banner p {
  font-size: 18px;
  opacity: 0.92;
  max-width: 700px;
  margin: 0 auto;
}

/* ==========================================================================
   Features & Services Grid
   ========================================================================== */
.section {
  padding: 80px 0;
}

.section-bg {
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 55px;
}

.section-tag {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 13px;
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-size: 34px;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 12px;
}

.section-desc {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 40px;
}

.card {
  background: #ffffff;
  padding: 36px 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-hover-shadow);
  border-color: rgba(0, 86, 179, 0.3);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 22px;
  transition: var(--transition);
}

.card:hover .card-icon {
  background: var(--primary);
  color: #fff;
}

.card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 14px;
}

.card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-list {
  list-style: none;
  padding: 0;
  margin-top: 10px;
}

.card-list li {
  padding: 6px 0;
  color: #475569;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-list li::before {
  content: '✓';
  color: var(--primary);
  font-weight: 800;
}

/* ==========================================================================
   Stats Bar
   ========================================================================== */
.stats-section {
  background: var(--secondary);
  color: #fff;
  padding: 55px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  text-align: center;
}

.stat-item h3 {
  font-size: 40px;
  font-weight: 800;
  color: #60a5fa;
  margin-bottom: 6px;
}

.stat-item p {
  font-size: 15px;
  color: #cbd5e1;
}

/* ==========================================================================
   Two Column Layout (About / Showcase / Service Details)
   ========================================================================== */
.showcase-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 70px;
}

.showcase-row:last-child {
  margin-bottom: 0;
}

.showcase-row.reverse .showcase-media {
  order: 2;
}

.showcase-media img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

.showcase-content h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 18px;
  line-height: 1.3;
}

.showcase-content p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta-section {
  background: var(--primary-gradient);
  color: #fff;
  text-align: center;
  padding: 80px 0;
  position: relative;
}

.cta-section h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 18px;
  opacity: 0.9;
  max-width: 650px;
  margin: 0 auto 35px;
}

/* ==========================================================================
   Contact Form & Info
   ========================================================================== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
}

.contact-info-card {
  background: var(--bg-light);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.contact-info-card h3 {
  font-size: 26px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 15px;
}

.contact-info-card p {
  color: var(--text-muted);
  margin-bottom: 30px;
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.contact-item-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.contact-item-body h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 4px;
}

.contact-item-body p, .contact-item-body a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
}

.contact-form-card {
  background: #ffffff;
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}

.contact-form-card h3 {
  font-size: 26px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

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

/* ==========================================================================
   Map Section
   ========================================================================== */
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  height: 420px;
  margin-top: 50px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background: var(--dark);
  color: #94a3b8;
  padding: 70px 0 30px;
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-col p {
  line-height: 1.7;
  margin-bottom: 15px;
}

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

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 5px;
}

body[dir="rtl"] .footer-links a:hover {
  padding-left: 0;
  padding-right: 5px;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 25px;
  text-align: center;
  font-size: 14px;
  color: #64748b;
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    padding: 24px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--border-color);
    gap: 16px;
  }

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

  .nav-actions {
    display: none;
  }

  .showcase-row {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .showcase-row.reverse .showcase-media {
    order: 0;
  }

  .showcase-media img {
    height: 260px;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .section-title {
    font-size: 28px;
  }

  .page-banner h1 {
    font-size: 30px;
  }

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