html {
  scroll-behavior: smooth;
}

:root {
  --bg-main: #f8fafc;
  --bg-secondary: #e2e8f0;
  --text-main: #0f172a;
  --text-secondary: #475569;
  --card-bg: #fff;
  --accent: #667eea;
  --accent2: #764ba2;
  --scrollbar-track-color: #e2e8f0;
  --scrollbar-thumb-color: #000;
  --scrollbar-thumb-hover-color: #333;
}
.dark-theme {
  --bg-main: #0f172a;
  --bg-secondary: #1e293b;
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --card-bg: #1e293b;
  --accent: #818cf8;
  --accent2: #764ba2;
  --border-color: #334155;
  --input-bg: #1e293b;
  --scrollbar-track-color: #1e293b;
  --scrollbar-thumb-color: #94a3b8;
  --scrollbar-thumb-hover-color: #f8fafc;
}
body {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.textalign {
  align-items: center;
  display: flex; /* Make the <p> a flex container */
  align-items: center; /* Center vertically */
  justify-content: center; /* Center horizontally */
  padding: 1rem; /* Optional: add padding inside */
  text-wrap: pretty;
}
.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: #667eea;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  height: 100vh;
  box-sizing: border-box; /* Ensures padding is included in the 100vh height */
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  animation: float 20s infinite linear;
}

.hero,
section {
  position: relative;
  z-index: 1;
}

