/* ---------- HERO — COSMETIC ---------- */
.hero-cosmetic{
  background: url(../images/cosmetics-hero.jpg) no-repeat center right;
  background-size: cover;
}

.hero-endodontics{
  background: url(../images/endodontics-hero.jpg) no-repeat center right;
  background-size: cover;
}

.hero-dental-implants{
  background: url(../images/implants-hero.jpg) no-repeat center right;
  background-size: cover;
}

.hero-oral-surgery{
  background: url(../images/oral-surgery-hero.jpg) no-repeat center right;
  background-size: cover;
}

.hero-orthodontics{
  background: url(../images/orthodontics-hero.jpg) no-repeat center right;
  background-size: cover;
}

.hero-pediatric{
  background: url(../images/pediatric-hero.jpg) no-repeat center right;
  background-size: cover;
}

.hero-periodontics{
  background: url(../images/peridontics-hero.jpg) no-repeat center right;
  background-size: cover;
}

.hero-preventive{
  background: url(../images/preventive-first.jpg) no-repeat center right;
  background-size: cover;
}

/* ---------- OUR COSMETIC DENTISTRY TREATMENTS ---------- */
.treatments {
  padding: var(--section-py) var(--section-px);
}

.treatments-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-xl);
  align-items: start; 
  max-width: 90%;
  margin: 0 auto;
  place-items: center;
}

.treatment-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 2/1;
  position: sticky; 
  top: 100px;
}

.treatment-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.treatment-list {
  list-style: none;
}

.treatment-item {
  border-left: 5px solid #d8e6ec;
  margin-bottom: 10px;
  transition: border-color 0.3s ease;
}

.treatment-item.active {
  border-left-color: var(--dark);
}

.treatment-toggle {
  display: block;
  width: 100%;
  background: none;
  border: none;
  margin: 0;
  padding: 20px 0 8px clamp(25px, 3.5vw, 55px);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.treatment-item h3 {
  transition: color 0.2s ease;
  margin-bottom: unset;
}

.treatment-item:not(.active) .treatment-toggle:hover h3 {
  color: var(--blue);
}

.treatment-desc {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  padding-left: clamp(25px, 3.5vw, 55px);
  transition: grid-template-rows 0.4s ease, padding-bottom 0.4s ease;
}

.treatment-item.active .treatment-desc {
  grid-template-rows: 1fr;
  padding-bottom: 20px;
}

.treatment-desc p {
  overflow: hidden;
  min-height: 0;
  color: var(--blue);
  margin: unset;
}

/* ---------- WHY 10 BANJARA DENTAL ---------- */
.why-us {
  padding: var(--section-py) var(--section-px);
  min-height: unset;
}

.why-us-card {
  max-width: 90%;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid #b1dff8;
  border-radius: var(--radius-xl);
  box-shadow: 0px 30px 80px -37px var(--cta-blue);
  padding: clamp(28px, 4.2vw, 64px);
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  gap: 0;
  align-items: center;
}

.why-us-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px 40px;
}

.why-us-feature {
  display: flex;
  align-items: center;
  gap: 25px;
}

.why-us-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.why-us-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #fff;
}

/* FIX: the HTML uses <img>, not inline <svg> */
.why-us-icon img {
  /* width: 50%;
  height: 50%; */
  object-fit: contain;
}

.why-us p {
  margin: 0;
}

.why-us h2::after {
  background: none;
}

.why-us-feature p {
  font-weight: 700;
  color: var(--dark);
}

.why-us-note {
  text-align: center;
  color: var(--blue);
  max-width: 85%;
  margin: clamp(24px, 3vw, 40px) auto 0 !important;
  font-weight: 500;
}

/* ---------- ADVANCED TECHNOLOGY ---------- */
.tech {
  padding: var(--section-py) var(--section-px);
  min-height: unset; /* FIX: was inheriting min-height: 100vh */
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gap-xl);
}

.tech-grid > * {
  grid-column: span 2;
}

/* Second row */
.tech-grid > :nth-child(4) {
  grid-column: 2 / span 2;
}

