body.home a.hernad-front-card-thumb {
        width: 100%;
        max-width: 280px;
        aspect-ratio: 16 / 10;
        margin: 0 auto 18px;
        border-radius: 16px;
        overflow: hidden;
        background: #f3f4f6;
        border: 1px solid #e5e7eb;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
        display: block;
        text-decoration: none;
        transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
      }

      body.home a.hernad-front-card-thumb:hover,
      body.home a.hernad-front-card-thumb:focus {
        transform: translateY(-2px);
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
        border-color: #0f73ba;
        outline: none;
      }

      body.home a.hernad-front-card-thumb img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
      }
    

.hernad-news-image-wrap:has( img.hernad-thumb-fit ) {
	aspect-ratio: auto !important;
	background: #fff !important;
	container-type: inline-size;
}
.hernad-news-image-wrap img.hernad-thumb-fit {
	width: auto !important;
	height: auto !important;
	/* mu-plugin 094 puts `aspect-ratio: 16 / 8.5` on every featured-card img, which
	   keeps the box at the cropped height even once height is auto. Reset it too. */
	aspect-ratio: auto !important;
	min-height: 0 !important;
	/* 52.5cqw == 8.4/16, the height the original ratio box would have had. */
	max-width: min( 100%, var( --hernad-thumb-natural-width, 100% ) ) !important;
	max-height: 52.5cqw !important;
	margin-inline: auto !important;
	object-fit: contain !important;
}

/* mu-plugin 094 throws the server-rendered grid away and rebuilds the section from the
   REST API as `a.hernad-news-card.hernad-news-featured > img` (its own 16/8.5 box), so the
   same treatment has to exist for that markup — 094's JS adds the class there itself. */
