/* Base Styles */
:root {
  /* Modern color scheme */
  --primary-color: #0066ff;
  --primary-light: #4d94ff;
  --primary-dark: #0047b3;
  --secondary-color: #2d3748;
  --accent-color: #00d8d8;
  --light-color: #f8f9fa;
  --dark-color: #1a202c;
  --text-color: #4a5568;
  --text-light: #f8f9fa;

  /* Typography */
  --font-primary: "Poppins", sans-serif;
  --font-heading: "Inter", sans-serif; /* Updated heading font */

  /* Effects */
  --transition: all 0.3s ease;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --border-radius: 8px;

  /* Dark mode variables - will be toggled with JS */
  --bg-color: #ffffff;
  --bg-secondary: #f8f9fa;
  --border-color: #e2e8f0;
}

/* Dark mode class that will be toggled with JS */
.dark-mode {
  --primary-color: #3182ce;
  --primary-light: #63b3ed;
  --primary-dark: #2c5282;
  --secondary-color: #e2e8f0;
  --text-color: #e2e8f0;
  --bg-color: #1a202c;
  --bg-secondary: #2d3748;
  --border-color: #4a5568;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Account for fixed header */
}

body {
  font-family: var(--font-primary);
  color: var(--text-color);
  line-height: 1.7;
  background-color: var(--bg-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
  color: var(--secondary-color);
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  width: 100%;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--primary-color);
  color: var(--light-color);
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn-small {
  padding: 8px 18px;
  font-size: 0.8rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-header h2:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-color);
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.8;
}

/* Header Styles */
header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.dark-mode header {
  background-color: rgba(26, 32, 44, 0.95);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 40px;
  width: auto;
  margin-right: 15px;
}

.logo h1 {
  color: var(--secondary-color);
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-heading);
}

nav ul {
  display: flex;
}

nav ul li {
  margin-left: 2rem;
}

nav ul li a {
  color: var(--secondary-color);
  font-weight: 500;
  position: relative;
  padding: 5px 0;
}

nav ul li a:hover {
  color: var(--primary-color);
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

nav ul li a:hover::after {
  width: 100%;
}

.theme-toggle {
  cursor: pointer;
  margin-left: 20px;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
  background: transparent;
  border: none;
  color: var(--secondary-color);
  z-index: 1002;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url("../assets/images/hero-bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: 100vh;
  color: var(--text-light);
  display: flex;
  align-items: center;
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--primary-dark) 0%, transparent 100%);
  opacity: 0.3;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 5rem;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s forwards 0.5s;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s forwards 0.8s;
}

.hero-content .btn {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s forwards 1.1s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Services Section */
.services {
  padding: 8rem 0;
  background-color: var(--bg-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2.5rem;
}

.service-card {
  background: var(--bg-color);
  border-radius: var(--border-radius);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 0;
  background: var(--primary-color);
  transition: height 0.5s ease;
}

.service-card:hover::before {
  height: 100%;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.service-card i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  transition: transform 0.5s ease;
}

.service-card:hover i {
  transform: scale(1.1);
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

/* About Section */
.about {
  padding: 8rem 0;
  background-color: var(--bg-color);
}

.about-content {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.about-text h3::after {
  content: "";
  position: absolute;
  width: 50%;
  height: 3px;
  background: var(--primary-color);
  bottom: 0;
  left: 0;
  border-radius: 3px;
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.about-features {
  margin-top: 2rem;
}

.feature {
  display: flex;
  align-items: center;
  margin-bottom: 1.2rem;
  padding: 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  background: var(--bg-secondary);
}

.feature:hover {
  transform: translateX(10px);
}

.feature i {
  color: var(--primary-color);
  margin-right: 1rem;
  font-size: 1.2rem;
  flex-shrink: 0; /* Prevent icon from shrinking */
}

.feature p {
  margin: 0; /* Remove default paragraph margin */
}

/* Portfolio Section */
.portfolio {
  padding: 8rem 0;
  background-color: var(--bg-secondary);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
}

.portfolio-item {
  background: var(--bg-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.portfolio-content {
  padding: 2rem;
}

.portfolio-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: var(--secondary-color);
}

.portfolio-content p {
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

/* Testimonials Section */
.testimonials {
  padding: 8rem 0;
  background-color: var(--bg-color);
  position: relative;
}

.testimonials::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 102, 255, 0.05) 0%,
    transparent 100%
  );
  pointer-events: none;
}

.testimonial-slider {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 1rem;
}

.testimonial {
  background: var(--bg-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.testimonial::before {
  content: "\201C";
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 4rem;
  color: var(--primary-color);
  opacity: 0.2;
  font-family: Georgia, serif;
}

.testimonial:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.testimonial-content {
  position: relative;
  z-index: 1;
}

.testimonial-content p {
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  line-height: 1.8;
  font-size: 1.05rem;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.testimonial-author h4 {
  font-size: 1.1rem;
  color: var(--secondary-color);
  margin-bottom: 0.3rem;
}

.testimonial-author p {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
}

/* Contact Section */
.contact {
  padding: 8rem 0;
  background-color: var(--bg-color);
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 4rem;
}

.contact-info .info-item {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.contact-info .info-item:hover {
  transform: translateX(10px);
}

.info-item i {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 1.5rem;
  color: var(--light-color);
  font-size: 1.5rem;
  box-shadow: 0 10px 15px rgba(0, 102, 255, 0.2);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-secondary);
  color: var(--text-color);
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

/* Footer */
footer {
  background: var(--dark-color);
  color: var(--text-light);
  padding: 5rem 0 1rem;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--primary-color);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.footer-links h3,
.footer-social h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.footer-links h3::after,
.footer-social h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--primary-color);
}

.footer-links ul li {
  margin-bottom: 1rem;
  transition: var(--transition);
}

.footer-links ul li:hover {
  transform: translateX(8px);
}

.footer-links ul li a {
  color: #ddd;
  transition: var(--transition);
  display: inline-block;
}

.footer-links ul li a:hover {
  color: var(--primary-color);
}

.social-icons {
  display: flex;
  gap: 1.2rem;
}

.social-icons a {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 1.2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.social-icons a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  transform: scale(0);
  transition: transform 0.3s ease;
  border-radius: 50%;
  z-index: -1;
}

.social-icons a:hover::before {
  transform: scale(1);
}

.social-icons a:hover {
  color: var(--light-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Scroll to top button */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  border-radius: 50%;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 99;
}

.scroll-top.active {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-5px);
  background: var(--primary-dark);
}

/* Animation classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(0, 102, 255, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 991px) {
  .hero-content h1 {
    font-size: 2.8rem;
  }
  .about-content {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  header {
    padding: 0.8rem 0;
  }

  nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--bg-color);
    padding: 5rem 2rem;
    transition: var(--transition);
    z-index: 1001;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
  }

  .dark-mode nav {
    background: var(--dark-color);
  }

  nav.active {
    right: 0;
  }

  nav ul {
    flex-direction: column;
  }

  nav ul li {
    margin: 1.5rem 0;
  }

  nav ul li a {
    color: var(--text-color);
    font-size: 1.1rem;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .service-card {
    padding: 1.8rem;
  }

  .scroll-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
  }
}
