/* =====================================================
   Terms & Conditions Page — Premium Styles
   Sunshine Home Painting Service · 2026
   ====================================================== */

/* ---------- Category Tabs ---------- */
.terms-tab-section {
  background: #f3f4f6;
  padding: 0 20px 24px;
}
.terms-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto;
  justify-content: center;
}
.terms-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border: 2px solid #d5f0ec;
  border-radius: 50px;
  background: #fff;
  color: #475569;
  font-size: .88rem;
  font-weight: 600;
  font-family: 'Rubik', Arial, sans-serif;
  cursor: pointer;
  transition: all .25s cubic-bezier(.22,1,.36,1);
  white-space: nowrap;
}
.terms-tab svg {
  flex-shrink: 0;
  opacity: .6;
  transition: opacity .25s;
}
.terms-tab:hover {
  border-color: #60c3ad;
  color: #3a8f76;
  background: #f0fdf9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(96,195,173,.15);
}
.terms-tab:hover svg { opacity: 1; }
.terms-tab.active {
  background: linear-gradient(135deg, #60c3ad, #3ee3d8);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(96,195,173,.3);
}
.terms-tab.active svg { opacity: 1; fill: #fff; }

/* ---------- Payment Schedule Grid ---------- */
.payment-schedule-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.ps-item {
  background: linear-gradient(135deg, #f0fdf9, #e0f5f0);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  border: 1px solid rgba(96,195,173,.15);
  transition: transform .2s;
}
.ps-item:hover { transform: translateY(-2px); }
.ps-percent {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: #60c3ad;
  line-height: 1.2;
}
.ps-label {
  display: block;
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #1a202c;
  margin-top: 4px;
}
.ps-desc {
  display: block;
  font-size: .78rem;
  color: #64748b;
  margin-top: 2px;
}

/* ---------- Filtered / hidden blocks ---------- */
.terms-block.terms-hidden,
.terms-toc li.terms-hidden {
  display: none;
}

/* ---------- Layout ---------- */
.terms-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

/* ---------- Sticky sidebar TOC ---------- */
.terms-sidebar {
  position: sticky;
  top: 100px;
}
.terms-toc {
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,.05);
}
.terms-toc h3 {
  font-size: .95rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.terms-toc h3 svg { width: 18px; height: 18px; fill: #60c3ad; }
.terms-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.terms-toc li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: .84rem;
  color: #475569;
  text-decoration: none;
  border-radius: 8px;
  transition: all .2s;
  font-weight: 500;
}
.terms-toc li a:hover,
.terms-toc li a.toc-active {
  background: #f0fdf9;
  color: #60c3ad;
}
.terms-toc li a .toc-num {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f3f4f6;
  font-size: .72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex-shrink: 0;
  transition: all .2s;
}
.terms-toc li a:hover .toc-num,
.terms-toc li a.toc-active .toc-num {
  background: #60c3ad;
  color: #fff;
}

/* ---------- Main content area ---------- */
.terms-content {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 4px 24px rgba(0,0,0,.05);
}
.terms-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf9;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: .82rem;
  color: #60c3ad;
  font-weight: 600;
  margin-bottom: 28px;
}

/* ---------- Section blocks ---------- */
.terms-block {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid #f1f5f9;
  scroll-margin-top: 100px;
}
.terms-block:last-child { border-bottom: none; margin-bottom: 0; }
.terms-block h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.terms-block h2 .tb-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #60c3ad, #3ee3d8);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.terms-block p {
  font-size: .94rem;
  color: #475569;
  line-height: 1.75;
  margin-bottom: 10px;
  word-break: break-all;
}
.terms-block ul,
.terms-block ol {
  padding-left: 0;
  list-style: none;
  margin-bottom: 10px;
}
.terms-block li {
  font-size: .92rem;
  color: #475569;
  line-height: 1.7;
  padding: 5px 0 5px 26px;
  position: relative;
  word-break: break-all;
}
.terms-block li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #60c3ad;
}
.terms-block a {
  color: #60c3ad;
  text-decoration: none;
  font-weight: 500;
}
.terms-block a:hover { text-decoration: underline; }

/* ---------- Contact block at bottom ---------- */
.terms-contact-block {
  background: linear-gradient(135deg, #f0fdf9, #e0f5f0);
  border-radius: 14px;
  padding: 24px 28px;
  margin-top: 8px;
}
.terms-contact-block h2 { color: #1a202c; }
.terms-contact-block ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
}
.terms-contact-block li {
  padding: 0;
}
.terms-contact-block li::before { display: none; }
.terms-contact-block li a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  border-radius: 50px;
  font-size: .88rem;
  color: #334155;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: all .2s;
}
.terms-contact-block li a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  text-decoration: none;
}
.terms-contact-block li a svg { width: 16px; height: 16px; fill: #60c3ad; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .terms-layout {
    grid-template-columns: 1fr;
  }
  .terms-sidebar { position: static; display: none; }
  .terms-toc ol { flex-direction: row; flex-wrap: wrap; }
  .terms-toc li a { font-size: .78rem; padding: 5px 8px; }
  .terms-tabs {
    flex-direction: column;
    align-items: stretch;
  }
  .terms-tab {
    justify-content: center;
    width: 100%;
  }
  .payment-schedule-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .terms-content { padding: 24px 18px; }
  .terms-toc { padding: 16px; }
  .terms-tab-section { padding: 0 16px 20px; }
  .terms-tab { font-size: .82rem; padding: 9px 16px; }
  .payment-schedule-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .ps-percent { font-size: 1.3rem; }
  .ps-item { padding: 14px 10px; }
}
