/**
 * Process Flow Manager - Frontend Styles
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.pfm-main-container {
  max-width: 1400px;
  margin: 60px auto;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 280px 40px 50px;
  position: relative;
  overflow: visible;
  min-height: 600px;
}

/* SVG Border Styling */
.pfm-border-svg-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 400px;
  pointer-events: none;
  z-index: 10;
}

.pfm-border-svg-bottom {
  position: absolute;
  top: 360px;
  left: 0;
  width: 100%;
  height: calc(100% - 379px);
  pointer-events: none;
  z-index: 10;
}

/* Process Section */
.pfm-process-section {
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.pfm-process-section:last-child {
  margin-bottom: 0;
}

/* Section Header */
.pfm-section-header {
  background: linear-gradient(135deg, #d4af37 0%, #c89b3c 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 50px;
  display: inline-block;
  font-size: 22px;
  font-weight: 600;
  margin: 0 auto 0px;
  box-shadow: 0 8px 25px rgba(200, 155, 60, 0.3);
  opacity: 0;
  transform: translateY(-30px);
  animation: pfmFadeInDown 0.8s ease forwards;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  letter-spacing: 0.5px;
  z-index: 3;
}

@keyframes pfmFadeInDown {
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Process Flow Container */
.pfm-process-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 10px 20px;
  position: relative;
  overflow: visible;
}

@media (min-width: 1025px) {
  .pfm-process-flow {
    flex-wrap: nowrap;
  }
}

/* Step Container */
.pfm-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  opacity: 0;
  transform: translateY(50px) scale(0.8);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}

.pfm-step.pfm-animate {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.pfm-step:hover {
  z-index: 10001;
}

/* Icon Container */
.pfm-icon-wrapper {
  width: 72px;
  height: 72px;
  background: transparent;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  position: relative;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pfm-icon-wrapper::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  background: linear-gradient(45deg, #c89b3c, #d4af37);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pfm-step:hover .pfm-icon-wrapper {
  transform: scale(1.096);
}

.pfm-step:hover .pfm-icon-wrapper::before {
  opacity: 1;
  animation: pfmRotate 2s linear infinite;
}

@keyframes pfmRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Icon SVG/Image styling */
.pfm-icon-wrapper img,
.pfm-icon-wrapper svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 3px 6px rgba(211, 160, 41, 0.3));
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  object-fit: contain;
}

.pfm-process-icon {
  width: 40px;
  height: 40px;
}

/* Fade in animation for images */
.pfm-step .pfm-icon-wrapper img {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pfm-step.pfm-animate .pfm-icon-wrapper img {
  opacity: 1;
  transform: scale(1);
}

.pfm-step:hover .pfm-icon-wrapper img,
.pfm-step:hover .pfm-icon-wrapper svg {
  transform: scale(1.128);
  filter: brightness(0) invert(1) drop-shadow(0 6px 12px rgba(255, 255, 255, 0.5));
}

.pfm-step:hover .pfm-icon-wrapper img {
  animation: pfmIconFloat 1.5s ease-in-out infinite;
}

@keyframes pfmIconFloat {
  0%, 100% { transform: scale(1.128) translateY(0); }
  50% { transform: scale(1.128) translateY(-8px); }
}

/* Step Label */
.pfm-step-label {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  text-align: center;
  max-width: 88px;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.5s ease 0.3s;
  position: relative;
  z-index: 1;
}

.pfm-step.pfm-animate .pfm-step-label {
  opacity: 1;
}

/* Tooltip on hover */
.pfm-step:hover .pfm-step-label::after {
  content: attr(data-detail);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-95px);
  background: rgba(33, 33, 33, 0.95);
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 1;
  pointer-events: none;
  z-index: 10000;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  margin-bottom: 0;
}

/* Tooltip arrow */
.pfm-step:hover .pfm-step-label::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-89px);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(33, 33, 33, 0.95);
  opacity: 1;
  pointer-events: none;
  z-index: 10000;
  margin-bottom: 0;
}

/* Dashed Arrow Connector */
.pfm-arrow-connector {
  width: 48px;
  height: 3px;
  position: relative;
  opacity: 0;
  transition: opacity 0.5s ease;
  margin-bottom: 24px;
}

.pfm-arrow-connector.pfm-animate {
  opacity: 1;
}

/* Dashed line */
.pfm-arrow-connector::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to right, #c89b3c 50%, transparent 50%);
  background-size: 12px 3px;
  background-repeat: repeat-x;
}

/* Arrow head */
.pfm-arrow-connector::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid #c89b3c;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

/* Animated dot moving along arrow */
.pfm-moving-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #d4af37;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
}

.pfm-arrow-connector.pfm-animate .pfm-moving-dot {
  animation: pfmMoveDot 2s ease-in-out infinite;
}

@keyframes pfmMoveDot {
  0% { left: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}

/* Progress indicator - Removed */

/* Responsive Design */
@media (max-width: 1024px) {
  .pfm-process-flow {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .pfm-main-container {
    padding: 280px 20px 40px;
    min-height: 150vh;
  }

  .pfm-section-header {
    font-size: 18px;
    padding: 8px 16px;
    margin-bottom: 30px;
  }

  .pfm-process-flow {
    flex-direction: column;
    gap: 20px;
  }

  .pfm-arrow-connector {
    transform: rotate(90deg);
    width: 40px;
  }

  .pfm-icon-wrapper {
    width: 80px;
    height: 80px;
  }

  .pfm-icon-wrapper img,
  .pfm-icon-wrapper svg,
  .pfm-process-icon {
    width: 65px;
    height: 65px;
  }

  .pfm-step-label {
    font-size: 12px;
  }
}