/* ACE Default theme: layout, header, menu, footer and builder blocks.
   The --ace-site-* defaults below are overridden by the published Design System
   tokens (frontend/Services/SiteTheme.php). */
:root {
  --ace-site-bg: #ffffff;
  --ace-site-surface: #f5f7fb;
  --ace-site-text: #111827;
  --ace-site-muted: #5b6577;
  --ace-site-border: rgba(17, 24, 39, 0.12);
  --ace-site-primary: #4257ff;
  --ace-site-on-primary: #ffffff;
  --ace-site-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ace-site-width: 1140px;
  --ace-site-gutter: 16px;
  --ace-site-radius: 12px;
  --ace-site-space: 24px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ace-site-bg: #0f1522;
    --ace-site-surface: #172033;
    --ace-site-text: #f3f6fc;
    --ace-site-muted: #a3aec4;
    --ace-site-border: rgba(163, 174, 196, 0.22);
    --ace-site-primary: #7d8cff;
    --ace-site-on-primary: #0f1522;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ace-site { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--ace-site-bg); color: var(--ace-site-text); font: var(--ace-site-text-base, 16px)/1.6 var(--ace-site-font); overflow-x: hidden; }
.ace-site a { color: var(--ace-site-primary); }
.ace-site img { max-width: 100%; height: auto; }

.ace-site-skip { position: absolute; left: var(--ace-site-gutter); top: -48px; padding: 8px 12px; border-radius: 8px; background: var(--ace-site-primary); color: var(--ace-site-on-primary) !important; z-index: 10; }
.ace-site-skip:focus { top: 8px; }
.ace-site-staging { padding: 8px var(--ace-site-gutter); background: var(--ace-site-primary); color: var(--ace-site-on-primary); font-weight: 600; text-align: center; }

.ace-site-container { width: 100%; max-width: var(--ace-site-width); margin: 0 auto; padding: 0 var(--ace-site-gutter); }

/* Header and menu */
.ace-site-header { border-bottom: 1px solid var(--ace-site-border); background: var(--ace-site-bg); position: sticky; top: 0; z-index: 5; }
.ace-site-header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding-block: 12px; box-sizing: border-box; }
.ace-site-brand { color: var(--ace-site-text) !important; font-weight: 800; font-size: 1.15rem; text-decoration: none; }
.ace-site-account { order: 3; padding: 7px 14px; border: 1px solid var(--ace-site-border); border-radius: 8px; color: var(--ace-site-text) !important; font-weight: 600; text-decoration: none; }
.ace-site-account:hover { border-color: var(--ace-site-primary); }
.ace-site-nav-check { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ace-site-nav-toggle { display: none; padding: 8px 12px; border: 1px solid var(--ace-site-border); border-radius: 8px; cursor: pointer; font-weight: 600; }
.ace-site-nav-check:focus-visible + .ace-site-nav-toggle { outline: 2px solid var(--ace-site-primary); outline-offset: 2px; }
.ace-site-menu, .ace-site-submenu { list-style: none; margin: 0; padding: 0; }
/* Stage 1.16b (18 Oct; bug 15): an item's icon (ACE Icons), before its name, in the link's colour. */
.ace-site-menu .ace-site-menu-icon { flex-shrink: 0; margin-right: 0.4em; vertical-align: -0.2em; }
/* Stage 1.16b (18 Oct; bug 16): a group's title, a separator, an item drawn as a button; the first level's icons only when the menu shows them in the bar. */
.ace-site-menu-heading > span { display: block; padding: 8px 0 4px; color: var(--ace-site-muted); font-size: 0.8em; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.ace-site-menu-separator { align-self: stretch; min-width: 1px; min-height: 1px; margin: 4px 0; background: var(--ace-site-border); }
.ace-site-nav a.ace-site-menu-button { padding: 8px 16px; border-radius: 999px; background: var(--ace-site-primary); color: var(--ace-site-on-primary, #fff); }
.ace-site-nav a.ace-site-menu-button:hover { color: var(--ace-site-on-primary, #fff); opacity: 0.92; }
@media (min-width: 768px) { .ace-site-nav .ace-site-menu.no-top-icons > li > a > .ace-site-menu-icon { display: none; } }
.ace-site-nav .ace-site-menu { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.ace-site-nav li { position: relative; }
.ace-site-nav a { display: block; padding: 8px 0; color: var(--ace-site-text); text-decoration: none; font-weight: 600; }
.ace-site-nav a:hover, .ace-site-nav a[aria-current="page"] { color: var(--ace-site-primary); }
.ace-site-nav .ace-site-submenu { display: none; position: absolute; top: 100%; left: -12px; min-width: 200px; padding: 8px 12px; border: 1px solid var(--ace-site-border); border-radius: var(--ace-site-radius); background: var(--ace-site-bg); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12); }
.ace-site-nav li:hover > .ace-site-submenu, .ace-site-nav li:focus-within > .ace-site-submenu { display: block; }

/* Page content built in the builder */
.ace-site-main { flex: 1 0 auto; }
/* Stage 1.4 (E1.4-T10, decision 15): the section padding, the column gap and the headings' font come from the Design
   System (frontend.section_gap, card_gap, font_family_heading), with the values the site always drew as the fallback. */
.ace-site-section { width: 100%; margin: 0 auto; padding: var(--ace-pad, var(--ace-site-section-gap, 48px)) max(var(--ace-site-gutter), var(--ace-pad, 0px)); }
/* Stage 1.4 (E1.4-T11, decision 14): the sidebars (the site's widgets) beside the page, under it on a phone; a header
   and a footer built in the builder keep the theme's band. */
.ace-site-with-sidebars { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; width: 100%; max-width: var(--ace-site-width); margin: 0 auto; padding: 0 var(--ace-site-gutter); }
.ace-site-with-sidebars.has-right { grid-template-columns: minmax(0, 1fr) 300px; }
.ace-site-with-sidebars.has-left { grid-template-columns: 300px minmax(0, 1fr); }
.ace-site-with-sidebars.has-left.has-right { grid-template-columns: 260px minmax(0, 1fr) 260px; }
.ace-site-content { min-width: 0; }
.ace-site-sidebar { min-width: 0; padding: 32px 0; }
.ace-site-header.is-built, .ace-site-footer.is-built { padding: 0; }
/* Stage 1.4 (E1.4-V93): on a phone the content comes first, the sidebars under it (the left one came before the content). */
@media (max-width: 767px) { .ace-site-with-sidebars, .ace-site-with-sidebars.has-left, .ace-site-with-sidebars.has-right, .ace-site-with-sidebars.has-left.has-right { grid-template-columns: minmax(0, 1fr); } .ace-site-with-sidebars > .ace-site-content { order: -1; } .ace-site-sidebar { padding: 0 0 24px; } }
/* Stage 1.4 (E1.4-T11): a phone's own menu (the "Telefon" place) shows only on a phone. */
.ace-site-nav-phone { display: none; }
/* (Stage 1.16e, the review: the menu folds into "Meniu" under 1024 px, so the phone's menu is the folded list's there too.) */
@media (max-width: 1023px) { .ace-site-nav.has-phone-menu .ace-site-nav-wide { display: none; } .ace-site-nav.has-phone-menu .ace-site-nav-phone { display: block; } }
.ace-site-row { --ace-gap: var(--ace-site-card-gap, 24px); display: flex; flex-wrap: nowrap; gap: var(--ace-gap); }
.ace-site :where(h1, h2, h3, h4, h5, h6) { font-family: var(--ace-site-font-heading, inherit); }
.ace-site-column { flex: 0 1 var(--ace-col, 100%); min-width: 0; }
.ace-site-heading { margin: 0 0 16px; line-height: 1.15; letter-spacing: -0.01em; }
.ace-site-text { margin: 0 0 16px; color: var(--ace-site-muted); }
.ace-site-button-wrap { margin: 8px 0 16px; }
.ace-site-button { display: inline-block; padding: 12px 22px; border-radius: 10px; border: 2px solid var(--ace-site-primary); font-weight: 700; text-decoration: none; }
.ace-site-button.is-primary { background: var(--ace-site-primary); color: var(--ace-site-on-primary) !important; }
.ace-site-button.is-secondary { background: var(--ace-site-surface); border-color: var(--ace-site-surface); color: var(--ace-site-text) !important; }
.ace-site-button.is-outline, .ace-site-button.is-ghost { background: transparent; }
.ace-site-button.is-link { border-color: transparent; padding-left: 0; padding-right: 0; }
.ace-site-figure { margin: 0 0 16px; }
.ace-site-image { display: inline-block; }
.ace-site-divider { margin: 16px 0; border: 0; border-top: 1px solid var(--ace-site-border); }
.ace-site-card { height: 100%; margin: 0 0 16px; padding: 22px; border: 1px solid var(--ace-site-border); border-radius: var(--ace-site-radius); background: var(--ace-site-surface); }
.ace-site-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.ace-site-card p { margin: 0; color: var(--ace-site-muted); }
.ace-site-legacy { padding-top: 48px; padding-bottom: 48px; }
.ace-site-message { max-width: 720px; text-align: center; padding-top: 96px; padding-bottom: 96px; }

/* Footer */
.ace-site-footer { margin-top: 48px; border-top: 1px solid var(--ace-site-border); background: var(--ace-site-surface); color: var(--ace-site-muted); font-size: 0.95rem; }
.ace-site-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 24px; padding-bottom: 24px; }
.ace-site-footer p { margin: 0; }
.ace-site-footer-nav .ace-site-menu { display: flex; flex-wrap: wrap; gap: 4px 16px; }
/* The footer lists every menu link on one line, submenus included. */
.ace-site-footer-nav li, .ace-site-footer-nav .ace-site-submenu { display: contents; }
.ace-site-footer-nav a { color: var(--ace-site-muted); text-decoration: none; }

/* Legal pages, the cookie choice and the cookie banner (Stage 9) */
.ace-site-legal { max-width: 820px; }
.ace-site-legal-meta { margin: -8px 0 24px; color: var(--ace-site-muted); font-size: 0.95rem; }
/* Stage 1.16c (DE-FACUT.md 0b.15): "Ciornă pentru testare: textul final va fi validat de un avocat." on the testing legal pages. */
.ace-site-legal-draft { margin: 0 0 24px; padding: 10px 14px; border: 1px solid var(--ace-site-border); border-left: 4px solid var(--ace-site-primary); border-radius: 8px; background: var(--ace-site-surface, var(--ace-site-bg)); font-weight: 600; }
.ace-site-legal-text h2 { margin: 32px 0 8px; font-size: 1.3rem; line-height: 1.3; }
.ace-site-legal-text h3 { margin: 20px 0 6px; font-size: 1.1rem; line-height: 1.3; }
.ace-site-legal-text p, .ace-site-legal-text li { overflow-wrap: anywhere; }
.ace-site-legal-text ul { margin: 0 0 16px; padding-left: 22px; }
.ace-site-legal-choice { margin-top: 32px; padding: 20px; border: 1px solid var(--ace-site-border); border-radius: var(--ace-site-radius); background: var(--ace-site-surface); }
.ace-site-legal-choice h2 { margin: 0 0 8px; font-size: 1.3rem; }
.ace-site-legal-choice fieldset { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.ace-site-legal-choice legend { margin-bottom: 8px; font-weight: 700; }
.ace-site-legal-option { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; }
.ace-site-legal-option input { flex: none; width: 18px; height: 18px; margin-top: 4px; accent-color: var(--ace-site-primary); }
.ace-site-legal-option small { display: block; color: var(--ace-site-muted); }
.ace-site-legal-saved { font-weight: 700; }
.ace-site-legal-actions, .ace-cookie-banner-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ace-cookie-button { padding: 10px 18px; border: 2px solid var(--ace-site-primary); border-radius: 10px; background: var(--ace-site-primary); color: var(--ace-site-on-primary); font: inherit; font-weight: 700; cursor: pointer; }
.ace-cookie-button.is-save { background: var(--ace-site-bg); color: var(--ace-site-text); }
.ace-cookie-button:focus-visible { outline: 3px solid var(--ace-site-text); outline-offset: 2px; }
.ace-cookie-banner { border-bottom: 1px solid var(--ace-site-border); background: var(--ace-site-surface); color: var(--ace-site-text); }
.ace-cookie-banner-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 16px; padding-bottom: 16px; }
.ace-cookie-banner-text { flex: 1 1 420px; min-width: 0; }
.ace-cookie-banner h2 { margin: 0 0 4px; font-size: 1.05rem; }
.ace-cookie-banner p { margin: 0; }
/* Stage 1.16b (18 Oct; Setări website → Cookie): the banner where the owner chose it: a bar at the bottom, a box in a corner, a window in
   the middle over the page. Setări website → Limbi and Contact și rețele: the language selector, the contact data and the networks. */
.ace-cookie-banner.is-bar, .ace-cookie-banner.is-corner, .ace-cookie-banner.is-middle { position: fixed; z-index: 50; border: 1px solid var(--ace-site-border); box-shadow: 0 12px 32px color-mix(in srgb, var(--ace-site-text) 18%, transparent); }
.ace-cookie-banner.is-bar { inset: auto 0 0 0; border-width: 1px 0 0; }
.ace-cookie-banner.is-corner { right: 16px; bottom: 16px; max-width: 420px; border-radius: 12px; }
.ace-cookie-banner.is-middle { top: 50%; left: 50%; width: min(560px, calc(100vw - 32px)); transform: translate(-50%, -50%); border-radius: 16px; }
.ace-cookie-banner.is-corner .ace-cookie-banner-text, .ace-cookie-banner.is-middle .ace-cookie-banner-text { flex-basis: 100%; }
.ace-site-languages ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ace-site-languages a { display: inline-block; padding: 4px 8px; border-radius: 6px; color: var(--ace-site-muted); font-weight: 600; text-decoration: none; }
.ace-site-languages a[aria-current="true"] { color: var(--ace-site-text); background: var(--ace-site-surface); }
.ace-site-contact { display: flex; flex-wrap: wrap; gap: 8px 24px; flex-basis: 100%; }
.ace-site-contact-list, .ace-site-social { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; color: var(--ace-site-muted); }
.ace-site-contact a, .ace-site-social a { color: var(--ace-site-muted); }
/* The contact page's map link (SiteExtras::map), not the Map block, which has the same class and keeps its column's width. */
p.ace-site-map { margin: 16px auto; max-width: 1100px; padding: 0 16px; }
.ace-site-legal-nav .ace-site-menu { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ace-site-legal-nav a { color: var(--ace-site-muted); }

/* Stage 1.16e (round 1 of the theme chat, B14): on a tablet too the menu folds into "Meniu", so the bar keeps one row (the name, the menu,
   the account) whatever the site's name and menu. */
@media (max-width: 1023px) {
  .ace-site-brand { flex: 1 1 auto; }
  .ace-site-nav-toggle { display: inline-block; order: 2; }
  .ace-site-nav { display: none; order: 4; width: 100%; padding-bottom: 12px; }
  .ace-site-nav-check:checked ~ .ace-site-nav { display: block; }
  .ace-site-nav .ace-site-menu { flex-direction: column; gap: 0; }
  .ace-site-nav .ace-site-submenu { display: block; position: static; padding: 0 0 0 16px; border: 0; box-shadow: none; }
}

/* The phone (Stage 1.4, decision 6): under 768 px; the tablet is 768-1024 px, the desktop above. (The menu's fold is the tablet's, above.) */
@media (max-width: 767px) {
  .ace-cookie-button { flex: 1 1 140px; }
  .ace-site-legal-choice { padding: 16px; }
  .ace-site-section { padding: min(var(--ace-pad, 32px), 40px) var(--ace-site-gutter); }
  .ace-site-row { flex-wrap: wrap; }
  .ace-site-column { flex-basis: 100%; }
}
