/* General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

/* Page Transition Styles */
body {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.page-transition-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  z-index: 9999;
  transform: scaleX(0);
  transform-origin: left;
  animation: pageLoader 0.3s ease-in-out forwards;
  opacity: 0;
}

@keyframes pageLoader {
  0% {
    transform: scaleX(0);
    opacity: 1;
  }
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
}

:root {
  /* Light Theme (Default) */
  --primary-color: #4a6cf7;
  --primary-light: #ECE8FF;
  --secondary-color: #333;
  --accent-color: #FFC26A;
  --light-color: #F5FCFF;
  --dark-color: #1B1C31;
  --gray-color: #6E6E89;
  --white-color: #FFFFFF;
  --card-bg: #fff;
  --font-primary: 'Poppins', sans-serif;
  --font-arabic: 'Droid Arabic Kufi', sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
  --card-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  --border-color: #e9e9e9;
  --form-bg: #F5FCFF;
  --header-bg: #f8f9fa;
  --footer-bg: #f8f9fa;
  --footer-title-color: #282938;
  --footer-text: rgba(40, 41, 56, 0.8);
  --footer-border: rgba(0, 0, 0, 0.1);
  --body-bg: #F5FCFF;
  --stats-bg: #ECF4FF;
  --skill-bar-bg: #EFF3FC;
  --skill-progress-bg: #5E3BEE;
  --project-tag-bg: #ECF4FF;
  --project-tag-color: #5E3BEE;
  --faq-border: #E8EBEF;
  --tech-icon-bg: #ECF4FF;
  --tech-icon-color: #5E3BEE;
  --blur-color: rgba(94, 59, 238, 0.15);
  --text-color: #333;
  --light-gray: #f2f2f2;
  --bg-color: #fff;
  --transition: all 0.3s ease;
  --text-direction: ltr;
  --align-start: left;
  --align-end: right;
  --nav-hover-bg: rgba(74, 108, 247, 0.1);
}

.dark-theme {
  /* Dark Theme */
  --primary-color: #4a6cf7;
  --primary-light: #2D2D6D;
  --secondary-color: #f5f5f5;
  --accent-color: #FFCF6B;
  --light-color: #21222C;
  --dark-color: #F0F0F6;
  --gray-color: #B4B4C7;
  --white-color: #2D2D3A;
  --card-bg: #1e1e1e;
  --card-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  --border-color: #333;
  --form-bg: #21222C;
  --header-bg: #1e1e1e;
  --footer-bg: #1e1e1e;
  --footer-title-color: #E4E4F0;
  --footer-text: rgba(255, 255, 255, 0.7);
  --footer-border: rgba(255, 255, 255, 0.1);
  --body-bg: #21222C;
  --stats-bg: #2D2D3A;
  --skill-bar-bg: #383850;
  --skill-progress-bg: #7B5CF0;
  --project-tag-bg: #383850;
  --project-tag-color: #7B5CF0;
  --faq-border: #383850;
  --tech-icon-bg: #383850;
  --tech-icon-color: #7B5CF0;
  --blur-color: rgba(94, 59, 238, 0.2);
  --text-color: #f5f5f5;
  --light-gray: #2d2d2d;
  --bg-color: #121212;
  --nav-hover-bg: rgba(74, 108, 247, 0.2);
}

