/* Shell comun pentru paginile publice secundare.
   Conținutul rămâne specific fiecărei pagini; headerul, ritmul și cardurile
   urmează aceeași fundație ca suprafețele publice principale. */

.public-utility-page {
  --utility-accent: var(--public-surface-accent, #6357e8);
  --utility-ink: #17182a;
  --utility-muted: #657084;
  --utility-border: rgba(218, 220, 232, 0.9);
  background:
    radial-gradient(circle at 9% 1%, rgba(99, 87, 232, 0.08), transparent 28rem),
    linear-gradient(180deg, #f8f8fc 0, #f4f5fa 34rem, #f7f8fb 100%);
}

/* Termenii și confidențialitatea folosesc aceeași suprafață neutră ca
   Contact și restul paginilor publice actuale. */
.public-utility-page.legal-standard-page {
  background: var(--listing-page-background, #f6f7fb);
}

.public-utility-page :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--utility-accent) 28%, transparent);
  outline-offset: 3px;
}

.public-utility-page .info-page-main {
  padding-top: 12px;
}

.public-utility-page .info-page-hero {
  margin-bottom: 22px;
}

.public-utility-page .info-page-title {
  font-family: var(--font-display, inherit);
  font-size: clamp(1.85rem, 4.5vw, 2.45rem);
}

.public-utility-page .propose-edit-shell {
  padding-top: 12px;
}

.public-utility-page .propose-edit-hero h1 {
  font-size: clamp(1.7rem, 5vw, 2rem);
}

.public-utility-page.offer-page .offer-main {
  padding-top: 12px;
}

.public-utility-page.offer-page .offer-hero h1 {
  font-size: clamp(2rem, 4.2vw, 2.8rem);
  line-height: 1.02;
}

.legal-page-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  max-width: 1040px;
  margin-inline: auto;
}

