/* Legals Page Layout */
.legals-container {
  display: flex;
  gap: 130px; /* Space between sidebar and content */
  max-width: 1200px; /* Or your site's max-width */
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
  margin-top: 130px;
}

.legals-sidebar {
  flex: 0 0 216px; /* Sidebar with a fixed width */
  opacity: 0;
  transition: opacity 400ms ease-in-out;
}

.legals-content {
  flex: 1; /* Content area takes the rest of the space */
  min-width: 0; /* Prevents content from overflowing */
  opacity: 0;
  max-width: 680px;
  transition: opacity 400ms ease-in-out;
}

.legals-sidebar.is-visible,
.legals-content.is-visible {
  opacity: 1;
}

/* Menu Styles */
.legals-menu {
    padding-top: 25px;
}
.legals-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  position: sticky;
  top: 120px; /* Adjust based on your header height */
}

/* Style for top-level menu headings */
.legals-menu__heading,
.legals-menu__item[data-target="terms"],
.legals-menu__item[data-target="privacy"] {
  font-family: 'Plexes', sans-serif;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  margin-top: 20px;
  margin-bottom: 5px;
  color: white;
  cursor: pointer;
  transition: color 0.3s ease;
  border-bottom: none; /* Override border from .legals-menu__item */
  padding-left: 19px;

}

.legals-menu__item[data-target="terms"],
.legals-menu__item[data-target="privacy"] {
    padding-top: 0;
    margin-top: 0;
    padding-bottom: 10px;
}


/* Specific styles for the general items and divider */
.legals-menu__item[data-target="terms"] {
  margin-top: 0;
  padding-top: 18px;
}
.legals-menu__item[data-target="privacy"] {
  padding-bottom: 15px;
  border-bottom: 1px solid white;
}

.legals-menu__item {
  font-family: var(--font-normal);
  font-size: 14px;
  line-height: 135%;
  padding: 12px 0;
  cursor: pointer;
  transition: color 0.3s ease;
  border-bottom: none;
  color: #919191;
  position: relative; /* For icon positioning */
  padding-left: 19px; /* 12px icon + 10px gap */
}

.legals-menu__heading:hover,
.legals-menu__heading.is-active,
.legals-menu__item:hover,
.legals-menu__item.is-active {
  color: white;
}

.legals-menu__item.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background-image: url('/sites/app-latam-gatorade-lat/themes/gatorade_latam_skin/img/icons/ico-menu-indicator-orange.svg');
  background-repeat: no-repeat;
  background-position: center;
}

.legals-menu__sublist .legals-menu__item {
  padding-left: 19px; /* 22px base + 15px indent */
}

.legals-menu__close {
  display: none; /* Hidden on desktop */
}

/* Content Section Visibility */
.legals-content__section {
  display: none;
}

.legals-content__section.is-active {
  display: block;
}

/* Assuming a dark theme, text should be white */
.legals-content {
  color: white;
}

.legals-content #legals-main-title {
  font-family: var(--font-title);
  font-size: 56px;
  line-height: 110%;
  font-weight: 400; /* Regular weight */
  margin-bottom: 70px;
  text-transform: uppercase;
  margin-top: 10px;
}

.legals-page__section-title,
.promotion-legal__title,
.promotion-legal__section-title {
  color: white;
  font-family: var(--font-normal);
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 20px;
}

.legals-page__section {
  margin-bottom: 40px;
}

#legals-terms-content,
#legals-privacy-content {
  font-family: var(--font-normal);
  font-size: 18px;
  line-height: 135%;
  font-weight: 500; /* Medium weight */
}

.legals-mobile-trigger {
  display: none; /* Hidden on desktop */
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
  .legals-container {
    display: block;
    margin-top: 120px;
    margin-bottom: 30px;
    padding-bottom: 100px; /* Space for the fixed button */
  }

  .legals-content {
    transition: filter 0.4s ease-in-out;
  }

  .legals-sidebar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60vh;
    background-color: rgba(2, 2, 2, 0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 0px 24px 40px;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
    opacity: 1; /* Reset from desktop styles */
    flex: none; /* Override desktop flex property */
  }

  .legals-sidebar.is-open {
    transform: translateY(0);
  }

  .legals-sidebar.is-open ~ .legals-content {
    filter: blur(16px);
  }

  .legals-mobile-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: black;
    color: white;
    border: 1px solid white;
    border-radius: 8px;
    padding: 0 24px;
    font-family: var(--font-title);
    font-weight: 400;
    font-size: 24px;
    line-height: 100%;
    text-transform: uppercase;
    cursor: pointer;
    z-index: 1001;
    width: calc(100% - 40px);
    max-width: 400px;
    transition: background-color 0.3s, color 0.3s;
    height: 56px;
  }

  .legals-mobile-trigger::after {
    content: '';
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background-image: url('/sites/app-latam-gatorade-lat/themes/gatorade_latam_skin/img/icons/ico-plus-white.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
  }

  .legals-mobile-trigger.is-active::after {
    background-image: url('/sites/app-latam-gatorade-lat/themes/gatorade_latam_skin/img/icons/ico-close-white.svg');
    background-size: 24px;
  }

  .legals-content #legals-main-title {
    font-size: 32px;
  }
}
