/* PBE România — Hub aplicații (hub.php, app.php), oct. 2026
   Același sistem vizual ca homepage-ul (home.css): bleumarin, auriu, Bricolage + Source Sans. */

:root {
  --ink: #10233f;
  --ink-2: #1b3760;
  --gold: #f2b705;
  --paper: #f3f6fa;
  --white: #ffffff;
  --text: #26324a;
  --muted: #5b6577;
  --line: #d9e1ec;
  --green: #1d7a46;
  --orange: #b65c00;
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --wrap: 1140px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
h1, h2, h3 { font-family: var(--f-display); color: var(--ink); margin: 0; line-height: 1.1; letter-spacing: -0.015em; }

/* ── Bară de sus ─────────────────────────────── */
.topbar { background: var(--ink); color: var(--white); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.topbar .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); font-family: var(--f-display); font-weight: 700; }
.topbar .brand img { width: 56px; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.topbar nav a { color: var(--white); text-decoration: none; font-weight: 600; padding: 8px 14px; border-radius: 999px; }
.topbar nav a:hover { background: rgba(255,255,255,.12); }
.topbar nav a.on { background: rgba(255,255,255,.14); }
@media (max-width: 560px) {
  .topbar .brand span { display: none; }
  .topbar .brand img { width: 48px; }
  .topbar nav a { padding: 8px 10px; }
}

/* ── Intro hub ───────────────────────────────── */
.intro { background: var(--ink); color: rgba(255,255,255,.85); padding: 28px 0 56px; }
.intro h1 { color: var(--white); font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; margin-bottom: 12px; }
.intro p { max-width: 60ch; margin: 0; font-size: 1.15rem; }

/* ── Grila de aplicații ──────────────────────── */
.apps { margin-top: -32px; padding-bottom: 56px; }
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.app-tile {
  display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--line); text-decoration: none; color: inherit; overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.app-tile:hover { border-color: #b8c6d8; box-shadow: 0 10px 30px rgba(16,35,63,.10); }
.tile-shots { display: flex; gap: 8px; padding: 14px 14px 0; height: 190px; overflow: hidden; background: linear-gradient(180deg, var(--paper), var(--white)); }
.tile-shots img { height: 100%; width: auto; border-radius: 10px; border: 1px solid var(--line); object-fit: cover; }
.tile-shots.empty { align-items: center; justify-content: center; color: var(--muted); font-size: .95rem; }
.tile-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tile-head { display: flex; gap: 14px; align-items: center; }
.tile-head h2 { font-size: 1.35rem; }
.tile-head .cat { color: var(--muted); font-size: .95rem; }
.tile-tagline { margin: 0; color: var(--text); }
.tile-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.app-icon { border-radius: 22%; flex: none; object-fit: cover; box-shadow: 0 4px 12px rgba(16,35,63,.15); }
.app-icon-emoji { display: inline-flex; align-items: center; justify-content: center; background: var(--accent, var(--ink)); color: #fff; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.pill.soon { color: var(--muted); border-style: dashed; background: transparent; }
.st-beta { background: #fff1de; border-color: #f3cf9e; color: var(--orange); }
.st-active { background: #e2f4e9; border-color: #b3dcc3; color: var(--green); }
.st-dev { color: var(--muted); }
.st-paid { background: #ece6ff; border-color: #cfc2f5; color: #5b3fb4; }

/* ── Resurse ─────────────────────────────────── */
.resources { padding: 8px 0 80px; }
.res-intro { text-align: center; max-width: 62ch; margin: 0 auto 28px; }
.res-intro h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); font-weight: 800; margin-bottom: 8px; }
.res-intro p { margin: 0; color: var(--muted); font-size: 1.1rem; }
.res-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.res {
  --accent: var(--ink);
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: inherit; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.res::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent); z-index: 1; }
.res:hover { border-color: #b8c6d8; box-shadow: 0 14px 34px rgba(16,35,63,.12); transform: translateY(-2px); }
.res-cover { aspect-ratio: 16 / 9; overflow: hidden; background: var(--accent); }
.res-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .4s ease; }
.res:hover .res-cover img { transform: scale(1.03); }
.res-body { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 22px; flex: 1; }
.res-head { display: flex; align-items: center; gap: 14px; }
.res-ic { flex: none; width: 52px; height: 52px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; background: color-mix(in srgb, var(--accent) 12%, white); }
.res-head h3 { font-size: 1.3rem; line-height: 1.15; }
.res-sub { color: var(--muted); font-size: .98rem; }
.res-badge { margin-left: auto; align-self: flex-start; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, white); border: 1px solid color-mix(in srgb, var(--accent) 30%, white); white-space: nowrap; }
.res-desc { margin: 0; color: var(--text); }
.res-feat { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.res-feat li { position: relative; padding-left: 26px; color: var(--text); font-size: .98rem; line-height: 1.45; }
.res-feat li::before { content: ""; position: absolute; left: 2px; top: .35em; width: 14px; height: 14px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, white); box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--accent) 16%, white), inset 0 0 0 7px var(--accent); }
.res-feat strong { color: var(--ink); }
.res-cta { margin-top: auto; padding-top: 6px; font-weight: 700; color: var(--accent); font-family: var(--f-display); display: inline-flex; gap: 6px; align-items: center; }
.res-cta span { transition: transform .2s ease; }
.res:hover .res-cta span { transform: translateX(4px); }

