@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Inter:wght@300;400;600;700&display=swap');

/* =========================
   1) Variabile & bază
   ========================= */
:root {
  --logo-bottom: -120px;
  --logo-right-nudge: -12px;

  --bg: #16323c;
  --panel: #1d3f4be6;
  --panel-soft: #224a58cc;
  --text: #f3f8fa;
  --muted: #c0d1d6;
  --primary: #e2c483;
  --primary-2: #4fb0c6;
  --accent: #7ec69a;
  --danger: #d46a6a;
  --ring: #ffffff26;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(0,0,0,.45);

  --p-min: 1.05rem;
  --p-ideal: 1.15rem;
  --p-max: 1.25rem;
  --p-line: 1.8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
}

body.page-institutii {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto;
  color: var(--text);
  background:
    radial-gradient(1400px 900px at 0% -10%, #205063 0%, transparent 70%),
    radial-gradient(1200px 800px at 120% 20%, #183a45 0%, transparent 65%),
    linear-gradient(180deg, #16323c, #0f242c);
  min-height: 100vh;
  line-height: 1.65;
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================
   2) Header & nav (DESKTOP)
   ========================= */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(15,19,24,.85), rgba(15,19,24,.55));
  border-bottom: 1px solid #ffffff14;
  box-shadow: 0 8px 26px rgba(0,0,0,.35);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 0;
}

header.site-header nav ul {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

header.site-header nav a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 14px;
  transition: .2s ease;
  font-weight: 600;
  font-size: .95rem;
  background: transparent;
  border: 1px solid transparent;
}

header.site-header nav a:hover {
  background: #ffffff10;
  transform: translateY(-2px);
}

header.site-header nav a[aria-current="page"] {
  background: #ffffff12;
  border: 1px solid #ffffff1f;
}

/* CTA */
header.site-header nav a.cta {
  color: #1a1f25;
  background: linear-gradient(90deg, #e2c483, #b8944b);
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(226,196,131,.18),
              0 6px 18px rgba(184,148,75,.15);
}

header.site-header nav a.cta:hover {
  background: linear-gradient(90deg, #f3da9a, #caa24c);
  box-shadow: 0 12px 28px rgba(226,196,131,.25),
              0 8px 20px rgba(184,148,75,.2);
  color: #0e1217;
}

.site-header .brand {
  display: none !important;
}

/* Logo colț (mobil) */
.corner-logo {
  display: none;
}

.corner-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}

/* Toggle */
#nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hamburger {
  display: none;
}

/* =========================
   3) Titlul site-ului sub header
   ========================= */
.site-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 30px auto 20px;
  text-align: center;
}

.site-title img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.45));
}

.site-title span {
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem);
  letter-spacing: .5px;
  background: linear-gradient(90deg, #f3e3b8, #e2c483, #caa24c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 6px rgba(0,0,0,.25);
}

/* =========================
   4) Hero
   ========================= */
.hero {
  padding: 80px 0 30px;
}

.hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(32px, 6vw, 60px);
  line-height: 1.08;
  margin: 0 0 14px;
  letter-spacing: .3px;
  background: linear-gradient(90deg, #f3e3b8, #c9d6e2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 6px 30px rgba(0,0,0,.35);
}

.hero p.lead {
  font-size: clamp(16px, 2.6vw, 20px);
  opacity: .9;
  max-width: 900px;
}

/* =========================
   5) Butoane
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 800;
  color: #1a1f25;
  background: #f5f7f9;
  transition: .2s ease;
  border: 1px solid #ffffff33;
  box-shadow: var(--shadow);
}

.btn:hover {
  transform: translateY(-3px);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid #ffffff33;
}

.btn.ghost:hover {
  background: #ffffff10;
}
/* =========================
   6) Secțiuni & carduri
   ========================= */
.section {
  padding: 70px 0;
}

.section h2 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(26px, 3.4vw, 38px);
  margin: 0 0 12px;
  letter-spacing: .2px;
  color: #e6d6a7;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-soft));
  border: 1px solid #ffffff1f;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(220px 140px at 10% 0%, #e2c4830e, transparent 60%),
    radial-gradient(260px 180px at 90% 120%, #9bb4c90c, transparent 60%);
  filter: blur(8px);
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffff14;
  border: 1px solid #ffffff22;
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .3px;
}

