/* features.css — version 1.2.2
   Purpose: Icon-first feature tiles with centered icons + left-aligned text.
   Works with: CMS Features Head + CMS Features doctypes
   Notes:
   - Description supports line breaks (white-space: pre-line)
   - Icons centered; text left-aligned inside each card
*/

/* ========== SECTION WRAPPER ========== */
.features-section {
  position: relative;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

/* ========== GRID ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .features-grid { gap: 1.5rem; }
}

/* ========== TILE BASE ========== */
.feature-tile {
  --feature-bg: #ffffff;
  --feature-text: #334155;
  --feature-title: #0f172a;
  --feature-border: #e5e7eb;
  --feature-radius: 12px;
  --feature-shadow: 0 6px 12px rgba(0,0,0,0.08);
  --icon-color: #111827;
  --icon-size: 2.25rem;

  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;       /* centers the icon horizontally */
  justify-content: center;   /* vertically centers tile content */
  text-align: left;          /* aligns text inside tile to the left */

  background: var(--feature-bg);
  color: var(--feature-text);
  border: 1px solid var(--feature-border);
  border-radius: var(--feature-radius);
  box-shadow: var(--feature-shadow);

  padding: 28px 22px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.feature-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 18px rgba(0,0,0,0.12);
}

/* Equal-height helper */
.features--equal .feature-tile { min-height: 220px; }

/* ========== ICON ========== */
.feature-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 10px;
  border-radius: 9999px;
  background: rgba(0,0,0,0.03);
}

.feature-icon .icon-wrap {
  line-height: 1;
  display: inline-block;
  color: var(--icon-color);
  font-size: var(--icon-size);
}

/* ========== TITLE & DESCRIPTION ========== */
.feature-title {
  margin: 8px 0 8px 0;
  font-weight: 700;
  color: var(--feature-title);
  font-size: 1.25rem;
  display: block;
  line-height: 1.3;
  width: 85%;
  max-width: 320px;
}

.feature-desc {
  margin: 6px 0 0 0;
  color: inherit;
  opacity: 0.9;
  display: block;
  line-height: 1.5;
  white-space: pre-line;
  width: 85%;
  max-width: 320px;
}

/* Optional bullet alignment (for emoji or icons before each line) */
.feature-desc span,
.feature-desc i,
.feature-desc svg {
  vertical-align: middle;
}

/* ========== DECORATIVE BULLETS ========== */
.feature-bullets {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  opacity: 0.7;
}

.feature-bullets .dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: currentColor;
}

/* ========== ACCENT CLASSES ========== */
.accent-none { --accent-none: 0; }
.accent-yellow { border-color: #fde68a; }
.accent-pink   { border-color: #fbcfe8; }
.accent-green  { border-color: #bbf7d0; }
.accent-blue   { border-color: #bfdbfe; }
.accent-slate  { border-color: #e2e8f0; }
.accent-emerald{ border-color: #a7f3d0; }
.accent-cyan   { border-color: #a5f3fc; }
.accent-indigo { border-color: #c7d2fe; }
.accent-purple { border-color: #e9d5ff; }
.accent-rose   { border-color: #fecdd3; }
.accent-orange { border-color: #fed7aa; }
.accent-red    { border-color: #fecaca; }

/* ========== UTILITY COLORS ========== */
.border-slate-200  { border-color: #e2e8f0; }
.border-gray-200   { border-color: #e5e7eb; }
.border-zinc-200   { border-color: #e4e4e7; }
.border-neutral-200{ border-color: #e5e5e5; }
.border-stone-200  { border-color: #e7e5e4; }
.border-amber-200  { border-color: #fde68a; }
.border-yellow-200 { border-color: #fef08a; }
.border-lime-200   { border-color: #d9f99d; }
.border-emerald-200{ border-color: #a7f3d0; }
.border-teal-200   { border-color: #99f6e4; }
.border-cyan-200   { border-color: #a5f3fc; }
.border-sky-200    { border-color: #bae6fd; }
.border-blue-200   { border-color: #bfdbfe; }
.border-indigo-200 { border-color: #c7d2fe; }
.border-violet-200 { border-color: #ddd6fe; }
.border-purple-200 { border-color: #e9d5ff; }
.border-fuchsia-200{ border-color: #f5d0fe; }
.border-pink-200   { border-color: #fbcfe8; }
.border-rose-200   { border-color: #fecdd3; }

.bg-slate-50   { background-color: #f8fafc; }
.bg-gray-50    { background-color: #f9fafb; }
.bg-zinc-50    { background-color: #fafafa; }
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-cyan-50    { background-color: #ecfeff; }
.bg-indigo-50  { background-color: #eef2ff; }
.bg-purple-50  { background-color: #f5f3ff; }
.bg-rose-50    { background-color: #fff1f2; }
.bg-orange-50  { background-color: #fff7ed; }
.bg-amber-50   { background-color: #fffbeb; }
.bg-yellow-50  { background-color: #fefce8; }
.bg-sky-50     { background-color: #f0f9ff; }
.bg-blue-50    { background-color: #eff6ff; }

.bg-slate-50,.bg-gray-50,.bg-zinc-50,
.bg-emerald-50,.bg-cyan-50,.bg-indigo-50,.bg-purple-50,
.bg-rose-50,.bg-orange-50,.bg-amber-50,.bg-yellow-50,
.bg-sky-50,.bg-blue-50 {
  border-color: var(--feature-border);
}

/* ========== ACCESSIBILITY ========== */
.feature-tile:focus-within {
  outline: 2px solid #94a3b8;
  outline-offset: 2px;
}

/* ========== SMALL SCREENS ========== */
@media (max-width: 640px) {
  .feature-tile { padding: 22px 18px; }
  .feature-title { font-size: 1.125rem; }
}
