/**
 * DigiFixer.in - Modern Hero Styles
 * Author: Ravi Shandilya
 * Version: 1.0
 * Updated: June 2, 2025
 * Compatible with Chrome 136+, Android 13+
 */

/* Modern Hero Section Styles with Chrome 136+ and Android 13+ compatibility */
.section.hero.modern-hero, section.hero.modern-hero, .modern-hero {
  position: relative;
  padding-top: calc(var(--header-height, 80px) + 3rem);
  padding-bottom: 6rem;
  overflow: hidden;
  background-color: #0f172a !important; /* Dark background for contrast */
  background-image: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  -webkit-background-image: -webkit-linear-gradient(315deg, #0f172a 0%, #1e293b 100%) !important;
  color: #fff;
  z-index: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  
  background-blend-mode: multiply;
  overflow-anchor: none; /* prevent scroll jump */
}

/* Thunderstorm Background Effects */
.hero-background-effects {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1; /* Behind content */
}

.hero-content {
  position: relative;
  z-index: 2; /* Above effects */
}

/* Lightning */
.lightning {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 60%);
  opacity: 0;
  animation: lightning-flash 7s infinite linear;
  -webkit-animation: lightning-flash 7s infinite linear;
  will-change: opacity, transform;
}

/* Clouds */
/* Realistic CSS Clouds with Blurred Pseudo-Elements */
.cloud {
  position: absolute;
  width: 200px;
  height: 60px;
  background: rgba(255, 255, 255, 0.15); /* Base of the cloud */
  border-radius: 100px;
  filter: blur(5px); /* Soften the entire shape */
  -webkit-filter: blur(5px);
  opacity: 0.6;
  animation: drift 60s infinite linear;
  -webkit-animation: drift 60s infinite linear;
  will-change: transform, opacity, filter;
  transform: translateZ(0);
}

.cloud:before, .cloud:after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  z-index: -1; /* Place behind the main cloud body */
}

.cloud:before {
  width: 100px;
  height: 100px;
  top: -50px;
  left: 25px;
}

.cloud:after {
  width: 120px;
  height: 120px;
  top: -60px;
  right: 15px;
}

.cloud-1 {
  top: 10%;
  left: -20%;
  transform: scale(0.8);
  animation-duration: 55s;
}

.cloud-2 {
  top: 25%;
  left: -30%;
  transform: scale(1.1);
  animation-duration: 70s;
  animation-delay: -15s;
}

.cloud-3 {
  bottom: 10%;
  left: -25%;
  transform: scale(0.9);
  animation-duration: 65s;
  animation-delay: -30s;
}

/* Rain */
.rain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: 100%;
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4));
  animation: fall 1s infinite linear;
  -webkit-animation: fall 1s infinite linear;
  will-change: transform, opacity;
  transform: translateZ(0);
}

/* Remove default .hero background circles */
.modern-hero::before,
.modern-hero::after{
  content:none !important;
  display:none !important;
}

/* Background shapes and animations */
.hero-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-animation: float 15s infinite ease-in-out;
  animation: float 15s infinite ease-in-out;
  will-change: transform;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.shape-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  right: -50px;
  background: rgba(99, 102, 241, 0.1);
  -webkit-animation-delay: 0s;
  animation-delay: 0s;
}

.shape-2 {
  width: 400px;
  height: 400px;
  bottom: -150px;
  left: -100px;
  background: rgba(245, 158, 11, 0.1);
  -webkit-animation-delay: -5s;
  animation-delay: -5s;
}

.shape-3 {
  width: 200px;
  height: 200px;
  top: 30%;
  left: 10%;
  background: rgba(6, 182, 212, 0.1);
  -webkit-animation-delay: -2s;
  animation-delay: -2s;
}

.shape-4 {
  width: 150px;
  height: 150px;
  top: 20%;
  right: 20%;
  background: rgba(249, 115, 22, 0.1);
  -webkit-animation-delay: -7s;
  animation-delay: -7s;
}

.shape-5 {
  width: 250px;
  height: 250px;
  bottom: 20%;
  right: 10%;
  background: rgba(139, 92, 246, 0.1);
  -webkit-animation-delay: -3s;
  animation-delay: -3s;
}

.gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 70% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  -webkit-background: -webkit-radial-gradient(circle at 70% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  z-index: -1;
}