.legal-page-nav {
  position: sticky;
  top: 94px;
  padding: 18px;
  border: 1px solid var(--utility-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 36px rgba(31, 27, 60, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.legal-page-nav > p {
  margin: 0 0 10px;
  color: #757d8e;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.legal-page-nav nav {
  display: grid;
  gap: 3px;
}

.legal-page-nav nav a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #4c5568;
  font-size: 0.8rem;
  font-weight: 720;
  text-decoration: none;
}

.legal-page-nav nav a:hover,
.legal-page-nav nav a:focus-visible {
  background: #f1efff;
  color: #5749da;
}

.legal-page-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 12px;
  margin-top: 14px;
  border: 1px solid #ded8ff;
  border-radius: 12px;
  background: #f8f7ff;
  color: #5749da;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.legal-page-contact svg {
  width: 16px;
  height: 16px;
}

.legal-page-layout .legal-card {
  width: 100%;
  max-width: none;
  margin: 0;
}

.legal-content section {
  scroll-margin-top: 92px;
}

.entity-representation-kicker {
  margin: 0 0 5px !important;
  color: #6255df !important;
  font-size: 0.72rem !important;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.entity-representation-unavailable__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.entity-representation-unavailable__actions a {
  flex: 1 1 180px;
}

.entity-representation-unavailable__actions a.is-secondary {
  border: 1px solid #dcd8ef;
  background: #fff;
  color: #514866;
}

@media (min-width: 992px) {
  /* Titlul și explicația sunt deja în bara contextuală fixă. Hero-ul amplu
     rămâne numai pe mobil, unde acea bară nu este randată. */
  .legal-standard-page .info-page-hero {
    display: none;
  }

  .public-utility-page .navbar-glass + :is(main, .offer-main) {
    margin-top: 0;
  }

  .public-utility-page .info-page-main {
    padding: 12px 0 64px;
  }

  .legal-standard-page .legal-page-nav {
    top: calc(var(--public-desktop-fixed-offset, 122px) + 12px);
  }

  .legal-standard-page .legal-card {
    border-color: rgba(55, 48, 77, 0.1);
    box-shadow: 0 14px 34px rgba(39, 31, 64, 0.055);
  }

  .legal-standard-page .legal-content section {
    position: relative;
    padding-left: 18px;
  }

  .legal-standard-page .legal-content section::before {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    width: 3px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--utility-accent) 22%, white);
    content: "";
  }

  .public-utility-page .info-page-main > .container {
    width: calc(100% - clamp(32px, 4vw, 64px));
    max-width: 1100px;
    padding-inline: 0;
  }

  .public-utility-page .info-page-hero {
    max-width: 780px;
    margin-bottom: 24px;
  }

  .public-utility-page .info-page-title {
    font-size: clamp(2rem, 2.8vw, 2.4rem);
  }

  .public-utility-page.info-page-contact .info-page-shell {
    max-width: 1040px;
  }

  .public-utility-page.info-page-contact .contact-details-card,
  .public-utility-page.info-page-contact .contact-form-card {
    min-height: 100%;
  }

  .propose-edit-page .propose-edit-shell {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    width: calc(100% - clamp(32px, 4vw, 64px));
    max-width: 1100px;
    padding: 12px 0 64px;
  }

  .propose-edit-page .propose-edit-hero,
  .propose-edit-page .propose-edit-notice,
  .propose-edit-page .propose-edit-privacy {
    grid-column: 1 / -1;
  }

  .propose-edit-page .propose-edit-hero {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    column-gap: 18px;
    max-width: none;
    margin: 0 0 6px;
    padding: 24px 26px;
    border: 1px solid var(--utility-border);
    border-radius: 26px;
    background:
      radial-gradient(circle at 96% 10%, rgba(236, 72, 153, 0.11), transparent 22rem),
      linear-gradient(135deg, rgba(244, 241, 255, 0.96), rgba(255, 255, 255, 0.98));
    box-shadow: 0 16px 42px rgba(31, 27, 60, 0.07);
    text-align: left;
  }

  .propose-edit-page .propose-edit-hero__icon {
    grid-row: 1 / span 3;
    margin: 0;
  }

  .propose-edit-page .propose-edit-eyebrow,
  .propose-edit-page .propose-edit-hero h1,
  .propose-edit-page .propose-edit-hero > p:last-child {
    grid-column: 2;
  }

  .propose-edit-page .propose-edit-hero h1 {
    margin: 1px 0 5px;
    font-size: 1.75rem;
  }

  .propose-edit-page .propose-edit-card {
    display: flex;
    flex-direction: column;
    min-height: 370px;
    margin: 0;
    padding: 24px;
    border-radius: 24px;
  }

  .propose-edit-page .propose-edit-selection__empty,
  .propose-edit-page .propose-edit-selection__card {
    flex: 1 1 auto;
  }

  .propose-edit-page .propose-edit-selection__empty {
    min-height: 170px;
  }

  .propose-edit-page .propose-edit-open-form {
    margin-top: auto;
  }

  .propose-edit-page .propose-edit-privacy {
    margin: 0;
  }

  .entity-representation-page .entity-representation-unavailable {
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: 18px;
    max-width: 780px;
    margin-inline: auto;
    padding: 30px;
  }

  .entity-representation-page .entity-representation-unavailable > span {
    grid-row: 1 / span 2;
  }

  .entity-representation-page .entity-representation-unavailable__actions {
    grid-column: 2;
  }
}

@media (max-width: 991.98px) {
  /* Shellul touch rezervă deja 11px între headerul fix și începutul fluxului.
     Un pixel local păstrează distanța vizibilă finală la 12px. */
  .public-utility-page .info-page-main,
  .public-utility-page .propose-edit-shell,
  .public-utility-page.offer-page .offer-main {
    padding-top: 1px;
  }

  .legal-page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .legal-page-nav {
    position: static;
    overflow: hidden;
    padding: 12px;
    border-radius: 16px;
  }

  .legal-page-nav > p,
  .legal-page-contact {
    display: none;
  }

  .legal-page-nav nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .legal-page-nav nav::-webkit-scrollbar {
    display: none;
  }

  .legal-page-nav nav a {
    flex: 0 0 auto;
    min-height: 44px;
    border: 1px solid #e6e3f2;
    border-radius: 999px;
    background: #fff;
    white-space: nowrap;
  }
}

@media (max-width: 575.98px) {
  .public-utility-page .info-page-main {
    padding-top: 1px;
  }

  .legal-page-layout {
    gap: 10px;
  }

  .legal-page-nav {
    margin-inline: -2px;
  }

  .entity-representation-unavailable__actions {
    display: grid;
  }
}
