/* ======================================
   RESPONSIVE ENHANCEMENTS
   Mobile-first improvements for all pages
   ====================================== */

/* ============ BASE RESPONSIVE FIXES ============ */

/* Ensure all images are responsive by default */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Prevent horizontal overflow */
body {
  overflow-x: hidden;
}

/* Make iframes responsive */
iframe {
  max-width: 100%;
}

/* Responsive tables - scroll on mobile */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============ TYPOGRAPHY RESPONSIVE ============ */

/* Scale down headings on mobile */
@media (max-width: 767px) {
  h1 {
    font-size: 1.75rem !important;
  }

  h2 {
    font-size: 1.5rem !important;
  }

  h3 {
    font-size: 1.25rem !important;
  }

  h4 {
    font-size: 1.1rem !important;
  }

  /* Prevent text overflow */
  p,
  li,
  span {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* ============ HEADER & NAVIGATION ============ */

/* Mobile logo positioning - left aligned */
@media (max-width: 767px) {
  .header__area-menubar {
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
  }

  .header__area-menubar-left {
    width: auto !important;
    text-align: left !important;
    margin-bottom: 0 !important;
    flex-grow: 0 !important;
  }

  .header__area-menubar-left-logo {
    text-align: left !important;
  }

  .header__area-menubar-left-logo img {
    max-width: 140px !important;
    margin: 0 !important;
  }

  .header__area-menubar-center {
    display: none !important;
  }

  .header__area-menubar-right {
    width: auto !important;
    margin-bottom: 0 !important;
    margin-left: auto !important;
  }
}

/* Ensure header is responsive */
@media (max-width: 991px) {
  .header__area-menubar {
    flex-wrap: wrap;
  }

  .header__area-menubar-left,
  .header__area-menubar-center,
  .header__area-menubar-right {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
  }

  /* Logo sizing on mobile */
  .header__area-menubar-left-logo img {
    max-width: 150px;
    margin: 0 auto;
  }

  /* Hide desktop menu items that don't fit */
  .header__area-menubar-right-box-btn {
    display: none;
  }
}

@media (max-width: 575px) {
  .header__area-menubar-left-logo img {
    max-width: 120px;
  }
}

/* ============ BANNER & HERO SECTIONS ============ */

@media (max-width: 991px) {
  .page__banner {
    padding: 40px 0 !important;
  }

  .page__banner-content h2 {
    font-size: 1.75rem !important;
  }

  .page__banner-img img {
    max-width: 250px;
    margin: 20px auto 0;
  }
}

@media (max-width: 575px) {
  .page__banner {
    padding: 30px 0 !important;
  }

  .page__banner-content h2 {
    font-size: 1.5rem !important;
  }

  .page__banner-img {
    display: none;
  }
}

/* Banner home sliders */
@media (max-width: 767px) {
  .banner__one-content h1,
  .banner__two-content h1 {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
  }

  .banner__one-content p,
  .banner__two-content p {
    font-size: 0.95rem !important;
  }
}

/* ============ BUTTONS & FORMS ============ */

/* Make buttons stack and full-width on mobile */
@media (max-width: 575px) {
  .btn-one,
  .btn-two,
  .btn-three {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
    padding: 12px 20px !important;
  }

  /* Form inputs full width */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  textarea,
  select {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 15px;
  }

  /* Contact form adjustments */
  .contact__one-form input,
  .contact__one-form textarea {
    width: 100% !important;
  }
}

/* ============ CARDS & SERVICE BOXES ============ */

@media (max-width: 767px) {
  /* Service cards spacing */
  [class*="service__"]-item,
  [class*="service__"]-single {
    margin-bottom: 30px;
  }

  /* Icon sizes in service boxes */
  [class*="service__"] .icon,
  [class*="service__"] i {
    font-size: 2rem !important;
  }
}

/* ============ ABOUT & CONTENT SECTIONS ============ */

@media (max-width: 991px) {
  .about__one-image,
  .about__two-image {
    margin-bottom: 30px;
    text-align: center;
  }

  .about__one-content,
  .about__two-content {
    text-align: center;
  }

  /* Image wrapper responsive */
  .about__one-image-wrapper img {
    max-width: 100%;
    margin: 0 auto 20px;
  }

  /* Experience bar on mobile */
  .experience-bar {
    position: static !important;
    margin: 20px auto;
    max-width: 200px;
  }
}

/* ============ FOOTER RESPONSIVE ============ */

@media (max-width: 991px) {
  .footer__two-widget {
    margin-bottom: 30px;
    text-align: center;
  }

  .footer__two-widget-about,
  .footer__two-widget-solution ul {
    text-align: center;
  }

  .footer__two-widget-social ul {
    justify-content: center;
  }
}

@media (max-width: 575px) {
  .copyright__one-left,
  .copyright__one-right {
    text-align: center !important;
    margin-bottom: 10px;
  }

  .copyright__one-right a {
    display: inline-block;
    margin: 5px 10px;
  }
}

/* ============ PORTFOLIO & GALLERY ============ */

@media (max-width: 767px) {
  [class*="portfolio__"] img,
  [class*="project__"] img {
    width: 100%;
    height: auto;
  }

  /* Portfolio filter buttons */
  [class*="portfolio__"] .filter-button,
  .project-filter button {
    padding: 8px 15px !important;
    font-size: 0.85rem !important;
    margin: 5px !important;
  }
}

/* ============ TESTIMONIALS & SLIDERS ============ */

@media (max-width: 767px) {
  .testimonial__one {
    padding: 80px 0 60px 0 !important;
    margin-top: 40px;
  }

  .testimonial__one-left {
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    z-index: 1;
  }
  .testimonial__one-slider .single-slider {
    padding: 20px !important;
  }

  /* Ensure no overlap with previous sections */
  .testimonial__one .container {
    position: relative;
    z-index: 2;
  }

  .testimonial__one .row {
    margin-top: 0;
    position: relative;
  }

  /* Enhanced Testimonial Slider Mobile Support */
  .testimonial__one-slider-active {
    position: relative;
    overflow: visible;
    width: 100%;
    min-height: 400px;
    touch-action: pan-x pan-y;
    padding: 20px 15px 0 15px;
    margin-top: 30px;
    z-index: 2;
  }

  .testimonial__one-slider-active .swiper-wrapper {
    display: flex;
    align-items: stretch;
    height: auto;
    width: 100%;
  }
  .testimonial__one-slider-active .single-slider {
    background: #fff;
    padding: 30px 20px !important;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
    height: auto;
    min-height: 280px;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
  }

  .single-slider-user {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .single-slider-user-name {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .single-slider-user-name h4 {
    font-size: 20px !important;
    margin: 0 !important;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
  }

  .single-slider-user-name span {
    font-size: 15px;
    color: #666;
    font-weight: 500;
    margin: 0;
  }

  .single-slider-user-rating {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 2px;
  }

  .single-slider-user-rating i {
    color: #ffc107;
    font-size: 15px;
    margin: 0;
  }

  .single-slider p {
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #555;
    margin: 18px 0 0 0 !important;
    flex-grow: 1;
    text-align: left;
  }

  /* Better mobile testimonial spacing */
  .testimonial__one-right {
    padding: 0 !important;
    margin-top: 50px;
    position: relative;
    z-index: 2;
  }

  /* Navigation arrows styling */
  .testimonial__one-right-bottom {
    margin-top: 30px;
    padding: 0 15px;
    display: none; /* Hide arrows on mobile */
  }

  .testimonial__one-right-bottom .slider-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
  }

  .slider-arrow i.swiper-button-prev,
  .slider-arrow i.swiper-button-next {
    position: static !important;
    background: #007bff !important;
    color: white !important;
    width: 45px !important;
    height: 45px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 14px !important;
    border: none !important;
    outline: none !important;
    margin: 0 !important;
  }

  .slider-arrow i.swiper-button-prev:hover,
  .slider-arrow i.swiper-button-next:hover {
    background: #0056b3 !important;
    transform: scale(1.05) !important;
  }

  .slider-arrow i.swiper-button-prev:after,
  .slider-arrow i.swiper-button-next:after {
    display: none !important;
  }

  /* Pagination dots */
  .testimonial__one-slider-active .swiper-pagination {
    position: relative;
    margin-top: 25px;
    text-align: center;
    padding: 0;
  }

  .testimonial__one-slider-active .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .testimonial__one-slider-active .swiper-pagination-bullet-active {
    background: #007bff;
    transform: scale(1.2);
  }
}

/* ============ SCROLL TO TOP BUTTON ============ */

.scroll-up {
  position: fixed !important;
  right: 25px !important;
  bottom: 25px !important;
  width: 50px !important;
  height: 50px !important;
  background: #007bff !important;
  border-radius: 50% !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 999999 !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4) !important;
  border: none !important;
  isolation: isolate !important;
}

.scroll-up i {
  color: white !important;
  font-size: 18px !important;
  transition: all 0.3s ease !important;
}

.scroll-up:hover {
  background: #0056b3 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.5) !important;
}

.scroll-up:active {
  transform: translateY(0) scale(0.95) !important;
  transition: transform 0.1s ease !important;
}

.scroll-up.active-scroll {
  display: flex !important;
  animation: fadeInUp 0.5s ease-out !important;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767px) {
  .scroll-up {
    right: 15px !important;
    bottom: 15px !important;
    width: 45px !important;
    height: 45px !important;
    box-shadow: 0 3px 12px rgba(0, 123, 255, 0.3) !important;
  }

  .scroll-up i {
    font-size: 16px !important;
  }

  .scroll-up:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4) !important;
  }
} /* ============ PRICING TABLES ============ */

