/* =========================
   CHATBOT API SECTION
========================= */

.chatbot-section{
  position: relative;

  padding: 130px 20px;

  background:
    linear-gradient(
      to bottom,
      #ffffff,
      #f7fbff
    );

  overflow: hidden;
}

/* BLUR */

.chatbot-blur{
  position: absolute;

  border-radius: 50%;

  filter: blur(90px);

  animation:
    floatBlur 8s ease-in-out infinite;
}

.chatbot-blur-1{
  width: 300px;
  height: 300px;

  background:
    rgba(0,140,255,0.12);

  top: -80px;
  left: -100px;
}

.chatbot-blur-2{
  width: 260px;
  height: 260px;

  background:
    rgba(0,255,180,0.10);

  bottom: -80px;
  right: -100px;
}

/* TOP */

.chatbot-top{
  position: relative;
  z-index: 2;

  max-width: 950px;

  margin:
    0 auto 80px;

  text-align: center;

  animation:
    fadeUp 1s ease-in-out;
}

.chatbot-badge{
  display: inline-block;

  padding: 12px 24px;

  border-radius: 100px;

  background:
    rgba(0,140,255,0.08);

  color:
    #ff0000;

  border:
    1px solid rgba(0,140,255,0.12);

  font-size: 14px;
  font-weight: 600;

  margin-bottom: 24px;

  transition:
    all 0.45s ease-in-out;
}

.chatbot-badge:hover{
  transform:
    translateY(-5px);
}

.chatbot-top h2{
  font-size:
    clamp(42px,6vw,74px);

  line-height: 1.1;

  color:
    #111;

  margin-bottom: 24px;

  font-weight: 800;
}

