/* ============================================
   RULES SECTION
   ============================================ */

.rules-section {
  background: var(--bg-secondary);
  position: relative;
}

/* ---- Rules Grid (Accordion Container) ---- */
.rules-grid {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---- Accordion Item ---- */
.rule-accordion {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.rule-accordion:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.rule-accordion.active {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.06);
}

/* ---- Accordion Header ---- */
.rule-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  transition: background 0.2s ease;
  text-align: left;
  gap: 16px;
}

.rule-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.rule-header:active {
  background: rgba(0, 255, 136, 0.04);
}

.rule-header:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: -2px;
}

/* ---- Header Left ---- */
.rule-header-left {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
}

.rule-header-left i {
  color: var(--accent-primary);
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.rule-header-left span {
  line-height: 1.4;
}

/* ---- Chevron ---- */
.rule-chevron {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.rule-accordion.active .rule-chevron {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

/* ---- Accordion Content ---- */
.rule-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              padding 0.4s ease;
  padding: 0 24px;
}

.rule-accordion.active .rule-content {
  max-height: 200px;
  padding: 0 24px 20px;
}

.rule-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.rule-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rule-content ul li {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
  padding: 3px 0;
  padding-left: 20px;
  position: relative;
}

.rule-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .rule-header {
    padding: 16px 18px;
    font-size: 0.95rem;
  }

  .rule-accordion.active .rule-content {
    padding: 0 18px 16px;
  }

  .rule-content p,
  .rule-content ul li {
    font-size: 0.9rem;
  }
}
