.text-blocks {
  padding: 5rem 0;
  margin: 0;
}

.text-blocks .container {
  margin: 0 auto;
  padding: 0 2rem;
}

/* Width variants for single-column layouts */
.text-blocks.width-narrow .container {
  max-width: 800px;
}

.text-blocks.width-normal .container {
  max-width: 1200px;
}

.text-blocks.width-wide .container {
  max-width: 100%;
  padding: 0 3rem;
}

.text-blocks .section-title {
  text-align: center;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: #1a202c;
}

.text-blocks .section-subtitle {
  text-align: center;
  font-size: 1.25rem;
  color: #718096;
  margin: 0 0 3rem 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.text-blocks-grid {
  display: grid;
  gap: 2.5rem;
  margin: 0;
  padding: 3rem 0 0 0;
}

/* Dynamic column layouts based on data-columns attribute */
.text-blocks-grid[data-columns="1"] {
  grid-template-columns: 1fr;
}

.text-blocks-grid[data-columns="2"] {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.text-blocks-grid[data-columns="3"] {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* For 3+ columns, ensure we don't go below 3 on large screens */
@media (min-width: 992px) {
  .text-blocks-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
  }
}

.text-block {
#  background: white;
  padding: 2.5rem;
  border-radius: 12px;
#  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.text-block::before {
#  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

#.text-block:hover {
#  transform: translateY(-5px);
#  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
#}

.text-block:hover::before {
  transform: scaleX(1);
}

.block-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.block-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: #2d3748;
}

.block-content {
  font-size: 1rem;
  line-height: 1.7;
  color: #4a5568;
}

.block-content p {
  margin: 0 0 1rem 0;
}

.block-content p:last-child {
  margin-bottom: 0;
}

.block-content ul, .block-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.block-content li {
  margin: 0.5rem 0;
}

.block-content a {
  color: #667eea;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.block-content a:hover {
  border-bottom-color: #667eea;
}

/* Single column centered layout */
.text-blocks-grid[data-columns="1"] .text-block {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

/* Responsive adjustments */
/* ============================================
   VARIANTS
   ============================================ */

/* Variant: card - Add background, shadow, and hover effects */
.text-blocks--card .text-block {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.text-blocks--card .text-block:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.text-blocks--card .text-block::before {
  content: '';
}

/* Variant: bordered - Add border instead of shadow */
.text-blocks--bordered .text-block {
  background: white;
  border: 2px solid #e2e8f0;
}

.text-blocks--bordered .text-block:hover {
  border-color: #667eea;
}

.text-blocks--bordered .text-block::before {
  content: '';
}

/* Variant: flat - Background but no depth effects */
.text-blocks--flat .text-block {
  background: white;
  box-shadow: none;
}

.text-blocks--flat .text-block:hover {
  background: #f7fafc;
}

/* Variant: minimal - Completely clean (default state, explicitly defined) */
.text-blocks--minimal .text-block {
  background: transparent;
  box-shadow: none;
  border: none;
}

.text-blocks--minimal .text-block::before {
  content: none;
}

.text-blocks--minimal .text-block:hover {
  background: transparent;
  transform: none;
}

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

@media (max-width: 768px) {
  .text-blocks {
    padding: 3rem 0;
  }

  .text-blocks .container {
    padding: 0 1.5rem;
  }

  .text-blocks-grid {
    gap: 1.5rem;
    grid-template-columns: 1fr !important;
    margin: 0;
    padding: 2rem 0 0 0;
  }

  .text-block {
    padding: 2rem;
  }

  .block-icon {
    font-size: 2.5rem;
  }

  /* Maintain variant styles on mobile */
  .text-blocks--card .text-block:hover {
    transform: translateY(-3px);
  }
}
