/* ==========================================================================
   STEP 16: MOBILE OPTIMIZATION & RESPONSIVE TOUCH HARDENING
   ========================================================================== */

/* 1. Touch Target Hardening (Minimum 44px x 44px for Mobile Usability) */
@media (max-width: 991px) {
  a, button, input, select, textarea, .bi-sticky-item, .bi-cat-pill, .bi-faq-question {
    min-height: 44px;
  }

  .bi-mobile-sticky-bar {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* Prevent Body Content Overlap with Sticky Mobile Bar */
  body {
    padding-bottom: 60px;
  }
}

/* 2. Responsive Table Wrappers for Study Costs, Intakes & Fee Data */
.bi-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
  border: 1px solid var(--bi-neutral-200);
  border-radius: var(--bi-radius-md);
}

.bi-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
  white-space: nowrap;
}

.bi-data-table th, 
.bi-data-table td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--bi-neutral-200);
}

.bi-data-table th {
  background-color: var(--bi-neutral-100);
  font-family: var(--bi-font-heading);
  font-weight: 700;
  color: var(--bi-neutral-900);
}

.bi-data-table tr:last-child td {
  border-bottom: none;
}

/* 3. Screen-Specific Viewport Adjustments */

/* Small Smartphones (375px - 414px) */
@media (max-width: 480px) {
  .bi-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .bi-hero-title, 
  .bi-dest-hero-title, 
  .bi-service-hero-title, 
  .bi-contact-hero-title,
  .bi-local-hero-title {
    font-size: 1.875rem !important;
    line-height: 1.2;
  }

  .bi-hero-actions, 
  .bi-dest-hero-actions, 
  .bi-service-hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .bi-btn-lg, .bi-btn-md {
    width: 100%;
  }

  .bi-form-row {
    grid-template-columns: 1fr !important;
  }

  .bi-hero-trust-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .bi-trust-divider {
    display: none;
  }
}

/* Tablets & Foldables (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .bi-hero-grid,
  .bi-dest-hero-grid,
  .bi-service-hero-grid,
  .bi-contact-grid,
  .bi-dest-body-grid,
  .bi-service-body-grid {
    grid-template-columns: 1fr;
  }

  .bi-sticky-sidebar {
    position: static;
    margin-top: 2rem;
  }
}

/* Print Stylesheet Cleanups */
@media print {
  .bi-top-bar, 
  .bi-site-header, 
  .bi-mobile-sticky-bar, 
  .bi-prefooter-cta, 
  .bi-site-footer {
    display: none !important;
  }
}