/* news_next: layout on top of /news/basis/worldofo.css. Same look, but the
   fixed 880px tables are replaced by a flexible layout that stacks on phones. */
#wo {
  max-width: 880px;
  margin: 15px auto;
  padding: 0 14px;
  text-align: left;
  box-sizing: border-box;
}
.wotopline {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 3px 0 5px;
}
.wologo {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border: 1px solid #000;
}
.horizontalcssmenu { margin: 0 auto; }
.woflags {
  text-align: center;
  margin: 4px 0 8px;
  line-height: 14px;
}
.woflags img { margin: 0 1px; vertical-align: middle; }

.wocols {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.womain { flex: 1 1 630px; min-width: 0; }
.woright { flex: 0 0 200px; min-width: 0; }

/* News items: two columns like the old 2x310px table */
.wogrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 10px;
  margin-bottom: 4px;
}
.woitem { min-width: 0; padding: 5px 0; }
.newstop {
  border-bottom: 1px solid #dddddd;
  margin: 1px 10px 3px 0;
}
.woitem .newsimage { max-width: 45%; height: auto; }
.woinfo {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 5px 0;
}
.woinfo-right { justify-content: flex-end; }
.wofooter { clear: both; padding: 14px 0; }

/* Old fixed widths (worldofo.css + blocks written by getnews.pl) */
.womain #latestnewsTitle, .womain #latestnews, .womain .tpics {
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
}
.womain #latestnewsTitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.womain .tpics img { width: 100%; height: auto; }
.womain .forumtable { width: 100%; table-layout: fixed; }
.womain #forumbigtitle { width: auto; max-width: 100%; box-sizing: border-box; }
.womain td { overflow-wrap: break-word; }
.womain table { max-width: 100%; }
.womain img { max-width: 100%; height: auto; }
.woflags img, .newsheader img { max-width: none; }

@media (max-width: 760px) {
  .wocols { display: block; }
  .woright { margin-top: 16px; }
  .woright #mostread { width: auto; }
  .horizontalcssmenu ul#cssmenu1 { display: flex; }
  .horizontalcssmenu ul#cssmenu1 > li { flex: 1 1 0; min-width: 0; }
  .horizontalcssmenu ul#cssmenu1 > li > a { width: auto; }
  /* open the sub menus of the right-most items towards the left */
  .horizontalcssmenu ul#cssmenu1 > li:nth-last-child(-n+2) > ul { left: auto; right: 0; }
}
@media (max-width: 520px) {
  .wogrid { grid-template-columns: 1fr; }
  #wo { padding: 0 8px; }
}

/* Current Headlines: equal columns, same picture format (16:9, cropped) */
.wohl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 12px;
  margin: 4px 0 6px;
}
.wohl-item { min-width: 0; }
.wohl-more { display: none; }
.wohl-all .wohl-more { display: block; }
.wohl-img {
  height: 0;
  padding-top: 56%;
  background-size: cover;
  background-position: center;
  border: 1px solid #000;
  margin-bottom: 3px;
}
.wohl-txt { font-size: 10px; }
#showallpgs { font-size: 18px; margin: 2px 0 8px; }

/* Calendar + most read today: right column on desktop, after day 1 on phones */
.wo-phone-only { display: none; }
@media (max-width: 760px) {
  .wo-phone-only { display: block; margin: 10px 0; }
  .wo-phone-only #mostread { width: auto; }
  .wo-desk-only { display: none; }
}
@media (max-width: 520px) {
  .wohl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wohl .wohl-phone { display: block; }
}

/* Old "#rightcol a" rules (the column is .woright now, and the phone copy is
   .wo-phone-only). Lower specificity than #rightcol a, so #lcaldiv a etc.
   still win exactly as on the old page. */
.woright a, .wo-phone-only a { color: #000000; }
.woright a:hover, .wo-phone-only a:hover { color: #3333bb; }

/* Four simple buttons instead of the old drop-down menu */
.wobuttons {
  display: flex;
  gap: 4px;
  margin: 4px 0 2px;
}
.wobuttons a {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  background: #f6f6f6;
  border: 1px solid #d0d0d0;
  border-radius: 3px;
  color: #555555;
  font-size: 12px;
  line-height: 16px;
  font-weight: bold;
  padding: 2px 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wobuttons a:hover { background: #d0d0d0; color: #555555; }
@media (max-width: 520px) {
  .wobuttons a { font-size: 11px; padding: 4px 1px; }
}

/* Omaps and 3DRerun blocks (tables from getnews.pl): three equal columns,
   also on phones, whatever the caption lengths */
.womain #omapsdiv table, .womain #omapsdiv3d table { width: 100%; table-layout: fixed; }
.womain #omapsdiv img, .womain #omapsdiv3d img { width: 100%; height: auto; }

/* Title and text of a news item / headline link to the story (Jan 2026-11-09):
   same look as plain text, underline on the title when hovering */
a.wostory, a.wostory:hover { color: inherit; text-decoration: none; }
.newstitle a.wostory:hover { text-decoration: underline; }

/* Sponsored links: the line from .wo-sponsor only between entries, not under the last */
.woright .wo-sponsor:last-child, .wo-phone-only .wo-sponsor:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 4px;
}
