/* Exact card typography from the original News247 article modules. */
.sp-megamenu-parent.menu-fade .sp-dropdown.sp-dropdown-sub {
  display: block;
  opacity: 0;
  visibility: hidden;
  transition: opacity 150ms ease 500ms, visibility 0s linear 650ms;
}

.sp-megamenu-parent.menu-fade .sp-has-child:hover > .sp-dropdown.sp-dropdown-sub {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.main-nav.is-sticky .sp-megamenu-parent .sp-dropdown li.sp-menu-item > a,
.main-nav.is-sticky .sp-megamenu-parent .sp-dropdown li.sp-menu-item > span {
  font-size: 13px;
}

.nspArt.article-card h4.nspHeader {
  margin: 0;
  padding: 0 0 5px;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
}

.nspArt.article-card h4.nspHeader a {
  color: #1c1c1c;
  font-weight: 700;
}

.nspArt.article-card .nspInfo {
  display: none;
}

.nspArt.article-card .article-meta {
  margin: 0;
  color: #626262;
  line-height: 1.4;
}

.nspArt.article-card .nspAuthor {
  color: #1c1c1c !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  border-right: 1px solid #dedede;
  padding-right: 8px;
  margin-right: 5px;
}

.night-mode .nspArt.article-card .nspAuthor {
  color: #abaaaa !important;
}

.nspArt.article-card .nspDate {
  color: #a3a3a3;
  font-size: 13px;
  font-weight: 400;
}

/* Home news cards use the same News247 title and author rhythm with 2-line truncation. */
.home-news-card h4 {
  display: -webkit-box;
  min-height: 0;
  margin: 0 0 5px;
  color: #1c1c1c;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
}

.home-news-card h4 a {
  color: #1c1c1c;
  font-weight: 700;
}

.home-news-card p {
  display: block;
  margin: 0;
  color: #626262;
  font-size: 13px;
  line-height: 20px;
}

.home-news-card p span {
  padding: 0 8px 0 0;
  margin: 0 5px 0 0;
  border-right: 1px solid #dedede;
  color: #1c1c1c;
  font-size: 14px;
  font-weight: 400;
}

.home-news-card p time {
  padding: 0;
  border: 0;
  color: #a3a3a3;
  font-size: 13px;
  font-weight: 400;
}

/* On desktop the news artwork fills the complete image area without letterboxing.
   On hover it opens out to the right without moving the text. */
@media (min-width: 768px) {
  .home-news-card {
    position: relative;
  }

  .home-news-image {
    width: 260px;
    height: 165px;
    overflow: visible;
    transition: width .3s ease-out;
  }

  .home-news-image img {
    width: 260px;
    height: 165px;
    object-fit: cover;
    object-position: center;
    transform-origin: left top;
    transition: transform .3s ease-out;
  }

  .home-news-card:hover .home-news-image {
    width: 320px;
  }

  .home-news-card:hover .home-news-image {
    z-index: 2;
  }

  .home-news-card:hover .home-news-image img {
    transform: scaleX(1.23076923);
  }
}

/* News247's compact, two-row navigation at every desktop width. */
@media (min-width: 992px) {
  .sp-megamenu-parent {
    display: block;
    float: left;
  }

  .sp-megamenu-parent > li {
    display: inline-block;
    margin-right: 1px;
  }

  .sp-megamenu-parent > li > a,
  .sp-megamenu-parent > li > span {
    padding: 0 5px;
    font-size: 17px;
    font-weight: 700;
    line-height: 50px;
    white-space: normal;
  }
}

/* Restore the K2 article-body rhythm and full-text paragraph rule. */
.legacy-article .itemBody {
  padding: 8px 0;
  margin: 0;
}

.legacy-article .itemIntroText {
  margin-bottom: 30px;
}

.legacy-article .itemFullText p {
  margin: 0 30px 15px 25px;
  font-weight: 400;
}

/* Keep the K2 article-header metadata, print control, and red rule together. */
.legacy-article .itemHeader {
  min-height: 0;
}

.legacy-article .itemTitle {
  min-height: 0;
}

.legacy-article .itemToolbar {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: block;
  line-height: 20px;
}

.legacy-article .itemToolbar .itemPrint {
  margin-left: 0;
  padding-right: 0;
}

/* Original News247 home-calendar module heading. */
.nspText {
  color: #333;
  font-size: 17px;
}

.block-title.red {
  margin: 0 0 30px;
  padding: 12px 0 10px;
  border-top: 2px solid #d20b0b;
  border-bottom: 2px solid #d20b0b;
  color: #3d3d3d;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

/* Automatic night mode (21:00–08:00, based on the visitor's local time). */
html.night-mode,
html.night-mode body,
.night-mode,
.night-mode #sp-main-body,
.night-mode #sp-header,
.night-mode .main-nav,
.night-mode #sp-footer,
.night-mode .ic-calendar,
.night-mode .itemView,
.night-mode .mobile-menu[open] > ul {
  color: #f5f5f5 !important;
  background: #000 !important;
}

.night-mode #sp-header .logo,
.night-mode .main-nav.nav-top,
.night-mode .main-nav .sp-dropdown,
.night-mode .main-nav .sp-dropdown .sp-dropdown-inner,
.night-mode .main-nav .menu-search,
.night-mode .main-nav .menu-search input {
  color: #f5f5f5 !important;
  background-color: #000 !important;
}

.night-mode .main-nav .sp-dropdown li.sp-menu-item > a,
.night-mode .main-nav .menu-search input,
.night-mode .main-nav .menu-search button {
  color: #f5f5f5 !important;
}

.night-mode :is(
  p, li, td, th, dt, dd, label, legend,
  h1, h2, h3, h4, h5, h6,
  .itemView, .legacy-html, .nspText, .nspHeader a,
  .event-list-item h2 a, .home-feature-module li h4 a,
  .mobile-menu li a, .sp-megamenu-parent > li > a
) {
  color: #f5f5f5 !important;
}

.night-mode .legacy-html table,
.night-mode .legacy-html td,
.night-mode .legacy-html th,
.night-mode .ic-calendar,
.night-mode .ic-calendar th,
.night-mode .ic-calendar td,
.night-mode .event-list-item,
.night-mode .mobile-menu li a {
  border-color: #444 !important;
  background-color: #000 !important;
}

.night-mode .ic-calendar td.has-event a,
.night-mode .event-date-badge,
.night-mode .carousel-category,
.night-mode .article-card-category,
.night-mode .readon {
  color: #fff !important;
  background-color: #d41819 !important;
  padding: 5px;
}

.language-prompt[hidden] {
  display: none;
}

.language-prompt {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .65);
}

.language-prompt__panel {
  width: min(440px, 100%);
  padding: 28px;
  color: #333;
  background: #fff;
  box-shadow: 0 12px 35px rgba(0, 0, 0, .35);
}

.language-prompt h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.language-prompt p {
  margin: 0 0 20px;
  line-height: 1.5;
}

.language-prompt form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.language-prompt label {
  width: 100%;
  font-weight: 700;
}

.language-prompt select,
.language-prompt button {
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #bbb;
  color: #222;
  background: #fff;
  font: inherit;
}

.language-prompt form button {
  border-color: #d20b0b;
  color: #fff;
  background: #d20b0b;
}

.language-prompt__stay {
  margin-top: 18px;
}

.newsletter-signup {
  margin-top: 22px;
  padding: 18px;
  border-top: 2px solid #d20b0b;
  background: #f3f3f3;
}

.newsletter-signup h3 {
  margin: 0 0 8px;
  color: #333;
  font-size: 19px;
  font-weight: 700;
}

.newsletter-signup p {
  margin: 0 0 12px;
  color: #444;
  font-size: 14px;
}

.newsletter-signup label {
  display: block;
  margin-bottom: 5px;
  color: #333;
  font-size: 14px;
  font-weight: 700;
}

.newsletter-signup input[type="email"] {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid #bbb;
  color: #222;
  background: #fff;
  font: inherit;
}

.newsletter-signup__consent {
  font-weight: 400 !important;
  line-height: 1.4;
}

.newsletter-signup__consent input {
  vertical-align: middle;
}

.newsletter-signup button {
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  color: #fff;
  background: #d20b0b;
  font: inherit;
  font-weight: 700;
}

.newsletter-signup__trap {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.newsletter-signup__notice {
  padding: 8px;
  border-left: 3px solid #d20b0b;
  background: #fff;
}

.newsletter-signup__notice--success {
  border-left-color: #277a31;
}

.night-mode .newsletter-signup,
.night-mode .newsletter-signup input[type="email"],
.night-mode .newsletter-signup__notice {
  color: #f5f5f5;
  background: #000;
}

.night-mode .newsletter-signup h3,
.night-mode .newsletter-signup p,
.night-mode .newsletter-signup label,
.night-mode .newsletter-signup input[type="email"] {
  color: #f5f5f5 !important;
}

/* Home-page and menu layers have their own light backgrounds in News247. */
.night-mode #sp-main-body.home-main,
.night-mode .home-lead,
.night-mode .home-sections,
.night-mode .home-lower,
.night-mode .home-sponsor-banners,
.night-mode .home-content-row,
.night-mode .home-news-column,
.night-mode .home-sidebar,
.night-mode .main-nav > .container,
.night-mode .main-nav > .container > .row,
.night-mode #sp-menu,
.night-mode .sp-megamenu-parent,
.night-mode .sp-megamenu-parent > li,
.night-mode .sp-megamenu-parent > li > a {
  background-color: #000 !important;
}

/* Dark-mode editorial hierarchy and muted metadata. */
.night-mode .event-facts {
  background: #5f5f5f;
}

.night-mode .search-page-form {
  background: #5f5f5f;
}

.night-mode .home-news-card h4 a {
  color: #bfbcbc !important;
  font-weight: 700;
}

.night-mode .home-news-card p span {
  color: #676767 !important;
}

.night-mode .legacy-article .itemHeader {
  background: #000 !important;
}

.night-mode span.catItemAuthor a,
.night-mode .itemAuthor a,
.night-mode .itemAuthorName a,
.night-mode .itemNavigation a {
  color: #676767 !important;
}

/* Divider between the Jazz.hu brand area and the footer links. */
.night-mode #sp-footer .footer-row {
  padding-top: 15px;
  border-top: 1px solid #676767;
}

.home-calendar > h3 {
  margin: 0 0 20px;
  padding: 10px 20px 9px;
  border-top: 2px solid #d20b0b;
  border-bottom: 2px solid #d20b0b;
  color: #3d3d3d;
  font-size: 14px;
  font-weight: 600;
  line-height: 15px;
  text-align: center;
  text-transform: uppercase;
}

/* Korongozó tables provide the album layout and must remain borderless. */
.itemView--korongozo .legacy-html table,
.itemView--korongozo .legacy-html td,
.itemView--korongozo .legacy-html th {
  border: 0 !important;
}

/* Keep the active pagination colors above the legacy Bootstrap/preset styles. */
.pagination > .active > a,
.pagination > .active > a:hover,
.pagination > .active > a:focus,
.pagination > .active > span,
.pagination > .active > span:hover,
.pagination > .active > span:focus {
  color: #ffffff !important;
  border-color: #d20b0b !important;
  background-color: #d20b0b !important;
}

/* Compact sticky navigation after the large brand header scrolls away. */
.main-nav {
  position: sticky;
  z-index: 1000;
  top: 0;
}

.sticky-nav-logo {
  display: none;
}

.main-nav.is-sticky {
  box-shadow: 0 3px 10px rgba(0, 0, 0, .16);
}

.main-nav.is-sticky > .container > .row {
  display: flex;
  margin-right: -15px;
  margin-left: -15px;
  align-items: center;
  flex-wrap: nowrap;
}

.main-nav.is-sticky .sticky-nav-logo {
  display: flex;
  height: 44px;
  padding: 7px 8px 7px 15px;
  align-items: center;
  flex: 0 0 108px;
}

.main-nav.is-sticky .sticky-nav-logo img {
  display: block;
  width: 92px;
  height: auto;
}

.main-nav.is-sticky #sp-menu {
  width: auto;
  min-width: 0;
  padding-right: 15px;
  padding-left: 0;
  flex: 1 1 auto;
}

