/* ---- shared safety net: media, embeds, forms, long words ---- */
@media (max-width: 1199.98px) {
  img, video, iframe, embed, object { max-width: 100%; }
  input, select, textarea { max-width: 100%; }
  h1, h2, h3, h4, h5, h6, p, li, a, td, th, label { overflow-wrap: break-word; }
  pre { white-space: pre-wrap; }
  /* a .row placed directly inside another .row (no column) overflows by its negative margins */
  .row > .row { margin-left: 0; margin-right: 0; }
}

@media (max-width: 767.98px) {
  .modal-dialog { max-width: calc(100% - 1rem); margin: .5rem auto; }
  .modal-content { max-height: calc(100vh - 1rem); max-height: calc(100dvh - 1rem); overflow-y: auto; }
}


/* ---- social-follow.php ("Stay connected" cards on index.php and event/index.php):
        grid items kept their min-content width (nowrap handle) and pushed the page to 505px ---- */
@media (max-width: 1199.98px) {
  .nx-follow__card { min-width: 0; }
}

/* ---- footer.php: the e-mail "call button" was wider than its col-sm-3 column at 576-767px ---- */
@media (max-width: 1199.98px) {
  .footer-contact .footer-call-button { max-width: 100%; }
  .footer-contact .footer-call-btn p { min-width: 0; }
  .footer-contact .footer-call-btn span { overflow-wrap: anywhere; }
}

/* ---- index.php: pricing / testimonial carousel arrows outside the screen on phones ---- */
@media (max-width: 767.98px) {
  .ticket-pricing-slider .owl-carousel .owl-nav button.owl-next,
  .index2-testimonial-section .owl-carousel .owl-nav button.owl-next { right: -5px; }
  .ticket-pricing-slider .owl-carousel .owl-nav button.owl-prev,
  .index2-testimonial-section .owl-carousel .owl-nav button.owl-prev { left: -5px; }
}

/* ---- apply-for-speaker.php, apply-for-committee-member.php: fixed 300px Turnstile widget ---- */
@media (max-width: 360px) {
  /* scaled down; the negative margins give back the layout space the 300px box still takes */
  .cf-turnstile { transform: scale(.8); transform-origin: 0 0; margin-right: -60px; margin-bottom: -13px; }
}

/* ---- faq.php: accordion question buttons are .btn (white-space:nowrap), long questions ran off screen ---- */
@media (max-width: 1199.98px) {
  /* wrapped text keeps clear of the round arrow icon on the right */
  .card-header .btn.btn-link { white-space: normal; }
  .faq-inner-section .card-header h5 .btn.btn-link { padding-right: 60px; }
}

/* ---- index.php: upcoming-conference cards are fixed at 310px below 576px (wider than the 290px column at 320px) ---- */
@media (max-width: 575.98px) {
  .conf-box { max-width: 100%; }
}

/* ---- event/index.php: counter boxes have min-width:270px, wider than the column at 320px ---- */
@media (max-width: 575.98px) {
  .testimonial-section .counter-block .inner-block { min-width: 0; }
}

/* ---- sidebars / news box with Bootstrap .sticky-top (about.php, abstract-submission.php,
        apply-for-*.php, index.php news box, event/ sidebars): once the columns stack on
        phones/tablets the tall sticky block slides over the content below it ---- */
@media (max-width: 991.98px) {
  .sidebar.sticky-top, .news-b.sticky-top { position: static !important; }
}

/* ---- images squeezed out of shape on phones/tablets ---- */
@media (max-width: 1199.98px) {
  /* event/index.php artwork images with inline fixed heights (410/532/212px) and width:100% */
  img[src*="NC-Web Files"] { height: auto !important; }
  /* event/index.php past-conference photos: width 375px!important capped by max-width:100% */
  .past-conf img { object-fit: cover; }
  /* past-speakers.php photos: height="150" with width:100% */
  .img-card > img { object-fit: cover; }
}