@keyframes float {
  0% {
    transform: translateY(0) translateX(0);
  }
  33% {
    transform: translateY(-10px) translateX(10px);
  }
  66% {
    transform: translateY(10px) translateX(-5px);
  }
  100% {
    transform: translateY(0) translateX(0);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 2rem;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
  animation: slideUp 1s ease-out;
}

.hero .subtitle {
  font-size: 1.5rem;
  color: #94a3b8;
  margin-bottom: 2rem;
  animation: slideUp 1s ease-out 0.2s both;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  animation: slideUp 1s ease-out 0.4s both;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 10px 2px #764ba2, 0 4px 12px rgba(102, 126, 234, 0.18);
  filter: brightness(1.07);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-glow-ripple {
  0% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 8px rgba(230, 240, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 16px rgba(230, 240, 255, 0.6);
  }
}

/* Sections */
section {
  padding: 5rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  text-align: center;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, #0f172a 0%, #667eea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.service-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: white;
}

.service-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.service-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Projects */
.projects {
  background: var(--bg-main);
  padding: 5rem 0 5rem 0;
  margin-bottom: 3rem;
  margin-top: 3rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.project-image {
  height: 200px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  font-weight: bold;
}

.project-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-content .cta-button {
  margin-top: auto;
  align-self: center;
}

.project-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.project-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.875rem;
  font-weight: 500;
}

.project-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  margin-top: auto;
  align-self: flex-start;
}

.project-link:hover {
  gap: 1rem;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.team-card {
  text-align: center;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.team-avatar {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: bold;
}

.team-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.team-role {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.team-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Contact */
.contact {
  background: var(--bg-main);
  color: var(--text-main);
}

.contact .section-title {
  background: linear-gradient(135deg, #0f172a 0%, #667eea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 3rem;
}

.contact-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.contact-form {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.contact-form .form-group {
  margin-bottom: 1.1rem;
}
.contact-form .form-group label {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.7rem;
  margin-left: 0.1rem;
  letter-spacing: 0.01em;
}
.contact-form .form-group input,
.contact-form .form-group textarea,
.contact-form .form-group select {
  width: 100%;
  background: #232c3a;
  border: 2px solid #475569;
  border-radius: 8px;
  color: #e5e9f7;
  font-size: 1.08rem;
  padding: 1.1rem 1.2rem;
  box-sizing: border-box;
  transition: border 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
  box-shadow: none;
}
body.light-theme .contact-form .form-group input,
body.light-theme .contact-form .form-group textarea,
body.light-theme .contact-form .form-group select {
  background: #f3f6fa;
  color: #94a3b8;
  border: 2px solid #94a3b8;
}
body.dark-theme .contact-form .form-group input,
body.dark-theme .contact-form .form-group textarea,
body.dark-theme .contact-form .form-group select {
  background: #232c3a;
  color: #475569;
  border: 2px solid #475569;
}
.contact-form .form-group input:focus,
.contact-form .form-group textarea:focus,
.contact-form .form-group select:focus {
  border: 2px solid #667eea;
  outline: none;
  box-shadow: 0 0 0 2px #a5b4fc44;
}
.submit-btn {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding: 1rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 2.5rem;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

/* Footer */
footer {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  text-align: center;
  padding: 2rem 0;
}

/* Responsive */
@media (max-width: 768px) {
  nav {
    padding: 10px 0;
  }

  .hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .subtitle {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .nav-links {
    display: none;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .nav-container {
    padding: 0 0.5rem;
    max-width: 100%;
  }

  .fab-btn[href*="wa.me"] .fab-icon {
    width: 36.8px !important;
    height: 36.8px !important;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 1rem;
  }
  .logo {
    font-size: 1.2rem;
  }
  .hero {
    height: auto;
  }
  .hero h1 {
    font-size: 1.5rem;
  }
  .hero .subtitle {
    font-size: 1rem;
  }
  .cta-button {
    padding: 0.7rem 1.2rem;
    font-size: 1rem;
  }
  .section-title {
    font-size: 1.2rem;
    margin-bottom: 2rem;
  }
  .container {
    padding: 0 0.5rem;
  }
  .services-grid,
  .projects-grid,
  .team-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .service-card,
  .project-card,
  .team-card {
    padding: 1rem;
    border-radius: 12px;
  }
  .project-image {
    height: 120px;
    font-size: 1.5rem;
  }
  .project-content {
    padding: 1rem;
  }
  .contact-content {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .contact-form {
    padding: 2%;
    border-radius: 12px;
  }
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 0.9rem;
    font-size: 0.95rem;
  }
  .submit-btn {
    padding: 0.7rem;
    font-size: 1rem;
    border-radius: 8px;
  }
  .fab-container {
    bottom: 20px;
    right: 10px;
  }
  .submit-btn {
    margin-bottom: 2.5rem;
  }
  .fab-btn {
    width: 42px;
    height: 42px;
  }
  .fab-icon,
  .fab-icon-call {
    width: 22px !important;
    height: 22px !important;
  }
  footer {
    padding: 1rem 0;
    font-size: 0.9rem;
  }
  .projects-grid {
    justify-items: center;
  }
  .project-card {
    max-width: 340px;
    width: 100%;
  }
  .projects {
    margin-bottom: 90px;
  }
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Floating Action Buttons */
.fab-container {
  position: fixed;
  bottom: 40px;
  right: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 2000;
}
.fab-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #25d366;
  border: none;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  overflow: visible;
}
.fab-btn.call {
  color: #10b981;
}
.fab-btn:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transform: scale(1.08);
}
.fab-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  margin: auto;
  background: white;
  border-radius: 50%;
  padding: 0px;
  box-sizing: border-box;
}
.fab-icon-call {
  width: 26px;
  height: 26px;
  object-fit: contain;
  padding: 0px;
  box-sizing: border-box;
  display: block;
  margin: auto;
}

/* Theme Toggle Button */
.theme-switch {
  position: relative;
  width: 96px;
  height: 48px;
  display: inline-block;
  vertical-align: middle;
  overflow: hidden;
}
.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
}
.theme-toggle-svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  z-index: 1;
}
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 1.5rem;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  padding: 0;
}

body.dark-theme .theme-toggle {
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 24px;
  animation: pulse-glow 2.5s ease-in-out infinite;
}

.theme-switch label {
  padding: 0;
  margin: 0;
  display: block;
}
.theme-toggle-bg {
  transition: fill 0.5s;
}
.theme-toggle-sky {
  opacity: 1;
  transition: opacity 0.5s;
}
.theme-switch input:checked ~ .theme-toggle-svg .theme-toggle-sky {
  opacity: 0;
}
.theme-toggle-night {
  opacity: 0;
  transition: opacity 0.5s;
}
.theme-switch input:checked ~ .theme-toggle-svg .theme-toggle-night {
  opacity: 1;
}

.theme-toggle-knob {
  /* The transition is removed from here */
}

/* The transition now only applies when the 'enable-transition' class is present */
.theme-toggle.enable-transition .theme-toggle-knob {
  transition: transform 0.5s cubic-bezier(0.4, 2, 0.6, 1);
}

.theme-switch input:checked ~ .theme-toggle-svg .theme-toggle-knob {
  transform: translateX(48px);
}
.theme-toggle-sun {
  opacity: 1;
  transition: opacity 0.5s;
}

.theme-switch input:checked ~ .theme-toggle-svg .theme-toggle-sun {
  opacity: 0;
}
.theme-toggle-moon {
  opacity: 0;
  transition: opacity 0.5s;
}
.theme-switch input:checked ~ .theme-toggle-svg .theme-toggle-moon {
  opacity: 1;
}
.theme-toggle-cloud {
  opacity: 1;
  transition: opacity 0.5s;
}
.theme-switch input:checked ~ .theme-toggle-svg .theme-toggle-cloud {
  opacity: 0;
}
.theme-toggle-star {
  opacity: 0;
  transition: opacity 0.5s;
}
.theme-switch input:checked ~ .theme-toggle-svg .theme-toggle-star {
  opacity: 1;
}
@media (max-width: 768px) {
  .theme-switch {
    width: 76px;
    height: 38px;
  }
  .theme-toggle-svg {
    width: 76px;
    height: 38px;
  }
}

.contact-card {
  background: var(--card-bg);
  border-radius: 24px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.08);
  max-width: 1100px;
  margin: 3rem auto;
  padding: 2.5rem 2rem;
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  justify-content: space-between;
}
.contact-card-info {
  flex: 1 1 0;
  min-width: 260px;
}
.contact-card-info h3 {
  color: var(--accent);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}
.contact-card-info p {
  margin-bottom: 2.2rem;
  font-size: 1.15rem;
  color: var(--text-secondary);
}
.contact-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-card-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
  font-size: 1.1rem;
  text-decoration: none;
}
.contact-card-list li .icon {
  font-size: 1.3rem;
}
.contact-card-list a {
  text-decoration: none;
  color: inherit;
}
.contact-card-form {
  width: 50%;
  border-radius: 32px;
  overflow: hidden;
}
body.light-theme .contact-card-form {
  background: #b4bdce;
  border: 2px solid #e2e8f0;
  color: #374151;
}
body.light-theme .contact-form .form-group input,
body.light-theme .contact-form .form-group textarea,
body.light-theme .contact-form .form-group select {
  background: #f9fafb;
  color: #374151;
  border: 2px solid #e2e8f0;
}
body.light-theme .contact-form .form-group label {
  color: #475569;
}
body.dark-theme .contact-card-form {
  border: 3px solid #1a2233;
  box-shadow: 0 4px 32px rgba(10, 20, 40, 0.18);
}
@media (max-width: 900px) {
  .contact-card {
    flex-direction: column;
    gap: 2rem;
    padding: 1.5rem 0.5rem;
  }
  .contact-card-info,
  .contact-card-form {
    min-width: 0;
    width: 100%;
  }
  .contact-card-form {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    box-sizing: border-box;
    border-radius: 28px;
    overflow: hidden;
  }
}

/* Light theme overrides for hero section */
body.light-theme .hero {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #fff 100%);
}
body.light-theme .hero h1 {
  color: #1e293b;
}
body.light-theme .hero .subtitle {
  color: #334155;
}

.hero-animated-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

/* Light mode: sun and clouds */
body.light-theme .hero-animated-bg {
  background: none;
}

@keyframes sun-move {
  0% {
    left: 10%;
    top: 15%;
  }
  100% {
    left: 20%;
    top: 10%;
  }
}
body.light-theme .hero-animated-bg .cloud {
  position: absolute;
  top: var(--cloud-top, 30%);
  width: var(--cloud-width, 120px);
  height: var(--cloud-height, 50px);
  background: #fff;
  border-radius: 50%;
  opacity: 0.8;
  z-index: 3;
  border: 2px solid #222;
  /* No animation, clouds are static */
}

@keyframes sun-ray-move {
  0% {
    left: 50px;
    top: 55px;
  }
  100% {
    left: 70px;
    top: 45px;
  }
}
body.light-theme .hero-animated-bg .cloud1 {
  width: 120px;
  height: 50px;
  left: 25%;
  top: 30%;
  animation-delay: 0s;
}
body.light-theme .hero-animated-bg .cloud2 {
  width: 90px;
  height: 40px;
  left: 60%;
  top: 20%;
  animation-delay: 6s;
}
body.light-theme .hero-animated-bg .cloud3 {
  width: 70px;
  height: 30px;
  left: 40%;
  top: 50%;
  animation-delay: 12s;
}
@keyframes cloud-move {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(120px);
  }
}

/* Dark mode: moon, stars, and clouds */
body.dark-theme .hero-animated-bg {
  background: none;
}

@keyframes moon-move {
  0% {
    right: 12%;
    top: 18%;
  }
  100% {
    right: 22%;
    top: 13%;
  }
}
body.dark-theme .hero-animated-bg .star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  opacity: 0.8;
  z-index: 3;
  animation: star-twinkle 2s infinite alternate;
}
body.dark-theme .hero-animated-bg .star1 {
  width: 4px;
  height: 4px;
  left: 30%;
  top: 22%;
  animation-delay: 0s;
}
body.dark-theme .hero-animated-bg .star2 {
  width: 3px;
  height: 3px;
  left: 60%;
  top: 18%;
  animation-delay: 1s;
}
body.dark-theme .hero-animated-bg .star3 {
  width: 5px;
  height: 5px;
  left: 80%;
  top: 28%;
  animation-delay: 0.5s;
}
body.dark-theme .hero-animated-bg .star4 {
  width: 2px;
  height: 2px;
  left: 70%;
  top: 35%;
  animation-delay: 1.5s;
}
@keyframes star-twinkle {
  0% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
  }
}
body.dark-theme .hero-animated-bg .cloud {
  position: absolute;
  background: #cbd5e1;
  border-radius: 50%;
  opacity: 0.5;
  z-index: 3;
  animation: cloud-move-night 20s linear infinite;
}
body.dark-theme .hero-animated-bg .cloud1 {
  width: 100px;
  height: 40px;
  left: 20%;
  top: 40%;
  animation-delay: 0s;
}
body.dark-theme .hero-animated-bg .cloud2 {
  width: 80px;
  height: 30px;
  left: 55%;
  top: 25%;
  animation-delay: 8s;
}
body.dark-theme .hero-animated-bg .cloud3 {
  width: 60px;
  height: 25px;
  left: 35%;
  top: 60%;
  animation-delay: 14s;
}
@keyframes cloud-move-night {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100px);
  }
}

