/*
 * page-news.css
 * Loaded only on the News page (page-news.php).
 */

/* ── Hero — undo cascade overrides from later pages in main.css ───────── */

/* page-hero: undo companies' flex layout, min-height, border, and side padding */
.page-hero {
  display: block;
  min-height: 0;
  border-bottom: none;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

/* page-hero-inner: undo sectors' 2-column grid, restore single-column */
.page-hero-inner {
  display: block;
  grid-template-columns: initial;
  padding: 56px 56px 64px;
}

@media (max-width: 900px) {
  .page-hero-inner { padding: 40px 20px 48px; }
}

/* ── Pagination (mirrors page-stories.css) ────────────────────────────── */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 18px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.blog-page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: white;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}
.blog-page-btn:hover { border-color: var(--blue); color: var(--blue); }
.blog-page-btn.active { background: var(--blue); border-color: var(--blue); color: white; }
.blog-page-btn:disabled { opacity: 0.3; cursor: default; pointer-events: none; }
.blog-page-dots {
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 2px;
  color: var(--gray);
  font-size: 0.72rem;
  font-weight: 500;
  user-select: none;
}

/* ── Fluent Form #5 — styled to match .press-submit design ───────────── */

/*
 * DOM children of fieldset (hidden inputs are nth-child 2/3/4, excluded from grid):
 *   child 5 → .ff-name-field-wrapper  (Your Name)         → col 1
 *   child 6 → .ff-el-group            (Email)             → col 2
 *   child 7 → .ff-el-group            (Company)           → col 1
 *   child 8 → .ff-el-group            (Link to news)      → col 2
 *   child 9 → .ff-el-group            (One-sentence desc) → full (default)
 *   child 10 → .ff-el-group           (Submit)            → full (default)
 */

#fluentform_5 fieldset {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

#fluentform_5 fieldset > * {
  grid-column: 1 / -1;
  margin: 0;
}

#fluentform_5 fieldset > :nth-child(5) { grid-column: 1 / 2; } /* Your Name */
#fluentform_5 fieldset > :nth-child(6) { grid-column: 2 / 3; } /* Email */
#fluentform_5 fieldset > :nth-child(7) { grid-column: 1 / 2; } /* Company */
#fluentform_5 fieldset > :nth-child(8) { grid-column: 2 / 3; } /* Link to news */

/* Name-element wrapper: flex column so label+input sit at the bottom of the cell,
   matching the visual baseline of adjacent fields */
#fluentform_5 .ff-name-field-wrapper {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
}
#fluentform_5 .ff-t-container {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
}
#fluentform_5 .ff-t-cell {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  justify-content: flex-end !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}
#fluentform_5 .ff-name-field-wrapper .ff-el-group {
  margin: 0 !important;
  padding: 0 !important;
}
#fluentform_5 .ff-name-field-wrapper .ff-el-input--content {
  margin-left: 0 !important;
  width: 100% !important;
}

/* Labels */
#fluentform_5 .ff-el-input--label label,
#fluentform_5 .ff-name-field-wrapper label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--dark);
  font-family: 'Poppins', sans-serif;
  display: block;
  margin-bottom: 4px;
}

/* Required asterisk colour */
#fluentform_5 .ff-el-is-required .asterisk-right label::after {
  color: var(--blue);
}

/* Inputs */
#fluentform_5 .ff-el-form-control {
  width: 100% !important;
  padding: 10px 12px !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 8px !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.78rem !important;
  color: var(--dark) !important;
  background: white !important;
  outline: none !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
  transition: border-color 0.2s !important;
}

#fluentform_5 .ff-el-form-control:focus {
  border-color: var(--blue) !important;
}

#fluentform_5 .ff-el-form-control::placeholder {
  color: rgba(16, 20, 31, 0.3) !important;
}

/* Submit button — matches .btn-submit-sm */
#fluentform_5 .ff_submit_btn_wrapper {
  margin-top: 16px !important;
}

#fluentform_5 .ff_btn_no_style,
#fluentform_5 .ff_submit_btn_wrapper button {
  background: var(--blue) !important;
  color: white !important;
  border: none !important;
  padding: 10px 24px !important;
  border-radius: 8px !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: background 0.2s !important;
  width: auto !important;
  display: inline-block !important;
}

#fluentform_5 .ff_btn_no_style:hover,
#fluentform_5 .ff_submit_btn_wrapper button:hover {
  background: var(--blue-dark) !important;
}

/* Success message — matches Mailchimp #mce-success-response style */
#fluentform_5_success.ff-message-success,
#fluentform_5 .ff-message-success {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.5;
  background: white;
  border: 1.5px solid #86efac;
  color: #15803d;
}

#fluentform_5_success.ff-message-success::before,
#fluentform_5 .ff-message-success::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #16a34a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 10px 10px;
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 1px;
}

/* Validation errors */
#fluentform_5 .error,
#fluentform_5 .ff-el-form-error {
  font-size: 0.68rem;
  color: #e53e3e;
  margin-top: 4px;
}

/* Responsive — collapse to 1 column */
@media (max-width: 900px) {
  #fluentform_5 fieldset { grid-template-columns: 1fr; }
  #fluentform_5 fieldset > :nth-child(5),
  #fluentform_5 fieldset > :nth-child(6),
  #fluentform_5 fieldset > :nth-child(7),
  #fluentform_5 fieldset > :nth-child(8) { grid-column: 1 / -1; }
}
