/* ===== CSS Variables ===== */
:root {
  --primary-color: #10b981;
  --primary-dark: #059669;
  --secondary-color: #64748b;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #10b981;
  --light-color: #f8fafc;
  --dark-color: #1e293b;
  --border-radius: 0.5rem;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --transition: all 0.3s ease;
}

/* ===== Base Styles ===== */
* {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  direction: rtl;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== RTL Support ===== */
.rtl {
  direction: rtl;
  text-align: right;
}

/* Phone numbers and email addresses should be LTR */
.phone-number,
.email-address {
  direction: ltr;
  text-align: left;
  display: inline-block;
}

/* ===== Main Content ===== */
.main-content {
  margin-top: 80px;
  flex: 1;
  min-height: calc(100vh - 80px);
}

/* ===== Navigation ===== */
.navbar {
  backdrop-filter: blur(10px);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: white !important;
  text-decoration: none;
  transition: var(--transition);
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.75rem 1rem !important;
  border-radius: var(--border-radius);
  margin: 0 0.25rem;
}

.nav-link:hover {
  color: white !important;
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.navbar-toggler {
  border: none;
  color: white;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* ===== Buttons ===== */
.btn {
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: var(--transition);
  border: none;
  padding: 0.75rem 1.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  box-shadow: var(--box-shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
}

/* ===== Cards ===== */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-header {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  font-weight: 600;
  padding: 1rem 1.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* ===== Forms ===== */
.form-control {
  border-radius: var(--border-radius);
  border: 2px solid #e2e8f0;
  transition: var(--transition);
  padding: 0.75rem 1rem;
  font-family: 'Cairo', sans-serif;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

.form-label {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--secondary-color);
  text-align: right;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: right;
}

/* ===== Tables ===== */
.table {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.table thead th {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  font-weight: 600;
  padding: 1rem;
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background-color: #f8fafc;
  transform: scale(1.01);
}

/* ===== Alerts ===== */
.alert {
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  padding: 1rem 1.5rem;
}

.alert-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
}

.alert-danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
}

.alert-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
}

.alert-info {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
}

/* ===== Badges ===== */
.badge {
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius);
}

/* ===== Footer ===== */
footer {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%) !important;
  margin-top: auto;
}

footer h5,
footer h6 {
  color: white;
  font-weight: 700;
}

footer .social-links a {
  transition: var(--transition);
  display: inline-block;
}

footer .social-links a:hover {
  transform: translateY(-3px);
  color: #fbbf24 !important;
}

/* Footer text colors - make all text yellow for better visibility */
footer .text-muted,
footer .text-muted a,
footer a.text-muted,
footer .list-unstyled li,
footer .list-unstyled li a,
footer p,
footer span {
  color: #fbbf24 !important;
}

footer .list-unstyled li a:hover {
  color: #fbbf24 !important;
  text-decoration: underline;
}

/* Card text colors - make description text yellow for better visibility */
.card .text-muted,
.card p.text-muted {
  color: #fbbf24 !important;
}

/* Features section text colors */
.features-section .text-muted {
  color: #fbbf24 !important;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUpSmall {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .main-content {
    margin-top: 70px;
  }

  .navbar-brand {
    font-size: 1.25rem;
  }

  .card-body {
    padding: 1rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* ===== Focus States ===== */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

/* ===== Loading States ===== */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* ===== Utility Classes ===== */
.text-gradient {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.bg-gradient-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

.bg-gradient-warning {
  background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
}

.bg-gradient-danger {
  background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
}

.shadow-lg {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.rounded-lg {
  border-radius: var(--border-radius) !important;
}

/* ===== Print Styles ===== */
@media print {
  .navbar,
  footer,
  .btn {
    display: none !important;
  }

  .main-content {
    margin-top: 0 !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #e2e8f0 !important;
  }
}

/* ===== Force Green Theme Override ===== */
/* Override any blue colors with green */
.documentation-header,
.documentation-badge,
.documentation-nav-link.active,
.documentation-sidebar-link.active,
.documentation-quick-start-btn.primary,
.documentation-code-header,
.documentation-scroll-top {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.documentation-section-title,
.documentation-subsection-title,
.documentation-nav-link:hover,
.documentation-sidebar-link:hover,
.documentation-feature-icon,
.documentation-list li i {
  color: #10b981 !important;
}

.documentation-feature-card:hover {
  border-color: #10b981 !important;
}

/* Force all primary colors to green */
:root {
  --primary-color: #10b981 !important;
  --primary-dark: #059669 !important;
}
