/* ---------------- Title and Bulletpoints ---------------- */
/* Decorative Quarter Circles */
.decoration {
  position: absolute;
  pointer-events: none;
  /* Prevents interfering with interaction */
}

.top-circle {
  top: 40%;
  height: 250px;
  left: 38%;
  transform: rotate(270deg);
}

.title {
  font-size: 2.5rem;
  color: var(--chambray);
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 2vh;
}

/* ---------------- Outpatients Section ---------------- */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Two-column grid */
.connect-grid {
  margin-top: 8rem;
  margin-bottom: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  text-align: left;
}

/* Center the image inside its column */
.connect-image {
  display: flex;
  justify-content: center;
  /* Centers horizontally */
  align-items: center;
  /* Centers vertically */
  text-align: center;
}

.connect-image img {
  max-width: 500px;
  /* Adjust as needed */
  height: auto;
  /* display: block; */
  z-index: 100;
}

/* Right: Content */
.connect-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
  background-color: var(--wistful-o);
  border-radius: 30px;
  width: 40vw;
}

/* Logo + Heading */
.connect-heading {
  display: flex;
  align-items: center;
  /* margin-top: 1rem; */
  gap: 1rem;
  margin-bottom: 1.5rem;
}

h1 {
  color: var(--slate-blue);
}

.connect-heading h1 {
  font-size: 2.2rem;
  color: var(--chambray-2, #4a90e2);
  margin: 0;
  line-height: 1.3;
}

/* Hero Text */
.connect-hero p {
  font-size: 1.1rem;
  color: #394f89;
  ;
  line-height: 1.7;
  margin: 0 0 0.5rem;
}

/* Custom Styled Features List */
.features-list {
  padding-left: 0;
  list-style: none;
  margin: 1rem 0;
  color: #394f89;
  line-height: 1.7;
  font-weight: bold;
}

.features-list li {
  position: relative;
  padding-left: 32px;
  /* Space for the icon */
  margin-bottom: 0.5rem;
}

.features-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  /* Adjust size as needed */
  height: 20px;
  background-image: url('Images/bulletdot.png');
  /* Your image */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* App Store Links */
/* App Store Links - Centered */
.app-links {
  text-align: center;
  /* Centers inline/inline-block children */
  margin: 2rem 0;
}

.app-links .playlogo {
  width: 200px;
  margin: 0 10px;
  /* Spacing between the two logos */
  transition: transform 0.3s ease;
  color: #333;
  /* transition: opacity 0.2s; */
}

.playlogo:hover {
  transform: translateY(-5px);
  /* box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); */
}

/* Features Section*/
.features-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5vh;
  padding: 2vw;
}

.features-section {
  display: flex;
  align-items: start;
  gap: 3vw;
  flex-wrap: wrap;
  justify-content: center;
}

/* Module Card Styling */

.module-card {
  background-color: var(--card);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  /* transition: transform 0.3s ease, box-shadow 0.3s ease; */
  color: #333;
  box-shadow: 0px 5px 10px rgba(0, 15, 43, 0.322);
  flex-basis: 25%;
  min-height: 200px;
}

.module-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.module-card h3 {
  font-size: 1.2rem;
  color: var(--slate-blue);
}

.module-card img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.module-card p {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

.features-section .module-card .card-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  border-radius: 12px;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.features-section .module-card .card-overlay-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.features-section .module-card .card-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.08) 0%,
      rgba(0, 0, 0, 0.18) 45%,
      rgba(0, 0, 0, 0.72) 100%);
}

.features-section .module-card .card-overlay-title {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 0.75rem 1rem;
  background: none;
  color: var(--white, #fff);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

/* Hides the description by default*/
.desc-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s ease, opacity 0.5s ease, margin 0.5s ease;
  /* Added margin to transition */
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  /* Keeps it tight when closed */
  visibility: hidden;
  text-align: center;
  align-items: center;
  /* Remove the gap here, or it will create 1rem of empty space even when closed */
  gap: 0;
}

/* Ensure the content inside doesn't force a height */
.desc-wrapper>* {
  min-height: 0;
}

.desc {
  min-height: 0;
  margin-top: 0;
  font-size: 0.95rem;
}

.readmore {
  margin: 0 auto;
  cursor: pointer;
  visibility: hidden;
  display: none;
  text-decoration: none;
}

.module-card.active {
  border-left: 5px solid var(--indigo);
}

.module-card.active .desc-wrapper {
  grid-template-rows: 1fr;
  margin-top: 15px;
  visibility: visible;
  opacity: 1;
  gap: 1rem;
  /* Re-introduce the gap only when active */
}

.module-card.active .readmore {
  visibility: visible;
  display: block;
}

.module-card:hover {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.12);

}

.patient-data-card {
  width: 100%;
  transition: all 0.5s ease;
}

.patient-data-card.active {
  /* Vertical expansion logic remains the same via your desc-wrapper */
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}


/* Responsive */
@media (max-width: 768px) {

  .connect-grid {
    grid-template-columns: 1fr;
    margin-top: 5rem;
    gap: 2rem;
  }

  .connect-image img {
    max-width: 90%;
    height: auto;
  }

  .connect-content {
    width: 100%;
    padding: 20px;
    border-radius: 20px;
    box-sizing: border-box;
  }

  .title {
    font-size: 2rem;
    text-align: center;
  }

  .features-list {
    text-align: left;
    font-size: 1rem;
  }

  .features-list li::before {
    top: 12px;
    transform: none;
  }

  .features-section {
    flex-direction: column;
    width: 100%;
    padding: 0 10px;
  }

  .module-card {
    flex-basis: 100%;
    width: 100%;
    margin-bottom: 1rem;
    padding: 1.5rem;
    box-sizing: border-box;
  }

  .connect-hero p {
    font-size: 1rem;
    text-align: left;
  }
}

/* Extra Small Screens (Phones) */
@media (max-width: 480px) {
  .connect-content {
    padding: 15px;
  }

  .module-card h3 {
    font-size: 1.1rem;
  }
}