/* XXL devices (very large screens, 1400px and up) */
@media (min-width: 1400px) {
}

/* Extra large devices (large desktops, 1200px to 1399.98px) */
@media (min-width: 1200px) and (max-width: 1399.98px) {
}

/* Large devices (desktops, 992px to 1199.98px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .my-main-footer .my-main-footer__links {
    display: grid;
    grid-template-columns: repeat(3, auto);
    
    gap: 12px 18px;
}
.hero .container {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 10px;
    align-items: center;
}
}

/* Medium devices (tablets, 768px to 991.98px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .topbar-content {
    flex-direction: column;
    gap: 10px;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .specializations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .consultation-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
  .results-nav {
    margin: 20px 20px 0;
  }

  .ailments-slider {
    width: 100%;
    max-width: 700px;
}


.topbar-content {
    flex-direction: row;
    gap: 10px;
}


.topbar-right {
    flex-direction: row;
    gap: 10px;
    justify-content: flex-end;
    /* justify-items: flex-end; */
    width: 100%;
}

.btn-book {
    width: fit-content;
    justify-content: center !important;
}

.topbar-content {
    flex-direction: row;
    gap: 10px;
    display: flex;
    align-items: flex-end;
}



.hero .container {
    grid-template-columns: 60% 40%;
    gap: 20px;
}



.form-row {
    flex-direction: row;
    flex-wrap: wrap;
}


.results-nav {
    margin: 0px 0px 0;
}


 .resultsSwiper .swiper-slide-active {
    transform: scale(1);
    opacity: 1;
  }

.specialist-content .btn {
  display: inline-block;     /* important */
  width: fit-content;        /* size based on content */
  max-width: 100%;           /* don't overflow container */

  height: 50px;
  padding: 0 20px;

  white-space: nowrap;       /* keep in one line */
  overflow: hidden;
  text-overflow: ellipsis;   /* optional */
}
.stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
.faq-a {
    padding:0 15px;
    font-size: 14px;
}

.modal-content {
    margin: 0 auto;
    width: 90%;
    
}


.my-main-footer .my-main-footer__links {
    grid-template-columns: repeat(2, auto);
    justify-items: flex-start;
}

.footer-bottom {
    flex-direction: row;
    text-align: center;
    gap: 15px;
}

.my-main-footer {
    background: var(--light);
    padding: 50px 0 40px;
    text-align: center;
}



.logo img {
    height: 60px;
    transition: all 0.3s ease;
}

h2{
    font-size: 30px !important;
    margin-bottom: 20px !important;
}


.stats-title {
    text-align: center;
    font-size: 30px;
    color: var(--primary);
   
    margin-bottom: 20px;
}

.call {
    font-size: 15px;
}

}

