/* rythmic/public/css/terms.css */

/* Global adjustments for body and html to prevent horizontal overflow and set box-sizing */
html, body {
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal scroll for the entire page */
  min-width: unset; /* Ensure no global min-width is forcing horizontal overflow */
}

body {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Apply border-box globally */
  font-family: Arial, sans-serif; /* Add a default font-family */
  color: var(--gray900); /* Default text color */
}

.terms {
  align-items: flex-start; /* Aligns content to the start of the cross axis (left for column) */
  background-color: var(--white);
  display: flex;
  flex-direction: column; /* Stack sections vertically */
  width: 100%;
  box-sizing: border-box; /* Ensure padding and border are included in width/height */
  min-width: unset; /* Remove fixed min-width for responsiveness */
  /* Remove fixed height */
  /* height: auto; */
  overflow-x: hidden; /* Prevent horizontal scroll for the main wrapper */
}

/* Header Section for Terms of Service */
.terms .header-section {
  display: flex;
  flex-direction: column;
  align-items: center; /* Center content horizontally within the section */
  width: 100%;
  max-width: 1440px; /* Constrain main section width */
  margin: 0 auto;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgb(255, 255, 255) 0%, rgb(250, 250, 251) 100%);
  padding: 96px 0px; /* Top/bottom padding */
  gap: 64px; /* Gap within header section (between container and rich-text) */
}

/* Container for Header Text */
.terms .container { /* This is .container.container-4 in HTML */
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1280px; /* Wider container for content within header */
  padding: 0 32px; /* Inner horizontal padding */
  box-sizing: border-box;
}

.terms .content { /* This is .content.content-4 in HTML */
  display: flex;
  flex-direction: column;
  align-items: center; /* Center content within this block */
  width: 100%;
  max-width: 960px; /* Max width for actual text content */
  gap: 40px; /* Gap between heading block and supporting text */
  box-sizing: border-box;
}

.terms .heading-and-supporting-text {
  display: flex;
  flex-direction: column;
  align-items: center; /* Center text within this block */
  gap: 24px;
  width: 100%;
  max-width: 960px;
}

.terms .heading-and-subheading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  justify-content: center;
  width: 100%;
}

.terms .heading-1 {
  color: var(--gray900);
  font-weight: 600;
  line-height: 60px;
  font-size: 60px; /* Explicit font size */
  text-align: center;
  width: 100%;
  max-width: 652px;
  margin: 0;
}

.terms .supporting-text {
  color: var(--gray600);
  font-weight: 400;
  line-height: 30px;
  font-size: 20px; /* Explicit font size */
  text-align: center;
  width: 100%;
  max-width: 758px;
  margin: 0;
}

/* --- RICH TEXT CONTENT SECTION (Main Terms Body) --- */
.terms .rich-text {
  display: flex;
  flex-direction: column; /* Stack content vertically */
  align-items: center; /* Center text block horizontally */
  width: 100%;
  max-width: 1440px; /* Matches main section max-width */
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0px 0px 96px 0px; /* Padding for bottom of rich text section */
  gap: 32px; /* Gap between content blocks within rich text (e.g., between initial paragraph and the .section) */
}

/* The .section containing all the numbered paragraphs */
.terms .section {
  display: flex;
  flex-direction: column;
  gap: 16px; /* Gap between individual paragraphs (desktop) */
  width: 100%;
  max-width: 960px; /* Constrain max-width for readability */
  padding: 0 32px; /* Inner horizontal padding for the content */
  box-sizing: border-box;
  align-items: flex-start; /* Align text content to the left */
}

.terms .paragraph-1,
.terms .paragraph-2 {
  color: var(--gray600);
  font-weight: 400;
  line-height: 28px;
  font-size: 18px; /* text-lgregular equivalent */
  margin: 0; /* Remove default paragraph margins */
  padding: 0;
  text-align: left; /* Ensure left alignment */
  width: 100%; /* Take full width within its container */
}

/* Specific styling for the very first paragraph in rich-text */
.terms .paragraph-1.paragraph-2.text-lgregular {
  margin-top: 0;
  max-width: 960px;
}

/* Styling for lists within the terms (e.g., (a), (b), (c) points) */
.terms .section ul {
  list-style: none; /* Remove default bullets */
  padding-left: 0; /* Remove default padding */
  margin: 0; /* Remove default margin */
  width: 100%; /* Take full width */
}

.terms .section ul li {
  margin-bottom: 8px; /* Space between list items */
  text-align: left; /* Ensure left alignment */
}

.terms .section ul li:last-child {
  margin-bottom: 0; /* No margin on the last list item */
}


/* --- FOOTER STYLES --- */
.terms .footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  box-sizing: border-box;
  background-color: var(--white);
  padding: 64px 0px 48px;
  gap: 64px;
}

.terms .container-1 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 1280px;
  padding: 0px 32px;
  gap: 48px;
  box-sizing: border-box;
}

.terms .content-1 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  gap: 32px;
}

.terms .layer_1-2 {
  height: auto;
  width: 144px;
}

.terms .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
  width: 100%;
}

.terms .footer-link {
  /* No specific styles needed here, its children button will be flex items */
}

.terms .button-2 {
  display: inline-flex;
  flex: 0 0 auto;
  position: relative;
}

.terms .button-base {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
}

.terms .link.text-mdsemibold {
  color: var(--gray600);
  font-weight: 600;
  line-height: 24px;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}

.terms .container-2 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 1280px;
  padding: 0px 32px;
  gap: 32px;
  box-sizing: border-box;
}

.terms .divider {
  width: 100%;
  height: 1px;
  background-color: var(--gray100);
}

.terms .content-2 {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
}

.terms .footer-text.inputmd {
  color: var(--gray600);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  margin: 0;
  white-space: nowrap;
}


