/* Variables */
:root {
  --primary-color: #2d46b9;
  --secondary-color: #f8f9fa;
  --text-color: #333;
  --text-muted: #6c757d;
  --white: #fff;
  --success: #28a745;
  --info: #17a2b8;
  --warning: #ffc107;
  --danger: #dc3545;
  --light: #f8f9fa;
  --dark: #343a40;
  --transition: all 0.3s ease;
  --box-shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.05);
  --box-shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.1);
  --gradient-primary: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    #4a6bdc 100%
  );
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* Overrides Bootstrap classes */
.bg-primary {
  background-color: var(--primary-color) !important;
}

/* General Styles */
body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  overflow-x: hidden;
}

/* Loader */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Navigation */
.navbar {
  padding: 1rem 0;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.95);
}

.navbar.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-text {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  background: linear-gradient(135deg, #0056b3 0%, #001f3f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.code-tag {
  font-family: "Courier New", monospace;
  font-weight: 600;
}

.navbar .nav-link {
  position: relative;
  padding: 0.5rem 1rem;
}

.navbar .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.navbar .nav-link.active {
  color: var(--primary-color);
}
.navbar .nav-link.active::after {
  transform: scaleX(1);
}

section {
  padding-top: 7rem;
  padding-bottom: 3rem;
}

/* Hero Section */
#hero {
  background: linear-gradient(135deg, #0056b3 0%, #001f3f 100%);
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /*  background-image: url("../assets/images/hero-background.svg"); */
  opacity: 0.6;
  pointer-events: none;
}

.hero-paragraph {
  max-width: 700px;
}

/* Hero Success Badges */
.hero-success-badges {
  animation: fadeInUp 0.8s ease-out;
}

.hero-success-badges .badge {
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.hero-success-badges .badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-success-badges .badge i {
  font-size: 0.9rem;
}

.highlight-word {
  position: relative;
  display: inline-block;
  color: var(--warning);
  transform-style: preserve-3d;
  perspective: 500px;
  animation: wordFloat 3s ease-in-out infinite;
}

.highlight-word::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--warning);
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 0.5s ease;
}

/* Animations */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Skills Section */
.skill-card {
  background: var(--white);
  padding: 0.8rem 1.6rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  transition: transform 0.3s ease;
}

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

.skill-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Services Section */
.service-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  height: 100%;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #4a6bdc 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.service-icon {
  width: 80px;
  height: 80px;
  line-height: 80px;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, #4a6bdc 100%);
  color: #fff;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  transform: scale(1.1);
}

.service-card h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--text-color);
}

.service-card p {
  color: var();
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.badge {
  font-size: 1rem;
  padding: 0.5rem 1.5rem;
  font-weight: 500;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-color);
  max-width: 700px;
  margin: 0 auto;
}

/* Testimonials Section */
.testimonial-slider {
  position: relative;
  padding: 2rem 0 5rem;
}

.testimonial-card {
  background: #fff;
  border-radius: 20px;
  padding: 3rem;
  margin: 1rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  border-top: 3px solid var(--success);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.testimonial-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.testimonial-text-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px; /* Ensures minimum height for content */
}

.testimonial-text {
  font-size: 1.1rem;
  color: var(--text-color);
  line-height: 1.8;
  margin: 1.5rem 0;
  font-style: italic;
  max-height: 200px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling for iOS */
  scrollbar-width: thin;
  padding: 0 10px;
  /* Add momentum-based scrolling for iOS */
  -webkit-overflow-scrolling: touch;
}

/* Style scrollbar for webkit browsers (Chrome, Safari, iOS) */
.testimonial-text::-webkit-scrollbar {
  width: 6px;
  -webkit-appearance: none;
}

.testimonial-text::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
}

.testimonial-text::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
}

/* For Firefox */
.testimonial-text {
  scrollbar-color: var(--primary-color) #f1f1f1;
}

/* Update carousel container */
.carousel-inner {
  min-height: 400px; /* Adjust based on your content */
}

/* Ensure all carousel items are same height */
.carousel-item {
  height: 100%;
}

.rating {
  color: #ffc107;
  font-size: 1.2rem;
}