.main-nav.is-sticky .sp-megamenu-parent {
  width: 100%;
  flex-wrap: nowrap;
}

.main-nav.is-sticky .sp-megamenu-parent > li {
  min-width: 0;
}

.main-nav.is-sticky .sp-megamenu-parent > li > a {
  padding: 0 5px;
  font-size: 13px;
  line-height: 44px;
}

.main-nav.is-sticky .menu-search {
  display: none;
}

.night-mode .home-news-card {
  background: #000 !important;
}

.night-mode .legacy-html blockquote {
  border-color: #444 !important;
  color: #f5f5f5 !important;
  background: #111 !important;
}

.night-mode .language-prompt__panel {
  color: #f5f5f5 !important;
  background: #111 !important;
}

.night-mode .language-prompt h2,
.night-mode .language-prompt p,
.night-mode .language-prompt label {
  color: #f5f5f5 !important;
}

.night-mode .language-prompt select,
.night-mode .language-prompt__stay {
  border-color: #666 !important;
  color: #f5f5f5 !important;
  background: #1c1c1c !important;
}

@media (max-width: 1199px) and (min-width: 992px) {
  .main-nav.is-sticky .sticky-nav-logo {
    padding-right: 5px;
    flex-basis: 96px;
  }

  .main-nav.is-sticky .sticky-nav-logo img {
    width: 80px;
  }

  .main-nav.is-sticky .sp-megamenu-parent > li > a {
    padding: 0 3px;
    font-size: 10px;
  }
}

@media (max-width: 991px) {
  .main-nav.is-sticky > .container > .row {
    display: flex;
    margin: 0;
  }

  .main-nav.is-sticky .sticky-nav-logo {
    height: 50px;
    padding: 9px 10px 9px 0;
    flex-basis: 104px;
  }

  .main-nav.is-sticky .sticky-nav-logo img {
    width: 94px;
  }

  .main-nav.is-sticky #sp-menu {
    padding: 0;
  }
}
