@import "../shared/layout.css";

body {
  /* font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif; */
  color: #0a2540;
  background-color: #f6f9fc;
  overflow-x: hidden;
}

a {
  text-decoration: none;
}

/* ==========================================================================
   HEADER SECTION WITH CURVE
   ========================================================================== */
#curve {
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background-color: #23374d;
  color: #f6f9fc;
}

#curve:after {
  content: "";
  position: absolute;
  bottom: 0;
  right: -5%;
  left: -5%;
  height: 90px;
  background: #f6f9fc;
  -webkit-clip-path: ellipse(50% 60% at 50% 100%);
  clip-path: ellipse(50% 60% at 50% 100%);
}

#curve .solution-title {
  color: white !important;
}

#curve .display-4 {
  font-size: 40px;
  font-weight: 300;
}

@media (max-width: 767.98px) {

  header#curve,
  #curve.mb-5 {
    margin-bottom: 0 !important;
  }

  #curve .display-4 {
    font-size: 25px !important;
    font-weight: 700 !important;
  }

  #testim-media h3 {
    font-size: 25px !important;
  }

  #testim-media,
  #testim-media #global-text {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
}

#curve .solution-content {
  color: white;
  font-size: 18px;
}

.clearfix {
  margin: auto;
  height: 3px;
  width: 20%;
}

/* Top navigation (simple replica of Stripe nav) */
.top-nav {
  background-color: transparent;
  border-bottom: 1px dashed rgba(10, 37, 64, 0.15);
  font-size: 14px;
  padding: 0.75rem 0;
  box-shadow: 0 1px 0 rgba(15, 35, 52, 0.05);
}

.top-nav .navbar-brand {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: #0a2540;
  text-transform: lowercase;
}

.top-nav .nav-link {
  color: #425466;
  padding: 0.5rem 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.top-nav .nav-link:hover {
  color: #0a2540;
}

.btn-pill {
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
  font-size: 14px;
  font-weight: 500;
}

/* Product tab colours reused for column headers */

.tab-accent-1 {
  background-color: #16cbe1;
}

.tab-accent-2 {
  background-color: #20b5e3;
}

.tab-accent-3 {
  background-color: #1086db;
}

.tab-accent-4 {
  background-color: #1959e6;
}

.tab-accent-5 {
  background-color: #16cbe1;
}

.tab-accent-6 {
  background-color: #20b5e3;
}

.tab-accent-7 {
  background-color: #1086db;
}

.tab-accent-8 {
  background-color: #1959e6;
}

.tab-accent-9 {
  background-color: #16cbe1;
}

.tab-accent-10 {
  background-color: #20b5e3;
}

/* Tab accent hover text colors */
.tab-accent-1:hover {
  color: #a2eaf3 !important;
}

.tab-accent-2:hover {
  color: #a6e1f4 !important;
}

.tab-accent-3:hover {
  color: #9fcff1 !important;
}

.tab-accent-4:hover {
  color: #a3bdf5 !important;
}

.tab-accent-5:hover {
  color: #a2eaf3 !important;
}

.tab-accent-6:hover {
  color: #a6e1f4 !important;
}

.tab-accent-7:hover {
  color: #9fcff1 !important;
}

.tab-accent-8:hover {
  color: #a3bdf5 !important;
}

.tab-accent-9:hover {
  color: #a2eaf3 !important;
}

.tab-accent-10:hover {
  color: #a6e1f4 !important;
}

/* First overview table (four columns) */
.overview-section {
  padding: 56px 0 48px;
  background-color: transparent;
}

/* Table wrapper with white background and padding */
.overview-table-wrapper {
  background-color: #ffffff;
  /* padding-top is zero because the overview-column-header has its own top padding */
  padding-left: 4px;
  padding-right: 4px;
  padding-bottom: 4px;
  border-radius: 4px;
  margin-left: -4px;
  margin-right: -4px;
}

.overview-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 40px;
  color: #0a2540;
}

/* Sticky wrapper for ONLY the header row */
.overview-header-row {
  position: sticky;
  top: 0;
  z-index: 1020;
  background-color: #ffffff;
  overflow: hidden;
  margin: 0;
  padding-bottom: 4px;
  padding-top: 4px;
}