/* Ensure hero content is above the animated background */
.hero-content {
  position: relative;
  z-index: 5;
}

.hero-animated-bg .orbit-body {
  position: absolute;
  left: 30%;
  top: 15%;
  width: 80px;
  height: 80px;
  z-index: 2;
  border-radius: 50%;
  transition: background 0.8s, box-shadow 0.8s;
}
body.light-theme .hero-animated-bg .orbit-body {
  background: radial-gradient(circle at 40% 40%, #ffd93a 70%, #fffbe6 100%);
  box-shadow: 0 0 60px 20px #ffd93a88;
  left: var(--sun-start-left, 30%);
  top: 15%;
  transform: translate(0%, 0%) translateY(0px);
}
body.dark-theme .hero-animated-bg .orbit-body {
  background: radial-gradient(circle at 60% 40%, #f4f1c9 70%, #e0e7ef 100%);
  box-shadow: 0 0 40px 10px #f4f1c988;
  left: 70%;
  top: 15%;
  transform: translate(0%, 0%) translateY(0px);
}
body.light-theme .hero-animated-bg .orbit-body::before {
  /* Sun rays */
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px dashed #ffd93a;
  transform: translate(-50%, -50%);
  opacity: 0.5;
}
body.dark-theme .hero-animated-bg .orbit-body::before {
  /* Moon craters */
  content: "";
  position: absolute;
  left: 60%;
  top: 40%;
  width: 16px;
  height: 16px;
  background: #e0e7ef;
  border-radius: 50%;
  box-shadow: -18px 10px 0 0 #e0e7ef, 10px 18px 0 0 #e0e7ef,
    8px -8px 0 0 #e0e7ef;
  opacity: 0.7;
  transform: translate(-50%, -50%);
}

.hero.to-dark .orbit-body {
  animation: orbit-sun-to-moon 1.2s cubic-bezier(0.7, 0, 0.3, 1);
}
@keyframes orbit-sun-to-moon {
  0% {
    left: var(--sun-start-left, 30%);
    top: 15%;
  }
  100% {
    left: 70%;
    top: 15%;
  }
}
.hero.to-light .orbit-body {
  animation: orbit-moon-to-sun 1.2s cubic-bezier(0.7, 0, 0.3, 1);
}
@keyframes orbit-moon-to-sun {
  0% {
    left: 70%;
    top: 15%;
  }
  100% {
    left: var(--sun-start-left, 30%);
    top: 15%;
  }
}
.hero {
  transition: background 1.2s cubic-bezier(0.7, 0, 0.3, 1);
}
body.light-theme .hero {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #fff 100%);
}
body.dark-theme .hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

body.light-theme .hero-animated-bg .orbit-body {
  left: var(--sun-start-left, 30%);
  top: 15%;
  transform: translate(0%, 0%) translateY(0px);
}

/* Mobile nav toggle */
.nav-menu-wrapper {
  display: flex;
  align-items: center;
}

.icon {
  display: none;
  background-color: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  height: 30px;
  width: 30px;
  margin-left: 1rem;
  z-index: 1001;
}

.icon .line {
  background-color: #667eea;
  height: 2px;
  width: 20px;
  position: absolute;
  left: 5px;
  transition: transform 0.6s linear;
}
.icon .line1 {
  top: 10px;
}
.icon .line2 {
  bottom: 10px;
}

nav.mobile-active .icon .line1 {
  transform: rotate(-765deg) translateY(5.5px);
}
nav.mobile-active .icon .line2 {
  transform: rotate(765deg) translateY(-5.5px);
}

/* Hide nav links initially on small screens */
@media (max-width: 768px) {
  .nav-menu-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.5);
  border-radius: 8px;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    margin: 0; /* ensure no default margin shifts it */
  animation: pulse-glow-ripple 2.5s infinite cubic-bezier(0.4, 0, 0.6, 1);
  transition: background-color 0.3s ease;
  }
  .icon .line {
    background-color: #667eea;
    height: 2px;
    width: 24px;
    margin: 4px 0; /* space between lines */
    transition: transform 0.6s ease;
}

  .icon:hover {
    animation: none;
    background-color: rgba(102, 126, 234, 0.2);
    }

  .icon .line1 {
    top: 10px;
  }

  .icon .line2 {
    bottom: 10px;
  }

  nav.mobile-active .icon .line1 {
    transform: rotate(-765deg) translateY(5.5px);
  }

  nav.mobile-active .icon .line2 {
    transform: rotate(765deg) translateY(-5.5px);
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: flex-end;
    align-items: center;
    justify-content: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    z-index: 999;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
  }

  nav.mobile-active .nav-links {
    max-height: 100vh;
    padding: 1rem 0;
  }

  .nav-links li {
    margin: 0.5rem 0;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.5s ease;
  }

  nav.mobile-active .nav-links li {
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links a {
    color: var(--text-main);
    font-size: 1.1rem;
    text-decoration: none;
  }

  /* Optional: hide the desktop nav links initially if they're visible */
  .nav-links {
    flex-direction: column;
  }

  /* Make sure nav doesn't overlap the theme toggle */
  .nav-container {
    justify-content: space-between;
    align-items: center;
    display: flex;
  }
}
/* Tooltip on hover - Phone button */
.fab-btn.call::after {
  content: "Instant Call";
  position: absolute;
  right: 60px;
  background: #10b981;
  color: #fff;
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 6px;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.3s ease;
  pointer-events: none;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Tooltip on hover - WhatsApp button */
.fab-btn.whatsapp::after {
  content: "Chat Now";
  position: absolute;
  right: 60px;
  background: #25d366;
  color: #fff;
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 6px;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.3s ease;
  pointer-events: none;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Only show tooltips on devices that can hover (e.g., desktop with a mouse) */
/* This prevents the "double-tap" issue on mobile devices. */
@media (hover: hover) and (pointer: fine) {
  .fab-btn.call:hover::after,
  .fab-btn.whatsapp:hover::after {
    opacity: 1;
  }
}

/* Industry Drop down */

.contact-form .form-group select {
  width: 100%;
  background: #232c3a;
  border: 2px solid #475569;
  border-radius: 8px;
  color: #e5e9f7;
  font-size: 1.08rem;
  padding: 1.1rem 1.2rem;
  box-sizing: border-box;
  transition: border 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
  box-shadow: none;
  appearance: none; /* Optional: removes default arrow for custom design */
}

/* Light theme version */
body.light-theme .contact-form .form-group select {
  background: #f3f6fa;
  color: #94a3b8;
  border: 2px solid #94a3b8;
}

/* Dark theme version */
body.dark-theme .contact-form .form-group select {
  background: #232c3a;
  color: #e5e9f7;
  border: 2px solid #475569;
}

/* Focus state */
.contact-form .form-group select:focus {
  border: 2px solid #667eea;
  outline: none;
  box-shadow: 0 0 0 2px #a5b4fc44;
}

.contact-card-list .icon {
  font-size: 1.5rem;
  line-height: 1;
  display: inline-block;
}

/*jbasmsa*/

.falling-stars .falling-star {
  position: absolute;
  font-size: 1.2rem;
  color: white;
  opacity: 0.8;
  animation: shootStar 4s linear infinite;
}

.falling-stars .falling-star:nth-child(1) {
  top: 20%;
  left: 110%;
  animation-delay: 0s;
}
.falling-stars .falling-star:nth-child(2) {
  top: 40%;
  left: 120%;
  animation-delay: 1s;
}
.falling-stars .falling-star:nth-child(3) {
  top: 60%;
  left: 130%;
  animation-delay: 2s;
}
.falling-stars .falling-star:nth-child(4) {
  top: 30%;
  left: 115%;
  animation-delay: 1.5s;
}
.falling-stars .falling-star:nth-child(5) {
  top: 50%;
  left: 125%;
  animation-delay: 2.5s;
}

@keyframes shootStar {
  0% {
    transform: translateX(0) translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-150vw) translateY(30px);
    opacity: 0;
  }
}

/* right ksndkjsd*/

/* Horizontal Scroll Container */
.projects-scroll-wrapper {
  position: relative;
  overflow: hidden;
  margin-top: 2rem;
  padding-bottom: 2rem;
}

.projects-scroll {
  display: flex;
  overflow-x: auto;
  gap: 2rem;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 1rem;
  scrollbar-width: none; /* Firefox */
}
.projects-scroll::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.project-card {
  flex: 0 0 90%;
  scroll-snap-align: start;
  min-width: 300px;
  max-width: 350px;
}

/* Scroll Dots */
.scroll-dots {
  text-align: center;
  margin-top: 1rem;
}

.scroll-dots .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #cbd5e1;
  border-radius: 50%;
  margin: 0 6px;
  transition: background-color 0.3s;
}

.scroll-dots .dot.active {
  background-color: var(--accent);
}

.projects-pagination .dot.active {
  background-color: var(--accent);
}

.projects-pagination {
  text-align: center;
  margin-top: 1rem;
}

.projects-pagination .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #cbd5e1;
  border-radius: 50%;
  margin: 0 6px;
  transition: background-color 0.3s;
  cursor: pointer;
}

