/* Közös hírtartalom / GrapesJS grid és stílusok
   Ez a CSS kerül betöltésre:
   - a frontend híroldalakon (.news-detail-content alatt)
   - az admin GrapesJS vásznon (globálisan), hogy az oszlopok és képek ott is ugyanúgy viselkedjenek */

/* Alap grid – bootstrap‑szerű .row + .col-sm-* */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -15px;
  margin-right: -15px;
}

[class*='col-'],
[class*='col-sm-'] {
  position: relative;
  width: 100%;
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
}

/* Alapértelmezés: mobilon minden oszlop teljes szélességű (egymás alatt) */
.col-sm-6,
.col-sm-4 {
  flex: 0 0 100%;
  max-width: 100%;
}

/* 576px felett: 2 oszlopos / 3 oszlopos elrendezés (50–50%, 33–33–33) */
@media (min-width: 576px) {
  .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .col-sm-4 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
  }
}

/* Hír‑background blokkok (bg1 / bg2) */
.bg1,
.bg-1 {
  background: #f3f4f6;
  color: #111827;
  border-radius: 0;
  padding: 32px;
}

.bg2 {
  background: #f3f4f6;
  color: #111827;
  border-radius: 0;
  padding: 24px;
}

/* Régi hír formázás: a wrapperen is (.news-detail-content.news), + beágyazott .news a régi HTML-ből */
.news-detail-content.news,
.news-detail-content .news {
  color: #333;
  font-size: 13px;
  font-weight: 300;
  background-color: #fff;
  box-sizing: border-box;
}

.news-detail-content.news p,
.news-detail-content .news p {
  font-size: 13px;
  font-weight: 300;
}

.news-detail-content.news h3,
.news-detail-content .news h3 {
  font-weight: 900;
  font-size: 27px;
  color: #0f172a;
}

.news-detail-content.news h4,
.news-detail-content .news h4 {
  font-weight: 300;
  font-size: 18px;
  color: #0f172a;
}

.news-detail-content.news h4.yellow,
.news-detail-content .news h4.yellow,
.news-detail-content.news h5,
.news-detail-content .news h5 {
  font-weight: 900;
  color: #ffd503;
}

.news-detail-content .news-pos {
  position: relative;
  z-index: 10;
}

/* Régi archive (slug: legacy-hir-*): az eredeti oldal kék háttere */
.news-detail-content.news.news--legacy,
.news-detail-content.news.news--legacy .news {
  background-color: #1a4e7c;
  color: #e8eef5;
}

.news-detail-content.news.news--legacy p,
.news-detail-content.news.news--legacy .news p {
  color: #e8eef5;
}

.news-detail-content.news.news--legacy h3,
.news-detail-content.news.news--legacy .news h3 {
  color: #ffffff;
}

.news-detail-content.news.news--legacy h4:not(.yellow),
.news-detail-content.news.news--legacy .news h4:not(.yellow) {
  color: #e8eef5;
}

.news-detail-content.news.news--legacy h4.yellow,
.news-detail-content.news.news--legacy .news h4.yellow,
.news-detail-content.news.news--legacy h5,
.news-detail-content.news.news--legacy .news h5 {
  font-weight: 900;
  color: #ffd503;
}

/* Szerkesztő / előnézet: .news padding, de ne a hír részletes fő wrapperre (az: .news-detail-content.news) */
.news:not(.news-detail-content) {
  padding: 24px 0;
}

.news-list h4,
.news-list h5,
.news-list h6 {
  font-weight: 600;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.news-list p {
  margin-bottom: 0.5rem;
}

.body {
  padding: 16px 0;
}

/* Képek legyenek reszponzívak, ne lógjanak ki az oszlopból */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ----- Blokk-szerkesztőből generált hír szakaszok (.news-layout-block*) ----- */
.news-layout-block {
  padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 3vw, 1.75rem);
  margin: 0;
  border-radius: 0;
}

.news-layout-block + .news-layout-block {
  margin-top: 1rem;
}

.news-layout-block--default {
  background: transparent;
}

.news-layout-block--blue {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  color: #f1f5f9;
}

/* Kék panel: sárga linkek (letöltés, szöveg, külső link) */
.news-layout-block--blue a {
  color: #f1c40f;
}
.news-layout-block--blue a:hover,
.news-layout-block--blue a:focus-visible {
  color: #fde047;
}

.news-layout-block--yellow {
  background: #f5e6a3;
  color: #1c1917;
}

