/**
 * Agria Sport — modern theme overlay (experimental)
 * Phase 1: colors, typography, header/nav, news, sidebars, forms/buttons
 * Loaded ONLY when theme.flag = modern, AFTER stilus.css.
 */

body.theme-modern {
  --ink: #151821;
  --ink-soft: #3d4554;
  --muted: #667085;
  --paper: #eef1f6;
  --surface: #ffffff;
  --line: #d8dee8;
  --line-strong: #c8d0dc;
  --brand: #2f3268;
  --brand-hover: #2a2d5c;
  --brand-soft: #eef0f8;
  /* Eger: navy + red */
  --accent: #c62828;
  --accent-hover: #a61e1e;
  --accent-soft: #fdeceb;
  --accent-bright: #f28b8b;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(21, 24, 33, 0.06);
  --shadow: 0 8px 24px rgba(21, 24, 33, 0.08);
  --focus: 0 0 0 3px rgba(52, 55, 111, 0.35);

  color: var(--ink) !important;
  background: var(--paper) !important;
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

body.theme-modern center > div[style*="font-family"] {
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif !important;
}

body.theme-modern a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
body.theme-modern a:hover {
  color: var(--accent);
}
body.theme-modern a:focus-visible,
body.theme-modern button:focus-visible,
body.theme-modern input:focus-visible,
body.theme-modern select:focus-visible,
body.theme-modern textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

/* —— Layout shell —— */
body.theme-modern .site-layout {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  background: transparent;
  border-collapse: separate;
  border-spacing: 0;
}

body.theme-modern .site-layout td.baloldal,
body.theme-modern .site-layout td.jobbhirek,
body.theme-modern .site-layout td.nagyon {
  height: auto !important;
  vertical-align: top;
}

body.theme-modern .baloldal {
  background: linear-gradient(180deg, var(--brand) 0%, #2a2d5c 100%) !important;
  color: #fff;
  padding: 12px 10px !important;
  border-radius: 0 0 0 var(--radius-lg);
}

body.theme-modern .baloldal a {
  color: #fff !important;
}
body.theme-modern .baloldal a:hover {
  color: var(--accent-bright) !important;
}
body.theme-modern .baloldal img {
  border-radius: var(--radius-sm);
  max-width: 100%;
  height: auto;
}

body.theme-modern .jobbhirek {
  background: #e8eef3 !important;
  color: var(--ink);
  padding: 12px 10px !important;
  border-radius: 0 0 var(--radius-lg) 0;
}

body.theme-modern .nagyon {
  background: var(--surface) !important;
  color: var(--ink);
  padding: 14px 16px !important;
  box-shadow: var(--shadow-sm);
}

/* —— Header —— */
body.theme-modern .site-header {
  min-width: 0;
  background: linear-gradient(180deg, #232652 0%, #2a2d5c 100%) !important;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

body.theme-modern .site-header-top,
body.theme-modern .site-nav {
  background: transparent !important;
}

body.theme-modern .site-header-top {
  min-height: 0;
  padding: 14px 16px 8px;
  gap: 18px;
}

body.theme-modern .site-header-nameday {
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 600;
  font-size: 0.92rem;
}

body.theme-modern .site-header-carousel {
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  background: #1a1d33;
}

body.theme-modern .site-logo img {
  border-radius: var(--radius-sm);
}

/* Nav pills — brand + accent, no cartoon skew */
body.theme-modern .site-nav {
  gap: 10px;
  padding: 8px 16px 16px;
}

body.theme-modern .site-nav-btn {
  height: 44px;
  padding: 0 14px 0 16px;
  border-radius: var(--radius) !important;
  transform: none !important;
  text-transform: none;
  letter-spacing: 0.01em;
  font-family: "Source Sans 3", "Segoe UI", sans-serif !important;
  font-size: 0.95rem;
  font-weight: 700;
  text-shadow: none;
  background: var(--accent) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: background 0.15s ease, transform 0.12s ease;
}

body.theme-modern .site-nav-btn:hover,
body.theme-modern .site-nav-btn:focus {
  filter: none;
  background: var(--accent-hover) !important;
  transform: translateY(-1px) !important;
  color: #fff !important;
}

body.theme-modern .site-nav-label {
  transform: none !important;
}

body.theme-modern .site-nav-chev {
  transform: none !important;
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.2) !important;
  box-shadow: none !important;
}

body.theme-modern .site-menu-toggle {
  background: var(--accent) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm);
}

body.theme-modern .site-menu-toggle.is-open {
  background: var(--accent-hover) !important;
}

/* —— News —— */
body.theme-modern .hir-cim,
body.theme-modern .hir-cim-compact {
  background: linear-gradient(90deg, var(--brand) 0%, #3f457f 100%) !important;
  color: #fff !important;
  border-radius: var(--radius-sm);
  padding: 10px 12px !important;
  text-indent: 0 !important;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 1.15rem !important;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.theme-modern .hir-cim a,
body.theme-modern .hir-cim-compact a {
  color: #fff !important;
  text-decoration: none !important;
}
body.theme-modern .hir-cim a:hover,
body.theme-modern .hir-cim-compact a:hover {
  color: var(--accent-bright) !important;
}

body.theme-modern .hir-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 0 8px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

body.theme-modern .hir-szoveg,
body.theme-modern #just {
  color: var(--ink-soft) !important;
  line-height: 1.55;
  padding: 10px 12px !important;
}

body.theme-modern .hir-datum {
  color: var(--muted) !important;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0 12px 8px;
}

body.theme-modern #focim,
body.theme-modern #alcim {
  font-family: "Barlow Condensed", Impact, sans-serif !important;
  color: var(--brand) !important;
  letter-spacing: 0.02em;
}

body.theme-modern .nagyon table {
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* —— Buttons (global modern) —— */
body.theme-modern input[type="submit"],
body.theme-modern input[type="button"],
body.theme-modern input[type="SUBMIT"],
body.theme-modern button:not(.site-menu-toggle):not(.modern-search-toggle):not(.modern-search-close):not(.modern-menu-close):not(.modern-gallery-nav):not(.modern-gallery-thumb):not(.modern-gallery-close):not(.modern-game-close):not(.modern-game-btn),
body.theme-modern .button,
body.theme-modern .btn-nav,
body.theme-modern a.smi {
  min-height: 40px;
  padding: 0.55rem 1rem;
  border: 1px solid transparent !important;
  border-radius: var(--radius) !important;
  background: var(--brand) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none !important;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.12s ease;
}

body.theme-modern input[type="submit"]:hover,
body.theme-modern input[type="button"]:hover,
body.theme-modern button:not(.site-menu-toggle):not(.modern-search-toggle):not(.modern-search-close):not(.modern-menu-close):not(.modern-gallery-nav):not(.modern-gallery-thumb):not(.modern-gallery-close):not(.modern-game-close):not(.modern-game-btn):hover,
body.theme-modern .button:hover,
body.theme-modern .btn-nav:hover,
body.theme-modern a.smi:hover {
  background: var(--brand-hover) !important;
  color: #fff !important;
  transform: translateY(-1px);
  filter: none;
}

body.theme-modern .btn-tovabb,
body.theme-modern .btn-nav.btn-tovabb {
  background: var(--accent) !important;
}
body.theme-modern .btn-tovabb:hover,
body.theme-modern .btn-nav.btn-tovabb:hover {
  background: var(--accent-hover) !important;
}

body.theme-modern .btn-nav-icon {
  filter: none;
}

/* —— Forms —— */
body.theme-modern input[type="text"],
body.theme-modern input[type="password"],
body.theme-modern input[type="email"],
body.theme-modern input[type="search"],
body.theme-modern select,
body.theme-modern textarea {
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--radius) !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
  font-family: inherit !important;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}

body.theme-modern input[type="text"]:focus,
body.theme-modern select:focus,
body.theme-modern textarea:focus {
  border-color: var(--brand) !important;
  box-shadow: var(--focus);
  outline: none;
}

body.theme-modern .hir-kereso {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 10px;
  margin: 8px 0 12px;
  color: #fff;
}

body.theme-modern .hir-kereso span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

body.theme-modern .hir-kereso input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
}

body.theme-modern .hir-kereso input[type="SUBMIT"],
body.theme-modern .hir-kereso input[type="submit"] {
  width: 100%;
  background: var(--accent) !important;
}

body.theme-modern .hir-kereso input[type="SUBMIT"]:hover,
body.theme-modern .hir-kereso input[type="submit"]:hover {
  background: var(--accent-hover) !important;
}

/* —— Misc —— */
body.theme-modern hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1rem 0;
}

