/*
Theme Name:     Experience Recovery Child
Theme URI:      https://experiencerecovery.com
Description:    Child theme for PopularFX. Standardizes typography, layout, spacing, and components site-wide so internal pages match the homepage design.
Author:         Experience Recovery
Author URI:     https://experiencerecovery.com
Template:       popularfx
Version:        1.0.0
Text Domain:    experience-recovery-child
*/

/* =========================================================================
   GLOBAL DESIGN SYSTEM — applied to every page (article body content)
   Brand palette: navy #003163, blue #085294, green #6ba54a
   ========================================================================= */

:root {
  --er-navy:    #003163;
  --er-blue:    #085294;
  --er-green:   #6ba54a;
  --er-text:    #1f2937;
  --er-muted:   #4b5563;
  --er-light:   #6b7280;
  --er-border:  #e5e7eb;
  --er-tint:    #f7f9fc;
  --er-bg:      #ffffff;
  --er-shadow:  0 2px 8px rgba(0,0,0,0.04);
  --er-shadow-lg: 0 8px 24px rgba(0,49,99,0.10);
  --er-radius:  8px;
  --er-radius-lg: 10px;
  --er-container: 1140px;
  --er-pad-y:   48px;
  --er-pad-y-lg: 64px;
}

/* =========================================================================
   TYPOGRAPHY SCALE — applied to all article body content
   ========================================================================= */

.entry-content,
article .entry-content,
.pagelayer-page article .entry-content {
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--er-text);
  line-height: 1.6;
  font-size: 16px;
}