@media (max-width: 767px) {
  [class*="pricing__"] .pricing-card,
  [class*="pricing__"] .pricing-item {
    margin-bottom: 30px;
  }
}

/* ============ FAQ SECTION ============ */

@media (max-width: 767px) {
  .faq__one .accordion-button {
    font-size: 0.95rem !important;
    padding: 15px !important;
  }

  .faq__one .accordion-body {
    font-size: 0.9rem !important;
  }
}

/* ============ BLOG & NEWS ============ */

@media (max-width: 767px) {
  [class*="blog__"] .blog-item,
  [class*="blog__"] .post-item {
    margin-bottom: 30px;
  }

  .blog-details img,
  .post-details img {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
  }

  /* Blog sidebar on mobile */
  .sidebar {
    margin-top: 40px;
  }
}

/* ============ CONTACT PAGE ============ */

@media (max-width: 767px) {
  .contact__one-info {
    margin-bottom: 30px;
  }

  .contact__one-info-item {
    margin-bottom: 20px;
    text-align: center;
  }

  /* Google maps responsive */
  .contact-map iframe {
    width: 100%;
    height: 300px !important;
  }
}

/* ============ WORK PROCESS ============ */

@media (max-width: 991px) {
  .work-process-area__one-single-work {
    margin-bottom: 20px;
  }

  .work-process-area__one-right-img,
  .work-process-area__one-right-counter-img {
    margin-top: 30px;
  }
}

