/* Base styles */
:root {
  --primary-gradient: linear-gradient(135deg, #0052cc, #007bff);
  --hover-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  --accent-color: #00d4ff;
  --section-spacing: clamp(3rem, 10vw, 8rem);
}

/* Landing page specific styles */
.landing-page {
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
  padding-top: 0;
}

.landing-page body {
  margin: 0;
  padding: 0;
}

/* Navigation styles */
.navbar {
  transition: all 0.3s ease;
  padding: 1rem 0;
}

.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Main content wrapper */
.main-content {
  margin-top: 0;
  padding-top: 0;
}

/* Diagonal sections and dynamic layouts */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--section-spacing) 0;
  position: relative;
  z-index: 1;
  margin-top: 0;
  overflow: hidden;
}

.diagonal-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  transform: skewY(-6deg);
  transform-origin: top left;
  z-index: -2;
}

.diagonal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,0,0,0.2) 0%, transparent 100%);
  z-index: -1;
}

.floating-shapes .shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  animation: float 20s infinite;
}

.shape-1 {
  width: 300px;
  height: 300px;
  top: -150px;
  right: -150px;
  animation-delay: 0s !important;
}

.shape-2 {
  width: 200px;
  height: 200px;
  bottom: -100px;
  left: -100px;
  animation-delay: -5s !important;
}

.shape-3 {
  width: 150px;
  height: 150px;
  bottom: 50%;
  right: 10%;
  animation-delay: -10s !important;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(10px, -10px) rotate(5deg);
  }
  50% {
    transform: translate(0, 20px) rotate(-5deg);
  }
  75% {
    transform: translate(-10px, -15px) rotate(3deg);
  }
}

/* Enhanced buttons */
.btn-light {
  color: #0052cc;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-light:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(0,82,204,0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-light:hover {
  background-color: #f8f9fa;
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--hover-shadow);
}

.btn-light:hover:before {
  width: 300px;
  height: 300px;
}

.card {
  border: none;
  border-radius: 1rem;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--hover-shadow);
}

/* Hero Section */
.hero-img {
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  transform: perspective(1000px) rotateY(-15deg);
  transition: transform 0.5s ease;
  max-width: 100%;
  height: auto;
}

.hero-img:hover {
  transform: perspective(1000px) rotateY(0deg);
}

.hero-image-wrapper {
  position: relative;
  max-width: 100%;
  overflow: hidden;
}

.hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.floating-card {
  position: absolute;
  background: white;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 10;
}

.card-1 {
  top: 20%;
  right: -10%;
  animation: float 3s ease-in-out infinite;
}

.card-2 {
  bottom: 20%;
  left: -10%;
  animation: float 3s ease-in-out infinite 1.5s;
}

/* Typography */
h1, h2, h3, .display-4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
}

.lead {
  color: #e6e6e6;
}

/* Features Section */
.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  margin-bottom: 1rem;
}

/* Enhanced Testimonials */
.vertical-testimonials {
  position: relative;
  background: linear-gradient(to bottom, #f8f9fa, white);
}

.testimonial-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  position: relative;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.testimonial-header img {
  border: 3px solid var(--accent-color);
  transition: transform 0.3s ease;
}

.testimonial-card:hover .testimonial-header img {
  transform: scale(1.1);
}

.testimonial-rating {
  border-top: 1px solid rgba(0,0,0,0.1);
  padding-top: 1rem;
  margin-top: 1rem;
}

.badge.bg-primary {
  background: var(--primary-gradient) !important;
  padding: 0.5rem 1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Animations */
[data-aos] {
  opacity: 0;
  transition: opacity 0.6s ease;
}

[data-aos].aos-animate {
  opacity: 1;
}

/* Chat Widget */
#chat-widget {
  transition: transform 0.3s ease;
}

#chat-widget:hover {
  transform: translateY(-5px);
}

/* Enhanced vertical layout */
.vertical-timeline {
  position: relative;
  padding: 3rem 0;
  max-width: 100%;
  overflow: hidden;
}