body.theme-modern #sportagszoveg {
  color: #fff !important;
}

body.theme-modern .fb-like-box,
body.theme-modern div.fb-like-box {
  background: var(--surface) !important;
  border-radius: var(--radius);
}

@media (max-width: 860px) {
  body.theme-modern .site-header {
    border-radius: 0;
  }
  body.theme-modern .baloldal,
  body.theme-modern .jobbhirek,
  body.theme-modern .nagyon {
    border-radius: 0 !important;
  }
  body.theme-modern .site-nav-btn {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-modern *,
  body.theme-modern *::before,
  body.theme-modern *::after {
    transition: none !important;
  }
}


/* =========================================================
   Phase 2 — layout modern (body-modern.php / menu-modern.html)
   Full-width page + refined spacing/colors
   ========================================================= */


/* Kill legacy navy table backgrounds in modern layout */
body.theme-modern--layout table,
body.theme-modern--layout td,
body.theme-modern--layout tr {
  background-color: transparent !important;
  background: transparent !important;
}
body.theme-modern--layout .hir-cim,
body.theme-modern--layout td.hir-cim {
  background: linear-gradient(90deg, var(--brand) 0%, #3f457f 100%) !important;
  color: #fff !important;
}

/* Compact "Bovebben" / smi links — do not stretch full width under images */
body.theme-modern--layout .hir-body {
  overflow: auto;
}
body.theme-modern--layout .hir-body::after {
  content: "";
  display: table;
  clear: both;
}
body.theme-modern--layout a.smi,
body.theme-modern--layout .hir-body a.smi,
body.theme-modern--layout .modern-article a.smi {
  display: inline-flex !important;
  align-items: center;
  width: auto !important;
  max-width: max-content;
  min-height: 34px !important;
  padding: 0.35rem 0.8rem !important;
  margin: 0.65rem 0 0.25rem !important;
  float: none !important;
  clear: both;
  position: relative;
  z-index: 2;
  font-size: 0.85rem !important;
  border-radius: var(--radius-sm) !important;
  background: var(--accent) !important;
  box-shadow: var(--shadow-sm);
}

body.theme-modern--layout {
  margin: 0 !important;
  width: 100%;
  min-height: 100%;
  background: var(--paper) !important;
}

body.theme-modern--layout .modern-page {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Sticky bar: blends with hero at top, elevates only on scroll */
body.theme-modern--layout .modern-header-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 0.85rem max(1.25rem, calc((100% - 1240px) / 2));
  background: #1a1c3d;
  color: #fff;
  box-shadow: none;
  transition: background 0.22s ease, box-shadow 0.22s ease, backdrop-filter 0.22s ease;
}

body.theme-modern--layout .modern-header-bar.is-scrolled {
  background: rgba(26, 28, 61, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(21, 24, 33, 0.22);
}

body.theme-modern--layout .modern-header-hero {
  width: 100%;
  background: linear-gradient(180deg, #1a1c3d 0%, #2a2d5c 45%, #3a1520 100%);
  color: #fff;
  padding: 0.35rem 0 1.5rem;
  box-shadow: 0 10px 28px rgba(21, 24, 33, 0.18);
}

body.theme-modern--layout .modern-brand {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 3rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff !important;
  text-decoration: none !important;
  line-height: 0.92;
}
body.theme-modern--layout .modern-brand span {
  color: var(--accent-bright);
}
body.theme-modern--layout .modern-brand--footer {
  font-size: 1.55rem;
  display: inline-block;
  margin-bottom: 0.4rem;
}

body.theme-modern--layout .modern-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.2rem 1rem;
}

body.theme-modern--layout .modern-nav-link,
body.theme-modern--layout .modern-nav-group > summary {
  color: rgba(255,255,255,0.92) !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.5rem 0.2rem;
  cursor: pointer;
  list-style: none;
}
body.theme-modern--layout .modern-nav-group > summary::-webkit-details-marker { display: none; }
body.theme-modern--layout .modern-nav-link:hover,
body.theme-modern--layout .modern-nav-group > summary:hover {
  color: var(--accent-bright) !important;
}

body.theme-modern--layout .modern-nav-group { position: relative; }
body.theme-modern--layout .modern-nav-group-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  z-index: 40;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
body.theme-modern--layout .modern-nav-group-panel a {
  color: var(--brand) !important;
  text-decoration: none !important;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  font-weight: 650;
}
body.theme-modern--layout .modern-nav-group-panel a:hover {
  background: var(--brand-soft);
  color: var(--accent) !important;
}

/* Desktop: menu dialog is an inline flex slot; nav centered between brand & actions */
body.theme-modern--layout .modern-menu-dialog {
  flex: 1 1 auto;
  min-width: 0;
  position: static;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  z-index: auto;
}
body.theme-modern--layout .modern-menu-backdrop,
body.theme-modern--layout .modern-menu-panel-head {
  display: none;
}
body.theme-modern--layout .modern-menu-panel {
  position: static;
  width: auto;
  max-height: none;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  color: inherit;
}

body.theme-modern--layout .modern-header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.35rem;
  flex: 0 0 auto;
}

body.theme-modern--layout .modern-menu-toggle { display: none; }

body.theme-modern--layout .modern-header-stage {
  width: min(1240px, calc(100% - 2.5rem));
  margin: 0.15rem auto 0;
}
body.theme-modern--layout .modern-header-carousel {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0,0,0,0.32);
  background: #12151c;
  max-height: 300px;
}
body.theme-modern--layout .modern-header-meta {
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Content shell: centered, comfortable width, full-page feel */
body.theme-modern--layout .modern-shell {
  width: min(1240px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.75rem 0 2.75rem;
  flex: 1 1 auto;
}

body.theme-modern--layout .modern-main {
  padding: 0;
}

body.theme-modern--layout .modern-content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem 1.75rem 2rem;
  margin-bottom: 1.75rem;
}

/* Section heading */
body.theme-modern--layout .modern-section-head {
  margin: 0 0 1.75rem;
  padding: 0.15rem 0 1rem;
  border-bottom: 3px solid var(--brand);
}
body.theme-modern--layout .modern-section-head--sub {
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  border-bottom-color: var(--line-strong);
}
body.theme-modern--layout .modern-section-title {
  margin: 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(1.85rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--brand);
  text-decoration: none !important;
}
body.theme-modern--layout .modern-section-sub {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
}

/* News cards spacing */
body.theme-modern--layout .modern-news-feed > table,
body.theme-modern--layout .modern-content > table {
  margin: 0 0 1.85rem;
  border-collapse: separate;
  border-spacing: 0;
}
body.theme-modern--layout .modern-news-feed > table:last-of-type,
body.theme-modern--layout .modern-content > table:last-of-type {
  margin-bottom: 0.5rem;
}
body.theme-modern--layout .hir-body {
  margin: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  border: 1px solid var(--line);
  border-top: 0;
  background: #fbfcfe;
}
body.theme-modern--layout .hir-cim {
  border-radius: var(--radius) var(--radius) 0 0 !important;
  padding: 0.85rem 1.05rem !important;
}
body.theme-modern--layout .hir-datum {
  padding: 0.55rem 1.05rem 1.15rem !important;
  margin: 0 !important;
  color: var(--muted) !important;
}
body.theme-modern--layout .hir-szoveg,
body.theme-modern--layout #just {
  padding: 1rem 1.1rem 1.15rem !important;
  line-height: 1.6 !important;
}

body.theme-modern--layout .btn-nav-wrap {
  margin-top: 1.5rem;
  margin-bottom: 0.25rem;
}

body.theme-modern--layout .modern-footer {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 1.5rem 0 0;
  padding: 1.35rem 1.5rem;
  background: var(--ink);
  color: rgba(255,255,255,0.8);
  border-radius: var(--radius-lg);
}
body.theme-modern--layout .modern-footer-inner {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}
body.theme-modern--layout .modern-footer p {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
}

/* —— Article detail (hvlink) —— */
body.theme-modern--layout .modern-article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin: 0 0 1.25rem;
}
body.theme-modern--layout .modern-article-head {
  padding: 1.15rem 1.35rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfe 0%, var(--surface) 100%);
}
body.theme-modern--layout .modern-article-title {
  margin: 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--brand);
  text-transform: none;
}
body.theme-modern--layout .modern-article-meta {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}
body.theme-modern--layout .modern-article-body.hir-body {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0.35rem 0 0.5rem;
  overflow: auto;
}
body.theme-modern--layout .modern-article-body .hir-szoveg,
body.theme-modern--layout .modern-article-body #just {
  padding: 0.85rem 1.35rem 1.35rem !important;
  line-height: 1.65 !important;
  color: var(--ink-soft) !important;
  font-size: 1.02rem;
}
body.theme-modern--layout .modern-article-body #balra {
  margin: 0.85rem 1.35rem 0.75rem 1.35rem;
}
body.theme-modern--layout .modern-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}
body.theme-modern--layout .modern-article-body #bold,
body.theme-modern--layout .modern-article-body span#bold {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.02em;
}
body.theme-modern--layout .btn-nav-wrap-left {
  text-align: left;
  margin: 0.35rem 0 0.5rem;
}

