/* ASTR Cluj – visual language taken from astr.ro (cream banner, Montserrat/Open Sans,
   blue menu, steel-blue gear tiles, dark footer). Mobile-first. */
:root {
  --blue: #1e73be;
  --blue-dark: #155a96;
  --steel: #4c80ab;
  --sky: #76aed6;
  --cream: #fcf4d2;
  --red: #e2231a;
  --orange: #e8771e;
  --ink: #333;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --grey: #efefef;
  --footer: #323232;
  --radius: 4px;
  --head: "Montserrat", "Segoe UI", Arial, sans-serif;
  --body: "Open Sans", "Segoe UI", Arial, sans-serif;
  --topbar-h: 60px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--topbar-h) + 12px); }
body { margin: 0; font: 15px/1.65 var(--body); color: var(--ink); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
h1, h2, h3 { font-family: var(--head); color: var(--ink); line-height: 1.25; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 200; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

/* ---------- top bar & menu */
.topbar { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 6px rgba(0,0,0,.05); }
.topbar-inner { display: flex; align-items: center; gap: 16px; height: var(--topbar-h); padding: 0 16px; max-width: 1400px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 600 16px var(--head); white-space: nowrap; }
.brand b { color: var(--red); font-weight: 700; }
.nav-toggle { margin-left: auto; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.bars, .bars::before, .bars::after { display: block; width: 24px; height: 2px; background: var(--blue); border-radius: 2px; transition: transform .2s, opacity .2s; position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -7px; } .bars::after { top: 7px; }
.nav-open .bars { background: transparent; }
.nav-open .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .bars::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav { position: fixed; inset: var(--topbar-h) 0 auto 0; max-height: calc(100vh - var(--topbar-h)); overflow-y: auto; background: #fff; border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .2s; box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.nav-open .site-nav { transform: none; opacity: 1; visibility: visible; }
.site-nav ul { list-style: none; margin: 0; padding: 8px 0; }
.site-nav a { display: block; padding: 12px 22px; font: 700 14px var(--head); color: var(--blue); text-decoration: none; border-left: 3px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: #f5f9fd; border-left-color: var(--blue); }
.site-nav .ext a::after { content: " ↗"; font-weight: 500; opacity: .6; }

@media (min-width: 1180px) {
  .nav-toggle { display: none; }
  .site-nav { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: 0; margin-left: auto; overflow: visible; max-height: none; background: none; }
  .site-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; padding: 0; }
  .site-nav a { padding: 8px 9px; font-size: 13px; border-left: 0; border-bottom: 2px solid transparent; }
  .site-nav a:hover, .site-nav a[aria-current="page"] { background: none; border-bottom-color: var(--blue); }
  .site-nav .ext a::after { content: ""; }
}

/* ---------- banner (as astr.ro): logo-600.png already contains sigla + title */
.banner { background: var(--cream); border-bottom: 1px solid #efe6bd; text-align: center; padding: 22px 16px 18px; }
.banner-inner { display: inline-block; }
.banner-logo { width: min(100%, 420px); height: auto; margin: 0 auto; }
.branch { margin: 14px 0 0; font: 600 15px/1.35 var(--head); color: #555; }
.branch span { display: inline-block; margin-top: 2px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
@media (min-width: 700px) {
  .banner { padding: 30px 16px 22px; }
  .banner-logo { width: 460px; }
  .branch { font-size: 18px; }
}
.brand-logo { width: 40px; height: 40px; flex: none; border-radius: 50%; object-fit: cover; }
.brand-logo.crop { object-position: left center; }
.people-title { margin: 0 0 4px; font-size: 16px; }

/* ---------- main */
main { max-width: 900px; margin: 0 auto; padding: 0 18px 56px; }
main.wide { max-width: 1200px; }
.page-head { text-align: center; padding: 36px 0 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 0; font-size: 26px; font-weight: 600; }
.page-lead { margin: 8px 0 0; color: var(--muted); }
@media (min-width: 700px) { .page-head h1 { font-size: 34px; } }
.page-body h2 { font-size: 20px; font-weight: 600; margin: 34px 0 14px; }
.lead { font-size: 19px; line-height: 1.6; color: var(--steel); font-family: var(--head); font-weight: 600; text-align: center; max-width: 720px; margin: 10px auto; }
.muted { color: var(--muted); text-align: center; font-style: italic; }
.center { text-align: center; }

.btn, .btn-outline { display: inline-block; padding: 9px 18px; border-radius: var(--radius); font: 600 13px var(--head); text-decoration: none; margin: 4px; }
.btn { background: var(--blue); color: #fff; }
.btn:hover { background: var(--blue-dark); color: #fff; }
.btn-outline { border: 1.5px solid var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }

/* ---------- home */
.home main { padding-top: 0; }
.band-grey { background: var(--grey); margin: 0 calc(50% - 50vw); padding: 36px 18px; }
.tiles { max-width: 1000px; margin: 0 auto; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.gear-tile { position: relative; display: flex; align-items: center; justify-content: flex-end; min-height: 120px; padding: 0 26px; background: var(--steel) url("../img/gears.svg") center / cover; color: #fff; text-decoration: none; font: 500 22px var(--head); border-radius: 2px; overflow: hidden; transition: filter .2s, transform .2s; }
.gear-tile span { text-shadow: 0 1px 8px rgba(20,50,80,.6); background: rgba(60,105,145,.55); padding: 2px 10px; border-radius: 2px; }
.gear-tile:hover { filter: brightness(1.08); transform: translateY(-2px); color: #fff; }
@media (min-width: 700px) { .gear-tile { min-height: 150px; } }
.mission { text-align: center; color: var(--sky); font: 700 18px/1.5 var(--head); max-width: 820px; margin: 30px auto; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.home-section { margin: 40px 0; }
.section-title { text-align: center; font-size: 22px; font-weight: 600; margin: 0 0 22px; }
.utcn { margin: 50px 0 0; position: relative; }
.utcn img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 2px; }
.utcn figcaption { text-align: center; color: var(--muted); font-size: 13px; padding-top: 8px; }

/* ---------- member cards */
.mgrid { list-style: none; padding: 0; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.mgrid > li { flex: 0 0 calc(50% - 8px); max-width: 170px; }
@media (min-width: 600px) { .mgrid > li { flex-basis: 160px; } }
.mgrid.leaders > li { max-width: 200px; }
@media (min-width: 600px) { .mgrid.leaders > li { flex-basis: 190px; } }
.mgroup.is-birou { background: var(--cream); margin: 26px calc(50% - 50vw) 0; padding: 4px 18px 30px; border-top: 1px solid #efe6bd; border-bottom: 1px solid #efe6bd; }
.mgroup.is-birou h2 { border-bottom-color: #e8dca8; max-width: 1164px; margin-left: auto; margin-right: auto; }
.mgroup.is-birou .mrole { color: var(--red); font-weight: 600; }
.mrole.is-lead { color: var(--red); font-weight: 600; }
.mcard { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; width: 100%; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-align: center; transition: box-shadow .2s, transform .2s; }
.mcard:hover, .mcard:focus-visible { box-shadow: 0 6px 18px rgba(30,115,190,.18); transform: translateY(-2px); }
.mcard:focus-visible { outline: 3px solid var(--sky); }
.mphoto { display: block; aspect-ratio: 4 / 5; background: #f3f3f3; overflow: hidden; }
.mphoto img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.mname { display: block; padding: 10px 8px 2px; font: 700 13px/1.3 var(--head); color: var(--ink); }
.mrole { display: block; padding: 0 8px 12px; font-size: 12.5px; color: var(--steel); }
.is-deceased .mphoto img { filter: grayscale(1); }
.cross { color: var(--muted); font-weight: 400; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 10px; }
.chips a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; font: 600 13px var(--head); text-decoration: none; color: var(--blue); background: #fff; }
.chips a span { color: var(--muted); font-weight: 500; margin-left: 4px; }
.chips a:hover { border-color: var(--blue); }
.mgroup h2, .mandate h2 { text-align: center; margin: 44px 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.badge { display: inline-block; vertical-align: middle; font: 600 11px var(--head); text-transform: uppercase; letter-spacing: .06em; background: var(--cream); color: #8a6d00; padding: 3px 8px; border-radius: 99px; margin-left: 6px; }

/* ---------- CV dialog */
.cv-dialog, .img-dialog { border: 0; border-radius: 6px; padding: 0; max-width: min(640px, 94vw); width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.cv-dialog::backdrop, .img-dialog::backdrop { background: rgba(20,30,45,.6); }
.cv-close { position: absolute; top: 6px; right: 8px; width: 40px; height: 40px; border: 0; background: rgba(255,255,255,.9); border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; color: var(--ink); z-index: 2; }
.cv-body { padding: 26px 24px 22px; }
.cv-head { display: flex; gap: 18px; align-items: center; padding-right: 30px; }
.cv-head img { width: 96px; height: 120px; object-fit: cover; object-position: top; border-radius: var(--radius); flex: none; }
.cv-head h2 { margin: 0; font-size: 18px; }
.cv-role { margin: 4px 0 0; color: var(--steel); font-weight: 600; }
.cv-body h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 6px; }
.cv-body ul { margin: 0; padding-left: 20px; }
.cv-links { margin: 20px 0 0; }
.img-dialog { max-width: min(1100px, 96vw); background: #111; }
.img-dialog img { max-height: 88vh; margin: 0 auto; }

/* ---------- secții */
.sectii { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .sectii { grid-template-columns: 1fr 1fr; } }
.sectie { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.sectie header { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: linear-gradient(90deg, var(--steel) 55%, rgba(76,128,171,.85)), var(--steel) url("../img/gears.svg") right center / 420px auto no-repeat; color: #fff; }
.sectie h2 { margin: 0; font-size: 17px; color: #fff; font-weight: 600; }
.sectie .nr { flex: none; display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 99px; background: #fff; color: var(--steel); font: 700 14px var(--head); }
.sectie ul { list-style: none; margin: 0; padding: 8px 0; }
.sectie li { padding: 7px 18px; border-bottom: 1px solid #f2f2f2; font-size: 14px; }
.sectie li:last-child { border-bottom: 0; }
.sectie li.deceased, .sectie li.deceased .linkish { color: var(--muted); font-style: italic; }
.linkish { all: unset; cursor: pointer; color: var(--ink); }
.linkish:hover, .linkish:focus-visible { color: var(--blue); text-decoration: underline; }

/* ---------- events */
.events { display: grid; gap: 18px; }
.events.compact { grid-template-columns: 1fr; }
@media (min-width: 800px) { .events.compact { grid-template-columns: repeat(3, 1fr); } }
.event { border: 1px solid var(--line); border-left: 4px solid var(--steel); border-radius: var(--radius); padding: 18px 20px; background: #fff; }
.event-date { margin: 0 0 4px; font: 700 12px var(--head); text-transform: uppercase; letter-spacing: .06em; color: var(--orange); }
.event h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.event p { margin: 0 0 10px; }
.docs { display: flex; flex-wrap: wrap; gap: 8px; }
.doc { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: #f3f8fc; border: 1px solid #d8e7f3; border-radius: var(--radius); font-size: 13px; text-decoration: none; }
.doc::before { content: "📄"; font-size: 12px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.thumbs img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }

/* ---------- istoric */
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; border-left: 2px solid var(--sky); }
.timeline li { position: relative; padding: 0 0 22px 24px; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--steel); }
.timeline .year { font: 700 16px var(--head); color: var(--steel); }
.timeline p { margin: 2px 0 0; }

/* ---------- statut / lists */
.statut p { margin: 0 0 12px; }
.statut strong { font-family: var(--head); color: var(--steel); }
.statut .note { padding-left: 14px; border-left: 3px solid var(--cream); color: #555; }
.doc-list { list-style: none; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.doc-list a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-weight: 600; }
.doc-list a::before { content: "📄 "; }
.doc-list.ext a::before { content: "↗ "; }
.doc-list a:hover { border-color: var(--blue); background: #f5f9fd; }

/* ---------- contact */
.contact-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .contact-grid { grid-template-columns: 1fr 1.2fr; } }
.contact-card { background: var(--cream); padding: 22px; border-radius: var(--radius); }
.contact-card h2 { margin-top: 0; font-size: 18px; }
.contact-card address { font-style: normal; font-size: 16px; margin-bottom: 10px; }
.person { display: flex; flex-direction: column; padding: 14px 0; border-bottom: 1px solid var(--line); }
.person strong { font-family: var(--head); }
.person span { color: var(--steel); font-size: 14px; margin-bottom: 4px; }

/* ---------- footer */
.site-footer { background: var(--footer); color: #ddd; font-size: 14px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 40px 18px 26px; display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: repeat(3, 1fr); } }
.site-footer h2 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 12px; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer address { font-style: normal; }
.sub-footer { border-top: 1px solid #444; text-align: center; padding: 14px 18px; font-size: 12.5px; color: #aaa; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .topbar, .site-footer, .nav-toggle { display: none; } .banner { background: none; } }

.map { margin-top: 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map iframe { display: block; width: 100%; height: 380px; border: 0; }
@media (max-width: 600px) { .map iframe { height: 280px; } }
