/* 
   iRouteWeb - Business Website
   Main Stylesheet
   Version: 1.1
*/

:root {
  --primary: #2a2e4f;      /* Dark Blue/Purple */
  --secondary: #5d65cb;    /* Medium Purple */
  --accent: #00d9ff;       /* Bright Cyan */
  --accent-alt: #ff4088;   /* Pink */
  --light: #f5f7ff;        /* Light Blue-tinted white */
  --dark: #1a1a2e;         /* Very Dark Blue */
  --text: #212529;
  --text-light: #6c757d;
  --success: #4caf50;
  --warning: #ff9800;
  --danger: #f44336;
  --white: #ffffff;
  --black: #000000;
  --border-radius: 8px;
  --box-shadow: 0 4px 20px rgba(93, 101, 203, 0.15);
  --transition: all 0.3s ease;
  
  /* Coding Theme Colors */
  --code-bg: #1e1e3f;
  --code-text: #fff;
  --code-comment: #b362ff;
  --code-keyword: #ff9d00;
  --code-function: #ff628c;
  --code-operator: #ff9d00;
  --code-variable: #ff628c;
  --code-property: #fad000;
  --code-string: #a5ff90;
  --code-number: #ff628c;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox - hide scrollbar */
  -ms-overflow-style: none; /* IE and Edge - hide scrollbar */
  overflow-x: hidden; /* Prevent horizontal overflow */
}

body {
  font-family: 'Roboto', 'Cairo', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--light);
  overflow-x: hidden; /* Prevent horizontal overflow */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%; /* Ensure full width */
}

html[dir="rtl"] body {
  font-family: 'Cairo', 'Roboto', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--dark);
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
}

/* Hidden Scrollbar - Clean Modern Look */
::-webkit-scrollbar {
  width: 0px;
  height: 0px;
  background: transparent;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: transparent;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Loader Animation */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: var(--transition);
}

.loader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-spinner {
  position: relative;
  width: 60px;
  height: 60px;
}

.loader-spinner:before, 
.loader-spinner:after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

.loader-spinner:before {
  width: 100%;
  height: 100%;
  background-image: linear-gradient(var(--secondary) 0%, var(--accent) 100%);
  animation: spin 1s infinite linear;
}

.loader-spinner:after {
  width: 75%;
  height: 75%;
  background-color: var(--dark);
  top: 12.5%;
  left: 12.5%;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.text-center {
  text-align: center;
}

.section {
  padding: 80px 0;
}

.section.bg-primary {
  background-color: var(--primary);
  color: var(--white);
}

.section.bg-secondary {
  background-color: var(--secondary);
  color: var(--white);
}

.section.bg-dark {
  background-color: var(--dark);
  color: var(--white);
}

.section.bg-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
}

.section-title {
  position: relative;
  margin-bottom: 50px;
  text-align: center;
}

.section-title h2 {
  display: inline-block;
  position: relative;
  margin-bottom: 15px;
  font-size: 2.5rem;
  color: inherit;
}

.section-title h2::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 50px;
  height: 3px;
  background: var(--accent);
  transform: translateX(-50%);
}

html[dir="rtl"] .section-title h2::after {
  right: 50%;
  left: auto;
  transform: translateX(50%);
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--secondary);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition);
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
  transition: 0.7s;
}

.btn:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.1);
}

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

.btn-primary:hover {
  background: var(--secondary);
  border-color: var(--secondary);
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--dark);
}

.btn-accent:hover {
  background: var(--accent-alt);
  border-color: var(--accent-alt);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--secondary);
  color: white;
}

.btn-outline:hover {
  background: var(--secondary);
  color: var(--white);
}

.btn-light {
  background: var(--white);
  color: var(--primary);
}

.btn-light:hover {
  background: var(--light);
  color: var(--secondary);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left.active,
.slide-in-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Code Animation */
.code-container {
  background-color: var(--code-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  font-family: 'Consolas', 'Monaco', monospace;
  color: var(--code-text);
  position: relative;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  margin-bottom: 30px;
}

.code-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--accent-alt));
}

.code-container .line {
  position: relative;
  display: block;
  padding-left: 20px;
  min-height: 24px;
}

