/* Modern Portfolio Theme - Base Styles */

:root {
  --ninja-p: #2563eb;
  --ninja-s: #34495e;
  --ninja-a: #ff0000;
  --ninja-t: #333;
  --ninja-b: #f8f9fa;
  --ninja-c: #fff;
  --ninja-sh: rgba(0, 0, 0, 0.1);
  --ninja-sh-hover: rgba(0, 0, 0, 0.15);

  /* Color Palette */
  --primary: #ff0000;
  --primary-light: #ff0000;
  --primary-dark: #000000;
  --primary-icon: #5c6bc0;
  --accent: #000000;
  --accent-light: #ffe082;
  --accent-dark: #ffb300;
  --background: #f7f9fc;
  --card-bg: #ffffff;
  --text: #1e1e2f;
  --text-light: #6e7191;
  --text-dark: #0f0f1a;
  --border: #e4e9f2;
  --success: #4caf50;
  --warning: #ff9800;
  --error: #f44336;
  --info: #2196f3;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-xxl: 3rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.16);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Z-index layers */
  --z-base: 1;
  --z-menu: 100;
  --z-modal: 1000;
  --z-tooltip: 1500;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --primary: #ff0000;
  --primary-light: #ff0000;
  --primary-dark: #000000;
  --accent: #ff0000;
  --accent-light: #ffe082;
  --accent-dark: #ffca28;
  --background: #121212;
  --card-bg: #1e1e1e;
  --text: #e4e9f2;
  --text-light: #b0b7c3;
  --text-dark: #ffffff;
  --border: #2d2d3a;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.35);
  --ninja-p: #2563eb;
  --ninja-s: #2c3e50;
  --ninja-a: #ff0000;
  --ninja-t: #f8f9fa;
  --ninja-b: #1a1a1a;
  --ninja-c: #2c2c2c;
  --ninja-s: rgba(0, 0, 0, 0.3);
  --ninja-sh-hover: rgba(0, 0, 0, 0.4);
}

/* Base Styles */
body {
  font-family: "Poppins", "Tajawal", sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  padding-top: 120px; /* Space for floating header */
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-dark);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--space-md);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

[data-theme="dark"] a:hover {
  color: var(--text);
}

[data-theme="dark"] .footer-section ul li a {
  color: var(--text);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Section Styles */
.section {
  padding: var(--space-xxl) 0;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-xxl);
  position: relative;
}

.section-title h2 {
  display: inline-block;
  position: relative;
  margin-bottom: var(--space-md);
  z-index: 1;
}

.section-title h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--accent);
  border-radius: var(--radius-full);
}

.section-title p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Card Styles */
.card {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

[data-theme="dark"] .card {
  background-color: var(--ninja-b);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.card-body {
  padding: var(--space-lg);
}

.card-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border);
}

imag-logo-abdo {
    max-width: 100%;
}
/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.5rem;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  gap: 0.5rem;
}

.btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
}

.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: white;
}

.btn-accent {
  background-color: var(--primary);
}

.btn-accent:hover {
  background-color: var(--primary-dark);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* Form Styles */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 500;
  color: var(--text-dark);
}

.form-control {
  width: -webkit-fill-available;
  padding: 0.75rem 1rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

[data-theme="dark"] .form-control {
  background-color: var(--ninja-b);
  border: 1px solid var(--primary);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.2);
  outline: none;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23FF0000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-text {
  display: block;
  margin-top: var(--space-xs);
  font-size: 0.85rem;
  color: var(--text-light);
}

.form-check {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.form-check-input {
  margin-right: var(--space-sm);
}

.form-check-label {
  font-size: 0.95rem;
}

/* File Upload */
.file-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  text-align: center;
  transition: border-color var(--transition-fast);
  cursor: pointer;
}

.file-upload:hover,
.file-upload.dragover {
  border-color: var(--primary);
}

.file-upload-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: var(--space-md);
}

.file-upload-text {
  color: var(--text-light);
  margin-bottom: var(--space-sm);
}

.file-upload-btn {
  display: inline-block;
  color: var(--primary);
  font-weight: 500;
}

/* Alert Styles */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.alert-success {
  background-color: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: var(--success);
}

.alert-warning {
  background-color: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.3);
  color: var(--warning);
}

.alert-error {
  background-color: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: var(--error);
}

.alert-info {
  background-color: rgba(33, 150, 243, 0.1);
  border: 1px solid rgba(33, 150, 243, 0.3);
  color: var(--info);
}

/* Badge Styles */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-accent {
  background-color: rgba(255, 202, 40, 0.1);
  color: var(--accent-dark);
}

/* Icon Styles */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-lg {
  width: 32px;
  height: 32px;
}

.icon-circle {
  border-radius: var(--radius-full);
  background-color: rgba(92, 107, 192, 0.1);
  width: 40px;
  height: 40px;
}

/* Grid System */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-lg);
}

.col-1 {
  grid-column: span 1;
}
.col-2 {
  grid-column: span 2;
}
.col-3 {
  grid-column: span 3;
}
.col-4 {
  grid-column: span 4;
}
.col-5 {
  grid-column: span 5;
}
.col-6 {
  grid-column: span 6;
}
.col-7 {
  grid-column: span 7;
}
.col-8 {
  grid-column: span 8;
}
.col-9 {
  grid-column: span 9;
}
.col-10 {
  grid-column: span 10;
}
.col-11 {
  grid-column: span 11;
}
.col-12 {
  grid-column: span 12;
}

/* Responsive Grid */
@media (max-width: 992px) {
  .col-lg-1 {
    grid-column: span 1;
  }
  .col-lg-2 {
    grid-column: span 2;
  }
  .col-lg-3 {
    grid-column: span 3;
  }
  .col-lg-4 {
    grid-column: span 4;
  }
  .col-lg-5 {
    grid-column: span 5;
  }
  .col-lg-6 {
    grid-column: span 6;
  }
  .col-lg-7 {
    grid-column: span 7;
  }
  .col-lg-8 {
    grid-column: span 8;
  }
  .col-lg-9 {
    grid-column: span 9;
  }
  .col-lg-10 {
    grid-column: span 10;
  }
  .col-lg-11 {
    grid-column: span 11;
  }
  .col-lg-12 {
    grid-column: span 12;
  }
}

