/* ================== COLOR VARIABLES & THEME SUPPORT ================== */
:root {
  /* Primary Colors (Green) */
  --primary-color: #193237;
  --primary-dark: #418681;
  --primary-light: #ecfdf5;
  
  /* Secondary Colors */
  --secondary-color: #06b6d4;
  --secondary-dark: #0891b2;
  --secondary-light: #cffafe;
  
  /* Accent Colors */
  --accent-color: #f59e0b;
  --accent-dark: #d97706;
  --accent-light: #fef3c7;

  /* Light Mode Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Theme */
html[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --border-color: #334155;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ================== THEME TOGGLE BUTTON ================== */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.theme-toggle:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: scale(1.1) rotate(20deg);
}

.theme-toggle.dark {
  color: #fbbf24;
}

.theme-toggle.light {
  color: #3b82f6;
}

/* ================== HEADER & LOGO ================== */
header {
  text-align: center;
  margin-bottom: 40px;
  padding: 40px 0 20px;
  animation: fadeIn 0.8s ease;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  text-align: center;
}

.logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-color);
}

.logo:hover {
  transform: scale(1.12) rotate(-5deg);
  box-shadow: var(--shadow-xl);
}

.logo-text {
  flex: 1;
  min-width: 250px;
}

h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 15px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.tagline {
  font-size: 1.4rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ================== BUTTONS ================== */
.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 32px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-md);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.3s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(25, 50, 55, 0.3);
}

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

.btn-outline:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ================== NAVIGATION TABS ================== */
.tabs-container {
  margin: 40px 0;
  padding: 20px 0;
  border-bottom: 3px solid var(--border-color);
  background: linear-gradient(to bottom, var(--bg-secondary), transparent);
  border-radius: 20px 20px 0 0;
  animation: slideDown 0.6s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-btn {
  padding: 12px 28px;
  background: none;
  border: none;
  border-bottom: 4px solid transparent;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px 8px 0 0;
  position: relative;
  letter-spacing: 0.5px;
}

.tab-btn:hover {
  color: var(--primary-color);
  background-color: var(--bg-tertiary);
}

.tab-btn.active {
  color: white;
  border-bottom-color: var(--secondary-color);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  box-shadow: var(--shadow-md);
}

/* ================== TAB CONTENT ================== */
.tab-content {
  min-height: 600px;
}

.tab-pane {
  display: none;
  animation: fadeInUp 0.6s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================== SECTION STYLES ================== */
section {
  padding: 50px 0;
  animation: fadeInUp 0.8s ease;
}

h2 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 50px;
  text-align: center;
  position: relative;
  letter-spacing: -0.5px;
}

h2::after {
  content: '';
  display: block;
  width: 120px;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  margin: 20px auto 0;
  border-radius: 3px;
}

h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 30px 0 20px;
  letter-spacing: -0.5px;
}

h4 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 20px 0 12px;
  letter-spacing: 0.3px;
}

p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.8;
  letter-spacing: 0.2px;
}

/* ================== FEATURES SECTION ================== */
.features-section {
  margin: 50px 0;
}

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.feature-list {
  list-style-type: none;
}

.feature-list li {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  padding: 12px;
  border-radius: 8px;
}

.feature-list li:hover {
  transform: translateX(8px);
  color: var(--primary-color);
  background: var(--bg-tertiary);
}

.feature-list li:before {
  content: "✓";
  color: white;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 15px;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

/* ================== MOBILE APPS ================== */
.mobile-apps {
  margin-top: 50px;
}

.app-item {
  margin-bottom: 25px;
  padding: 30px;
  border-radius: 16px;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.app-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(25, 50, 55, 0.1), transparent);
  transition: left 0.5s ease;
}

.app-item:hover::before {
  left: 100%;
}

.app-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
}

.app-title {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-description {
  color: var(--text-secondary);
  margin-left: 0;
  font-size: 1.05rem;
}

/* ================== CONTACT PAGE STYLES ================== */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 40px;
}

.contact-info {
  background: var(--bg-secondary);
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
}

.contact-info:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.contact-info h3 {
  color: var(--primary-color);
  margin-bottom: 30px;
}

.contact-item {
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 2px solid var(--border-color);
  transition: all 0.3s ease;
}

.contact-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.contact-item:hover {
  padding-left: 10px;
  color: var(--primary-color);
}

.contact-form {
  background: var(--bg-secondary);
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
}

