main:has(.hero-section) section.border-bottom .container {
  padding-bottom: var(--y-space-40);
  margin-bottom: var(--y-space-40);
  /* border-bottom: 3px solid var(--y-color-primary); */
}
section:is(.border-bottom) {
  margin-bottom: var(--y-space-40) !important;
}

main:has(.hero-section) section h2 {
  font-size: var(--y-space-32);
  font-weight: 700;
  color: var(--y-color-primary);
}
main:has(.hero-section) section:has(.sale) .container h2 {
  color: var(--y-color-danger);
}
main:has(.hero-section) section:has(.new) .container h2 {
  color: var(--y-color-primary);
}

.hero-section {
  padding-block: var(--y-space-40) !important;
  margin: 0;
  padding-bottom: var(--y-space-0) !important;
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
  width: 100%;
}
.hero-section .cards {
  width: max-content;
  height: 100%;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  height: 90vh;
}
.hero-section .cards .card {
  width: 100vw;
  height: 100%;
  position: relative;
}
.hero-section .cards .card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 20% 25%;
}
.hero-section .cards .card .content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: var(--y-space-24);
  max-width: 792px;
  background-color: #00000066;
  backdrop-filter: blur(3px);
  color: var(--y-color-bg);
}
.hero-section .cards .card .content h2 {
  font-size: var(--y-space-40);
  font-weight: 700;
  color: var(--y-color-bg);
  text-align: center;
}
.hero-section .cards .card .content p {
  font-size: var(--y-space-32);
  font-weight: 400;
  color: var(--y-color-bg);
  text-align: center;
}

.way-section {
  margin-top: var(--y-space-120);
}
.way-section .container {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-24);
  padding-block: var(--y-space-40);
}

.way-section .container .cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--y-space-24);
}
.way-section .container .card {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-10);
  align-items: center;
  padding: var(--y-space-24);
  border-radius: var(--y-radius-l);
  box-shadow: var(--y-color-shadow);
}
.way-section .container .cards .card img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}
.way-section .container .cards .card p {
  font-size: var(--y-space-24);
  font-weight: 700;
  color: var(--y-color-txt);
  text-align: center;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--y-space-24);
  align-items: center;
}
.about-image img {
  width: 100%;
  height: 430px;
  object-fit: cover;
  border-radius: var(--y-radius-l);
}
.about-content h2 {
  font-size: var(--y-space-32);
  color: var(--y-color-primary);
  font-weight: 700;
}
.about-content p {
  color: var(--y-color-primary);
  font-size: var(--y-space-24);
  text-align: justify;
  font-weight: 300;
  margin-bottom: var(--y-space-24);
}

.categories-section .container {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-24);
  overflow: hidden;
}
.box-grid {
  display: grid;
  align-items: center;
  grid-template-columns: 50px 1fr 50px;
  /* width: 100vw; */
  gap: var(--y-space-32);
}
.box-grid button:nth-child(1) {
  rotate: 270deg;
}
.box-grid button:nth-child(3) {
  rotate: 90deg;
}
.categories-section .categories-grid {
  display: flex;
  overflow: hidden;
  width: 100%;
  flex-wrap: nowrap;
  gap: var(--y-space-12);
}
.categories-section .categories-grid .category-item a {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-24);
  align-items: center;
  width: 122px;
}
.categories-section .categories-grid .category-item img {
  width: 75px;
  height: 75px;
  object-fit: contain;
}
.categories-section .categories-grid .category-item p {
  font-size: var(--y-space-16);
  font-weight: 700;
  color: var(--y-color-txt);
  text-align: center;
}

.doctors-section .box-grid {
  background-color: #f5f5f5;
  padding: var(--y-space-32);
}
.doctors-section .doctors-grid {
  display: flex;
  overflow: hidden;
  padding: var(--y-space-24);
  width: 100%;
  flex-wrap: nowrap;
  gap: var(--y-space-12);
}
.doctors-section .doctors-grid .doctor-info {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-12);
  padding: var(--y-space-16) var(--y-space-12);
  border-radius: var(--y-radius-l);
  box-shadow: var(--y-color-shadow);
  min-width: 486px;
}