@media (max-width: 768px) {
  .col-md-1 {
    grid-column: span 1;
  }
  .col-md-2 {
    grid-column: span 2;
  }
  .col-md-3 {
    grid-column: span 3;
  }
  .col-md-4 {
    grid-column: span 4;
  }
  .col-md-5 {
    grid-column: span 5;
  }
  .col-md-6 {
    grid-column: span 6;
  }
  .col-md-7 {
    grid-column: span 7;
  }
  .col-md-8 {
    grid-column: span 8;
  }
  .col-md-9 {
    grid-column: span 9;
  }
  .col-md-10 {
    grid-column: span 10;
  }
  .col-md-11 {
    grid-column: span 11;
  }
  .col-md-12 {
    grid-column: span 12;
  }
}

@media (max-width: 576px) {
  .col-sm-1 {
    grid-column: span 1;
  }
  .col-sm-2 {
    grid-column: span 2;
  }
  .col-sm-3 {
    grid-column: span 3;
  }
  .col-sm-4 {
    grid-column: span 4;
  }
  .col-sm-5 {
    grid-column: span 5;
  }
  .col-sm-6 {
    grid-column: span 6;
  }
  .col-sm-7 {
    grid-column: span 7;
  }
  .col-sm-8 {
    grid-column: span 8;
  }
  .col-sm-9 {
    grid-column: span 9;
  }
  .col-sm-10 {
    grid-column: span 10;
  }
  .col-sm-11 {
    grid-column: span 11;
  }
  .col-sm-12 {
    grid-column: span 12;
  }
}

/* Flex Utilities */
.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.justify-content-start {
  justify-content: flex-start;
}

.justify-content-center {
  justify-content: center;
}

.justify-content-end {
  justify-content: flex-end;
}

.justify-content-between {
  justify-content: space-between;
}

.align-items-start {
  align-items: flex-start;
}

.align-items-center {
  align-items: center;
}

.align-items-end {
  align-items: flex-end;
}

/* Spacing Utilities */
.m-0 {
  margin: 0;
}
.m-1 {
  margin: var(--space-xs);
}
.m-2 {
  margin: var(--space-sm);
}
.m-3 {
  margin: var(--space-md);
}
.m-4 {
  margin: var(--space-lg);
}
.m-5 {
  margin: var(--space-xl);
}

.mt-0 {
  margin-top: 0;
}
.mt-1 {
  margin-top: var(--space-xs);
}
.mt-2 {
  margin-top: var(--space-sm);
}
.mt-3 {
  margin-top: var(--space-md);
}
.mt-4 {
  margin-top: var(--space-lg);
}
.mt-5 {
  margin-top: var(--space-xl);
}

.mb-0 {
  margin-bottom: 0;
}
.mb-1 {
  margin-bottom: var(--space-xs);
}
.mb-2 {
  margin-bottom: var(--space-sm);
}
.mb-3 {
  margin-bottom: var(--space-md);
}
.mb-4 {
  margin-bottom: var(--space-lg);
}
.mb-5 {
  margin-bottom: var(--space-xl);
}

.ml-0 {
  margin-left: 0;
}
.ml-1 {
  margin-left: var(--space-xs);
}
.ml-2 {
  margin-left: var(--space-sm);
}
.ml-3 {
  margin-left: var(--space-md);
}
.ml-4 {
  margin-left: var(--space-lg);
}
.ml-5 {
  margin-left: var(--space-xl);
}

.mr-0 {
  margin-right: 0;
}
.mr-1 {
  margin-right: var(--space-xs);
}
.mr-2 {
  margin-right: var(--space-sm);
}
.mr-3 {
  margin-right: var(--space-md);
}
.mr-4 {
  margin-right: var(--space-lg);
}
.mr-5 {
  margin-right: var(--space-xl);
}

.p-0 {
  padding: 0;
}
.p-1 {
  padding: var(--space-xs);
}
.p-2 {
  padding: var(--space-sm);
}
.p-3 {
  padding: var(--space-md);
}
.p-4 {
  padding: var(--space-lg);
}
.p-5 {
  padding: var(--space-xl);
}

.pt-0 {
  padding-top: 0;
}
.pt-1 {
  padding-top: var(--space-xs);
}
.pt-2 {
  padding-top: var(--space-sm);
}
.pt-3 {
  padding-top: var(--space-md);
}
.pt-4 {
  padding-top: var(--space-lg);
}
.pt-5 {
  padding-top: var(--space-xl);
}

.pb-0 {
  padding-bottom: 0;
}
.pb-1 {
  padding-bottom: var(--space-xs);
}
.pb-2 {
  padding-bottom: var(--space-sm);
}
.pb-3 {
  padding-bottom: var(--space-md);
}
.pb-4 {
  padding-bottom: var(--space-lg);
}
.pb-5 {
  padding-bottom: var(--space-xl);
}

.pl-0 {
  padding-left: 0;
}
.pl-1 {
  padding-left: var(--space-xs);
}
.pl-2 {
  padding-left: var(--space-sm);
}
.pl-3 {
  padding-left: var(--space-md);
}
.pl-4 {
  padding-left: var(--space-lg);
}
.pl-5 {
  padding-left: var(--space-xl);
}

.pr-0 {
  padding-right: 0;
}
.pr-1 {
  padding-right: var(--space-xs);
}
.pr-2 {
  padding-right: var(--space-sm);
}
.pr-3 {
  padding-right: var(--space-md);
}
.pr-4 {
  padding-right: var(--space-lg);
}
.pr-5 {
  padding-right: var(--space-xl);
}

/* Text Utilities */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: var(--primary);
}

.text-accent {
  color: var(--accent-dark);
}

.text-light {
  color: var(--text-light);
}

.text-dark {
  color: var(--text-dark);
}

.fw-light {
  font-weight: 300;
}

.fw-normal {
  font-weight: 400;
}

.fw-medium {
  font-weight: 500;
}

.fw-bold {
  font-weight: 600;
}

.fs-sm {
  font-size: 0.875rem;
}

.fs-md {
  font-size: 1rem;
}

.fs-lg {
  font-size: 1.125rem;
  color: var(--text-light);
}

.fs-xl {
  font-size: 1.25rem;
}

/* Animation Utilities */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.slide-up {
  animation: slideUp 0.5s ease forwards;
}

.slide-in-right {
  animation: slideInRight 0.5s ease forwards;
}

