/* Responsive Fixes for JSCI Website */

/* Fix for overflow issues */
html,
body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* Ensure all images are responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Fix for tables on small screens */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Fix for iframes (like maps) on small screens */
iframe {
  max-width: 100%;
}

/* Fix for hero section on very small screens */
@media (max-width: 360px) {
  .jsci-hero-section h1 {
    font-size: 1.8em !important;
  }

  .hero-badge {
    font-size: 0.7rem !important;
  }

  .tagline {
    font-size: 0.9em !important;
  }
}

/* Fix for navigation menu on medium screens */
@media (max-width: 992px) and (min-width: 768px) {
  header ul.main-menu > li > a {
    padding: 0 10px !important;
    font-size: 0.9em !important;
  }

  .dropdown-menu {
    min-width: 180px !important;
  }
}

/* Fix for card alignment on mobile */
@media (max-width: 767px) {
  .card-view {
    height: auto !important;
  }

  .row [class*='col-'] {
    margin-bottom: 20px;
  }

  .row [class*='col-']:last-child {
    margin-bottom: 0;
  }
}

/* Fix for footer alignment */
@media (max-width: 767px) {
  footer .list-block li {
    text-align: center;
  }

  footer .mb-30 {
    margin-bottom: 30px !important;
  }
}

/* Fix for buttons on small screens */
@media (max-width: 576px) {
  .btn,
  .hero-action-btn {
    display: block;
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Fix for header on very small screens */
@media (max-width: 359px) {
  header .logo img {
    max-height: 30px !important;
  }

  header {
    padding: 5px !important;
  }
}

/* Ensure proper spacing for stacked content */
@media (max-width: 767px) {
  .ptb-50 {
    padding: 30px 0 !important;
  }

  .mt-50 {
    margin-top: 30px !important;
  }

  .mb-30 {
    margin-bottom: 20px !important;
  }
}

/* Fix for search input on mobile */
@media (max-width: 576px) {
  .input-group {
    flex-direction: column;
  }

  .input-group-append {
    margin-top: 10px;
    width: 100%;
  }

  .input-group-append button {
    width: 100%;
  }
}