body {
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: var(--transition);
  direction: var(--text-direction);
  text-align: start;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Theme Toggle */
.theme-toggle {
  width: 45px;
  height: 30px;
  background-color: var(--primary-color);
  border-radius: 30px;
  padding: 4px 7px; /* Increased horizontal padding for better spacing */
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:focus {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.theme-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px; /* Reduced from 22px */
  height: 16px; /* Reduced from 22px */
  position: relative;
  z-index: 2;
}

.theme-toggle i {
  font-size: 0.75em; /* Slightly increased for better visibility */
  color: var(--white-color);
  z-index: 2;
  padding: 0 2px; /* Reduced padding */
  pointer-events: none;
}

.theme-toggle::after {
  content: '';
  position: absolute;
  width: 18px; /* Reduced from 22px */
  height: 18px; /* Reduced from 22px */
  border-radius: 50%;
  background-color: #1B1C31; /* Fixed dark color for light theme */
  top: 6px; /* Adjusted for centering */
  left: 6px; /* Adjusted for centering */
  transition: all 0.3s ease; /* Changed to 'all' to include background-color transitions */
  z-index: 1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Added subtle shadow for depth */
}

.dark-theme .theme-toggle::after {
  transform: translateX(15px); /* Adjusted based on new width */
  background-color: #FFFFFF; /* Fixed white color for dark theme */
}

/* RTL Specific Styling */
[dir="rtl"] .theme-toggle {
  flex-direction: row; /* Don't reverse for theme toggle */
}

[dir="rtl"] .theme-toggle::after {
  left: 6px; /* Keep same as LTR */
  right: auto;
}

[dir="rtl"] .dark-theme .theme-toggle::after {
  transform: translateX(15px); /* Same as LTR */
}

/* RTL mobile adjustments */
@media (max-width: 480px) {
  [dir="rtl"] .theme-toggle::after {
    left: 5px; /* Keep same as LTR */
    right: auto;
  }
  
  [dir="rtl"] .dark-theme .theme-toggle::after {
    transform: translateX(14px); /* Same as LTR */
  }
}

/* Header */
header {
  background-color: var(--header-bg);
  width: 100%;
  position: fixed;
  z-index: 10000;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
  transition: background-color 0.3s ease;
  padding: 15px 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  text-decoration: none;
  color: var(--secondary-color);
  font-weight: 700;
  font-size: 1.5em;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.logo span {
  color: var(--primary-color);
  transition: color 0.3s ease;
  background-color: var(--primary-light);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
}

/* Desktop Navigation Styles */
.navigation {
  display: flex;
  align-items: center;
  gap: 20px;
}

.navigation a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.navigation a:hover, .navigation a:focus {
  background-color: var(--nav-hover-bg);
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* Mobile Menu Button - Hidden on Desktop */
.menu-btn {
  display: none; /* Hidden by default for desktop */
  margin-right: 10px;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10000;
  position: relative;
}

.menu-btn:hover {
  color: var(--primary-color);
}

.menu-btn i {
  pointer-events: none; /* Make sure the icon doesn't interfere with clicks */
}

/* Media Queries for Responsive Design */
@media (min-width: 769px) {
  /* Ensure desktop navigation is always visible and horizontal */
  .navigation {
    display: flex !important;
    position: static !important;
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    height: auto;
    width: auto;
    overflow: visible;
    flex-direction: row;
    justify-content: flex-end;
  }
  
  /* Navigation items on desktop */
  .navigation a {
    width: auto;
    margin: 0;
    border: none;
    font-size: 1rem;
    padding: 8px 15px;
  }
  
  /* Always hide menu button on desktop */
  .menu-btn {
    display: none !important;
  }
}

@media (max-width: 768px) {
  /* Show mobile menu button on small screens */
  .menu-btn {
    display: block;
  }
  
  /* Hide regular navigation on mobile until toggled */
  .navigation {
    display: none;
    position: absolute;
    top: 60px; /* Match header height */
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--bg-color);
    z-index: 9999;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    overflow: hidden;
  }
  
  /* Active navigation state */
  .navigation.active {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    max-height: calc(100vh - 60px); /* Limit max height */
  }
  
  /* Navigation items on mobile */
  .navigation a {
    margin: 5px 0;
    padding: 10px 0;
    width: 90%;
    max-width: 300px;
    font-size: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
  }
  
  /* Mobile navigation hover styles */
  .navigation a:hover, .navigation a:focus {
    background-color: var(--primary-color);
    color: white !important;
    transform: translateY(-3px);
  }
}

/* Section Styles */
section {
  padding: 100px 0;
  position: relative;
  transition: background-color 0.3s ease;
}

.section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 15px;
  text-align: center;
  transition: color 0.3s ease;
}

.section-title span {
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.section-subtitle {
  font-size: 1.1em;
  color: var(--gray-color);
  text-align: center;
  margin-bottom: 50px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  transition: color 0.3s ease;
}

.center-btn {
  text-align: center;
  margin-top: 40px;
}

/* Hero Section */
.hero {
  background-color: var(--body-bg);
  padding: 180px 0 120px;
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.blur-bg {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  z-index: 0;
}

.blob-1 {
  background-color: var(--blur-color);
  width: 300px;
  height: 300px;
  top: 10%;
  right: 0;
}

.blob-2 {
  background-color: var(--blur-color);
  width: 200px;
  height: 200px;
  bottom: 10%;
  left: 0;
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 500px;
  z-index: 2;
}

.hero h1 {
  font-size: 3.5em;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 15px;
  line-height: 1.2;
  transition: color 0.3s ease;
}

.subtitle {
  font-size: 1.2em;
  font-weight: 500;
  color: var(--gray-color);
  margin-bottom: 30px;
  transition: color 0.3s ease;
}

.hero-stats {
  display: flex;
  gap: 30px;
  margin-top: 30px;
}

.stat-item {
  background-color: var(--stats-bg);
  padding: 10px 15px;
  border-radius: 8px;
  text-align: center;
  transition: background-color 0.3s ease;
}

.stat-item h3 {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--secondary-color);
  transition: color 0.3s ease;
}

.hero-image {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-image img {
  max-width: 90%;
  height: auto;
  border-radius: 15px;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.3s ease;
}

/* Services Section */
.services {
  background-color: var(--body-bg);
  position: relative;
  transition: background-color 0.3s ease;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.service-card {
  background: var(--card-bg);
  padding: 40px 25px;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: 0.4s ease, background-color 0.3s ease;
  text-align: center;
  border: 1px solid var(--border-color);
}

.service-card:hover {
  transform: translateY(-10px);
}

.service-icon {
  width: 60px;
  height: 60px;
  background-color: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.5em;
  color: var(--primary-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.service-card h3 {
  color: var(--secondary-color);
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 15px;
  transition: color 0.3s ease;
}

.service-card p {
  color: var(--gray-color);
  line-height: 1.6;
  font-size: 0.95em;
  transition: color 0.3s ease;
}

/* Skills Section */
.skills-section {
  background-color: var(--light-color);
  position: relative;
  transition: background-color 0.3s ease;
}

.skills-content {
  display: flex;
  align-items: center;
  gap: 60px;
}

.skills-image {
  flex: 1;
}

.skills-image img {
  max-width: 100%;
  border-radius: 15px;
  box-shadow: var(--card-shadow);
}

.skills-list {
  flex: 1;
}

.skills-list .section-title {
  text-align: left;
  margin-bottom: 30px;
}

.skill-item {
  margin-bottom: 20px;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.skill-info p {
  font-size: 0.95em;
  font-weight: 500;
  color: var(--secondary-color);
  transition: color 0.3s ease;
}

.skill-bar {
  height: 10px;
  background-color: var(--skill-bar-bg);
  border-radius: 5px;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.skill-progress {
  height: 100%;
  background-color: var(--skill-progress-bg);
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

/* Why Hire Section */
.why-hire-section {
  background-color: var(--body-bg);
  position: relative;
  transition: background-color 0.3s ease;
}

.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.reason-card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: 0.3s ease, background-color 0.3s ease;
  border: 1px solid var(--border-color);
}

.reason-card:hover {
  transform: translateY(-5px);
}

.reason-icon {
  color: var(--primary-color);
  font-size: 1.5em;
  margin-bottom: 15px;
  transition: color 0.3s ease;
}

.reason-card h3 {
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--secondary-color);
  transition: color 0.3s ease;
}

.reason-card p {
  color: var(--gray-color);
  font-size: 0.95em;
  line-height: 1.6;
  transition: color 0.3s ease;
}

/* Projects Section */
.projects-section {
  background-color: var(--light-color);
  position: relative;
  transition: background-color 0.3s ease;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: 0.4s ease, background-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-img {
  height: 220px;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
  transform: scale(1.05);
}

.project-info {
  padding: 25px;
}

.project-info h3 {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--secondary-color);
  transition: color 0.3s ease;
}

.project-info p {
  color: var(--gray-color);
  margin-bottom: 15px;
  font-size: 0.95em;
  line-height: 1.6;
  transition: color 0.3s ease;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-tags span {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 500;
  background-color: var(--project-tag-bg);
  color: var(--project-tag-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Technologies Section */
.technologies-section {
  padding: 80px 0;
  position: relative;
  transition: background-color 0.3s ease;
}

.tech-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.tech-icon {
  width: 100px;
  height: 110px;
  background-color: var(--tech-icon-bg);
  color: var(--tech-icon-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
  padding: 10px;
}

.tech-icon img {
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  margin-bottom: 8px;
  transition: transform 0.3s ease;
}

.tech-label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 5px;
  color: var(--tech-icon-color);
  text-align: center;
}

.tech-icon:hover {
  transform: translateY(-5px);
}

.tech-icon:hover img {
  transform: scale(1.1);
}

/* Additional Services */
.additional-services {
  background-color: var(--body-bg);
  position: relative;
  transition: background-color 0.3s ease;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-item {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: 0.3s ease, background-color 0.3s ease;
  border: 1px solid var(--border-color);
}

.service-item:hover {
  transform: translateY(-5px);
}

/* FAQ Section */
.faq-section {
  background-color: var(--light-color);
  position: relative;
  transition: background-color 0.3s ease;
}

.faq-list {
  max-width: 800px;
  margin: 50px auto 0;
}

.faq-item {
  background-color: var(--card-bg);
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid var(--faq-border);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.faq-question h3 {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--secondary-color);
  transition: color 0.3s ease;
  margin: 0;
  flex: 1;
}

.faq-toggle {
  color: var(--primary-color);
  font-size: 1.1em;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  margin-left: 15px;
  flex-shrink: 0;
  transition: all 0.3s ease;
  border-radius: 50%;
}

.faq-toggle:hover {
  background-color: var(--primary-light);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.faq-answer {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  opacity: 1;
  visibility: visible;
  padding: 20px;
}

.faq-answer p {
  padding-bottom: 10px;
  line-height: 1.6;
  color: var(--gray-color);
  transition: color 0.3s ease;
  margin: 0;
}

.faq-item.active {
  border-color: var(--primary-color);
}

/* What Clients Say Section */
.client-say-section {
  background-color: var(--body-bg);
  position: relative;
  transition: background-color 0.3s ease;
  padding: 100px 0;
}

.client-testimonials {
  position: relative;
  max-width: 800px;
  margin: 50px auto 30px;
  height: 450px;
  overflow: hidden;
}

.testimonial-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateX(100px) scale(0.95);
  transition: all 0.5s ease-in-out;
  visibility: hidden;
  z-index: 1;
}

.testimonial-slide.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  visibility: visible;
  z-index: 2;
}

.client-testimonial {
  background-color: var(--card-bg);
  padding: 40px 40px 50px;
  border-radius: 15px;
  box-shadow: var(--card-shadow);
  text-align: center;
  transition: all 0.5s ease;
}

.client-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px;
  border: 5px solid var(--primary-light);
  transition: border-color 0.3s ease;
}

.client-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stars {
  color: var(--accent-color);
  font-size: 1.2em;
  margin-bottom: 20px;
  transition: color 0.3s ease;
}

.client-quote {
  margin-bottom: 35px;
}

.client-quote p {
  font-size: 1.1em;
  line-height: 1.7;
  color: var(--secondary-color);
  font-style: italic;
  position: relative;
  transition: color 0.3s ease;
  margin-bottom: 20px;
}

.client-quote p::before,
.client-quote p::after {
  content: '"';
  color: var(--primary-color);
  font-size: 1.5em;
  font-weight: 700;
  transition: color 0.3s ease;
}

.client-info {
  padding-bottom: 10px;
}

.client-info h4 {
  font-size: 1.2em;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 5px;
  transition: color 0.3s ease;
}

.client-info p {
  color: var(--gray-color);
  font-size: 0.9em;
  transition: color 0.3s ease;
}

.testimonial-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  position: relative;
  z-index: 10;
}

.testimonial-dots {
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary-light);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active, .dot:hover {
  background-color: var(--primary-color);
  transform: scale(1.2);
}

/* Removed testimonial arrow styles - auto-sliding testimonials */

/* Testimonials */
.testimonials {
  background-color: var(--body-bg);
  position: relative;
  transition: background-color 0.3s ease;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.testimonial-card {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  position: relative;
  transition: 0.3s ease, background-color 0.3s ease;
  border: 1px solid var(--border-color);
}

.testimonial-card:hover {
  transform: translateY(-5px);
}

.quote-icon {
  font-size: 3em;
  color: var(--primary-color);
  position: absolute;
  top: 20px;
  left: 20px;
  opacity: 0.2;
  transition: color 0.3s ease;
}

.testimonial-text {
  margin-top: 20px;
  margin-bottom: 20px;
  color: var(--gray-color);
  line-height: 1.6;
  font-size: 0.95em;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.testimonial-author h4 {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 5px;
  transition: color 0.3s ease;
}

.testimonial-author p {
  color: var(--gray-color);
  font-size: 0.9em;
  transition: color 0.3s ease;
}

/* Experience Section */
.experience-section {
  background-color: var(--light-color);
  position: relative;
  transition: background-color 0.3s ease;
}

.experience-timeline {
  position: relative;
  max-width: 1000px;
  margin: 50px auto 0;
  padding: 20px 0;
}

.experience-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background-color: var(--primary-light);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 70px;
  display: flex;
  justify-content: center;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--primary-color);
  z-index: 2;
  box-shadow: 0 0 0 6px var(--primary-light);
}

.timeline-date {
  position: absolute;
  top: 18px;
  left: calc(50% - 120px);
  transform: translateX(-100%);
  background-color: var(--primary-color);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9em;
}

.timeline-content {
  width: 45%;
  margin-left: auto;
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  position: relative;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.timeline-content::before {
  content: '';
  position: absolute;
  top: 20px;
  left: -15px;
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-right: 15px solid var(--card-bg);
  transition: border-right-color 0.3s ease;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 0;
  margin-right: auto;
}

.timeline-item:nth-child(even) .timeline-date {
  left: auto;
  right: calc(50% - 120px);
  transform: translateX(100%);
}

.timeline-item:nth-child(even) .timeline-content::before {
  left: auto;
  right: -15px;
  border-right: none;
  border-left: 15px solid var(--card-bg);
  transition: border-left-color 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
}

.timeline-content h3 {
  font-size: 1.3em;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 5px;
  transition: color 0.3s ease;
}

.timeline-content h4 {
  font-size: 1em;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 15px;
  transition: color 0.3s ease;
}

.timeline-content p {
  color: var(--gray-color);
  margin-bottom: 15px;
  line-height: 1.6;
  font-size: 0.95em;
  transition: color 0.3s ease;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline-tags span {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 500;
  background-color: var(--project-tag-bg);
  color: var(--project-tag-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Contact Section */
.contact {
  background-color: var(--light-color);
  position: relative;
  transition: background-color 0.3s ease;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
  transition: background-color 0.3s ease;
  border: 1px solid var(--border-color);
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.2em;
  margin-bottom: 15px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.contact-details h3 {
  font-size: 1.1em;
  margin-bottom: 5px;
  color: var(--secondary-color);
  transition: color 0.3s ease;
}

.contact-details p {
  color: var(--gray-color);
  transition: color 0.3s ease;
  margin-bottom: 15px;
}

.contact-times {
  margin-top: 10px;
  font-size: 0.9em;
  color: var(--gray-color);
  transition: color 0.3s ease;
}

.contact-form-section h3 {
  font-size: 1.8em;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 25px;
  transition: color 0.3s ease;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1em;
  transition: 0.3s ease;
}

/* Brand colors for social links */
.social-links a:nth-child(1) {
  background-color: #1877F2; /* Facebook blue */
}

.social-links a:nth-child(2) {
  background-color: #1DA1F2; /* Twitter blue */
}

.social-links a:nth-child(3) {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); /* Instagram gradient */
}

.social-links a:nth-child(4) {
  background-color: #0A66C2; /* LinkedIn blue */
}

.social-links a:hover {
  transform: translateY(-5px);
  opacity: 0.9;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Dark theme adjustments for social links */
.dark-theme .social-links a {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.form-group {
  position: relative;
}

.form-group input, 
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 3px solid var(--border-color);
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 1em;
  background-color: var(--form-bg);
  color: var(--secondary-color);
  transition: 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

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

.form-group input:focus, 
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  border-width: 2px;
  box-shadow: 0 0 0 4px rgba(94, 59, 238, 0.1);
}

.submit-btn {
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 14px 30px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 1em;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: 0.3s ease;
  align-self: flex-end;
}

.submit-btn:hover {
  background-color: var(--primary-color);
  opacity: 0.9;
  transform: translateY(-3px);
}

.main-btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1em;
  letter-spacing: 0.5px;
  transition: 0.3s ease;
  border: 2px solid var(--primary-color);
}

.main-btn:hover {
  background-color: transparent;
  color: var(--primary-color);
  transform: translateY(-5px);
}

/* Footer Styles */
.footer {
  background-color: var(--footer-bg);
  color: var(--text-color);
  padding: 70px 0 20px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
  justify-content: space-between;
}

/* Footer About Section */
.footer-about {
  flex: 1 1 300px;
  max-width: 350px;
}

.footer-about p {
  margin: 20px 0;
  color: var(--footer-text);
  font-size: 0.95rem;
  line-height: 1.6;
  transition: color 0.3s ease;
}

.footer-logo {
  display: inline-block;
  text-decoration: none;
}

.footer-logo img {
  transition: transform 0.3s ease;
}

.footer-logo:hover img {
  transform: scale(1.05);
}

/* Footer Links */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  flex: 2 1 400px;
}

.footer-link-group {
  flex: 1 1 180px;
}

.footer-link-group h4 {
  color: var(--footer-title-color);
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
  transition: color 0.3s ease;
}

.footer-link-group h4:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
  transition: background-color 0.3s ease;
}

.footer-link-group a {
  display: block;
  color: var(--footer-text);
  margin-bottom: 12px;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 0;
}

.footer-link-group a:hover {
  color: var(--primary-color);
  padding-left: 8px;
}

/* Footer Social Links */
.footer-social {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff;
  transition: all 0.3s ease;
}

/* Brand colors for social icons */
.footer-social a:nth-child(1) {
  background-color: #1877F2; /* Facebook blue */
}

.footer-social a:nth-child(2) {
  background-color: #1DA1F2; /* Twitter blue */
}

.footer-social a:nth-child(3) {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); /* Instagram gradient */
}

.footer-social a:nth-child(4) {
  background-color: #0A66C2; /* LinkedIn blue */
}

.footer-social a:nth-child(5) {
  background-color: #171515; /* GitHub dark */
}

.footer-social a:hover {
  transform: translateY(-3px);
  opacity: 0.9;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Ensure GitHub icon is visible in dark mode */
.dark-theme .footer-social a:nth-child(5) {
  color: #fff;
  background-color: #333333;
}

/* Footer Contact Section */
.footer-contact {
  flex: 1 1 250px;
}

.footer-contact h4 {
  color: var(--footer-title-color);
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
  transition: color 0.3s ease;
}

.footer-contact h4:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
  transition: background-color 0.3s ease;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  color: var(--footer-text);
  transition: color 0.3s ease;
}

.contact-item i {
  margin-right: 12px;
  color: var(--primary-color);
  width: 20px;
  transition: color 0.3s ease;
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--footer-border);
  flex-wrap: wrap;
  gap: 15px;
  transition: border-color 0.3s ease;
}

.footer-bottom p {
  font-size: 0.9rem;
  color: var(--footer-text);
  transition: color 0.3s ease;
}

.footer-bottom span {
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  color: var(--footer-text);
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-legal a:hover {
  color: var(--primary-color);
}

/* Responsive Footer */
@media screen and (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    gap: 30px;
  }
  
  .footer-about, 
  .footer-links, 
  .footer-contact {
    max-width: 100%;
  }
  
  .footer-bottom {
    flex-direction: column;
  text-align: center;
  }
}

@media screen and (max-width: 480px) {
  .footer-links {
    flex-direction: column;
    gap: 30px;
  }
  
  .footer-legal {
    flex-direction: column;
    gap: 10px;
  }
}

/* Responsive Design */
@media (max-width: 1023px) {
  .section-title {
    font-size: 2.2em;
  }
  
  .hero h1 {
    font-size: 3em;
  }
  
  .hero-content {
    max-width: 450px;
  }
  
  .skills-content {
    flex-direction: column;
    gap: 50px;
  }
  
  .skills-list .section-title {
    text-align: center;
  }
  
  .project-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .experience-timeline {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  header {
    padding: 15px 0;
  }
  
  .menu-btn {
    display: block;
    margin-right: 10px;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10001;
    position: relative;
  }
  
  .navigation {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    z-index: 10000;
    padding: 2rem;
    overflow-y: auto;
  }
  
  /* Show navigation when active class is applied */
  .navigation.active {
    display: flex !important;
  }
  
  .navigation a {
    margin: 0.5rem 0;
    font-size: 1.2rem;
    padding: 0.75rem 1.5rem;
    width: 80%;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
  }

  .header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
  }
  
  /* Hero Section Mobile Styles */
  .hero .container {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
    margin-top: 40px;
  }

  .hero h1 {
    font-size: 2.5em;
  }

  .hero-stats {
    justify-content: center;
  }
  
  .service-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .reasons-grid {
    grid-template-columns: 1fr;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
  }
  
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
  
  .footer-top {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  .theme-toggle {
    margin: 0;
  }

  .experience-timeline::before {
    left: 30px;
  }
  
  .timeline-dot {
    left: 30px;
  }
  
  .timeline-date {
    left: 75px;
    top: -30px;
    transform: translateX(0);
  }
  
  .timeline-content {
    width: calc(100% - 80px);
    margin-left: 80px;
  }
  
  .timeline-content::before {
    left: -15px;
    border-right: 15px solid var(--card-bg);
    border-left: none;
  }
  
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 80px;
    margin-right: 0;
  }
  
  .timeline-item:nth-child(even) .timeline-date {
    left: 75px;
    right: auto;
    transform: translateX(0);
  }
  
  .timeline-item:nth-child(even) .timeline-content::before {
    left: -15px;
    right: auto;
    border-right: 15px solid var(--card-bg);
    border-left: none;
  }

  header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    margin-right: auto;
  }
  
  .header-controls {
    margin-right: 15px;
    order: 2;
  }
  
  .menu-btn {
    order: 3;
  }

  /* Add specific dark theme styles for navigation links */
  .dark-theme .navigation a {
    color: #ffffff;
    background-color: #1f1f1f;
    border-color: #333333;
  }
  
  /* Add specific light theme styles for navigation links */
  body:not(.dark-theme) .navigation a {
    color: #000000;
    background-color: #ffffff;
    border-color: #dddddd;
  }
  
  /* Hover styles for navigation links in both themes */
  .navigation a:hover, .navigation a:focus {
    background-color: var(--primary-color);
    color: #ffffff !important;
    transform: translateY(-3px);
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.3em;
  }
  
  .section-title {
    font-size: 2em;
  }
  
  .section-subtitle {
    font-size: 1em;
  }
  
  .hero {
    padding: 120px 0 60px;
  }
  
  .hero h1 {
    font-size: 2em;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 15px;
  }
  
  .service-grid {
    grid-template-columns: 1fr;
  }
  
  .tech-icon {
    width: 60px;
    height: 60px;
    font-size: 2em;
  }
  
  .contact-card {
    padding: 20px;
  }
  
  .contact-form-section h3 {
    font-size: 1.5em;
  }

  .timeline-content {
    padding: 20px;
  }
  
  .timeline-date {
    font-size: 0.8em;
    padding: 3px 10px;
  }
  
  .timeline-tags span {
    font-size: 0.7em;
  }
  
  .timeline-content h3 {
    font-size: 1.1em;
  }

  .language-toggle,
  .theme-toggle {
    height: 28px;
  }
  
  .theme-toggle::after {
    width: 20px;
    height: 20px;
  }
  
  .dark-theme .theme-toggle::after {
    transform: translateX(17px);
  }
  
  .menu-btn {
    padding: 15px;
  }
}

/* Thank You Page Styles */
.thank-you-section {
  padding: 180px 0 120px;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thank-you-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--card-bg);
  padding: 60px 40px;
  border-radius: 15px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.thank-you-icon {
  font-size: 5em;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.thank-you-content h1 {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.thank-you-content p {
  font-size: 1.1em;
  color: var(--gray-color);
  margin-bottom: 30px;
  line-height: 1.6;
}

.thank-you-content .main-btn {
  margin-top: 20px;
}

@media (max-width: 768px) {
  .thank-you-content {
    padding: 40px 25px;
  }
  
  .thank-you-icon {
    font-size: 4em;
  }
  
  .thank-you-content h1 {
    font-size: 2em;
  }
}

@media (max-width: 480px) {
  .thank-you-section {
    padding: 150px 0 80px;
  }
  
  .thank-you-content {
    padding: 30px 20px;
  }
  
  .thank-you-icon {
    font-size: 3em;
  }
  
  .thank-you-content h1 {
    font-size: 1.8em;
  }
  
  .thank-you-content p {
    font-size: 1em;
  }
}

/* Basic RTL Support */
[dir="rtl"] {
  --text-direction: rtl;
  --align-start: right;
  --align-end: left;
}

/* RTL Specific Styling */
[dir="rtl"] .hero-content {
  text-align: right;
}

[dir="rtl"] .skill-info {
  flex-direction: row-reverse;
}

[dir="rtl"] .footer-legal {
  flex-direction: row-reverse;
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Language Toggle Styles */
.language-toggle {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--card-bg);
    border-radius: 30px;
    padding: 4px;
    cursor: pointer;
    width: 72px;
    height: 30px;
    justify-content: space-between;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.lang-option {
    z-index: 1;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    padding: 2px 8px;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.lang-option.active {
    color: #FFFFFF;
    font-weight: 700;
}

.language-toggle::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 36px;
    height: 22px;
    background-color: var(--primary-color);
    border-radius: 20px;
    transition: transform 0.3s ease;
    z-index: 0;
}

.language-toggle.ar-active::after {
    transform: translateX(32px);
}

[dir="rtl"] .language-toggle {
    margin-right: 0;
    margin-left: 15px;
}

[dir="rtl"] .language-toggle::after {
    left: auto;
    right: 4px;
    transform: translateX(0);
}

[dir="rtl"] .language-toggle.ar-active::after {
    transform: translateX(-32px);
}

/* FAQ Styles */
.faq-item {
    border: 1px solid var(--faq-border);
    margin-bottom: 10px; /* Adjust as needed */
}

.faq-question {
    padding: 0px 20px; /* Adjust padding for spacing */
    padding-top: 20px;
    cursor: pointer;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px; /* Adjust padding for spacing */
    padding-bottom: 20px;
    padding-top: 5px;
}

.faq-item.active .faq-answer {
    max-height: none; /* Allow full expansion */
    padding: 10px 20px; /* Adjust padding for spacing */
}

/* Email link styling */
.contact-item a[href^="mailto:"],
.footer a[href^="mailto:"],
a[href^="mailto:"] {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a[href^="mailto:"]:hover,
.footer a[href^="mailto:"]:hover,
a[href^="mailto:"]:hover {
    color: red;
    text-decoration: underline;
}

/* Dark theme email link styling */
.dark-theme .contact-item a[href^="mailto:"],
.dark-theme .footer a[href^="mailto:"],
.dark-theme a[href^="mailto:"] {
    color: var(--primary-color);
}

.dark-theme .contact-item a[href^="mailto:"]:hover,
.dark-theme .footer a[href^="mailto:"]:hover,
.dark-theme a[href^="mailto:"]:hover {
    color: red;
}

/* Ensure Mobile Menu works well */
body.is-mobile .menu-btn {
  /* Increase touch target for better mobile usability */
  padding: 12px;
  margin-left: 15px;
}

/* Fixed positioning for mobile menu */
body.is-mobile .navigation.active {
  position: fixed;
  top: 70px; /* Position below header */
  left: 0;
  right: 0;
  bottom: auto; /* Don't stretch to bottom */
  width: 100%;
  height: auto; /* Auto height based on content */
  max-height: 80vh; /* Limit maximum height */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  background-color: var(--bg-color);
  z-index: 1000;
  opacity: 1;
  transition: all 0.3s ease;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
}

/* Ensure navigation items have correct colors in mobile */
body.is-mobile .navigation a {
  color: var(--text-color);
  background-color: var(--bg-color);
  border-color: var(--border-color);
  margin: 8px 0;
  width: 85%;
}

/* Dark theme colors for mobile navigation */
body.is-mobile.dark-theme .navigation a {
  color: #ffffff;
  background-color: #1f1f1f;
  border-color: #333333;
}

/* Light theme colors for mobile navigation */
body.is-mobile:not(.dark-theme) .navigation a {
  color: #000000;
  background-color: #ffffff;
  border-color: #dddddd;
}

/* Better mobile menu visual feedback */
body.is-mobile .menu-btn i {
  font-size: 1.6em;
  transition: all 0.3s ease;
}

/* Remove scrolling when mobile menu is active */
body.is-mobile {
  -webkit-tap-highlight-color: transparent;
}

/* Additional responsive enhancements for very small screens */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 2em;
  }
  
  .section-title {
    font-size: 2em;
  }
  
  .header-controls {
    gap: 10px;
  }
  
  .theme-toggle, .language-toggle {
    transform: scale(0.9);
  }
  
  /* Refined theme toggle for mobile */
  .theme-toggle {
    width: 40px; /* Slightly smaller on mobile */
    height: 26px;
    padding: 3px 6px;
  }
  
  .theme-toggle::after {
    width: 16px; /* Smaller indicator on mobile */
    height: 16px;
    top: 5px;
    left: 5px;
    background-color: #1B1C31; /* Fixed dark color for light theme */
  }
  
  .dark-theme .theme-toggle::after {
    transform: translateX(14px); /* Adjusted for mobile */
    background-color: #FFFFFF; /* Fixed white color for dark theme */
  }
  
  .menu-btn {
    padding: 15px;
  }
}

/* Safari-specific fixes */
@supports (-webkit-touch-callout: none) {
  /* Safari mobile menu fix */
  body.is-mobile .navigation.active {
    position: fixed;
    top: 70px;
    height: auto;
    max-height: 400px;
    bottom: auto;
  }
}

/* Custom styles for mobile navigation at smaller screen sizes */
@media (max-width: 480px) {
  .navigation.active {
    top: 60px; /* Adjusted for smaller header on mobile */
    max-height: min-content; /* Only take the space needed */
    padding: 0.75rem;
  }
  
  .navigation a {
    margin: 0.4rem 0;
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    width: 85%;
  }
}