.hernad-news-featured:has( > img.hernad-thumb-fit ) {
	container-type: inline-size;
	background: #fff !important;
}
.hernad-news-featured > img.hernad-thumb-fit {
	width: auto !important;
	height: auto !important;
	aspect-ratio: auto !important;
	min-height: 0 !important;
	max-width: min( 100%, var( --hernad-thumb-natural-width, 100% ) ) !important;
	/* 53.125cqw == 8.5/16, the height 094's box would have had. */
	max-height: 53.125cqw !important;
	margin-inline: auto !important;
	object-fit: contain !important;
}


      /*
       * Homepage hero readability layer.
       * Scoped to front page only.
       */

      body.home .entry-hero,
      body.home .hero-section,
      body.home .wp-block-cover,
      body.home .kadence-hero,
      body.home .kt-row-layout-wrap {
        position: relative;
      }

      /*
       * Stronger dark overlay above video/background image.
       * Uses pseudo overlay so the video remains untouched.
       */
      body.home .wp-block-cover::before,
      body.home .entry-hero::before,
      body.home .hero-section::before,
      body.home .kadence-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        background:
          linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.48) 0%,
            rgba(0, 0, 0, 0.58) 42%,
            rgba(0, 0, 0, 0.50) 100%
          );
      }

      /*
       * Keep actual hero content above overlay.
       */
      body.home .wp-block-cover__inner-container,
      body.home .entry-hero-container-inner,
      body.home .hero-section .wp-block-group,
      body.home .kadence-hero .wp-block-group,
      body.home .kt-row-layout-inner,
      body.home .kt-row-column-wrap {
        position: relative;
        z-index: 2;
      }

      /*
       * Main hero title.
       */
      body.home h1,
      body.home .entry-hero h1,
      body.home .wp-block-cover h1,
      body.home .hero-section h1,
      body.home .kadence-hero h1 {
        color: #ffffff !important;
        font-weight: 800 !important;
        letter-spacing: -0.02em;
        line-height: 1.08;
        text-shadow:
          0 3px 8px rgba(0, 0, 0, 0.95),
          0 8px 24px rgba(0, 0, 0, 0.75),
          0 0 2px rgba(0, 0, 0, 1);
      }

      /*
       * Hero subtitle / intro text.
       */
      body.home h1 + p,
      body.home .entry-hero p,
      body.home .wp-block-cover p,
      body.home .hero-section p,
      body.home .kadence-hero p {
        color: #ffffff !important;
        font-weight: 500;
        text-shadow:
          0 2px 6px rgba(0, 0, 0, 0.95),
          0 6px 18px rgba(0, 0, 0, 0.75);
      }

      /*
       * Optional: subtle text backing only around the title block.
       * Helps when video frames become very bright.
       */
      body.home .wp-block-cover__inner-container > *,
      body.home .entry-hero-container-inner > *,
      body.home .hero-section .wp-block-group > *,
      body.home .kadence-hero .wp-block-group > * {
        position: relative;
      }

      body.home .wp-block-cover__inner-container,
      body.home .entry-hero-container-inner {
        isolation: isolate;
      }

      @media (max-width: 768px) {
        body.home h1,
        body.home .entry-hero h1,
        body.home .wp-block-cover h1,
        body.home .hero-section h1,
        body.home .kadence-hero h1 {
          text-shadow:
            0 3px 8px rgba(0, 0, 0, 1),
            0 7px 20px rgba(0, 0, 0, 0.85);
        }

        body.home .wp-block-cover::before,
        body.home .entry-hero::before,
        body.home .hero-section::before,
        body.home .kadence-hero::before {
          background:
            linear-gradient(
              180deg,
              rgba(0, 0, 0, 0.58) 0%,
              rgba(0, 0, 0, 0.68) 45%,
              rgba(0, 0, 0, 0.58) 100%
            );
        }
      }
    

        /* Széchenyi logos — split to bottom-left (SzTP) and bottom-right (S2020) corners */

        .hernad-szechenyi-logo-left,
        .hernad-szechenyi-logo-right {
            position: fixed !important;
            bottom: 0 !important;
            z-index: 99990 !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            padding: 10px 14px 12px !important;
            background: rgba(248, 250, 252, 0.97) !important;
            box-shadow: 0 -2px 18px rgba(15,23,42,.14) !important;
            backdrop-filter: blur(10px) !important;
            transition: opacity .18s ease, box-shadow .18s ease !important;
            text-decoration: none !important;
            margin: 0 !important;
        }

        .hernad-szechenyi-logo-left {
            left: 0 !important;
            border-top: 1px solid rgba(15,23,42,.10) !important;
            border-right: 1px solid rgba(15,23,42,.10) !important;
            border-radius: 0 16px 0 0 !important;
        }

        .hernad-szechenyi-logo-right {
            right: 0 !important;
            border-top: 1px solid rgba(15,23,42,.10) !important;
            border-left: 1px solid rgba(15,23,42,.10) !important;
            border-radius: 16px 0 0 0 !important;
        }

        .hernad-szechenyi-logo-left:hover,
        .hernad-szechenyi-logo-right:hover {
            opacity: .8 !important;
            box-shadow: 0 -4px 28px rgba(15,23,42,.22) !important;
        }

        /* SzTP: wide (4.7:1) — fix width, height scales */
        .hernad-szechenyi-logo-left img {
            width: 340px !important;
            height: auto !important;
            display: block !important;
        }

        /* S2020 badge: near-square (1.43:1) — fix height */
        .hernad-szechenyi-logo-right img {
            height: 160px !important;
            width: auto !important;
            display: block !important;
        }

        @media (max-width: 900px) {
            .hernad-szechenyi-logo-left img  { width: 260px !important; }
            .hernad-szechenyi-logo-right img { height: 120px !important; }
        }

        @media (max-width: 560px) {
            .hernad-szechenyi-logo-left,
            .hernad-szechenyi-logo-right { padding: 8px 10px 10px !important; }
            .hernad-szechenyi-logo-left img  { width: 180px !important; }
            .hernad-szechenyi-logo-right img { height: 80px !important; }
        }
        .hernad-sztp-footer {
            background: #f6f7f9;
            border-top: 1px solid rgba(15,23,42,.08);
            border-bottom: 1px solid rgba(15,23,42,.08);
            padding: 34px 16px;
            margin-top: 36px;
        }

        .hernad-sztp-footer-inner {
            max-width: 1180px;
            margin: 0 auto;
        }

        .hernad-sztp-footer-head {
            text-align: center;
            margin-bottom: 22px;
        }

        .hernad-sztp-footer-head p {
            margin: 0 0 6px;
            color: #326487;
            font-size: 13px;
            font-weight: 800;
            letter-spacing: .08em;
            text-transform: uppercase;
        }

        .hernad-sztp-footer-head h2 {
            margin: 0;
            color: #14213d;
            font-size: clamp(24px, 3vw, 34px);
            font-weight: 850;
        }

        .hernad-sztp-footer-head h2:after {
            content: "";
            display: block;
            width: 64px;
            height: 4px;
            background: #326487;
            border-radius: 999px;
            margin: 12px auto 0;
        }

        .hernad-sztp-footer-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 14px;
        }

        .hernad-sztp-footer-card {
            display: flex;
            flex-direction: column;
            min-height: 290px;
            padding: 16px;
            background: #fff;
            border: 1px solid rgba(15,23,42,.1);
            border-radius: 18px;
            box-shadow: 0 10px 24px rgba(15,23,42,.07);
            color: #1f2937;
            text-decoration: none;
            transition: .18s ease;
        }

        .hernad-sztp-footer-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 16px 34px rgba(15,23,42,.12);
            border-color: rgba(47,107,63,.35);
            text-decoration: none;
        }

        .hernad-sztp-footer-logo {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 82px;
            margin-bottom: 14px;
            padding: 10px;
            background: #f8fafc;
            border: 1px solid rgba(15,23,42,.07);
            border-radius: 14px;
        }

        .hernad-sztp-footer-logo img {
            max-width: 100%;
            max-height: 62px;
            width: auto;
            height: auto;
            object-fit: contain;
        }

        .hernad-sztp-footer-eu {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 46px;
            height: 46px;
            border-radius: 14px;
            background: #edf2f5;
            color: #326487;
            font-weight: 900;
        }

        .hernad-sztp-footer-title {
            color: #14213d;
            font-size: 15.5px;
            font-weight: 850;
            line-height: 1.25;
            margin-bottom: 8px;
        }

        .hernad-sztp-footer-code {
            color: #326487;
            font-size: 12px;
            font-weight: 800;
            line-height: 1.35;
            margin-bottom: 10px;
            word-break: break-word;
        }

        .hernad-sztp-footer-text {
            color: #475569;
            font-size: 13px;
            line-height: 1.45;
            margin-bottom: 14px;
        }

        .hernad-sztp-footer-more {
            margin-top: auto;
            color: #326487;
            font-size: 13px;
            font-weight: 850;
        }

        @media (max-width: 1024px) {
            .hernad-sztp-footer-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (max-width: 640px) {
            .hernad-sztp-footer-grid {
                grid-template-columns: 1fr;
            }

            .hernad-sztp-footer-card {
                min-height: 0;
            }
        }
    

/*
 * Alapértelmezett értékek a két tényleges fejlécmagassághoz (mérve):
 * >=1025px: 131px (logósor + menüsor) — 1024px alatt a menü hamburgerré válik: 82px.
 * A pontos értéket a lenti szkript írja felül (--hernad-header-h), mert a menü
 * bizonyos szélességeknél két sorba tördelődik (1025px-en pl. 179px a fejléc).
 */
body.transparent-header:not(.home) main.wrap {
	padding-top: var(--hernad-header-h, 131px);
}

@media (max-width: 1024px) {
	body.transparent-header:not(.home) main.wrap {
		padding-top: var(--hernad-header-h, 82px);
	}
}

/*
 * A Kadence ugyanezt a helyet a heróban is fenntartaná — mivel most a burkoló
 * adja, itt kivesszük, különben kétszeres lenne a térköz azokon az oldalakon,
 * ahol a hero látszik (pl. /impresszum/).
 */
body.transparent-header:not(.home) .entry-hero .entry-hero-container-inner {
	padding-top: 0 !important;
}