/* Hide legacy banner remnants if any */
body.theme-modern--layout .modern-banner { display: none !important; }

@media (max-width: 996px) {
  body.theme-modern--layout .modern-header-stage,
  body.theme-modern--layout .modern-shell {
    width: calc(100% - 1.5rem);
  }
  body.theme-modern--layout .modern-header-bar {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    flex-wrap: nowrap;
  }
  body.theme-modern--layout .modern-shell {
    padding-top: 1.25rem;
  }
  body.theme-modern--layout .modern-content {
    padding: 1.2rem 1.1rem 1.4rem;
  }
  body.theme-modern--layout .modern-header-actions {
    margin-left: auto;
    gap: 0.45rem;
  }
  body.theme-modern--layout .modern-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.22) !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,0.08) !important;
    color: #fff;
    box-shadow: none !important;
  }
  body.theme-modern--layout .modern-menu-toggle:hover,
  body.theme-modern--layout .modern-menu-toggle:focus,
  body.theme-modern--layout .modern-menu-toggle.is-open {
    background: rgba(194, 40, 40, 0.22) !important;
    border-color: rgba(242, 139, 139, 0.65) !important;
    color: var(--accent-bright);
  }
  body.theme-modern--layout .modern-search-toggle {
    margin-left: 0;
  }

  /* Mobile menu: backdrop dialog (does not expand header) */
  body.theme-modern--layout .modern-menu-dialog {
    display: none;
    flex: 0 0 auto;
  }
  body.theme-modern--layout .modern-menu-dialog.is-open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 1200;
    align-items: flex-start;
    justify-content: center;
    padding: 8vh 1rem 2rem;
  }
  body.theme-modern--layout .modern-menu-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(15, 18, 28, 0.62);
    backdrop-filter: blur(2px);
  }
  body.theme-modern--layout .modern-menu-panel {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    max-height: min(78vh, 760px);
    overflow: auto;
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
    padding: 1.1rem 1.15rem 1.2rem;
  }
  body.theme-modern--layout .modern-menu-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }
  body.theme-modern--layout .modern-menu-panel-head h2 {
    margin: 0;
    font-family: "Barlow Condensed", Impact, sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--brand);
  }
  body.theme-modern--layout .modern-menu-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
  }
  body.theme-modern--layout .modern-menu-close:hover {
    background: var(--accent);
    color: #fff;
  }
  body.theme-modern--layout .modern-nav {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0;
    text-align: center;
  }
  body.theme-modern--layout .modern-nav-link,
  body.theme-modern--layout .modern-nav-group > summary {
    color: var(--brand) !important;
    padding: 0.7rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: 1.02rem;
    text-align: center;
  }
  body.theme-modern--layout .modern-nav-link:hover,
  body.theme-modern--layout .modern-nav-group > summary:hover {
    background: var(--brand-soft);
    color: var(--accent) !important;
  }
  body.theme-modern--layout .modern-nav-group-panel {
    position: static;
    box-shadow: none;
    background: var(--brand-soft);
    margin: 0.15rem 0 0.35rem;
    text-align: center;
  }
  body.theme-modern--layout .modern-nav-group-panel a {
    color: var(--brand) !important;
    text-align: center;
  }
}

