/* =========================================================
   Free Plugins listing page
   ========================================================= */

:root {
  --afp-blue: #2563eb;
  --afp-blue-dark: #1d4ed8;
  --afp-ink: #111827;
  --afp-muted: #6b7280;
  --afp-border: #e5e7eb;
  --afp-bg-soft: #f8fafc;
  --afp-white: #ffffff;
  --afp-radius: 14px;
  --afp-radius-sm: 10px;
  --afp-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --afp-shadow-hover: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.afp-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- HERO ---------- */
.afp-hero {
  background: linear-gradient(180deg, #eef3ff 0%, #f8fafc 100%);
  padding: 64px 0 56px;
  overflow: hidden;
}

.afp-hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.afp-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--afp-blue);
  letter-spacing: .2px;
  border-bottom: 2px solid var(--afp-blue);
  padding-bottom: 4px;
  margin-bottom: 18px;
}

.afp-hero__heading {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 800;
  color: var(--afp-ink);
  margin: 0 0 16px;
}

.afp-hero__desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--afp-muted);
  max-width: 46ch;
  margin: 0 0 32px;
}

.afp-hero__features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--afp-white);
  border: 1px solid var(--afp-border);
  border-radius: var(--afp-radius);
  box-shadow: var(--afp-shadow);
  overflow: hidden;
}

.afp-feature-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 18px;
  border-right: 1px solid var(--afp-border);
  transition: background .2s ease;
}

.afp-feature-box:last-child {
  border-right: none;
}

.afp-feature-box:hover {
  background: var(--afp-bg-soft);
}

.afp-feature-box__icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.afp-feature-box__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.afp-feature-box__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--afp-ink);
}

.afp-feature-box__desc {
  font-size: 12.5px;
  color: var(--afp-muted);
  line-height: 1.4;
}

/* ---------- HERO ART ---------- */
.afp-hero__art {
  position: relative;
  display: flex;
  justify-content: center;
}

.afp-hero__art>img {
  max-width: 100%;
  height: auto;
  border-radius: var(--afp-radius);
}

.afp-hero__floating {
  position: absolute;
  left: -8px;
  bottom: 20px;
  width: 64px;
  height: 64px;
  background: var(--afp-white);
  border: 1px solid var(--afp-border);
  border-radius: 16px;
  box-shadow: var(--afp-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.afp-hero__floating img {
  width: 50%;
  height: 50%;
  object-fit: contain;
}

/* ---------- PLUGINS SECTION ---------- */
.afp-plugins {
  padding: 72px 0 56px;
}

.afp-section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 40px;
}

.afp-section-head h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  color: var(--afp-ink);
  margin: 0 0 10px;
}

.afp-section-head p {
  color: var(--afp-muted);
  font-size: 15px;
  margin: 0;
}

/* ---------- GRID / CARDS ---------- */
.afp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.afp-card {
  background: var(--afp-white);
  border: 1px solid var(--afp-border);
  border-radius: var(--afp-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--afp-shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.afp-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--afp-shadow-hover);
  border-color: #dbe4ff;
}

.afp-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--afp-bg-soft);
}

.afp-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.afp-card:hover .afp-card__media img {
  transform: scale(1.06);
}

.afp-card__body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.afp-card__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--afp-ink);
  margin: 0;
}

.afp-card__title a {
  color: inherit;
  text-decoration: none;
}

.afp-card__title a:hover {
  color: var(--afp-blue);
}

.afp-card__desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--afp-muted);
  margin: 0 0 10px;
  flex: 1;
}

.afp-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.afp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--afp-blue);
  color: #fff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--afp-radius-sm);
  transition: background .2s ease, transform .2s ease;
  flex: 1;
  white-space: nowrap;
}

a.afp-btn.download_button {
  max-width: 22%;
  padding: 0;
}

.afp-btn:hover {
  background: var(--afp-blue-dark);
  transform: translateY(-2px);
}

.afp-btn__icon {
  flex-shrink: 0;
}

.afp-btn--outline {
  background: var(--afp-white);
  color: var(--afp-blue);
  border: 1px solid var(--afp-blue);
}

.afp-btn--outline:hover {
  background: var(--afp-blue);
  color: #fff;
}

.afp-empty {
  text-align: center;
  color: var(--afp-muted);
  padding: 40px 0;
}

/* ---------- TRUST STRIP ---------- */
.afp-trust {
  border-top: 1px solid var(--afp-border);
  background: var(--afp-bg-soft);
  padding: 32px 0;
}

.afp-trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.afp-trust__item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.afp-trust__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--afp-white);
  border: 1px solid var(--afp-border);
  border-radius: 50%;
}

.afp-trust__icon img {
  width: 55%;
  height: 55%;
  object-fit: contain;
}

.afp-trust__item strong {
  display: block;
  font-size: 14px;
  color: var(--afp-ink);
}

.afp-trust__item span {
  display: flex;
  font-size: 12.5px;
  color: var(--afp-muted);
  align-items: center;
  justify-content: center;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .afp-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .afp-feature-box:nth-child(2) {
    border-right: none;
  }

  .afp-feature-box {
    border-bottom: 1px solid var(--afp-border);
  }

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

@media (max-width: 860px) {
  .afp-hero__grid {
    grid-template-columns: 1fr;
  }

  .afp-hero__art {
    order: -1;
  }
}

@media (max-width: 640px) {
  a.afp-btn.download_button {
    max-width: 100%;
    padding: 10px 16px;
    font-size: 20.5px;
}
  .afp-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .afp-hero__features {
    grid-template-columns: 1fr;
  }

  .afp-feature-box {
    border-right: none;
  }

  .afp-trust__grid {
    grid-template-columns: 1fr;
  }

  .afp-card__actions {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .afp-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {

  .afp-card,
  .afp-card__media img,
  .afp-btn {
    transition: none;
  }
}