.list {
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.list li {
  margin: 8px 0;
  display: flex;
  gap: 10px;
}

/* Callouts cu fundal imagine */
.callouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.callouts .card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  isolation: isolate;
  color: var(--text);
}

.callouts .card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.45);
}

.callouts .card > * {
  position: relative;
  z-index: 1;
}

.card-health::before {
  background-image: url("images/sanatate.jpg");
}

.card-education::before {
  background-image: url("images/educatie.jpg");
}

.card-environment::before {
  background-image: url("images/mediu.jpg");
}

/* Panel */
.panel {
  background: linear-gradient(180deg, #141b24, #141b24cc);
  border: 1px solid #ffffff20;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

/* =========================
   7) Footer premium
   ========================= */
.footer {
  padding: 0;
  background: transparent;
  border-top: none;
}

.footer-premium {
  padding: 50px 0 30px;
  background: linear-gradient(180deg, rgba(15,19,24,.35), rgba(15,19,24,.85));
  border-top: 1px solid #ffffff14;
  color: var(--text);
  text-align: center;
}

.footer-title {
  margin: 0 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.28rem;
  font-weight: 900;
  letter-spacing: .2px;
  color: var(--primary);
}

.brand-logo-inline {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
  background: #0f1318;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}

.footer-brand {
  margin-bottom: 22px;
}

.footer-brand .mini {
  margin: 2px 0 0;
  opacity: .8;
}

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.footer-nav a {
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  opacity: .85;
  text-decoration: none;
  transition: .2s;
}

.footer-nav a:hover {
  opacity: 1;
  color: var(--primary);
}

.footer a,
.footer a:visited {
  color: var(--text);
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.footer-bottom .contact a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  color: #1a1f25;
  background: linear-gradient(90deg, var(--primary), #caa24c);
  box-shadow: 0 10px 24px rgba(226,196,131,.20);
  transition: .2s ease;
}

.footer-bottom .contact a:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(226,196,131,.28);
}

.footer-bottom .social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  font-weight: 700;
}

.footer-bottom .social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #ffffff12;
  border: 1px solid #ffffff1f;
  opacity: .9;
  transition: .2s ease;
}

.footer-bottom .social a:hover {
  opacity: 1;
  color: #e2c483;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}

.footer-bottom .mini {
  margin-top: 6px;
  opacity: .6;
  font-size: .85rem;
}

/* =========================
   8) Tipografie utilitară
   ========================= */
.section p,
.panel p,
.grid.cards .card p,
.hero .lead,
.subtitle,
.quote {
  font-size: clamp(var(--p-min), 0.9rem + 0.6vw, var(--p-max));
  line-height: var(--p-line);
  letter-spacing: 0.01em;
}

.hero .lead {
  font-weight: 400;
  line-height: 1.85;
}

.subtitle {
  font-weight: 400;
  opacity: .95;
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.2rem);
}

.quote {
  font-style: italic;
  opacity: .95;
}

.grid.cards .card p + p {
  margin-top: .6em;
}

/* =========================
   9) Watermark
   ========================= */
.page-institutii::before {
  content: "ERPmedia";
  position: fixed;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: clamp(6rem, 15vw, 22rem);
  letter-spacing: .06em;
  white-space: nowrap;
  background: linear-gradient(90deg, #e2c483, #4fb0c6, #7ec69a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  opacity: .12;
  pointer-events: none;
  z-index: 0;
  text-shadow: 0 4px 20px rgba(0,0,0,.35);
}

.page-institutii main,
.page-institutii footer {
  position: relative;
  z-index: 1;
}
/* =========================
   HAMBURGER + DRAWER — identic cu style.css
   ========================= */

#nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
  opacity: 0;
  pointer-events: none;
}

.hamburger {
  display: none;
}

/* ---- Mobil & tabletă ---- */
@media (max-width: 980px) {

  header.site-header {
    background: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
  }

  .nav {
    padding: 0 !important;
    min-height: 0;
  }

  /* Buton hamburger „pastilă” */
  .hamburger {
    --bar-w: 24px;
    --bar-h: 2px;
    --gap: 6px;

    position: fixed !important;
    right: 12px;
    top: 12px;
    z-index: 2147483003;
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--panel);
    border: 1px solid rgba(226,196,131,.35);
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  }

  .hamburger:hover {
    transform: translateY(-1px);
  }

  .hamburger:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
  }

  .hamburger::before,
  .hamburger::after,
  .hamburger span {
    content: "";
    display: block;
    width: var(--bar-w);
    height: var(--bar-h);
    background: var(--primary);
    border-radius: 2px;
    transition: transform .28s ease, opacity .2s ease;
    box-shadow: 0 1px 0 rgba(0,0,0,.25);
  }

  .hamburger span {
    margin: var(--gap) 0;
  }

  .hamburger::before {
    transform: translateY(calc(-1 * (var(--gap) + var(--bar-h))));
  }

  .hamburger::after {
    transform: translateY(calc(var(--gap) + var(--bar-h)));
  }

  /* Logo mic opțional, colț stânga */
  .corner-logo {
    display: inline-flex;
    position: fixed;
    left: 12px;
    top: 12px;
    z-index: 2147483003;
    align-items: center;
    justify-content: center;
  }

  /* Drawer opac */
  header.site-header nav {
    position: fixed !important;
    top: 0;
    right: -100% !important;
    bottom: 0;
    left: auto;
    width: min(86vw, 420px);
    height: 100svh;
    min-height: 100vh;
    background: #0f1c22 !important;
    box-shadow: -16px 0 44px rgba(0,0,0,.65);
    padding: calc(env(safe-area-inset-top, 0px) + 76px) 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: right .32s cubic-bezier(.2,.8,.2,1);
    z-index: 2147483001;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  header.site-header nav ul {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  header.site-header nav a {
    display: block;
    padding: 16px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.14);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
  }

  header.site-header nav a:hover {
    background: rgba(255,255,255,.10);
    transform: translateY(-2px);
  }

  header.site-header nav a[aria-current="page"] {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.22);
  }

  header.site-header nav a.cta {
    background: linear-gradient(90deg, #e2c483, #b8944b) !important;
    border: 0 !important;
    color: #1a1f25 !important;
    box-shadow: 0 10px 28px rgba(226,196,131,.18), 0 6px 18px rgba(184,148,75,.15) !important;
  }

  /* Stare deschisă: morph în „X”, overlay, blocare scroll */
  #nav-toggle:checked ~ label.hamburger::before {
    transform: rotate(45deg);
  }

  #nav-toggle:checked ~ label.hamburger span {
    opacity: 0;
    transform: translateX(8px);
  }

  #nav-toggle:checked ~ label.hamburger::after {
    transform: rotate(-45deg);
  }

  #nav-toggle:checked ~ nav {
    right: 0 !important;
  }

  #nav-toggle:checked ~ nav::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: -1;
  }

  body:has(#nav-toggle:checked) {
    overflow: hidden;
    touch-action: none;
  }

  /* Titlul sub meniu (mobil) */
  .site-title {
    margin: 48px auto 16px !important;
    padding-top: 8px;
    text-align: center;
  }

  .site-title img {
    display: none;
  }

  /* Footer-nav ascuns pe mobil */
  .footer-nav {
    display: none !important;
  }
}

/* ---- Fix landscape ---- */
@media (max-width: 980px) and (orientation: landscape) {
  header.site-header nav {
    width: min(78vw, 520px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    height: 100svh;
    min-height: 100vh;
  }
}
/* Evidențiere meniu desktop & mobil pentru pagina curentă */
.nav-group a[aria-current="page"]:not(.cta) {
  color: var(--text);                        /* text alb */
  background: rgba(255,255,255,0.14);        /* fundal subtil */
  border: 1px solid rgba(255,255,255,0.28);  /* contur discret */
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
  font-weight: 700;
}

/* Menține evidențierea și la hover/focus */
.nav-group a[aria-current="page"]:not(.cta):hover,
.nav-group a[aria-current="page"]:not(.cta):focus-visible {
  color: var(--text);
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.32);
  transform: translateY(-2px);
}