html.modern-menu-open,
html.modern-menu-open body {
  overflow: hidden;
}



/* ===== Mockup-like news grid ===== */
body.theme-modern--layout .modern-news-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.25rem;
  margin: 0 0 1.75rem;
  align-items: start;
}

body.theme-modern--layout .modern-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

body.theme-modern--layout .modern-card--feature {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
  align-self: start;
}

body.theme-modern--layout .modern-card-media {
  display: block;
  background: #1a1c3d;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
body.theme-modern--layout .modern-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.theme-modern--layout .modern-card-body {
  padding: 1.1rem 1.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 0 0 auto;
}

body.theme-modern--layout .modern-kicker {
  display: inline-block;
  align-self: flex-start;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Nap hire + gyorshirek (homepage only when fresh) */
body.theme-modern--layout .modern-home-extras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 0 0 1.75rem;
  align-items: start;
}
body.theme-modern--layout .modern-extra-card {
  padding: 1.1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  height: auto;
  align-self: start;
}
body.theme-modern--layout .modern-extra-card .modern-kicker {
  align-self: flex-start;
}
body.theme-modern--layout .modern-extra-body {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}
body.theme-modern--layout .modern-extra-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}
body.theme-modern--layout .modern-extra-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
body.theme-modern--layout .modern-extra-item {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
body.theme-modern--layout .modern-extra-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
body.theme-modern--layout .modern-extra-title {
  margin: 0 0 0.35rem;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--brand);
  text-transform: uppercase;
  line-height: 1.15;
}

