/* Shared page layouts (beyond chrome) */

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
}

.card-link-block {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.15rem 1.2rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), border-color 0.2s;
}

.card-link-block:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--ink);
}

.card-link-block strong {
  color: var(--navy);
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-meta {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
}

.card-code {
  font-size: 0.85rem;
  color: var(--muted);
}

.content-stack {
  display: grid;
  gap: 1.5rem;
  max-width: 48rem;
}

.content-block h2 {
  margin-bottom: 0.4rem;
}

.prose-width {
  max-width: 48rem;
}

.legal-main {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.legal-body.prose {
  width: 100%;
  max-width: none;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.75;
}

.legal-body.prose > *:first-child {
  margin-top: 0;
}

.legal-body.prose h2,
.legal-body.prose h3,
.legal-body.prose h4 {
  color: var(--navy);
  font-weight: 700;
  line-height: 1.35;
  margin: 2rem 0 0.75rem;
}

.legal-body.prose h2 {
  font-size: 1.25rem;
}

.legal-body.prose h3 {
  font-size: 1.12rem;
}

.legal-body.prose h4 {
  font-size: 1.02rem;
}

.legal-body.prose img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem 0;
}

.legal-body.prose figure {
  margin: 1rem 0;
}

.legal-body.prose blockquote {
  margin: 0 0 1rem;
  padding: 0.35rem 0 0.35rem 1rem;
  border-left: 3px solid var(--accent, #fb871c);
  color: var(--muted);
}

.legal-body.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
}

.legal-body.prose th,
.legal-body.prose td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.legal-body.prose p {
  margin: 0 0 1rem;
}

.legal-body.prose ul,
.legal-body.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.legal-body.prose li {
  margin-bottom: 0.4rem;
}

.legal-body.prose a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.legal-body.prose a:hover,
.legal-body.prose a:focus-visible {
  color: var(--orange, #fb871c);
}

.legal-body.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0 1.25rem;
}

.legal-body.prose small {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.item-body {
  line-height: 1.75;
  color: var(--ink);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.empty-state-link {
  display: inline;
  margin-left: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.empty-state-link:hover {
  color: var(--accent);
}

.page-hero {
  color: var(--white);
  padding: 3rem 0 2.5rem;
  position: relative;
  overflow: hidden;
  background: var(--navy);
  isolation: isolate;
}

.page-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transform: scale(1.05);
  animation: pageHeroZoom 14s ease-out forwards;
}

.page-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

@keyframes pageHeroZoom {
  to {
    transform: scale(1);
  }
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(115deg, rgba(6, 54, 119, 0.88) 0%, rgba(6, 54, 119, 0.62) 48%, rgba(6, 54, 119, 0.45) 100%),
    linear-gradient(180deg, rgba(6, 54, 119, 0.25) 0%, rgba(6, 54, 119, 0.72) 100%);
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

/* Breadcrumbs — design 1:1 (Acasă / Secțiune / …) */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
}

.breadcrumbs a.breadcrumb-link {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.breadcrumbs a.breadcrumb-link:hover {
  color: var(--white);
  border-bottom-color: rgba(255, 255, 255, 0.55);
}

.breadcrumb-sep {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
  user-select: none;
}

.breadcrumb-current {
  color: var(--white);
  font-weight: 600;
}

.detail-hero .breadcrumbs,
.opp-detail-hero .breadcrumbs,
.news-detail-hero .breadcrumbs,
.story-detail-hero .breadcrumbs {
  margin-bottom: 0.85rem;
}

.page-hero .eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--light-blue);
  margin-bottom: 0.5rem;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
}

.page-hero p,
.page-hero-lede,
.page-hero-lede p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  max-width: 1005px;
}

@media (prefers-reduced-motion: reduce) {
  .page-hero-media {
    animation: none;
    transform: none;
  }
}

.section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.section-mist {
  background: var(--mist);
}

/* Support/contact field styles live in contact.css (design 1:1) */

/* 404 — a bit taller than inner-page heroes, not a full-viewport banner */
.error-404-hero {
  min-height: 0;
  display: block;
  padding: 3.6rem 0 3rem;
}

.error-404-hero .container {
  width: min(100% - 2rem, var(--max));
}

.error-404-hero .error-404-code {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5.5vw, 3.35rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--accent);
}

.error-404-hero .error-404-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.15rem 0 0;
}

.error-404-hero .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.error-404-hero .btn-primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--white);
}

.error-404-hero .btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.78);
  color: var(--white);
}

.error-404-hero .btn-outline:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--navy);
}

.error-404-section {
  padding: clamp(2rem, 4vw, 3rem) 0;
}

.error-404-links-title {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.error-404-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.error-404-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.error-404-links a svg {
  flex-shrink: 0;
  color: var(--accent);
}

.error-404-links a:hover,
.error-404-links a:focus-visible {
  border-color: var(--navy);
  background: var(--mist);
  color: var(--navy);
}

@media (max-width: 800px) {
  .error-404-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .error-404-links {
    grid-template-columns: 1fr;
  }
}

/* —— Image zoom lightbox (events / news detail cover) —— */
html.mhero-zoom-open,
html.mhero-zoom-open body {
  overflow: hidden;
}

.detail-cover--zoomable {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  text-align: left;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.detail-cover--zoomable:focus-visible {
  outline: 2px solid var(--accent, #fb871c);
  outline-offset: 3px;
}

.detail-cover-zoom-badge {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  background: rgba(6, 54, 119, 0.88);
  color: #fff;
  box-shadow: 0 8px 20px rgba(6, 54, 119, 0.28);
  pointer-events: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.detail-cover--zoomable:hover .detail-cover-zoom-badge,
.detail-cover--zoomable:focus-visible .detail-cover-zoom-badge {
  background: var(--accent, #fb871c);
  transform: scale(1.06);
}

.mhero-zoom[hidden] {
  display: none !important;
}

.mhero-zoom {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.mhero-zoom-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 24, 52, 0.88);
  cursor: zoom-out;
}

.mhero-zoom-stage {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1400px);
  max-height: calc(100vh - 5.5rem);
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
}

.mhero-zoom-img {
  max-width: 96vw;
  max-height: calc(100vh - 5.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  transform-origin: center center;
  transition: transform 0.12s ease-out;
  user-select: none;
  -webkit-user-drag: none;
  cursor: zoom-in;
}

.mhero-zoom.is-zoomed .mhero-zoom-img {
  cursor: grab;
}

.mhero-zoom-img.is-dragging {
  cursor: grabbing;
  transition: none;
}

.mhero-zoom-toolbar {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(6, 54, 119, 0.94);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.mhero-zoom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mhero-zoom-btn:hover,
.mhero-zoom-btn:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.mhero-zoom-close:hover,
.mhero-zoom-close:focus-visible {
  background: var(--accent, #fb871c);
}

@media (max-width: 560px) {
  .mhero-zoom {
    padding: 0.5rem;
  }

  .mhero-zoom-toolbar {
    bottom: 0.75rem;
  }
}