/* Sárga panel: kék linkek (márk kék) */
.news-layout-block--yellow a {
  color: #1b3356;
}
.news-layout-block--yellow a:hover,
.news-layout-block--yellow a:focus-visible {
  color: #0f1f3a;
}

/* Dark news detail card: beat theme/global rules so coloured panels stay visible */
.news-detail-content .news-layout-block--yellow {
  background: #f5e6a3 !important;
  color: #1c1917 !important;
}

.news-detail-content .news-layout-block--blue {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%) !important;
  color: #f1f5f9 !important;
}

.news-detail-content .news-layout-block--blue a {
  color: #f1c40f !important;
}
.news-detail-content .news-layout-block--blue a:hover,
.news-detail-content .news-layout-block--blue a:focus-visible {
  color: #fde047 !important;
}

.news-detail-content .news-layout-block--yellow a {
  color: #1b3356 !important;
}
.news-detail-content .news-layout-block--yellow a:hover,
.news-detail-content .news-layout-block--yellow a:focus-visible {
  color: #0f1f3a !important;
}

.news-layout-block--blue .news-layout-headline,
.news-layout-block--blue .news-layout-text,
.news-layout-block--yellow .news-layout-headline,
.news-layout-block--yellow .news-layout-text {
  color: inherit;
}

.news-layout-headline {
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

.news-layout-headline--h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
}

.news-layout-headline--h3 {
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
}

.news-layout-headline--h4 {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
}

.news-layout-headline--h5 {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  font-weight: 650;
}

.news-layout-headline--h6 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Headline szín/stílus (szerkesztőből; felülírja a panel szövegszínét) */
.news-layout-headline--tone-yellow {
  background: #f5e6a3 !important;
  color: #1c1917 !important;
  padding: 0.4em 0.85em;
  border-radius: 0;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}

.news-layout-headline--tone-blue {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%) !important;
  color: #f1f5f9 !important;
  padding: 0.4em 0.85em;
  border-radius: 0;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}

.news-layout-headline--tone-white {
  background: #ffffff !important;
  color: #0f172a !important;
  padding: 0.4em 0.85em;
  border-radius: 0;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.news-layout-headline--tone-black {
  background: #0f172a !important;
  color: #f8fafc !important;
  padding: 0.4em 0.85em;
  border-radius: 0;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}

.news-layout-text {
  font-size: 1.05rem;
  line-height: 1.75;
  margin: 0;
}

.news-layout-text--rich p {
  margin: 0 0 0.75em;
}

.news-layout-text--rich p:last-child {
  margin-bottom: 0;
}

.news-layout-text--rich ul,
.news-layout-text--rich ol {
  margin: 0.5em 0 0.85em;
  padding-left: 1.35em;
}

.news-layout-text--rich li {
  margin: 0.3em 0;
}

.news-layout-text--rich a {
  text-decoration: underline;
  color: inherit;
}

.news-layout-block--blue .news-layout-text--rich a {
  color: #f1c40f;
}
.news-layout-block--blue .news-layout-text--rich a:hover,
.news-layout-block--blue .news-layout-text--rich a:focus-visible {
  color: #fde047;
}

.news-layout-block--yellow .news-layout-text--rich a {
  color: #1b3356;
}
.news-layout-block--yellow .news-layout-text--rich a:hover,
.news-layout-block--yellow .news-layout-text--rich a:focus-visible {
  color: #0f1f3a;
}

.news-layout-youtube {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: clamp(1.25rem, 3.5vw, 2.25rem) auto;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  overflow: hidden;
  background: #0f172a;
}

.news-layout-youtube iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.news-layout-figure {
  margin: clamp(1.25rem, 3.5vw, 2.25rem) 0;
  text-align: center;
}

.news-layout-img {
  max-width: 100%;
  height: auto;
  border-radius: 0;
  display: inline-block;
}

/* Táblázat blokk (sötétkék / sárga szekcióhoz igazítva) */
.news-layout-table-title {
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.35;
  margin: 0 0 0.65rem;
}

.news-layout-table-wrap {
  overflow-x: auto;
  margin: 0;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.news-layout-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.5;
}

.news-layout-table th,
.news-layout-table td {
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.news-layout-block--blue .news-layout-table th,
.news-layout-block--blue .news-layout-table td {
  border-color: rgba(255, 255, 255, 0.38);
  color: #f8fafc;
}

.news-layout-block--blue .news-layout-table thead th {
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.news-layout-block--yellow .news-layout-table th,
.news-layout-block--yellow .news-layout-table td {
  border-color: rgba(28, 25, 23, 0.28);
  color: #1c1917;
}

.news-layout-block--default .news-layout-table th,
.news-layout-block--default .news-layout-table td {
  border-color: rgba(15, 23, 42, 0.15);
}

/* Image slider (horizontal scroll / swipe + nyilak, mint a galériánál) */
.news-layout-slider {
  position: relative;
  margin: clamp(1.25rem, 3.5vw, 2.25rem) 0;
  max-width: 100%;
}

.news-layout-slider__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  border-radius: 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.news-layout-slider__viewport::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.news-layout-slider__track {
  display: flex;
  flex-direction: row;
  gap: 0;
}

.news-layout-slider__slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  scroll-snap-align: start;
  margin: 0;
  box-sizing: border-box;
}

.news-layout-slider__img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  vertical-align: middle;
}

.news-layout-slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease;
}