.doctors-section .doctors-grid .doctor-info > p {
  font-size: var(--y-space-14);
  font-weight: 700;
  color: var(--y-color-grey);
  text-align: center;
}
.doctors-section .doctors-grid .doctor-info .top {
  display: flex;
  flex-direction: row;
  gap: var(--y-space-10);
  align-items: center;
}
.doctors-section.opinions-section .doctors-grid .doctor-info .top {
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.doctors-section .doctors-grid .doctor-info .top img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  object-position: top;
  border-radius: var(--y-space-120);
}
.doctors-section .doctors-grid .doctor-info .top .desc {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-8);
}
.doctors-section .doctors-grid .doctor-info .top .desc p:first-child {
  font-size: var(--y-space-20);
  font-weight: 600;
  color: var(--y-color-txt);
}
.doctors-section:not(.opinions-section)
  .doctors-grid
  .doctor-info
  .top
  .desc
  p:first-child {
  color: var(--y-color-btn-hover);
}
.doctors-section .doctors-grid .doctor-info .top .desc p:last-child {
  font-size: var(--y-space-14);
  font-weight: 600;
  color: var(--y-color-txt);
}
.doctors-section .doctors-grid .doctor-info .bottom {
  display: flex;
  flex-direction: row;
  gap: var(--y-space-24);
  justify-content: space-around;
  align-items: center;
}
.doctors-section .doctors-grid .doctor-info .bottom .rating {
  display: flex;
  flex-direction: row;
  gap: var(--y-space-8);
  align-items: center;
}
.doctors-section .doctors-grid .doctor-info .bottom .rating strong {
  font-size: var(--y-space-24);
  font-weight: 700;
  color: var(--y-color-txt);
}
.doctors-section .doctors-grid .doctor-info .bottom .rating i {
  font-size: var(--y-space-30);
  color: var(--y-color-warning);
}
.doctors-section .doctors-grid .doctor-info .bottom .views {
  display: flex;
  flex-direction: row;
  gap: var(--y-space-8);
  align-items: center;
}
.doctors-section .doctors-grid .doctor-info .bottom .views p {
  font-size: var(--y-space-14);
  font-weight: 600;

  color: var(--y-color-grey);
}
.doctors-section .doctors-grid .doctor-info .bottom .views img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.doctors-section.opinions-section .doctors-grid .doctor-info {
  min-width: 395px;
  gap: var(--y-space-24);
}
.doctors-section.opinions-section .doctors-grid .doctor-info p {
  font-size: var(--y-space-20) !important;
}

.panner {
  background-color: var(--y-color-btn-hover);
}
.panner .container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--y-space-24);
}
.panner .container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.panner .container .content {
  display: flex;
  flex-direction: column;
  gap: var(--y-space-24);
  align-items: center;
  justify-content: center;
}
.panner .container .content h3 {
  font-size: var(--y-space-40);
  font-weight: 700;
  color: var(--y-color-bg);
  text-align: center;
}
.panner .container .content p {
  font-size: var(--y-space-32);
  font-weight: 400;
  color: var(--y-color-bg);
  text-align: center;
}

@media (max-width: 768px) {
  .hero-section .cards .card .content p {
    font-size: var(--y-space-20);
  }
  .hero-section .cards .card .content h2 {
    font-size: var(--y-space-26);
  }
  .hero-section .cards .card .content {
    width: 85%;
  }
  main:has(.hero-section) section h2 {
    font-size: var(--y-space-20);
  }
  .way-section .container .cards {
    grid-template-columns: 1fr;
  }

  .way-section {
    margin-top: var(--y-space-120);
  }
  
  /* Ensure hero-section has enough padding for .lists on mobile */
  .hero-section {
    padding-bottom: var(--y-space-80) !important;
    overflow: visible;
  }
  .box-grid {
    grid-template-columns: 30px 1fr 30px;
  }
  .panner .container {
    display: grid;
    grid-template-columns: 1fr;
    padding-top: var(--y-space-56);
  }
  .panner .container img {
    order: 2;
  }
  .doctors-section .doctors-grid {
    padding: var(--y-space-4);
  }

  .panner .container .content p {
    font-size: var(--y-space-22);
  }

  .panner .container .content h3 {
    font-size: var(--y-space-32);
  }

  .way-section .container .cards .card img {
    width: 75px;
    height: auto;
  }
  .way-section .container .cards .card p {
    font-size: var(--y-space-18);
  }
  .box-grid {
    gap: var(--y-space-12);
  }

  /* Fix opinions section for mobile */
  .doctors-section.opinions-section .doctors-grid {
    padding: var(--y-space-12) var(--y-space-8);
  }

  .doctors-section.opinions-section .doctors-grid .doctor-info {
    min-width: calc(100vw - 120px);
    max-width: calc(100vw - 120px);
    padding: var(--y-space-16) var(--y-space-12);
    width: 100%;
    box-sizing: border-box;
  }

  .doctors-section.opinions-section .doctors-grid .doctor-info p {
    font-size: var(--y-space-18) !important;
    padding: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }

  .doctors-section.opinions-section .doctors-grid .doctor-info .top .desc p {
    font-size: var(--y-space-18) !important;
    padding: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

@media (max-width: 480px) {
  .doctors-section.opinions-section .doctors-grid .doctor-info {
    min-width: calc(100vw - 100px);
    max-width: calc(100vw - 100px);
    padding: var(--y-space-12) var(--y-space-8);
  }

  .doctors-section.opinions-section .doctors-grid {
    padding: var(--y-space-8) var(--y-space-4);
    gap: var(--y-space-8);
  }

  .doctors-section.opinions-section .box-grid {
    padding: var(--y-space-16) var(--y-space-8);
  }
}
