:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --text-color: #333;
  --bg-color: #fff;
  --card-bg: #f8f9fa;
  --transition: all 0.3s ease;
}

[data-theme="dark"] {
  --primary-color: #ecf0f1;
  --secondary-color: #3498db;
  --text-color: #fff;
  --bg-color: #1a1a1a;
  --card-bg: #2c2c2c;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Cairo", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: var(--transition);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Theme Switch */
.theme-switch-wrapper {
  position: static;
}

.theme-switch {
  display: inline-block;
  height: 34px;
  position: relative;
  width: 60px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: 0.4s;
}

.slider:before {
  background-color: #fff;
  bottom: 4px;
  content: "";
  height: 26px;
  left: 4px;
  position: absolute;
  transition: 0.4s;
  width: 26px;
}

input:checked + .slider {
  background-color: var(--secondary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--bg-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 100;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;

  /* background-image: url("1.jpg"); */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.nav {
  background-image: url("/pngtree.jpg");
}

[data-theme="dark"] .nav {
  background-image: url("/darkr.jpg");
}

.nav-brand a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Theme Switch */
.theme-switch-wrapper {
  position: static;
}

.theme-switch {
  display: inline-block;
  height: 34px;
  position: relative;
  width: 60px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: 0.4s;
}

.slider:before {
  background-color: #fff;
  bottom: 4px;
  content: "";
  height: 26px;
  left: 4px;
  position: absolute;
  transition: 0.4s;
  width: 26px;
}

input:checked + .slider {
  background-color: var(--secondary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Language Switch */
.language-switch {
  background-color: var(--card-bg);
  border-radius: 20px;
  padding: 5px;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 15px;
  border-radius: 15px;
  color: var(--text-color);
  font-weight: bold;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
}

.lang-btn:hover {
  background-color: var(--secondary-color);
  color: white;
}

.lang-btn .ar,
.lang-btn .en {
  display: inline-block;
  font-size: 14px;
}

[data-lang="en"] .lang-btn .ar {
  display: none;
}

/* [data-lang="en"] .lang-btn .en {
  display: inline-block;
} */

[data-lang="en"] .lang-btn .en,
.lang-btn .ar {
  display: none;
}

[data-lang="en"] .lang-btn .ar {
  display: inline-block;
}

[data-lang="en"] .lang-btn {
  background-color: var(--secondary-color);
  color: white;
}

.nav-menu {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* .nav-menu li {
  margin: 0 20px;
} */

.nav-menu li {
  margin: 0;
}

.nav-menu li a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
}

.nav-menu li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.nav-menu li a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1000;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  margin: 5px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease forwards;
}

.hero h2 {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease forwards 0.3s;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease forwards 0.6s;
}

.cta-button {
  display: inline-block;
  padding: 15px 30px;
  background-color: var(--secondary-color);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease forwards 0.9s;
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: all 0.5s ease;
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Sections */
section {
  padding: 100px 0;
}

section h2 {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

section h2.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Skills Section */
.skills {
  background-color: var(--bg-color);
  padding: 80px 0;
}

.skills-categories {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.skill-category {
  background-color: var(--card-bg);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.skill-category h3 {
  color: var(--secondary-color);
  margin-bottom: 25px;
  font-size: 1.5rem;
  text-align: center;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  padding: 10px;
}

.skill-card {
  background-color: var(--bg-color);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid transparent;
}

.skill-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--secondary-color);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.skill-card i {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.skill-card:hover i {
  transform: scale(1.2);
  color: var(--secondary-color);
}

.skill-card h4 {
  font-size: 1rem;
  color: var(--text-color);
  margin: 0;
}

.skill-card.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Contact Section */
.contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  color: var(--text-color);
  text-decoration: none;
  padding: 15px 30px;
  background-color: var(--card-bg);
  border-radius: 5px;
  transition: var(--transition);
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.contact-item:hover {
  transform: translateX(-10px);
  border-color: var(--secondary-color);
  background-color: var(--secondary-color);
  color: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-item i {
  margin-left: 10px;
  font-size: 1.5rem;
}

/* Footer */
footer {
  background-color: var(--card-bg);
  padding: 20px 0;
  text-align: center;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation Classes */
.animate-fade-up {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-left {
  opacity: 0;
  animation: fadeInLeft 0.6s ease forwards;
}

.animate-fade-right {
  opacity: 0;
  animation: fadeInRight 0.6s ease forwards;
}

.animate-scale {
  opacity: 0;
  animation: scaleIn 0.6s ease forwards;
}

/* Timeline Animations */
.timeline-item {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.timeline-item.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Certificate Card Animations */
.certificate-card {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid transparent;
}

.certificate-card.animate {
  opacity: 1;
  transform: translateY(0);
}

.certificate-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--secondary-color);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.certificate-icon {
  /* width: 80px;
  height: 80px; */
  background-color: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition: var(--transition);
  transition: all 0.5s ease;
}

.certificate-card:hover .certificate-icon {
  transform: rotateY(360deg);
  background-color: var(--secondary-color);
}

.certificate-icon i {
  font-size: 2rem;
  color: white;
}

.certificate-card h3 {
  color: var(--text-color);
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.certificate-issuer {
  color: var(--secondary-color);
  font-weight: bold;
  margin-bottom: 10px;
}

.certificate-date {
  color: var(--text-color);
  opacity: 0.8;
}

/* Service Card Animations */
.service-card {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid transparent;
}

.service-card.animate {
  opacity: 1;
  transform: translateY(0);
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--secondary-color);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
  width: 80px;
  height: 80px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition: var(--transition);
  transition: all 0.5s ease;
}

.service-card:hover .service-icon {
  transform: rotateY(360deg);
  background-color: var(--secondary-color);
}

.service-icon i {
  font-size: 2rem;
  color: white;
}

.service-card h3 {
  color: var(--text-color);
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.service-card p {
  color: var(--text-color);
  line-height: 1.6;
  opacity: 0.8;
}

/* Staggered Animations */
.timeline-item:nth-child(2) {
  transition-delay: 0.2s;
}

.timeline-item:nth-child(3) {
  transition-delay: 0.4s;
}

.certificate-card:nth-child(2) {
  transition-delay: 0.2s;
}

.certificate-card:nth-child(3) {
  transition-delay: 0.4s;
}

.service-card:nth-child(2) {
  transition-delay: 0.2s;
}

.service-card:nth-child(3) {
  transition-delay: 0.4s;
}

.service-card:nth-child(4) {
  transition-delay: 0.6s;
}

.service-card:nth-child(5) {
  transition-delay: 0.8s;
}

.service-card:nth-child(6) {
  transition-delay: 1s;
}

/* Section Headers Animation */
section h2 {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

section h2.animate {
  opacity: 1;
  transform: translateY(0);
}

/* section {
  padding: 60px 0 10px;
} */

/* Responsive Design */
@media (max-width: 768px) {
  .nav {
    padding: 0.5rem;
  }

  /* .nav-controls {
    display: none;
  } */

  .hamburger {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    right: 0;
    z-index: 100;
  }

  .nav-menu li {
    margin: 15px 0;
  }

  .nav-menu li a {
    font-size: 1.2rem;
    display: block;
    /* padding: 1rem 2rem; */
  }

  /* Hamburger Animation */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  /* RTL Support for English */
  [data-lang="en"] .nav-menu {
    right: auto;
    left: -100%;
  }

  [data-lang="en"] .nav-menu.active {
    left: 0;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero h2 {
    font-size: 1.5rem;
  }

  section {
    padding: 50px 0;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
  }

  .skill-category {
    padding: 20px;
  }

  .skill-card {
    padding: 15px;
  }

  .skill-card i {
    font-size: 2rem;
  }

  .skill-card h4 {
    font-size: 0.9rem;
  }
}

/* Controls */
.controls {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  gap: 20px;
  align-items: center;
}

/* Update existing styles */
[data-lang="en"] {
  direction: ltr;
}

/* [data-lang="en"] .nav ul {
  flex-direction: row-reverse;
} */

[data-lang="en"] .contact-item i {
  margin-left: 0;
  margin-right: 10px;
}

/* Services Section */
.services {
  background-color: var(--card-bg);
  padding: 80px 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 20px;
}

.service-card {
  background-color: var(--bg-color);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.service-icon {
  width: 80px;
  height: 80px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  transform: rotateY(360deg);
}

.service-icon i {
  font-size: 2rem;
  color: white;
}

.service-card h3 {
  color: var(--text-color);
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.service-card p {
  color: var(--text-color);
  line-height: 1.6;
  opacity: 0.8;
}

/* Responsive Design for Services */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-card {
    padding: 20px;
  }

  .service-icon {
    width: 60px;
    height: 60px;
  }

  .service-icon i {
    font-size: 1.5rem;
  }

  .service-card h3 {
    font-size: 1.3rem;
  }
}

/* Experience Section */
.experience {
  background-color: var(--bg-color);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

/* Animated Background */
.experience::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(52, 152, 219, 0.1) 0%,
    rgba(52, 152, 219, 0.05) 25%,
    rgba(52, 152, 219, 0.1) 50%,
    rgba(52, 152, 219, 0.05) 75%,
    rgba(52, 152, 219, 0.1) 100%
  );
  animation: gradientBG 15s ease infinite;
  z-index: 0;
}

/* Floating Elements */
.experience::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
      circle at 20% 30%,
      rgba(52, 152, 219, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(52, 152, 219, 0.1) 0%,
      transparent 50%
    );
  animation: floatingBG 20s ease-in-out infinite;
  z-index: 0;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .experience::before {
  background: linear-gradient(
    45deg,
    rgba(52, 152, 219, 0.15) 0%,
    rgba(52, 152, 219, 0.1) 25%,
    rgba(52, 152, 219, 0.15) 50%,
    rgba(52, 152, 219, 0.1) 75%,
    rgba(52, 152, 219, 0.15) 100%
  );
}

[data-theme="dark"] .experience::after {
  background-image: radial-gradient(
      circle at 20% 30%,
      rgba(52, 152, 219, 0.2) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(52, 152, 219, 0.2) 0%,
      transparent 50%
    );
}

/* Container Positioning */
.experience .container {
  position: relative;
  z-index: 1;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  z-index: 1;
}

.timeline::after {
  content: "";
  position: absolute;
  width: 4px;
  background-color: var(--secondary-color);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
  left: 0;
  /* right: 50%; */
}

.timeline-item:nth-child(even) {
  left: 50%;
  /* left: 0; */
}

.timeline-content {
  padding: 20px;
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.timeline-content::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  top: 20px;
  z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-content::after {
  right: -60px;
}

.timeline-item:nth-child(even) .timeline-content::after {
  left: -60px;
}

.timeline-content h3 {
  color: var(--secondary-color);
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.timeline-content h4 {
  color: var(--text-color);
  margin-bottom: 10px;
  font-size: 1.1rem;
  opacity: 0.8;
}

.timeline-date {
  color: var(--secondary-color);
  font-weight: bold;
  margin-bottom: 15px;
}

.timeline-content ul {
  list-style-type: none;
  padding: 0;
}

.timeline-content ul li {
  margin-bottom: 10px;
  position: relative;
  padding-right: 20px;
}

.timeline-content ul li::before {
  content: "•";
  color: var(--secondary-color);
  position: absolute;
  right: 0;
}

/* Animations */
@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes floatingBG {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-10px, -10px);
  }
  100% {
    transform: translate(0, 0);
  }
}

/* RTL Support for Timeline */
[data-lang="ar"] .timeline::after {
  left: 50%;
}

[data-lang="ar"] .timeline-item {
  padding: 10px 40px;
  width: 50%;
}

[data-lang="ar"] .timeline-item:nth-child(odd) {
  /* left: 0; */
  right: 50%;
}

[data-lang="ar"] .timeline-item:nth-child(even) {
  /* left: 50%; */
  left: 0;
}

[data-lang="ar"] .timeline-item:nth-child(odd) .timeline-content::after {
  right: -60px;
  left: auto;
}

[data-lang="ar"] .timeline-item:nth-child(even) .timeline-content::after {
  left: -60px;
  right: auto;
}

[data-lang="ar"] .timeline-content ul li {
  padding-right: 0;
  padding-left: 20px;
}

[data-lang="ar"] .timeline-content ul li::before {
  right: auto;
  left: 0;
}

/* Responsive Design for Experience */
@media (max-width: 768px) {
  .timeline::after {
    left: 31px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  .timeline-item:nth-child(even) {
    left: 0;
  }

  .timeline-item:nth-child(odd) .timeline-content::after,
  .timeline-item:nth-child(even) .timeline-content::after {
    left: -40px;
    right: auto;
  }

  /* RTL Responsive */
  [data-lang="ar"] .timeline::after {
    left: 31px;
  }

  [data-lang="ar"] .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  [data-lang="ar"] .timeline-item:nth-child(odd) {
    /* left: 0 ; */
    right: 0;
  }

  [data-lang="ar"] .timeline-item:nth-child(odd) .timeline-content::after,
  [data-lang="ar"] .timeline-item:nth-child(even) .timeline-content::after {
    left: -40px;
    right: auto;
  }
}

/* Certificates Section */
.certificates {
  background-color: var(--card-bg);
  padding: 80px 0;
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 20px;
}

.certificate-card {
  background-color: var(--bg-color);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.certificate-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.certificate-icon {
  /* width: 80px;
  height: 80px; */
  background-color: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition: var(--transition);
}

.certificate-card:hover .certificate-icon {
  transform: rotateY(360deg);
}

.certificate-icon i {
  font-size: 2rem;
  color: white;
}

.certificate-card h3 {
  color: var(--text-color);
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.certificate-issuer {
  color: var(--secondary-color);
  font-weight: bold;
  margin-bottom: 10px;
}

.certificate-date {
  color: var(--text-color);
  opacity: 0.8;
}

/* Hover Effects */
/* Navigation Links */
.nav-menu li a {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.nav-menu li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.nav-menu li a:hover::after {
  width: 100%;
}

/* Skill Cards */
.skill-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid transparent;
}

.skill-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--secondary-color);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.skill-card:hover i {
  transform: scale(1.2);
  color: var(--secondary-color);
}

.skill-card i {
  transition: all 0.3s ease;
}

/* Service Cards */
.service-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid transparent;
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--secondary-color);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
  transition: all 0.5s ease;
}

.service-card:hover .service-icon {
  transform: rotateY(360deg);
  background-color: var(--secondary-color);
}

/* Timeline Content */
.timeline-content {
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.timeline-content:hover {
  transform: translateY(-5px);
  border-color: var(--secondary-color);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Certificate Cards */
.certificate-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid transparent;
}

.certificate-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--secondary-color);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.certificate-icon {
  transition: all 0.5s ease;
}

.certificate-card:hover .certificate-icon {
  transform: rotateY(360deg);
  background-color: var(--secondary-color);
}

/* Contact Items */
.contact-item {
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.contact-item:hover {
  transform: translateX(-10px);
  border-color: var(--secondary-color);
  background-color: var(--secondary-color);
  color: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* CTA Button */
.cta-button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: all 0.5s ease;
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Language Switch */
.lang-btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.lang-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: all 0.5s ease;
}

.lang-btn:hover::before {
  left: 100%;
}

.lang-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Adjustments */
[data-theme="dark"] .skill-card:hover,
[data-theme="dark"] .service-card:hover,
[data-theme="dark"] .certificate-card:hover,
[data-theme="dark"] .timeline-content:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.bara {
  width: 100px;
  height: 100px;
}

.b1 {
  display: none;
}

[data-lang="en"] .b1 {
  display: block;
}

[data-lang="en"] .b2 {
  display: none;
}

[data-lang="ar"] .b1 {
  display: none;
}

[data-lang="ar"] .b2 {
  display: block;
}

/* Contact Form Styles */
.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  /* grid-template-columns: 1fr 2fr; */
  gap: 3rem;
  margin-top: 2rem;
}

.contact-form {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  display: none;
}

.contact-form.show {
  opacity: 1;
  transform: translateY(0);
  display: block;
}

.contact-form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.contact-form-overlay.show {
  display: flex;
  opacity: 1;
}

.contact-form-container {
  position: relative;
  width: 90%;
  max-width: 600px;
  margin: 20px;
}

.contact-form-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  transition: transform 0.3s ease;
}

.contact-form-close:hover {
  transform: scale(1.1);
}

[data-lang="ar"] .contact-form-close {
  right: auto;
  left: 0;
}

.form-group {
  margin-bottom: 1.8rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-weight: 600;
  font-size: 1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #e74c3c;
}

.error-message {
  display: none;
  color: #e74c3c;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  margin-top: 1rem;
}

.submit-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.submit-btn:disabled {
  background: #95a5a6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.spinner {
  display: none;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 1rem 2rem;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.notification.success {
  background: #2ecc71;
}

.notification.error {
  background: #e74c3c;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* RTL Support for Form */
[data-lang="ar"] .form-group label {
  text-align: right;
}

[data-lang="en"] .form-group label {
  text-align: left;
}

/* Responsive Design */
@media (max-width: 768px) {
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .form-group {
    margin-bottom: 1.5rem;
  }

  .form-group input,
  .form-group textarea {
    padding: 0.8rem;
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.toast {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  margin-top: 1rem;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease-out;
  min-width: 300px;
  max-width: 400px;
}

.toast.success {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.toast.error {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.toast-icon {
  margin-left: 1rem;
  font-size: 1.5rem;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.toast-message {
  font-size: 0.9rem;
  opacity: 0.9;
}

.toast-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
  margin-right: -0.5rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.toast-close:hover {
  opacity: 1;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast.hide {
  animation: slideOut 0.3s ease-out forwards;
}

/* RTL Support for Toast */
[data-lang="ar"] .toast {
  flex-direction: row-reverse;
}

[data-lang="ar"] .toast-icon {
  margin-left: 0;
  margin-right: 1rem;
}

[data-lang="ar"] .toast-close {
  margin-right: 0;
  margin-left: -0.5rem;
}

/* .certificate-icon img{
  width: 400px;
  height: 200px;
} */

.certificate-icon img {
  width: 100%;
  height: auto;
  max-width: 300px;
}

/* --------------------------------------------------------------------------------------- */

.works-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}

.work-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 350px;
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.work-item:hover {
  transform: translateY(-5px);
}

.work-preview img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.work-info {
  padding: 1.5rem;
}

.work-info h2 {
  margin-top: 0;
  color: var(--accent-color);
}

.work-summary {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.work-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.work-tools span {
  background-color: var(--accent-color);
  color: white;
  background-color: #2980b9;
  padding: 0.3rem 0.6rem;
  border-radius: 15px;
  font-size: 0.8rem;
}

.work-button {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.work-button:hover {
  background-color: var(--accent-color);
}

@media (min-width: 768px) {
  .work-item {
    flex-direction: row;
    max-width: 600px;
  }

  .work-preview {
    flex: 1;
  }

  .work-preview img {
    height: 100%;
  }

  .work-info {
    flex: 1;
  }
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 30px;
  padding: 0 2rem;
}

.filter-btn {
  padding: 8px 16px;
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--accent-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.4rem;
}

.filter-btn:hover {
  background-color: var(--accent-color);
  color: #3498db;
}

.filter-btn.active {
  background-color: var(--accent-color);
  color: #3498db;
}

@media screen and (max-width: 600px) {
  .filter-buttons {
    flex-direction: column;
  }
}

/* .work-item {
  transition: all 0.5s ease;
} */

/* video */

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.95);
}

.modal video {
  display: block;
  margin: 0 auto;
  max-width: 90%;
  max-height: 80vh;
  border-radius: 12px;
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
}

::-webkit-scrollbar {
  width: 17px;
}

::-webkit-scrollbar-track {
  background: #121212;
}

::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 10px;
  border: 3px solid #121212;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #3498db;
  /* background-color: #aaa; */
}

.c {
  display: flex;
  justify-content: center;
  align-items: center;
}

.cv a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.2rem;
  font-weight: 600;
}

.cv {
  background-color: var(--card-bg);
  font-size: larger;
  font-weight: 550;
  color: var(--text-color);
  border-radius: 10px;
  margin: 20px 0;
  padding: 15px 30px;
  /* padding: 10px 17px; */
}

.cv:hover {
  background-color: var(--secondary-color);
  color: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  transition: all 0.3s ease;
  cursor: pointer;
}

.nav-menu a.active {
  color: #fff;
  background-color: #007bff;
  border-radius: 5px;
  padding: 5px 10px;
}

.cl {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 40px;
}

.cl .hfor {
  /* width: 80%; */
  text-align: center;
  margin: 10px 4px;
}

.cl h3,
h4 {
  text-align: center;
}

.cl h3 {
  color: #007bff;
  font-size: 2rem;
}

@media screen and (max-width: 600px) {
  .cl h3 {
    font-size: 1.5rem;
  }
}

/************************* buble ******************************/

.cursor-follower {
  width: 30px;
  height: 30px;
  background: linear-gradient(
    45deg,
    var(--secondary-color),
    var(--primary-color)
  );
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background 0.3s;
  mix-blend-mode: difference;
  opacity: 0.5;
  will-change: left, top;
}

.cursor-follower.active {
  width: 50px;
  height: 50px;
  opacity: 0.8;
}

a,
button,
.nav-menu li,
.skill-card,
.service-card,
.certificate-card,
.work-item {
  cursor: none !important;
}

@media (max-width: 768px) {
  .cursor-follower {
    display: none;
  }

  a,
  button,
  .nav-menu li,
  .skill-card,
  .service-card,
  .certificate-card,
  .work-item {
    cursor: pointer !important;
  }
}
