/* How It Works dedicated styling */

/* Hero matches homepage vibe with overlay */
.hiw-hero {
  padding: 110px 0 70px;
  background: linear-gradient(135deg, #2b0f52 0%, #5b21b6 55%, #7c3aed 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hiw-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.00) 55%);
  transform: skewY(-8deg);
  transform-origin: top left;
  opacity: 0.9;
  pointer-events: none;
}

.hiw-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hiw-hero h1 {
  margin: 0 0 14px;
  font-size: 52px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hiw-hero p {
  margin: 0 auto 24px;
  max-width: 760px;
  font-size: 18px;
  opacity: 0.95;
  line-height: 1.6;
}

.hiw-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.hiw-hero-actions a,
.hiw-bottom-cta a {
  text-decoration: none;
}

.hiw-hero-actions a:hover,
.hiw-bottom-cta a:hover {
  text-decoration: none;
}

/* Buttons match homepage hover lift and visibility */
.hiw-hero-actions .btn {
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
  will-change: transform;
}

.hiw-hero-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.18);
}

.hiw-hero-actions .btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.14);
}

.hiw-hero-actions .btn.btn-primary {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}

.hiw-hero-actions .btn.btn-primary:hover {
  background: #6d28d9;
  border-color: #6d28d9;
}

.hiw-hero-actions .btn.btn-outline {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #fff;
}

.hiw-hero-actions .btn.btn-outline:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.58);
}

/* Panel colour differentiation */
.hiw-panel-employers {
  background: linear-gradient(180deg, rgba(124,58,237,0.06) 0%, #ffffff 55%);
  border-color: rgba(124,58,237,0.18);
}

.hiw-panel-employees {
  background: linear-gradient(180deg, rgba(14,165,233,0.06) 0%, #ffffff 55%);
  border-color: rgba(14,165,233,0.18);
}

/* Match the kicker badge colour to the panel */
.hiw-panel-employers .hiw-kicker {
  color: #5b21b6;
  background: rgba(124,58,237,0.14);
}

.hiw-panel-employees .hiw-kicker {
  color: #0369a1;
  background: rgba(14,165,233,0.14);
}

/* Slightly adjust step icon gradients inside each panel */
.hiw-panel-employers .hiw-icon {
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
}

.hiw-panel-employees .hiw-icon {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
}

/* Body */
.hiw-body {
  padding: 56px 0 90px;
  background: #fff;
}

.hiw-intro {
  max-width: 820px;
  margin: 0 auto 42px;
  font-size: 17px;
  color: #374151;
  line-height: 1.7;
}

/* Two panels */
.hiw-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 64px;
}

.hiw-panel {
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 12px 35px rgba(17, 24, 39, 0.06);
}

.hiw-panel-head {
  margin-bottom: 18px;
}

.hiw-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5b21b6;
  background: rgba(91, 33, 182, 0.10);
  padding: 8px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.hiw-panel h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #111827;
  letter-spacing: -0.01em;
}

.hiw-panel p {
  margin: 0;
  color: #4b5563;
  line-height: 1.6;
  font-size: 14px;
}

/* Steps */
.hiw-steps {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.hiw-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: #f9fafb;
  border: 1px solid #eef2f7;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.hiw-step:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
}

.hiw-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6d28d9 0%, #0ea5e9 100%);
  color: #fff;
  font-weight: 800;
}

.hiw-step-content h3 {
  margin: 2px 0 6px;
  font-size: 15px;
  color: #111827;
}

.hiw-step-content p {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.55;
}

/* FAQ redesigned */
.hiw-faq {
  max-width: 980px;
  margin: 0 auto 70px;
}

.hiw-faq-head {
  text-align: center;
  margin-bottom: 26px;
}

.hiw-faq-head h2 {
  margin: 0 0 10px;
  font-size: 30px;
  color: #2b0f52;
  letter-spacing: -0.01em;
}

.hiw-faq-head p {
  margin: 0;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.6;
}

.hiw-faq-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.hiw-faq-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid #eef2f7;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
}

.hiw-faq-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.12);
  color: #5b21b6;
  font-weight: 700;
  font-size: 16px;
}

.hiw-faq-card h3 {
  margin: 2px 0 8px;
  font-size: 15px;
  color: #111827;
}

.hiw-faq-card p {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
}

/* Bottom CTA */
.hiw-bottom-cta {
  margin-top: 30px;
}

