/* ===== WordPress integration layer ===== */

/* Accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--primary-ink);
  padding: 10px 18px;
  border-radius: 0 0 var(--r-sm) 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Brand link reset */
.brand { text-decoration: none; }
.nav-links a, .topbar a, .dropdown a { text-decoration: none; }

/* Topbar: linkurile din meniu (randate prin walker) trebuie să fie deschise pe fundalul navy */
.topbar .topbar-links .nav-item { position: relative; display: inline-flex; align-items: center; }
.topbar .topbar-links .nav-item > a,
.topbar .topbar-links > a {
	color: var(--primary-ink);
	opacity: .82;
	padding: 2px 0;
	font-size: 13px;
	font-weight: 400;
	background: none;
	border-radius: 0;
	white-space: nowrap;
}
.topbar .topbar-links .nav-item > a:hover,
.topbar .topbar-links > a:hover {
	color: #fff;
	opacity: 1;
	background: none;
}
.topbar .topbar-links .nav-item > a.active { color: var(--accent-soft); background: none; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); transition: .2s; }

@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .nav .container { flex-wrap: nowrap; }
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: min(360px, 85vw);
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 80px 16px 24px;
    overflow-y: auto;
    transition: right .28s ease;
    z-index: 120;
  }
  body.nav-open .nav-links { right: 0; }
  body.nav-open { overflow: hidden; }
  .nav-item { width: 100%; }
  .nav-item > a { padding: 14px 12px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 0 0 8px 12px;
    display: none;
  }
  .nav-item.has-sub.open .dropdown { display: flex; }
  .nav-item.has-sub > a .caret { margin-left: auto; }
  .nav-cta { margin: 16px 12px 0; justify-content: center; }
  .nav-backdrop {
    position: fixed; inset: 0;
    background: rgba(10,8,4,.5);
    opacity: 0; visibility: hidden;
    transition: .28s;
    z-index: 110;
  }
  body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }
}

/* WordPress core image classes */
.alignleft { float: left; margin: 4px 24px 16px 0; }
.alignright { float: right; margin: 4px 0 16px 24px; }
.aligncenter { display: block; margin: 16px auto; }
.alignwide { width: 100%; }
figure.wp-caption, figure.wp-block-image { margin: 16px 0; }
.wp-caption-text, figcaption { font-size: 13px; color: var(--ink-mute); margin-top: 6px; }
.prose .wp-block-image img { width: 100%; height: auto; }

/* Document list link reset (real anchors) */
a.doc-row { text-decoration: none; }
a.doc-row .doc-name { text-decoration: none; }

/* Generic content container for simple pages */
.page-body { padding: 64px 0 96px; }
.page-body .prose { max-width: 820px; margin: 0 auto; }

/* Single post */
.single-post { padding: 56px 0 96px; }
.single-post .post-wrap { max-width: 760px; margin: 0 auto; }
.single-post .post-meta { display: flex; gap: 12px; font-size: 12px; color: var(--ink-mute); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; margin-bottom: 16px; }
.single-post .post-meta .cat { color: var(--primary); }
.single-post h1 { font-size: clamp(34px, 4.5vw, 56px); margin-bottom: 20px; }
.single-post .featured { width: 100%; border-radius: var(--r-md); margin: 24px 0 32px; object-fit: cover; aspect-ratio: 16/9; }
.single-post .post-content { color: var(--ink-soft); font-size: 17px; line-height: 1.7; display: flex; flex-direction: column; gap: 18px; }
.single-post .post-content h2 { color: var(--ink); margin-top: 16px; }
.single-post .post-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.single-post .post-content img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.back-link { display: inline-flex; gap: 8px; align-items: center; color: var(--primary); font-weight: 600; font-size: 14px; margin-bottom: 24px; }

/* Pagination */
.pagination { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 16px 0 0; }
.pagination .page-numbers {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; color: var(--ink-soft); background: var(--surface);
}
.pagination .page-numbers.current { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.pagination a.page-numbers:hover { border-color: var(--accent); }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--ink-mute); margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a { color: var(--accent); }

/* Empty-state */
.empty-state { padding: 80px 0; text-align: center; color: var(--ink-mute); }

/* ===== Widget Accesibilitate ===== */
.a11y-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--accent-soft);
  background: var(--primary);
  color: var(--primary-ink);
  cursor: pointer;
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform .15s;
}
.a11y-toggle:hover { transform: scale(1.06); }
.a11y-toggle svg { width: 28px; height: 28px; }

