/* ==========================================
   Jayshree Technosoft understands You
   Premium Semicircle Interactive Section CSS
   ========================================== */

/* Main Section Styles */
.premium-understands-section {
  position: relative;
  background: radial-gradient(circle at right center, rgba(2, 45, 98, 0.02) 0%, rgba(255, 255, 255, 1) 70%);
  padding: 60px 0;
  overflow: hidden;
  font-family: 'Archivo', sans-serif;
}

/* Background Atmosphere */
.section-bg-atmosphere {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.glow-orb-primary {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(239, 49, 57, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
  right: -100px;
  top: 50%;
  transform: translateY(-50%);
}

.glow-orb-secondary {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(2, 45, 98, 0.03) 0%, rgba(255, 255, 255, 0) 70%);
  left: -100px;
  bottom: -100px;
}

/* Content block styling */
.premium-content-block {
  position: relative;
  z-index: 10;
}

.premium-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #ef3139;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 12px;
  padding-left: 15px;
  position: relative;
}

.premium-tag::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef3139;
}

.premium-title {
  font-size: 38px;
  font-weight: 800;
  color: #022d62;
  line-height: 1.25;
  margin-bottom: 15px;
}

.premium-title span {
  color: #ef3139;
  position: relative;
}

.premium-desc {
  font-size: 14.5px;
  color: #5a6e85;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Explore Services Button Custom styling */
.btn-premium-explore {
  background: #022d62;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(2, 45, 98, 0.2);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: inline-flex;
  align-items: center;
  border: none;
}

.btn-premium-explore i {
  transition: transform 0.3s ease;
}

.btn-premium-explore:hover {
  background: #ef3139;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 49, 57, 0.3);
}

.btn-premium-explore:hover i {
  transform: translateX(5px);
}

/* Stats Styling */
.premium-stats-grid {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 25px;
  border-top: 1px solid rgba(2, 45, 98, 0.06);
  padding-top: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: #ef3139;
  line-height: 1.1;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 13px;
  color: #72849a;
  font-weight: 500;
  line-height: 1.2;
}

.stat-divider {
  width: 1px;
  height: 45px;
  background-color: rgba(2, 45, 98, 0.1);
}

/* Active Service Interactive Info Box */
.active-service-info-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(2, 45, 98, 0.06);
  box-shadow: 0 10px 30px rgba(2, 45, 98, 0.03);
  transition: opacity 0.4s ease, transform 0.4s ease;
  position: relative;
  overflow: hidden;
  max-width: 440px;
  opacity: 1;
  transform: translateY(0);
}

.active-service-info-box.fade-out {
  opacity: 0;
  transform: translateY(8px);
}

.active-service-info-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #ef3139;
}

.info-box-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.info-box-icon {
  width: 40px;
  height: 40px;
  background: rgba(239, 49, 57, 0.06);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: all 0.3s ease;
}

.info-box-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.info-box-title {
  font-size: 17px;
  font-weight: 700;
  color: #022d62;
  margin: 0;
  transition: all 0.3s ease;
}

.info-box-desc {
  font-size: 13.5px;
  color: #5a6e85;
  line-height: 1.55;
  margin: 0;
}

/* Semicircular Wheel Layout Styling */
.service-wheel-outer-container {
  width: 100%;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.service-wheel-wrapper {
  width: 500px;
  height: 500px;
  position: relative;
  z-index: 2;
}

/* SVG background lines styles */
.wheel-svg-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.outer-arc-path,
.inner-arc-path,
.wheel-connection-line,
.hub-circle-outer {
  display: none !important;
}

/* Center Hub Style */
.wheel-center-hub {
  position: absolute;
  width: 140px;
  height: 140px;
  left: 360px; /* Hub center position */
  top: 250px;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.hub-circles {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-circle-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 49, 57, 0.12) 0%, rgba(2, 45, 98, 0.04) 50%, rgba(255,255,255,0) 70%);
  z-index: 1;
  pointer-events: none;
  animation: hubPulse 4s infinite alternate ease-in-out;
}

