/* ========================================
   Author: Hassan Moaiery
   Email:  h.moaiery@gmail.com
   Phone:  +98 912 290 2832
   Project: Iran Textile Market - Frontend Redesign
   Date: 2025/12/01
======================================== */
:root {
  --primary-red: #e9c46a;
  --primary-green-bg: rgb(176, 218, 213);
  --primary-green-border: #cdddac;
  --text-dark: #151125;
  --title-green: #21867a;
  --transition-speed: 0.4s;
}
/* Main Container */
.feature-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  min-height: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main-title {
  text-align: center;
  color: var(--title-green);
  font-size: 1.8rem;
  margin-bottom: 11rem;
  line-height: 1.5;
  max-width: 800px;
}

.main-title span {
  border-bottom: 3px solid var(--primary-red);
  padding-bottom: 5px;
}

/* Circular Layout Wrapper */
.circle-wrapper {
  position: relative;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  /* border: 1px dashed #eee; Debugging */
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.outer-radius {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 1px solid var(--title-green);
}

/* Central Circle */
.center-circle {
  width: 240px;
  height: 240px;
  background-color: var(--primary-green-bg);
  border: 5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 10;
  transition: transform 0.3s ease;
}

.center-circle h2 {
  font-size: 1.4rem;
  color: #1a3d13;
  padding: 20px;
  line-height: 1.6;
}

/* Pointer */
.pointer-track {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%; /* Matches center circle width relative context? No, slightly larger */
  height: 100%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 11;
  transition: transform var(--transition-speed)
    cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pointer-arrow {
  position: absolute;
  top: -15px; /* Adjust based on exact position */
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 20px solid var(--primary-green-bg); /* Arrow color */
  filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, 0.05));
}

/* Feature Items */
.feature-item {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  width: auto;
}

/* Icon Circle */
.icon-circle {
  width: 90px;
  height: 90px;
  background-color: #fff;
  border: 2px solid #eee;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: var(--primary-red);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  z-index: 5;
}

.icon-circle i {
  fill: var(--primary-red);
  transition: fill 0.3s ease;
}

/* Hover Effects */
.feature-item:hover .icon-circle,
.feature-item.active .icon-circle {
  background-color: var(--primary-red);
  border-color: var(--primary-red);
  box-shadow: 0 0 0 8px rgba(219, 216, 58, 0.2);
  transform: scale(1.1);
  color: #fff;
}

.feature-item:hover .icon-circle i,
.feature-item.active .icon-circle i {
  fill: #fff;
}

/* Content Box */
.content-box {
  position: absolute;
  width: 250px;
  padding: 10px;
  opacity: 1; /* Always visible based on design, or modify to fade */
}

