﻿:root {
  --th-primary: #8474a1;
  --th-secondary: #cbaad1;
  --th-tertiary: #70c5cd;
  --th-bg: #ffffff;
  --th-surface: #f0e9df;
  --th-text: #1f2937;
  --th-text-secondary: #cbaad1;
  --th-info: #70c5cd;
  --th-accent: #095a5c;
  --th-appbar-bg: #8474a1;
  --th-android-extras: #095a5c;
  --th-color-accent: #70c5cd;
  --th-radius: 1rem;
  --th-radius-sm: 0.75rem;
  --th-radius-lg: 1.5rem;
  --th-shadow: 0 10px 30px rgba(0,0,0,.08);
  --th-shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --th-shadow-lg: 0 20px 60px rgba(0,0,0,.12);
  --th-shadow-hover: 0 15px 40px rgba(132, 116, 161, 0.15);
  --th-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --th-transition-fast: all 0.15s ease;
}

* {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Noto Kufi Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--th-bg);
  color: var(--th-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--th-primary);
  text-decoration: none;
  transition: var(--th-transition-fast);
}
a:hover {
  color: #6b5c82;
  text-decoration: none;
  transform: translateY(-1px);
}

/* Enhanced Navigation */
.navbar.bg-primary {
  background: linear-gradient(135deg, var(--th-primary) 0%, #6b5c82 100%) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(132, 116, 161, 0.15);
  transition: var(--th-transition);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: var(--th-transition-fast);
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.nav-link {
  position: relative;
  font-weight: 500;
  transition: var(--th-transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--th-tertiary);
  transition: var(--th-transition);
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80%;
}

/* Enhanced Buttons */
.btn {
  border-radius: var(--th-radius-sm);
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: var(--th-transition);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  --bs-btn-bg: var(--th-primary);
  --bs-btn-border-color: var(--th-primary);
  --bs-btn-hover-bg: #6b5c82;
  --bs-btn-hover-border-color: #6b5c82;
  box-shadow: 0 4px 15px rgba(132, 116, 161, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(132, 116, 161, 0.4);
}

.btn-outline-primary {
  --bs-btn-color: var(--th-primary);
  --bs-btn-border-color: var(--th-primary);
  --bs-btn-hover-bg: var(--th-primary);
  --bs-btn-hover-border-color: var(--th-primary);
  --bs-btn-hover-color: #fff;
  border-width: 2px;
}

.btn-outline-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(132, 116, 161, 0.25);
}

.btn-outline-light {
  border-width: 2px;
  font-weight: 600;
}

.btn-outline-light:hover {
  transform: translateY(-2px);
}

/* Enhanced Cards */
.card {
  border: none;
  border-radius: var(--th-radius);
  box-shadow: var(--th-shadow);
  background: #fff;
  transition: var(--th-transition);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--th-shadow-hover);
}

.card-img-top {
  transition: var(--th-transition);
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  position: relative;
  z-index: 1;
}

.shadow-soft {
  box-shadow: var(--th-shadow);
}

/* Enhanced Hero Section */
.hero {
  background: linear-gradient(135deg, rgba(132, 116, 161, 0.08), rgba(203, 170, 209, 0.12));
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(112, 197, 205, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(203, 170, 209, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 15s ease-in-out infinite reverse;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  animation: fadeInUp 0.8s ease-out;
}

.hero p {
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-mockup {
  max-width: 360px;
  border-radius: var(--th-radius-lg);
  animation: fadeInUp 1.2s ease-out 0.4s both, float 6s ease-in-out infinite;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.display-5 {
  font-weight: 800;
  background: linear-gradient(135deg, var(--th-primary) 0%, var(--th-tertiary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lead {
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.7;
}

.text-muted-2 {
  color: var(--th-text-secondary) !important;
}

/* Enhanced Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  border-radius: var(--th-radius);
  border: 2px dashed rgba(203, 170, 209, 0.4);
  background: linear-gradient(135deg, rgba(240, 233, 223, 0.3), rgba(203, 170, 209, 0.1));
  backdrop-filter: blur(10px);
  transition: var(--th-transition);
}

.empty-state:hover {
  border-color: var(--th-secondary);
  transform: scale(1.02);
}

/* Enhanced Timeline */
.timeline {
  display: grid;
  gap: 2rem;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 60px;
  bottom: 60px;
  width: 2px;
  background: linear-gradient(180deg, var(--th-primary), var(--th-tertiary));
  opacity: 0.3;
}

.timeline-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1.5rem;
  align-items: center;
  animation: fadeInLeft 0.6s ease-out both;
}

.timeline-step:nth-child(1) { animation-delay: 0.1s; }
.timeline-step:nth-child(2) { animation-delay: 0.2s; }
.timeline-step:nth-child(3) { animation-delay: 0.3s; }
.timeline-step:nth-child(4) { animation-delay: 0.4s; }

.timeline-index {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--th-primary), var(--th-tertiary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(132, 116, 161, 0.3);
  position: relative;
  z-index: 1;
  transition: var(--th-transition);
}

.timeline-step:hover .timeline-index {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 6px 20px rgba(132, 116, 161, 0.4);
}

.timeline-copy {
  font-weight: 500;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--th-radius-sm);
  transition: var(--th-transition);
}

.timeline-step:hover .timeline-copy {
  background: rgba(240, 233, 223, 0.6);
  transform: translateX(10px);
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Enhanced Service Cards */
.service-card {
  position: relative;
  cursor: pointer;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(132, 116, 161, 0.05), rgba(112, 197, 205, 0.05));
  opacity: 0;
  transition: var(--th-transition);
  border-radius: var(--th-radius);
  z-index: 0;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card .badge {
  letter-spacing: .08em;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  background: linear-gradient(135deg, var(--th-secondary), var(--th-tertiary)) !important;
  color: var(--th-primary) !important;
  border-radius: 2rem;
  transition: var(--th-transition);
}

.service-card:hover .badge {
  transform: scale(1.05);
}

/* Enhanced Forms */
.form-control, .form-select {
  border-radius: var(--th-radius-sm);
  border: 2px solid rgba(132, 116, 161, 0.2);
  padding: 0.75rem 1rem;
  transition: var(--th-transition);
  font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--th-primary);
  box-shadow: 0 0 0 4px rgba(132, 116, 161, 0.1);
  transform: translateY(-2px);
}

.form-label {
  font-weight: 600;
  color: var(--th-text);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

/* Enhanced Input Group */
.input-group {
  box-shadow: var(--th-shadow-sm);
  border-radius: var(--th-radius-sm);
  overflow: hidden;
}

.input-group-text {
  background: linear-gradient(135deg, var(--th-surface), rgba(203, 170, 209, 0.1));
  border: 2px solid rgba(132, 116, 161, 0.2);
  border-right: none;
  color: var(--th-primary);
  font-weight: 600;
}

.input-group .form-control {
  border-left: none;
}

/* Smart Banner */
.smart-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 0;
  background: linear-gradient(180deg, transparent, rgba(132, 116, 161, 0.95));
  backdrop-filter: blur(10px);
  z-index: 1040;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Download Page */
.download-page .btn-primary {
  min-width: 180px;
}

.download-page .btn {
  transition: var(--th-transition);
}

.download-page .btn:hover {
  transform: translateY(-4px) scale(1.05);
}

/* Background Gradient */
.bg-gradient {
  background: linear-gradient(135deg, rgba(132, 116, 161, 0.08), rgba(203, 170, 209, 0.12));
  position: relative;
}

.bg-surface {
  background: linear-gradient(135deg, var(--th-surface), rgba(240, 233, 223, 0.5));
}

/* Toast */
.toast-thkra {
  background: linear-gradient(135deg, var(--th-primary), var(--th-tertiary));
  color: #fff;
  border-radius: var(--th-radius-sm);
  box-shadow: var(--th-shadow-lg);
}

/* Enhanced Footer */
.footer,
footer {
  background: linear-gradient(135deg, var(--th-accent), #063e40);
  position: relative;
  overflow: hidden;
}

.footer::before,
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(112, 197, 205, 0.5), transparent);
}

footer a {
  transition: var(--th-transition-fast);
  position: relative;
}

footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--th-tertiary);
  transition: var(--th-transition);
}

footer a:hover::after {
  width: 100%;
}

footer a:hover {
  color: var(--th-tertiary) !important;
  transform: translateY(-2px);
}

/* Badge Enhancements */
.badge {
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  letter-spacing: 0.5px;
  transition: var(--th-transition);
}

.badge:hover {
  transform: scale(1.05);
}

/* Section Spacing */
section {
  position: relative;
}

section.py-5 {
  padding-top: 4rem !important;
  padding-bottom: 4rem !important;
}

/* Scroll Animations */
.fade-in {
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Image Enhancements */
img {
  transition: var(--th-transition);
}

.ratio img {
  object-fit: cover;
}

/* Sticky Header Enhancement */
header.sticky-top {
  transition: var(--th-transition);
}

header.sticky-top.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Loading States */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Offcanvas adjustments */
@media (max-width: 991.98px) {
  .smart-banner {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .timeline::before {
    left: 24px;
  }
}

@media (min-width: 992px) {
  .smart-banner {
    display: none;
  }
}

/* Accessibility Improvements */
.btn:focus-visible,
.form-control:focus-visible,
a:focus-visible {
  outline: 3px solid var(--th-tertiary);
  outline-offset: 2px;
}

/* Ripple Effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Print Styles */
@media print {
  .navbar, .footer, .smart-banner, .btn {
    display: none;
  }
}