/* Small devices (phones, 576px to 767.98px) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .topbar-content {
    flex-direction: column;
    gap: 10px;
  }
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .hero-content h1 {
    font-size: 1.8rem;
  }
  .specializations-grid {
    grid-template-columns: 1fr;
  }
  .consultation-wrapper {
    grid-template-columns: 1fr;
  }
  .results-nav {
    margin: 20px 10px 0;
  }
  .cta-grid h2 {
    font-size: 1.5rem;
  }








 .rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    justify-content: center;
  }

  .form-fileds {
    display: grid;
    grid-template-columns: 1fr;
    column-gap: 20px !important;
  }
  .modal-content {
    width: 90%;
    margin: 0 auto;
  }

  .modal-footer {
    padding: 10px 15px;
    flex-wrap: nowrap;
  }

  .checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    display: none;
    margin: 10px 0 15px;
    font-size: 14px;
  }
  .consultation-form .btn {
    max-width: 230px;
    margin: 0 auto;
    display: flex;
    text-align: center;
    margin-top: 20px;
    justify-content: center;
  }

  .consultation-form {
    /* background: var(--light); */
    padding: 40px 0;
  }

  .specializations h2 {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .results h2 {
    text-align: center;
    font-size: 24px;

    margin-bottom: 15px;
  }

  .consultation .container h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 15px;
  }
  .consultation {
    padding: 10px 0 40px 0;
    /* background: #f8fafc; */
  }

  .ailments-content h2 {
    text-align: center;
    font-size: 24px;

    margin-bottom: 15px;
  }

  .ailments-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;

    padding: 10px 12px 6px;
    margin-bottom: 5px;

    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;

    /* IMPORTANT: prevents cutting */
    width: 100%;
  }

  /* hide default scrollbar */
  .ailments-tabs::-webkit-scrollbar {
    height: 3px; /* very small */
  }

  /* scrollbar track */
  .ailments-tabs::-webkit-scrollbar-track {
    background: #eee;
    border-radius: 10px;
  }

  /* scrollbar thumb (moving part) */
  .ailments-tabs::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
  }

  /* Firefox */
  .ailments-tabs {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #eee;
  }

  /* tabs */
  .ailments-tabs .tab-item {
    flex: 0 0 auto;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 8px;
    background: #f5f5f5;
    white-space: nowrap;
    border: 1px solid #ddd;
    transition: 0.25s;
  }

  /* active */
  .ailments-tabs .tab-item.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }

  .ailments-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;

    padding: 10px 16px; /* 👈 THIS FIXES YOUR ISSUE */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  .ailments-tabs .tab-item:first-child {
    margin-left: 4px;
  }

  .ailments-tabs .tab-item:last-child {
    margin-right: 4px;
  }
  .ailments-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    gap:10px;
    padding: 10px 16px;
    justify-content: flex-start;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  /* critical */
  .ailments-tabs .tab-item {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  /* optional scrollbar */
  .ailments-tabs::-webkit-scrollbar {
    height: 3px;
  }


.specialist-content {
    display: grid;
    grid-template-columns: 50% 50%;
    text-align: left;
    align-items: center;
}
.cta-grid {
    /* display: flex; */
    align-items: center;
    display: grid;
    grid-template-columns: 50% 50%;
    justify-content: center;
    justify-items: center;
    align-content: center;
}



.tab-btn {
  flex: 0 0 auto;            
  width: fit-content;       
  max-width: 100%;           

  padding: 6px 12px;
  height: auto;

  white-space: nowrap;       
  overflow: hidden;
  text-overflow: ellipsis;   

 
}






.ailments-text h4 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 5px;
}

.specialist-content .btn {
    width: fit-content;
    height: 50px;
    margin-top: 20px;
}


.stats-title {
    text-align: center;
    font-size: 24px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 14px;
}

.reviews-section h2 {
    font-size: 24px;
    margin-bottom: 15px;
}



.faq h2 {
    font-size: 24px;
    margin-bottom: 15px;
}



.faq-a {
    padding:0 15px;
    font-size: 13px;
}

.faq {
    padding: 0px 0  10px;
}



.my-main-footer .my-main-footer__links {
   
    justify-items: start;
    padding-left: 50px;
}


.my-main-footer .my-main-footer__logo img {
    height: 50px;
    margin-bottom: 10px;
    max-width: auto;
}


