/* ============================================================
   GREATMIKE DIGITAL FOUNDATION
   components.css — Reusable UI components
   Cards, badges, hero base, forms, testimonials,
   feature lists, CTA banners, stat blocks, page hero
   ============================================================ */

/* ── Badge ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
}

.badge--green {
  background: var(--green-glow);
  color: var(--green);
  border: 1px solid rgba(29, 185, 84, .22);
}

.badge--navy {
  background: rgba(7, 30, 61, .07);
  color: var(--navy);
  border: 1px solid rgba(7, 30, 61, .12);
}

.badge--white {
  background: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .9);
  border: 1px solid rgba(255, 255, 255, .2);
}

/* ── Card ───────────────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  transition: all var(--ease-slow);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--navy-lite));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease-slow);
}

.card:hover {
  border-color: rgba(29, 185, 84, .28);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card:hover::before { transform: scaleX(1); }

.card--dark {
  background: var(--navy-mid);
  border-color: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .85);
}

.card--dark h3 { color: var(--white); }

.card--dark p { color: rgba(255, 255, 255, .6); }

.card--dark:hover {
  border-color: rgba(29, 185, 84, .4);
  background: var(--navy-lite);
}

.card--surface {
  background: var(--surface);
  border-color: transparent;
}

/* Card icon */
.card__icon {
  width: 52px;
  height: 52px;
  background: var(--green-glow);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-lg);
  font-size: 1.5rem;
  transition: all var(--ease);
  flex-shrink: 0;
}

.card:hover .card__icon {
  background: var(--green);
  transform: scale(1.08) rotate(-3deg);
}

.card h3 { margin-bottom: var(--sp-sm); }

.card p {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.75;
}

/* Card read-more link */
.card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--green);
  margin-top: var(--sp-lg);
  transition: gap var(--ease);
}

.card__link:hover { gap: var(--sp-sm); }

/* ── Page Hero (inner pages) ────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-lite) 100%);
  padding-block: var(--sp-3xl);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(29,185,84,.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(29,185,84,.05) 0%, transparent 60%);
  pointer-events: none;
}

.page-hero__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.page-hero .badge { margin-bottom: var(--sp-lg); }

.page-hero h1 {
  color: var(--white);
  margin-bottom: var(--sp-lg);
}

.page-hero h1 span { color: var(--green); }

.page-hero p {
  color: rgba(255, 255, 255, .75);
  font-size: var(--fs-md);
  margin-bottom: var(--sp-xl);
  max-width: 600px;
}

.page-hero__actions {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

/* Breadcrumb inside page hero */
.page-hero .breadcrumb {
  margin-bottom: var(--sp-lg);
  color: rgba(255, 255, 255, .5);
}

.page-hero .breadcrumb a       { color: rgba(255, 255, 255, .5); }
.page-hero .breadcrumb a:hover { color: var(--green); }
.page-hero .breadcrumb__sep    { color: rgba(255, 255, 255, .25); }
.page-hero .breadcrumb__current { color: rgba(255, 255, 255, .85); }

/* ── Stat block ─────────────────────────────────────────────── */
.stat-block {
  text-align: center;
  padding: var(--sp-xl);
}

.stat-block__number {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  color: var(--green);
  line-height: 1;
  margin-bottom: var(--sp-sm);
}

.stat-block__label {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, .6);
  line-height: 1.4;
}

/* ── Stats row (dark bg) ────────────────────────────────────── */
.stats-row {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-lite) 100%);
  position: relative;
  overflow: hidden;
}

.stats-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 100% at 50% 50%, rgba(29,185,84,.07) 0%, transparent 70%);
  pointer-events: none;
}

.stats-row__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
  z-index: 1;
}

.stats-row__item {
  border-right: 1px solid rgba(255, 255, 255, .08);
}

.stats-row__item:last-child { border-right: none; }

@media (max-width: 768px) {
  .stats-row__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-row__item:nth-child(2) { border-right: none; }

  .stats-row__item:nth-child(3),
  .stats-row__item:nth-child(4) {
    border-top: 1px solid rgba(255, 255, 255, .08);
  }
}

/* ── Testimonial ────────────────────────────────────────────── */
.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  position: relative;
}