/* --- FIXED HEADER NAVIGATION (Copied from index.css logic) --- */
.terms .dropdown-header-navigation {
  display: flex;
  align-items: center;
  justify-content: center; /* Center its content container */
  background-color: var(--white);
  border-bottom: 1px solid var(--gray100);
  height: 80px;
  width: 100%;
  padding: 0 80px; /* Side padding for desktop */
  position: fixed; /* Fixed header */
  top: 0;
  z-index: 100; /* Ensure it stays on top */
  box-sizing: border-box;
}

.terms .container-3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1280px; /* Constrain inner content width */
  padding: 0; /* Remove container's padding as it's on parent */
}

.terms .content-3 {
  display: inline-flex; /* Use inline-flex to shrink-wrap content */
  align-items: center;
  gap: 40px; /* Gap between logo and main navigation */
}

.terms .layer_1-1 { /* Logo in header */
  cursor: pointer;
  height: auto;
  width: 144px; /* Fixed width */
}

.terms .navigation { /* Main navigation links */
  display: flex;
  align-items: center;
  gap: 32px; /* Gap between nav items */
}

.terms .dropdown-header-navigation-trigger {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0px;
  cursor: pointer;
  position: relative;
}

.terms .navigation-actions { /* Login/Sign Up buttons */
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.terms .button-1 { /* Login/Sign Up buttons */
  background-color: var(--blue-chill);
  border-radius: 8px;
}

.terms .button-base-1 { /* Login/Sign Up button base */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px; /* Standard button padding */
  border-radius: 8px;
  overflow: hidden;
}

.terms .text-1 { /* Text for Login/Sign Up */
  color: var(--white);
  font-weight: 600;
  line-height: 24px;
  font-size: 16px;
  white-space: nowrap;
  margin-top: -1px;
  width: fit-content;
}

/* --- Mobile Responsiveness Overrides (max-width: 991.98px for 'lg' breakpoint) --- */
@media (max-width: 991.98px) {

  /* General mobile adjustments for main sections */
  .terms .header-section,
  .terms .rich-text,
  .terms .footer {
      padding: 48px 16px; /* Reduced vertical and added horizontal padding */
      gap: 32px; /* Reduced gap */
  }

  /* Header Section Mobile */
  .terms .container {
      padding: 0 16px; /* Reduced inner padding */
  }

  .terms .content {
      align-items: flex-start; /* Align header content to the left */
  }

  .terms .heading-and-supporting-text {
      align-items: flex-start; /* Align text group to the left */
      gap: 16px; /* Reduced gap */
  }

  .terms .heading-and-subheading {
      align-items: flex-start; /* Align heading/subheading to the left */
  }

  .terms .heading-1 {
    font-size: 36px;
    line-height: 44px;
    text-align: left;
  }

  .terms .supporting-text {
    font-size: 16px;
    line-height: 24px;
    text-align: left;
  }

  /* Rich Text / Content Section Mobile */
  .terms .rich-text {
      padding: 0 16px 48px 16px; /* Adjusted padding for content area */
      gap: 24px; /* Reduced gap between content blocks */
      align-items: flex-start; /* Align content to the left */
  }

  .terms .section {
      padding: 0; /* Remove inner padding as parent has it */
      gap: 8px; /* Adjusted: Smaller gap between individual paragraphs on mobile */
      width: 100%;
  }

  /* CRITICAL: Styles for the main terms paragraphs on mobile */
  .terms .paragraph-1,
  .terms .paragraph-2 {
    font-size: 16px; /* Smaller font size for mobile */
    line-height: 24px; /* Adjusted line height for mobile */
    text-align: left; /* Ensure all paragraphs are left aligned */
    margin-bottom: 8px; /* Adjusted: Small bottom margin for spacing between paragraphs */
  }

  /* Ensure bold text within paragraphs remains prominent */
  .terms .paragraph-2 strong {
      font-size: 16px; /* Explicitly set to match paragraph size if needed */
      line-height: 24px;
  }

  /* Adjust spacing and behavior for ul/li within the terms */
  .terms .section ul {
    margin-left: 15px; /* Indent the list for mobile */
    padding-left: 0;
    width: calc(100% - 15px); /* Adjust width to account for indent */
  }

  .terms .section ul li {
    margin-bottom: 6px; /* Smaller space between list items */
  }
  .terms .section ul li:last-child {
      margin-bottom: 0;
  }


  /* Footer Mobile */
  .terms .container-1 {
      padding: 0 16px;
  }

  .terms .footer-links {
      flex-direction: column;
      gap: 12px;
      align-items: flex-start;
  }

  .terms .container-2 {
      padding: 0 16px;
  }

  .terms .content-2 {
      flex-direction: column;
      gap: 8px;
      align-items: flex-start;
  }

  .terms .footer-text.inputmd {
      white-space: normal;
      text-align: left;
  }

  /* Fixed Header Navigation Mobile */
  .terms .dropdown-header-navigation {
    padding: 0 16px;
    justify-content: space-between;
  }

  .terms .container-3 {
    padding: 0;
  }

  .terms .content-3 {
    gap: 16px;
  }

  .terms .navigation {
    display: none;
  }

  .terms .navigation-actions {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: auto;
  }

  .terms .button-base-1 {
    padding: 8px 14px;
  }

  .terms .text-1 {
    font-size: 14px;
    line-height: 20px;
  }
}

/* Variables - ensure these are defined elsewhere or added here */
:root {
  --white: #ffffff;
  --gray100: #f2f4f7;
  --gray300: #d0d5dd;
  --gray600: #475467;
  --gray900: #101828;
  --blue-chill: #0199a6;
  --blue-chill-2: #0199a6;
}