/* Shared responsive fixes for public website */

html,
body {
  overflow-x: hidden;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

.top-header .container {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-header .container > div {
  flex-wrap: wrap;
}

.header .container.py-3 {
  flex-wrap: wrap;
  row-gap: 0.75rem;
}

.header .container.py-3 h1,
.header .container.py-3 h2,
.header .container.py-3 p {
  word-break: break-word;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive .table {
  min-width: 560px;
}

main table:not(.no-responsive-wrap) {
  min-width: 560px;
}

.pagination {
  flex-wrap: wrap;
  gap: 0.35rem;
}

.modal-dialog {
  max-width: calc(100% - 1.25rem);
}

.modal-body {
  max-height: min(72vh, 580px);
  overflow: auto;
}

.form-control,
.form-select,
textarea,
input[type="file"],
.btn {
  max-width: 100%;
}

@media (max-width: 1199px) {
  .header .container.py-3 {
    flex-wrap: nowrap;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem;
  }

  .header .container.py-3 .logo {
    order: 1 !important;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
  }

  .header .container.py-3 .logo img {
    max-height: 52px !important;
    width: auto;
  }

  .header .container.py-3 .text-center {
    order: 2 !important;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    margin: 0 0.35rem !important;
    text-align: center;
  }

  .header .container.py-3 .mobile-nav-toggle {
    order: 3 !important;
    flex: 0 0 auto;
    margin-left: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 991.98px) {
  .header .container.py-3 h1 {
    font-size: 1.12rem !important;
    margin-bottom: 0.2rem !important;
  }

  .header .container.py-3 h2 {
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
  }

  .header .container.py-3 .text-center.flex-grow-1 {
    flex-grow: 1 !important;
  }

  .header .container.py-3 p {
    font-size: 0.78rem;
    margin-bottom: 0;
  }

  .header .container.py-3 .mobile-nav-toggle {
    font-size: 1.7rem !important;
  }

  .hero-slide-img {
    height: 340px !important;
  }

  .tabs-cover-main {
    gap: 0.25rem;
    flex-wrap: wrap;
  }

  .tabs-cover-main .nav-link {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
}

@media (max-width: 767.98px) {
  .top-header {
    font-size: 0.8rem;
  }

  .top-header .container {
    justify-content: center !important;
  }

  .hero-slide-img {
    height: 230px !important;
  }

  .header .container.py-3 .logo img {
    max-height: 46px !important;
  }

  .section-title h1,
  .section-title h2 {
    font-size: 1.45rem !important;
  }

  .footer-cover .footer-section {
    padding: 0;
  }

  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  .btn-lg {
    padding: 0.6rem 1rem;
    font-size: 1rem;
  }
}
