.review_section_main {
  width: 100%;
  height: calc(100vh - 70px);
}

.review_section_tag_main {
  position: relative;
  width: 110px;
  height: 34px;
  border-radius: 24px;
  overflow: hidden;
  padding: 1px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  font-size: 14px;
  margin-top: 10px;
  z-index: 1;
}

.review_section_tag_main::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130px;
  height: 130px;
  background: conic-gradient(from 0deg,
      rgba(216, 156, 39, 0) 0%,
      rgba(216, 156, 39, 0) 80%,
      #d89c27 92%,
      #dfc86f 96%,
      #d89c27 98%,
      rgba(216, 156, 39, 0.12) 100%);
  animation: rotateBorder 3s linear infinite;
  z-index: -2;
}

.review_section_tag_main::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background: #171717;
  border-radius: 24px;
  z-index: -1;
}

@keyframes rotateBorder {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  12.5% {
    transform: translate(-50%, -50%) rotate(60deg);
  }

  25% {
    transform: translate(-50%, -50%) rotate(90deg);
  }

  37.5% {
    transform: translate(-50%, -50%) rotate(120deg);
  }

  50% {
    transform: translate(-50%, -50%) rotate(180deg);
  }

  62.5% {
    transform: translate(-50%, -50%) rotate(240deg);
  }

  75% {
    transform: translate(-50%, -50%) rotate(270deg);
  }

  87.5% {
    transform: translate(-50%, -50%) rotate(300deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.review_section_dot {
  width: 10px;
  height: 10px;
  background-color: white;
  border-radius: 50%;
}

.review_section_text {
  margin-top: 16px;
  letter-spacing: 1px;
}

.review_section_title {
  font-family: var(--font-Glida-Display);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 1px;
  margin-top: 0px;
  text-align: center;
}

.review_section_sub_title {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1px;
  color: #e8e8e8;
  margin-top: 10px;
  line-height: 30px;
  text-align: center;
}

.review_swiper_wrapper {
  position: relative;
  padding-top: 130px;
  padding-bottom: 50px;
}

.reviewSwiper {
  overflow: visible !important;
}

.reviewSwiper .swiper-slide {
  width: auto;
  justify-content: center;
  align-items: flex-end;
  transition: z-index 0s;
}

.review_card_1_main {
  width: 398px;
  height: 472px;
  border-radius: 15px;
  border: 2px solid #2a2a2a;
  background-color: #121212;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transform: scale(0.9);
  transition:
    transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    border-color 0.5s ease;
  will-change: transform, opacity;
}

.swiper-slide-active .review_card_1_main {
  transform: scale(1.05);
  opacity: 1;
  z-index: 10;
}

.doctor_image_container {
  width: 211px;
  height: 281px;
  position: absolute;
  top: -80px;
}

.doctor_image_container img {
  width: 100%;
  height: 100%;
}

.doctor_image_container::after {
  content: "";
  position: absolute;
  bottom: 0px;
  width: 100%;
  height: 58px;
  left: 0;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0) 0%, #121212 100%);
  z-index: 2;
  pointer-events: none;
}

.review_discription_and_rating_main {
  width: 100%;
  height: auto;
  position: absolute;
  bottom: 0px;
  padding: 0px 16px 16px;
}

.doctor_name {
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: 10px;
  background: linear-gradient(101.58deg,
      #636363 0.97%,
      #9b9b9b 20.97%,
      #b1b1b1 37.13%,
      #e1e1e1 50.61%,
      #b1b1b1 62.82%,
      #9b9b9b 76.44%,
      #636363 100.96%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.rating_star_and_text_main {
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.star_image {
  width: 130px;
  height: 24px;
}

.star_image img {
  width: 100%;
  height: 100%;
}

.rating_text {
  width: auto;
  height: 25px;
  color: #d4d4d4;
  margin-top: 6px;
  margin-left: 10px;
  font-size: 16px;
  letter-spacing: 1px;
}

.doctor_review_text {
  letter-spacing: 1px;
  font-size: 15px;
  margin-top: 10px;
  color: white;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0px;
}

.reviewSwiper-pagination {
  position: absolute !important;
  bottom: -36px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.reviewSwiper-pagination .swiper-pagination-bullet {
  width: 17px;
  height: 5px;
  border-radius: 5px;
  background: #6d6d6d;
  opacity: 1;
  transition: all 0.35s ease;
  cursor: pointer;
}

.reviewSwiper-pagination .swiper-pagination-bullet-active {
  background: white;
  width: 17px;
  height: 5px;
  border-radius: 5px;
}

.review_read_more_btn {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: opacity 0.2s ease;
}

.review_read_more_btn:focus {
  outline: none;
  box-shadow: none;
  border: none;
}

.review_popup_overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.review_popup_overlay.active {
  opacity: 1;
  pointer-events: all;
}

.review_popup_modal {
  position: relative;
  width: 420px;
  max-width: 95vw;
  background: #121212;
  border: 1.5px solid #2a2a2a;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateY(30px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  max-height: 88vh;
}

.review_popup_overlay.active .review_popup_modal {
  transform: translateY(0px) scale(1);
}

.review_popup_close_btn {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 10;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.review_popup_close_btn:hover {
  border: 1px solid #be9644;
}

.review_popup_close_btn:focus {
  outline: none;
  box-shadow: none;
  border: none;
}

.review_popup_image_wrap {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  flex-shrink: 0;
  margin-top: 10px;
}

.review_popup_doctor_img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.review_popup_img_gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0) 0%, #121212 100%);
  pointer-events: none;
}

.review_popup_content {
  padding: 0px 20px 24px;
  overflow-y: auto;
}

.review_popup_doctor_name {
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: 0;
  margin-bottom: 8px;
  background: linear-gradient(101.58deg,
      #636363 0.97%,
      #9b9b9b 20.97%,
      #b1b1b1 37.13%,
      #e1e1e1 50.61%,
      #b1b1b1 62.82%,
      #9b9b9b 76.44%,
      #636363 100.96%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.review_popup_review_text {
  letter-spacing: 1px;
  font-size: 15px;
  color: white;
  line-height: 1.7;
  margin: 0;
}

/* ── Below 1400px: side cards clip because container overflow:hidden is too narrow.
   Fix: let the swiper wrapper break out of the container horizontally via
   negative-margin + padding trick, then reduce card sizes so all 3 fit. ── */


@media (max-width: 1550px) {
  .review_section_title {
    margin-bottom: 0px;
  }

  .review_section_title {
    font-size: 30px;
  }

  .review_section_sub_title {
    font-size: 16px;
    margin-top: 0px;
  }

  .review_swiper_wrapper {
    padding-top: 80px;
    padding-bottom: 40px;
  }

  .review_card_1_main {
    width: 370px;
    height: 390px;
  }

  .doctor_image_container {
    width: 190px;
    height: 230px;
  }

  .doctor_review_text {
    -webkit-line-clamp: 5;
  }

  .doctor_name {
    font-size: 24px;
  }
}

@media (max-width: 1399px) {

  /* Let the Bootstrap container clip the 4th card */
  .review_section_main>.container {
    overflow: hidden !important;
  }

  /* Remove negative margin breakout */
  .review_swiper_wrapper {
    padding-top: 100px;
    padding-bottom: 40px;
  }

  /* Resize card so 3 cards fit perfectly inside the 1140px container */
  .review_card_1_main {
    width: 345px;
    height: 400px;
  }

  /* Scale doctor image proportionally */
  .doctor_image_container {
    width: 172px;
    height: 220px;
    top: -72px;
  }

  .review_section_title {
    font-size: 28px;
    margin-bottom: 0;
  }

  .review_section_sub_title {
    font-size: 15px;
    margin-top: 4px;
  }

  .doctor_name {
    font-size: 22px;
  }

  .doctor_review_text {
    -webkit-line-clamp: 5;
    font-size: 14px;
  }
}


/* ── Below 1200px: Bootstrap container narrows to 960px (lg).
   Strategy: clip at the SECTION level, expand container to 100vw,
   size cards so exactly 3 fill the viewport (4th is off-edge). ── */
@media (max-width: 1199px) {

  /* Clip at section level — the section is already full width */
  .review_section_main {
    overflow: hidden;
  }

  /*
   * Expand container to full viewport width so the swiper fills it.
   * overflow:visible lets side-card images bleed above the card top edge.
   */
  .review_section_main>.container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    overflow: visible !important;
  }

  /*
   * Card width ~360px:
   *   Active card  (×1.05) = 378px, half = 189px from center
   *   Side card    (×0.90) = 324px
   *   Gap                  =  45px
   *   Center → side edge   = 189 + 45 + 324 = 558px
   *   At 1000px vw half    = 500px → side card clips by ~58px ✓ 3 cards shown
   *   At 1199px vw half    = 599px → full side card visible, 4th card at 599-558=41px → mostly hidden ✓
   */
  .review_card_1_main {
    width: 360px;
    height: 410px;
  }

  .doctor_image_container {
    width: 180px;
    height: 228px;
    top: -75px;
  }

  .review_section_title {
    font-size: 24px;
  }

  .review_section_sub_title {
    font-size: 15px;
  }

  .doctor_name {
    font-size: 21px;
  }

  .doctor_review_text {
    -webkit-line-clamp: 5;
    font-size: 14px;
    line-height: 1.55;
  }

  .review_swiper_wrapper {
    padding-top: 100px;
    padding-bottom: 40px;
  }
}

@media (max-width: 1290px) and (max-height: 600px) {
  .review_section_title {
    font-size: 20px;
    margin-top: -19px;
  }

  .review_section_sub_title {
    font-size: 15px;
  }

  .doctor_name {
    font-size: 18px;
    margin-bottom: 4px;
  }

  .star_image {
    width: 90px;
    height: 20px;
  }

  .rating_text {
    height: 20px;
    font-size: 14px;
  }

  .doctor_review_text {
    font-size: 14px;
    -webkit-line-clamp: 3;
    margin-top: 8px;
    line-height: 20px;
  }

  .review_read_more_btn {
    font-size: 12px;
  }

  .review_card_1_main {
    width: 280px;
    height: 300px;
  }

  .doctor_image_container {
    width: 155px;
    height: 191px;
    top: -56px;
  }

  .review_swiper_wrapper {
    padding-top: 50px;
    padding-bottom: 37px;
  }

  .reviewSwiper-pagination {
    bottom: -25px !important;
  }

  .review_popup_image_wrap {
    width: 63%;
    height: 169px;
  }

  .review_popup_content {
    padding: 0px 20px 24px;
  }

  .review_popup_doctor_name {
    margin-bottom: 0px;
  }
}

@media (max-width: 1200px) and (max-height: 760px) {
  .review_section_title {
    font-size: 21px;
    margin-top: 0px;
  }

  .review_section_sub_title {
    font-size: 14px;
  }

  .review_swiper_wrapper {
    padding-top: 80px;
    padding-bottom: 37px;
  }

  .review_card_1_main {
    width: 315px;
    height: 360px;
  }

  .doctor_name {
    font-size: 18px;
    margin-bottom: 4px;
  }

  .star_image {
    width: 90px;
    height: 20px;
  }

  .rating_text {
    height: 20px;
    font-size: 14px;
  }

  .doctor_review_text {
    font-size: 14px;
    -webkit-line-clamp: 5;
    margin-top: 8px;
    line-height: 20px;
  }

  .review_read_more_btn {
    font-size: 12px;
  }
}

@media (max-width: 995px) {
  .review_section_tag_main {
    margin-top: 40px;
  }

  .review_section_title {
    font-size: 22px;
    margin-top: 40px;
  }

  .review_section_sub_title {
    font-size: 15px;
    margin-top: 10px;
    line-height: 1.6;
  }

  .review_swiper_wrapper {
    padding-top: 150px;
    padding-bottom: 40px;
  }

  .review_card_1_main {
    width: 345px;
    height: 420px;
  }

  .doctor_review_text {
    -webkit-line-clamp: 6;
    margin-top: 8px;
  }
}

@media (max-width: 770px) {
  .review_swiper_wrapper {
    padding-top: 105px;
  }
}

@media (max-width: 576px) {
  .review_section_main {
    width: 100%;
    height: auto;
  }

  .review_section_tag_main {
    margin-top: 25px;
  }

  .review_section_title {
    font-size: 18px;
    margin-top: 9px;
  }

  .review_section_sub_title {
    font-size: 14px;
    margin-top: 6px;
    line-height: 1.5;
  }

  .review_swiper_wrapper {
    padding-top: 85px;
    padding-bottom: 60px;
  }

  .review_card_1_main {
    width: 310px;
    height: 375px;
  }

  .doctor_image_container {
    top: -70px;
  }

  .doctor_name {
    font-size: 20px;
  }

  .star_image {
    width: 103px;
    height: 24px;
  }

  .rating_text {
    height: 17px;
    margin-top: 0px;
    font-size: 14px;
  }

  .doctor_review_text {
    -webkit-line-clamp: 5;
    margin-top: 8px;
    font-size: 13px;
  }

  .review_read_more_btn {
    font-size: 12px;
  }

  .review_popup_doctor_name {
    font-size: 20px;
  }

  .review_popup_review_text {
    font-size: 14px;
  }

  .review_popup_image_wrap {
    width: 65%;
    height: 205px;
  }
}


@media (max-width:576px) and (max-height:750px) {
  .review_section_main {
    height: calc(100vh - 70px) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .review_section_main>.container {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-evenly !important;
    /* align-items: center !important; */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .review_section_tag_main {
    margin-top: 5px !important;
    margin-bottom: 0 !important;
    margin-left: 10px !important;
  }

  .review_section_title {
    font-size: 16px !important;
    margin-top: 5px !important;
    margin-bottom: 0 !important;
  }

  .review_section_sub_title {
    font-size: 12px !important;
    margin-top: 4px !important;
    margin-bottom: 0 !important;
    line-height: 1.4 !important;
  }

  .review_swiper_wrapper {
    padding-top: 65px !important;
    padding-bottom: 35px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    width: 100% !important;
  }

  .review_card_1_main {
    width: 270px !important;
    height: 290px !important;
  }

  .doctor_image_container {
    width: 135px !important;
    height: 180px !important;
    top: -50px !important;
  }

  .review_discription_and_rating_main {
    padding: 0px 12px 12px !important;
  }

  .doctor_name {
    font-size: 16px !important;
    margin-top: 4px !important;
    margin-bottom: 2px !important;
  }

  .star_image {
    width: 80px !important;
    height: 16px !important;
  }

  .rating_text {
    font-size: 12px !important;
    margin-top: 0px !important;
    margin-left: 6px !important;
    height: auto !important;
  }

  .doctor_review_text {
    font-size: 12px !important;
    -webkit-line-clamp: 3 !important;
    margin-top: 4px !important;
    margin-bottom: 4px !important;
    line-height: 1.4 !important;
  }

  .review_read_more_btn {
    font-size: 11px !important;
  }

  .reviewSwiper-pagination {
    bottom: -22px !important;
  }
}