.projects-pagination .dot.active {
  background-color: var(--accent);
}

/* DARK THEME: white text on dark background */
body.dark-theme .contact-form .form-group input,
body.dark-theme .contact-form .form-group textarea,
body.dark-theme .contact-form .form-group select {
  background: #232c3a !important;
  color: #ffffff !important;
  border: 2px solid #475569;
}

/* LIGHT THEME: black/dark text on light background */
body.light-theme .contact-form .form-group input,
body.light-theme .contact-form .form-group textarea,
body.light-theme .contact-form .form-group select {
  background: #f3f6fa !important;
  color: #0f172a !important;
  border: 2px solid #94a3b8;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #cbd5e1;
  opacity: 1;
}

body.light-theme .contact-form input::placeholder,
body.light-theme .contact-form textarea::placeholder {
  color: #475569;
}

input,
textarea,
select {
  transition: background 0.3s, color 0.3s;
}

input:-webkit-autofill,
input:-webkit-autofill:focus,
input:-webkit-autofill:hover,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--card-bg) inset !important;
  -webkit-text-fill-color: var(--text-main) !important;
}
body.dark-theme input:-webkit-autofill,
body.dark-theme input:-webkit-autofill:focus,
body.dark-theme input:-webkit-autofill:hover,
body.dark-theme input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg, #1e293b) inset !important;
  -webkit-text-fill-color: var(--text-main) !important;
}
body.light-theme input:-webkit-autofill,
body.light-theme input:-webkit-autofill:focus,
body.light-theme input:-webkit-autofill:hover,
body.light-theme input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--card-bg, #fff) inset !important;
  -webkit-text-fill-color: var(--text-main) !important;
}

