/**
 * The Puzzle Architect - Rules Page Styles
 * All classes prefixed with rules-
 */

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.rules-hero {
  background: linear-gradient(135deg, #0052CC 0%, #003d99 100%);
  color: #fff;
  padding: 80px 20px;
  text-align: center;
}

.rules-hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 15px;
}

.rules-hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================================================
   SECTIONS
   ============================================================================ */

.rules-section {
  padding: 60px 20px;
}

.rules-section-alt {
  background: linear-gradient(180deg, #f0f7ff 0%, #fff 100%);
}

.rules-container {
  max-width: 900px;
  margin: 0 auto;
}

.rules-section-title {
  font-size: 2rem;
  color: #0052CC;
  text-align: center;
  margin-bottom: 10px;
}

.rules-section-subtitle {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 40px;
}

/* ============================================================================
   INTRODUCTION
   ============================================================================ */

.rules-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.rules-intro h2 {
  font-size: 2rem;
  color: #0052CC;
  margin-bottom: 20px;
}

.rules-intro p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #444;
}

/* ============================================================================
   CONTENT BLOCKS
   ============================================================================ */

.rules-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.rules-block-content h2 {
  font-size: 1.8rem;
  color: #0052CC;
  margin-bottom: 20px;
}

.rules-block-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #444;
  margin-bottom: 20px;
}

.rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rules-list li {
  padding: 10px 0;
  padding-left: 25px;
  position: relative;
  color: #444;
}

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

.rules-grid-svg {
  max-width: 250px;
  margin: 0 auto;
  display: block;
}

/* ============================================================================
   THREE RULES / CONSTRAINTS
   ============================================================================ */

.rules-constraints {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.rules-constraint-card {
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 82, 204, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rules-constraint-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 82, 204, 0.15);
}

.rules-constraint-number {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #0052CC, #003d99);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.rules-constraint-card h3 {
  font-size: 1.3rem;
  color: #0052CC;
  margin-bottom: 15px;
}

.rules-constraint-card p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

.rules-constraint-example {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
}

.rules-constraint-example span {
  width: 28px;
  height: 28px;
  background: linear-gradient(145deg, #f8f9ff, #eef2ff);
  border: 2px solid #dde5ff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #0052CC;
}

.rules-constraint-vertical {
  flex-direction: column;
  max-height: 120px;
  overflow: hidden;
}

.rules-constraint-vertical span {
  width: 28px;
  height: 12px;
  font-size: 0.7rem;
}

.rules-constraint-box {
  display: grid;
  grid-template-columns: repeat(3, 28px);
  gap: 4px;
  justify-content: center;
}

/* ============================================================================
   TIPS GRID
   ============================================================================ */

.rules-tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.rules-tip-card {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-left: 4px solid #FFD700;
}

.rules-tip-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #f0f7ff, #e0edff);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.rules-tip-icon svg {
  width: 24px;
  height: 24px;
  stroke: #0052CC;
}

.rules-tip-card h3 {
  font-size: 1.1rem;
  color: #222;
  margin-bottom: 10px;
}

.rules-tip-card p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}

/* ============================================================================
   CTA SECTION
   ============================================================================ */

.rules-cta {
  background: linear-gradient(135deg, #0052CC 0%, #003d99 100%);
  color: #fff;
  padding: 60px 20px;
  text-align: center;
}

.rules-cta h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.rules-cta p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 30px;
}

.rules-cta-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.rules-btn {
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.rules-btn-primary {
  background: #FFD700;
  color: #1a1a1a;
}

.rules-btn-primary:hover {
  background: #ffed4a;
  transform: translateY(-2px);
}

.rules-btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.rules-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
  .rules-hero-title {
    font-size: 2rem;
  }

  .rules-block {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .rules-block-visual {
    order: -1;
  }

  .rules-constraints {
    grid-template-columns: 1fr;
  }

  .rules-tips-grid {
    grid-template-columns: 1fr;
  }

  .rules-section-title {
    font-size: 1.6rem;
  }
}