body.theme-modern--layout .modern-card-title {
  margin: 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
body.theme-modern--layout .modern-card-title a {
  color: var(--brand) !important;
  text-decoration: none !important;
}
body.theme-modern--layout .modern-card-title a:hover {
  color: var(--accent) !important;
}

body.theme-modern--layout .modern-card-excerpt,
body.theme-modern--layout .modern-list-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

body.theme-modern--layout .modern-card-meta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

body.theme-modern--layout .modern-more {
  display: inline-flex !important;
  align-items: center;
  align-self: flex-start;
  margin-top: 0.35rem;
  min-height: 34px;
  padding: 0.35rem 0.85rem !important;
  border-radius: var(--radius-sm);
  background: var(--accent) !important;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  width: auto !important;
}

body.theme-modern--layout .modern-card--list {
  padding: 0.35rem 0.25rem;
}

body.theme-modern--layout .modern-list-item {
  padding: 0.95rem 1.05rem;
  border-bottom: 1px solid var(--line);
}
body.theme-modern--layout .modern-list-item:last-child {
  border-bottom: 0;
}

body.theme-modern--layout .modern-list-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.45rem;
}
body.theme-modern--layout .modern-list-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.45rem;
}
body.theme-modern--layout .modern-list-foot .modern-card-meta {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
body.theme-modern--layout .modern-more--list {
  align-self: baseline;
  margin-top: 0;
  flex: 0 0 auto;
}

body.theme-modern--layout .modern-list-title {
  margin: 0 0 0.3rem;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
}
body.theme-modern--layout .modern-list-title a {
  color: var(--brand) !important;
  text-decoration: none !important;
}
body.theme-modern--layout .modern-list-title a:hover {
  color: var(--accent) !important;
}

body.theme-modern--layout .modern-card--more {
  padding: 1.25rem 1.35rem 1.4rem;
  margin-top: 0.25rem;
}

body.theme-modern--layout .modern-more-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.theme-modern--layout .modern-more-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.15rem;
  border-bottom: 1px solid var(--line);
}
body.theme-modern--layout .modern-more-item:last-child {
  border-bottom: 0;
}