.overview-column-header {
  color: #ffffff;
  font-weight: 600;
  padding: 12px 20px;
  font-size: 14px;
  text-align: center;
  transition: all 0.2s ease;
  height: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.overview-column-header:hover {
  /* filter: brightness(0.95); */
  text-decoration: none;
}

.overview-columns-wrapper {
  margin-top: 0;
}

.overview-columns-wrapper.row {
  align-items: flex-start;
}

/* Uniform 4px gap between columns - using padding */
/* Uniform 4px gap between columns - using padding */
.scroll-track>div[class*="col-"] {
  padding-left: 2px;
  padding-right: 2px;
}

.scroll-track>div[class*="col-"]:first-child {
  padding-left: 0;
  padding-right: 2px;
}

.scroll-track>div[class*="col-"]:last-child {
  padding-right: 0;
  padding-left: 2px;
}

/* Uniform 4px gap between header columns - using padding */
.overview-header-row>div[class*="col-"] {
  padding-left: 2px;
  padding-right: 2px;
}

.overview-header-row>div[class*="col-"]:first-child {
  padding-left: 0;
  padding-right: 2px;
}

.overview-header-row>div[class*="col-"]:last-child {
  padding-right: 0;
  padding-left: 2px;
}

.overview-card {
  background-color: #f6f9fc;
  border-top: none;
  padding: 14px 16px;
  font-size: 14px;
  color: #425466;
  transition: background-color 0.2s ease;
  margin-bottom: 4px;
}

.overview-card:last-child {
  border-radius: 0 0 4px 4px;
  margin-bottom: 0;
}

.overview-card-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
  color: #0a2540;
}

.overview-card ul {
  padding-left: 20px;
  margin-bottom: 0;
  list-style: none;
}

.overview-card ul li {
  margin-bottom: 4px;
}

.overview-card ul li:last-child {
  margin-bottom: 0;
}

.overview-card a {
  color: #425466;
  transition: color 0.2s ease;
}

.overview-card a:hover {
  color: #0000ff;
  text-decoration: none;
}

/* Main content sections (Accept / Process / Settle / Manage) */
.content-section {
  padding: 60px 0;
}

.bg-white-section {
  background-color: #ffffff;
}

.bg-blue-section {
  background-color: transparent;
}

/* Scroll offsets so headings are visible under sticky strip */
.content-section,
section[id],
[id].content-section,
.anchor-offset {
  scroll-margin-top: 160px;
}

.content-section .row[id] {
  scroll-margin-top: 160px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Grid Overlay Styles */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1050;
}

.grid-overlay .container,
.grid-overlay .grid-wrapper,
.grid-overlay .row {
  height: 100%;
}

/* Match the 4px padding of the table wrapper */
.grid-overlay .grid-wrapper {
  padding: 0;
  margin-left: -4px;
  margin-right: -4px;
}

.grid-col {
  border-right: 1px dashed rgba(10, 37, 64, 0.08);
  height: 100%;
}

.grid-col:first-child {
  border-left: 1px dashed rgba(10, 37, 64, 0.08);
}

/* Horizontal Scroll Logic */
.scroll-viewport {
  overflow: hidden;
  position: relative;
  /* Ensure the scrollable area doesn't affect page width */
}

.scroll-track {
  display: flex;
  flex-wrap: nowrap;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.scroll-track>.col-lg-3 {
  flex: 0 0 25%;
  max-width: 25%;
}

.scroll-arrow-btn {
  position: absolute;
  top: 50%;
  z-index: 1040;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e6ebf1;
  box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
  color: #6b7c93;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  outline: none !important;
  opacity: 0.9;
  margin-top: -16px;
}

.scroll-arrow-btn:hover {
  color: #425466;
  transform: scale(1.05);
  box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
  opacity: 1;
}

.scroll-arrow-right {
  right: -50px;
}

.scroll-arrow-left {
  left: -50px;
  display: none;
}

/* Inpatient Redesign New Classes */
.solution-title {
  color: #283858 !important;
  font-size: 40px;
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 40px;
  color: #0a2540;
}

.solution-content {
  font-size: 18px;
  line-height: 1.6;
  color: #425466;
  margin-bottom: 40px;
}

.module-title {
  color: #283858 !important;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  color: #0a2540;
}

.module-content {
  font-size: 18px;
  line-height: 1.6;
  color: #425466;
  max-width: 100% !important;
  margin-bottom: 48px;
  text-align: left !important;
}

.submodule-title {
  font-size: 24px;
  font-weight: 600;
  color: #9966ff;
  margin-top: 40px;
  margin-bottom: 24px;
}

.feature-title {
  font-weight: 600;
  font-size: 18px;
  color: #0a2540;
  line-height: 1.4;
}

.feature-content {
  font-size: 18px;
  line-height: 1.6;
  color: #425466;
  margin-bottom: 12px;
}

.challenges-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #0a2540;
}

.challenges-content {
  font-size: 16px;
  line-height: 1.8;
  color: #425466;
}

.gist-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #0a2540;
}

.gist-content {
  font-size: 18px;
  line-height: 1.6;
  color: #425466;
  margin-bottom: 48px;
}

.gist-subheading {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
  color: #0a2540;
}

.gist-description {
  font-size: 16px;
  color: #425466;
}

/* ==========================================
   RESPONSIVE STYLES FOR MOBILE (<768px)
   ========================================== */
