/* ═══════════════════════════════════════════════════════════════════════════
   RETEST – Category Page Styles
   ═══════════════════════════════════════════════════════════════════════════
   
   Extends styles.css for category/service pages and legal pages.
   
   Table of Contents:
   ──────────────────
   1. Category Header
   2. Category Hero
   3. Problems List
   4. Bottom CTA Box
   5. Legal Pages
   6. Decorative Elements
   7. Desktop Breakpoint (≥ 900px)
   
   ═══════════════════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────
   1. Category Header
   ───────────────────────────────────────────── */

.cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 64px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.cat-back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--white);
}

.cat-header-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
}


/* ─────────────────────────────────────────────
   2. Category Hero
   ───────────────────────────────────────────── */

.cat-hero {
  background: var(--bg);
  padding: 28px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cat-hero-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 14px;
  background: var(--accent);
  color: var(--black);
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
}

.cat-hero-h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--white);
}

.cat-hero-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}


/* ─────────────────────────────────────────────
   3. Problems List
   ───────────────────────────────────────────── */

.cat-problems {
  background: var(--bg);
  padding: 0 20px 32px;
  display: flex;
  flex-direction: column;
}

.cat-problem {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-problem-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cat-problem-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.cat-problem-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.cat-problem-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
}

.cat-problem-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 4px;
}

.cat-problem-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-problem-list li {
  font-size: 14px;
  color: var(--white);
  line-height: 1.4;
  padding-left: 14px;
  position: relative;
}

.cat-problem-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--text-secondary);
  font-weight: 600;
}


/* ─────────────────────────────────────────────
   4. Bottom CTA Box
   ───────────────────────────────────────────── */

.cat-bottom-cta-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.cat-bottom-cta-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  text-align: center;
}

.cat-bottom-cta-sub {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
}

.cat-bottom-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  width: 100%;
  background: var(--accent);
  border-radius: 12px;
  text-decoration: none;
  margin-top: 8px;
}

.cat-bottom-btn-primary:hover {
  background: var(--accent-hover);
}

.cat-bottom-btn-primary span {
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
}

.cat-bottom-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  width: 100%;
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  text-decoration: none;
}

.cat-bottom-btn-secondary span {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
}


/* ─────────────────────────────────────────────
   5. Legal Pages
   ───────────────────────────────────────────── */

.legal-content .cat-problem {
  gap: 10px;
}

.legal-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.legal-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.legal-link:hover {
  text-decoration: underline;
}


/* ─────────────────────────────────────────────
   6. Decorative Elements
   ───────────────────────────────────────────── */

.cat-hero,
.cat-problems {
  position: relative;
  overflow: hidden;
}

.cat-hero > *:not(.deco),
.cat-problems > *:not(.deco) {
  position: relative;
  z-index: 1;
}


/* ─────────────────────────────────────────────
   7. Desktop Breakpoint (≥ 900px)
   ───────────────────────────────────────────── */

@media (min-width: 900px) {

  /* ── Header ── */
  .cat-header {
    padding: 0 40px;
    height: 76px;
  }

  .cat-header-title { font-size: 18px; }

  /* ── Hero (two columns) ── */
  .cat-hero {
    background: var(--black);
    padding: 56px max(40px, calc((100% - 1200px) / 2));
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "badge sub"
      "title sub";
    gap: 8px 40px;
    align-items: end;
  }

  .cat-hero-badge {
    grid-area: badge;
    align-self: start;
    justify-self: start;
  }

  .cat-hero-h1 {
    grid-area: title;
    font-size: 40px;
  }

  .cat-hero-h1 br { display: none; }

  .cat-hero-sub {
    grid-area: sub;
    font-size: 15px;
    text-align: right;
    align-self: end;
    color: var(--text-light);
  }

  /* ── Problems (2-column card grid) ── */
  .cat-problems {
    padding: 48px 40px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
  }

  .cat-problem {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    gap: 10px;
  }

  .cat-problem-title { font-size: 22px; }

  /* ── CTA Box (inside grid) ── */
  .cat-bottom-cta-box {
    margin-top: 0;
    padding: 32px;
    align-self: start;
    gap: 10px;
  }

  .cat-bottom-cta-title { font-size: 20px; }

  .cat-bottom-btn-primary,
  .cat-bottom-btn-secondary {
    height: 44px;
    width: auto;
    min-width: 220px;
    padding: 0 24px;
    margin-top: 0;
  }

  .cat-bottom-btn-primary span,
  .cat-bottom-btn-secondary span {
    font-size: 14px;
  }
}
