body {
  font-family: var(--main-font);
}

.serve-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  opacity: 1;
  margin: 6rem 1rem;
  padding: 0 1rem;
  transition: transform 0.8s cubic-bezier(.77,0,.18,1), opacity 0.8s cubic-bezier(.77,0,.18,1);
  h2 {
    color: var(--secondary);
    font-weight: lighter;
    margin: 0;
  }
  h1 {
    font-weight: bolder;
    color: var(--secondary);
    margin-bottom: 4rem;
  }
}

.side_buttons {
  display: flex;
  flex-direction: column;
  width: 1150px;
  background-color: var(--primary);
  border-radius: 60px;
  padding: 2rem 4rem;
  gap: 2rem;
  margin-right: 0;
}

.revenue p, .business p {
  margin: 0;
  padding: 1rem 0;
  font-weight: bolder;
}

.side_buttons .revenue, .side_buttons .business {
  color: var(--secondary);
  width: 100%;
  border-radius: 100px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.25s cubic-bezier(.77,0,.18,1), box-shadow 0.25s, background 0.2s;
  cursor: pointer;
}
.side_buttons .revenue:hover, .side_buttons .business:hover {
  color: var(--primary);
  background-color: white;
}
.side_buttons .revenue.active, .side_buttons .business.active {
  color: var(--primary);
  background-color: var(--secondary);
}

.sides {
  display: inherit;
  justify-content: space-evenly;
  gap: 1rem;
}

.side_description p {
  display: none;
  margin: 0;
  font-weight: lighter;
  transition: opacity 0.25s ease;
  line-height: 1.2;
}

.side_description p.active {
  display: block;
  opacity: 1;
}
.revenue_contents, .business_contents {
  min-width: 350px;
  display: none;
}
.revenue_contents.active, .business_contents.active {display: block;}

.toggle_buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.toggle_buttons button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  position: relative;
  color: var(--primary);
  background: white;
  height: 60px; 
  width: 100%;
  padding: 1rem 2.5rem;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
  border-radius: 100px;
  border: none;
  overflow: hidden;
  cursor: pointer;
}

.toggle_buttons button span {
  display: inline;
  font-family: var(--main-font);
  width: 100%;
  white-space: normal;
  line-height: 1.2;
}

.toggle_buttons button:hover span,
.toggle_buttons button:focus span {
  visibility: hidden;
}

.toggle_buttons button p {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  font-size: 20px;
  font-weight: lighter;
  line-height: 1.2;
  width: 100%;
  height: 100%;
  background: transparent;
  border-radius: 0;
  margin: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 1;
}

.toggle_buttons button:hover p,
.toggle_buttons button:focus p {
  opacity: 1;
}

.toggle_buttons button:hover,
.toggle_buttons button:focus {
  font-weight: lighter;
}

.mobile_all_services {
  display: none;
}

@media (max-width: 1290px) {

br {
  display: none;
}

  .serve-wrapper {
    flex-direction: column;
    margin: 4rem 0;
  }

  .toggle_buttons {
    display: block;
    flex-direction: column;
    height: auto;
  }

  .side_buttons .revenue,
  .side_buttons .business {
    transform: none;
    background: rgba(255, 255, 255, 0.1);
    align-items: center;
  }

  .side_buttons {
    display: none;
  }

  .revenue p,
  .business p {
    display: block !important;
    font-weight: lighter;
  }
  .revenue_contents,
  .business_contents {
    display: none !important;
  }

  .side_buttons .revenue:hover, .side_buttons .business:hover, .side_buttons .revenue.active, .side_buttons .business.active {
    transform: none;
    align-items: center;
    justify-content: flex-start;
  }

  .mobile_all_services {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .mobile_all_services .mobile_heading {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--secondary);
    margin: 2rem 0 0;
    text-align: center;
  }  

  .mobile_text {
    font-size: 18px;
    margin: 0 0 1rem ;
  }

  .mobile_all_services .toggle_buttons {
    display: grid;
    max-width: 800px;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .mobile_all_services .toggle_buttons button {
    width: 100%;
    height: 100%;
    padding: 0.5rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: center;
  }

  .mobile_all_services .toggle_buttons button span {
    font-weight: bold;
    font-size: 18px;
    text-decoration: underline;
    margin-bottom: 0.25rem;
    visibility: visible !important;
  }

  .mobile_all_services .toggle_buttons button p {
    display: block !important; 
    position: static;
    font-size: 18px;
    opacity: 1 !important;
    padding: 0.5rem 0 0;
    pointer-events: auto;
    word-wrap: break-word;
  }

  .mobile_all_services .toggle_buttons button:hover,
  .mobile_all_services .toggle_buttons button:focus {
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    font-weight: normal;
  }

  /* Prevent hover behavior from desktop buttons */
  .toggle_buttons button:hover span,
  .toggle_buttons button:focus span,
  .toggle_buttons button:hover p,
  .toggle_buttons button:focus p {
    visibility: visible;
    opacity: 1;
  }
}