/* EllGab Modern 1.0.14 — content polish. Loaded after prior theme styles.
   SMF News content and Ad Management/AdSense markup are unchanged. */

/* Featured NEWS is consistent on desktop and mobile, without altering the search form. */
#upper_section .ellgab-news-center {
  box-sizing: border-box;
  min-width: 0;
  align-self: center;
  padding: 12px 16px;
  border: 1px solid #554932;
  border-radius: 11px;
  background: linear-gradient(125deg,rgba(205,164,103,.11),rgba(205,164,103,.035));
  text-align: center;
  overflow-wrap: break-word;
}
#upper_section .ellgab-news-center h2 {
  display: block !important;
  float: none !important;
  width: auto !important;
  padding: 0 !important;
  margin: 0 0 4px !important;
  color: #e5b86f !important;
  font-size: .76rem !important;
  font-weight: 800 !important;
  letter-spacing: .13em;
  line-height: 1.3 !important;
  text-align: center !important;
}
#upper_section .ellgab-news-center p {
  display: block !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  max-width: 100%;
  color: #f3d7a6 !important;
  font-size: clamp(1.05rem,1.45vw,1.28rem) !important;
  font-weight: 750;
  line-height: 1.4;
  text-align: center !important;
}
#upper_section .ellgab-news-center p a { color: #f3d7a6 !important; text-decoration: none; }
#upper_section .ellgab-news-center p a:hover,
#upper_section .ellgab-news-center p a:focus { text-decoration: underline; text-underline-offset: 3px; }

/* Ad wrappers: retain the supplied ad's dimensions and scripts, style the surrounding space only. */
#main_content_section .adsensemodzstudios_header,
#main_content_section .adsensemodzstudios_footer,
#main_content_section .ellgab-board-ad {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 12px auto 18px;
  padding: 12px;
  border: 1px solid #344453;
  border-radius: 11px;
  background: #1e2934;
  color: #bdcbd5;
  text-align: center;
}
#main_content_section .adsensemodzstudios_header > *,
#main_content_section .adsensemodzstudios_footer > *,
#main_content_section .ellgab-board-ad > * { max-width: 100%; }

/* Mobile board-category headings: name and quick links get their own readable rows. */
@media screen and (max-width: 860px) {
  #upper_section .ellgab-news-center {
    width: 100% !important;
    padding: 11px 13px;
    margin: 3px 0;
  }
  #upper_section .ellgab-news-center p { font-size: clamp(1.08rem,4.4vw,1.32rem) !important; }
  #main_content_section .adsensemodzstudios_header,
  #main_content_section .adsensemodzstudios_footer,
  #main_content_section .ellgab-board-ad {
    padding: 8px;
    margin: 10px auto 14px;
    overflow: visible;
  }
  #boardindex_table tbody.header td { min-width: 0; }
  #boardindex_table tbody.header .cat_bar { padding: 10px 12px !important; }
  #boardindex_table tbody.header h3.catbg {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 8px;
    row-gap: 7px;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0;
    font-size: 1.03rem;
  }
  #boardindex_table tbody.header h3.catbg > .floatright {
    order: 3;
    float: none !important;
    display: block;
    flex: 1 0 100%;
    width: 100%;
    min-width: 0;
    padding-top: 8px;
    border-top: 1px solid #3c4a56;
    font-size: .85rem;
    line-height: 1.6;
    overflow-wrap: break-word;
  }
  #boardindex_table tbody.header h3.catbg > .floatright a { display: inline; white-space: normal; }
  #boardindex_table .table_list tbody.content tr { border-radius: 12px; }
  #boardindex_table table.table_list tbody.content td.info { padding: 12px 12px 6px; }
  #boardindex_table table.table_list tbody.content td.info a.subject { font-size: 1.05rem; }
  #boardindex_table table.table_list tbody.content td.info p { line-height: 1.5; }
  #boardindex_table table.table_list tbody.content td.lastpost { line-height: 1.5; }
}
@media screen and (max-width: 400px) {
  #upper_section .ellgab-news-center { padding: 10px 9px; }
  #boardindex_table tbody.header h3.catbg > .floatright { font-size: .82rem; }
}
