/* Deskozóna — design system
   DNA: navy #083d77, heading #123f70, ink #26374b, mist #f3f6fa, white panels */

:root {
  --dz-navy: #083d77;
  --dz-heading: #123f70;
  --dz-ink: #26374b;
  --dz-ink-soft: #4a5d73;
  --dz-mist: #f3f6fa;
  --dz-line: #d9e2ec;
  --dz-white: #ffffff;
  --dz-accent-soft: #e8eef6;
  --dz-radius: 4px;
  --dz-radius-lg: 6px;
  --dz-max: 1120px;
  --dz-font: "Open Sans", "Segoe UI", sans-serif;
  --dz-shadow: 0 2px 10px rgba(8, 61, 119, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Page shell only on redesigned pages — do not break BuddyPress/Youzer archives */
body.dz-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--dz-font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--dz-ink);
  background:
    linear-gradient(180deg, #e9eef5 0%, var(--dz-mist) 180px, var(--dz-mist) 100%);
  -webkit-font-smoothing: antialiased;
}

body.dz-body img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Keep monetization blocks at the same compact size as showLinks() */
body.dz-body .romlidata img,
body.dz-body .romlifooter img,
.romlidata img,
.romlifooter img {
  max-width: 170px !important;
  width: auto !important;
  height: auto !important;
  display: inline-block;
  object-fit: contain;
}

body.dz-body main a,
body.dz-body .romlicontainer a,
body.dz-body .home-hero a:not(.btn):not(.tile),
body.dz-body .catalog-intro a,
body.dz-body .sidebar-list a {
  color: var(--dz-navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

body.dz-body main a:hover,
body.dz-body .romlicontainer a:hover,
body.dz-body .sidebar-list a:hover {
  color: #0a4f9c;
}

.site-wrap {
  flex: 1 0 auto;
  width: 100%;
}

.container {
  width: min(100% - 32px, var(--dz-max));
  margin-inline: auto;
}

/* ——— Header / brand bar ——— */
.site-header {
  background: var(--dz-navy);
  color: var(--dz-white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 18px rgba(8, 61, 119, 0.25);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  min-height: 64px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  flex-shrink: 0;
}

.site-brand:hover {
  color: inherit;
  opacity: 0.92;
}

.site-brand__logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--dz-white);
}

.site-brand__name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.site-brand__tag {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.78;
  margin-top: 2px;
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--dz-white);
  border-radius: var(--dz-radius);
  padding: 8px 12px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}

.site-nav a,
body.dz-body .site-nav a,
.site-header .site-nav a {
  color: rgba(255, 255, 255, 0.92) !important;
  text-decoration: none !important;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--dz-radius);
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
body.dz-body .site-nav a:hover,
body.dz-body .site-nav a[aria-current="page"],
.site-header .site-nav a:hover,
.site-header .site-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
}

/* ——— Main / pages ——— */
main {
  flex: 1 0 auto;
  padding-bottom: 48px;
}

.page-header {
  padding: 36px 0 8px;
}

.page-header h1 {
  margin: 0;
  color: var(--dz-heading);
  font-size: clamp(1.75rem, 2.4vw + 1rem, 2.35rem);
  line-height: 1.25;
  font-weight: 700;
}

.page-header p {
  margin: 12px 0 0;
  color: var(--dz-ink-soft);
  max-width: 42rem;
}

/* ——— Homepage ——— */
.home-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding: 48px 0 28px;
  animation: dz-rise 0.55s ease both;
}

.home-hero__eyebrow {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dz-navy);
}

.home-hero h1 {
  margin: 0 0 16px;
  color: var(--dz-heading);
  font-size: clamp(2rem, 3vw + 1rem, 2.75rem);
  line-height: 1.15;
  font-weight: 700;
}

.home-hero__lead {
  margin: 0 0 24px;
  font-size: 1.05rem;
  color: var(--dz-ink-soft);
  max-width: 34rem;
}

.home-hero__media {
  position: relative;
  border-radius: var(--dz-radius-lg);
  overflow: hidden;
  box-shadow: var(--dz-shadow);
  background: var(--dz-accent-soft);
  min-height: 280px;
  animation: dz-rise 0.7s ease 0.08s both;
}

.home-hero__media img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 360px;
  object-fit: cover;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--dz-navy);
  color: var(--dz-white) !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--dz-radius-lg);
  border: 1px solid transparent;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn:hover {
  background: #0a4f9c;
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--dz-navy) !important;
  border-color: var(--dz-navy);
}

.btn--ghost:hover {
  background: var(--dz-accent-soft);
}

.home-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-section {
  padding: 28px 0 8px;
}

.home-section h2 {
  margin: 0 0 10px;
  color: var(--dz-heading);
  font-size: 1.55rem;
  line-height: 1.25;
}

.home-section > p {
  margin: 0 0 20px;
  color: var(--dz-ink-soft);
  max-width: 40rem;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 72px;
  padding: 16px 14px;
  background: var(--dz-navy);
  color: var(--dz-white) !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--dz-radius-lg);
  transition: background 0.2s ease, transform 0.15s ease;
}

