/**
 * All Forms Page Styles
 *
 * @package emmanuelmiami-theme
 */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap");

/* ── Page Header ──────────────────────────────────────────────────────────── */

.af-page-header {
  background: linear-gradient(
    135deg,
    var(--color-primary, #2b2b6e) 0%,
    var(--color-navy-gradient, #1a1a4e) 50%,
    var(--color-primary, #2b2b6e) 100%
  );
  padding: 120px 20px 80px;
  text-align: center;
  color: #fff;
}

.af-page-header__container {
  max-width: 800px;
  margin: 0 auto;
  margin-top: 40px;
}

.af-page-header__title {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 15px;
}

.af-page-header__subtitle {
  font-family: var(--font-ui);
  font-size: 1.25rem;
  font-weight: 300;
  color: #c7fff8;
  margin: 0;
  line-height: 1.5;
}

.af-page-header__intro {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  margin-top: 16px;
}

.af-page-header__intro p {
  margin: 0;
}

/* ── Content Wrapper ───────────────────────────────────────────────────────── */

.af-content {
  padding: 80px 0 100px;
  background: #f5f5f7;
}

.af-content__container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* ── Category ─────────────────────────────────────────────────────────────── */

.af-category {
  margin-bottom: 48px;
}

.af-category__heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
  padding: 14px 20px;
  background: rgba(43, 43, 110, 0.08);
  border-bottom: 2px solid var(--color-primary, #2b2b6e);
  border-radius: 4px 4px 0 0;
}

.af-category__icon {
  width: 40px;
  height: 40px;
  background: var(--color-primary, #2b2b6e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: dashicons;
  font-size: 20px;
  color: #fff;
  line-height: 40px;
  text-align: center;
  flex-shrink: 0;
}

.af-category__title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-gray-900, #1a1a2e);
  margin: 0;
}

/* ── Form List ────────────────────────────────────────────────────────────── */

.af-form-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #e2e2e8;
}

/* ── Form Row ─────────────────────────────────────────────────────────────── */

.af-form-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 14px;
  padding: 22px 20px 22px 0;
  border-bottom: 1px solid #e2e2e8;
  border-right: 1px solid #e2e2e8;
}

/* Remove right border on every 3rd item */
.af-form-row:nth-child(3n) {
  border-right: none;
  padding-right: 0;
}

/* Add left padding to 2nd and 3rd columns */
.af-form-row:nth-child(3n + 2),
.af-form-row:nth-child(3n) {
  padding-left: 20px;
}

.af-form-row__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.af-form-row__name {
  font-family: "Outfit", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-gray-900, #1a1a2e);
  line-height: 1.3;
}

.af-form-row__desc {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: #777;
  line-height: 1.5;
}

/* ── Action / Button ──────────────────────────────────────────────────────── */

.af-form-row__action {
  flex-shrink: 0;
}

/* Strip the standalone 40px margin from modal trigger wrapper when inside a form row */
.af-form-row__action .custom-form-modal-trigger-wrapper {
  margin: 0;
}

.af-form-row__btn,
.af-form-row__action a,
.af-form-row__action button {
  display: inline-block;
  font-family: "Outfit", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: var(--color-primary, #2b2b6e);
  border-radius: 2px;
  padding: 10px 20px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: none;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
  white-space: nowrap;
}

.af-form-row__btn:hover,
.af-form-row__action a:hover,
.af-form-row__action button:hover {
  background: var(--color-accent, #4ecdc4);
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}

.af-form-row__btn--disabled {
  background: #c8c8d0 !important;
  cursor: default !important;
  transform: none !important;
}

.af-form-row__btn--disabled:hover {
  background: #c8c8d0 !important;
  transform: none !important;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .af-form-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .af-form-row:nth-child(3n) {
    border-right: 1px solid #e2e2e8;
    padding-right: 20px;
    padding-left: 0;
  }

  .af-form-row:nth-child(2n) {
    border-right: none;
    padding-right: 0;
    padding-left: 20px;
  }

  .af-form-row:nth-child(2n + 1) {
    padding-left: 0;
  }
}

@media (max-width: 768px) {
  .af-page-header {
    padding: 80px 24px 60px;
  }

  .af-page-header__title {
    font-size: 2.5rem;
    letter-spacing: 1.5px;
  }

  .af-content {
    padding: 56px 0 72px;
  }

  .af-content__container {
    padding: 0 24px;
    gap: 48px;
  }
}

@media (max-width: 480px) {
  .af-page-header__title {
    font-size: 2rem;
  }

  .af-form-list {
    grid-template-columns: 1fr;
  }

  .af-form-row {
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-right: none !important;
  }

  .af-form-row__action,
  .af-form-row__btn,
  .af-form-row__action a,
  .af-form-row__action button {
    width: 100%;
    text-align: center;
  }
}
