/* ============================================================
   ICHSEA 2027 mobile optimization
   Readability & layout fixes for phones/small tablets.
   Every rule is scoped inside media queries — desktop untouched.
   ============================================================ */

/* =============== tablets & below (<= 1199.98px) =============== */
@media (max-width: 1199.98px) {

  /* --- base readability --- */
  body {
    font-size: 16px;
    line-height: 1.75;
  }

  /* justify creates ugly rivers on narrow screens */
  p[align="justify"] {
    text-align: left !important;
  }

  /* --- section headings --- */
  .servicesingle__body h4,
  .blogsingle__bodycontent h4 {
    font-size: 22px;
    line-height: 1.35;
    margin-bottom: 14px;
  }
  .servicesingle__body h5,
  .blogsingle__bodycontent h5 {
    font-size: 19px;
  }
  .servicesingle__body h6,
  .blogsingle__bodycontent h6 {
    font-size: 17px;
  }

  /* --- breadcrumb banner --- */
  .breadcamb {
    padding-block: 34px;
  }
  .breadcamb__content h3 {
    font-size: 26px;
  }

  /* --- buttons: comfortable touch targets --- */
  .download-btn {
    min-height: 52px;
  }
  .submit-row-flex .download-btn {
    width: 100%;
    max-width: 340px;
  }
  .servicebtn a {
    padding: 8px 0;
    display: inline-block;
  }

  /* --- generic content spacing --- */
  .servicesingle__body .item,
  .blogsingle__bodycontent .text {
    margin-bottom: 26px;
  }
}

/* =============== phones (<= 767.98px) =============== */
@media (max-width: 767.98px) {

  /* --- base readability --- */
  body {
    font-size: 16.5px;
    line-height: 1.8;
  }
  .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  /* --- header --- */
  .header__bottom {
    padding: 10px 0;
  }
  .header__logo-row { gap: 8px; }
  .header__logo-row .society-logo img { height: 34px; }
  .header__logo-row .ichsea-logo { max-width: 150px; }

  /* --- breadcrumb banner --- */
  .breadcamb { padding-block: 28px; }
  .breadcamb__content h3 { font-size: 22px; }
  .breadcamb__content nav ol { font-size: 13px; }

  /* --- section headings --- */
  .servicesingle__body h4,
  .blogsingle__bodycontent h4 {
    font-size: 20px;
    margin-bottom: 12px;
  }
  .servicesingle__body h5,
  .blogsingle__bodycontent h5 { font-size: 17.5px; }
  .servicesingle__body h6,
  .blogsingle__bodycontent h6 { font-size: 16.5px; }

  /* --- body text --- */
  .servicesingle__body p,
  .blogsingle__bodycontent p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 14px;
  }
  .servicesingle__body ul li,
  .blogsingle__bodycontent ul li,
  .track-list li p {
    font-size: 15.5px;
    line-height: 1.75;
  }

  /* --- track list (individual papers) --- */
  .track-list li {
    margin-bottom: 14px;
  }
  .track-list li strong {
    font-size: 15.5px;
    line-height: 1.5;
    display: inline-block;
    margin-bottom: 4px;
  }

  /* --- tables: compact but readable --- */
  .registration-table table {
    font-size: 14.5px;
  }
  .registration-table th,
  .registration-table td {
    padding: 10px 8px;
  }
  .registration-table .time-period {
    font-size: 14.5px;
  }
  .registration-table .highlight-date {
    font-size: 12px;
  }
  /* venue travel table & other responsive tables */
  .table-responsive table {
    font-size: 13.5px;
  }
  .table-responsive th,
  .table-responsive td {
    padding: 8px 6px;
  }

  /* --- sidebar info boxes (deadlines etc.) --- */
  .sidebar__brochure {
    padding: 18px 16px;
  }
  .sidebar__brochure .text p {
    font-size: 15px;
  }

  /* --- download / submit buttons full width --- */
  .submit-row-flex {
    flex-direction: column;
    align-items: stretch;
  }
  .submit-row-flex .download-btn {
    max-width: none;
  }

  /* --- committee lists: breathing room --- */
  .blogsingle__bodycontent p strong,
  .servicesingle__body p strong {
    line-height: 1.6;
  }

  /* --- images --- */
  .blogsingle__bodycontent img,
  .servicesingle__body img {
    border-radius: 10px;
  }
  /* keep venue header photos from being too tall */
  .blogsingle__bodycontent img[style*="height:340px"] {
    height: 220px !important;
  }

  /* --- map image --- */
  .blogsingle__bodycontent p img[src*="venue-map"] {
    max-width: 100% !important;
  }

  /* --- home page specifics --- */
  .services__inner .text p {
    font-size: 15px;
  }
  .important-dates-list .desk .text {
    font-size: 14px !important;
  }

  /* --- food cards on travel page --- */
  .blogsingle__bodycontent .row g-4 { margin-top: 1em; }

  /* --- note/info boxes --- */
  .servicesingle__body .text p,
  .blogsingle__bodycontent .text p {
    overflow-wrap: break-word;
  }

  /* --- footer --- */
  .footer__copyright p {
    font-size: 13.5px;
  }

  /* --- scrollToTop --- */
  .scrollToTop {
    width: 42px;
    height: 42px;
  }

  /* --- mobile nav panel width on small phones --- */
  .mobile-nav-panel { width: min(88vw, 340px); }
}

/* =============== small phones (<= 400px) =============== */
@media (max-width: 400px) {
  body { font-size: 16px; }
  .breadcamb__content h3 { font-size: 20px; }
  .registration-table table { font-size: 13.5px; }
  .header__logo-row .ichsea-logo { max-width: 128px; }
}
