.gradient-bg{
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 500px at 20% 10%, rgba(255,255,255,0.18), rgba(255,255,255,0) 60%),
              radial-gradient(900px 600px at 90% 30%, rgba(255,255,255,0.14), rgba(255,255,255,0) 55%),
              linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

.hero-animation::before,
.hero-animation::after{
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.18), rgba(255,255,255,0) 55%);
  transform: translate3d(0,0,0);
  pointer-events: none;
}

.hero-animation::after{
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.14), rgba(255,255,255,0) 55%);
  mix-blend-mode: overlay;
  opacity: 0.9;
}

@media (prefers-reduced-motion: no-preference){
  .hero-animation::before{
    animation: ak-hero-drift-1 14s ease-in-out infinite alternate;
  }
  .hero-animation::after{
    animation: ak-hero-drift-2 18s ease-in-out infinite alternate;
  }
}

@keyframes ak-hero-drift-1{
  from{ transform: translate3d(-2%, -1%, 0) rotate(-1deg); }
  to{ transform: translate3d(2%, 1%, 0) rotate(1deg); }
}

@keyframes ak-hero-drift-2{
  from{ transform: translate3d(2%, -1%, 0) rotate(1deg); }
  to{ transform: translate3d(-2%, 1%, 0) rotate(-1deg); }
}

.floating{
  display: inline-block;
  transform: translateZ(0);
}

@media (prefers-reduced-motion: no-preference){
  .floating{
    animation: ak-float 3.2s ease-in-out infinite;
  }
}

@keyframes ak-float{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-10px); }
}

.number-badge{
  position: absolute;
  top: -10px;
  right: -12px;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #1d4ed8;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.scenario-container{
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  transition: transform 220ms ease, box-shadow 220ms ease;
  will-change: transform;
}

@media (hover: hover) and (pointer: fine){
  .scenario-container:hover{
    transform: translateY(-4px);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  }
}

.scenario-overlay{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: linear-gradient(180deg, rgba(2,6,23,0) 20%, rgba(2,6,23,0.68) 100%);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine){
  .scenario-container:hover .scenario-overlay,
  .scenario-container:focus-within .scenario-overlay{
    opacity: 1;
    transform: translateY(0);
  }
}

.scenario-container.is-active .scenario-overlay{
  opacity: 1;
  transform: translateY(0);
}

.document-flow{
  position: relative;
}

.flow-line{
  display: none;
}

@media (min-width: 768px){
  .flow-line{
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 56%;
    height: 4px;
    background: linear-gradient(90deg, rgba(37,99,235,0), rgba(37,99,235,0.35), rgba(124,58,237,0.35), rgba(124,58,237,0));
    border-radius: 999px;
    filter: blur(0.1px);
    opacity: 0.9;
    pointer-events: none;
  }
}

.step-card{
  border-radius: 16px;
  transition: transform 220ms ease, box-shadow 220ms ease;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.10);
}

@media (hover: hover) and (pointer: fine){
  .step-card:hover{
    transform: translateY(-4px);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  }
}

.step-icon{
  box-shadow: inset 0 0 0 1px rgba(37,99,235,0.18);
}

.document-types-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 768px){
  .document-types-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1024px){
  .document-types-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

.document-type-card{
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 16px;
  transition: transform 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

@media (hover: hover) and (pointer: fine){
  .document-type-card:hover{
    transform: translateY(-4px);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
    background: rgba(255,255,255,0.95);
  }
}

.document-type-icon{
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(124,58,237,0.12));
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,0.14);
}

.document-type-title{
  margin-top: 12px;
  margin-bottom: 4px;
  font-weight: 800;
  color: #0f172a;
}

.document-type-subtitle{
  margin: 0;
  color: rgba(15, 23, 42, 0.72);
  font-size: 0.95rem;
  line-height: 1.35;
}

.hover-lift{
  transition: transform 220ms ease, box-shadow 220ms ease;
  will-change: transform;
}

@media (hover: hover) and (pointer: fine){
  .hover-lift:hover{
    transform: translateY(-4px);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
  }
}

.testimonial-card{
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition: transform 220ms ease, box-shadow 220ms ease;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
}

@media (hover: hover) and (pointer: fine){
  .testimonial-card:hover{
    transform: translateY(-4px);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  }
}

.reveal-on-scroll{
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal-on-scroll.is-visible{
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce){
  .reveal-on-scroll{
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Better pricing card alignment */
@media (min-width: 768px) {
    .pricing-card-content {
        min-height: 380px;
        display: flex;
        flex-direction: column;
    }
    
    .pricing-card-content .pricing-features {
        flex-grow: 1;
    }
    
    /* Ensure buttons align at bottom */
    .pricing-card-content .pricing-button {
        margin-top: auto;
    }
}

/* Fix for badge visibility */
.premium-card-badge {
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Mobile language switcher fix */
@media (max-width: 768px) {
    .language-switcher-mobile {
        display: block !important;
    }
    
    .language-switcher-desktop {
        display: none;
    }
}