.news-layout-slider__nav:hover {
  background: rgba(15, 23, 42, 0.82);
}

.news-layout-slider__nav--prev {
  left: 8px;
}

.news-layout-slider__nav--next {
  right: 8px;
}

.news-layout-slider:has(.news-layout-slider__slide:only-child) .news-layout-slider__nav {
  display: none;
}

/* Image gallery — lapozható karuszell (scroll-snap + nyilak, mint a slider) */
.news-layout-gallery {
  position: relative;
  margin: clamp(1.25rem, 3.5vw, 2.25rem) 0;
  max-width: 100%;
}

.news-layout-gallery__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  border-radius: 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.news-layout-gallery__viewport::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.news-layout-gallery__track {
  display: flex;
  flex-direction: row;
  gap: 0;
}

.news-layout-gallery__slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  scroll-snap-align: start;
  margin: 0;
  box-sizing: border-box;
}

.news-layout-gallery__slide a.glightbox {
  display: block;
  line-height: 0;
  cursor: zoom-in;
}

.news-layout-gallery__slide a.glightbox:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 2px;
}

.news-layout-gallery__img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  vertical-align: middle;
}

.news-layout-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease;
}

.news-layout-gallery__nav:hover {
  background: rgba(15, 23, 42, 0.82);
}

.news-layout-gallery__nav--prev {
  left: 8px;
}

.news-layout-gallery__nav--next {
  right: 8px;
}

.news-layout-gallery:has(.news-layout-gallery__slide:only-child) .news-layout-gallery__nav {
  display: none;
}

/* File attachments (list of links) */
.news-layout-attachments-wrap,
.news-layout-external-links-wrap {
  margin: 0.5rem 0 0;
}

.news-layout-attachments {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-layout-attachments__item {
  margin: 0.35rem 0;
  padding: 0;
}

.news-layout-attachment__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: underline;
  font-weight: 500;
}

.news-layout-block--blue .news-layout-attachment__link {
  color: #f1c40f;
}
.news-layout-block--blue .news-layout-attachment__link:hover,
.news-layout-block--blue .news-layout-attachment__link:focus-visible {
  color: #fde047;
}

.news-layout-block--yellow .news-layout-attachment__link {
  color: #1b3356;
}
.news-layout-block--yellow .news-layout-attachment__link:hover,
.news-layout-block--yellow .news-layout-attachment__link:focus-visible {
  color: #0f1f3a;
}

/* .news-layout-html: régi importált tartalom a .news-detail-content szabályait örökli */

.news-blocks-empty {
  min-height: 0;
  margin: 0;
  padding: 0;
}

/* Hír részletes: generált panelek a kártya széléig, egymáshoz illesztve (nincs résköz) */
.news-detail-card .news-detail-content {
  margin-left: calc(-1 * var(--news-detail-inner-pad, 48px));
  margin-right: calc(-1 * var(--news-detail-inner-pad, 48px));
}

/* Régi archive: a kék háttér a kártya széléig menjen (ugyanaz a negatív margó, mint a blokkoknál); szöveghez padding */
.news-detail-card .news-detail-content.news--legacy {
  padding: clamp(20px, 3vw, 36px) clamp(18px, 4vw, 40px);
  box-sizing: border-box;
}

.news-detail-card .news-detail-content > section.news-layout-block + section.news-layout-block {
  margin-top: 0;
}

.news-detail-card .news-detail-content > section.news-layout-block {
  border-radius: 0;
}