/* card mare: imagine în stânga, text în dreapta, pe toată lățimea */
.res-feature { grid-column: 1 / -1; flex-direction: row; }
.res-feature .res-cover { flex: 0 0 52%; aspect-ratio: auto; min-height: 340px; }
.res-feature .res-body { padding: 28px 30px; justify-content: center; }
.res-feature .res-head h3 { font-size: 1.6rem; }
.res-feature .res-desc { font-size: 1.08rem; }
/* compact: fără imagine, mai scund */
.res-compact .res-body { padding-top: 22px; }
/* pe desktop, un card cu imagine ocupă două rânduri, iar cele compacte se așază câte două alături */
@media (min-width: 861px) {
  .res-grid { grid-auto-flow: row dense; }
  .res-card { grid-row: span 2; }
}
.res-compact .res-feat { grid-template-columns: 1fr; }

@media (max-width: 860px) {
  .res-grid { grid-template-columns: 1fr; }
  .res-feature { flex-direction: column; }
  .res-feature .res-cover { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
  .res-feature .res-body { padding: 20px 22px 22px; }
}

/* ── Pagina aplicației ───────────────────────── */
.app-hero { background: var(--white); border-bottom: 1px solid var(--line); padding: 32px 0 28px; }
.app-hero .wrap { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.app-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; }
.app-hero .tagline { font-size: 1.2rem; margin: 6px 0 12px; color: var(--text); }
.app-hero .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.downloads { display: flex; flex-wrap: wrap; gap: 12px; }
.dl {
  display: inline-flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 8px 22px;
  border-radius: 14px; background: var(--ink); color: var(--white); text-decoration: none; border: 2px solid var(--ink);
}
.dl:hover { background: var(--ink-2); }
.dl b { font-family: var(--f-display); font-size: 1.05rem; }
.dl small { opacity: .8; font-size: .85rem; }
.dl.alt { background: var(--white); color: var(--ink); }
.dl.alt:hover { background: var(--paper); }
.dl.off { background: transparent; color: var(--muted); border: 2px dashed var(--line); cursor: default; }
.dl-note { margin: 12px 0 0; color: var(--muted); font-size: .95rem; max-width: 70ch; }
@media (max-width: 640px) {
  .app-hero .wrap { grid-template-columns: 1fr; }
  .dl { flex: 1 1 100%; }
}

.shots { padding: 28px 0 8px; }
.shots-row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
.shots-row button { flex: none; padding: 0; border: 0; background: none; cursor: zoom-in; scroll-snap-align: start; border-radius: 14px; }
.shots-row img { height: 420px; width: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--white); }
.shots-row.desktop img { height: 300px; }
@media (max-width: 640px) { .shots-row img { height: 360px; } .shots-row.desktop img { height: 200px; } }
.shots-empty { color: var(--muted); padding: 18px 0; }

