/* Honlapdoktor Elementor Műhely 1.4.4 – kizárólag kijelölt ötös blokk.
 * A konténer WIDTH/MAX-WIDTH értékét NEM állítjuk 100%-ra.
 * Az Elementorban beállított 73%, illetve a magazin maximális szélessége megmarad.
 */
.hdem-five-active { box-sizing:border-box; min-inline-size:0; max-inline-size:100%; }
.hdem-five-active, .hdem-five-active * { box-sizing:border-box; }
.hdem-five-active :is(.hdem-manual-upper,.hdem-manual-lower,.hdem-manual-side-column,.hdem-manual-slot) {
  min-inline-size:0; box-sizing:border-box;
}
/* Az eredeti 5 konténeres sablonra érvényes pontos 60/40 és 50/50 rendszer. */
.hdem-five-active:has(.hdem-manual-upper) .hdem-manual-upper {
  display:grid!important; grid-template-columns:minmax(0,3fr) minmax(0,2fr)!important;
  gap:clamp(10px,1.1vw,18px)!important; align-items:stretch!important;
}
.hdem-five-active .hdem-manual-side-column {
  display:grid!important; grid-template-rows:repeat(2,minmax(0,1fr))!important;
  gap:clamp(10px,1.1vw,18px)!important; min-width:0!important;
}
.hdem-five-active .hdem-manual-lower {
  display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:clamp(10px,1.1vw,18px)!important;
}
.hdem-five-active .hdem-manual-slot {
  min-width:0!important; max-width:100%; align-self:stretch!important;
}
.hdem-five-active .hdem-manual-slot :is(.elementor-element,.elementor-widget-container) {
  min-width:0!important; max-width:100%;
}
.hdem-five-active img,.hdem-five-active video,.hdem-five-active svg {
  max-width:100%; height:auto;
}
.hdem-five-active :is(h1,h2,h3,h4,h5,h6,p,li,a,span) {
  word-break:normal; overflow-wrap:normal; hyphens:auto; -webkit-hyphens:auto;
}
/* Telefonon a kiválasztott ötös BLOKK kitölti a saját szülőkonténerét,
 * de a magazin külső max-width korlátját soha nem lépi át. Asztali
 * nézetben a 73% és bármely kézi Elementor-szélesség változatlan. */
.hdem-five-active.hdem-five--mobile { inline-size:100%!important; width:100%!important; max-inline-size:100%!important; }
/* Közepes méret: az eredetileg jelölt konténerek egy oszlopra váltanak. */
.hdem-five-active.hdem-five--compact .hdem-manual-upper {
  grid-template-columns:minmax(0,1fr)!important;
}
.hdem-five-active.hdem-five--compact .hdem-manual-side-column {
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-template-rows:auto!important;
}
/* Kis méret: a magasságot a tartalom határozza meg. */
.hdem-five-active.hdem-five--mobile .hdem-manual-upper,
.hdem-five-active.hdem-five--mobile .hdem-manual-side-column,
.hdem-five-active.hdem-five--mobile .hdem-manual-lower {
  grid-template-columns:minmax(0,1fr)!important; grid-template-rows:auto!important;
}
.hdem-five-active.hdem-five--mobile .hdem-manual-slot {
  height:auto!important; min-height:0!important; max-height:none!important;
}
/* Tartalék kezelés: a felhasználó által vizuálisan kiválasztott, de nem eredeti
 * sablonszerkezetű konténerben csak 900 CSS px alatt rendezünk át.
 * Nem terjeszkedünk ki a szülő / honlap tartalmi sávján kívül. */
