/* ==================================================
   WORKWARS CORE CSS v3 — FINAL SYSTEM
   Foundation: tokens, typography, layout, components
================================================== */

/* ===== DESIGN TOKENS ===== */

:root {
  --gold:        #c8a96a;
  --gold-dark:   #a28547;

  --blue:        #2563eb;
  --blue-dark:   #1d4ed8;

  --navy:        #0f172a;
  --navy-deep:   #081421;

  --bg:          #f8fafc;
  --glass:       rgba(255,255,255,0.65);

  --text:        #0f172a;
  --text-light:  #334155;

  --border:      #e2e8f0;

  --radius:      10px;
  --radius-lg:   16px;

  --shadow-sm:   0 2px 6px rgba(0,0,0,0.04);
  --shadow-md:   0 10px 25px rgba(0,0,0,0.08);
  --shadow-lg:   0 20px 50px rgba(0,0,0,0.12);

  --transition:  all 0.25s ease;
}

/* ===== GLOBAL RESET ===== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  background: #ffffff;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ===== TYPOGRAPHY ===== */

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  margin-top: 0;
  line-height: 1.2;
}

h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: -0.6px;
}

h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  margin-top: 40px;
}

h3 {
  font-size: 18px;
  font-weight: 700;
}

h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-light);
}

ul, ol {
  padding-left: 22px;
}

li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 8px;
}

/* ===== LINKS ===== */

a {
  color: var(--blue);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  text-decoration: underline;
}

/* ===== BUTTON SYSTEM ===== */

.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 800;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