.code-container .line:before {
  content: attr(data-line);
  position: absolute;
  left: -20px;
  width: 20px;
  color: rgba(255, 255, 255, 0.4);
  text-align: right;
}

.code-container .comment {
  color: var(--code-comment);
}

.code-container .keyword {
  color: var(--code-keyword);
}

.code-container .function {
  color: var(--code-function);
}

.code-container .operator {
  color: var(--code-operator);
}

.code-container .variable {
  color: var(--code-variable);
}

.code-container .property {
  color: var(--code-property);
}

.code-container .string {
  color: var(--code-string);
}

.code-container .number {
  color: var(--code-number);
}

.code-container .cursor {
  display: inline-block;
  width: 10px;
  height: 20px;
  background-color: var(--accent);
  animation: blink 1s infinite;
  vertical-align: middle;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typing {
  white-space: nowrap;
  overflow: hidden;
  border-right: 3px solid var(--accent);
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
  display: inline-block;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--accent) }
}

/* Team Section */
.team-section {
  position: relative;
  overflow: hidden;
}

.team-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.team-tab {
  padding: 10px 30px;
  background: var(--light);
  color: var(--text);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  margin: 0 10px 10px;
  transition: var(--transition);
  font-weight: 500;
}

.team-tab.active {
  background: var(--secondary);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: var(--box-shadow);
}

.team-content {
  display: none;
}

.team-content.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

.team-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.team-card {
  width: 100%;
  max-width: 300px;
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  position: relative;
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(93, 101, 203, 0.2);
}

.team-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--secondary), var(--accent));
}

.team-card-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.team-card-content {
  padding: 20px;
  text-align: center;
}

.team-card-name {
  font-size: 1.2rem;
  margin-bottom: 5px;
  color: var(--dark);
}

.team-card-role {
  font-size: 0.9rem;
  color: var(--accent-alt);
  margin-bottom: 15px;
  font-weight: 500;
}

.team-card-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 15px;
}

.team-social {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.team-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--light);
  color: var(--secondary);
  transition: var(--transition);
}

.team-social-link:hover {
  background: var(--secondary);
  color: var(--white);
  transform: translateY(-3px);
}

.team-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 15px;
}

.team-skill {
  font-size: 0.8rem;
  padding: 3px 10px;
  background: var(--light);
  border-radius: 15px;
  color: var(--secondary);
}

.team-skill.frontend {
  background: rgba(93, 101, 203, 0.1);
  color: var(--secondary);
}

.team-skill.backend {
  background: rgba(0, 217, 255, 0.1);
  color: var(--accent);
}

.team-skill.design {
  background: rgba(255, 64, 136, 0.1);
  color: var(--accent-alt);
}

/* Navigation */
.navbar {
  padding: 15px 0;
  transition: var(--transition);
  background-color: var(--primary);
}