/* ============ TEAM SECTION ============ */

@media (max-width: 767px) {
  [class*="team__"] .team-member,
  [class*="team__"] .team-item {
    margin-bottom: 30px;
  }
}

/* ============ COUNTER & STATS ============ */

@media (max-width: 767px) {
  [class*="counter__"] .counter-item {
    margin-bottom: 30px;
    text-align: center;
  }
}

/* ============ VIDEO SECTIONS ============ */

@media (max-width: 767px) {
  .video__one,
  .video__two {
    padding: 40px 0 !important;
  }

  .video-play-btn {
    width: 60px !important;
    height: 60px !important;
  }
}

/* ============ SUBSCRIBE SECTION ============ */

@media (max-width: 575px) {
  .subscribe__one-form {
    display: flex;
    flex-direction: column;
  }

  .subscribe__one-form input {
    width: 100% !important;
    margin-bottom: 10px;
  }

  .subscribe__one-form button {
    width: 100% !important;
  }
}

/* ============ SKILL BARS & PROGRESS ============ */

@media (max-width: 767px) {
  .skill__one,
  .skill__two {
    margin-top: 30px;
  }

  .progress-bar-text {
    font-size: 0.85rem !important;
  }
}

/* ============ TOP BAR ============ */

@media (max-width: 991px) {
  .top__bar {
    display: none;
  }
}

@media (max-width: 767px) {
  .top__bar-left,
  .top__bar-right {
    text-align: center;
    margin-bottom: 10px;
  }

  .top__bar-left a,
  .top__bar-right a {
    font-size: 0.85rem !important;
    margin: 5px;
  }
}

/* ============ CUSTOM SECTIONS (Why Choose Us, What We Do) ============ */

@media (max-width: 767px) {
  /* Why Choose Us icons */
  .wc-hospital .wc-icon {
    width: 70px !important;
    height: 70px !important;
    font-size: 24px !important;
  }

  .wc-hospital .wc-item p {
    font-size: 14px !important;
  }

  /* What We Do section */
  .what-we-do .what-image {
    margin-top: 20px;
  }

  .what-we-do h3 {
    text-align: center;
  }

  .what-we-do h4 {
    font-size: 1.1rem !important;
  }
}

/* ============ UTILITY RESPONSIVE CLASSES ============ */

/* Text alignment responsive utilities */
@media (max-width: 767px) {
  .text-sm-center {
    text-align: center !important;
  }

  .text-sm-left {
    text-align: left !important;
  }

  .text-sm-right {
    text-align: right !important;
  }
}

/* Spacing adjustments for small screens */
@media (max-width: 767px) {
  .section-padding {
    padding: 50px 0 !important;
  }

  .pt-sm-0 {
    padding-top: 0 !important;
  }

  .pb-sm-0 {
    padding-bottom: 0 !important;
  }

  .mt-sm-30 {
    margin-top: 30px !important;
  }

  .mb-sm-30 {
    margin-bottom: 30px !important;
  }
}

/* ============ PRINT STYLES ============ */

@media print {
  .header__area,
  .footer__two,
  .subscribe__one,
  .top__bar {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }
}

/* ============ DESKTOP SCROLL BUTTON ============ */

@media (min-width: 768px) {
  .scroll-up {
    right: 30px !important;
    bottom: 30px !important;
    width: 55px !important;
    height: 55px !important;
  }

  .scroll-up .scroll-arrow {
    font-size: 20px !important;
  }
}

/* ============ LANDSCAPE MOBILE FIX ============ */

@media (max-width: 767px) and (orientation: landscape) {
  .page__banner {
    padding: 20px 0 !important;
  }

  .banner__one-content h1,
  .banner__two-content h1 {
    font-size: 1.5rem !important;
  }
}

/* ============ VERY SMALL SCREENS (320px) ============ */

@media (max-width: 359px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  h1 {
    font-size: 1.5rem !important;
  }

  h2 {
    font-size: 1.25rem !important;
  }

  .btn-one,
  .btn-two {
    font-size: 0.85rem !important;
    padding: 10px 15px !important;
  }
}