/* shine sweep */
.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 50%;
  height: 100%;
  background: rgba(255,255,255,0.2);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.btn:hover::after {
  left: 120%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn:active {
  transform: scale(0.96);
}

/* ===== CONTAINER ===== */

.container {
  max-width: 1000px;
  margin: auto;
  padding: 60px 20px;
  background: #ffffff;
}

/* Full-width white background for the entire content area below the lawyer banner */
.container,
.container ~ * {
  position: relative;
  z-index: 2;
}

/* ===== GLASS CARD ===== */

.glass-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ===== URGENCY CLUSTER ===== */

.worker-urgency-cluster {
  margin-top: 60px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  transition: var(--transition);
}

.worker-urgency-cluster:hover {
  box-shadow: var(--shadow-lg);
}

/* ===== DEADLINE WARNING ===== */

.deadline-warning {
  background: linear-gradient(135deg, #fff5f5, #ffe4e6);
  /* FIX: enough left padding so the ⚠ pseudo-element clears the border */
  padding: 30px 30px 30px 48px;
  border-left: 5px solid #dc2626;
  position: relative;
}

.deadline-warning::before {
  content: "⚠";
  position: absolute;
  /* FIX: pushed right of the 5px border, not overlapping text */
  left: 18px;
  top: 28px;
  font-size: 18px;
  line-height: 1;
}

.deadline-warning h3 {
  color: #b91c1c;
}

.deadline-warning p {
  font-size: 15px;
}

/* ===== DEADLINE NOTE ===== */
/* FIX: was missing entirely — used on every library page */

.deadline-note {
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
  margin: 12px 0 0 0;
}

/* ===== COUNTRY DEADLINE GRID ===== */

.country-deadlines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

/* ===== DEADLINE CARD ===== */

.deadline-card {
  background: #ffffff;
  border: 1px solid #fecaca;
  padding: 18px;
  border-radius: var(--radius);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.deadline-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.deadline-card strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 6px;
}

/* FIX: span was inline — needs block so it stacks under the country name */
.deadline-card span {
  display: block;
  color: #dc2626;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 4px;
}

.deadline-card p {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
}

/* ===== CTA BANNER ===== */

.app-cta-banner {
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  color: #fff;
  text-align: center;
  padding: 40px 20px;
}

/* FIX: both h3 and h4 used as the CTA heading — make both gold + Montserrat */
.app-cta-banner h3,
.app-cta-banner h4 {
  color: var(--gold);
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
}

.app-cta-banner p {
  color: #cbd5e1;
}

.app-cta-banner .btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  margin-top: 8px;
}

/* ===== INTENT GRID (legacy — kept for backward compat) ===== */

.intent-cluster-links {
  padding: 30px;
  background: #ffffff;
}

.intent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.intent-grid a {
  display: block;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-light);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.intent-grid a:hover {
  transform: translateY(-3px);
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

/* ===== SCROLL REVEAL ===== */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  /* FIX: shorthand without property name is unreliable — be explicit */
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== GLOBAL HOTLINE WRAPPER ===== */
/* Fix: border-top was stacking on 3 nested divs — only outermost should have it */

.global-hotline-wrapper .global-hotline-wrapper,
.hotline-pulse-glo {
  border-top: none !important;
  border-bottom: none !important;
}

/* Mobile: extra lines still visible — strip all borders from nested wrappers */
@media (max-width: 768px) {
  .global-hotline-wrapper .global-hotline-wrapper,
  .global-hotline-wrapper .global-hotline-wrapper *,
  .hotline-pulse-glo,
  .hotline-pulse-glo * {
    border-top: none !important;
    border-bottom: none !important;
    outline: none !important;
    box-shadow: none !important;
  }
}

/* ===== FOOTER ===== */
/* FIX: .footer-disclosure used on every page but was never defined */

.footer-disclosure {
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  text-align: center;
  background: #f8fafc;
}

.footer-disclosure p {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 8px 0;
}

.recaptcha-text {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.6;
}

.recaptcha-text a {
  color: #64748b;
}

/* ===== MOBILE ===== */

@media (max-width: 768px) {

  .container {
    padding: 40px 15px;
  }

  h1 {
    font-size: 28px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .country-deadlines {
    grid-template-columns: 1fr 1fr;
  }

  .deadline-warning {
    padding: 28px 20px 28px 44px;
  }

}

@media (max-width: 480px) {

  .country-deadlines {
    grid-template-columns: 1fr;
  }

}

/* ===== NOTE / INFO CALLOUT ===== */
/* Used as <div class="note"> in article pages */

.note {
  background: #eff6ff;
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 20px 0;
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
}

.note strong {
  color: var(--blue-dark);
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== SECTION TITLE ===== */
/* Used as <h2 class="section-title"> in intent-cluster-links */

.section-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--navy);
  margin-top: 0;
  margin-bottom: 20px;
}

/* ===== INTERNAL LINK ===== */
/* Used as <a class="ww-internal-link"> within article prose */

.ww-internal-link {
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(37,99,235,0.3);
  text-underline-offset: 2px;
  transition: var(--transition);
}

.ww-internal-link:hover {
  color: var(--blue-dark);
  text-decoration-color: var(--blue);
}

/* ===== FAQ SECTION ===== */
/* Handles two patterns:
   1. <details class="faq-item"><summary>Q</summary><p>A</p></details>
   2. Plain <p><strong>Q?</strong></p><p>A</p> pattern (ChatGPT-generated pages)
   3. <dt>/<dd> definition list pattern
*/

/* Pattern 1: <details> accordion */
.faq-section {
  margin-top: 40px;
}

.faq-section h2,
.faq-section > h2 {
  color: var(--navy);
  margin-bottom: 20px;
}

details.faq-item,
.faq-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

details.faq-item:hover,
.faq-item:hover {
  box-shadow: var(--shadow-md);
}

details.faq-item summary,
.faq-question {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Montserrat', sans-serif;
  background: #f8fafc;
  border-bottom: 1px solid transparent;
}

details.faq-item[open] summary {
  border-bottom-color: var(--border);
  color: var(--blue-dark);
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
  flex-shrink: 0;
  margin-left: 12px;
  transition: transform 0.2s ease;
}

details.faq-item[open] summary::after {
  transform: rotate(45deg);
}

details.faq-item p,
.faq-answer {
  padding: 16px 20px;
  margin: 0;
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
  background: #ffffff;
}

/* Pattern 2: Plain paragraph FAQ (ChatGPT article style)
   <h2>Frequently Asked Questions</h2>
   <p><strong>Q?</strong></p>
   <p>A text</p>
   Wrap with .faq-prose for clean stacking */

.faq-prose p strong:only-child,
.container > h2 + p > strong:first-child {
  display: block;
  color: var(--navy);
  font-size: 15px;
  font-family: 'Montserrat', sans-serif;
  margin-top: 20px;
  margin-bottom: 4px;
}

/* Pattern 2 fallback: style FAQ when it's just raw <p><strong>Q</strong>A</p> 
   (the wages page pattern — Q and A on same line) */
.faq-block {
  background: #f8fafc;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
  border: 1px solid var(--border);
}

.faq-block p {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.faq-block p:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.faq-block p strong {
  display: block;
  color: var(--navy);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

/* Pattern 3: dl/dt/dd FAQ */
.faq-section dl {
  margin: 0;
}

.faq-section dt {
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: var(--navy);
  font-size: 15px;
  margin-top: 20px;
  padding-left: 16px;
  border-left: 3px solid var(--gold);
}

.faq-section dd {
  margin-left: 0;
  padding: 10px 16px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.7;
}

/* ===== ARTICLE PROSE — h2 spacing within container ===== */
/* Adds visual hierarchy to plain h2/p sequences in article bodies */

.container > h2 {
  margin-top: 40px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.container > h2:first-of-type {
  border-top: none;
  margin-top: 24px;
}

/* ===== WHAT TO DO NEXT / NUMBERED STEPS ===== */
/* Styles <ol> within .container to look like proper step cards */

.container > ol,
.steps-list {
  padding-left: 0;
  list-style: none;
  counter-reset: steps;
  margin-top: 16px;
}

.container > ol > li,
.steps-list li {
  counter-increment: steps;
  padding: 14px 18px 14px 52px;
  position: relative;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
}

.container > ol > li::before,
.steps-list li::before {
  content: counter(steps);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  font-family: 'Montserrat', sans-serif;
  flex-shrink: 0;
}

/* ===== EMPLOYER TACTICS / WARNING LIST ===== */
/* Styles <ul> in employer-tactic sections */

.container > ul,
.tactics-list {
  list-style: none;
  padding-left: 0;
  margin-top: 12px;
}

.container > ul > li,
.tactics-list li {
  padding: 10px 14px 10px 36px;
  position: relative;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
  border-left: 3px solid #e2e8f0;
  background: #fafafa;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.container > ul > li::before,
.tactics-list li::before {
  content: "→";
  position: absolute;
  left: 12px;
  color: var(--gold);
  font-weight: 900;
}