.testimonial::before {
  content: '\201C';
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--green);
  opacity: 0.18;
  position: absolute;
  top: 8px;
  left: 18px;
  line-height: 1;
  pointer-events: none;
}

.testimonial__text {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.8;
  font-style: italic;
  margin-bottom: var(--sp-lg);
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.testimonial__avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--green-glow);
  border: 2px solid rgba(29, 185, 84, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--green);
  flex-shrink: 0;
  overflow: hidden;
}

.testimonial__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--navy);
  display: block;
}

.testimonial__role {
  font-size: var(--fs-xs);
  color: var(--muted);
}

/* ── Feature list (icon + text rows) ───────────────────────── */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
}

.feature-item__icon {
  width: 22px;
  height: 22px;
  background: var(--green);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
}

.feature-item__text {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.6;
}

.feature-item__text strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 2px;
}

/* ── Inline feature box (icon left, content right) ──────────── */
.feature-box {
  display: flex;
  gap: var(--sp-md);
  padding: var(--sp-lg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--ease);
}

.feature-box:hover {
  border-color: rgba(29, 185, 84, .3);
  background: var(--surface);
}

.feature-box__icon {
  width: 46px;
  height: 46px;
  background: var(--green-glow);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.3rem;
  transition: background var(--ease);
}

.feature-box:hover .feature-box__icon { background: var(--green); }

.feature-box__text h4 {
  margin-bottom: var(--sp-xs);
  font-size: var(--fs-base);
}

.feature-box__text p {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin: 0;
}

/* ── CTA Banner ─────────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-lite) 100%);
  border-radius: var(--radius-lg);
  padding: var(--sp-2xl) var(--sp-xl);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 120% at 50% 50%, rgba(29,185,84,.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-banner--split {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--sp-xl);
}

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

.cta-banner h2 {
  color: var(--white);
  margin-bottom: var(--sp-sm);
}

.cta-banner p {
  color: rgba(255, 255, 255, .7);
  font-size: var(--fs-md);
  margin: 0;
}

.cta-banner__actions {
  display: flex;
  gap: var(--sp-md);
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  margin-top: var(--sp-xl);
}

.cta-banner--split .cta-banner__actions {
  margin-top: 0;
  flex-shrink: 0;
}

/* ── Contact Form ───────────────────────────────────────────── */
.form-group { margin-bottom: var(--sp-lg); }

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-sm);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--ease), box-shadow var(--ease);
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.form-control::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

textarea.form-control {
  resize: vertical;
  min-height: 140px;
}

/* ── Partners / logo strip ──────────────────────────────────── */
.partners-strip {
  background: var(--surface);
  padding-block: var(--sp-xl);
  border-block: 1px solid var(--border);
}

.partners-strip__label {
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-xl);
}

.partners-strip__logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-2xl);
  flex-wrap: wrap;
}

.partners-strip__logo {
  opacity: 0.5;
  filter: grayscale(1);
  transition: all var(--ease);
}

.partners-strip__logo:hover {
  opacity: 1;
  filter: grayscale(0);
}

.partners-strip__logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* ── Blog post card ─────────────────────────────────────────── */
.post-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--ease-slow);
}

.post-card:hover {
  border-color: rgba(29, 185, 84, .28);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.post-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.post-card__body {
  padding: var(--sp-lg);
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-bottom: var(--sp-sm);
}

.post-card__cat {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.post-card h3 {
  font-size: var(--fs-base);
  margin-bottom: var(--sp-sm);
  line-height: 1.4;
}

.post-card h3 a { transition: color var(--ease); }
.post-card h3 a:hover { color: var(--green); }

.post-card p {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-bottom: var(--sp-md);
  line-height: 1.7;
}

.post-card__link {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  transition: gap var(--ease);
}

.post-card__link:hover { gap: var(--sp-sm); }

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin-block: var(--sp-xl);
}

/* ── Responsive components ──────────────────────────────────── */
@media (max-width: 768px) {
  .cta-banner--split {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cta-banner--split .cta-banner__actions {
    margin-top: var(--sp-xl);
  }

  .page-hero__actions { flex-direction: column; }

  .page-hero__actions .btn { width: 100%; justify-content: center; }
}