/**
 * TourMyTravel - Mobile responsive overrides
 * Ensures entire project is mobile-friendly across breakpoints.
 */

/* ========== Base & Container ========== */
@media (max-width: 991px) {
  .container,
  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100%;
  }
}

@media (max-width: 575px) {
  .container,
  .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }

  .pt-100 {
    padding-top: 50px !important;
  }

  .pb-100 {
    padding-bottom: 50px !important;
  }
}

/* ========== Header ========== */
@media (max-width: 767px) {
  .header .header__bottom {
    background: linear-gradient(135deg, #ffffff 0%, #14233c 100%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  }

  .header-top,
  .header__top {
    padding: 0.4rem 0;
  }

  .header-top-bar-area {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .header-top .phone-number,
  .header-top .social-icons {
    margin: 0;
  }

  .header-top .phone-number li a,
  .header-top .social-icons li a {
    font-size: 0.85rem;
  }

  .header .nav-right {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
  }

  .header .nav-right .btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }

  .header .site-logo img {
    max-width: 150px !important;
    min-height: 48px !important;
    max-height: 52px !important;
  }
}

@media (max-width: 375px) {
  .header .site-logo img {
    max-width: 130px !important;
  }
}

/* ========== Hero search - one box (input + button attached) ========== */
.hero__search-input-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
  top: 70px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.hero__search-input-group .form-control {
  flex: 1;
  min-width: 0;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #fff !important;
}

.hero__search-input-group .btn {
  flex-shrink: 0;
  border: none !important;
  border-radius: 0 !important;
  border-left: 1px solid rgba(0, 0, 0, 0.08) !important;
}


/* ========== Hero / Banner ========== */
@media (max-width: 767px) {
  .hero {
    min-height: 380px;
    height: auto;
    padding: 1.5rem 0.75rem;
  }

  .hero__title {
    font-size: 1.5rem !important;
    line-height: 1.25;
  }

  .hero__subtitle {
    font-size: 0.95rem !important;
  }

  .hero__tagline {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .hero__search-input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  }

  .hero__search-input-group .form-control {
    border-radius: 0;
    padding: 0.75rem 1rem;
  }

  .hero__search-input-group .btn {
    padding: 0.75rem 1rem;
    min-width: 52px;
  }

  .hero .btn-outline-light.btn-lg {
    width: 100%;
    font-size: 0.95rem;
  }
}

@media (max-width: 575px) {
  .hero {
    min-height: 320px;
    padding: 1rem 0.5rem;
  }

  .hero__title {
    font-size: 1.35rem !important;
  }

  .hero__subtitle {
    font-size: 0.9rem !important;
  }
}

/* ========== Inner hero (breadcrumb pages) ========== */
@media (max-width: 767px) {
  .inner-hero {
    padding-top: calc(5rem + 56px);
    padding-bottom: 2.5rem;
  }
}

/* ========== Section spacing ========== */
@media (max-width: 575px) {
  section {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ========== Tables ========== */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
  .table {
    font-size: 0.85rem;
  }

  .table th,
  .table td {
    padding: 0.5rem;
  }
}

/* ========== Footer ========== */
@media (max-width: 767px) {
  .footer__overview {
    padding: 1.5rem 0;
  }

  .footer__overview .btn {
    width: 100%;
    margin-top: 0.5rem;
  }

  .footer__top {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .footer__top p {
    font-size: 0.95rem;
  }

  .inlne-menu {
    justify-content: center;
    margin: -0.25rem -0.5rem;
  }

  .inlne-menu li {
    padding: 0.25rem 0.5rem;
  }

  .inlne-menu li a {
    font-size: 0.85rem;
  }

  .footer-logo img {
    max-width: 160px;
  }

  .footer__bottom {
    padding: 0.75rem 0;
  }

  .footer__bottom .row {
    text-align: center;
  }

  .footer__bottom .text-md-end {
    text-align: center !important;
    margin-top: 0.5rem;
  }

  .footer-card {
    max-width: 100%;
    height: auto;
    max-height: 28px;
  }
}

/* ========== Forms ========== */
@media (max-width: 575px) {
  .form-control,
  .form-select,
  .form--control {
    font-size: 16px !important; /* Prevents zoom on focus in iOS */
  }

  .btn {
    min-height: 44px; /* Touch target */
  }

  .contact-form .form--control,
  .tour-inquiry-form .form-control {
    width: 100%;
  }
}

/* ========== Modals ========== */
@media (max-width: 575px) {
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  .modal-content {
    border-radius: 10px;
  }

  .modal-body {
    padding: 1rem;
  }

  #tourInquiryModal .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
}

/* ========== Plan / Seminar listing ========== */
@media (max-width: 991px) {
  .plan-details .col-lg-8,
  .plan-details .col-lg-4 {
    max-width: 100%;
    flex: 0 0 100%;
  }

  .plan-details .package-sidebar-widget {
    margin-top: 1.5rem;
  }
}

@media (max-width: 767px) {
  .single-package-header {
    min-height: 320px;
    padding-bottom: 1.5rem;
  }

  .single-package-content .title {
    font-size: 1.75rem !important;
  }

  .package-sidebar-widget .thumb img {
    width: 100%;
  }
}

/* ========== Cards & thumbnails ========== */
@media (max-width: 575px) {
  .card,
  .plan-card,
  .seminar-card {
    margin-bottom: 1rem;
  }

  .gallery-card {
    height: 200px;
  }
}

/* ========== Breadcrumb ========== */
@media (max-width: 575px) {
  .breadcrumb {
    font-size: 0.85rem;
    padding: 0.5rem 0;
  }

  .breadcrumb-item + .breadcrumb-item {
    padding-left: 0.4rem;
  }
}

/* ========== Contact page ========== */
@media (max-width: 767px) {
  .contact-thumb img {
    width: 100%;
    height: auto;
  }

  .contact-item {
    margin-bottom: 1rem;
  }

  .contact .lead {
    font-size: 1rem;
  }
}

@media (max-width: 575px) {
  .contact .h3 {
    font-size: 1.35rem;
  }
}

/* ========== FAQ / SEO sections ========== */
@media (max-width: 767px) {
  .accordion-button {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
  }

  .accordion-body {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
  }
}

/* ========== Mobile app-style bottom navigation (MMT-style dark bar) ========== */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1025;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: #252525;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
  padding: 0.5rem 0;
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  min-height: 58px;
}

.mobile-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0.35rem 0.25rem;
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.mobile-bottom-nav__item i {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
  display: block;
  font-weight: 900;
  -webkit-font-smoothing: antialiased;
}

.mobile-bottom-nav__item span {
  font-weight: 700 !important;
}

.mobile-bottom-nav__item:hover,
.mobile-bottom-nav__item:focus {
  color: #60a5fa;
}

.mobile-bottom-nav__item.active {
  color: #60a5fa;
  font-weight: 600;
}

.mobile-bottom-nav__item.active i {
  color: #60a5fa;
}

.mobile-bottom-nav__chat {
  color: #9ca3af;
}

.mobile-bottom-nav__chat:hover,
.mobile-bottom-nav__chat:focus {
  color: #60a5fa;
}

/* Content padding so nothing hides behind bottom nav on mobile */
@media (max-width: 767px) {
  .main-wrapper {
    padding-bottom: 72px;
  }
}

/* ========== Scroll top button ========== */
@media (max-width: 575px) {
  .scroll-top {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    bottom: 4.5rem; /* Above mobile bottom nav */
    right: 1rem;
  }
}

/* ========== Utility: full width on mobile ========== */
@media (max-width: 575px) {
  .w-100-mobile {
    width: 100% !important;
  }

  .text-center-mobile {
    text-align: center !important;
  }
}

/* ========== Prevent horizontal scroll ========== */
html,
body {
  overflow-x: hidden;
  max-width: 100vw;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

/* ========== Touch-friendly tap targets ========== */
@media (pointer: coarse) {
  .navbar-nav .nav-link,
  .main-menu li a,
  .btn,
  .quote-chat-pkg-btn,
  a.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-menu li a {
    display: flex;
    align-items: center;
  }
}
