/* TRIVIO + E-Comm 360 Lab — shared styles. Colours per brandbook v1.1 and spec §7. */
:root {
  --base: #01066B;      /* TRIVIO bleumarin */
  --accent: #D60085;    /* TRIVIO magenta */
  --accent-text: #fff;
  --light: #F1F2F7;
  --muted: #5B5F77;
  --line: #E4E6EF;
  --max: 1160px;
}
body.ecomm {
  --base: #15173D;      /* E-Comm albastru-închis */
  --accent: #F2521B;    /* E-Comm portocaliu */
  --accent-text: #15173D; /* spec: orange button with dark text */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.55 Inter, Arial, sans-serif; color: var(--base); background: #fff; }
h1, h2, h3, .brand-font { font-family: "Space Grotesk", Arial, sans-serif; font-weight: 700; line-height: 1.15; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Buttons: fully rounded (spec §7) */
.btn { display: inline-block; padding: 11px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; border: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-base { background: var(--base); color: #fff; }
.btn-outline { border-color: var(--base); color: var(--base); background: transparent; }

/* E-Comm top band */
.topband { background: var(--light); font-size: 13px; color: var(--muted); }
.topband .wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; }
.topband a { color: var(--base); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.logo { flex: none; display: flex; align-items: center; }
.logo img { height: 44px; width: auto; }
body.ecomm .logo img { width: 160px; height: auto; } /* brandbook: full logo ≥160 px */
.nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav > a, .nav summary { font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; }
.nav details { position: relative; }
.nav summary { list-style: none; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after { content: " ▾"; font-size: 11px; }
.nav details ul { position: absolute; top: calc(100% + 12px); left: -12px; margin: 0; padding: 8px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px rgba(21, 23, 61, .12); min-width: 260px; }
.nav details ul a { display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none; }
.nav details ul a:hover { background: var(--light); }
.search { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; text-decoration: none; }
.search:hover { background: var(--light); }
.menu-toggle { display: none; margin-left: auto; background: none; border: 2px solid var(--base); color: var(--base); border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; }

/* Sub-bar for "Magazinul tău" / "Învață cu noi" pages */
.subbar { background: #fff; border-bottom: 1px solid var(--line); font-size: 14px; }
.subbar .wrap { display: flex; gap: 22px; align-items: center; min-height: 46px; overflow-x: auto; }
.subbar strong { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.subbar a { text-decoration: none; white-space: nowrap; }
.subbar a[aria-current="page"] { font-weight: 600; border-bottom: 2px solid var(--accent); }

/* Hero (texts from the mockup) */
.hero { padding: 72px 0; }
.hero .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); margin: 0 0 16px; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 560px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
body.ecomm .hero { background: var(--base); color: #fff; position: relative; overflow: hidden; }
body.ecomm .hero .tagline { font-family: "Space Grotesk", Arial, sans-serif; font-weight: 500; font-size: clamp(22px, 3vw, 30px); margin: 0 0 28px; }
body.ecomm .hero .bg-e { position: absolute; right: -60px; top: -40px; width: 420px; opacity: .9; pointer-events: none; }
.placeholder { border: 1.5px dashed #b7b9d6; border-radius: 18px; background: var(--light); color: var(--muted); display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; min-height: 240px; font-size: 14px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }

/* Partner row (brandbook p.12: TRIVIO, ASEM, "Cu sprijinul:" + funders band, same height) */
.partners { border-top: 1px solid var(--line); padding: 36px 0; }
.partners .label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.partner-row { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.partner-row img { height: 52px; width: auto; }
.partner-row .support { font-size: 14px; color: var(--muted); }
.partners .funding { margin: 18px 0 0; font-size: 14px; color: var(--muted); max-width: 760px; }

/* Footer */
.site-footer { background: var(--base); color: #fff; padding: 56px 0 24px; font-size: 15px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
body.trivio .footer-grid { grid-template-columns: 1.2fr 1fr 1.2fr; }
.site-footer h2 { font-size: 16px; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 8px; }
.site-footer li a { text-decoration: none; opacity: .9; }
.site-footer li a:hover { text-decoration: underline; opacity: 1; }
.site-footer .muted { opacity: .75; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .18); margin-top: 40px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.footer-logo { width: 160px; margin-bottom: 16px; }
.subscribe { display: flex; gap: 8px; flex-wrap: wrap; }
.subscribe input { flex: 1 1 180px; min-width: 0; padding: 11px 16px; border-radius: 999px; border: 0; font: inherit; }
.subscribe .consent { flex-basis: 100%; font-size: 13px; opacity: .85; display: flex; gap: 8px; align-items: flex-start; }

/* Phone: 390 px, no sideways scroll; "Verifică-ți magazinul" stays visible (spec §10) */
@media (max-width: 960px) {
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; }
  .site-header.open .nav { display: flex; }
  .nav > a, .nav summary { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav details ul { position: static; box-shadow: none; border: 0; padding: 0 0 8px 12px; min-width: 0; }
  .nav .btn-header { display: none; }
  .header-cta { margin-left: auto; }
  .header-cta + .menu-toggle { margin-left: 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .footer-grid, body.trivio .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 961px) { .header-cta { display: none; } }
@media (max-width: 520px) {
  body.ecomm .logo img { width: 44px; } /* brandbook: under 160 px use the pictogram */
  .site-header .wrap { gap: 10px; }
  .header-cta { padding: 9px 14px; font-size: 14px; }
  .footer-grid, body.trivio .footer-grid { grid-template-columns: 1fr; }
  .partner-row { gap: 20px; }
  .partner-row img { height: 40px; }
  .topband .wrap { font-size: 12px; }
}