.tile:hover {
  background: #0a4f9c;
  transform: translateY(-2px);
}

.home-links {
  padding: 8px 0 24px;
}

.home-blog {
  margin-top: 8px;
  padding: 8px 0 0;
  border-top: 1px solid var(--dz-line);
}

/* ——— Article / content ——— */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 36px;
  align-items: start;
  padding-top: 8px;
  min-width: 0;
}

html:has(body.page-article) {
  overflow-x: hidden;
}

body.page-article,
body.page-article .site-wrap,
body.page-article main,
body.page-article .container,
body.page-article .article-layout {
  max-width: 100%;
  overflow-x: hidden;
}

.romlicontainer {
  background: var(--dz-white);
  border: 1px solid var(--dz-line);
  border-radius: var(--dz-radius-lg);
  padding: 28px 32px;
  box-shadow: var(--dz-shadow);
  min-width: 0;
  max-width: 100%;
  overflow-x: visible;
}

.romlicontainer > :first-child {
  margin-top: 0;
}

.romlicontainer > :last-child {
  margin-bottom: 0;
}

.romlicontainer p {
  margin: 0 0 1.05em;
}

.romlicontainer h2,
.romlicontainer h3,
.romlicontainer h4 {
  color: var(--dz-heading);
  line-height: 1.3;
  margin: 1.35em 0 0.55em;
}

.romlicontainer h2 {
  font-size: 1.45rem;
}

.romlicontainer h3 {
  font-size: 1.2rem;
}

.romlicontainer ul,
.romlicontainer ol {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
}

.romlicontainer li {
  margin-bottom: 0.35em;
}

.romlicontainer img {
  margin: 1em 0;
  border-radius: var(--dz-radius);
}

.romlicontainer blockquote {
  margin: 1.2em 0;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--dz-navy);
  color: var(--dz-ink-soft);
}

.romlicontainer hr {
  border: none;
  border-top: 1px solid var(--dz-line);
  margin: 1.6em 0;
}

.romlicontainer .table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  margin: 1.1em 0;
  border: 1px solid var(--dz-line);
  border-radius: var(--dz-radius);
  background: var(--dz-white);
}

.romlicontainer .table-wrap table {
  margin: 0;
  border: none;
}

.romlicontainer table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
  margin: 1.1em 0;
  min-width: 560px;
}

.romlicontainer th,
.romlicontainer td {
  border: 1px solid var(--dz-line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
  white-space: normal;
}

.romlicontainer th {
  background: var(--dz-accent-soft);
  color: var(--dz-heading);
  font-weight: 700;
}

.romlicontainer tr:nth-child(even) td {
  background: #fafcfe;
}

.sidebar-panel {
  background: var(--dz-white);
  border: 1px solid var(--dz-line);
  border-left: 3px solid var(--dz-navy);
  border-radius: var(--dz-radius);
  padding: 18px 16px;
  position: sticky;
  top: 84px;
}

.sidebar-panel h3 {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--dz-heading);
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--dz-line);
}

.sidebar-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-list a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.4;
}

.sidebar-list a:hover {
  text-decoration: underline;
}

/* ——— Catalog ——— */
.catalog-intro {
  margin: 0 0 28px;
  color: var(--dz-ink-soft);
}

.catalog-body {
  background: transparent;
  padding: 0;
}

/* ——— Footer ——— */
.site-footer {
  background: var(--dz-navy);
  color: rgba(255, 255, 255, 0.92);
  padding: 36px 0 28px;
  margin-top: auto;
}

.site-footer a,
body.dz-body .site-footer a {
  color: #fff !important;
  text-decoration: none !important;
}

.site-footer a:hover,
body.dz-body .site-footer a:hover {
  text-decoration: underline !important;
}

.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px 40px;
}

.site-footer__brand {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.site-footer > .container > p,
.site-footer__grid p {
  margin: 0 0 10px;
  max-width: 28rem;
  opacity: 0.9;
}

/* showSitewide(): one centered column — image and text share the same axis */
.romlifooter,
.site-footer .romlifooter {
  text-align: center !important;
}

.romlifooter > div,
.site-footer .romlifooter > div {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(100%, 36rem);
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
}

.romlifooter p,
.site-footer .romlifooter p {
  margin: 0 !important;
  max-width: 100% !important;
  width: 100%;
  text-align: center !important;
  opacity: 0.95;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  font-weight: 600;
}

.site-footer__copy {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.88rem;
  opacity: 0.8;
}

/* ——— Motion ——— */
@keyframes dz-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ——— Responsive ——— */
@media (max-width: 900px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 32px;
  }

  .home-hero__media img {
    max-height: 280px;
  }

  .tile-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 12px;
  }

  .site-header.is-open .site-nav {
    display: flex;
  }

  .site-header__inner {
    flex-wrap: wrap;
  }

  .site-brand__tag {
    display: none;
  }

  .romlicontainer {
    padding: 20px 16px;
  }

  .tile-grid {
    grid-template-columns: 1fr;
  }
}