.app-body { padding: 24px 0 72px; }
.app-body .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .app-body .wrap { grid-template-columns: 1fr; } }
.block { margin-bottom: 36px; }
.block h2 { font-size: 1.5rem; margin-bottom: 12px; }
.prose p { margin: 0 0 1em; max-width: 70ch; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.features li { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: 12px 14px; color: var(--ink); font-weight: 600; }
.changelog { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.changelog .ver { color: var(--muted); font-size: .95rem; margin-bottom: 8px; }
details.history { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; }
details.history summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--ink); }
.history-item { border-top: 1px solid var(--line); padding: 14px 0; }
.history-item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.history-item .when { color: var(--muted); font-size: .9rem; }

.side { position: sticky; top: 16px; }
.info { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 6px 20px; margin-bottom: 20px; }
.info div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.info div:last-child { border-bottom: 0; }
.info dt { color: var(--muted); }
.info dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }
.howto { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 20px; }
.howto h3 { font-size: 1.1rem; margin-bottom: 8px; }
.howto ol { margin: 0; padding-left: 1.2em; }
.howto li { margin-bottom: 6px; }

/* ── Lightbox ────────────────────────────────── */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
dialog.lightbox::backdrop { background: rgba(8, 17, 32, .88); }
dialog.lightbox img { max-width: 96vw; max-height: 88vh; width: auto; border-radius: 12px; }
dialog.lightbox .nav { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
dialog.lightbox button { background: var(--white); color: var(--ink); border: 0; border-radius: 999px; padding: 10px 18px; font: 600 1rem var(--f-body); cursor: pointer; }

.footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: .95rem; background: var(--white); }
.footer a { color: var(--ink); }

.back { display: inline-block; margin: 18px 0 0; color: var(--ink); font-weight: 600; text-decoration: none; }
.back:hover { text-decoration: underline; }

/* ── Meniu burger pe mobil (ca pe homepage) ───────────── */
.topbar .wrap { position: relative; }
.menu-toggle { display: none; width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.3); color: #fff; cursor: pointer; align-items: center; justify-content: center; }
.menu-toggle svg { width: 24px; height: 24px; }
@media (max-width: 720px) {
  .menu-toggle { display: inline-flex; }
  .topbar nav { display: none; position: absolute; top: 64px; right: var(--gutter); left: var(--gutter); z-index: 30;
    flex-direction: column; gap: 2px; background: #fff; border-radius: 14px; padding: 8px; box-shadow: 0 18px 40px rgba(16,35,63,.28); }
  .topbar nav.is-open { display: flex; }
  .topbar nav a { color: var(--ink); padding: 13px 16px; border-radius: 10px; }
  .topbar nav a:hover, .topbar nav a.on { background: var(--paper); }
}
/* ── Logo: bătaie de inimă (lub-dub) cu strălucire aurie ─ */
.topbar .brand img { transform-origin: 50% 60%; animation: pbe-heartbeat 3.9s cubic-bezier(.45, 0, .25, 1) infinite; }
@keyframes pbe-heartbeat {
  0%, 80%, 100% { transform: rotate(-4deg) scale(1, 1);           filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
  16.4%         { transform: rotate(-2.5deg) scale(1.06, 1.03);   filter: drop-shadow(0 0 14px rgba(242,183,5,.75)) drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
  30.8%         { transform: rotate(-4.5deg) scale(0.99, 1.01);   filter: drop-shadow(0 0 7px rgba(242,183,5,.3)) drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
  45.1%         { transform: rotate(-3deg) scale(1.04, 1.025);    filter: drop-shadow(0 0 11px rgba(242,183,5,.55)) drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
  61.5%         { transform: rotate(-4.2deg) scale(0.995, 1.005); filter: drop-shadow(0 0 4px rgba(242,183,5,.15)) drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
}
.topbar .brand:hover img { animation-duration: 2.2s; }
@media (prefers-reduced-motion: reduce) { .topbar .brand img { animation: none; transform: rotate(-4deg); } }

/* -- Carduri centrate (screenshot-uri, icon, titlu, pastile) -- */
.tile-shots { justify-content: center; }
.tile-body { align-items: center; text-align: center; }
.tile-head { flex-direction: column; gap: 10px; }
.tile-foot { justify-content: center; }