/* Positioning Content based on Location */
.content-box h3 {
  color: var(--primary-red);
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.content-box ul {
  list-style: none;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
}

.content-box ul li {
  position: relative;
  padding-right: 12px;
  margin-bottom: 4px;
}

.content-box ul li::before {
  content: "•";
  color: var(--primary-red);
  position: absolute;
  right: 0;
  font-weight: bold;
}

/* Multi-column for long lists */
.content-box.multi-col ul {
  column-count: 2;
  column-gap: 20px;
}

/* Individual Positions (Desktop) */
/* Using translate from center logic or simple top/left/right/bottom percentages */

/* 1. Top - Distributors */
.item-top {
  top: 3%;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column;
}
.item-top .content-box {
  bottom: 110px; /* Above the icon */
  text-align: center;
  width: 300px;
}
.item-top .content-box ul {
  display: inline-block;
  text-align: right;
} /* Align text RTL inside centered box */

/* 2. Top Right - Retailers */
.item-top-right {
  top: 15%;
  right: 0%;
  flex-direction: row;
}
.item-top-right .content-box {
  right: 110px; /* Left of icon? No, right side items have description on Right usually or Left? 
                           Image: Right items have description on their RIGHT. */
  left: 100%;
  text-align: right;
  margin-right: 15px; /* Gap */
  top: -20px;
}
/* Wait, image shows:
           Right items: Icon is closer to center, Text is further out.
           Left items: Icon is closer to center, Text is further out.
        */
.item-top-right .content-box {
  position: absolute;
  right: -300px; /* Push text to right */
  top: 0;
  text-align: right;
}

/* 3. Bottom Right - Consumers */
.item-bottom-right {
  bottom: 15%;
  right: 0%;
}
.item-bottom-right .content-box {
  position: absolute;
  right: -380px;
  top: 0;
  width: auto;
  text-align: right;
}

/* 4. Bottom Left - Suppliers */
.item-bottom-left {
  bottom: 15%;
  left: 0%;
}
.item-bottom-left .content-box {
  position: absolute;
  left: -430px;
  top: 0;
  width:auto;
  text-align: left; /* Persian is RTL, but alignment visual */
}
/* Fix RTL alignment confusion: Text should align Right (standard Persian). 
           But visually placed to the Left of the icon. */
.item-bottom-left .content-box {
  text-align: right;
}

/* 5. Top Left - Producers (Default) */
.item-top-left {
  top: 15%;
  left: 0%;
}
.item-top-left .content-box {
  position: absolute;
  left: -335px;
  top: 0;
  text-align: right;
  width: 300px; /* Wider for 2 cols */
}
/* Adjust positioning to bring icons closer to circle */
.item-top-right {
  right: 5%;
  top: 29%;
}
.item-bottom-right {
  right: 18%;
  bottom: 10%;
}
.item-bottom-left {
  left: 18%;
  bottom: 10%;
}
.item-top-left {
  left: 5%;
  top: 30%;
}

/* Connecting Lines (Dotted) - Optional Visual Polish matching image */
.feature-item::after {
  content: "";
  position: absolute;
  width: 40px;
  border-top: 1px dashed #ccc;
  z-index: 1;
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .circle-wrapper {
    width: 100%;
    height: auto;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    margin-top: 0;
  }

  .outer-radius {
    display: none;
  }

  .center-circle {
    order: -1; /* Move to top */
    margin-bottom: 50px;
  }

  .center-circle::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    border: 1px solid var(--title-green);
    border-radius: 50%;
  }

  .pointer-track {
    display: none; /* Hide pointer on mobile/tablet */
  }

  .main-title {
    margin-bottom: 5rem;
  }

  .feature-item {
    position: relative;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin-bottom: 40px;
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .feature-item::after {
    display: none;
  } /* Hide dashed lines */

  .content-box {
    position: relative;
    width: 60%;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    text-align: right;
  }

  .icon-circle {
    margin: 0 20px;
    flex-shrink: 0;
  }

  /* Zigzag Pattern */
  /* Even items (2, 4): Text Left, Icon Right */
  .feature-item:nth-child(even) {
    flex-direction: row-reverse;
  }
  /* Odd items (3, 5): Icon Left, Text Right (Default RTL row) */
  .feature-item:nth-child(odd) {
    flex-direction: row;
  }

  /* Specific fix for the top item (Distributors) which was col */
  .item-top {
    flex-direction: row-reverse !important;
  }

  .content-box.multi-col ul {
    column-count: 1; /* Reset columns for mobile if too narrow */
  }

  .item-top .content-box {
    bottom: 0px;
    width: 200px;
  }

  .item-top h3 {
    text-align: right;
    margin-right: 1rem;
  }

  .item-top-right {
    margin: 3rem 0 8rem 0;
  }

  .item-top-right .content-box,
  .item-bottom-left .content-box {
    right: 0 !important;
  }

  .item-bottom-right .content-box,
  .item-top-left .content-box {
    right: auto !important;
    left: 0 !important;
    width: 200px;
  }

  .feature-item.item-bottom-right {
    margin: 0 0 8rem 0;
  }

  .feature-item.item-top-left {
    margin: 7rem 0 8rem 0;
  }
}

@media (max-width: 480px) {
  .main-title {
    font-size: 1rem;
  }

  .center-circle {
    width: 200px;
    height: 200px;
  }

  .center-circle::after {
    width: 250px;
    height: 250px;
  }
}


.feature-container .content-box ul li {
  white-space: nowrap;
  margin-bottom: 10px;
}

.feature-container .content-box.multi-col ul {
  column-gap: 40px;
}