.contact-form:hover {
  border-color: var(--secondary-color);
  box-shadow: var(--shadow-lg);
}

.contact-form h3 {
  color: var(--secondary-color);
  margin-bottom: 30px;
}

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

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
  transform: translateY(-2px);
}

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

/* ================== WHO WE ARE STYLES ================== */
.team-content {
  max-width: 1000px;
  margin: 0 auto;
}

.company-info {
  background: var(--bg-secondary);
  padding: 40px;
  border-radius: 16px;
  margin-bottom: 50px;
  border-left: 5px solid var(--primary-color);
  box-shadow: var(--shadow-md);
}

.values {
  margin: 50px 0;
}

.value-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.value-card {
  background: var(--bg-secondary);
  padding: 35px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.value-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.value-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

.value-card:hover::before {
  transform: scaleX(1);
}

.value-card h4 {
  color: var(--primary-color);
  margin-top: 0;
}

.team-stats {
  margin: 50px 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.stat {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  padding: 35px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid var(--border-color);
}

.stat:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary-color);
}

.stat-number {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.3px;
}

/* ================== SERVICES STYLES ================== */
.services-content {
  max-width: 1000px;
  margin: 0 auto;
}

.service-category {
  margin-bottom: 60px;
}

.service-category h3 {
  font-size: 2rem;
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 15px;
}

.service-category h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.service-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 25px;
}

.service-item {
  background: var(--bg-secondary);
  padding: 35px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid var(--border-color);
  position: relative;
}

.service-item::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 0;
  background: linear-gradient(to bottom, var(--accent-color), var(--secondary-color));
  transition: height 0.3s ease;
}

.service-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--secondary-color);
}

.service-item:hover::after {
  height: 100%;
}

.service-item h4 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 15px;
}

.pricing-cta {
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 60px 40px;
  border-radius: 20px;
  margin-top: 60px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.pricing-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 300px;
  height: 300px;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

.pricing-cta h3 {
  color: white;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.pricing-cta p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 35px;
  font-size: 1.2rem;
  position: relative;
  z-index: 1;
}

/* ================== ANIMATIONS ================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Ripple effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.7);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Logo fallback styles */
.logo-fallback {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  padding: 8px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.logo-fallback:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

/* ================== RESPONSIVE DESIGN ================== */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  .theme-toggle {
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.4rem;
  }

  .logo-container {
    flex-direction: column;
    gap: 20px;
  }

  .logo {
    width: 80px;
    height: 80px;
  }

  .tagline {
    font-size: 1.1rem;
  }

  .tabs {
    flex-direction: column;
  }

  .tab-btn {
    width: 100%;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 8px;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 25px;
  }

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

  .value-cards,
  .service-items {
    grid-template-columns: 1fr;
  }

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

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }

  .pricing-cta {
    padding: 40px 25px;
  }

  section {
    padding: 35px 0;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  h4 {
    font-size: 1.1rem;
  }

  .app-item,
  .service-item,
  .value-card,
  .stat,
  .contact-form,
  .contact-info {
    padding: 20px;
  }

  .logo {
    width: 70px;
    height: 70px;
  }

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

  .tab-btn {
    padding: 10px 16px;
    font-size: 0.95rem;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
  }
}

/* ================== RTL SUPPORT ================== */
html[dir="rtl"] {
  direction: rtl;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] p,
html[dir="rtl"] label,
html[dir="rtl"] .tagline {
  text-align: right;
}

html[dir="rtl"] h2::after {
  margin: 20px auto 0;
}

html[dir="rtl"] .logo-container,
html[dir="rtl"] .tabs,
html[dir="rtl"] .contact-content,
html[dir="rtl"] .cta-buttons,
html[dir="rtl"] .feature-list li {
  flex-direction: row-reverse;
}

html[dir="rtl"] .feature-list li:before {
  margin-right: 0;
  margin-left: 15px;
}

html[dir="rtl"] .contact-form,
html[dir="rtl"] .contact-info {
  text-align: right;
}

html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group textarea {
  text-align: right;
}

html[dir="rtl"] .company-info {
  border-left: none;
  border-right: 5px solid var(--primary-color);
}

html[dir="rtl"] .service-category h3::after {
  left: auto;
  right: 0;
}

html[dir="rtl"] .theme-toggle {
  right: auto;
  left: 20px;
}

@media (max-width: 768px) {
  html[dir="rtl"] .theme-toggle {
    left: 15px;
  }
}