.tech-grid > :nth-child(5) {
  grid-column: 4 / span 2;
}

.tech .title {
  padding-bottom: 0px;
  border-bottom: none;
  margin-bottom: 0px;
}

/* FIX: make any photo fill the 16:9 frame at all sizes */
.tech-grid .doctor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- TESTIMONIALS ---------- */
.testimonials {
  padding: var(--section-py) var(--section-px);
  min-height: unset;
}

.testimonials-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: clamp(30px, 4vw, 56px);
}

.testimonials-head .line {
  flex: 1;
  height: 3px;
  background: var(--blue);
}

.testimonials-head h2::after {
  background: none;
}

.testimonials-carousel {
  margin: clamp(72px, 9vw, 120px) 0;
}

.testimonial-viewport {
  overflow: hidden;
}

.testimonial-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-md);
}

.testimonial-track.is-carousel {
  display: flex;
  transition: transform 0.6s ease;
  gap: 0;
}

.testimonial-page {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-md);
}

.testimonial-card {
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 2.4vw, 34px);
}

.testimonial-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.g-icons {
  width: 48px;
  height: 48px;
}

.g-icons img {
  width: 100%;
}

/* ==== STAR RATING ==== */

.stars {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 26px;
    line-height: 1;
}

.star {
    display: inline-block;
    position: relative;
    font-size: inherit;
    line-height: 1;
}

.star-full {
    color: #f6a723;
}

.star-empty {
    color: #d5d5d5;
}

.star-half {
    color: #d5d5d5;
    position: relative;
}

.star-half::before {
    content: "★";
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #f6a723;
}

/* ==== */

.testimonial-card p {
  color: var(--ink);
  font-weight: 600;
  margin: unset;
  margin: 35px 0px;
}

.testimonial-name {
  color: var(--ink);
  font-weight: 700;
  font-size: var(--fs-lead);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: clamp(24px, 3vw, 40px);
}

.carousel-dots .dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  opacity: 0.45;
}

.carousel-dots .dot.active {
  background: var(--dark);
  opacity: 1;
}

/* ---------- FAQ ---------- */
.faq {
  padding: var(--section-py) var(--section-px);
  min-height: unset;
}

.faq-head {
  margin-bottom: clamp(30px, 4vw, 56px);
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--gap-lg);
  max-width: 80%;
  margin: clamp(72px, 9vw, 120px) auto 0;
}

.faq-col {
  border-top: 0.5px solid var(--ink);
}

.faq-col .faq-item:last-child {
  border-bottom: 1px solid var(--ink);
}