.hub-circle-outer {
  position: absolute;
  width: 190px;
  height: 190px;
  border: 1.5px dashed rgba(2, 45, 98, 0.12);
  border-radius: 50%;
  animation: hubRotateClockwise 45s linear infinite;
  z-index: 2;
  pointer-events: none;
}

.hub-circle-inner {
  position: absolute;
  width: 130px;
  height: 130px;
  background: transparent;
  border: none;
  border-radius: 50%;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  padding: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden; /* clips the video corners */
}

.hub-circle-inner::after {
  display: none;
}

.hub-logo-img, .hub-logo-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none; /* Prevent browser hover overlays like Picture-in-Picture */
}

.wheel-center-hub:hover .hub-circle-inner {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(239, 49, 57, 0.15), inset 0 2px 8px rgba(0,0,0,0.05);
}

.wheel-center-hub:hover .hub-logo-img,
.wheel-center-hub:hover .hub-logo-video {
  transform: scale(1.08);
}

/* Service Nodes */
.wheel-nodes-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

.service-node {
  position: absolute;
  width: 60px;
  height: 60px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 5;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.node-icon-wrap {
  width: 60px;
  height: 60px;
  background: #ffffff;
  border: 2px solid rgba(2, 45, 98, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(2, 45, 98, 0.04);
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  padding: 14px;
  position: relative;
  z-index: 2;
}

.node-icon-wrap::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 49, 57, 0.1) 0%, rgba(255,255,255,0) 80%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.node-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.65;
  transition: all 0.35s ease;
}

/* Text label side formatting */
.node-label {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  margin-right: 14px;
  text-align: right;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: #5a6e85;
  background: #ffffff;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(2, 45, 98, 0.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease, border-color 0.3s ease;
  pointer-events: none;
  font-family: 'Archivo', sans-serif;
  opacity: 0; /* JS will drive the opacity dynamically */
}

/* Node hover & active state styling */
.service-node.active, .service-node:hover {
  z-index: 20;
}

/* Base Active Pulse Animation */
@keyframes activePulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 49, 57, 0.25), 0 8px 24px rgba(239, 49, 57, 0.15); }
  70% { box-shadow: 0 0 0 10px rgba(239, 49, 57, 0), 0 8px 24px rgba(239, 49, 57, 0.15); }
  100% { box-shadow: 0 0 0 0 rgba(239, 49, 57, 0), 0 8px 24px rgba(239, 49, 57, 0.15); }
}

.service-node.active .node-icon-wrap {
  transform: scale(1.15);
  border-color: #ef3139;
  animation: activePulse 2.2s infinite ease-in-out;
}

.service-node:hover .node-icon-wrap {
  transform: scale(1.18) translateX(-4px) !important;
  border-color: #ef3139;
  box-shadow: 0 10px 25px rgba(239, 49, 57, 0.22);
  animation: none; /* stop pulse during direct hover interaction */
}

.service-node.active .node-icon-wrap::after, .service-node:hover .node-icon-wrap::after {
  opacity: 1;
}

.service-node.active .node-icon-img, .service-node:hover .node-icon-img {
  opacity: 1;
  transform: scale(1.05);
}

.service-node.active .node-label, .service-node:hover .node-label {
  color: #ef3139;
  border-color: rgba(239, 49, 57, 0.15);
  box-shadow: 0 6px 18px rgba(239, 49, 57, 0.08);
  font-weight: 700;
  transform: translateY(-50%) translateX(0);
}

/* Animations */
@keyframes hubPulse {
  0% { transform: translate(-50%, -50%) scale(0.96); opacity: 0.85; }
  100% { transform: translate(-50%, -50%) scale(1.04); opacity: 1.15; }
}