.slide-in-left {
  animation: slideInLeft 0.5s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* RTL Support */
[dir="rtl"] .ml-1 {
  margin-left: 0;
  margin-right: var(--space-xs);
}
[dir="rtl"] .ml-2 {
  margin-left: 0;
  margin-right: var(--space-sm);
}
[dir="rtl"] .ml-3 {
  margin-left: 0;
  margin-right: var(--space-md);
}
[dir="rtl"] .ml-4 {
  margin-left: 0;
  margin-right: var(--space-lg);
}
[dir="rtl"] .ml-5 {
  margin-left: 0;
  margin-right: var(--space-xl);
}

[dir="rtl"] .mr-1 {
  margin-right: 0;
  margin-left: var(--space-xs);
}
[dir="rtl"] .mr-2 {
  margin-right: 0;
  margin-left: var(--space-sm);
}
[dir="rtl"] .mr-3 {
  margin-right: 0;
  margin-left: var(--space-md);
}
[dir="rtl"] .mr-4 {
  margin-right: 0;
  margin-left: var(--space-lg);
}
[dir="rtl"] .mr-5 {
  margin-right: 0;
  margin-left: var(--space-xl);
}

[dir="rtl"] .pl-1 {
  padding-left: 0;
  padding-right: var(--space-xs);
}
[dir="rtl"] .pl-2 {
  padding-left: 0;
  padding-right: var(--space-sm);
}
[dir="rtl"] .pl-3 {
  padding-left: 0;
  padding-right: var(--space-md);
}
[dir="rtl"] .pl-4 {
  padding-left: 0;
  padding-right: var(--space-lg);
}
[dir="rtl"] .pl-5 {
  padding-left: 0;
  padding-right: var(--space-xl);
}

[dir="rtl"] .pr-1 {
  padding-right: 0;
  padding-left: var(--space-xs);
}
[dir="rtl"] .pr-2 {
  padding-right: 0;
  padding-left: var(--space-sm);
}
[dir="rtl"] .pr-3 {
  padding-right: 0;
  padding-left: var(--space-md);
}
[dir="rtl"] .pr-4 {
  padding-right: 0;
  padding-left: var(--space-lg);
}
[dir="rtl"] .pr-5 {
  padding-right: 0;
  padding-left: var(--space-xl);
}

[dir="rtl"] .text-left {
  text-align: right;
}

[dir="rtl"] .text-right {
  text-align: left;
}

[dir="rtl"] .form-select {
  background-position: left 1rem center;
  padding-right: 1rem;
  padding-left: 2.5rem;
}

/* Responsive Utilities */
@media (max-width: 992px) {
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  h3 {
    font-size: 1.4rem;
  }

  .section {
    padding: var(--space-xl) 0;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 100px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .section {
    padding: var(--space-lg) 0;
  }

  .section-title {
    margin-bottom: var(--space-xl);
  }
}

@media (max-width: 576px) {
  body {
    padding-top: 80px;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  .btn {
    padding: 0.5rem 1.2rem;
  }

  .section {
    padding: var(--space-md) 0;
  }
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Timeline Component */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  width: 2px;
  background-color: var(--border);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -10px;
}

.timeline-date {
  position: absolute;
  top: 12px;
  right: -150px;
  color: var(--text-light);
  font-weight: 500;
}

.timeline-item:nth-child(even) .timeline-date {
  left: -150px;
  right: auto;
  text-align: right;
}

.timeline-content {
  padding: var(--space-lg);
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.timeline-content h4 {
  margin-bottom: var(--space-sm);
  color: var(--primary);
}

.timeline-content p {
  margin-bottom: 0;
}

[dir="rtl"] .timeline::before {
  left: auto;
  right: 50%;
  margin-left: 0;
  margin-right: -1px;
}

[dir="rtl"] .timeline-item:nth-child(odd) {
  left: auto;
  right: 0;
}

[dir="rtl"] .timeline-item:nth-child(even) {
  left: auto;
  right: 50%;
}

[dir="rtl"] .timeline-item:nth-child(even) .timeline-dot {
  left: auto;
  right: -10px;
}

[dir="rtl"] .timeline-date {
  right: auto;
  left: -150px;
  text-align: left;
}

[dir="rtl"] .timeline-item:nth-child(even) .timeline-date {
  left: auto;
  right: -150px;
  text-align: left;
}

/* Responsive Timeline */
@media (max-width: 768px) {
  .timeline::before {
    left: 31px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  .timeline-item:nth-child(even) {
    left: 0;
  }

  .timeline-dot {
    left: 21px;
    right: auto;
  }

  .timeline-item:nth-child(even) .timeline-dot {
    left: 21px;
  }

  .timeline-date {
    position: relative;
    top: 0;
    right: auto;
    left: auto;
    margin-bottom: var(--space-sm);
    display: block;
  }

  .timeline-item:nth-child(even) .timeline-date {
    left: auto;
    text-align: left;
  }

  [dir="rtl"] .timeline::before {
    left: auto;
    right: 31px;
  }

  [dir="rtl"] .timeline-item {
    padding-left: 25px;
    padding-right: 70px;
  }

  [dir="rtl"] .timeline-item:nth-child(even) {
    right: 0;
  }

  [dir="rtl"] .timeline-item:nth-child(even) .timeline-dot {
    right: 21px;
  }

  [dir="rtl"] .timeline-date {
    text-align: right;
  }

  [dir="rtl"] .timeline-item:nth-child(even) .timeline-date {
    right: auto;
    text-align: right;
  }
}

/* Multi-step Form */
.multi-step-form {
  position: relative;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

.form-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  position: relative;
}

.form-progress::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--border);
  transform: translateY(-50%);
  z-index: 0;
}

.step-indicator {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--card-bg);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-light);
  position: relative;
  z-index: 1;
  transition: all var(--transition-normal);
}

.step-indicator.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

.step-indicator.completed {
  background-color: var(--success);
  border-color: var(--success);
  color: white;
}

.form-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-xl);
}

/* Footer */
footer {
  background-color: var(--ninja-secondary);
  padding: 3rem 0 1rem;
  margin-top: 3rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.footer-section {
  flex: 1;
  min-width: 200px;
}

.footer-section h3 {
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-section h3::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--ninja-accent);
}