/* Constrain article body width (PageLayer renders us inside its row, so target the inner) */
article .entry-content > * {
  max-width: var(--er-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Full-bleed exceptions: our enhancement sections handle their own width */
article .entry-content > .er-section,
article .entry-content > .er-team {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* Headings */
article .entry-content h1,
.entry-content h1 {
  font-size: 36px;
  line-height: 1.15;
  color: var(--er-navy);
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

article .entry-content h2,
.entry-content h2 {
  font-size: 28px;
  line-height: 1.2;
  color: var(--er-navy);
  font-weight: 700;
  margin: 40px 0 16px;
}

article .entry-content h3,
.entry-content h3 {
  font-size: 22px;
  line-height: 1.3;
  color: var(--er-navy);
  font-weight: 600;
  margin: 32px 0 12px;
}

article .entry-content h4,
.entry-content h4 {
  font-size: 18px;
  line-height: 1.35;
  color: var(--er-navy);
  font-weight: 600;
  margin: 24px 0 8px;
}

article .entry-content h5,
article .entry-content h6 {
  font-size: 16px;
  line-height: 1.4;
  color: var(--er-navy);
  font-weight: 600;
  margin: 20px 0 8px;
}

/* Paragraph spacing */
article .entry-content p {
  margin: 0 0 16px;
  color: var(--er-text);
}

/* Lede / intro paragraph */
article .entry-content p.lede,
article .entry-content > p:first-of-type {
  font-size: 18px;
  line-height: 1.55;
  color: var(--er-muted);
}

/* Lists */
article .entry-content ul,
article .entry-content ol {
  margin: 0 0 16px;
  padding-left: 24px;
}
article .entry-content li {
  margin: 0 0 8px;
  color: var(--er-text);
}

/* Links inside body content (default) */
article .entry-content a {
  color: var(--er-blue);
  text-decoration: underline;
  text-decoration-color: rgba(8, 82, 148, 0.3);
  text-underline-offset: 2px;
  transition: color .15s, text-decoration-color .15s;
}
article .entry-content a:hover {
  color: var(--er-navy);
  text-decoration-color: var(--er-navy);
}

/* Strong/bold */
article .entry-content strong,
article .entry-content b {
  color: var(--er-navy);
  font-weight: 600;
}

/* =========================================================================
   IMAGES — responsive, no layout shift, lazy
   ========================================================================= */

article .entry-content img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  margin: 16px auto;
}

/* Specific image patterns from imported DNN content */
article .entry-content .pagelayer-image-holder img,
article .entry-content figure img {
  border-radius: var(--er-radius);
}

/* =========================================================================
   ARTICLE WRAPPER — give every page a base padding
   ========================================================================= */

article.post,
article.page {
  padding: 32px 0 64px;
}

/* =========================================================================
   COMPONENTS — promoted from homepage inline styles to global
   ========================================================================= */

/* Section bands */
.er-section {
  padding: var(--er-pad-y-lg) 20px;
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--er-text);
  line-height: 1.5;
}
.er-section .er-inner {
  max-width: var(--er-container);
  margin: 0 auto;
}
.er-section h2 {
  font-size: 32px;
  color: var(--er-navy);
  margin: 0 0 8px;
  font-weight: 700;
}
.er-section .er-lede {
  font-size: 18px;
  color: var(--er-muted);
  margin: 0 0 32px;
  max-width: 780px;
}
.er-band-light { background: var(--er-tint); }
.er-band-dark  { background: var(--er-navy); color: #fff; }
.er-band-dark h2,
.er-band-dark p { color: #fff; }

/* Grids */
.er-grid { display: grid; gap: 24px; }
.er-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.er-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.er-grid-2 { grid-template-columns: 1fr 1fr; }

/* Cards */
.er-card {
  background: var(--er-bg);
  border-radius: var(--er-radius);
  padding: 28px;
  border: 1px solid var(--er-border);
  box-shadow: var(--er-shadow);
}
.er-card h3 {
  font-size: 18px;
  color: var(--er-navy);
  margin: 0 0 8px;
  font-weight: 600;
}
.er-card p {
  font-size: 15px;
  color: var(--er-muted);
  margin: 0;
}

/* Steps */
.er-step { display: flex; gap: 16px; align-items: flex-start; }
.er-step-num {
  flex: 0 0 36px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--er-green);
  color: #fff;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.er-step-body h3 {
  margin: 0 0 6px;
  color: var(--er-navy);
  font-size: 18px; font-weight: 600;
}
.er-step-body p { margin: 0; color: var(--er-muted); font-size: 15px; }

/* Trust */
.er-trust {
  display: flex; flex-wrap: wrap;
  justify-content: space-around; gap: 24px;
  text-align: center;
}
.er-trust-item { flex: 1; min-width: 160px; }
.er-trust-num {
  font-size: 36px; font-weight: 700;
  color: var(--er-navy); line-height: 1;
}
.er-trust-lbl {
  font-size: 14px;
  color: var(--er-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Insurance strip */
.er-insurance {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 24px; align-items: center;
}
.er-insurance img {
  height: 40px; width: auto;
  filter: grayscale(100%); opacity: 0.7;
  transition: all .25s;
}
.er-insurance img:hover { filter: none; opacity: 1; }

/* Bottom CTA + form */
.er-cta {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
}
.er-cta-left h2 { color: #fff; font-size: 36px; margin: 0 0 12px; }
.er-cta-left .er-phone {
  display: inline-block;
  font-size: 32px; font-weight: 700;
  color: #fff; text-decoration: none;
  margin: 16px 0 8px;
  border-bottom: 2px solid var(--er-green);
  padding-bottom: 4px;
}
.er-cta-left .er-sub { color: #cbd5e1; font-size: 15px; margin: 0; }

.er-form {
  background: #fff; color: var(--er-text);
  border-radius: var(--er-radius);
  padding: 28px;
}
.er-form h3 { margin: 0 0 6px; color: var(--er-navy); font-size: 20px; }
.er-form .er-form-sub { margin: 0 0 18px; color: var(--er-light); font-size: 14px; }
.er-form label {
  display: block;
  font-size: 13px;
  color: #374151;
  margin-bottom: 4px;
  font-weight: 600;
}
.er-form input[type=text],
.er-form input[type=tel],
.er-form input[type=email],
.er-form select,
.er-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 14px;
  box-sizing: border-box;
  background: #fff;
}
.er-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.er-form-check { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 14px; }
.er-form-check input { margin-top: 3px; }
.er-form-check label {
  font-size: 12px; color: var(--er-light);
  font-weight: 400; line-height: 1.4;
}
.er-form button {
  background: var(--er-green); color: #fff;
  border: 0; padding: 14px 28px;
  border-radius: 6px;
  font-size: 16px; font-weight: 600;
  cursor: pointer; width: 100%;
  transition: background .15s;
}
.er-form button:hover { background: #588c3e; }
.er-form button:disabled { opacity: 0.6; cursor: wait; }
.er-form-msg {
  margin-top: 12px;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  display: none;
}
.er-form-msg.ok {
  display: block;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.er-form-msg.err {
  display: block;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
.er-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}

/* Buttons (general; buttons in body content) */
article .entry-content .btn,
.er-btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--er-navy);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  transition: background .15s;
  border: 0;
  cursor: pointer;
}
article .entry-content .btn:hover,
.er-btn:hover { background: var(--er-blue); }

/* =========================================================================
   TEAM PAGE COMPONENTS — already inline in WP content; mirrored here so
   future edits to the page don't need to re-include them
   ========================================================================= */

.er-team {
  max-width: var(--er-container);
  margin: 0 auto;
  padding: 48px 20px;
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--er-text);
  line-height: 1.5;
}
.er-team h1 {
  font-size: 36px;
  color: var(--er-navy);
  margin: 0 0 12px;
  font-weight: 700;
}
.er-team .er-lede {
  font-size: 18px;
  color: var(--er-muted);
  margin: 0 0 40px;
  max-width: 780px;
}
.er-team-section h2 {
  font-size: 20px;
  color: var(--er-navy);
  margin: 32px 0 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.er-team-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.er-team-card {
  display: block;
  background: #fff;
  border: 1px solid var(--er-border);
  border-radius: var(--er-radius-lg);
  padding: 28px 20px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.er-team-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--er-shadow-lg);
  border-color: #cbd5e1;
  color: inherit;
}
.er-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: 30px; font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
  font-family: 'Roboto', Arial, sans-serif;
}
.er-avatar.c1 { background: linear-gradient(135deg, var(--er-navy), var(--er-blue)); }
.er-avatar.c2 { background: linear-gradient(135deg, var(--er-blue), #1565c0); }
.er-avatar.c3 { background: linear-gradient(135deg, var(--er-green), #558838); }
.er-avatar.c4 { background: linear-gradient(135deg, #3a4d7a, #5b6f9c); }
.er-avatar.c5 { background: linear-gradient(135deg, #4a8f7a, var(--er-green)); }
.er-team-name {
  font-size: 17px; font-weight: 600;
  color: var(--er-navy);
  margin: 0 0 4px;
  line-height: 1.25;
}
.er-team-role {
  font-size: 13px;
  color: var(--er-light);
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.er-view-bio {
  font-size: 13px;
  color: var(--er-blue);
  font-weight: 600;
  text-decoration: none;
}
.er-team-card:hover .er-view-bio { color: var(--er-navy); }
.er-view-bio:after { content: " →"; opacity: 0.6; }
.er-team-note {
  margin-top: 48px;
  padding: 20px;
  background: var(--er-tint);
  border-left: 3px solid var(--er-green);
  border-radius: 6px;
  color: var(--er-muted);
  font-size: 14px;
  max-width: 780px;
}

/* =========================================================================
   RESPONSIVE BREAKPOINTS — consistent across all components
   ========================================================================= */

@media (max-width: 1000px) {
  .er-team-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .er-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .er-grid-3 { grid-template-columns: 1fr; }
  .er-grid-2 { grid-template-columns: 1fr; }
  .er-cta { grid-template-columns: 1fr; }
  .er-section { padding: 48px 16px; }

  article .entry-content h1 { font-size: 28px; }
  article .entry-content h2 { font-size: 24px; }
  article .entry-content h3 { font-size: 20px; }
  article .entry-content > * { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 760px) {
  .er-team-grid { grid-template-columns: repeat(2, 1fr); }
  .er-cta-left h2 { font-size: 28px; }
  .er-cta-left .er-phone { font-size: 24px; }
  .er-form-row { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .er-team-grid { grid-template-columns: 1fr; }
  article .entry-content h1 { font-size: 24px; }
  article .entry-content > p:first-of-type { font-size: 16px; }
}
