/* ============================================================
   AutoFlow Labs — Inner Pages CSS (services, industries)
   ============================================================ */

/* ============================================================
   PAGE HERO
   ============================================================ */
.pg-hero {
  background: linear-gradient(160deg, var(--c-green-900) 0%, #1b6e4d 55%, #0c3524 100%);
  padding: calc(72px + var(--sp-16)) 0 var(--sp-16);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pg-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 100%, rgba(52, 211, 153, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.pg-hero__label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #34d399;
  margin-bottom: var(--sp-4);
}

.pg-hero__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  margin: 0 auto var(--sp-5);
  max-width: 680px;
}

.pg-hero__sub {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255, 255, 255, 0.72);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================================
   GROUPS WRAPPER
   ============================================================ */
.pg-groups {
  padding: var(--sp-20) 0;
}

.pg-group {
  margin-bottom: var(--sp-20);
}

.pg-group:last-child {
  margin-bottom: 0;
}

.pg-group__header {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--c-border);
}

.pg-group__label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-green-600);
}

.pg-group__count {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-muted);
  background: var(--c-green-50);
  border: 1px solid var(--c-green-100);
  border-radius: var(--r-full);
  padding: 1px 8px;
}

/* ============================================================
   CARD GRID — 3 cols default, responsive
   ============================================================ */
.pg-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}

.pg-card-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.pg-card-grid--wide {
  grid-template-columns: repeat(2, 1fr);
  max-width: 720px;
}

.pg-card-grid--solo {
  grid-template-columns: 1fr;
  max-width: 420px;
}

/* ============================================================
   FEATURE CARD — compact icon-tile style (Stripe/Linear)
   ============================================================ */
.pg-card {
  background: #ffffff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  text-decoration: none;
  color: inherit;
}

.pg-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(21, 94, 68, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: var(--c-green-100);
}

/* card body */
.pg-card__body {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* header row: icon tile + category label */
.pg-card__header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

/* 54px rounded icon tile */
.pg-card__icon-tile {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--c-green-50) 0%, var(--c-green-100) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.pg-card:hover .pg-card__icon-tile {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 4px 14px rgba(21, 94, 68, 0.18);
}

/* category label beside the tile */
.pg-card__category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-green-600);
}

.pg-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--c-green-900);
  margin-bottom: var(--sp-2);
  line-height: 1.25;
}

.pg-card__text {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.6;
  flex: 1;
}

.pg-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-green-600);
  margin-top: var(--sp-4);
  text-decoration: none;
  transition: gap 0.2s ease;
}

.pg-card__link:hover {
  gap: 8px;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.pg-cta {
  background: linear-gradient(160deg, var(--c-green-900) 0%, #1b6e4d 100%);
  padding: var(--sp-20) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pg-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 110%, rgba(52, 211, 153, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.pg-cta .container {
  position: relative;
  z-index: 1;
}

.pg-cta__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #34d399;
  margin-bottom: var(--sp-4);
}

.pg-cta__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: var(--sp-4);
  line-height: 1.15;
}

.pg-cta__sub {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.72);
  max-width: 480px;
  margin: 0 auto var(--sp-8);
  line-height: 1.6;
}

.pg-cta .btn-primary {
  background: #ffffff;
  color: var(--c-green-900);
  font-size: 16px;
  padding: 14px 32px;
}

.pg-cta .btn-primary:hover {
  background: var(--c-green-50);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}


/* ============================================================
   ACTIVE NAV LINK
   ============================================================ */
.nav-links li a[aria-current="page"] {
  color: var(--c-green-600);
  font-weight: 600;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .pg-card-grid            { grid-template-columns: repeat(2, 1fr); }
  .pg-card-grid--2         { grid-template-columns: repeat(2, 1fr); }
  .pg-card-grid--wide      { grid-template-columns: repeat(2, 1fr); max-width: 100%; }
  .pg-card-grid--solo      { grid-template-columns: 1fr; max-width: 100%; }
}

@media (max-width: 640px) {
  .pg-hero {
    padding: calc(72px + var(--sp-10)) 0 var(--sp-10);
  }

  .pg-groups { padding: var(--sp-12) 0; }
  .pg-group  { margin-bottom: var(--sp-12); }

  .pg-card-grid,
  .pg-card-grid--2,
  .pg-card-grid--wide,
  .pg-card-grid--solo { grid-template-columns: 1fr; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pg-card,
  .pg-card__icon-tile,
  .pg-card__link { transition: none; }
  .pg-card:hover .pg-card__icon-tile { transform: none; box-shadow: none; }
}