.hiw-bottom-cta-inner {
  border-radius: 18px;
  padding: 56px 22px;
  text-align: center;
  background: linear-gradient(90deg, #6d28d9 0%, #0ea5e9 100%);
  color: #fff;
}

.hiw-bottom-cta-inner h2 {
  margin: 0 0 10px;
  font-size: 28px;
  color: #fff;
}

.hiw-bottom-cta-inner p {
  margin: 0 auto 22px;
  max-width: 720px;
  opacity: 0.95;
  line-height: 1.55;
}

/* Responsive */
@media (max-width: 980px) {
  .hiw-columns {
    grid-template-columns: 1fr;
  }

  .hiw-faq-grid {
    grid-template-columns: 1fr;
  }

  .hiw-hero {
    padding: 96px 0 60px;
  }

  .hiw-hero h1 {
    font-size: 42px;
  }
}

@media (max-width: 520px) {
  .hiw-hero h1 {
    font-size: 34px;
  }

  .hiw-panel {
    padding: 18px;
  }

  .hiw-step {
    grid-template-columns: 36px 1fr;
  }

  .hiw-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
}

.success-message,
.error-message {
  max-width: 760px;
  margin: 18px auto 0;
  padding: 16px 20px;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
}

.success-message {
  background: rgba(34,197,94,0.12);
  color: #065f46;
  border: 1px solid rgba(34,197,94,0.25);
}

.error-message {
  background: rgba(239,68,68,0.10);
  color: #7f1d1d;
  border: 1px solid rgba(239,68,68,0.20);
}

/* =========================================================
   PATCH: Public pages overriding shared components
   Add this at the VERY END of /css/how-it-works.css
   ========================================================= */

/* -------- Buttons: restore shared look + hover -------- */
.hiw-hero .btn,
.hiw-body .btn,
.hiw-bottom-cta .btn {
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  font-size: 14px;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s, border-color 0.25s;
}

.hiw-hero .btn-primary,
.hiw-body .btn-primary,
.hiw-bottom-cta .btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(138, 43, 226, 0.25);
}

.hiw-hero .btn-primary:hover,
.hiw-body .btn-primary:hover,
.hiw-bottom-cta .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(138, 43, 226, 0.35);
}

.hiw-hero .btn-outline,
.hiw-body .btn-outline,
.hiw-bottom-cta .btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.hiw-hero .btn-outline:hover,
.hiw-body .btn-outline:hover,
.hiw-bottom-cta .btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(138, 43, 226, 0.20);
}

/* On dark hero: outline button must be readable */
.hiw-hero .btn-outline {
  border-color: rgba(255, 255, 255, 0.85);
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
}

.hiw-hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.90);
}

/* -------- Hero pills: fix white-on-white readability -------- */
/* If your hero uses pills/chips, make them high-contrast on the gradient */
.hiw-hero .hiw-pill,
.hiw-hero .hiw-meta-pill,
.hiw-hero .hiw-tag,
.hiw-hero .hiw-chip {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.70);
  color: var(--dark);
  font-weight: 800;
}

.hiw-hero .hiw-pill strong,
.hiw-hero .hiw-meta-pill strong,
.hiw-hero .hiw-tag strong,
.hiw-hero .hiw-chip strong {
  color: var(--primary-dark);
}

/* If the “icons” are separate spans, darken them too */
.hiw-hero .hiw-pill svg,
.hiw-hero .hiw-meta-pill svg,
.hiw-hero .hiw-pill i,
.hiw-hero .hiw-meta-pill i {
  color: var(--dark);
  opacity: 0.9;
}


/* =========================================================
   Public For Employers page
   Scoped to #public-for-employers only
   ========================================================= */

#public-for-employers{
  --pfe-radius:16px;
  --pfe-border:color-mix(in srgb, var(--primary) 12%, transparent);
  --pfe-shadow:0 10px 30px color-mix(in srgb, var(--dark) 14%, transparent);
  --pfe-shadow-strong:0 18px 45px color-mix(in srgb, var(--primary) 18%, transparent);
}

#public-for-employers .pfe-flash{
  max-width:var(--container);
  margin:14px auto 0;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--pfe-border);
  box-shadow:0 10px 22px color-mix(in srgb, var(--dark) 10%, transparent);
  font-weight:800;
  font-size:14px;
}