/* Fix for browser autofill styles */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px var(--input-bg, #1e293b) inset !important;
  -webkit-text-fill-color: var(--text-main, #fff) !important;
  caret-color: var(--text-main, #fff) !important;
}

#otpSection {
  background: var(--card-bg, #1e293b);
  padding: 2rem;
  border-radius: 12px;
  color: var(--text-main, #fff);
}
#otpInput {
  padding: 0.8rem 1rem;
  margin: 1rem auto;
  font-size: 1.2rem;
  border: 2px solid #667eea;
  border-radius: 8px;
  background: #232c3a;
  color: white;
  display: block;
  text-align: center;
}

body.light-theme #otpInput {
  background: #fff;
  color: #000;
}

/* Base styles for all sections */
.section {
  padding: 6rem 0;
}

/* ===================================================================
 * # base style
 *
 * ------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol";
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--bg-main, #f8fafc);
  color: var(--text-main, #0f172a);
  transition: background-color 0.3s, color 0.3s;
}

#otpSection {
  background: var(--card-bg, #1e293b);
  padding: 2rem;
  border-radius: 12px;
  color: var(--text-main, #fff);
}
#otpInput {
  padding: 0.8rem 1rem;
  margin: 1rem auto;
  font-size: 1.2rem;
  border: 2px solid #667eea;
  border-radius: 8px;
  background: #232c3a;
  color: white;
  display: block;
  text-align: center;
}

body.light-theme #otpInput {
  background: #fff;
  color: #000;

}
/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 14px;
}

::-webkit-scrollbar-track {
  background-color: var(--scrollbar-track-color);
}

::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb-color);
  border-radius: 10px;
  border: 4px solid transparent;
  background-clip: content-box;
}

.otp-modal-content input:focus {
  border-color: var(--accent2);
  outline: none;
}

/* OTP Modal Styles */
#otpModal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 3000; /* Above everything else */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(15, 23, 42, 0.6); /* Dark overlay matching theme */
  backdrop-filter: blur(5px);
}