.faq-item {
  border-bottom: 0.5px solid var(--ink);
  border-top: 0.5px solid var(--ink);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 5px 0;
  background: none;
  border: none;
  margin: 0;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.faq-question span:first-child {
  font-size: var(--fs-card-body);
  color: var(--dark);
  font-weight: 500;
}

.faq-plus {
  color: var(--blue);
  font-size: 42px;
  font-weight: 100;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-item.open .faq-plus {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding-bottom 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 22px;
}

.faq-answer p {
  opacity: 0.85;
  font-size: var(--fs-card-body);
  margin: 0;
  max-width: 60ch;
}

.credentials {
  padding: var(--section-py) var(--section-px);
  min-height: unset;
 }

.faq-cta {
  border-radius: var(--radius-xl);
  padding: 20px;
  align-items: flex-end;
  position: relative;
  overflow: visible;
  margin-top: var(--section-px);
}

.faq-cta-left {
  display: flex;
  gap: 18px;
  max-width: 60%;
  padding: 35px 0;
  align-items: center;
}

.faq-cta-photo {
  position: relative;
  align-self: flex-end;
  margin-top: -80%;
  margin-bottom: -20px;
  width: clamp(350px, 32vw, 550px);
}

.faq-cta-photo img {
  width: 100%;
  display: block;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.faq-cta-btn {
  position: absolute;
  right: 0;
  bottom: 0;
  white-space: nowrap;
  margin-bottom: 20px;
}

.faq-cta-note p {
  margin: unset;
  max-width: unset;
}


.services {
  padding: var(--section-py) var(--section-px);
}

.services .section-head p {
  max-width: 62ch;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-sm);
  max-width: 92%;
  margin: clamp(48px, 6vw, 80px) auto 0;
}

.service-card {
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 1.8vw, 28px);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease,
    transform 0.25s ease;
}

.service-card:hover {
  border-color: var(--ink);
  box-shadow: 0px 20px 50px -34px var(--cta-blue);
  transform: translateY(-2px);
}

.service-icon {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.service-card .service-text h3 {
  font-family: "Figtree", sans-serif;
  font-weight: 700;
  font-size: var(--fs-lead);
  margin-bottom: 4px;
}

.service-card .service-text p {
  margin: 0;
  font-size: var(--fs-card-body);
}

/* ---------- Small Laptop / Standard Browser Window (1025px–1600px) ---------- */

@media (min-width: 1025px) and (max-width: 1600px) {
  .why-us-card,
  .treatments-grid,
  .faq-grid {
    max-width: 92%;
  }

  .treatment-toggle {
    padding: clamp(14px, 1.6vw, 18px) 0 clamp(6px, 0.8vw, 8px) clamp(20px, 3vw, 45px);
  }

  .why-us-icon {
    width: clamp(48px, 3.6vw, 58px);
    height: clamp(48px, 3.6vw, 58px);
  }

  .why-us-icon svg {
    width: 18px;
    height: 18px;
  }

  .why-us-grid {
    gap: clamp(30px, 3.2vw, 46px) clamp(24px, 2.4vw, 34px);
  }

  .g-icons {
    width: clamp(34px, 2.6vw, 40px);
    height: clamp(34px, 2.6vw, 40px);
  }

  .stars {
    font-size: clamp(17px, 1.3vw, 21px);
    letter-spacing: 4px;
  }

  .testimonial-card p {
    margin: clamp(20px, 2.2vw, 28px) 0;
  }

  .carousel-dots .dot {
    width: clamp(10px, 0.8vw, 12px);
    height: clamp(10px, 0.8vw, 12px);
  }

  .carousel-dots {
    gap: 10px;
  }

  .faq-plus {
    font-size: clamp(26px, 2.2vw, 34px);
  }

  .services-grid {
    max-width: 92%;
  }

  .service-card {
    padding: clamp(18px, 1.5vw, 24px);
    gap: 14px;
  }

  .service-icon {
    width: clamp(42px, 3.4vw, 52px);
    height: clamp(42px, 3.4vw, 52px);
  }

  .service-card .service-text h3 {
    font-size: clamp(18px, 1.2vw, 22px);
  }

  .service-card .service-text p {
    font-size: clamp(14px, 0.9vw, 16px);
  }
}


/* ---------- Tablet (≤1024px) ---------- */
@media (max-width: 1024px) {
  .hero-cosmetic{
    background: url(../images/cosmetics-hero-mobile.jpg) no-repeat center right;
    background-position: top right;
    background-size: 100% auto;
  }
  
  .hero-endodontics{
    background: url(../images/endodontics-hero-mobile.jpg) no-repeat center right;
    background-position: top right;
    background-size: 100% auto;
  }
  
  .hero-dental-implants{
    background: url(../images/implants-hero-mobile.jpg) no-repeat center right;
    background-position: top right;
    background-size: 100% auto;
  }
  
  .hero-oral-surgery{
    background: url(../images/oral-surgery-hero-mobile.jpg) no-repeat center right;
    background-position: top right;
    background-size: 100% auto;
  }
  
  .hero-orthodontics{
    background: url(../images/orthodontics-hero-tablet.jpg) no-repeat center right;
    background-position: top right;
    background-size: 100% auto;
  }
  
  .hero-pediatric{
    background: url(../images/pediatric-hero-mobile.jpg) no-repeat center right;
    background-position: top right;
    background-size: 100% auto;
  }
  
  .hero-periodontics{
    background: url(../images/peridontics-hero-mobile.jpg) no-repeat center right;
    background-position: top right;
    background-size: 100% auto;
  }
  
  
  .hero-preventive{
    background: url(../images/preventive-first-tablet.jpg) no-repeat center right;
    background-position: top right;
    background-size: 100% auto;
  }

  .treatments-grid {
    grid-template-columns: 1fr;
  }

  .treatment-photo {
    position: static;
  }

  .why-us-card {
    grid-template-columns: 1fr;
    text-align: center;
    max-width: unset;
  }

  .why-us-intro {
    margin-bottom: var(--section-px);
  }

  .why-us-intro h2 br {
    display: none;
  }

  .why-us-intro p {
    margin: 0 auto;
  }

  .why-us-feature {
    text-align: left;
  }

  .tech-card {
    flex: 1 1 280px;
  }

  .testimonial-page {
    grid-template-columns: repeat(2, 1fr);
  }

  /* tech-grid tablet/mobile rules live in the
     "ADVANCED TECHNOLOGY: TABLET + MOBILE FIXES" block at the bottom */

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .faq-cta {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-left: clamp(20px, 3vw, 50px);
  }

  .faq-cta-left {
    padding-bottom: 0;
    flex-direction: column;
  }

  .faq-cta-photo {
    align-self: center;
    margin-top: 24px; 
    width: clamp(260px, 25vw, 400px);
  }

  .faq-cta-btn {
    position: static;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Mobile (≤600px) ---------- */
@media (max-width: 600px) {  

  .hero-orthodontics{
    background: url(../images/orthodontics-hero-mobile.jpg) no-repeat center right;
    background-position: top right;
    background-size: 100% auto;
  }

  .hero-preventive{
    background: url(../images/preventive-first-mobile.jpg) no-repeat center right;
    background-position: top right;
    background-size: 100% auto;
  }

  .trust-track-static {
    justify-content: center;
    gap: 16px;
    padding: 10px var(--section-px);
  }

  .testimonials-head {
    gap: 12px;
  }

  .testimonial-page {
    grid-template-columns: repeat(1, 1fr);
  }

  .testimonials-head .line {
    max-width: 40px;
  }

  .why-us-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .faq-cta-photo {
    margin-top: 16px; 
  }

  .faq-grid {
    max-width: 90%;
    margin: 30px auto 60px;
  }

  .faq-question {
    padding: 6px 0;
  }

  .faq-cta-left {
    max-width: 74%;
    padding: 30px 0;
  }

  .faq-plus {
    font-size: 32px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 375px) {
  .hero-orthodontics{
    background: url(../images/orthodontics-hero-tablet.jpg) no-repeat center right;
    background-position: top right;
    background-size: 100% auto;
  }

  .hero-preventive{
    background: url(../images/preventive-first-tablet.jpg) no-repeat center right;
    background-position: top right;
    background-size: 100% auto;
  }

  .services-grid {
    grid-template-columns: 1fr;
    max-width: unset;
  }
  .service-card {
    align-items: flex-start;
  }
}


/* ---------- TESTIMONIAL TRUNCATION ---------- */
.testimonial-card {
  display: flex;
  flex-direction: column;
}

.testimonial-card .testimonial-text {
  display: -webkit-box;
  -webkit-line-clamp: 6;          /* number of visible lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 24px 0 16px;
}

.read-more {
  margin-top: auto;               /* pins the button to the card bottom */
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--fs-card-body);
  font-weight: 700;
  color: var(--blue);
  border-bottom: 1.5px solid currentColor;
}
.read-more:hover { color: var(--dark); }

/* ---------- REVIEW POPUP ---------- */
.review-dialog {
  border: none;
  padding: 0;
  border-radius: var(--radius-lg);
  width: min(92vw, 640px);
  max-height: 85vh;
  margin: auto;
  box-shadow: 0 30px 80px -20px rgba(15, 42, 56, 0.35);
  overflow: hidden;
}

.review-dialog::backdrop {
  background: rgba(15, 42, 56, 0.55);
  backdrop-filter: blur(4px);
}

.review-box {
  position: relative;
  padding: clamp(24px, 3vw, 40px);
  max-height: 85vh;
  overflow-y: auto;
}

.review-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
  padding-right: 40px;            /* room for close button */
}

.review-body {
  font-size: var(--fs-card-body);
  font-weight: 500;
  line-height: 1.7;
  color: var(--ink);
}

.review-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 34px;
  line-height: 1;
  color: var(--dark);
  cursor: pointer;
}
.review-close:hover { color: var(--blue); }

.read-more[hidden] { display: none; }


/* ---------- TESTIMONIALS: TABLET + MOBILE FIXES ---------- */
@media (max-width: 1024px) {
  /* icon on the left, name + stars stacked on the right */
  .testimonial-top {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon name"
      "icon stars";
    column-gap: 14px;
    row-gap: 4px;
    align-items: center;
    margin-bottom: 0;
  }
  .testimonial-top .g-icons  { grid-area: icon; }
  .testimonial-top .testimonial-name { grid-area: name; }
  .testimonial-top .stars    { grid-area: stars; }

  .testimonial-name {
    font-size: 17px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    min-width: 0;
  }

  .stars { font-size: 20px; gap: 2px; }

  /* undo the global `section p` centering / 90% width */
  .testimonial-card .testimonial-text {
    max-width: none;
    margin: 18px 0 14px;
    font-size: 15px;
    line-height: 1.65;
    -webkit-line-clamp: 7;
  }

  .testimonial-card { min-width: 0; }
}

@media (max-width: 600px) {
  .testimonials-carousel { margin: 32px 0 0; }

  .testimonials-head { margin-bottom: 24px; }
  .testimonials h2 { font-size: 1.6rem; margin-bottom: 16px; }

  .testimonial-card {
    padding: 20px 18px;
    border-radius: var(--radius-md);
    border-color: var(--outline);
    box-shadow: var(--box-shadow-standard);
  }

  .g-icons { width: 40px; height: 40px; }

  .read-more {
    font-size: 14px;
    padding: 8px 0;           /* bigger tap area */
  }

  .carousel-dots { gap: 10px; margin-top: 20px; }
  .carousel-dots .dot { width: 10px; height: 10px; }

  /* keeps the card shadow from being clipped by the viewport's overflow */
  .testimonial-viewport { padding: 6px 2px 14px; }

  /* popup */
  .review-dialog { width: 94vw; border-radius: var(--radius-md); }
  .review-box { padding: 20px 18px; }
  .review-head { gap: 10px; }
  .review-head .stars { font-size: 18px; }
  .review-body { font-size: 15px; line-height: 1.65; }
}


/* ---------- ADVANCED TECHNOLOGY: TABLET + MOBILE FIXES ---------- */
/* Uses .doctor-grid.tech-grid (higher specificity) so it beats the
   .doctor-grid / .doctor-card rules in styles.css without !important. */

/* Tablet: 2 per row, odd last card centred */
@media (max-width: 1024px) {
  .doctor-grid.tech-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap-lg);
    max-width: 760px;
    margin: 0 auto;
    padding: 0;
  }

  .doctor-grid.tech-grid > .doctor-card {
    grid-column: span 2;
  }

  .doctor-grid.tech-grid > .doctor-card:last-child:nth-child(odd) {
    grid-column: 2 / span 2;
  }

  .tech .doctor-card .title { min-height: 0; }
}

/* Mobile: single column, tighter cards */
@media (max-width: 600px) {
  .doctor-grid.tech-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 420px;
  }

  .doctor-grid.tech-grid > .doctor-card,
  .doctor-grid.tech-grid > .doctor-card:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .tech .doctor-photo {
    aspect-ratio: 16 / 10;
    margin-bottom: 14px;
  }

  .tech .doctor-card .body { padding: 2px 8px 10px; }
  .tech .doctor-card h3 { font-size: 20px; }
  .tech .doctor-card .title { font-size: 15px; line-height: 1.5; }
}