/* home.css - Enhanced styles for the home page */

/* Floating back to top circle button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: var(--text-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  transform: translateY(20px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}


.back-to-top:hover {
  background: var(--gradient-secondary);
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

/* Fix container alignment with buttons */
.container {
  position: relative;
  padding: 0;
}

/* Card slider container positioning */
.card-slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 20px 0;
  margin: 0 auto;
}

/* Feature cards slider */
.features-grid {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0 10px;
  gap: 20px;
  margin: 0 auto;
  margin-top: 30px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.features-grid::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Services slider */
.services-grid {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0 10px;
  gap: 20px;
  margin: 0 auto;
  margin-top: 30px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.services-grid::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Navigation buttons aligned with container */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--text-white);
  border: none;
  cursor: pointer;
  display: none; /* Hidden by default, JS will show when needed */
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
  transition: all 0.3s ease;
}

.slider-nav:hover {
  background: var(--accent-color);
  transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
  left: 0;
}

.slider-nav.next {
  right: 0;
}

/* Device compatibility and scaling fixes */
* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prevent horizontal overflow on mobile */
html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* Fix for touch devices */
@media (hover: none) {
  .feature-card:hover,
  .service-card:hover {
    transform: none;
  }
  
  .btn:hover,
  .btn-text:hover {
    transform: none;
  }
  
  .slider-nav:active {
    transform: translateY(-50%) scale(0.95);
  }
}

/* Fix for iOS Safari scrolling */
.features-grid,
.services-grid {
  -webkit-overflow-scrolling: touch;
}

/* Refined color palette */
:root {
  /* Main colors */
  --primary-color: #1e40af;
  --primary-light: #3b82f6;
  --secondary-color: #0f766e;
  --accent-color: #6d28d9;
  --orange-accent: #f97316; /* Added orange as a complementary color */
  --orange-light: #fdba74;
  
  /* Text colors */
  --text-dark: #1e293b;
  --text-medium: #475569;
  --text-light: #94a3b8;
  --text-white: #f8fafc;
  
  /* Background colors */
  --bg-white: #ffffff;
  --bg-light: #f1f5f9;
  --bg-dark: #0f172a;
  --bg-gradient-1: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  --bg-gradient-2: linear-gradient(135deg, var(--secondary-color), var(--primary-light));
  --bg-gradient-3: linear-gradient(135deg, var(--orange-accent), var(--primary-light));
  
  /* UI elements */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08);
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 16px;
}

/* Hero Video Styling */
.hero-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

#hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  object-fit: cover;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(30, 64, 175, 0.85));
  z-index: 1;
}

/* Enhanced Hero Section */
.hero {
  background: none; /* Remove the previous background */
  color: var(--text-white);
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.2;
  z-index: 2;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  text-align: left;
  padding-left: 15px;
  bottom:37px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 25px;
  line-height: 1.2;
  font-weight: 700;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s forwards 0.2s;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 35px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s forwards 0.4s;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s forwards 0.6s;
}

.btn-primary {
  background: var(--bg-gradient-1);
  color: var(--text-white);
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  border: none;
  letter-spacing: 0.3px;
}



.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: var(--orange-accent);
  color: var(--text-white);
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  letter-spacing: 0.3px;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--orange-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Animated wave effect */
.wave-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 2;
}

.wave {
  position: relative;
  display: block;
  width: 100%;
  height: 60px;
}

.wave path {
  fill: var(--bg-white);
}

/* "Why Choose VSRT?" Section */
.features {
  padding: 100px 0 80px;
  position: relative;
  background-color: var(--bg-white);
  z-index: 10; /* Higher z-index to ensure visibility */
}

.features-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px;
  position: relative;
  z-index: 11; /* Even higher z-index for the intro text */
}

.feature-card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius-md);
  padding: 25px 20px;
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  height: auto;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--gradient-orange);
  transition: height 0.5s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(203, 213, 225, 0.3);
}

.feature-card:hover::before {
  height: 100%;
}

.feature-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--gradient-primary);
  color: var(--text-white);
  font-size: 1.5rem;
  position: relative;
  transition: all 0.4s ease;
  box-shadow: 0 10px 15px -3px rgba(30, 64, 175, 0.15);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 1.3rem;
  color: var(--text-dark);
  font-weight: 600;
  position: relative;
  padding-bottom: 10px;
  flex-grow: 0;
}

