/* Facebook-oldal mockup: asztali és telefonos nézet egy forrásból (konténer-lekérdezéssel) */

body { background: var(--fb-hatter); font-family: var(--fb-betu); color: var(--fb-szoveg); }

:root {
  --fb-hatter: #f0f2f5;
  --fb-kartya: #ffffff;
  --fb-kek: #0866ff;
  --fb-kek-halvany: #ebf5ff;
  --fb-szoveg: #080809;
  --fb-masodlagos: #65686c;
  --fb-gomb: #e2e5e9;
  --fb-gomb-hover: #d6d9dd;
  --fb-elvalaszto: #ced0d4;
  --fb-hover: #f2f2f2;
  --fb-arnyek: 0 1px 2px rgba(0, 0, 0, .2);
  --fb-betu: system-ui, -apple-system, "Segoe UI Historic", "Segoe UI", Helvetica, Arial, sans-serif;
}

.fb { container: fb / inline-size; min-height: 100vh; background: var(--fb-hatter); }

/* ---------- Felső sáv (asztali) ---------- */

.fejlec {
  position: sticky; top: 0; z-index: 10; height: 56px; background: #fff; box-shadow: var(--fb-arnyek);
  display: grid; grid-template-columns: 1fr minmax(0, 680px) 1fr; align-items: center; padding: 0 16px;
}
.fejlec-bal { display: flex; align-items: center; gap: 8px; }
.fb-logo { width: 40px; height: 40px; }
.kereso { display: flex; align-items: center; gap: 8px; height: 40px; width: 240px; padding: 0 12px; border-radius: 20px; background: var(--fb-hatter); color: var(--fb-masodlagos); font-size: 15px; white-space: nowrap; overflow: hidden; }
.fejlec-kozep { display: flex; justify-content: center; height: 56px; }
.fejlec-kozep a { width: 112px; display: flex; align-items: center; justify-content: center; color: var(--fb-masodlagos); border-bottom: 3px solid transparent; margin: 0 4px; }
.fejlec-kozep a:hover { background: var(--fb-hover); border-radius: 8px; }
.fejlec-jobb { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.kor-gomb { width: 40px; height: 40px; border-radius: 50%; background: var(--fb-gomb); display: flex; align-items: center; justify-content: center; position: relative; }
.jelveny { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #e41e3f; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.sajat-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(#c9ccd1, #b0b3b8); position: relative; overflow: hidden; }
.sajat-avatar::before { content: ""; position: absolute; width: 16px; height: 16px; left: 12px; top: 8px; border-radius: 50%; background: #f0f2f5; }
.sajat-avatar::after { content: ""; position: absolute; width: 30px; height: 20px; left: 5px; top: 27px; border-radius: 50%; background: #f0f2f5; }

/* Mobilfejléc (csak telefonon) */
.mfejlec { display: none; }

/* ---------- Oldalfej ---------- */

.oldalfej { background: #fff; box-shadow: var(--fb-arnyek); }
.oldalfej-belso { max-width: 1250px; margin: 0 auto; }
.borito { aspect-ratio: 1250 / 463; border-radius: 0 0 8px 8px; }
.azonosito { display: flex; align-items: flex-end; gap: 16px; padding: 0 32px 16px; margin-top: -32px; position: relative; }
.profilkep { width: 176px; height: 176px; border-radius: 50%; border: 4px solid #fff; background: #fff; flex: none; }
.profilkep.hely { border-radius: 50%; }
.profilkep .hely, .profilkep > img { border-radius: 50%; }
.nev-blokk { flex: 1; min-width: 0; padding-bottom: 6px; }
.oldalnev { font-size: 32px; line-height: 38px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 8px; }
.pipa { width: 20px; height: 20px; }
.statisztika { font-size: 15px; color: var(--fb-masodlagos); font-weight: 600; margin-top: 4px; }
.statisztika b { color: var(--fb-szoveg); font-weight: 600; }
.alcim { font-size: 15px; margin-top: 6px; }
.kat { font-size: 15px; margin-top: 4px; display: flex; align-items: center; gap: 6px; font-weight: 600; }
.gombsor { display: flex; gap: 8px; padding-bottom: 8px; }
.gomb { height: 36px; padding: 0 12px; border-radius: 6px; background: var(--fb-gomb); font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.gomb:hover { background: var(--fb-gomb-hover); }
.gomb.kek { background: var(--fb-kek); color: #fff; }
.gomb.kek:hover { background: #0861f2; }
.gomb.ikon { width: 48px; padding: 0; justify-content: center; }

.fulek { border-top: 1px solid var(--fb-elvalaszto); margin: 0 32px; display: flex; align-items: center; justify-content: space-between; }
.fulek nav { display: flex; }
.ful { height: 60px; padding: 0 16px; display: flex; align-items: center; gap: 4px; color: var(--fb-masodlagos); font-size: 15px; font-weight: 600; border-bottom: 3px solid transparent; }
.ful.aktiv { color: var(--fb-kek); border-bottom-color: var(--fb-kek); }
.ful:not(.aktiv):hover { background: var(--fb-hover); border-radius: 6px; }

/* ---------- Tartalom: két hasáb ---------- */

.tartalom { max-width: 1250px; margin: 0 auto; padding: 16px 32px 64px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.bal-hasab { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 16px; }
.jobb-hasab { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.kartya { background: var(--fb-kartya); border-radius: 8px; box-shadow: var(--fb-arnyek); }
.kartya-fej { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 8px; }
.kartya-fej h2 { font-size: 20px; line-height: 24px; margin: 0; font-weight: 700; }
.link-kek { color: var(--fb-kek); font-size: 15px; }
.info-sor { display: flex; gap: 12px; padding: 6px 16px; font-size: 15px; line-height: 20px; align-items: flex-start; }
.info-sor svg { margin-top: 1px; color: #8c939d; }
.info-sor a { color: var(--fb-kek); }
.bemutat { padding: 4px 16px 12px; font-size: 15px; text-align: center; line-height: 20px; }
.kartya-alja { padding-bottom: 10px; }
.fotoracs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px 16px 16px; }
.fotoracs .hely { aspect-ratio: 1; }
.fotoracs .hely:nth-child(1) { border-top-left-radius: 8px; }
.fotoracs .hely:nth-child(3) { border-top-right-radius: 8px; }
.fotoracs .hely:nth-child(7) { border-bottom-left-radius: 8px; }
.fotoracs .hely:nth-child(9) { border-bottom-right-radius: 8px; }
.fotoracs .hely.ures span { font-size: 11px; padding: 4px 6px; }

.bejegyzesek-fej { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.bejegyzesek-fej h2 { font-size: 20px; margin: 0; font-weight: 700; }
.bejegyzesek-fej .gomb { height: 32px; }

/* ---------- Poszt ---------- */

.poszt { overflow: hidden; }
.poszt-fej { display: flex; gap: 8px; padding: 12px 16px 0; align-items: center; }
.poszt-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.poszt-avatar.hely.ures span { display: none; }
.poszt-meta { flex: 1; min-width: 0; }
.poszt-nev { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 4px; line-height: 20px; }
.poszt-nev .pipa { width: 14px; height: 14px; }
.poszt-ido { font-size: 13px; color: var(--fb-masodlagos); display: flex; align-items: center; gap: 4px; line-height: 16px; }
.poszt-menu { display: flex; gap: 4px; color: var(--fb-masodlagos); }
.poszt-menu span { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.poszt-menu span:hover { background: var(--fb-hover); }
.poszt-szoveg { padding: 8px 16px 12px; font-size: 15px; line-height: 20px; white-space: pre-line; overflow-wrap: anywhere; }
.tobb { font-weight: 600; cursor: pointer; }
.tobb:hover { text-decoration: underline; }
.poszt-szoveg.nagy { min-height: 340px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 30px; line-height: 36px; font-weight: 700; color: #fff; padding: 40px; }

.poszt-media .hely { width: 100%; }
/* álló kép asztalon: fekvő (5:4) keretben, a kép szélének színével kitöltve, mint a Facebook hírfolyamában */
.kepkeret.allo { aspect-ratio: 5 / 4; display: flex; justify-content: center; background: var(--szel, #e4e6eb); }
.kepkeret.allo > div { height: 100%; }
/* a mi posztjaink mellett: a téma alapszíne a posztháttér lilás átmenetével, a kép széle beleolvad */
.kepkeret.allo.rendszer { background: linear-gradient(0deg, rgba(74,26,112,.5), transparent 55%), linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.18)), var(--szel); }
.kepkeret.allo.rendszer > div { -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.poszt-media .hely:not(.ures), .album .hely:not(.ures), .fotoracs .hely:not(.ures) { cursor: pointer; }

/* képnézegető */
.nezo { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-columns: minmax(0, 1fr) 360px; background: #fff; }
.nezo-kep { position: relative; background: #000; display: flex; align-items: center; justify-content: center; min-height: 0; overflow: hidden; }
.nezo-kep img, .nezo-kep video { position: relative; max-width: 100%; max-height: 100vh; object-fit: contain; display: block; user-select: none; }
/* a kép két oldala nem fekete: ugyanaz a kép elmosva, sötétítve tölti ki */
.nezo-kep .nezo-hatter { position: absolute; inset: -6%; width: 112%; height: 112%; max-width: none; max-height: none; object-fit: cover; filter: blur(40px) brightness(.7); pointer-events: none; }
.nezo-bezar { position: absolute; top: 12px; left: 12px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; display: flex; align-items: center; justify-content: center; z-index: 2; }
.nezo-bezar:hover { background: rgba(255, 255, 255, .28); }
.nezo-bezar svg { width: 22px; height: 22px; }
.nezo-nyil { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; display: flex; align-items: center; justify-content: center; z-index: 2; }
.nezo-nyil:hover { background: rgba(255, 255, 255, .3); }
.nezo-nyil svg { width: 24px; height: 24px; }
.nezo-nyil.bal { left: 16px; }
.nezo-nyil.jobb { right: 16px; }
.nezo-nyil.jobb svg { transform: scaleX(-1); }
.nezo-szamlalo { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .8); font-size: 13px; font-weight: 600; background: rgba(0, 0, 0, .4); padding: 4px 10px; border-radius: 12px; }
.nezo-panel { overflow-y: auto; border-left: 1px solid var(--fb-elvalaszto); }
.nezo-panel .kommentek { display: block; }
.nezo.mobil { position: absolute; display: block; background: #000; }
.nezo.mobil .nezo-kep { height: 100%; }
.nezo.mobil .nezo-kep img { max-height: 100%; }
.nezo.mobil .nezo-panel { display: none; }
.nezo.mobil .nezo-bezar { top: 54px; }
.album { display: grid; gap: 2px; }
.album .hely { width: 100%; height: 100%; min-height: 0; }
.album-mellett { grid-template-columns: 1fr 1fr; aspect-ratio: 8 / 5; }
.album-alatt { grid-template-rows: 1fr 1fr; aspect-ratio: 16 / 18; }
.album-racs { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 1; }
.album-bal-nagy-3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 1; }
.album-bal-nagy-3 > :first-child { grid-row: 1 / 3; }
.album-bal-nagy-4 { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(3, 1fr); aspect-ratio: 1; }
.album-bal-nagy-4 > :first-child { grid-row: 1 / 4; }
.album-fent-nagy-3 { grid-template-columns: 1fr 1fr; grid-template-rows: 2fr 1fr; aspect-ratio: 1; }
.album-fent-nagy-3 > :first-child { grid-column: 1 / 3; }
.album-fent-nagy-4 { grid-template-columns: repeat(3, 1fr); grid-template-rows: 2fr 1fr; aspect-ratio: 1; }
.album-fent-nagy-4 > :first-child { grid-column: 1 / 4; }
.album-ot { grid-template-columns: repeat(6, 1fr); grid-template-rows: 3fr 2fr; aspect-ratio: 6 / 5; }
.album-ot > :nth-child(-n+2) { grid-column: span 3; }
.album-ot > :nth-child(n+3) { grid-column: span 2; }
.album .tovabbi { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); color: #fff; font-size: 32px; font-weight: 700; display: flex; align-items: center; justify-content: center; pointer-events: none; }

.hely > video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Videó a hírfolyamban */
.videodoboz { position: relative; background: #000; aspect-ratio: var(--arany, 16 / 9); color: #fff; overflow: hidden; }
.videodoboz > .hely { width: 100%; height: 100%; }
.videodoboz.allo { aspect-ratio: 4 / 5; display: flex; justify-content: center; }
.videodoboz.allo > .hely { width: auto; height: 100%; aspect-ratio: 9 / 16; }
.nemit { position: absolute; right: 12px; bottom: 12px; width: 32px; height: 32px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: flex; align-items: center; justify-content: center; transition: opacity .15s; }
.kezelo { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); opacity: 0; transition: opacity .15s; }
.videodoboz:hover .kezelo { opacity: 1; }
.videodoboz:hover .nemit { opacity: 0; pointer-events: none; }
.sav { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.sav-toltve { height: 100%; background: #fff; }
.kezelo-sor { display: flex; align-items: center; gap: 16px; height: 36px; }
.kezelo-sor > span { display: flex; align-items: center; cursor: pointer; }
.kezelo-sor .ido { font-size: 13px; font-weight: 600; cursor: default; }
.kezelo-sor .tolto { flex: 1; }
.elo-cimke { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; font-size: 12px; font-weight: 700; pointer-events: none; }
.elo { background: #e41e3f; padding: 3px 6px; border-radius: 4px; letter-spacing: .3px; }
.nezok { background: rgba(0, 0, 0, .6); padding: 3px 6px; border-radius: 4px; display: flex; align-items: center; gap: 4px; }
.elo-pont { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e41e3f; margin-right: 6px; }

.reel { background: #000; display: flex; justify-content: center; position: relative; }
.reel .hely { width: auto; height: 640px; aspect-ratio: 9 / 16; position: relative; }
.reel.reel-45 .hely { width: 100%; height: auto; aspect-ratio: 4 / 5; }
.videodoboz.allo > .hely { position: relative; }
.hatter-video { position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover; filter: blur(36px) saturate(1.1); pointer-events: none; }
.reel { overflow: hidden; }
.reel-felirat { position: absolute; left: 16px; bottom: 16px; color: #fff; font-size: 13px; font-weight: 600; display: flex; gap: 6px; align-items: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); pointer-events: none; }

.reakcio-sor { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; font-size: 15px; color: var(--fb-masodlagos); }
.reakciok { display: flex; align-items: center; gap: 6px; }
.emojik { display: flex; }
.emojik svg { width: 18px; height: 18px; border: 2px solid #fff; border-radius: 50%; box-sizing: content-box; margin-left: -4px; }
.emojik svg:first-child { margin-left: 0; }
.szamlalok { display: flex; gap: 12px; }
.akciok { margin: 0 16px; border-top: 1px solid var(--fb-elvalaszto); display: flex; padding: 4px 0; }
.akcio { flex: 1; height: 36px; border-radius: 6px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--fb-masodlagos); }
.akcio:hover { background: var(--fb-hover); }
.kommentek { padding: 4px 16px 12px; }
.komment { display: flex; gap: 6px; margin-top: 4px; }
.komment-avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; background: linear-gradient(135deg, #c3c8cf, #a9afb7); }
.buborek { background: var(--fb-hatter); border-radius: 18px; padding: 8px 12px; font-size: 15px; line-height: 20px; }
.buborek b { display: block; font-size: 13px; line-height: 16px; }
.komment-akciok { font-size: 12px; color: var(--fb-masodlagos); font-weight: 700; padding: 3px 12px; display: flex; gap: 16px; }
.irj { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.irj div:last-child { flex: 1; height: 36px; border-radius: 18px; background: var(--fb-hatter); color: var(--fb-masodlagos); font-size: 15px; display: flex; align-items: center; padding: 0 12px; }

/* ---------- Telefonos elrendezés (keskeny konténer) ---------- */

@container fb (max-width: 700px) {
  .fejlec { display: none; }
  .mfejlec {
    display: flex; position: sticky; top: 0; z-index: 10; height: 52px; align-items: center; gap: 12px; padding: 0 12px;
    background: #fff; border-bottom: 1px solid #e4e6eb;
  }
  .mfejlec .cim { flex: 1; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .oldalfej { box-shadow: none; }
  .borito { aspect-ratio: 16 / 9; border-radius: 0; }
  .azonosito { display: block; padding: 0 16px; margin-top: -64px; }
  .profilkep { width: 128px; height: 128px; }
  .nev-blokk { padding: 8px 0 0; }
  .oldalnev { font-size: 24px; line-height: 30px; }
  .oldalnev .pipa { width: 18px; height: 18px; }
  .statisztika { font-size: 15px; }
  .alcim { font-size: 15px; }
  .gombsor { padding: 12px 0 4px; }
  .gombsor .gomb { flex: 1; justify-content: center; height: 36px; }
  .gombsor .gomb.ikon { flex: none; width: 44px; }
  .gombsor .csak-asztal { display: none; }

  .fulek { margin: 8px 0 0; border-top: 1px solid #e4e6eb; padding: 8px 12px; overflow-x: auto; scrollbar-width: none; }
  .fulek nav { gap: 8px; }
  .fulek > .gomb { display: none; }
  .ful { height: 36px; padding: 0 14px; border-radius: 18px; border: 0; background: var(--fb-gomb); color: var(--fb-szoveg); white-space: nowrap; }
  .ful.aktiv { background: var(--fb-kek-halvany); color: var(--fb-kek); }
  .ful svg { display: none; }

  .tartalom { display: block; padding: 0; background: #c9ccd1; }
  .bal-hasab { position: static; gap: 0; margin-bottom: 8px; }
  .bal-hasab .kartya { border-radius: 0; box-shadow: none; }
  .bal-hasab .kartya + .kartya { display: none; }
  .bemutat { text-align: left; }
  .jobb-hasab { gap: 8px; }
  .kartya { border-radius: 0; box-shadow: none; }
  .bejegyzesek-fej h2 { font-size: 20px; }
  .poszt-fej { padding: 12px 12px 0; }
  .poszt-szoveg { padding: 8px 12px 12px; }
  .reel .hely { height: auto; width: 100%; }
  .reakcio-sor { padding: 10px 12px; }
  .akciok { margin: 0 12px; }
  .akcio span.felirat { font-size: 14px; }
  .kommentek { display: none; }
  .kezelo { display: none; }
  .videodoboz:hover .nemit { opacity: 1; pointer-events: auto; }
  .poszt-szoveg.nagy { font-size: 26px; line-height: 32px; min-height: 300px; }
  .kepkeret.allo { aspect-ratio: auto; display: block; }
  .kepkeret.allo > div { height: auto; }
}

@container fb (min-width: 701px) {
  .mfejlec { display: none !important; }
}

@container fb (max-width: 1100px) and (min-width: 701px) {
  .kereso { width: 40px; padding: 0 10px; }
  .kereso span { display: none; }
  .fejlec-kozep a { width: 72px; }
  /* középső szélességen a gombok új sorba törnek, a név nem nyomódik össze */
  .azonosito { flex-wrap: wrap; }
  .nev-blokk { min-width: 260px; }
  .gombsor { flex-basis: 100%; flex-wrap: wrap; justify-content: flex-end; padding-bottom: 0; }
}

@container fb (max-width: 940px) and (min-width: 701px) {
  .fejlec-kozep { display: none; }
  .azonosito { margin-top: -24px; padding: 0 24px 16px; }
  .profilkep { width: 150px; height: 150px; }
  .oldalnev { font-size: 28px; line-height: 34px; }
  .tartalom { grid-template-columns: minmax(0, 1fr); padding: 16px 24px 64px; }
  .bal-hasab { position: static; }
}

/* megosztott poszt: az eredeti keretben */
.megosztott { margin: 0 16px 4px; border: 1px solid var(--fb-elvalaszto); border-radius: 8px; overflow: hidden; }
.megosztott .poszt-media, .megosztott .album, .megosztott .videodoboz, .megosztott .reel { margin: 0; }
.megosztott-fej { display: flex; gap: 8px; align-items: center; padding: 10px 12px 0; }
.megosztott-avatar { width: 32px; height: 32px; border-radius: 50%; background: #e4e6eb center/cover; flex: none; }
.megosztott .poszt-szoveg { padding: 6px 12px 12px; font-size: 14px; line-height: 19px; }
@media (max-width: 700px) { .megosztott { margin: 0 12px 4px; } }
body.telefon .megosztott { margin: 0 12px 4px; }