.testimonial-author h5 {
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.testimonial-author p {
  color: var();
  font-size: 0.9rem;
}

/* Carousel Controls */
.carousel-controls {
  position: absolute;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none; /* Allow touches to pass through */
}

.carousel-control-prev,
.carousel-control-next {
  pointer-events: auto; /* Re-enable touches for buttons */
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.8;
  top: 50%;
  transform: translateY(-50%);
}

.carousel-control-prev {
  left: -50px;
}

.carousel-control-next {
  right: -50px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
  background: var(--primary-color);
}

.carousel-control-prev i,
.carousel-control-next i {
  color: #fff;
  font-size: 1.2rem;
}

/* Testimonials Section - Additional Styles */
.badges-wrapper {
  margin-bottom: 1rem;
}

.badge {
  font-size: 1rem;
  padding: 0.6rem 1.5rem;
  font-weight: 500;
}

.badge i {
  font-size: 1.1rem;
}

.success-rate-text {
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

/* Testimonials Section - Carousel Indicators */
.carousel-indicators {
  bottom: -3rem;
  gap: 0.5rem;
}

.carousel-indicators button {
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background-color: var(--primary-color) !important;
  opacity: 0.3;
  transition: all 0.3s ease;
  margin: 0 6px !important;
}

.carousel-indicators button.active {
  opacity: 1;
  transform: scale(1.2);
  background-color: var(--primary-color) !important;
}

/* Testimonials Section - CTA */
.testimonial-cta {
  padding: 2rem 0;
  position: relative;
}

.testimonial-cta h3 {
  color: var(--primary-color);
  font-weight: 600;
}

.testimonial-cta .lead {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.testimonial-cta .btn {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-cta .btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-lg);
}

/* Projects Section */
.project-filters {
  margin-bottom: 2rem;
}

.btn-filter {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  color: var();
  font-weight: 500;
  transition: var(--transition);
}

.btn-filter:hover,
.btn-filter.active {
  color: var(--primary-color);
}

.project-card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.project-image {
  position: relative;
  overflow: hidden;
  padding-top: 60%; /* 16:9 Aspect Ratio */
}

.project-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover .project-overlay {
  opacity: 1;
}
.project-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-links .btn {
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.project-info p {
  height: 4.8em; /* Approximately 3 lines of text */
  margin-bottom: 1rem;
  overflow: hidden;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tags .badge {
  font-weight: 500;
  font-size: 0.8rem;
}

/* Modal Styles */
.modal-content {
  border: none;
  border-radius: 15px;
}

.modal-header {
  background: var(--primary-color);
  color: white;
  border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
}

.modal-body {
  padding: 2rem;
}

.modal-body h4 {
  color: var(--primary-color);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.modal-body h4:first-child {
  margin-top: 0;
}

.modal-body ul {
  padding-left: 1.2rem;
}

.modal-body ul li {
  margin-bottom: 0.5rem;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
  padding: 1rem 2rem;
}

/* Video Modal Styles */
.modal-body .ratio {
  background-color: #000;
}

/* Style for the demo button */
.watch-demo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.watch-demo i {
  font-size: 1.1em;
}

/* Ensure video modal appears above project modal */
#videoModal {
  z-index: 1060;
}

/* Responsive video container */
.ratio-16x9 {
  --bs-aspect-ratio: 56.25%;
}

/* Contact Section */

.contact-links {
  margin: 2rem 0;
}

.contact-links .btn {
  padding: 1rem 2rem;
  font-weight: 500;
  transition: transform 0.3s ease;
}

.contact-links .btn:hover {
  transform: translateY(-3px);
}

.contact-links .btn-info {
  background-color: #0077b5;
  border-color: #0077b5;
  color: white;
}

/* Contact Section Styles */
.contact-service-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: var(--box-shadow-sm);
  height: 100%;
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-lg);
}

.contact-service-card .card-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
}

.contact-service-card h3 {
  color: var(--text-color);
  font-weight: 600;
}

.contact-service-card p {
  color: var(--text-muted);
  margin-bottom: 0;
}

.availability-notice {
  color: var(--text-color);
  font-size: 1.1rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  background: rgba(45, 70, 185, 0.05);
  display: inline-block;
}

.about-cta {
  margin-top: 1.5rem;
}

.about-cta p {
  font-size: 0.9rem;
  font-weight: var(--font-weight-medium);
}

.about-cta .btn {
  transition: all 0.3s ease;
  padding: 0.5rem 1.5rem;
  font-weight: var(--font-weight-medium);
}

.about-cta .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(45, 70, 185, 0.15);
}

/* Scroll to Top Button */
.scroll-to-top {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.scroll-to-top.visible {
  opacity: 1;
}

/* Media Queries */

@media (max-width: 416px) {
  .hero-buttons {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-buttons a {
    width: 300px;
  }
}

@media (max-width: 500px) {
  .contact-links .btn {
    width: 80%;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 768px) {
  .logo-text {
    font-size: 1.2rem;
  }

  section {
    padding-top: 5rem;
    padding-bottom: 2rem;
  }

  .navbar {
    padding: 0.5rem 0;
  }

  #hero {
    text-align: center;
  }

  .skill-card {
    padding: 0rem;
    box-shadow: none;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .service-card {
    padding: 2rem;
    margin-bottom: 1rem;
  }

  .service-icon {
    width: 70px;
    height: 70px;
    line-height: 70px;
    font-size: 1.75rem;
    margin-bottom: 0rem;
  }

  .badges-wrapper .badge {
    width: 220px;
  }

  .testimonial-card {
    padding: 2rem;
    margin: 0.5rem;
  }
  .testimonial-content {
    height: 350px;

    gap: 0.5rem;
  }
  .testimonial-card .testimonial-text-wrapper {
    flex-grow: 0;
  }
  .testimonial-text {
    height: auto;
  }
  .carousel-controls {
    top: auto;
    bottom: -15px;
    transform: none;
  }

  .carousel-control-prev,
  .carousel-control-next {
    display: none;
  }

  .testimonial-cta {
    padding: 1.5rem 0;
  }

  .testimonial-cta .lead {
    font-size: 1rem;
  }

  .project-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .btn-filter {
    margin: 0;
  }

  .modal-content {
    max-width: 85%;
    margin: auto;
  }

  .project-card:hover {
    transform: translateY(0);
    box-shadow: none;
  }
  .project-card:hover .project-image img {
    transform: scale(1);
  }
  .project-card:hover .project-overlay {
    opacity: 0;
  }
  .project-card .project-image:hover .project-card {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  }
  .project-card .project-image:hover {
    transform: scale(1.1);
  }
  .project-card .project-image:hover .project-overlay {
    opacity: 1;
  }

  .contact-service-card {
    padding: 1.5rem;
    text-align: center;
  }

  .about-cta {
    margin-top: 1rem;
  }

  .about-cta .btn {
    width: auto;
    min-width: 200px;
  }
  .scroll-to-top {
    display: block;
  }
}