/* Float animation for shapes */
@-webkit-keyframes float {
  0%, 100% {
    -webkit-transform: translateY(0) translateZ(0);
    transform: translateY(0) translateZ(0);
  }
  50% {
    -webkit-transform: translateY(-20px) translateZ(0);
    transform: translateY(-20px) translateZ(0);
  }
}

@keyframes float {
  0%, 100% {
    -webkit-transform: translateY(0) translateZ(0);
    transform: translateY(0) translateZ(0);
  }
  50% {
    -webkit-transform: translateY(-20px) translateZ(0);
    transform: translateY(-20px) translateZ(0);
  }
}

/* Hero content styles */
.modern-hero .hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
  position: relative;
  z-index: 2;
}

.modern-hero .hero-text {
  max-width: 720px;
  width: 100%;
  padding-right: 0;
}

.modern-hero .hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  color: #fff;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}

.modern-hero .hero-text p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Badge styles */
.badge-container {
  margin-bottom: 1.5rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #818cf8;
}

/* Gradient text */
.gradient-text {
  background: -webkit-linear-gradient(45deg, #818cf8, #06b6d4);
  background: linear-gradient(45deg, #818cf8, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #818cf8; /* Fallback */
  display: inline-block;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}

/* Button styles */
.modern-hero .hero-btns {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 1rem;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.modern-hero .btn {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 8px;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform, background-color;
}

.modern-hero .btn-primary {
  background-color: var(--primary-color, #4f46e5);
  color: white;
  -webkit-box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3), 0 4px 6px -4px rgba(79, 70, 229, 0.3);
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3), 0 4px 6px -4px rgba(79, 70, 229, 0.3);
}

.modern-hero .btn-primary:hover {
  background-color: var(--primary-dark, #3730a3);
  -webkit-transform: translateY(-2px) translateZ(0);
  transform: translateY(-2px) translateZ(0);
}

.modern-hero .btn-primary i {
  -webkit-transition: transform 0.3s ease;
  transition: transform 0.3s ease;
}

.modern-hero .btn-primary:hover i {
  -webkit-transform: translateX(4px);
  transform: translateX(4px);
}

.modern-hero .btn-secondary {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--secondary-color, #f59e0b);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.modern-hero .btn-secondary:hover {
  background-color: rgba(245, 158, 11, 0.2);
  -webkit-transform: translateY(-2px) translateZ(0);
  transform: translateY(-2px) translateZ(0);
}

.modern-hero .btn-outline {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.modern-hero .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  -webkit-transform: translateY(-2px) translateZ(0);
  transform: translateY(-2px) translateZ(0);
}

/* Stats section */
.hero-stats {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 2rem;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.stat-item {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Hero illustration styles */
.hero-illustration{
  flex:1;
  text-align:center;
}
.hero-illustration img{
  width:100%;
  max-width:520px;
  height:auto;
  filter:drop-shadow(0 10px 15px rgba(0,0,0,0.2));
  transform:translateZ(0);
}

/* Hero image styles */
.modern-hero .hero-image {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.modern-hero .hero-slider {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 400px;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}

.modern-hero .hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  -webkit-transition: opacity 0.5s ease, transform 0.5s ease;
  transition: opacity 0.5s ease, transform 0.5s ease;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-transform: scale(0.9) translateZ(0);
  transform: scale(0.9) translateZ(0);
  will-change: opacity, transform;
}

.modern-hero .hero-slide.active {
  opacity: 1;
  -webkit-transform: scale(1) translateZ(0);
  transform: scale(1) translateZ(0);
  z-index: 2;
}

.modern-hero .hero-slide img {
  max-width: 100%;
  max-height: 100%;
  -webkit-filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}

/* Slider dots */
.modern-hero .slider-dots {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.modern-hero .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.modern-hero .dot.active {
  background-color: white;
  -webkit-transform: scale(1.2);
  transform: scale(1.2);
}

/* Additional hero button sizing overrides */
.modern-hero .hero-btns .btn,
.modern-hero .hero-btns .animate-on-click,
.modern-hero .hero-btns a.btn,
.modern-hero .hero-btns a.animate-on-click {
  padding: 13px 38px !important;
  font-size: 1.13rem !important;
  min-height: 48px;
  line-height: 1.2;
  border-radius: 8px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modern-hero .hero-btns .btn {
  padding: 13px 38px !important;
  font-size: 1.13rem !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  min-height: 52px;
  box-sizing: border-box;
}

/* Desktop button alignment */
@media (min-width: 992px){
  .modern-hero .hero-stats{
    justify-content: center;
    text-align: center;
  }

  .modern-hero .hero-btns{
    flex-wrap: wrap; /* allow second row if needed */
    justify-content: center;
    gap: 0.75rem 1rem;
    max-width: 100%;
  }
  .modern-hero .hero-btns .btn{
    white-space: nowrap;
    padding: 12px 28px !important; /* a bit slimmer so more fit */
    font-size: 1.05rem !important;
  }
}

/* Responsive styles */
@media (max-width: 768px) {
  .modern-hero {
    padding-top: calc(var(--header-height, 80px) + 2rem);
    padding-bottom: 4rem;
  }
  
  .modern-hero .hero-content {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    text-align: center;
  }
  
  .modern-hero .hero-text {
    max-width: 100%;
  }
  
  .modern-hero .hero-text h1 {
    font-size: 2.25rem;
  }
  
  .modern-hero .hero-btns {
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
  }
  
  .modern-hero .hero-stats {
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
  }
  
  .modern-hero .hero-slider {
    height: 300px;
    margin-top: 2rem;
  }
  
  .shape-1 {
    width: 200px;
    height: 200px;
  }
  
  .shape-2 {
    width: 250px;
    height: 250px;
  }
}

/* Keyframe Animations - Realistic Version */

/* Realistic Lightning Flash Animation */
@keyframes lightning-flash {
  0%, 97% { 
    opacity: 0; 
  }
  97.1% { 
    opacity: 0.6; 
    transform: scale(1.05); /* Flash ko thoda expand karta hai */
  }
  97.3% { 
    opacity: 0.1; 
  }
  97.5% { 
    opacity: 0.8; 
    transform: scale(1);
  }
  98% { 
    opacity: 0; 
  }
  100% { 
    opacity: 0; 
  }
}

@-webkit-keyframes lightning-flash {
  0%, 97% { 
    opacity: 0; 
  }
  97.1% { 
    opacity: 0.6; 
    -webkit-transform: scale(1.05);
  }
  97.3% { 
    opacity: 0.1; 
  }
  97.5% { 
    opacity: 0.8; 
    -webkit-transform: scale(1);
  }
  98% { 
    opacity: 0; 
  }
  100% { 
    opacity: 0; 
  }
}

/* Realistic Cloud Drift Animation (with perspective) */
@keyframes drift {
  0% { 
    transform: translateX(-20vw) scale(0.95); 
    opacity: 0.7;
  }
  50% {
    transform: translateX(60vw) scale(1.05);
    opacity: 1;
  }
  100% { 
    transform: translateX(120vw) scale(0.9);
    opacity: 0.6;
  }
}

@-webkit-keyframes drift {
  0% { 
    -webkit-transform: translateX(-20vw) scale(0.95); 
    opacity: 0.7;
  }
  50% {
    -webkit-transform: translateX(60vw) scale(1.05);
    opacity: 1;
  }
  100% { 
    -webkit-transform: translateX(120vw) scale(0.9);
    opacity: 0.6;
  }
}

/* Realistic Rain Fall Animation (with wind effect) */
@keyframes fall {
    0% { 
      transform: translateY(-10vh) translateX(0); 
      opacity: 1;
    }
    75% {
      opacity: 1;
    }
    100% { 
      transform: translateY(110vh) translateX(30px); /* Hawa se thoda side mein jaata hai */
      opacity: 0;
    }
}

@-webkit-keyframes fall {
    0% { 
      -webkit-transform: translateY(-10vh) translateX(0); 
      opacity: 1;
    }
    75% {
      opacity: 1;
    }
    100% { 
      -webkit-transform: translateY(110vh) translateX(30px); 
      opacity: 0;
    }
}

/* Dynamic Fade-in Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98) translateZ(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) translateZ(0);
  }
}

@-webkit-keyframes fadeIn {
  from {
    opacity: 0;
    -webkit-transform: translateY(20px) scale(0.98) translateZ(0);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0) scale(1) translateZ(0);
  }
}