.navbar.scrolled {
  background-color: var(--dark);
  box-shadow: var(--box-shadow);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

.navbar-brand img {
  max-height: 40px;
}

.navbar-nav .nav-link {
  padding: 0.5rem 1rem;
  color: var(--white) !important;
  font-weight: 500;
  position: relative;
  transition: var(--transition);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: var(--transition);
}

html[dir="rtl"] .navbar-nav .nav-link::after {
  right: 50%;
  left: auto;
  transform: translateX(50%);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
  color: var(--accent) !important;
}

.navbar-nav .nav-link {
  text-align: center;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link:focus::after,
.navbar-nav .nav-link.active::after {
  width: 30px;
}

.navbar-toggler {
  border: none;
  padding: 8px 12px;
  background: transparent;
  transition: var(--transition);
  border-radius: 6px;
  cursor: pointer;
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: none;
}

.navbar-toggler:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar-toggler:active {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(0.95);
}

.navbar-toggler i {
  font-size: 20px;
  transition: var(--transition);
}

.navbar-toggler:hover i {
  color: var(--accent) !important;
}

/* Dropdown specific styles */
.navbar .dropdown-menu {
  border: none;
  box-shadow: var(--box-shadow);
  margin-top: 10px;
}

.navbar .dropdown-item {
  padding: 8px 15px;
  transition: var(--transition);
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus,
.navbar .dropdown-item.active {
  background-color: var(--secondary);
  color: var(--white);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  overflow: hidden;
  padding: 100px 0;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('/images/pattern.png');
  opacity: 0.05;
  z-index: -1;
}

/* Hero Particles */
.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.hero-particles::before,
.hero-particles::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-image: 
    radial-gradient(var(--accent) 1px, transparent 1px), 
    radial-gradient(var(--accent-alt) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: 0 0, 25px 25px;
  opacity: 0.1;
  animation: particleAnimation 20s linear infinite;
}

.hero-particles::after {
  background-size: 30px 30px;
  background-position: 15px 15px;
  opacity: 0.05;
  animation-direction: reverse;
  animation-duration: 30s;
}

@keyframes particleAnimation {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
  }
}

/* Floating Code Elements */
.hero-image-container {
  position: relative;
}

.floating-code {
  position: absolute;
  background: rgba(30, 30, 63, 0.85);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.4;
  color: var(--code-text);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 2;
  white-space: nowrap;
  opacity: 0;
  backdrop-filter: blur(2px);
  border-left: 3px solid var(--accent);
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

.floating-code:hover {
  box-shadow: 0 6px 25px rgba(0, 217, 255, 0.3);
  transform: translateY(-5px) scale(1.03);
}

.floating-code .keyword {
  color: var(--code-keyword);
}

.floating-code .function {
  color: var(--code-function);
}

.floating-code .string {
  color: var(--code-string);
}

.floating-code .operator {
  color: var(--code-operator);
}

.floating-code .variable {
  color: var(--code-variable);
}

.floating-code .property {
  color: var(--code-property);
}

.floating-code .comment {
  color: var(--code-comment);
}

.floating-code-1 {
  top: 20%;
  left: -30px;
  transform: rotate(-5deg);
  animation: float1 8s ease-in-out infinite;
}

.floating-code-2 {
  top: 50%;
  right: -20px;
  transform: rotate(5deg);
  animation: float2 6s ease-in-out infinite;
}

.floating-code-3 {
  bottom: 25%;
  left: 15%;
  transform: rotate(-3deg);
  animation: float3 7s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes float2 {
  0%, 100% { transform: translateY(0) rotate(5deg); }
  50% { transform: translateY(-20px) rotate(8deg); }
}

@keyframes float3 {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(0deg); }
}

/* Rest of hero styles */
.hero-content, .hero .row {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--white);
}

.hero-slogan {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 20px;
  color: var(--accent);
  font-style: italic;
}

.hero-text {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.8);
}

.hero-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

html[dir="rtl"] .hero-buttons {
  justify-content: flex-start;
}

/* About Section */
.about-image {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.about-content {
  padding: 30px 0;
}

.about-feature {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
}

html[dir="rtl"] .about-feature {
  text-align: right;
}

.about-feature-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  margin-right: 15px;
  font-size: 18px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

html[dir="rtl"] .about-feature-icon {
  margin-right: 0;
  margin-left: 15px;
  order: 2;
}

html[dir="rtl"] .about-feature div {
  order: 1;
}

/* Services Section */
.service-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  height: 100%;
  border-top: 3px solid var(--secondary);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-icon {
  font-size: 3rem;
  color: var(--secondary);
  margin-bottom: 20px;
}

.service-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

/* Portfolio Section */
.portfolio-filter {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 10px;
}

.portfolio-filter button {
  background: none;
  border: none;
  padding: 8px 20px;
  margin: 0 5px 10px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.portfolio-filter button.active {
  background: var(--secondary);
  color: var(--white);
  border-radius: 20px;
}

.portfolio-item {
  position: relative;
  margin-bottom: 30px;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
}

.portfolio-img {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: var(--transition);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 62, 80, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay,
.portfolio-item.touch-hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-item:hover .portfolio-img,
.portfolio-item.touch-hover .portfolio-img {
  transform: scale(1.1);
}

.portfolio-title {
  color: var(--white);
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.portfolio-category {
  color: var(--light);
  font-style: italic;
}

/* Contact Section */
.contact-info {
  margin-bottom: 40px;
}

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

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

.contact-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  margin-right: 15px;
  font-size: 18px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

html[dir="rtl"] .contact-icon {
  margin-right: 0;
  margin-left: 15px;
  order: 2;
}

html[dir="rtl"] .contact-item div {
  order: 1;
}

.contact-form .form-control {
  height: 50px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  padding: 10px 15px;
}

.contact-form textarea.form-control {
  height: 150px;
}

.contact-form .form-control:focus {
  border-color: var(--secondary);
  box-shadow: none;
}

.form-message {
  padding: 10px;
  margin-bottom: 20px;
  border-radius: var(--border-radius);
}

.form-message.success {
  background: rgba(39, 174, 96, 0.1);
  color: var(--success);
}

.form-message.error {
  background: rgba(192, 57, 43, 0.1);
  color: var(--danger);
}

/* Footer */
.footer {
  background: var(--primary);
  color: var(--light);
  padding: 70px 0 0;
}

.footer-title {
  color: var(--white);
  margin-bottom: 25px;
  font-size: 1.5rem;
}

.footer-about {
  margin-bottom: 30px;
}

.footer-contact-item {
  display: flex;
  margin-bottom: 15px;
}

html[dir="rtl"] .footer-contact-item {
  text-align: right;
}

.footer-contact-icon {
  flex-shrink: 0;
  width: 30px;
  margin-right: 10px;
  color: var(--secondary);
}

html[dir="rtl"] .footer-contact-icon {
  margin-right: 0;
  margin-left: 10px;
  order: 2;
}

html[dir="rtl"] .footer-contact-item span {
  order: 1;
}

.footer-social {
  display: flex;
  margin-top: 20px;
}

html[dir="rtl"] .footer-social {
  justify-content: flex-start;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  margin-right: 10px;
  color: var(--white);
  transition: var(--transition);
}

html[dir="rtl"] .footer-social a {
  margin-right: 0;
  margin-left: 10px;
}

.footer-social a:hover {
  background: var(--secondary);
  transform: translateY(-3px);
}

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

.footer-links a {
  color: var(--light);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--secondary);
  padding-left: 5px;
}

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

.footer-bottom {
  background: rgba(0, 0, 0, 0.1);
  padding: 20px 0;
  margin-top: 50px;
  text-align: center;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--secondary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 99;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

html[dir="rtl"] .back-to-top {
  right: auto;
  left: 30px;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 991px) {
  .section {
    padding: 60px 0;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .navbar-collapse {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-top: 15px;
    width: 100%; /* Ensure full width */
  }
  
  /* Fix navbar text color on mobile */
  .navbar-collapse .nav-link {
    color: var(--dark) !important;
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  
  html[dir="rtl"] .navbar-collapse .nav-link {
    text-align: right;
  }
  
  .navbar-collapse .nav-link:hover,
  .navbar-collapse .nav-link:focus,
  .navbar-collapse .nav-link.active {
    color: var(--secondary) !important;
    background-color: rgba(93, 101, 203, 0.05);
  }
  
  .navbar-collapse .dropdown-toggle {
    color: var(--dark) !important;
  }
  
  /* Fix dropdown menu on mobile */
  .navbar-collapse .dropdown-menu {
    background: transparent;
    border: none;
    box-shadow: none;
    padding-left: 20px;
  }
  
  html[dir="rtl"] .navbar-collapse .dropdown-menu {
    padding-right: 20px;
    padding-left: 0;
  }
  
  .navbar-collapse .dropdown-item {
    color: var(--dark);
    padding: 8px 10px;
  }
  
  .navbar-collapse .dropdown-item:hover,
  .navbar-collapse .dropdown-item:focus,
  .navbar-collapse .dropdown-item.active {
    background-color: transparent;
    color: var(--secondary);
  }
  
  /* Reset nav-link after style on mobile */
  .navbar-collapse .nav-link::after {
    display: none;
  }
  
  .portfolio-filter {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .portfolio-filter button {
    margin-bottom: 10px;
  }

  .team-cards {
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  /* Fix container width */
  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Fix row overflow */
  .row {
    margin-left: -10px;
    margin-right: -10px;
  }
  
  /* Adjust column padding */
  [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  /* Make images responsive */
  img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 767px) {
  .section {
    padding: 50px 0;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  .hero {
    height: auto;
    min-height: auto;
    padding: 80px 0 40px 0;
  }
  
  .hero-title {
    font-size: 2rem;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
  }
  
  .hero-slogan {
    font-size: 1.2rem;
    max-width: 100%;
  }
  
  .hero-text {
    font-size: 1rem;
    max-width: 100%;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    align-items: stretch;
  }
  
  .hero-buttons .btn {
    width: 100%;
    display: block;
    margin-bottom: 10px;
  }
  
  html[dir="rtl"] .hero-buttons {
    align-items: stretch;
  }
  
  .about-feature {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  
  html[dir="rtl"] .about-feature {
    text-align: center;
  }
  
  .about-feature-icon {
    margin: 0 auto 15px;
  }
  
  html[dir="rtl"] .about-feature-icon {
    margin: 0 auto 15px;
    order: 0;
  }
  
  html[dir="rtl"] .about-feature div {
    order: 0;
  }
  
  .contact-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  
  html[dir="rtl"] .contact-item {
    text-align: center;
  }
  
  .contact-icon {
    margin: 0 auto 15px;
  }
  
  html[dir="rtl"] .contact-icon {
    margin: 0 auto 15px;
    order: 0;
  }
  
  html[dir="rtl"] .contact-item div {
    order: 0;
  }
  
  .portfolio-filter {
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
  }
  
  .portfolio-filter button {
    margin-bottom: 10px;
    width: auto;
    min-width: 120px;
  }
  
  .service-card {
    height: auto;
    margin-bottom: 20px;
    padding: 15px;
  }

  .team-tab {
    padding: 8px 20px;
    margin: 0 5px 10px;
  }
  
  .navbar-nav {
    width: 100%;
  }
  
  .navbar-nav .nav-link {
    padding: 10px 15px;
  }
  
  /* Ensure footer is responsive */
  .footer .row {
    display: flex;
    flex-direction: column;
  }
  
  .footer .col-lg-4,
  .footer .col-md-6 {
    width: 100%;
  }
}

@media (max-width: 575px) {
  .section-title h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }
  
  .btn {
    padding: 10px 20px;
    width: 100%;
    display: block;
    margin-bottom: 10px;
  }
  
  .hero {
    padding: 60px 0 30px 0;
  }
  
  .hero-title {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 15px;
  }
  
  .hero-slogan {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }
  
  .hero-text {
    font-size: 1rem;
    margin-bottom: 20px;
  }
  
  .portfolio-item {
    margin-bottom: 20px;
    width: 100%;
  }
  
  .portfolio-filter button {
    padding: 6px 15px;
    font-size: 14px;
    min-width: auto;
    flex: 1 0 auto;
    margin: 0 5px 10px;
  }
  
  .service-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
  }
  
  .service-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
  }
  
  .contact-form .form-control {
    margin-bottom: 15px;
    padding: 10px;
  }

  .team-cards {
    gap: 15px;
    grid-template-columns: 1fr;
  }
  
  /* Fix container padding */
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Fix navbar on small screens */
  .navbar-brand {
    max-width: 70%;
  }
  
  .navbar-brand img {
    max-height: 40px;
  }
  
  /* Make sure toast notifications don't overflow */
  .toast-container {
    max-width: 90%;
    right: 5%;
  }
  
  /* Fix back to top button positioning */
  .back-to-top {
    right: 15px;
    bottom: 15px;
  }
  
  /* Fix card layouts */
  .service-card,
  .team-card,
  .portfolio-item {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

/* Fix for Safari and other browsers */
@supports (-webkit-overflow-scrolling: touch) {
  .hero {
    height: auto;
    min-height: 500px;
  }
  
  .btn {
    -webkit-appearance: none;
  }
  
  /* Fix for iOS devices */
  input,
  textarea {
    -webkit-appearance: none;
    border-radius: var(--border-radius);
  }
  
  /* Prevent page zoom when focusing inputs on iOS */
  @media screen and (max-width: 768px) {
    input, select, textarea {
      font-size: 16px;
    }
  }
}

/* Dropdown Styling */
.dropdown-menu {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  border: none;
  padding: 0.5rem 0;
  margin-top: 10px;
}

.dropdown-item.active, 
.dropdown-item:active,
.dropdown-item:hover {
  background-color: var(--secondary);
  color: var(--white);
}