/* =========================
   TERMS HEADER / HERO
========================= */
.terms-header-section {
  position: relative;
  width: 100%;
  height: 800px;
  overflow: hidden;
}

.terms-wrapper {
  position: relative;
  width: 100%;
  height: 800px;
  background-image: var(--hero-desktop);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* PARALLAX */
  background-attachment: fixed;
}

/* Overlay */
.terms-wrapper .overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* =========================
   TERMS LAYOUT
========================= */
.terms-conditions-wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 40px;
  padding: 40px 160px;
  align-items: stretch;
  justify-content: flex-start;
}

.terms-conditions-wrapper h1 {
  width: 100%;
}

/* Split layout */
.terms-conditions-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 5rem;
}

/* =========================
   LEFT NAVIGATION
========================= */
.terms-conditions-nav {
  width: 25%;
  border-right: 2px solid #a97c50;
  position: sticky;
  top: 120px;
}

.terms-conditions-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.terms-conditions-nav a {
  text-decoration: none;
  font-size: 24px;
  color: #001e62;
  display: block;
  margin-bottom: 15px;
}

.terms-conditions-nav a.active {
  color: #a97c50;
}

/* =========================
   TERMS CONTENT
========================= */
.terms-content {
  width: 75%;
  padding-left: 20px;
}

/* Individual term sections (tabs) */
.terms-section {
  margin-bottom: 40px;
  padding: 20px 40px;
  border: 1px solid #ccc;
  border-left: 4px solid #a97c50;
  border-radius: 12px;
  background-color: #f9f9f9;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.terms-section.active {
  display: block;
  opacity: 1;
}

/* =========================
   TYPOGRAPHY
========================= */
.terms-content h1,
.terms-content h2,
.terms-content h3 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.terms-content p {
  margin-bottom: 1em;
  line-height: 1.6;
}

.terms-content ul {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.terms-content li {
  margin-bottom: 0.5em;
  list-style-type: disc;
  font-size: 24px;
}

@media (max-width: 1024px) {
  .terms-conditions-wrapper {
    padding: 40px 60px;
  }

  .terms-conditions-wrap {
    gap: 3rem;
  }

  .terms-conditions-nav {
    width: 30%;
  }

  .terms-content {
    width: 70%;
  }
}

@media (max-width: 768px) {
  /* Disable CSS parallax on mobile (browser limitation) */
  .terms-wrapper {
    background-image: var(--hero-mobile);
    background-attachment: scroll;
    background-position: center top;
  }

  .terms-header-section,
  .terms-wrapper {
    height: 60vh;
    min-height: 360px;
  }

  .terms-conditions-wrapper {
    padding: 24px;
    margin-top: 24px;
  }

  .terms-conditions-wrap {
    flex-direction: column;
    gap: 24px;
  }

  /* Navigation becomes horizontal */
  .terms-conditions-nav {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #a97c50;
    position: relative;
    top: 0;
    padding-bottom: 16px;
  }

  .terms-conditions-nav ul {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .terms-conditions-nav a {
    font-size: 18px;
    margin-bottom: 0;
  }

  .terms-content {
    width: 100%;
    padding-left: 0;
  }

  .section-content{
    margin: 10px;
    height: 450px;
    overflow-y: auto;
    padding-right: 10px;
  }

  /* Let content scroll with page */
  .terms-section {
    max-height: none;
    overflow-y: visible;
    padding: 20px;
    text-wrap: balance;

  }

  .terms-content li {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .terms-header-section,
  .terms-wrapper {
    height: 50vh;
  }

  .terms-conditions-nav a {
    font-size: 16px;
  }
}