.vertical-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--accent-color) 10%,
    var(--accent-color) 90%,
    transparent
  );
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  align-items: center;
  margin: 4rem 0;
  position: relative;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
}

.timeline-content {
  flex: 0 1 45%;
  padding: 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.timeline-dot {
  width: 24px;
  height: 24px;
  background: var(--accent-color);
  border-radius: 50%;
  margin: 0 2rem;
  position: relative;
  z-index: 2;
}

.timeline-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  width: 2rem;
  height: 2px;
  background: var(--accent-color);
}

.timeline-item:nth-child(odd) .timeline-dot::before {
  right: 100%;
}

.timeline-item:nth-child(even) .timeline-dot::before {
  left: 100%;
}

/* Card stacks effect */
.card-stack {
  position: relative;
  margin: 3rem 0;
  max-width: 100%;
  overflow: hidden;
}

.card-stack .card {
  position: absolute;
  width: 100%;
  transition: all 0.3s ease;
}

.card-stack .card:nth-child(1) {
  transform: translateY(0) scale(1);
  z-index: 3;
}

.card-stack .card:nth-child(2) {
  transform: translateY(20px) scale(0.98);
  z-index: 2;
  opacity: 0.8;
}

.card-stack .card:nth-child(3) {
  transform: translateY(40px) scale(0.96);
  z-index: 1;
  opacity: 0.6;
}

.card-stack:hover .card:nth-child(1) {
  transform: translateY(-10px) scale(1.02);
}

/* Smooth section transitions */
section {
  scroll-margin-top: 80px;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

/* Fix container overflow issues */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Ensure proper section spacing */
.features-section {
  padding: 6rem 0;
  background: #f8f9fa;
}

.vertical-testimonials {
  padding: 6rem 0;
  background: linear-gradient(to bottom, #f8f9fa, white);
}

/* Section dividers */
.section-divider {
  position: relative;
  height: 100px;
  overflow: hidden;
}

.section-divider::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: var(--primary-gradient);
  transform: skewY(-3deg);
  transform-origin: 100%;
}

/* Enhanced feature cards */
.feature-card-v2 {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: white;
  padding: 2rem;
}

.feature-card-v2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--primary-gradient);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .landing-page {
    overflow-x: hidden;
  }
  
  section {
    padding: 3rem 0;
    overflow: hidden;
  }
  
  .hero-section {
    min-height: 80vh;
    padding: 2rem 0;
  }
  
  .hero-img {
    transform: none;
    margin-top: 2rem;
  }
  
  .feature-icon {
    width: 40px;
    height: 40px;
  }
  
  .vertical-timeline::before {
    left: 30px;
  }
  
  .timeline-item {
    flex-direction: row !important;
    margin-left: 30px;
  }
  
  .timeline-content {
    flex: 0 1 calc(100% - 60px);
  }
  
  .timeline-dot {
    margin: 0 1rem;
  }
  
  .timeline-dot::before {
    width: 1rem;
  }
  
  .section-divider {
    height: 50px;
  }
  
  .navbar {
    padding: 0.5rem 0;
  }
  
  .container {
    padding: 0 10px;
  }
}

@media (max-width: 576px) {
  .hero-section {
    min-height: 70vh;
    padding: 1rem 0;
  }
  
  .hero-title {
    font-size: 2rem !important;
  }
  
  .display-5 {
    font-size: 2.5rem !important;
  }
  
  .section-spacing {
    padding: 2rem 0;
  }
  
  .floating-card {
    display: none;
  }
  
  .hero-image-wrapper {
    margin-top: 2rem;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}

/* Additional fixes for layout consistency */
.row {
  margin: 0;
}

.col-lg-6, .col-md-6, .col-6 {
  padding: 0 15px;
}

/* Fix for any remaining overflow issues */
* {
  box-sizing: border-box;
}

.landing-page * {
  max-width: 100%;
}

/* Ensure proper text wrapping */
.hero-text, .lead {
  word-wrap: break-word;
  overflow-wrap: break-word;
}
