/* Healthcare Section */
.healthcare-section {
  position: relative;
  padding: 40px 140px;
  background-color: var(--color-bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
}

/* Healthcare Container */
.healthcare-container {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

/* Left Side - Content */
.healthcare-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  justify-content: center;
  align-items: start;
}

.healthcare-heading {
  font-family: var(--font-family);
  font-weight: var(--font-weight-regular);
  font-size: 48px;
  line-height: 120%;
  color: var(--color-text-primary-100);
  width: 520px;
  margin: 0;
}

.healthcare-description {
  font-family: var(--font-family);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-b1-desktop);
  line-height: 150%;
  color: var(--color-text-secondary-100);
  width: 520px;
  margin-top: 12px;
}

.healthcare-button {
  display: inline-block;
  padding: 16px 54px;
  background-color: transparent;
  color: var(--color-heading);
  font-family: var(--font-family);
  font-size: var(--font-size-b1-desktop);
  font-weight: var(--font-weight-regular);
  text-decoration: none;
  border-radius: 42px;
  border: 1px solid var(--action-outline-outline-text, #000);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  /* width: fit-content; */
  text-align: center;
  text-transform: capitalize;
}

.healthcare-button:hover {
  background-color: var(--color-heading);
  color: var(--color-bg-base);
  cursor: pointer;
}

/* Right Side - Video (Desktop) */
.healthcare-video-wrapper {
  width: 100%;
  position: relative;
  display: block;
}

/* Mobile Video Wrapper - Hidden on Desktop */
.healthcare-video-wrapper-mobile {
  display: none;
}

.temp-spacing {
  display: none;
}

.temp-img {
  aspect-ratio: 1/1;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 20px;
}

.healthcare-video-thumbnail {
  position: relative;
  width: 100%;
  min-height: 500px;
  aspect-ratio: 1/1;

  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.3s ease;
  background-color: var(--color-bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
}

.healthcare-video-thumbnail:has(
  .healthcare-play-button:not([style*="display: none"])
) {
  cursor: pointer;
}

/* Fallback for browsers not supporting :has */
.healthcare-video-thumbnail.is-playable {
  cursor: pointer;
}

.healthcare-video-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 20px;
  position: absolute;
  top: 0;
  left: 0;
}

/* Hide image if it fails to load */
.healthcare-video-image[src=""],
.healthcare-video-image:not([src]) {
  display: none;
}

.healthcare-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 3;
  transition: transform 0.3s ease;
  pointer-events: auto;
}

.healthcare-play-button:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

/* Ensure play button doesn't block clicks on parent */
.healthcare-play-button:focus {
  outline: none;
}

.healthcare-play-icon {
  width: 64px;
  height: 64px;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

/* Video Lightbox Modal */
.video-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.video-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.video-lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.video-lightbox-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  z-index: 10000;
  padding: 20px;
}

.video-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 10001;
  transition: transform 0.3s ease;
}

.video-lightbox-close:hover {
  transform: scale(1.1);
}

.video-lightbox-iframe-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
}

.video-lightbox-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Tablet Styles */
@media (max-width: 1240px) {
  .healthcare-section {
    padding: 40px 40px 0px;
  }
  .healthcare-video-thumbnail {
    aspect-ratio: auto;
  }
  .healthcare-container {
    gap: 60px;
  }

  .healthcare-heading {
    font-size: 40px;
  }
}

/* Tablet Styles */
@media (max-width: 830px) {
  .healthcare-section {
    padding: 40px 24px;
    min-height: auto;
  }

  .healthcare-container {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Hide desktop video wrapper on mobile */
  .healthcare-video-wrapper {
    display: none;
  }

  /* Show mobile video wrapper */
  .healthcare-video-wrapper-mobile {
    display: block;
    width: 100%;
    margin: 24px 0;
  }

  .healthcare-content {
    gap: 24px;
    align-items: center;
    width: 100%;
  }

  .temp-spacing {
    display: block;
    width: 100%;
  }

  .healthcare-content > div {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .healthcare-heading {
    font-size: 32px;
    width: 100%;
    text-align: center;
    margin: 0;
  }

  .healthcare-video-thumbnail {
    min-height: auto;
    aspect-ratio: 1 / 1;
    width: 100%;
  }

  .healthcare-description {
    font-size: var(--font-size-b1-mobile);
    width: 100%;
    margin-top: 0;
    text-align: left;
  }

  .healthcare-button {
    width: 100%;
    padding: 16px 24px;
    text-align: center;
    margin-top: 0;
  }

  .video-lightbox-content {
    width: 95%;
    max-width: 400px;
    padding: 10px;
  }

  .video-lightbox-close {
    top: -35px;
  }

  .video-lightbox-iframe-wrapper {
    padding-bottom: 177.78%; /* 9:16 vertical aspect ratio for mobile */
  }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
  .healthcare-section {
    padding: 24px;
  }

  .healthcare-container {
    gap: 0;
  }

  .healthcare-content {
    gap: 24px;
  }

  .healthcare-content > div {
    gap: 0px;
  }

  .healthcare-heading {
    font-size: var(--font-size-h3-desktop);
    text-align: center;
  }

  .healthcare-video-wrapper-mobile {
    margin: 24px 0;
  }

  .temp-spacing {
    padding: 24px 0;
  }

  .temp-img {
    aspect-ratio: 1/1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
  }

  .healthcare-description {
    font-size: var(--font-size-b3-mobile);
    text-align: center;
  }

  .healthcare-button {
    padding: 16px 54px;
    font-size: var(--font-size-b1-mobile);
    width: 100%;
  }

  .healthcare-video-thumbnail {
    min-height: auto;
    aspect-ratio: 1 / 1;
  }

  .healthcare-play-icon {
    width: 43px;
    height: 43px;
  }
}