body[dir="rtl"] .footer-section h3::after {
  left: auto;
  right: 0;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section ul li a {
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.footer-section ul li a i {
  margin-right: 8px;
}

body[dir="rtl"] .footer-section ul li a i {
  margin-right: 0;
  margin-left: 8px;
}

.footer-bottom {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

.footer {
  background-color: var(--card-bg);
  padding: var(--space-xxl) 0 var(--space-lg);
  margin-top: var(--space-xxl);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .footer {
  background-color: var(--ninja-b);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
}

.footer-section h3 {
  position: relative;
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.footer-section h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--accent);
  border-radius: var(--radius-full);
}

[dir="rtl"] .footer-section h3::after {
  left: auto;
  right: 0;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: var(--space-sm);
}

.footer-section ul li a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: transform var(--transition-fast);
  color: var(--primary-dark);
}

.footer-section ul li a:hover {
  transform: translateX(5px);
  color: var(--primary);
}

[dir="rtl"] .footer-section ul li a:hover {
  transform: translateX(-5px);
}

.social-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(92, 107, 192, 0.1);
  color: var(--primary-dark);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  margin-top: var(--space-xl);
  border-top: 1px solid var(--border);
  color: var(--text-light);
}

/* Scroll to Top Button */
.scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  border-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
  z-index: 99;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

[dir="rtl"] .scroll-top {
  right: auto;
  left: 20px;
}

/* Fix icon alignment in all components */
.icon-circle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.icon-circle i {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Fix button icon alignment */
.btn i {
  display: inline-flex !important;
  align-items: center !important;
  vertical-align: middle !important;
}

/* Fix RTL specific issues */
[dir="rtl"] .btn-next i.fa-arrow-right {
  transform: scaleX(-1);
}

[dir="rtl"] .btn-prev i.fa-arrow-left {
  transform: scaleX(-1);
}

/* Fix icon alignment in cards */
.card-body .d-flex.align-items-center .icon-circle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Fix social icons in footer */
.social-links .social-link i {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Fix form icons */
.input-group-text i {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Fix stats section icons */
.stats-section .icon-circle {
  margin: 0 auto 1rem;
  width: 60px;
  height: 60px;
}

.stats-section .icon-circle i {
  font-size: 1.5rem;
}

/* Home Page Specific Styles */
.hero-content {
    padding: 3rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-light), var(--ninja-p));
    color: white;
}

/* Project Card Styles */
.project-card {
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-img-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .card-img {
    transform: scale(1.1);
}

.no-image {
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 2rem;
}

.card-img.lazy-load {
  opacity: 0;
  background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
    linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
    linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.card-img.loaded {
  opacity: 1;
}

.card-img.error {
  opacity: 0.7;
  filter: grayscale(100%);
}

.card-img-container:hover .card-img-overlay {
  opacity: 1;
}

.card-img-container:hover .card-img {
  transform: scale(1.05);
}

.card-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .card-img-overlay {
    opacity: 1;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: var(--ninja-accent);
    color: white;
}

/* Inline Category Badge */

/* Fix icon alignment in circles */
.icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
}

/* Fix icon alignment in cards */
.card .d-flex.align-items-center .icon-circle {
    margin-right: 0.75rem;
}

[dir="rtl"] .card .d-flex.align-items-center .icon-circle {
    margin-right: 0;
    margin-left: 0.75rem;
}

/* Fix stats section icon alignment */
.stats-section .icon-circle {
    margin: 0 auto 1rem;
    width: 60px;
    height: 60px;
}

.stats-section .icon-circle i {
    font-size: 1.5rem;
}

/* Enhanced Read More Button */
.read-more-btn {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid var(--primary);
    color: var(--primary);
    background-color: transparent;
    transition: all 0.3s ease;
    border-radius: 50px;
}

.read-more-btn:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .hero-content {
        padding: 2rem 0;
    }
    
    /* Stack items vertically on mobile */
    .d-flex.align-items-center .ml-auto {
        flex-direction: column;
        align-items: flex-end !important;
        gap: 0.5rem;
        display: contents;
    }
    
    .d-flex.align-items-center .ml-auto > span {
        margin-right: 0 !important;
        margin-bottom: 0.25rem;
    }
}

/* Portfolio Page Specific Styles */
.filter-card {
    border-radius: var(--radius-md);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--card-bg);
    color: var(--text);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    border: 1px solid var(--border);
}

[data-theme="dark"] .filter-btn {
  background-color: var(--ninja-b);
}

.filter-btn:hover {
    background-color: rgba(92, 107, 192, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

.filter-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Project Card Styles */
.project-card {
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .card-img {
    transform: scale(1.1);
}

.no-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.no-image i {
  font-size: 3rem;
  margin-bottom: 10px;
  opacity: 0.7;
}

.no-image span {
  font-size: 0.9rem;
  opacity: 0.8;
}

.card-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .card-img-overlay {
    opacity: 1;
}

/* Loading Placeholder */
.image-loading-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(248, 249, 250, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.loading-spinner {
  color: var(--primary-color, #007bff);
  font-size: 1.5rem;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: var(--primary);
    color: white;
}

.badge-primary {
    background-color: var(--primary);
}

/* Inline Category Badge */
.badge-category-inline {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--primary);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background-color: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
}

.pagination-btn:hover {
    background-color: rgba(92, 107, 192, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

.pagination-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.empty-state {
    padding: 3rem 1rem;
}

.empty-icon {
    margin-bottom: 1.5rem;
}

/* Read More Button */
.read-more-btn {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid var(--primary);
    color: var(--primary);
    background-color: transparent;
    transition: all 0.3s ease;
    border-radius: 50px;
}

.read-more-btn:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .filter-container, .sort-container {
        margin-bottom: 1.5rem;
    }
    
    .sort-container {
        text-align: left;
    }
    
    /* Stack items vertically on mobile */
    .d-flex.align-items-center .ml-auto {
        flex-direction: column;
        align-items: flex-end !important;
        gap: 0.5rem;
    }
    
    .d-flex.align-items-center .ml-auto > span {
        margin-right: 0 !important;
        margin-bottom: 0.25rem;
    }
}

/* Services Page Specific Styles */
.service-card {
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.service-features li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.service-features li i {
    margin-right: 0.75rem;
    font-size: 0.8rem;
}

[dir="rtl"] .service-features li {
    display: flex;
    align-items: center;
}

[dir="rtl"] .service-features li i {
    margin-right: 0;
    margin-left: 0.75rem;
}

.process-number {
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 auto 1.5rem;
}

.process-card {
    height: 100%;
}

@media (max-width: 768px) {
    .process-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* Request Service Page Specific Styles */
.steps-list {
    padding-left: 1.5rem;
    margin-bottom: 0;
}

[dir="rtl"] .steps-list {
    padding-left: 0;
    padding-right: 1.5rem;
}

.services-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.services-list li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.services-list li i {
    margin-right: 0.75rem;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

[dir="rtl"] .services-list li i {
    margin-right: 0;
    margin-left: 0.75rem;
}

.input-group {
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: white;
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

[dir="rtl"] .input-group-text {
    border-radius: 0;
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.input-group .form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

[dir="rtl"] .input-group .form-control {
    border-radius: var(--radius-md);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Fix step indicators */
.form-progress {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin: 0 1rem;
    position: relative;
}

.step-indicator:not(:last-child):after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 2rem;
    height: 2px;
    background-color: var(--border-color);
}

[dir="rtl"] .step-indicator:not(:last-child):after {
    left: auto;
    right: 100%;
}


.step-indicator.completed {
    background-color: var(--ninja-accent);
    border-color: var(--ninja-accent);
    color: white;
}

/* Fix RTL form alignment */
[dir="rtl"] .form-label {
    text-align: right;
    display: block;
}

[dir="rtl"] .form-check {
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .form-check-input {
    margin-left: 0;
    margin-right: -1.5rem;
}

/* Fix file upload in RTL */
[dir="rtl"] .file-upload-text {
    text-align: center;
}

/* Fix form navigation buttons in RTL */
[dir="rtl"] .form-navigation {
    flex-direction: row-reverse;
}

[dir="rtl"] .btn-next i {
    transform: scaleX(-1);
}

[dir="rtl"] .btn-prev i {
    transform: scaleX(-1);
}

/* Responsive step indicators */
@media (max-width: 576px) {
    .step-indicator {
        width: 30px;
        height: 30px;
        margin: 0 0.5rem;
        font-size: 0.8rem;
    }
    
    .step-indicator:not(:last-child):after {
        width: 1rem;
    }
}

/* About Page Specific Styles */
/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* About Page Specific Styles */
.about-image-container {
    position: relative;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
}

.about-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: block;
}

.about-image-accent {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background-color: var(--primary);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
    opacity: 0.8;
    border-radius: var(--radius-sm);
}

[dir="rtl"] .about-image-accent {
    right: auto;
    left: -20px;
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.section-subtitle {
    position: relative;
    padding-left: 15px;
    margin-bottom: 1.5rem;
    color: var(--primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.section-subtitle::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background-color: var(--primary);
    border-radius: var(--radius-full);
}

[dir="rtl"] .section-subtitle {
    padding-left: 0;
    padding-right: 15px;
}

[dir="rtl"] .section-subtitle::before {
    left: auto;
    right: 0;
}

.skill-item {
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 100%;
}

.skill-name {
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.skill-percentage {
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

.skill-bar {
    height: 8px;
    background-color: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.skill-level {
    height: 100%;
    background-color: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.testimonial-card {
    height: 100%;
    width: 100%;
    max-width: 100%;
}

.testimonial-quote {
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.testimonial-author {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
    flex-shrink: 0;
}

[dir="rtl"] .testimonial-avatar {
    margin-right: 0;
    margin-left: 1rem;
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-info {
    flex: 1;
    min-width: 0;
}

.testimonial-info h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.testimonial-info p {
    margin-bottom: 0;
    font-size: 0.9rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.admin-rating {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
}

.admin-rating i {
    color: #ccc;
    margin-right: 2px;
}

.admin-rating i.active {
    color: #ffc107;
}

/* Timeline Styles */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    width: 100%;
    overflow: hidden;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: var(--radius-full);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    max-width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    right: -14px;
    background-color: white;
    border: 4px solid var(--primary);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-date {
    position: absolute;
    top: 12px;
    right: -150px;
    width: 120px;
    text-align: left;
    padding: 5px;
    font-weight: bold;
    color: var(--primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.timeline-item:nth-child(even) .timeline-date {
    left: -150px;
    right: auto;
    text-align: right;
}

.timeline-content {
    padding: 20px;
    background-color: white;
    position: relative;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.timeline-content h4 {
    margin-top: 0;
    color: var(--primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.timeline-content p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* RTL Timeline Fixes */
[dir="rtl"] .timeline::after {
    left: auto;
    right: 50%;
    margin-right: -2px;
    margin-left: 0;
}

[dir="rtl"] .timeline-item:nth-child(odd) {
    right: 0;
    left: auto;
}

[dir="rtl"] .timeline-item:nth-child(even) {
    right: 50%;
    left: auto;
}

[dir="rtl"] .timeline-dot {
    right: auto;
    left: -14px;
}

[dir="rtl"] .timeline-item:nth-child(even) .timeline-dot {
    right: -10px;
    left: auto;
}

[dir="rtl"] .timeline-date {
    right: auto;
    left: -150px;
    text-align: right;
}

[dir="rtl"] .timeline-item:nth-child(even) .timeline-date {
    left: auto;
    right: -150px;
    text-align: left;
}

/* Container and Grid Fixes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    margin: 2rem 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.col-5 {
    grid-column: span 5;
}

.col-7 {
    grid-column: span 7;
}

.col-4 {
    grid-column: span 4;
}

.col-6 {
    grid-column: span 6;
}

.col-12 {
    grid-column: span 12;
}

/* About Content Fixes */
.about-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.skills-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

.cta-buttons .btn {
    flex: 1;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile Responsive Styles */
@media (max-width: 992px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .grid {
        gap: 1.5rem;
    }
    
    .col-5,
    .col-7 {
        grid-column: span 12;
    }
    
    .col-4 {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    .container {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    .section {
        padding: 2rem 0;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .grid {
        gap: 1rem;
        margin: 1rem 0;
    }
    
    .col-4,
    .col-6 {
        grid-column: span 12;
    }
    
    .about-image-accent {
        width: 80px;
        height: 80px;
        top: -15px;
        right: -15px;
    }
    
    [dir="rtl"] .about-image-accent {
        left: -15px;
        right: auto;
    }
    
    /* Mobile Timeline Fixes */
    .timeline {
        padding: 10px 0;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .timeline::after {
        left: 31px;
        margin-left: 0;
    }
    
    .timeline-item {
        width: 100%;
        max-width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        box-sizing: border-box;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-dot {
        left: 21px;
        right: auto;
    }
    
    .timeline-item:nth-child(even) .timeline-dot {
        left: 21px;
    }
    
    .timeline-date {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        width: auto;
        text-align: left;
        padding: 0;
        margin-bottom: 10px;
    }
    
    .timeline-item:nth-child(even) .timeline-date {
        left: auto;
        right: auto;
        text-align: left;
    }
    
    .timeline-content {
        padding: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* RTL Mobile Timeline Fixes */
    [dir="rtl"] .timeline::after {
        right: 31px;
        left: auto;
        margin-right: 0;
    }
    
    [dir="rtl"] .timeline-item {
        padding-right: 70px;
        padding-left: 25px;
    }
    
    [dir="rtl"] .timeline-item:nth-child(even) {
        right: 0;
        left: auto;
    }
    

    [dir="rtl"] .timeline-item:nth-child(even) .timeline-dot {
        right: 21px;
        left: auto;
    }
    
    [dir="rtl"] .timeline-date {
        text-align: right;
    }
    
    [dir="rtl"] .timeline-item:nth-child(even) .timeline-date {
        text-align: right;
    }
    
    /* Mobile CTA Buttons */
    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .cta-buttons .btn {
        width: 100%;
        flex: none;
    }
    
    /* Mobile Skills Container */
    .skills-container {
        margin-top: 2rem;
    }
    
    .skill-item {
        margin-bottom: 1rem;
    }
    
    /* Mobile Testimonials */
    .testimonial-author {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .testimonial-avatar {
        margin-right: 0;
        margin-left: 0;
        margin-bottom: 0.75rem;
    }
    
    .testimonial-info {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .section {
        padding: 1.5rem 0;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1.2rem;
    }
    
    .about-image-accent {
        width: 60px;
        height: 60px;
        top: -10px;
        right: -10px;
    }
    
    [dir="rtl"] .about-image-accent {
        left: -10px;
        right: auto;
    }
    
    .timeline-content {
        padding: 12px;
    }
    
    .timeline-item {
        padding-left: 60px;
        padding-right: 15px;
    }
    
    [dir="rtl"] .timeline-item {
        padding-right: 60px;
        padding-left: 15px;
    }
    
    .testimonial-text {
        font-size: 0.9rem;
    }
    
    .testimonial-info h4 {
        font-size: 1rem;
    }
    
    .testimonial-info p {
        font-size: 0.8rem;
    }
}

/* Dark Mode Fixes */
[data-theme="dark"] .timeline-content {
    background-color: var(--ninja-card-bg);
    color: var(--ninja-text);
}

[data-theme="dark"] .timeline-dot {
    background-color: var(--ninja-card-bg);
}

[data-theme="dark"] .skill-bar {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Fix any potential RTL text overflow */    
[dir="rtl"] .text-center {
    text-align: center !important;
}

[dir="rtl"] .text-left {
    text-align: right !important;
}

[dir="rtl"] .text-right {
    text-align: left !important;
}
[dir="rtl"] .ml-3 {
    margin-right: 0rem !important;
}

/* Contact Page Specific Styles */
.contact-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-info .icon-circle {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
}

.map-card {
    overflow: hidden;
    border-radius: var(--radius-md);
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(92, 107, 192, 0.1);
    color: var(--primary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* Fix icon alignment in RTL */
[dir="rtl"] .d-flex.align-items-center .icon-circle {
    margin-right: 0;
    margin-left: 1rem;
}

/* Make map responsive */
@media (max-width: 768px) {
    .map-card iframe {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .contact-info {
        margin-bottom: 2rem;
    }
}

/* Project Page Specific Styles */
.project-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.project-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-date {
    color: var(--text-light);
    font-size: 0.9rem;
}


.main-image {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    overflow: hidden;
}

.main-image img {
    width: 100%;
    display: block;
}

.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8f8f8;
    height: 300px;
    color: #aaa;
}

.no-image-placeholder i {
    margin-bottom: 1rem;
}

/* Swiper Slider Styles */
.project-slider {
    position: relative;
}

.swiper-container {
    width: 100%;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    overflow: hidden;
}

.swiper-slide {
    text-align: center;
    background: #f8f8f8;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    max-width: 100%;
    height: auto;
    display: block;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--primary) !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
}

.swiper-pagination-bullet-active {
    background: var(--primary);
}

.project-description {
    line-height: 1.8;
}

.like-button {
    transition: all var(--transition-normal);
}

.like-button.liked {
    color: var(--ninja-t);
    border-color: var(--ninja-t);
}

.like-button.liked i {
    color: var(--error);
}

.like-button.liked:hover {
background-color: rgba(231, 76, 60, 0.2);
}

.project-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-info-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.project-info-list li:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: var(--text-dark);
}

.info-value {
    color: var(--text-light);
}

.related-project {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.related-project:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-project-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text);
    transition: transform var(--transition-fast);
}

.related-project-link:hover {
    transform: translateX(5px);
}

[dir="rtl"] .related-project-link:hover {
    transform: translateX(-5px);
}

.related-project-img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-right: 1rem;
    flex-shrink: 0;
}

[dir="rtl"] .related-project-img {
    margin-right: 0;
    margin-left: 1rem;
}

.related-project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.related-project-info h4 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.comment {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.comment:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
}

[dir="rtl"] .comment-avatar {
    margin-right: 0;
    margin-left: 1rem;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-meta h4 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.comment-body p {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .project-meta {
        flex-direction: column;
        align-items: center;
    }
}

/* Header Page Customize Style */
/* Main Menu Styles */
nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 0.25rem; /* Reduced gap for better spacing */
}

nav ul li {
    display: flex;
    align-items: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Menu link container */
nav ul li a {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: var(--ninja-t);
    font-weight: 500;
    overflow: visible;
    white-space: nowrap;
    z-index: 1;
}

/* Icon styling */
nav ul li a i {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--ninja-t);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 20px;
    z-index: 2;
    position: relative;
}

/* Label styling - positioned as tooltip */
nav ul li a .menu-label {
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Styling */
    background: var(--ninja-c);
    color: var(--ninja-t);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    
    /* Shadow and backdrop */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* Z-index to appear above other elements */
    z-index: 100;
    pointer-events: none;
    
    /* Prevent layout shift */
    min-width: max-content;
}

/* RTL positioning for labels */
[dir="rtl"] nav ul li a .menu-label {
    left: auto;
    right: calc(100% + 8px);
    transform: translateY(-50%) translateX(10px);
}

/* Active state - inline label */
nav ul li a.active {
    background: linear-gradient(135deg, var(--ninja-a), #5849b8);
    color: white;
    box-shadow: 0 4px 12px rgba(106, 90, 205, 0.3);
    padding: 0.75rem 1.25rem;
    border-radius: 20px;
}

nav ul li a.active i {
    color: white;
    margin-right: 8px;
}

[dir="rtl"] nav ul li a.active i {
    margin-right: 0;
    margin-left: 8px;
}

nav ul li a.active .menu-label {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    margin: 0;
    pointer-events: auto;
    backdrop-filter: none;
    color: white;
    z-index: auto;
}

/* Hover effects for non-active items */
nav ul li:not(:has(a.active)):hover {
    z-index: 50; /* Ensure hovered item appears above others */
}

nav ul li a:not(.active):hover {
    background: rgba(106, 90, 205, 0.1);
    transform: translateY(-2px);
    z-index: 51;
}

nav ul li a:not(.active):hover i {
    color: var(--ninja-a);
    transform: scale(1.1);
}

nav ul li a:not(.active):hover .menu-label {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

[dir="rtl"] nav ul li a:not(.active):hover .menu-label {
    transform: translateY(-50%) translateX(0);
}

/* Ensure menu container doesn't clip tooltips */
nav {
    display: flex;
    align-items: center;
    overflow: visible;
}

/* Dark mode adjustments */
[data-theme="dark"] nav ul li a .menu-label {
    background: none !important;
}

[data-theme="dark"] nav ul li a:not(.active):hover {
    background: rgba(106, 90, 205, 0.2);
}

/* Mobile Menu Adjustments */
@media (max-width: 768px) {
    /* Mobile menu - show full labels */
    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--ninja-c);
        z-index: 1000;
        display: none;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        transform: translateY(-100%);
        transition: all 0.3s ease;
    }

    nav.show {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        margin: 0;
        padding: 0;
    }

    nav ul li {
        margin: 0;
        width: 100%;
        text-align: center;
        z-index: auto;
    }

    /* Mobile menu items - always show icon + label inline */
    nav ul li a {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem 2rem;
        font-size: 1.2rem;
        font-weight: 500;
        color: var(--ninja-t);
        text-decoration: none;
        border-radius: 8px;
        transition: all 0.3s ease;
        min-width: 200px;
        z-index: auto;
    }

    nav ul li a .menu-label {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0;
        margin-left: 12px;
        pointer-events: auto;
        backdrop-filter: none;
        z-index: auto;
    }

    [dir="rtl"] nav ul li a .menu-label {
        margin-left: 0;
        margin-right: 12px;
    }

    nav ul li a:hover,
    nav ul li a.active {
        background-color: var(--ninja-a);
        color: white;
        transform: translateY(-2px);
    }

    nav ul li a i {
        margin-right: 12px;
        font-size: 1.1rem;
    }

    [dir="rtl"] nav ul li a i {
        margin-right: 0;
        margin-left: 12px;
    }
}

/* Ensure header container allows overflow for tooltips */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--ninja-c);
    border-radius: 999px;
    padding: 0.6rem 2rem;
    box-shadow: 0 8px 20px var(--ninja-sh);
    transition: all 0.3s ease;
    min-height: 60px;
    overflow: visible; /* Allow tooltips to show outside container */
}

/* Floating header adjustments */
.floating-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: visible; /* Allow tooltips to show outside header */
}

/* Navigation container adjustments */
nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

nav ul li {
    display: flex;
    align-items: center;
    position: relative;
}

/* Remove old margin styles */
nav ul li {
    margin-left: 0;
}

[dir="rtl"] nav ul li {
    margin-right: 0;
}

/* Mobile Menu Fixes */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--ninja-t);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    background-color: rgba(106, 90, 205, 0.1);
}

/* Navigation Styles */
nav {
    display: flex;
    align-items: center;
}

/* Mobile Header RTL Fixes */
.floating-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* RTL Header Container */
[dir="rtl"] .header-container {
    flex-direction: row-reverse;
}

/* Logo positioning */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--ninja-t);
    font-size: 1.5rem;
    font-weight: 600;
    order: 1;
}

[dir="rtl"] .logo {
    order: 3;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--ninja-t);
    font-size: 1.5rem;
    font-weight: 600;
}

.logo img {
    height: 40px;
    width: auto;
    margin-right: 10px;
}

[dir="rtl"] .logo img {
    margin-right: 0;
    margin-left: 10px;
}

.logo i {
    font-size: 2rem;
    color: var(--ninja-a);
}

/* Mobile menu toggle positioning */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--ninja-t);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    z-index: 1001;
    order: 2;
}

.mobile-menu-toggle:hover {
    background-color: rgba(106, 90, 205, 0.1);
}

/* Navigation - hidden on mobile */
nav {
    display: flex;
    align-items: center;
    order: 3;
}

[dir="rtl"] nav {
    order: 2;
}

/* Header Actions positioning */
.header-actions {
    display: flex;
    align-items: center;
    order: 4;
}

[dir="rtl"] .header-actions {
    order: 1;
    flex-direction: row-reverse;
}

/* Language Dropdown */
.language-dropdown {
    position: relative;
}

.language-dropdown-btn {
    display: flex;
    align-items: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    color: var(--ninja-t);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
}

.language-dropdown-btn:hover {
    background-color: rgba(106, 90, 205, 0.1);
}

.language-dropdown-btn .fa-chevron-down {
    margin-left: 8px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

[dir="rtl"] .language-dropdown-btn .fa-chevron-down {
    margin-left: 0;
    margin-right: 8px;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: var(--ninja-t);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background-color: rgba(106, 90, 205, 0.1);
    transform: translateY(-2px);
}

.theme-toggle-btn i {
    transition: transform 0.5s ease;
}

.theme-toggle-btn:hover i {
    transform: rotate(30deg);
}

/* Flag image styling */
.lang-flag {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

/* Mobile Responsive Styles */
@media (max-width: 992px) {
    .header-container {
        padding: 0.6rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0.6rem 1rem;
        position: relative;
    }

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Mobile menu - show full labels */
    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--ninja-c);
        z-index: 1000;
        display: none;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        transform: translateY(-100%);
        transition: all 0.3s ease;
    }

    nav.show {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        margin: 0;
        padding: 0;
    }

    nav ul li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    /* Mobile menu items - always show icon + label */
    nav ul li a {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem 2rem;
        font-size: 1.2rem;
        font-weight: 500;
        color: var(--ninja-t);
        text-decoration: none;
        border-radius: 8px;
        transition: all 0.3s ease;
        min-width: 200px;
    }

    nav ul li a .menu-label {
        opacity: 1;
        transform: translateX(0);
        position: static;
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0;
        margin-left: 12px;
        pointer-events: auto;
        backdrop-filter: none;
    }

    [dir="rtl"] nav ul li a .menu-label {
        margin-left: 0;
        margin-right: 12px;
    }

    nav ul li a:hover,
    nav ul li a.active {
        background-color: var(--ninja-a);
        color: white;
        transform: translateY(-2px);
    }

    nav ul li a i {
        margin-right: 12px;
        font-size: 1.1rem;
    }

    [dir="rtl"] nav ul li a i {
        margin-right: 0;
        margin-left: 12px;
    }

    .menu-separator {
        display: none;
    }

    /* Mobile header actions adjustments */
    .header-actions {
        gap: 0.25rem;
    }

    .language-dropdown-btn .lang-name {
        display: none;
    }

    .theme-toggle-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    /* Language dropdown positioning for mobile */
    .language-dropdown-content {
        right: 0;
        left: auto;
        width: 120px;
    }

    [dir="rtl"] .language-dropdown-content {
        right: auto;
        left: 0;
    }
    [dir="rtl"] .logo {
        order: 1;
    }
    .mobile-menu-toggle {
        order: 1;
    }
    [dir="rtl"] .header-actions {
        flex-direction: row;
    }
}

@media (max-width: 576px) {
    [dir="rtl"] .logo {
        order: 1;
    }
    [dir="rtl"] .header-actions {
        flex-direction: row;
        order: 2;
    }
    [dir="rtl"] .language-dropdown {
        order: 0;
    }
    .header-container {
        padding: 0.5rem 0.75rem;
    }

    .logo i {
        font-size: 1.8rem;
    }

    .theme-toggle-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .mobile-menu-toggle {
        padding: 0.4rem;
        font-size: 1.3rem;
    }

    .language-dropdown-btn {
        padding: 0.4rem;
        min-width: 40px;
        min-height: 40px;
    }

    .lang-flag {
        width: 20px;
        height: 14px;
    }
}

/* Dark mode fixes for mobile menu */
[data-theme="dark"] nav {
    background-color: var(--ninja-c);
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Ensure proper z-index stacking */
.floating-header {
    z-index: 1000;
}

.mobile-menu-toggle {
    z-index: 1001;
}

nav {
    z-index: 1000;
}

nav.show {
    z-index: 1000;
}

/* Improve login button */
.login-btn {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--ninja-a);
    color: white;
    border-radius: 999px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(106, 90, 205, 0.3);
}

.login-btn:hover {
    background-color: #5849b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(106, 90, 205, 0.4);
    color: white;
}

/* Fix icon display in RTL mode */
[dir="rtl"] .fas,
[dir="rtl"] .far,
[dir="rtl"] .fab,
[dir="rtl"] .fa {
    display: inline-flex !important;
    font-style: normal !important;
    align-items: center;
    justify-content: center;
}

/* Fix margin utilities in RTL */
[dir="rtl"] .mr-1 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

[dir="rtl"] .mr-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

[dir="rtl"] .mr-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

[dir="rtl"] .ml-1 {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

[dir="rtl"] .ml-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

[dir="rtl"] .ml-3 {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

/* Fix theme toggle in RTL mode */
[dir="rtl"] .theme-switch {
    direction: ltr;
    display: inline-block;
}

/* Ensure the toggle switch maintains its shape and functionality in RTL */
[dir="rtl"] .theme-switch .slider {
    transform: none;
}

/* Language switcher enhancement */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-switcher a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.language-switcher a:hover {
    transform: translateY(-2px);
}

.language-switcher a.active {
    border-color: var(--primary);
}

.lang-flag {
    height: 100%;
    object-fit: cover;
}

/* Language Dropdown */
.language-dropdown {
    position: relative;
    margin-right: 15px;
}

[dir="rtl"] .language-dropdown {
    margin-right: 0;
    margin-left: 15px;
    order: 2;
}

.language-dropdown-btn {
    display: flex;
    align-items: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    color: var(--ninja-t);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem;
}

.language-dropdown-btn:hover {
    background-color: rgba(106, 90, 205, 0.1);
}

.language-dropdown-btn .fa-chevron-down {
    margin-left: 8px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

[dir="rtl"] .language-dropdown-btn .fa-chevron-down {
    margin-left: 0;
    margin-right: 8px;
}

.language-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--ninja-c);
    min-width: 140px;
    max-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    z-index: 1000;
    overflow: hidden;
    margin-top: 8px;
    /* Prevent overflow on mobile */
    max-width: calc(100vw - 40px);
    white-space: nowrap;
}

[dir="rtl"] .language-dropdown-content {
    left: auto;
    right: 0;
}

.language-dropdown-content a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--ninja-t);
    transition: background-color 0.3s ease;
}

.language-dropdown-content a:hover {
    background-color: rgba(106, 90, 205, 0.1);
}

.language-dropdown-content a.active {
    background-color: rgba(230, 230, 250, 0.5);
    color: var(--ninja-t);
}

.language-dropdown-content .lang-flag {
    margin-right: 10px;
}

[dir="rtl"] .language-dropdown-content .lang-flag {
    margin-right: 0;
    margin-left: 10px;
}

.language-dropdown.show .language-dropdown-content {
    display: block !important;
    animation: fadeIn 0.3s ease;
}

.language-dropdown.show .fa-chevron-down {
    transform: rotate(180deg);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Theme Toggle Button */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: var(--ninja-t);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background-color: rgba(106, 90, 205, 0.1);
    transform: translateY(-2px);
}

.theme-toggle-btn i {
    transition: transform 0.5s ease;
}

.theme-toggle-btn:hover i {
    transform: rotate(30deg);
}

/* Remove old theme switcher */
.theme-switch {
    display: none;
}

/* Mobile-specific dropdown positioning */
@media (max-width: 768px) {
    .language-dropdown-btn .lang-name {
        display: none;
    }
    
    .language-dropdown-btn .flag-icon {
        margin-right: 0;
    }
    
    [dir="rtl"] .language-dropdown-btn .flag-icon {
        margin-left: 0;
    }
    
    .theme-toggle-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
}

/* Flag image styling */
.lang-flag {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    margin-right: 8px;
}

[dir="rtl"] .lang-flag {
    margin-right: 0;
    margin-left: 8px;
}

.language-dropdown-content .lang-flag {
    margin-right: 10px;
}

[dir="rtl"] .language-dropdown-content .lang-flag {
    margin-right: 0;
    margin-left: 10px;
}

@media (max-width: 768px) {
    .language-dropdown-btn .lang-flag {
        margin-right: 0;
    }
    
    [dir="rtl"] .language-dropdown-btn .lang-flag {
        margin-left: 0;
    }
}

/* Menu separator styling */
.menu-separator {
    display: inline-block;
    width: 1px;
    height: 35px;
    background-color: var(--ninja-t);
    margin: 0 10px;
    vertical-align: middle;
}

/* Responsive adjustments for separator */
@media (max-width: 768px) {
    .menu-separator {
        display: none;
    }
}

/* Logo styling */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--ninja-t);
    font-size: 1.5rem;
    font-weight: 600;
}

.logo img {
    height: 40px;
    width: auto;
    margin-right: 10px;
}

[dir="rtl"] .logo img {
    margin-right: 0;
    margin-left: 10px;
}

.logo i {
    font-size: 2rem;
    color: var(--ninja-a);
}

/* Dark mode fixes for mobile menu */
[data-theme="dark"] nav {
    background-color: var(--ninja-c);
}

[data-theme="dark"] nav::before {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--ninja-t);
}

[data-theme="dark"] nav::before:hover {
    background-color: var(--ninja-a);
    color: white;
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}