.my-main-footer {
    background: var(--light);
    padding: 40px 0  20px;
    text-align: center;
}


















}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
  .topbar-content {
    flex-direction: column;
    gap: 10px;
  }
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .hero-content h1 {
    font-size: 1.5rem;
  }
  .hero-content p {
    font-size: 0.9rem;
  }
  .specializations-grid {
    grid-template-columns: 1fr;
  }
  .consultation-wrapper {
    grid-template-columns: 1fr;
  }
  .results-nav {
    margin: 0px 0px 0;
  }
  .cta-grid {
    flex-direction: column;
    gap: 20px;
  }
  .cta-grid h2 {
    font-size: 1.3rem;
  }
  .ailments-tabs {
    flex-wrap: wrap;
  }
  .tab-btn {
    flex: 1 1 45%;
    margin: 5px;
  }

  .hero-image {
    margin: 0 auto;
    width: 100%;
    max-width: 350px;
  }

  .results-prev,
  .results-next {
    width: 30px;
    height: 30px;
  }
  .ailments-detail.active {
    grid-template-columns: 1fr;
    gap: 25px;
    /* max-width: 350px; */
  }

  .ailments-detail.active {
    display: flex;
    /* max-width: 350px; */
    flex-direction: column;
  }

  .logo img {
    height: 50px;
    transition: all 0.3s ease;
  }

  .btn-book {
    width: fit-content;
    /* display: none !important; */
    justify-content: center !important;
    margin:  0 auto;
  }

  .specialist-content {
    display: flex !important;
    flex-direction: column !important;
    text-align: center;
  }

  .cta-grid {
    display: flex !important;
    flex-direction: column !important;
  }

  .rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    justify-content: center;
  }

  .form-fileds {
    display: grid;
    grid-template-columns: 1fr;
    column-gap: 20px !important;
  }
  .modal-content {
    width: 90%;
    margin: 0 auto;
  }

  .modal-footer {
    padding: 10px 15px;
    flex-wrap: nowrap;
  }

  .checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 15px;
    font-size: 14px;
  }
  .consultation-form .btn {
    max-width: 260px;
    margin: 0 auto;
    display: flex;
    text-align: center;
    justify-content: center;
  }

  .consultation-form {
    /* background: var(--light); */
    padding: 40px 0;
  }

  .specializations h2 {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .results h2 {
    text-align: center;
    font-size: 24px;

    margin-bottom: 15px;
  }

  .consultation .container h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 15px;
  }
  .consultation {
    padding: 10px 0 40px 0;
    /* background: #f8fafc; */
  }

  .ailments-content h2 {
    text-align: center;
    font-size: 24px;

    margin-bottom: 15px;
  }

  .ailments-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;

    padding: 10px 12px 6px;
    margin-bottom: 5px;

    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;

    /* IMPORTANT: prevents cutting */
    width: 100%;
  }

  /* hide default scrollbar */
  .ailments-tabs::-webkit-scrollbar {
    height: 3px; /* very small */
  }

  /* scrollbar track */
  .ailments-tabs::-webkit-scrollbar-track {
    background: #eee;
    border-radius: 10px;
  }

  /* scrollbar thumb (moving part) */
  .ailments-tabs::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
  }

  /* Firefox */
  .ailments-tabs {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #eee;
  }

  /* tabs */
  .ailments-tabs .tab-item {
    flex: 0 0 auto;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 8px;
    background: #f5f5f5;
    white-space: nowrap;
    border: 1px solid #ddd;
    transition: 0.25s;
  }

  /* active */
  .ailments-tabs .tab-item.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }

  .ailments-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;

    padding: 10px 16px; /* 👈 THIS FIXES YOUR ISSUE */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  .ailments-tabs .tab-item:first-child {
    margin-left: 4px;
  }

  .ailments-tabs .tab-item:last-child {
    margin-right: 4px;
  }
  .ailments-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    gap:0px;
    padding: 10px 16px;
    justify-content: flex-start;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  /* critical */
  .ailments-tabs .tab-item {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  /* optional scrollbar */
  .ailments-tabs::-webkit-scrollbar {
    height: 3px;
  }







.tab-btn {
  flex: 0 0 auto;            
  width: fit-content;       
  max-width: 100%;           

  padding: 6px 12px;
  height: auto;

  white-space: nowrap;       
  overflow: hidden;
  text-overflow: ellipsis;   

 
}






.ailments-text h4 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 5px;
}

.specialist-content .btn {
    width: fit-content;
    height: 50px;
    margin-top: 20px;
}


.stats-title {
    text-align: center;
    font-size: 24px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 14px;
}

.reviews-section h2 {
    font-size: 24px;
    margin-bottom: 15px;
}



.faq h2 {
    font-size: 24px;
    margin-bottom: 15px;
}



.faq-a {
    padding:0 15px;
    font-size: 13px;
}

.faq {
    padding: 0px 0  10px;
}



.my-main-footer .my-main-footer__links {
   
    justify-items: start;
    padding-left: 50px;
}


.my-main-footer .my-main-footer__logo img {
    height: 50px;
    margin-bottom: 10px;
    max-width: auto;
}


.my-main-footer {
    background: var(--light);
    padding: 40px 0  20px;
    text-align: center;
}




.call {
    font-size: 20px;
}

.phone-input-group .input-box .phone-input {
    width: 100%;
    padding: 15px 48px 15px 122px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    min-width: 310px;
}


.modal-body .form-control, .modal-body .form-select {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 15px;
    min-width: 250px;
    font-size: 16px;
    transition: all 0.3s ease;
}
.modal-header .modal-title {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 15px;
    margin-bottom: 60px;
}



.sticky-buttons {
    position: fixed;
    right: 10px;
    bottom: 50px;
}


.nav-app-btn {
  display: none !important;
}




















.modal-header .modal-title {
    
    margin-left: 0px;
}

}
@media (max-width: 991.98px) {
  .reviews-grid.swiper {
    display: block;
    width: 100%;
  }

  .reviewsSlider {
    width: 100%;
  }

  .reviewsSlider .swiper-slide {
    width: auto;
    max-width: 100%;
  }

  .modal-dialog {
    min-width: auto !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 1.75rem auto;
  }

  .results-prev,
  .results-next {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 575.98px) {
  .reviews-grid.swiper {
    padding: 0 10px;
  }

  .resultsSwiper .swiper-slide-active {
    transform: scale(1);
    opacity: 1;
  }
}