.chatbot-top h2 span{
  background:
    linear-gradient(
      90deg,
      #ff0008,
      #a60606
    );

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.chatbot-top p{
  font-size: 18px;
  line-height: 1.9;

  color:
    #666;
}

/* MAIN GRID */

.chatbot-grid{
  position: relative;
  z-index: 2;

  display: grid;
  grid-template-columns: 1.1fr 1fr;

  gap: 35px;

  margin-bottom: 90px;
}

/* MAIN CARD */

.chatbot-main-card{
  position: relative;

  min-height: 650px;

  border-radius: 40px;

  overflow: hidden;

  background:
    linear-gradient(
      135deg,
      #061120,
      #0b1e35
    );

  box-shadow:
    0 30px 70px rgba(0,0,0,0.08);
}

/* API LINE */

.api-line{
  position: absolute;

  background:
    linear-gradient(
      to right,
      transparent,
      rgba(255, 0, 0, 0.8),
      transparent
    );

  height: 2px;

  animation:
    apiMove 4s linear infinite;
}

.api-line-1{
  width: 300px;
  top: 120px;
  left: -200px;
}

.api-line-2{
  width: 260px;
  top: 260px;
  right: -200px;
}

.api-line-3{
  width: 320px;
  bottom: 160px;
  left: -220px;
}

/* PHONE */

.chatbot-phone{
  position: absolute;

  left: 50%;
  top: 50%;

  transform:
    translate(-50%,-50%);

  width: 290px;
  height: 560px;

  border-radius: 40px;

  background:
    #101010;

  padding: 14px;

  box-shadow:
    0 30px 70px rgba(0,0,0,0.35);

  animation:
    phoneFloat 5s ease-in-out infinite;
}

.phone-top{
  width: 110px;
  height: 24px;

  border-radius: 0 0 18px 18px;

  background:
    #000;

  margin:
    0 auto 15px;
}

.chat-screen{
  width: 100%;
  height: calc(100% - 40px);

  border-radius: 28px;

  background:
    url("https://i.imgur.com/6Iej2c3.png");

  background-size: cover;

  padding: 24px 16px;

  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* MESSAGE */

.chat-msg{
  max-width: 85%;

  padding: 14px 18px;

  border-radius: 18px;

  font-size: 14px;
  line-height: 1.6;

  animation:
    popupFloat 4s ease-in-out infinite;
}

.left-msg{
  background:
    white;

  color:
    #111;

  align-self: flex-start;
}

.right-msg{
  background:
    #00a884;

  color:
    white;

  align-self: flex-end;
}

/* POPUP */

.api-popup{
  position: absolute;

  padding: 14px 20px;

  border-radius: 18px;

  background:
    rgba(255,255,255,0.10);

  backdrop-filter: blur(12px);

  color: white;

  border:
    1px solid rgba(255,255,255,0.10);

  font-size: 14px;
  font-weight: 600;

  animation:
    popupFloat 4s ease-in-out infinite;
}

.popup-api-1{
  top: 100px;
  left: 40px;
}

.popup-api-2{
  top: 180px;
  right: 40px;
}

.popup-api-3{
  bottom: 180px;
  left: 40px;
}

.popup-api-4{
  bottom: 110px;
  right: 50px;
}

/* SERVICES */

.chatbot-services{
  display: grid;

  grid-template-columns:
    repeat(2,1fr);

  gap: 24px;
}

/* CARD */

.chatbot-card{
  position: relative;

  padding: 34px 28px;

  border-radius: 30px;

  background:
    rgba(255,255,255,0.92);

  border:
    1px solid rgba(0,0,0,0.06);

  overflow: hidden;

  box-shadow:
    0 18px 40px rgba(0,0,0,0.05);

  transition:
    all 0.5s ease-in-out;
}

.chatbot-card:hover{
  transform:
    translateY(-12px)
    scale(1.02);

  box-shadow:
    0 30px 60px rgba(0,140,255,0.12);
}

.chatbot-icon{
  width: 78px;
  height: 78px;

  border-radius: 24px;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    linear-gradient(
      135deg,
      #ff0000,
      #c82718
    );

  color: white;

  font-size: 32px;

  margin-bottom: 24px;

  transition:
    all 0.45s ease-in-out;
}

.chatbot-card:hover .chatbot-icon{
  transform:
    rotate(8deg)
    scale(1.08);
}

.chatbot-card h3{
  font-size: 28px;

  line-height: 1.3;

  color:
    #111;

  margin-bottom: 14px;
}

.chatbot-card p{
  color:
    #666;

  line-height: 1.8;
}

/* CTA */

.chatbot-cta{
  position: relative;

  padding: 80px 40px;

  border-radius: 42px;

  overflow: hidden;

  text-align: center;

  color: white;

  background:
    linear-gradient(
      135deg,
      #ff0000,
      #ab0600
    );

  box-shadow:
    0 25px 70px rgba(0,110,255,0.18);
}

.cta-api-glow{
  position: absolute;

  width: 420px;
  height: 420px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(255,255,255,0.18),
      transparent 70%
    );

  top: -140px;
  right: -120px;
}

.chatbot-cta h3{
  position: relative;
  z-index: 2;

  font-size:
    clamp(36px,5vw,58px);

  line-height: 1.2;

  margin-bottom: 20px;
}

.chatbot-cta p{
  position: relative;
  z-index: 2;

  max-width: 700px;

  margin:
    0 auto 35px;

  color:
    rgba(255,255,255,0.82);

  line-height: 1.8;

  font-size: 17px;
}

/* BUTTON */

.chatbot-btn{
  position: relative;
  z-index: 2;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 12px;

  padding: 18px 38px;

  border-radius: 100px;

  background:
    white;

  color:
    #ff0000;

  text-decoration: none;

  font-size: 17px;
  font-weight: 700;

  transition:
    all 0.45s ease-in-out;
}

.chatbot-btn:hover{
  transform:
    translateY(-6px)
    scale(1.04);
}

/* ANIMATION */

@keyframes fadeUp{

  from{
    opacity: 0;
    transform: translateY(40px);
  }

  to{
    opacity: 1;
    transform: translateY(0);
  }

}

@keyframes popupFloat{

  0%{
    transform: translateY(0);
  }

  50%{
    transform: translateY(-10px);
  }

  100%{
    transform: translateY(0);
  }

}

@keyframes phoneFloat{

  0%{
    transform: translate(-50%,-50%);
  }

  50%{
    transform: translate(-50%,-53%);
  }

  100%{
    transform: translate(-50%,-50%);
  }

}

@keyframes apiMove{

  from{
    transform: translateX(0);
    opacity: 0;
  }

  50%{
    opacity: 1;
  }

  to{
    transform: translateX(400px);
    opacity: 0;
  }

}

@keyframes floatBlur{

  0%{
    transform: translateY(0);
  }

  50%{
    transform: translateY(25px);
  }

  100%{
    transform: translateY(0);
  }

}

/* RESPONSIVE */

@media(max-width:1100px){

  .chatbot-grid{
    grid-template-columns: 1fr;
  }

}

@media(max-width:768px){

  .chatbot-section{
    padding: 90px 18px;
  }

  .chatbot-top h2{
    font-size: 42px;
  }

  .chatbot-services{
    grid-template-columns: 1fr;
  }

  .chatbot-main-card{
    min-height: 700px;
  }

  .chatbot-phone{
    width: 250px;
    height: 500px;
  }

  .chatbot-cta{
    padding: 60px 24px;
  }

}

@media(max-width:480px){

  .api-popup{
    font-size: 12px;
    padding: 12px 14px;
  }

  .popup-api-1{
    left: 15px;
  }

  .popup-api-2{
    right: 15px;
  }

  .popup-api-3{
    left: 15px;
  }

  .popup-api-4{
    right: 15px;
  }

  .chatbot-btn{
    width: 100%;
  }

}

.chatbot-card{
  text-decoration:none;
  color:inherit;
  display:block;
}