body.theme-modern--layout .modern-more-link {
  color: var(--brand) !important;
  text-decoration: none !important;
  font-weight: 650;
  font-size: 0.95rem;
  line-height: 1.35;
}
body.theme-modern--layout .modern-more-link:hover {
  color: var(--accent) !important;
}

body.theme-modern--layout .modern-more-meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
body.theme-modern--layout .modern-more-meta img {
  vertical-align: middle;
  margin-right: 4px;
}

body.theme-modern--layout .modern-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 1.15rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

body.theme-modern--layout .modern-pager-btn,
body.theme-modern--layout .modern-pager-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none !important;
}

body.theme-modern--layout .modern-pager-btn {
  background: var(--brand-soft);
  color: var(--brand) !important;
  border: 1px solid var(--line);
}
body.theme-modern--layout .modern-pager-btn:hover {
  background: var(--accent);
  color: #fff !important;
  border-color: var(--accent);
}
body.theme-modern--layout .modern-pager-current {
  background: var(--brand);
  color: #fff;
}

/* Content card should not double-wrap too heavily */
body.theme-modern--layout .modern-content {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

@media (max-width: 900px) {
  body.theme-modern--layout .modern-news-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }
  body.theme-modern--layout .modern-card--feature {
    min-height: 0;
    height: auto;
    max-height: none;
  }
  body.theme-modern--layout .modern-home-extras {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* Nameday / date line in modern header */
body.theme-modern .felsodatum,
body.theme-modern--layout .felsodatum,
body.theme-modern--layout .modern-header-meta,
body.theme-modern--layout .modern-header-meta .felsodatum {
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 600;
}
body.theme-modern .felsodatum font,
body.theme-modern--layout .felsodatum font,
body.theme-modern--layout .modern-header-meta .felsodatum font {
  color: var(--accent-bright) !important;
  font-weight: 700;
}

/* Modern Vissza / Tovabb nav buttons (override classic glossy split) */
body.theme-modern .btn-nav,
body.theme-modern--layout .btn-nav {
  display: inline-flex !important;
  align-items: center !important;
  height: auto !important;
  min-height: 42px;
  min-width: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: var(--radius) !important;
  overflow: hidden;
  background: var(--brand) !important;
  box-shadow: var(--shadow-sm) !important;
  transform: none;
}
body.theme-modern .btn-nav:hover,
body.theme-modern--layout .btn-nav:hover {
  background: var(--brand-hover) !important;
  filter: none !important;
  transform: translateY(-1px);
}
body.theme-modern .btn-nav .btn-nav-label,
body.theme-modern .btn-nav .btn-nav-icon,
body.theme-modern--layout .btn-nav .btn-nav-label,
body.theme-modern--layout .btn-nav .btn-nav-icon {
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  color: #fff !important;
  height: auto !important;
  font-family: inherit !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
}
body.theme-modern .btn-nav .btn-nav-label,
body.theme-modern--layout .btn-nav .btn-nav-label {
  padding: 0.65rem 1rem 0.65rem 0.35rem !important;
}
body.theme-modern .btn-nav .btn-nav-icon,
body.theme-modern--layout .btn-nav .btn-nav-icon {
  flex: 0 0 auto !important;
  width: auto !important;
  padding: 0.65rem 0.35rem 0.65rem 0.9rem !important;
  opacity: 0.95;
}
body.theme-modern .btn-nav.btn-tovabb .btn-nav-label,
body.theme-modern--layout .btn-nav.btn-tovabb .btn-nav-label {
  padding: 0.65rem 0.35rem 0.65rem 1rem !important;
}
body.theme-modern .btn-nav.btn-tovabb .btn-nav-icon,
body.theme-modern--layout .btn-nav.btn-tovabb .btn-nav-icon {
  padding: 0.65rem 0.9rem 0.65rem 0.35rem !important;
}
body.theme-modern .btn-nav.btn-tovabb,
body.theme-modern--layout .btn-nav.btn-tovabb {
  background: var(--accent) !important;
}
body.theme-modern .btn-nav.btn-tovabb:hover,
body.theme-modern--layout .btn-nav.btn-tovabb:hover {
  background: var(--accent-hover) !important;
}

/* —— Section pages (videos, results, events, etc.) —— */
body.theme-modern--layout .modern-section {
  margin: 0 0 1rem;
}
body.theme-modern--layout .modern-empty {
  margin: 1rem 0;
  color: var(--muted);
  font-weight: 600;
}
body.theme-modern--layout .modern-hint {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
body.theme-modern--layout .modern-subsection-title {
  margin: 0 0 0.85rem;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 0.02em;
}
body.theme-modern--layout .modern-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 0 0 1.25rem;
}
body.theme-modern--layout .modern-video-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none !important;
  box-shadow: var(--shadow-sm);
  color: var(--brand) !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
body.theme-modern--layout .modern-video-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--accent) !important;
}
body.theme-modern--layout .modern-video-thumb {
  display: block;
  background: #12151c;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
body.theme-modern--layout .modern-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
body.theme-modern--layout .modern-video-title {
  display: block;
  padding: 0.85rem 0.95rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
}
body.theme-modern--layout .modern-toolbar {
  padding: 1rem 1.15rem 1.1rem;
  margin: 0 0 1.15rem;
  display: grid;
  gap: 0.85rem;
}
body.theme-modern--layout .modern-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.7rem;
}
body.theme-modern--layout .modern-filter-form label {
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
body.theme-modern--layout .modern-filter-form select,
body.theme-modern--layout .modern-filter-form input[type="text"] {
  min-width: 180px;
  flex: 1 1 180px;
}
body.theme-modern--layout .modern-result-card {
  padding: 1rem 1.15rem 1.15rem;
  margin: 0 0 0.9rem;
}
body.theme-modern--layout .modern-result-title {
  margin: 0 0 0.35rem;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1.2;
}
body.theme-modern--layout .modern-result-body {
  margin-top: 0.55rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
body.theme-modern--layout .modern-result-body img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}
@media (max-width: 700px) {
  body.theme-modern--layout .modern-video-grid {
    grid-template-columns: 1fr;
  }
  body.theme-modern--layout .modern-filter-form select,
  body.theme-modern--layout .modern-filter-form input[type="text"] {
    min-width: 100%;
    flex: 1 1 100%;
  }
}

/* —— Search / sportlink / impresszum —— */
body.theme-modern--layout .modern-search-form input[type="text"] {
  flex: 1 1 260px;
  min-width: 220px;
}
body.theme-modern--layout .modern-search-count {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
}
body.theme-modern--layout .modern-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 1rem;
}
body.theme-modern--layout .modern-link-col {
  padding: 1rem 1.1rem 1.15rem;
}
body.theme-modern--layout .modern-impresszum .hir-szoveg,
body.theme-modern--layout .modern-impresszum .MsoNormal,
body.theme-modern--layout .modern-impresszum div {
  color: var(--ink-soft);
  line-height: 1.55;
}
body.theme-modern--layout .modern-impresszum b,
body.theme-modern--layout .modern-impresszum strong {
  color: var(--brand);
}
@media (max-width: 800px) {
  body.theme-modern--layout .modern-link-grid {
    grid-template-columns: 1fr;
  }
}