.a11y-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  width: min(320px, calc(100vw - 40px));
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 330;
  padding: 18px;
  display: none;
}
.a11y-panel.open { display: block; }
.a11y-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.a11y-head b { font-family: "Cormorant Garamond", serif; font-size: 20px; }
.a11y-close { background: none; border: 0; font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink-mute); }
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a11y-grid button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: border-color .12s, background .12s;
}
.a11y-grid button:hover { border-color: var(--accent); }
.a11y-grid button[aria-pressed="true"] { background: color-mix(in srgb, var(--primary) 12%, transparent); border-color: var(--primary); color: var(--primary); }
.a11y-grid button .ic { font-size: 16px; width: 18px; text-align: center; }
.a11y-reset {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.a11y-reset:hover { border-color: var(--primary); color: var(--primary); }

/* Stările de accesibilitate aplicate pe <body> */
body.a11y-font-1 { zoom: 1.12; }
body.a11y-font-2 { zoom: 1.25; }
body.a11y-contrast {
  --bg: #000; --surface: #0a0a0a; --ink: #fff; --ink-soft: #fff; --ink-mute: #ffd24a;
  --line: #fff; --primary: #ffd24a; --primary-ink: #000; --accent: #ffd24a; --accent-soft: #ffd24a;
}
body.a11y-contrast a { text-decoration: underline; }
body.a11y-contrast .ph { filter: grayscale(1) contrast(1.4); }
body.a11y-readable, body.a11y-readable h1, body.a11y-readable h2, body.a11y-readable h3, body.a11y-readable h4 {
  font-family: "Source Sans 3", Verdana, Arial, sans-serif !important;
  letter-spacing: .02em;
}
body.a11y-readable p, body.a11y-readable li, body.a11y-readable .lead, body.a11y-readable .prose { line-height: 1.85 !important; word-spacing: .08em; }
body.a11y-underline a { text-decoration: underline !important; text-underline-offset: 2px; }
body.a11y-no-motion *, body.a11y-no-motion *::before, body.a11y-no-motion *::after {
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  transition-duration: 0s !important;
  scroll-behavior: auto !important;
}

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

/* ===== Lightbox galerie ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,8,5,.94);
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
}
.lightbox.open { display: flex; }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; }
.lightbox-img {
  max-width: min(1100px, 92vw);
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
  background: #000;
}
.lightbox-cap { color: #fff; font-size: 15px; text-align: center; max-width: 720px; opacity: .9; line-height: 1.4; }
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .15s;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 20px; right: 24px; }
.lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lb-prev:hover { transform: translateY(-50%) scale(1.06); }
.lb-next:hover { transform: translateY(-50%) scale(1.06); }
.lb-counter {
  position: absolute;
  top: 28px;
  left: 28px;
  color: #fff;
  font-size: 13px;
  letter-spacing: .1em;
  opacity: .7;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
@media (max-width: 640px) {
  .lightbox { padding: 40px 6px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-close { top: 12px; right: 12px; }
  .lb-counter { top: 16px; left: 16px; }
}

/* ===== Banner cookie-uri ===== */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 1208px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: 310;
  padding: 18px 22px;
  display: none;
  align-items: center;
  gap: 24px;
}
.cookie-banner.show { display: flex; }
.cookie-text { flex: 1; min-width: 0; }
.cookie-text b { font-family: "Cormorant Garamond", serif; font-size: 19px; display: block; margin-bottom: 4px; }
.cookie-text p { color: var(--ink-soft); font-size: 13.5px; line-height: 1.5; }
.cookie-text a { color: var(--primary); font-weight: 600; text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-actions .btn { padding: 10px 20px; }

@media (max-width: 760px) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 14px; }
  .cookie-actions { justify-content: stretch; }
  .cookie-actions .btn { flex: 1; justify-content: center; }
  .a11y-toggle { bottom: 16px; right: 16px; }
}

/* Credit discret „realizat de" în subsolul subsolului */
.footer-credit {
  text-align: center;
  padding-top: 16px;
  font-size: 12px;
  opacity: .5;
  letter-spacing: .02em;
}
.footer-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.footer-credit a:hover { opacity: 1; color: var(--accent-soft); }

/* Print-friendly hero badges hidden on very small screens */
@media (max-width: 480px) {
  .hero-badge { position: static; margin-top: 12px; display: inline-flex; }
  .hero-badge-1, .hero-badge-2 { inset: auto; }
}
