/* ============================================================
   Asociația pentru Identitatea Românească – stil site
   Culori: albastru închis (bază), galben-auriu (accent), roșu (detalii)
   ============================================================ */
:root {
  --blue: #1f3a68;
  --blue-dark: #142848;
  --gold: #e3b23c;
  --gold-dark: #c9992a;
  --red: #b8322f;
  --ink: #1e2430;
  --ink-soft: #5a6270;
  --line: #e2e5ea;
  --bg: #fbfaf7;
  --card: #ffffff;
  --ok-bg: #e8f5e9; --ok-fg: #2e7d32;
  --err-bg: #fdecea; --err-fg: #b3261e;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(20, 40, 72, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Source Sans 3', system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 17px; line-height: 1.6;
}
h1, h2, h3 { font-family: 'Lora', Georgia, serif; color: var(--blue-dark); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2.3rem; }
h2 { font-size: 1.6rem; margin-top: 2rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--blue); }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }

/* ---------- Header ---------- */
.site-header { background: var(--blue-dark); color: #fff; border-bottom: 4px solid var(--gold); }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand-mark { display: flex; width: 34px; height: 24px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.brand-mark i { flex: 1; }
.brand-mark i:nth-child(1) { background: #3b6bd1; }
.brand-mark i:nth-child(2) { background: #f5d547; }
.brand-mark i:nth-child(3) { background: #d64a44; }
.brand-text { font-family: 'Lora', serif; font-weight: 600; font-size: 1.05rem; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a { color: #dfe6f3; text-decoration: none; padding: 8px 12px; border-radius: 6px; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.lang-switch { margin-left: 10px; display: inline-flex; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; overflow: hidden; }
.lang-switch a { padding: 5px 10px; border-radius: 0; font-size: .85rem; }
.lang-switch a.on { background: var(--gold); color: var(--blue-dark); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 48px; text-align: center; }
.hero h1 { font-size: 2.7rem; max-width: 760px; margin: 0 auto .6em; }
.hero p { font-size: 1.2rem; color: var(--ink-soft); max-width: 680px; margin: 0 auto 1.6em; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero-home { padding: 80px 0 56px; position: relative; }
.kicker { display: inline-block; font-size: .85rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 14px; }

/* ---------- Cine suntem ---------- */
.who { display: grid; grid-template-columns: 140px 1fr; gap: 36px; align-items: stretch; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; margin: 16px 0 56px; box-shadow: var(--shadow); }
.who-band { display: flex; border-radius: 8px; overflow: hidden; min-height: 180px; }
.who-band i { flex: 1; }
.who-band i:nth-child(1) { background: #3b6bd1; }
.who-band i:nth-child(2) { background: #f5d547; }
.who-band i:nth-child(3) { background: #d64a44; }
.who-text h2 { margin-top: 0; }
.who-text p { color: var(--ink-soft); font-size: 1.05rem; }
.values { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.values li { padding: 6px 14px; border: 1px solid var(--gold); color: var(--blue-dark); border-radius: 99px; font-weight: 600; font-size: .9rem; background: #fff8e6; }

/* ---------- Activități ---------- */
.activities { text-align: center; margin-bottom: 56px; }
.activities .lead { color: var(--ink-soft); font-size: 1.1rem; max-width: 640px; margin: 0 auto 8px; }
.activities .cards { text-align: left; margin: 28px 0 24px; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ---------- Alătură-te ---------- */
.join { background: var(--blue-dark); color: #dfe6f3; border-radius: var(--radius); padding: 48px 32px; text-align: center; margin-bottom: 24px; border-top: 5px solid var(--gold); }
.join h2 { color: var(--gold); margin-top: 0; }
.join p { max-width: 640px; margin: 0 auto 22px; font-size: 1.05rem; }

/* ---------- Noutăți ---------- */
.home-news { margin: 0 0 56px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.post-list { display: grid; gap: 20px; margin-top: 20px; }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: row; align-items: flex-start; }
.post-thumb { flex: 0 0 120px; width: 120px; height: 160px; margin: 16px 0 16px 16px; border-radius: 6px; overflow: hidden; background: #eef0f4; border: 1px solid var(--line); display: block; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.post-thumb:hover img { transform: scale(1.04); }
.post-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-body h3 { margin: 0; font-size: 1.2rem; }
.post-body h3 a { color: var(--blue-dark); text-decoration: none; }
.post-body h3 a:hover { color: var(--red); }
.post-body p { margin: 0; color: var(--ink-soft); flex: 1; }
.post-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-soft); }
.kind { display: inline-block; padding: 2px 10px; border-radius: 99px; font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.kind-news  { background: #e3efff; color: var(--blue); }
.kind-event { background: #fff3cd; color: #7a5a00; }
.kind-press { background: #fdecea; color: var(--red); }
.kind-auction { background: #e3f3e6; color: #1e6b2e; }
.post-auction { border-left: 5px solid var(--gold); position: relative; }
.post-auction.state-awarded, .post-auction.state-closed, .post-auction.state-noaward, .post-auction.state-cancelled { border-left-color: #c9ced6; }
.state-badge { position: absolute; top: 12px; right: 12px; padding: 4px 12px; border-radius: 99px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: #8a919c; }
.state-active .state-badge { background: #1e8e3e; }
.state-awarded .state-badge { background: var(--red); }
.post-auction .post-body { padding-right: 120px; }
.auction-strip { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .9rem; color: var(--ink-soft); }
.auction-strip strong { color: var(--ink); }
.more { font-weight: 600; text-decoration: none; }
.post-full h1 { margin: 10px 0 18px; }
.post-layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; }
.post-text { font-size: 1.08rem; max-width: 760px; }
.post-poster { margin: 0; position: sticky; top: 20px; }
.post-poster a { display: block; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; cursor: zoom-in; }
.post-poster img { width: 100%; display: block; }
.zoom-hint { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px; background: rgba(20,40,72,.82); color: #fff; font-size: .85rem; font-weight: 600; text-align: center; }
.lightbox { position: fixed; inset: 0; background: rgba(10,16,28,.92); display: flex; align-items: center; justify-content: center; z-index: 1000; cursor: zoom-out; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox-close { position: absolute; top: 14px; right: 20px; color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); border: 0; color: #fff; font-size: 3rem; line-height: 1; width: 56px; height: 80px; border-radius: 8px; cursor: pointer; }
.lb-nav:hover { background: rgba(255,255,255,.25); }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lightbox.single .lb-nav { display: none; }
.lb-counter { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #fff; font-weight: 600; letter-spacing: .05em; }
.protected img { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; pointer-events: auto; }

/* ---------- Galerie ---------- */
.gal-title { margin-top: 40px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.gal-item { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: #eef0f4; border: 1px solid var(--line); cursor: zoom-in; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.gal-item:hover img { transform: scale(1.05); }
.photo-count { font-weight: 600; }
.gal-admin { background: var(--card); border: 1px dashed #c9ced6; border-radius: 8px; padding: 14px 16px; }
.gal-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.gal-admin-item { display: grid; gap: 4px; font-weight: 400; font-size: .85rem; cursor: pointer; }
.gal-admin-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.gal-admin-item input { width: auto; margin-right: 4px; }
@media (max-width: 720px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 6px; } .lb-nav { width: 40px; height: 60px; font-size: 2rem; } }
.post-text p { margin-bottom: 1.1em; }
@media (max-width: 720px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-poster { position: static; max-width: 320px; margin: 0 auto; order: -1; }
  .post-thumb { flex-basis: 84px; width: 84px; height: 112px; margin: 12px 0 12px 12px; }
}

/* ---------- Butoane ---------- */
.btn { display: inline-block; padding: 11px 22px; border-radius: 8px; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem; font-family: inherit; transition: .15s; }
.btn-primary { background: var(--gold); color: var(--blue-dark); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-sm { padding: 6px 14px; font-size: .9rem; }

/* ---------- Carduri ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin: 24px 0 48px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--blue); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 14px; }

/* ---------- Pagină conținut ---------- */
.page { padding: 48px 0 56px; }
.page .lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 760px; }
.list-blocks { display: grid; gap: 18px; margin-top: 28px; }
.block { display: grid; grid-template-columns: 56px 1fr; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.block .num { font-family: 'Lora', serif; font-size: 1.8rem; color: var(--gold-dark); font-weight: 700; line-height: 1; }
.block h3 { margin: 0 0 .3em; }
.block p { margin: 0; color: var(--ink-soft); }

/* ---------- Licitații ---------- */
.auction-list { display: grid; gap: 16px; margin-bottom: 36px; }
.auction { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: var(--radius); padding: 20px 22px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.auction.closed { border-left-color: #b0b6c0; opacity: .92; }
.auction h3 { margin: 0 0 6px; }
.auction .meta { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--ink-soft); font-size: .95rem; }
.auction .meta strong { color: var(--ink); }
.past-list { display: grid; gap: 8px; }
.past-item { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 6px; }
.past-item summary { list-style: none; cursor: pointer; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.past-item summary::-webkit-details-marker { display: none; }
.past-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.past-title { color: var(--red); font-weight: 600; }
.details-btn { pointer-events: none; }
.past-item[open] .details-btn { background: var(--blue); color: #fff; }
.past-body { border-top: 1px solid var(--line); padding: 16px 18px; background: #fbfaf7; }
.past-body dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; }
.past-body dt { color: var(--ink-soft); }
.past-body dd { margin: 0; }
.badge-awarded { background: #e3f3e6; color: #1e6b2e; }
.masked { letter-spacing: .08em; font-family: ui-monospace, Menlo, monospace; }
.file-hint { font-weight: 400; font-size: .85rem; color: var(--ink-soft); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.badge-open { background: #e3efff; color: var(--blue); }
.badge-closed { background: #ececec; color: #555; }
.price { color: var(--red); font-weight: 700; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; margin-top: 22px; }
.desc { white-space: pre-line; }
.info-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.info-box dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; }
.info-box dt { color: var(--ink-soft); }
.info-box dd { margin: 0; font-weight: 600; }
.countdown { font-family: 'Lora', serif; font-size: 1.5rem; color: var(--blue-dark); }

table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f3f5f8; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
tr:last-child td { border-bottom: 0; }
tr.winner td { background: #fff8e1; }
tr.winner td:first-child::before { content: '★ '; color: var(--gold-dark); }

/* ---------- Formulare ---------- */
form.form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 14px; }
form.form label { display: grid; gap: 4px; font-weight: 600; font-size: .95rem; }
form.form input, form.form textarea, form.form select { font: inherit; padding: 10px 12px; border: 1px solid #c9ced6; border-radius: 6px; width: 100%; background: #fff; }
form.form input:focus, form.form textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
form.form textarea { min-height: 90px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.alert-ok { background: var(--ok-bg); color: var(--ok-fg); }
.alert-err { background: var(--err-bg); color: var(--err-fg); }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-dark); color: #cfd8e8; margin-top: 40px; border-top: 4px solid var(--gold); }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding: 36px 20px; }
.site-footer h3 { color: var(--gold); }
.site-footer a { color: #fff; }
.site-footer .muted { color: #8d9bb3; font-size: .85rem; }
.footer-right { text-align: right; font-size: .9rem; }

/* ---------- Admin ---------- */
.admin-bar { background: var(--red); color: #fff; padding: 8px 16px; font-size: .9rem; border-radius: 0 0 8px 8px; }
.admin-bar .wrap { display: flex; justify-content: space-between; align-items: center; padding: 0; flex-wrap: wrap; gap: 8px; }
.admin-bar a { color: #fff; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0 24px; }
.login-box { max-width: 380px; margin: 60px auto; }

@media (max-width: 720px) {
  h1 { font-size: 1.9rem; } .hero h1 { font-size: 2.1rem; }
  .auction, .detail-grid, .row2 { grid-template-columns: 1fr; }
  .footer-right { text-align: left; }
  .block { grid-template-columns: 1fr; }
  .who { grid-template-columns: 1fr; padding: 24px; }
  .who-band { min-height: 14px; height: 14px; }
  .hero-home { padding: 48px 0 36px; }
  table { display: block; overflow-x: auto; }
}

/* Fișa tehnică / documente la achiziții */
.docs-box { margin-top: 22px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--radius); padding: 18px 20px; }
.docs-box h3 { margin: 0 0 4px; }
.doc-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.doc-link { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; color: inherit; }
.doc-link:hover { border-color: var(--blue); }
.doc-ico { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 6px 7px; border-radius: 6px; background: var(--blue); color: #fff; }
.doc-name { font-weight: 600; word-break: break-word; }
.doc-size { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 600px) { .doc-link { grid-template-columns: auto 1fr; } .doc-size { grid-column: 2; } }

/* Admin – filtru oferte */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 18px; }
.filter-bar select, .filter-bar input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.filter-bar input[type=search] { flex: 1; min-width: 200px; }

/* Admin – oferta în stil email */
.mail-page { max-width: 900px; margin-left: auto; margin-right: auto; }
.mail-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.mail-nav-right { display: flex; align-items: center; gap: 8px; }
.edit-link { margin-left: 14px; text-decoration: none; border-bottom: 1px dotted; }
.mail { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.05); }
.mail-top { padding: 22px 26px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.mail-top h1 { font-size: 22px; margin: 0 0 12px; }
.mail-hdr { display: grid; grid-template-columns: 80px 1fr; gap: 6px 14px; font-size: 15px; margin: 0; }
.mail-hdr dt { color: var(--ink-soft); } .mail-hdr dd { margin: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 17px; margin-right: 10px; vertical-align: middle; }
.badge-chan { background: #eef2f8; color: var(--blue); }
.mail-body { padding: 24px 26px; font-size: 16px; line-height: 1.6; }
.mail-text p { margin: 0 0 12px; }
.price-big { display: inline-block; background: var(--ok-bg); color: var(--ok-fg); font-weight: 700; font-size: 22px; padding: 8px 16px; border-radius: 8px; margin: 0 0 16px; }
.price-none { background: #f1f2f4; color: var(--ink-soft); font-size: 15px; font-weight: 600; }
.attach { margin: 20px 0 0; padding: 14px; border: 1px dashed var(--line); border-radius: 8px; display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.attach:hover { border-color: var(--blue); }
.attach .ico { background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 6px 7px; border-radius: 6px; }
.note-priv { margin: 0 26px 20px; background: #fff8e1; border-left: 4px solid var(--gold); padding: 10px 14px; border-radius: 6px; font-size: 14px; }
.mail-foot { padding: 14px 26px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: var(--bg); }
.print-only { display: none; }
@media (max-width: 600px) { .mail-hdr { grid-template-columns: 1fr; gap: 2px; } .mail-hdr dt { margin-top: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; } }
@media print {
  .site-header, .site-footer, .admin-bar, .no-print { display: none !important; }
  .print-only { display: block; margin-top: 14px; }
  body { background: #fff; } .mail { box-shadow: none; border-color: #999; } .mail-top, .mail-foot { background: #fff; }
  .attach { border-style: solid; } .price-big { border: 1px solid #999; background: #fff; color: #000; }
}

.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .row3 { grid-template-columns: 1fr; } }
.doc-lang { font-size: 11px; font-weight: 700; color: var(--ink-soft); margin-left: 6px; }