@keyframes hubRotateClockwise {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes strokeRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

@keyframes laserFlow {
  to {
    stroke-dashoffset: -15;
  }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .premium-title {
    font-size: 38px;
  }
}

@media (max-width: 991.98px) {
  /* ── Section & Spacing ── */
  .premium-understands-section {
    padding: 40px 0 30px;
  }

  /* ── Typography ── */
  .premium-title {
    font-size: 28px;
    text-align: center;
    margin-bottom: 8px;
  }
  .premium-tag {
    text-align: center;
    display: block;
    margin-bottom: 6px;
  }
  .premium-tag::before {
    display: none;
  }

  /* ── Hide verbose content on mobile ── */
  .premium-desc {
    display: none;
  }
  .premium-cta-wrap {
    display: none;
  }

  /* ── Stats: single compact row ── */
  .premium-stats-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    gap: 16px !important;
    margin-top: 10px !important;
    padding-top: 10px !important;
    border-top: 1px solid rgba(2,45,98,0.06) !important;
  }
  .stat-divider {
    display: block !important;
    width: 1px !important;
    height: 28px !important;
    align-self: center !important;
    background-color: rgba(2, 45, 98, 0.1) !important;
  }
  .stat-item {
    width: auto !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    text-align: center !important;
  }
  .stat-num {
    font-size: 22px !important;
    margin-bottom: 1px !important;
  }
  .stat-label {
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  /* ── Desktop info box hidden; mobile info box shown below wheel ── */
  .premium-content-block .active-service-info-box {
    display: none !important;
  }
  .active-service-info-box.mobile-info-box {
    display: block !important;
    margin: 12px auto 0;
    max-width: 440px;
    width: calc(100% - 32px);
    padding: 12px 14px;
    box-shadow: 0 4px 16px rgba(2, 45, 98, 0.07);
  }
  .active-service-info-box.mobile-info-box .info-box-title {
    font-size: 14px;
  }
  .active-service-info-box.mobile-info-box .info-box-desc {
    font-size: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .active-service-info-box.mobile-info-box .info-box-icon {
    width: 32px;
    height: 32px;
    padding: 6px;
  }

  /* ── Wheel container ── */
  .service-wheel-outer-container {
    height: auto;
    min-height: 340px;
    margin-top: 16px;
    overflow: hidden;
  }

  /* ── Hub scaling ── */
  .wheel-center-hub { width: 110px; height: 110px; }
  .hub-circle-outer { width: 122px; height: 122px; }
  .hub-circle-inner { width: 105px; height: 105px; padding: 0; }
  .hub-circle-glow  { width: 155px; height: 155px; }

  /* ── Node scaling ── */
  .service-node    { width: 52px; height: 52px; }
  .node-icon-wrap  { width: 52px; height: 52px; padding: 11px; }

  /* ── Left column spacing ── */
  .col-lg-5.mb-5.mb-lg-0 {
    margin-bottom: 0 !important;
  }
}

@media (max-width: 767.98px) {
  /* Hide node labels on small screens */
  .node-label { display: none !important; }
}

@media (max-width: 575.98px) {
  /* ── Tighter section padding ── */
  .premium-understands-section {
    padding: 28px 0 20px;
  }
  .premium-understands-section .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* ── Title even smaller ── */
  .premium-title {
    font-size: 24px !important;
  }

  /* ── Stats tighter ── */
  .stat-num   { font-size: 18px !important; }
  .stat-label { font-size: 10px !important; }
  .premium-stats-grid { gap: 10px !important; }

  /* ── Wheel full width ── */
  .service-wheel-outer-container {
    width: 100%;
    margin-left: 0;
    height: auto;
    min-height: 280px;
    margin-top: 10px;
  }

  /* ── Hub ── */
  .wheel-center-hub { width: 80px; height: 80px; }
  .hub-circle-outer { width: 90px;  height: 90px; }
  .hub-circle-inner { width: 80px;  height: 80px; padding: 0; }
  .hub-circle-glow  { width: 115px; height: 115px; }

  /* ── Nodes ── */
  .service-node   { width: 44px; height: 44px; }
  .node-icon-wrap { width: 44px; height: 44px; padding: 9px; }

  /* ── Mobile info box ── */
  .active-service-info-box.mobile-info-box {
    width: calc(100% - 24px) !important;
    padding: 10px 12px !important;
    margin: 8px auto 0 !important;
  }
}
