/* Global Styles */
body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  background-color: #f8f9fa;
  margin: 0;
  padding: 0;
  font-size: 16px;
  letter-spacing: 0.5px;
}

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

/* Typography Improvements */
h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: 1px;
  margin-bottom: 0.5em;
  color: #737373;
}

p {
  margin-bottom: 1.5em;
  color: #ffffff;
}

header {
  background-color: #b64972;
  padding: 20px 15px; /* Slightly increased padding for better spacing */
  position: fixed;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex; /* Ensure Flexbox layout */
  justify-content: space-between; /* Keep content spaced */
  align-items: center; /* Center items vertically */
}

header.scrolled {
  padding: 10px 15px; /* Reduced padding for compact view on scroll */
}

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

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  gap: 10px; /* Add consistent gap between logo and text */
}

.logo img {
  width: 50px; /* Slightly larger for better visibility */
  height: auto;
  margin-right: 0; /* No extra margin needed if using `gap` */
  transition: transform 0.3s ease;
  border-radius: 10px; /* Keep it rounded for modern design */
}

.logo:hover img {
  transform: rotate(360deg); /* Fun animation for hover */
}

.logo span {
  font-size: 1.5rem;
  font-weight: 700;
  white-space: nowrap; /* Prevent text from wrapping */
}

/* Navigation Styles */
nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links li a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.nav-links li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #ffe0f0;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-links li a:hover {
  color: #ffe0f0;
}

.nav-links li a:hover::after {
  transform: scaleX(1);
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #fff;
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(229, 27, 145, 0.7), rgb(238, 173, 202)),
    url("https://source.unsplash.com/random/1920x1080/?cosmos");
  background-size: cover;
  background-position: center;
  height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
  color: #fff;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  color: #fff;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 30px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  color: #e1effe;
}

/* Button Styles */
.cta-button,
.button {
  display: inline-block;
  background: linear-gradient(
    135deg,
    #6284a8,
    #85a2c0
  ); /* Gradient with a stronger blue tone */
  color: #fff;
  padding: 15px 40px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  border: 1px solid rgb(229, 27, 145); /* Slight hero pink contrast outline */
}

.cta-button:hover,
.button:hover {
  background: linear-gradient(
    135deg,
    #e1effe,
    #62778d
  ); /* Reverse gradient for hover */
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.button {
  padding: 12px 25px;
  border-radius: 5px;
  margin-top: 20px;
}

/* Section Styles */
.section {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: #504e4e;
}

/* Features Section */
.features {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.feature {
  text-align: center;
  max-width: 300px;
  margin-bottom: 40px;
  padding: 30px;
  background-color: #fff;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.feature i {
  font-size: 3rem;
  color: #fee2f8;
  margin-bottom: 20px;
}

/* Services Section */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.service-card {
  background-color: #fff;
  border-radius: 5px;
  padding: 40px;
  margin-top: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.service-card i {
  font-size: 3.5rem;
  color: #fee2f8;
  margin-bottom: 25px;
}

/* Testimonials Section */
.testimonial-slider {
  max-width: 900px;
  margin: 0 auto;
}

.testimonial {
  background-color: #fff;
  border-radius: 15px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.testimonial p {
  font-style: italic;
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #333;
}

.testimonial .author {
  font-weight: 600;
  color: #e1effe;
}

/* Social Links */
.social-links {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.social-links a {
  display: inline-block;
  margin: 0 20px;
  font-size: 2.5rem;
  color: #e1effe;
  transition: all 0.3s ease;
}

.social-links a:hover {
  color: #e1effe;
  transform: translateY(-5px);
}

/* Footer */
footer {
  background-color: #000;
  color: #fff;
  text-align: center;
  padding: 30px 0;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #e1effe;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

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

.back-to-top:hover {
  background-color: #e1effe;
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Section Decorations */
.section::before,
.section::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  background-color: rgba(230, 230, 250, 0.1);
  border-radius: 50%;
  z-index: -1;
}

.section::before {
  top: -100px;
  left: -100px;
}

.section::after {
  bottom: -100px;
  right: -100px;
  background-color: rgba(0, 0, 139, 0.05);
}

/* Card Hover Effects */
.feature::before,
.service-card::before,
.testimonial::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 139, 0.05),
    rgba(230, 230, 250, 0.05)
  );
  z-index: -1;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature:hover::before,
.service-card:hover::before,
.testimonial:hover::before {
  opacity: 1;
}

/* Accessibility Improvements */
.button:focus,
.cta-button:focus,
.social-links a:focus {
  outline: 2px solid #fee2f8;
  outline-offset: 2px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
  }

  /* Hide navigation links by default */
  .nav-links {
    display: none; /* Hide nav links */
    margin-top: 20px;
  }

  /* When the mobile-menu-toggle button is active, show the nav links */
  .nav-links.active {
    display: flex;
    flex-direction: column; /* Stack the links vertically */
    align-items: center;
    gap: 15px; /* Add spacing between links */
  }

  /* Mobile Menu Toggle Button */
  .mobile-menu-toggle {
    display: block; /* Show mobile menu button */
    position: absolute;
    right: 55px; /* Add padding from the right */
    top: 50%; /* Center vertically */
    transform: translateY(-50%); /* Adjust for exact vertical centering */
    z-index: 1001;
    background: none;
    border: none;
    cursor: pointer;
  }

  .mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: all 0.3s ease; /* Smooth animation */
    transform-origin: center; /* Ensure rotations happen around the center */
  }
  /* Mobile Menu Toggle Active State */
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg); /* Move the top bar down and rotate */
  }

  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0; /* Hide the middle bar */
  }

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg); /* Move the bottom bar up and rotate */
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
