/* ==============================
   EMS – STABLE VERSION
   (upgrade2025 pattern)
============================== */

.ems{
  padding: 64px 24px;
  background-image: url(https://www.avalontec.com/wp-content/uploads/sites/8/2026/images/background-bg1.jpg);
}

.section-inner{
  max-width: 1360px;
  margin: 0 auto;
}

.section-kicker{letter-spacing: normal;
  font-size: 34px;
  font-weight: 600;
  color: #0a3a8d;
}

.section-title{
	letter-spacing: normal;
  font-size: 26px;
  margin-bottom: 32px;
  color: #111827;
}

/* CARD */
.ems-card{
  position: relative;
}

.ems-left{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #020617;
}

/* NAV */
.ems-nav{
  position: absolute;
  left: 32px;
  top: 32px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ems-nav-item{
  background: none;
  border: none;
  color: #e5e7eb;
  font-size: 16px;
  cursor: pointer;
  opacity: .75;
  display: flex;
  align-items: center;
  gap: 10px;
}



/* SLIDES */
.ems-slides{
  position: relative;
  height: 460px;
}

.ems-slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .95s ease;
}

.ems-slide.active{
  opacity: 1;
  pointer-events: auto;
}

/* IMAGE */
.ems-slide-bg{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* OVERLAY */
.ems-gradient{
  position: absolute;
  inset: 0;
    background: linear-gradient(to right, rgb(7 38 112 / 51%) 0%, rgb(15 23 42 / 39%) 28%, rgb(34 58 113 / 24%) 50%, #4a020263 85%);
  pointer-events: none;
}

/* CONTENT */
.ems-content{
  position: absolute;
  right: 42px;
  bottom:0;
  transform: translateY(-30%);
  max-width: 420px;
  color: #f9fafb;
  z-index: 3;
}

.ems-content h3{
font-size: 22px !important; color: #f9fafb;
    margin-bottom: 2px;
    text-align: left;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35), 0 6px 18px rgba(0, 0, 0, 0.25);
}

.ems-content p{
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #e5e7eb;
  margin-bottom: 16px; text-align: left;
}

/* CTA */
.ems-cta{
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 13px;
  background: linear-gradient(90deg,#e53935,#0a3a8d);
}


.ems-line {
  position: relative;
  width: 16px;
  height: 2px;
  background: rgba(209, 213, 219, 0.45);
  border-radius: 999px;
  display: inline-block;
  transition: background 0.25s ease, width 0.25s ease;
}
.ems-line::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(209, 213, 219, 0.9);
  transform: translateY(-50%);
  transition: background 0.25s ease, transform 0.25s ease;
}

.ems-line::after {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #0b1f3a; /* dark core like PCB hole */
  transform: translateY(-50%);
}

 .ems-nav-item {
      background: none;
      border: none;
      padding: 3px 0;
      display: flex;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      font-size: 16px;
      color: #fff;
      font-weight: 400;
      opacity: 0.85;
      transition: color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
    }

.mrg14{margin-left: 40px;}


/* a BUTTON EFFECT COMMON) */


.av-btn{
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 23px;
    margin: 10px 0;
    border-radius: 30px;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    letter-spacing: .4px;
    background: linear-gradient(90deg, rgba(242, 7, 7, 1) 0%, rgba(20, 6, 184, 1) 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15,23,42,.35);
    transition:
      transform .45s cubic-bezier(.4,0,.2,1),
      box-shadow .45s ease,
      color .3s ease;
    transform: translateZ(0);
	gap: 8px;
  }

  /* Keep text always on top */
  .av-btn > span{
    position: relative;
    z-index: 3;
  }

  /* Pseudo layers (must be positioned for z-index to work) */
  .av-btn::before,
  .av-btn::after{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
  }

  /* FLOWING GRADIENT LAYER (behind text) */
  .av-btn::before{
    inset:-120%;
    background: linear-gradient(120deg,
      #15438e,
      #e53935,
      #15438e,
      #0c274f
    );
    background-size: 300% 300%;
    opacity: 0;
    z-index: 1;
    transition: opacity .35s ease;
  }

  /* RIPPLE LAYER (above flow, still behind text) */
  .av-btn::after{
    background: radial-gradient(circle,
      rgba(255,255,255,.40) 0%,
      rgba(255,255,255,0) 60%);
    opacity: 0;
    transform: scale(.6);
    z-index: 2;
    transition: .35s ease;
  }

  /* HOVER */
  .av-btn:hover{
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.75);
    color:#fff;
  }

  .av-btn:hover::before{
    opacity: 1;
    animation: avGradientFlow 2.2s linear infinite;
  }

  .av-btn:hover::after{
    opacity: .6;
    transform: scale(1.4);
  }

  /* GRADIENT ANIMATION */
  @keyframes avGradientFlow{
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }

  .ems-nav-item.active {
      color: #fbbf24;
      font-weight: 600;
      opacity: 1;
    }

    .ems-nav-item.active .ems-line {
  width: 20px;
  background: #fbbf24;
    }
.ems-nav-item.active .ems-line::before {
  background: #fbbf24;
  transform: translateY(-50%) scale(1.2);
}

@media (max-width: 640px) {
	.ems .section-kicker{letter-spacing: normal;font-size: 32px;font-weight: 600;color: #0a3a8d;line-height: 44px;}
	.ems .section-title{line-height: normal;}
	.av-btn{padding: 3px 12px;}
	.ems-content p {
  font-size: 12px !important;
  line-height: 1.4 !important;
  color: #e5e7eb;
  margin-bottom: 16px;
  text-align: left;
}
	.ems-content h3{line-height: normal;font-size: 20px !important;}
	.ems-nav-item{gap: 5px;font-size: 15px;}
    .ems-nav {
        flex-direction: column;
        align-items: flex-start;
        top: 20px;
        left: 17px;
        transform: none;
        gap: 2px;
    }
	    .ems-content {
        right: 2px;
        left: unset;
        transform: translateY(0);
        top: auto;
        bottom: 40px;
        max-width: 172px;
        align-items: self-end;
    }
	.ems-nav-item.active .ems-line {width: 13px;background: #fbbf24;}
	.mrg14 {margin-left: 20px;}
}