.hdem-five-active.hdem-five--compact:not(:has(.hdem-manual-upper)) :is(.e-con,.elementor-container) {
  min-inline-size:0!important;
}
.hdem-five-active.hdem-five--mobile:not(:has(.hdem-manual-upper)) > :is(.e-con,.elementor-container),
.hdem-five-active.hdem-five--mobile:not(:has(.hdem-manual-upper)) > .e-con > :is(.e-con,.elementor-container) {
  min-inline-size:0!important; max-inline-size:100%!important;
  flex-direction:column!important; flex-wrap:nowrap!important;
}
.hdem-five-active.hdem-five--mobile:not(:has(.hdem-manual-upper)) > .e-con.e-child,
.hdem-five-active.hdem-five--mobile:not(:has(.hdem-manual-upper)) > .elementor-column {
  flex-basis:auto!important; inline-size:100%!important;
  width:100%!important; max-width:100%!important;
}
.hdem-five-active.hdem-five--mobile:not(:has(.hdem-manual-upper)) :is(.elementor-widget-wrap,.elementor-widget-container) {
  min-inline-size:0!important; max-inline-size:100%;
}
.hdem-five-active.hdem-five--mobile :is(h1,h2,h3,h4,h5,h6) {
  white-space:normal!important; line-height:1.2!important;
}
/* Működik az Elementor-szerkesztőben, az éles látogatóknál nincs körvonal. */
body.elementor-editor-active .hdem-five-active {outline:1px dashed #a99685;outline-offset:0;}

/* 1.4.4 — the published five-article section must match the NEWS ribbon,
   not the browser's entire width. Width follows CSS-viewport/zoom changes.
   No rules apply before the correct Elementor root has been detected/bound. */
.hdem-five-active.hdem-five--aligned {
  width: min(100%, var(--hdem-five-column-width)) !important;
  inline-size: min(100%, var(--hdem-five-column-width)) !important;
  max-width: min(100%, var(--hdem-five-column-width)) !important;
  max-inline-size: min(100%, var(--hdem-five-column-width)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  align-self: center !important;
  flex-grow: 0 !important;
  flex-shrink: 1 !important;
}
/* The old 1.4.2 mobile width override would defeat reference alignment. */
.hdem-five-active.hdem-five--mobile.hdem-five--aligned {
  width: min(100%, var(--hdem-five-column-width)) !important;
  inline-size: min(100%, var(--hdem-five-column-width)) !important;
  max-width: min(100%, var(--hdem-five-column-width)) !important;
}
/* Never push long Elementor contents outside the five-card grid. */
.hdem-five-active .hdem-manual-upper > *,
.hdem-five-active .hdem-manual-lower > *,
.hdem-five-active .hdem-manual-side-column > * {
  min-width: 0 !important;
  max-width: 100%;
}
.hdem-five-active .hdem-manual-slot {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

/* The imported Elementor JSON still carries 49%-width on lower two cards.
 * In a CSS grid these widths would halve each cell again. */
.hdem-five-active:has(.hdem-manual-lower) .hdem-manual-lower > .hdem-manual-slot,
.hdem-five-active.hdem-five--mobile .hdem-manual-slot {
  width: 100% !important;
  inline-size: 100% !important;
  max-width: 100% !important;
}

/* 1.4.5 — the two manually populated BOTTOM cards share equal-width tracks.
 * This overrides Elementor's original 49%-inside-a-grid double-sizing. */
.hdem-five-active :is(.hdem-manual-lower,.hdem-five-lower-row) {
 display:grid!important;
 grid-template-columns:repeat(2,minmax(0,1fr))!important;
 align-items:stretch!important;
 gap:clamp(10px,1.2vw,18px)!important;
}
.hdem-five-active :is(.hdem-manual-lower,.hdem-five-lower-row) > :is(.hdem-manual-slot,.hdem-five-lower-slot) {
 box-sizing:border-box!important;
 width:100%!important;
 inline-size:100%!important;
 max-inline-size:100%!important;
 max-width:100%!important;
 min-width:0!important;
 margin:0!important;
 align-self:stretch!important;
}
/* Only a semantically recognized two-child image+article card is normalized.
 * Does not touch avatars, title links or any unrelated widget. */
.hdem-five-active .hdem-five-horizontal-card {
 display:grid!important;
 grid-template-columns:minmax(0,47%) minmax(0,53%)!important;
 width:100%!important;max-width:100%!important;
 min-height:235px;align-items:stretch!important;
 box-sizing:border-box;overflow:hidden;
}
.hdem-five-active .hdem-five-horizontal-card > .hdem-five-card-art {
 position:relative!important;min-width:0!important;max-width:100%!important;
 width:100%!important;height:100%!important;min-height:235px!important;
 margin:0!important;overflow:hidden!important;
}
.hdem-five-active .hdem-five-horizontal-card > .hdem-five-card-art img:not(.avatar) {
 position:absolute!important;inset:0!important;
 width:100%!important;height:100%!important;
 max-width:none!important;max-height:none!important;
 object-fit:cover!important;object-position:center!important;
}
.hdem-five-active .hdem-five-horizontal-card > .hdem-five-card-copy {
 min-width:0!important;max-width:100%!important;width:100%!important;
 margin:0!important;padding:clamp(12px,1.4vw,20px)!important;
 align-self:stretch!important;box-sizing:border-box;
}
.hdem-five-active .hdem-five-horizontal-card > .hdem-five-card-copy :is(h1,h2,h3,h4,p) {
 word-break:normal!important;hyphens:auto;-webkit-hyphens:auto;
 overflow-wrap:normal;white-space:normal!important;
}
.hdem-five-active .hdem-five-horizontal-card > .hdem-five-card-copy p {
 display:-webkit-box;-webkit-box-orient:vertical;
 -webkit-line-clamp:3;line-clamp:3;overflow:hidden;
}
/* Compact container — the approved side-by-side magazine cards become stacked. */
.hdem-five-active.hdem-five--compact :is(.hdem-manual-lower,.hdem-five-lower-row) {
 grid-template-columns:minmax(0,1fr)!important;
}
.hdem-five-active.hdem-five--mobile .hdem-five-horizontal-card {
 grid-template-columns:minmax(0,1fr)!important;
}
.hdem-five-active.hdem-five--mobile .hdem-five-horizontal-card > .hdem-five-card-art {
 height:180px!important;min-height:180px!important;
}
.hdem-five-active.hdem-five--mobile .hdem-five-horizontal-card > .hdem-five-card-copy {
 padding:14px!important;
}
.hdem-five-active .hdem-five-lower-slot {
 display:flex!important;flex-direction:column!important;align-items:stretch!important;
}
.hdem-five-active .hdem-five-lower-slot > .elementor-widget {
 display:flex;flex-direction:column;flex:1 1 auto;min-width:0;width:100%!important;
}
.hdem-five-active .hdem-five-lower-slot > .elementor-widget > .elementor-widget-container {
 display:flex;flex-direction:column;flex:1 1 auto;min-width:0;width:100%;
}
.hdem-five-active .hdem-five-horizontal-card { height:100%!important; }
