/* =========================================================
   BOOKBRAIDS — TERMS & CONDITIONS
========================================================= */

.terms-page {
  background: #faf8f5;
  color: #171717;
}

.terms-main {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}


/* =========================================================
   HERO
========================================================= */

.terms-hero {
  padding: 96px 28px 76px;
  background: linear-gradient(135deg, #fff8f3 0%, #f7ede7 55%, #f3e5dc 100%);
  border-bottom: 1px solid rgba(23, 23, 23, 0.08);
}

.terms-hero-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.terms-hero .eyebrow {
  margin: 0 0 18px;
  color: #b94f1d;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.terms-hero h1 {
  max-width: 900px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.6rem, 7vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  color: #1f1612;
}

.terms-hero-desc {
  max-width: 720px;
  margin: 30px 0 0;
  font-size: 1.08rem;
  line-height: 1.75;
  color: #625d59;
}

.terms-updated {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 30px 0 0;
  color: #726b66;
  font-size: 0.92rem;
}

.terms-updated strong {
  color: #292522;
  font-weight: 700;
}


/* =========================================================
   MAIN LAYOUT
========================================================= */

.terms-layout {
  width: min(1180px, calc(100% - 56px));
  margin: 0 auto;
  padding: 72px 0 110px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}

.terms-content {
  min-width: 0;
}


/* =========================================================
   STICKY NAVIGATION
========================================================= */

.terms-navigation {
  position: sticky;
  top: 112px;
  max-height: calc(100vh - 140px);
  padding: 4px 8px 24px 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.terms-navigation-title {
  margin: 0 0 18px;
  color: #a74317;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.terms-navigation nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.terms-navigation a {
  display: block;
  padding: 9px 11px;
  border-radius: 10px;
  color: #6d6762;
  text-decoration: none;
  font-size: 0.86rem;
  line-height: 1.4;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.terms-navigation a:hover {
  background: #f3e9e3;
  color: #8a2f0b;
  transform: translateX(3px);
}


/* =========================================================
   TERMS SECTIONS
========================================================= */

.terms-section {
  position: relative;
  padding: 0 0 58px;
  margin: 0 0 58px;
  border-bottom: 1px solid #e8e2dd;
  scroll-margin-top: 120px;
}

.terms-section:last-child {
  margin-bottom: 0;
}

.terms-section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  padding: 0 11px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: #f3e5dc;
  color: #8a2f0b;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.terms-section h2 {
  max-width: 820px;
  margin: 0 0 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: #1f1a17;
}

.terms-section h3 {
  margin: 0 0 8px;
}

.terms-section > p {
  max-width: 850px;
  margin: 0 0 17px;
  color: #5f5a56;
  font-size: 1rem;
  line-height: 1.8;
}

.terms-section > p:last-child {
  margin-bottom: 0;
}

.terms-section a {
  color: #8a2f0b;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}


/* =========================================================
   LISTS
========================================================= */

.terms-list {
  max-width: 850px;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
  list-style: none;
}

.terms-list li {
  position: relative;
  padding: 16px 18px 16px 46px;
  border: 1px solid #e8e1dc;
  border-radius: 14px;
  background: #fff;
  color: #554f4b;
  line-height: 1.65;
}

.terms-list li::before {
  content: "✓";
  position: absolute;
  left: 17px;
  top: 15px;
  color: #a74317;
  font-weight: 900;
}


/* =========================================================
   INFORMATION BOXES
========================================================= */

.terms-note,
.terms-warning {
  max-width: 850px;
  margin: 26px 0 0;
  padding: 23px 25px;
  border-radius: 17px;
}

.terms-note {
  background: #f8efe9;
  border: 1px solid #ead7ca;
}

.terms-warning {
  background: #fff8e9;
  border: 1px solid #eedeb0;
}

.terms-note strong,
.terms-warning strong {
  display: block;
  margin-bottom: 7px;
  color: #24211f;
  font-size: 1rem;
}

.terms-note p,
.terms-warning p {
  margin: 0;
  color: #625d59;
  line-height: 1.7;
}


/* =========================================================
   THIRD PARTY PROVIDERS
========================================================= */

.terms-provider-grid {
  max-width: 850px;
  margin: 26px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.terms-provider-grid article {
  min-width: 0;
  padding: 25px;
  background: #fff;
  border: 1px solid #e6dfda;
  border-radius: 18px;
}

.terms-provider-grid strong {
  display: block;
  margin-bottom: 9px;
  color: #24211f;
  font-size: 1.05rem;
}

.terms-provider-grid p {
  margin: 0;
  color: #68615d;
  line-height: 1.68;
}


/* =========================================================
   CONTACT CARD
========================================================= */

.terms-contact-card {
  width: 100%;
  max-width: 850px;
  box-sizing: border-box;
  margin-top: 28px;
  padding: 30px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: #211b18;
  color: #fff;
  border-radius: 22px;
}

.terms-contact-card > div {
  min-width: 0;
  flex: 1;
}

.terms-contact-card .eyebrow {
  margin: 0 0 8px;
  color: #d7a98f;
}

.terms-contact-card h3 {
  margin: 0;
  max-width: 480px;
  color: #fff;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.terms-contact-card .btn-main {
  width: auto !important;
  min-width: 130px;
  max-width: 190px;
  flex: 0 0 auto;
  white-space: nowrap;
  justify-content: center;
}


/* =========================================================
   FINAL LEGAL CTA
========================================================= */

.terms-final-section {
  width: min(1180px, calc(100% - 56px));
  box-sizing: border-box;
  margin: 0 auto 110px;
  padding: 52px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  border-radius: 28px;
  background: #211b18;
  color: #fff;
}

.terms-final-section > div:first-child {
  min-width: 0;
  flex: 1;
}

.terms-final-section .eyebrow {
  color: #d7a98f;
}

.terms-final-section h2 {
  max-width: 680px;
  margin: 10px 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: #fff;
}

.terms-final-section p {
  max-width: 640px;
  margin: 0;
  color: #c8bfba;
  line-height: 1.7;
}

.terms-final-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.terms-final-actions .btn-main,
.terms-final-actions .secondary-btn {
  width: auto !important;
  min-width: 145px;
  justify-content: center;
  white-space: nowrap;
}

.terms-final-section .secondary-btn {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  background: transparent;
}

.terms-final-section .secondary-btn:hover {
  background: rgba(255, 255, 255, 0.09);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1024px) {
  .terms-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 42px;
  }

  .terms-navigation a {
    font-size: 0.82rem;
  }

  .terms-final-section {
    padding: 42px;
  }
}


/* =========================================================
   TABLET / SMALL LAPTOP
========================================================= */

@media (max-width: 900px) {
  .terms-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .terms-navigation {
    position: sticky;
    top: 84px;
    z-index: 20;
    max-height: none;
    padding: 14px 0;
    overflow: hidden;
    background: rgba(250, 248, 245, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e7e0db;
  }

  .terms-navigation-title {
    margin-bottom: 10px;
  }

  .terms-navigation nav {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .terms-navigation nav::-webkit-scrollbar {
    display: none;
  }

  .terms-navigation a {
    flex: 0 0 auto;
    padding: 9px 13px;
    border: 1px solid #e4d7cf;
    border-radius: 999px;
    background: #fff;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .terms-navigation a:hover {
    transform: none;
  }

  .terms-final-section {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 720px) {
  .terms-hero {
    padding: 58px 20px 48px;
  }

  .terms-hero .eyebrow {
    margin-bottom: 13px;
    font-size: 0.7rem;
  }

  .terms-hero h1 {
    max-width: 100%;
    font-size: clamp(2.75rem, 13vw, 4.25rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
  }

  .terms-hero-desc {
    margin-top: 22px;
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .terms-updated {
    margin-top: 24px;
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .terms-layout {
    width: calc(100% - 36px);
    padding: 32px 0 72px;
  }

  .terms-navigation {
    top: 73px;
    margin-left: -18px;
    margin-right: -18px;
    padding: 13px 18px;
  }

  .terms-navigation-title {
    font-size: 0.68rem;
  }

  .terms-navigation a {
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  .terms-section {
    padding-bottom: 40px;
    margin-bottom: 40px;
    scroll-margin-top: 155px;
  }

  .terms-section-number {
    min-width: 38px;
    height: 28px;
    margin-bottom: 14px;
  }

  .terms-section h2 {
    margin-bottom: 17px;
    font-size: clamp(1.65rem, 7vw, 2.15rem);
    line-height: 1.1;
  }

  .terms-section > p {
    font-size: 0.96rem;
    line-height: 1.75;
  }

  .terms-list {
    gap: 10px;
  }

  .terms-list li {
    padding: 14px 14px 14px 43px;
    font-size: 0.94rem;
  }

  .terms-list li::before {
    left: 15px;
    top: 13px;
  }

  .terms-note,
  .terms-warning {
    padding: 19px 20px;
  }

  .terms-provider-grid {
    grid-template-columns: 1fr;
  }

  .terms-provider-grid article {
    padding: 21px;
  }

  .terms-contact-card {
    align-items: stretch;
    flex-direction: column;
    gap: 22px;
    padding: 24px;
  }

  .terms-contact-card h3 {
    max-width: 100%;
    font-size: 1.05rem;
  }

  .terms-contact-card .btn-main {
    width: 100% !important;
    max-width: none;
  }

  .terms-final-section {
    width: calc(100% - 32px);
    margin-bottom: 72px;
    padding: 32px 24px;
    gap: 28px;
    border-radius: 22px;
  }

  .terms-final-section h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .terms-final-actions {
    width: 100%;
    flex-direction: column;
  }

  .terms-final-actions .btn-main,
  .terms-final-actions .secondary-btn {
    width: 100% !important;
    min-width: 0;
    max-width: none;
    text-align: center;
  }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {
  .terms-hero {
    padding: 48px 16px 42px;
  }

  .terms-hero h1 {
    font-size: clamp(2.5rem, 14vw, 3.7rem);
  }

  .terms-layout {
    width: calc(100% - 28px);
  }

  .terms-navigation {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .terms-section {
    padding-bottom: 34px;
    margin-bottom: 34px;
  }

  .terms-section h2 {
    font-size: 1.6rem;
  }

  .terms-section > p {
    font-size: 0.94rem;
  }

  .terms-list li {
    padding-right: 13px;
  }

  .terms-contact-card {
    padding: 21px;
    border-radius: 18px;
  }

  .terms-final-section {
    width: calc(100% - 28px);
    padding: 28px 20px;
  }
}


/* =========================================================
   FLOATING NAVIGATION — MOBILE POSITION
   The main style can remain in components.css
========================================================= */

@media (max-width: 720px) {
  .terms-page .page-scroll-nav {
    right: 12px;
    bottom: 16px;
  }

  .terms-page .page-scroll-btn {
    width: 43px;
    height: 43px;
    font-size: 1.15rem;
    box-shadow: 0 9px 24px rgba(42, 18, 7, 0.22);
  }
}