.otp-modal-content {
  background-color: var(--card-bg);
  margin: 15% auto;
  padding: 2rem;
  border: 1px solid var(--border-color, #334155);
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: slideDownModal 0.5s ease-out;
}

@keyframes slideDownModal {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-modal {
  color: var(--text-secondary);
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  transition: color 0.3s;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover-color);
}

.scroll-down-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  z-index: 10;
  animation: bob-arrow 2s infinite;
}

.scroll-down-indicator img {
  width: 40px;
  display: block;
}

/* Invert arrow color on light theme for visibility */
body.light-theme .scroll-down-indicator img {
  filter: invert(1);
}

@keyframes bob-arrow {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

/* Mobile Hero Full Height & Centering Fix */
@media (max-width: 768px) {
  .hero {
    /* This ensures the hero section is exactly the viewport height on mobile */
    height: 100vh;

    /* Flex properties for perfect vertical and horizontal centering */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
}

/* Final Mobile Layout & Scrollbar Fixes */
@media (max-width: 768px) {
  /* 1. Fix unwanted horizontal scrollbar */
  body,
  .hero-animated-bg {
    overflow-x: hidden;
  }

  /* 2. Ensure consistent side padding */
  .nav-container,
  .hero-content,
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* 3. Style scrollbar for dark theme */
  ::-webkit-scrollbar {
    width: 8px;
  }
  ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
  }
  ::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 8px;
  }
}

.scroll-down-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  z-index: 10;
  animation: bob-arrow 2s infinite;
}

.scroll-down-indicator img {
  width: 40px;
  display: block;
}

/* Invert arrow color on light theme for visibility */
body.light-theme .scroll-down-indicator img {
  filter: invert(1);
}

@keyframes bob-arrow {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

/* Mobile Hero Full Height & Centering Fix */
@media (max-width: 768px) {
  .hero {
    /* This ensures the hero section is exactly the viewport height on mobile */
    height: 100vh;

    /* Flex properties for perfect vertical and horizontal centering */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
}

/* Final Mobile Layout & Scrollbar Fixes */
@media (max-width: 768px) {
  /* 1. Fix unwanted horizontal scrollbar */
  body,
  .hero-animated-bg {
    overflow-x: hidden;
  }

  /* 2. Ensure consistent side padding */
  .nav-container,
  .hero-content,
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* 3. Style scrollbar for dark theme */
  ::-webkit-scrollbar {
    width: 8px;
  }
  ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
  }
  ::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 8px;
  }
}

/* --- Fix for Mobile Navbar Layout --- */
@media (max-width: 768px) {
  .nav-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .nav-menu-wrapper {
    order: -1; /* This moves the hamburger to the far left */
  }
}