.feature-card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background-color: var(--orange-accent);
  transition: all 0.3s ease;
}

.feature-card:hover h3::after {
  width: 60px;
  background: var(--gradient-orange);
}

.feature-card p {
  color: var(--text-medium);
  line-height: 1.6;
  margin-top: auto;
  font-size: 0.95rem;
  flex-grow: 1;
}

/* Make section title and subtitle visible */
#why-choose-vsrt .section-title,
#why-choose-vsrt .section-subtitle {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Services Section with Single Row Cards */
.services-preview {
  padding: 100px 0;
  background-color: var(--bg-light);
  position: relative;
}

.services-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%233b82f6' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.services-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px;
  position: relative;
}

.service-card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.4s ease;
  position: relative;
  height: auto;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(203, 213, 225, 0.3);
}

.service-card .service-image {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.service-card .service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
  max-width: 100%;
}

/* Video styling for service cards */
.service-card .service-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
  max-width: 100%;
}

.service-card:hover .service-image img {
  transform: scale(1.05);
}

.service-card:hover .service-image video {
  transform: scale(1.05);
}



.service-card .service-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 40%, rgba(15, 23, 42, 0.8) 100%);
  z-index: 1; /* Ensure gradient appears above the video */
}

.service-card .service-icon {
  position: absolute;
  top: -25px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--gradient-orange);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  z-index: 2; /* Ensure icon stays above the gradient */
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(10deg);
}

.service-card h3 {
  padding: 25px 25px 15px;
  font-size: 1.4rem;
  color: var(--text-dark);
  font-weight: 600;
  flex-grow: 0;
}

.service-card p {
  padding: 0 25px 20px;
  color: var(--text-medium);
  flex-grow: 1;
  line-height: 1.6;
}

.service-card .btn-text {
  padding: 0 25px 25px;
  display: block;
  margin-top: auto;
  color: var(--primary-color);
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

.service-card .btn-text::after {
  content: "→";
  margin-left: 5px;
  transition: all 0.3s ease;
}

.service-card .btn-text:hover::after {
  transform: translateX(5px);
}

.services-cta {
  text-align: center;
  margin-top: 40px;
  position: relative;
}

/* Enhanced CTA Section */
.cta-section {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 64, 175, 0.9)), url('../images/cta-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-white);
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10zm10 8c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm40 40c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-content {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 25px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards 0.2s;

}

.cta-content .btn-primary{
  margin-top: 30px;
}

/* Fix for Safari gap issues */
@supports (-webkit-touch-callout: none) {
  .features-grid > .feature-card + .feature-card,
  .services-grid > .service-card + .service-card {
    margin-left: 20px;
  }
}

/* Ensure card widths work correctly within container */
@media screen and (min-width: 1200px) {
  .feature-card {
    flex: 0 0 calc(25% - 20px);
    min-width: calc(25% - 20px);
    max-width: calc(25% - 20px);
  }
  
  .service-card {
    flex: 0 0 calc(33.333% - 20px);
    min-width: calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
  }

}

@media screen and (min-width: 992px) and (max-width: 1199px) {
  .feature-card {
    flex: 0 0 calc(33.333% - 20px);
    min-width: calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
  }
  
  .service-card {
    flex: 0 0 calc(33.333% - 20px);
    min-width: calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
  }


}

@media screen and (min-width: 400px) and (max-width: 991px) {
  .feature-card {
    flex: 0 0 calc(50% - 20px);
    min-width: calc(50% - 20px);
    max-width: calc(50% - 20px);
  }
  
  .service-card {
    flex: 0 0 calc(50% - 20px);
    min-width: calc(50% - 20px);
    max-width: calc(50% - 20px);
  }
  
  
}

@media screen and (max-width: 767px) {
  .feature-card {
    flex: 0 0 calc(80% - 20px);
    min-width: calc(80% - 20px);
    max-width: calc(80% - 20px);
  }
  
  .service-card {
    flex: 0 0 280px;
    min-width: 280px;
    max-width: 280px;
    width: 280px;
  }
  
  .slider-nav {
    width: 35px;
    height: 35px;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
  }
  
  .btn, 
  .btn-text,
  .nav-links a {
    padding: 12px 20px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }


  .hero-content h1 {
    font-size: 44px;
    
  }
  .hero-content p {
    font-size: 19px;
  }
 
 
}