/* —— Header search dialog —— */
body.theme-modern--layout .modern-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: 0;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
body.theme-modern--layout .modern-search-toggle:hover,
body.theme-modern--layout .modern-search-toggle:focus {
  background: rgba(194, 40, 40, 0.22);
  border-color: rgba(242, 139, 139, 0.65);
  color: var(--accent-bright);
  outline: none;
}
body.theme-modern--layout .modern-search-icon {
  display: block;
}
body.theme-modern--layout .modern-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
body.theme-modern--layout .modern-search-dialog[hidden] {
  display: none !important;
}
body.theme-modern--layout .modern-search-dialog {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 1rem 2rem;
}
body.theme-modern--layout .modern-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 28, 0.62);
  backdrop-filter: blur(2px);
}
body.theme-modern--layout .modern-search-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(78vh, 760px);
  overflow: auto;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  padding: 1.1rem 1.15rem 1.2rem;
}
body.theme-modern--layout .modern-search-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
body.theme-modern--layout .modern-search-panel-head h2 {
  margin: 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--brand);
}
body.theme-modern--layout .modern-search-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}
body.theme-modern--layout .modern-search-close:hover {
  background: var(--accent);
  color: #fff;
}
body.theme-modern--layout .modern-search-dialog-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.95rem;
}
body.theme-modern--layout .modern-search-dialog-form input[type="search"] {
  flex: 1 1 220px;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.55rem 0.8rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
body.theme-modern--layout .modern-search-dialog-form button[type="submit"] {
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
body.theme-modern--layout .modern-search-dialog-form button[type="submit"]:hover {
  background: var(--brand-hover);
}
body.theme-modern--layout .modern-search-results .modern-more-list {
  margin: 0;
}
html.modern-search-open,
html.modern-search-open body {
  overflow: hidden;
}


/* —— Fotóriport gallery dialog + carousel —— */
body.theme-modern--layout .modern-gallery-dialog[hidden] {
  display: none !important;
}
body.theme-modern--layout .modern-gallery-dialog {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
}
body.theme-modern--layout .modern-gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 14, 24, 0.72);
  backdrop-filter: blur(3px);
}
body.theme-modern--layout .modern-gallery-panel {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 70px rgba(0,0,0,0.42);
  padding: 1.15rem 1.2rem 1.25rem;
}
body.theme-modern--layout .modern-gallery-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}
body.theme-modern--layout .modern-gallery-close:hover {
  background: var(--accent);
  color: #fff;
}
body.theme-modern--layout .modern-gallery-dialog-head-meta {
  margin: 0 2rem 0.2rem 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
body.theme-modern--layout .modern-gallery-dialog-title {
  margin: 0 2.2rem 0.95rem 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--brand);
  line-height: 1.15;
}
body.theme-modern--layout .modern-gallery-stage {
  margin: 0;
}
body.theme-modern--layout .modern-gallery-viewport {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: linear-gradient(165deg, #1a1c3d 0%, #2a2d5c 55%, #3a1520 100%);
  border-radius: var(--radius-lg);
  padding: 1rem 0.65rem;
  box-shadow: var(--shadow);
}
body.theme-modern--layout .modern-gallery-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: min(52vh, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
body.theme-modern--layout .modern-gallery-slide {
  display: none;
  margin: 0;
  width: 100%;
  text-align: center;
  animation: modernGalleryIn 0.28s ease;
}
body.theme-modern--layout .modern-gallery-slide.is-active {
  display: block;
}
body.theme-modern--layout .modern-gallery-slide img {
  max-width: 100%;
  max-height: min(52vh, 520px);
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(0,0,0,0.35);
  background: rgba(255,255,255,0.04);
}
@keyframes modernGalleryIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
body.theme-modern--layout .modern-gallery-nav {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.85rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
body.theme-modern--layout .modern-gallery-nav[hidden] {
  display: none !important;
}
body.theme-modern--layout .modern-gallery-viewport--single {
  padding-left: 1rem;
  padding-right: 1rem;
}
body.theme-modern--layout .modern-gallery-nav:hover,
body.theme-modern--layout .modern-gallery-nav:focus {
  background: rgba(194, 40, 40, 0.28);
  border-color: rgba(242, 139, 139, 0.7);
  color: var(--accent-bright);
  outline: none;
}
body.theme-modern--layout .modern-gallery-meta {
  margin: 0.75rem 0 0.35rem;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.04em;
}
body.theme-modern--layout .modern-gallery-thumbs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.35rem 0.15rem 0.55rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
body.theme-modern--layout .modern-gallery-thumb {
  flex: 0 0 auto;
  width: 78px;
  height: 58px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: #1a1c3d;
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: center;
  opacity: 0.72;
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
body.theme-modern--layout .modern-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body.theme-modern--layout .modern-gallery-thumb:hover {
  opacity: 1;
}
body.theme-modern--layout .modern-gallery-thumb.is-active {
  opacity: 1;
  border-color: var(--accent);
  transform: translateY(-1px);
}
html.modern-gallery-open,
html.modern-gallery-open body {
  overflow: hidden;
}
@media (max-width: 700px) {
  body.theme-modern--layout .modern-gallery-panel {
    padding: 0.95rem 0.75rem 1rem;
    max-height: 94vh;
  }
  body.theme-modern--layout .modern-gallery-viewport {
    padding: 0.75rem 0.35rem;
  }
  body.theme-modern--layout .modern-gallery-frame {
    min-height: min(42vh, 380px);
  }
  body.theme-modern--layout .modern-gallery-slide img {
    max-height: min(42vh, 380px);
  }
  body.theme-modern--layout .modern-gallery-nav {
    width: 38px;
    height: 38px;
    font-size: 1.55rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.theme-modern--layout .modern-gallery-slide {
    animation: none;
  }
}