@media (max-width: 767.98px) {

  /* Overview table: hide scrollbar, use buttons only */
  .overview-table-wrapper {
    overflow: hidden;
    /* Hide scrollbar */
    position: relative;
  }

  /* Make the scroll track wider to accommodate all columns */
  .scroll-track {
    width: 100%;
    /* Full width relative to wrapper */
    display: flex;
    flex-wrap: nowrap;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  }

  /* Each column takes 50% of wrapper width (showing 2 at a time) */
  .scroll-track>div[class*="col-"] {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
  }

  /* Override the desktop column sizing */
  .scroll-track>.col-lg-3,
  .scroll-track>.col-md-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
  }

  /* Sticky header adjustments for mobile */
  .overview-header-row {
    position: sticky;
    top: 0;
    z-index: 1020;
    background-color: #ffffff;
  }

  /* Ensure header columns also show 2 at a time */
  .overview-header-row .scroll-track>div[class*="col-"] {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
  }

  /* Column headers - adjust padding for mobile */
  .overview-column-header {
    font-size: 11px;
    padding: 8px 6px;
    line-height: 1.3;
  }

  /* Add scroll offset for content sections to account for sticky header */
  .content-section,
  section[id],
  [id].content-section,
  .anchor-offset,
  [id] {
    scroll-margin-top: 140px;
  }

  /* Overview columns and cards - equal height side-by-side alignment */
  .scroll-track>div[class*="col-"] {
    display: flex;
    flex-direction: column;
    padding-left: 2px;
    padding-right: 2px;
  }

  .overview-card {
    padding: 12px 10px;
    font-size: 11px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 170px;
    margin-bottom: 4px;
    box-sizing: border-box;
  }

  .overview-card-title {
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.35;
    min-height: 34px;
    display: flex;
    align-items: center;
  }

  .overview-card ul {
    margin-bottom: 0;
    padding-left: 16px;
    flex-grow: 1;
  }

  .overview-card li {
    margin-bottom: 4px;
    line-height: 1.4;
  }

  .overview-card a {
    font-size: 11px;
  }

  /* Overview title */
  .overview-title {
    font-size: 28px;
    margin-bottom: 20px;
  }

  /* Navigation buttons - keep visible and functional */
  .scroll-arrow-btn {
    width: 32px;
    height: 32px;
    opacity: 1;
    background: #fff;
    border: 2px solid #e6ebf1;
  }

  .scroll-arrow-btn svg {
    width: 18px;
    height: 18px;
  }

  /* Position arrows closer to content on mobile */
  .scroll-arrow-right {
    right: -40px;
  }

  .scroll-arrow-left {
    left: -40px;
  }

  /* Hero section adjustments */
  .solution-hero h1 {
    font-size: 32px;
  }

  .solution-hero p {
    font-size: 16px;
  }

  /* Module titles & responsive order */
  .module-title {
    font-size: 25px !important;
  }

  .content-section .row.align-items-center {
    flex-direction: column-reverse;
  }

  .content-section .row.align-items-center>[class*="col-"] {
    text-align: center;
    width: 100%;
  }

  .content-section .row.align-items-center>[class*="col-"] img {
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    display: block;
  }

  .module-content {
    margin-bottom: 20px !important;
    text-align: left !important;
    padding-top: 0 !important;
  }

  /* Submodule sections */
  .submodule-title {
    font-size: 20px;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
  }

  .submodule-section .row.pt-4.pb-4,
  .row.pt-4.pb-4 {
    padding-top: 18px !important;
    padding-bottom: 0 !important;
  }

  .feature-title {
    font-size: 16px;
  }

  .feature-content {
    font-size: 15px;
  }

  /* Challenges section */
  .challenges-title {
    font-size: 25px !important;
    text-align: center !important;
  }

  .challenges-content {
    font-size: 15px;
  }

  /* Gist section */
  .gist-title {
    font-size: 25px !important;
    text-align: center !important;
  }

  .gist-content {
    font-size: 16px;
  }

  /* Reduce padding on mobile */
  .overview-section {
    padding: 32px 15px 24px;
  }

  .content-section {
    padding-top: 32px;
    padding-bottom: 32px;
  }
}

/* Fix footer overflow for Solutions pages at <992px */
@media (max-width: 991.98px) {
  .footer-section {
    padding: 48px 40px 0 !important;
    overflow: hidden !important;
  }

  .footer-section .footer-columns {
    overflow: hidden !important;
    padding-bottom: 20px !important;
  }

  /* Reduce footer-bottom height by 30% */
  .footer-bottom {
    padding: 11px 0 !important;
  }
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */
#backToTop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: #253858;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  z-index: 999;
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  transform: translateY(-3px);
  background: #1d2d47;
}