#public-for-employers .pfe-flash-success{
  background:color-mix(in srgb, var(--success) 14%, #fff);
  color:color-mix(in srgb, var(--dark) 80%, var(--success));
  border-color:color-mix(in srgb, var(--success) 30%, transparent);
}

#public-for-employers .pfe-flash-error{
  background:color-mix(in srgb, #EF4444 12%, #fff);
  color:color-mix(in srgb, var(--dark) 80%, #EF4444);
  border-color:color-mix(in srgb, #EF4444 28%, transparent);
}

#public-for-employers .pfe-hero{
  position:relative;
  overflow:hidden;
  padding:86px 0 70px;
  color:#fff;
  background:linear-gradient(135deg, var(--dark) 0%, color-mix(in srgb, var(--primary) 55%, var(--dark)) 100%);
}

#public-for-employers .pfe-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--accent) 20%, transparent) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, color-mix(in srgb, var(--secondary) 18%, transparent) 0%, transparent 42%),
    radial-gradient(circle at 40% 90%, color-mix(in srgb, var(--primary) 18%, transparent) 0%, transparent 45%);
  pointer-events:none;
  opacity:0.95;
}

#public-for-employers .pfe-hero .container{ position:relative; z-index:1; }
#public-for-employers .pfe-hero-wrap{ max-width:920px; }

#public-for-employers .pfe-hero h1{
  font-size:52px;
  line-height:1.06;
  letter-spacing:-0.6px;
  margin-bottom:14px;
}

#public-for-employers .pfe-hero p{
  font-size:18px;
  opacity:0.92;
  font-weight:650;
  max-width:760px;
  margin-bottom:18px;
}

#public-for-employers .pfe-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}

#public-for-employers .pfe-body{
  padding:72px 0 40px;
  background:var(--light);
}

#public-for-employers .pfe-card{
  background:#fff;
  border:1px solid var(--pfe-border);
  border-radius:calc(var(--pfe-radius) + 4px);
  box-shadow:0 22px 50px color-mix(in srgb, var(--dark) 12%, transparent);
  padding:22px;
}

#public-for-employers .pfe-card h2{
  margin:0 0 8px;
  font-size:28px;
  font-weight:950;
  letter-spacing:-0.3px;
  color:var(--dark);
}

#public-for-employers .pfe-card p{
  margin:0 0 16px;
  color:var(--gray);
  font-weight:650;
  max-width:860px;
}

#public-for-employers .demo-form{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:8px;
}

#public-for-employers .demo-form .full{ grid-column:1 / -1; }

#public-for-employers .demo-form label{
  display:block;
  font-size:13px;
  font-weight:700;
  color:var(--dark);
  margin:0 0 6px;
}

#public-for-employers .demo-form input,
#public-for-employers .demo-form textarea,
#public-for-employers .demo-form select{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid color-mix(in srgb, var(--dark) 12%, transparent);
  background:#fff;
  font-weight:650;
  outline:none;
  transition:border-color .2s, box-shadow .2s;
}

#public-for-employers .demo-form textarea{ resize:vertical; min-height:120px; }

#public-for-employers .demo-form input:focus,
#public-for-employers .demo-form textarea:focus,
#public-for-employers .demo-form select:focus{
  border-color:color-mix(in srgb, var(--primary) 40%, transparent);
  box-shadow:0 0 0 6px color-mix(in srgb, var(--primary) 14%, transparent);
}

#public-for-employers .demo-form .form-note{
  grid-column:1 / -1;
  font-size:13px;
  color:var(--gray);
  font-weight:650;
  margin-top:-2px;
}

#public-for-employers .demo-form .actions{
  grid-column:1 / -1;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:6px;
}

#public-for-employers .pfe-chips{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:14px 0 0;
}

/* Fix chip readability on gradient hero */
#public-for-employers .pfe-chip{
  background:rgba(255,255,255,0.92);
  border:1px solid rgba(255,255,255,0.70);
  color:var(--dark);
  padding:8px 10px;
  border-radius:999px;
  font-size:13px;
  font-weight:850;
}

@media (max-width:992px){
  #public-for-employers .pfe-hero h1{ font-size:42px; }
  #public-for-employers .demo-form{ grid-template-columns:1fr; }
}

@media (max-width:768px){
  #public-for-employers .pfe-hero{ padding:76px 0 62px; }
  #public-for-employers .pfe-hero h1{ font-size:36px; }
}
