/* ======== DESKTOP / ALAP ========= */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: url('../images/bckg.jpg') no-repeat center center fixed;
  background-size: cover;
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- felső gombsor és logó (desktopon használt) --- */
.nav-button-wrapper {
  background-color: #022a4f;
  padding: 15px 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-logo-container { display:flex; align-items:center; }
.nav-logo { height:217px; width:auto; object-fit:contain; }
.nav-buttons { display:flex; gap:0; flex-wrap:nowrap; }
.button2 {
  display:inline-block; transition:.2s ease-in; position:relative; overflow:hidden;
  z-index:1; color:#fff; padding:.8em 1.8em; cursor:pointer; font-size:16px;
  border-radius:0; background:#034c8c; border:1px solid #034c8c; margin:0; font-weight:bold;
}
.button2:first-child{ border-top-left-radius:.5em; border-bottom-left-radius:.5em; }
.button2:last-child{ border-top-right-radius:.5em; border-bottom-right-radius:.5em; }
.button2:active{ color:#ccc; background:#04607d; }
.button2:before{
  content:""; position:absolute; left:50%; transform:translateX(-50%) scaleY(1) scaleX(1.25);
  top:100%; width:140%; height:180%; background:rgba(0,0,0,.1); border-radius:50%;
  transition:.5s .1s cubic-bezier(.55,0,.1,1); z-index:-1;
}
.button2:after{
  content:""; position:absolute; left:55%; transform:translateX(-50%) scaleY(1) scaleX(1.45);
  top:180%; width:160%; height:190%; background:#00a97f; border-radius:50%;
  transition:.5s .1s cubic-bezier(.55,0,.1,1); z-index:-1;
}
.button2:hover{ color:#fff; border:1px solid #00a97f; }
.button2:hover:before,
.button2:hover:after{ top:-40%; background:#00a97f; transform:translateX(-50%) scaleY(1.3) scaleX(.8); }

/* --- portál rács (desktop) --- */
.grid-container {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap:20px; padding:40px; max-width:1200px; margin:auto; flex:1; align-items:start;
}
.tile{
  background: rgba(255,255,255,.05);
  padding:25px; border-radius:12px; backdrop-filter: blur(8px);
  box-shadow: inset 0 0 5px rgba(255,255,255,.1), 0 8px 20px rgba(0,0,0,.4);
  border:1px solid rgba(255,255,255,.08); transition: transform .3s ease;
}
.tile:hover{ transform: translateY(-4px);
  box-shadow: inset 0 0 5px rgba(255,255,255,.1), 0 12px 24px rgba(0,0,0,.5);
}
.tile h2{ color:#fff39c; margin-bottom:10px; }

/* --- egyéb komponensek (desktop + közös) --- */
.news-box ul{ list-style:none; padding:0; }
.news-box li{ margin-bottom:10px; }

.user-list{ display:flex; gap:10px; flex-wrap:wrap; }
.user-card{ background:#034c8c; padding:10px; border-radius:8px; font-weight:bold; text-align:center; flex:1; min-width:80px; }

.footer{ background:#000; color:#ccc; font-size:14px; width:100%; margin-top:40px; }
.footer-top{
  text-align:center; padding:0; line-height:1; font-size:13px; background:#000; font-weight:bold;
  color:#fff; border-bottom:1px solid #222; height:30px; display:flex; align-items:center; justify-content:center;
}
.footer-columns{ display:flex; justify-content:space-around; flex-wrap:wrap; background:#001627; padding:30px 20px; }
.footer-col{ flex:1 1 200px; margin:10px; padding:0 15px; border-left:1px solid rgba(255,255,255,.1); }
.footer-col:first-child{ border-left:none; }
.footer-col h4{ color:#00d5f0; margin-bottom:10px; font-size:16px; }
.footer-col a{ display:block; color:#ccc; text-decoration:none; margin-bottom:6px; transition:color .3s; }
.footer-col a:hover{ color:#fff; }

.nav-header{ display:flex; align-items:center; justify-content:center; gap:10px; margin-top:15px; }
.nav-logo-wrapper{ display:flex; align-items:center; justify-content:center; }

.admin-wrapper{ display:flex; gap:20px; padding:30px; color:white; }
.admin-sidebar{ display:flex; flex-direction:column; gap:10px; }
.admin-tab-button{
  background:#034c8c; color:white; border:none; padding:10px 20px; border-radius:8px; font-size:16px;
  cursor:pointer; text-align:left; display:flex; align-items:center; gap:8px; transition: background .3s;
}
.admin-tab-button:hover{ background:#0463a0; }
.admin-tab-button.active{ background:#00a97f; }

.admin-content{
  flex:1; padding:20px; background:rgba(0,0,0,.3); border-radius:10px; min-height:400px;
  display:flex; flex-direction:column; gap:30px;
}
.admin-content > form{ display:flex; flex-direction:column; }
#admin-iframe{ width:100%; height:600px; border:none; border-radius:10px; background:transparent; }
.admin-news-item{ margin-bottom:25px; border-bottom:1px solid #444; padding-bottom:15px; }
.success-message{ color:#4caf50; font-weight:bold; }
.error-message{ color:#ff6666; font-weight:bold; }
.admin-news-form{
  display:flex; flex-direction:column; align-items:center; max-width:500px; width:100%;
  margin:0 auto 30px auto; gap:10px;
}
.admin-news-form label{ align-self:flex-start; color:#fff; font-weight:bold; }
.admin-news-form .textInput{ width:100%; }

.form-wrapper{
  display:flex; flex-direction:column; align-items:center; max-width:500px; margin:0 auto 30px auto;
  padding:20px; background:rgba(255,255,255,.02); border-radius:10px;
}
.form-wrapper label,
.form-wrapper input,
.form-wrapper textarea,
.form-wrapper .ck-editor,
.form-wrapper button{ width:100%; max-width:100%; }

.admin-news-content{
  font-size:17px; line-height:1.6; margin-top:5px; max-width:800px; margin-left:auto; margin-right:auto;
  white-space:normal; word-wrap:break-word; text-align:center;
}

/* belépő doboz (desktop) */
.large-entry-box{
  grid-column: span 2; text-align:center; padding:40px 30px; min-height:260px;
  display:flex; flex-direction:column; justify-content:center; align-items:center;
  background: rgba(0,169,127,.07); backdrop-filter: blur(10px);
  border:1px solid rgba(0,169,127,.3);
}

/* belépés gomb */
.entry-button{ margin-top:20px; padding:12px 30px; background:#00a97f; color:#fff; font-weight:bold; border:none; border-radius:8px; font-size:16px; text-decoration:none; transition: background .3s; }
.entry-button:hover{ background:#009b74; }

/* belépési info box (desktop méretezés) */
.entry-info-box{
  display:flex; flex-direction:column; padding:25px;
  background: rgba(0,51,102,.35); border:1px solid rgba(0,153,255,.2); border-radius:12px; backdrop-filter: blur(8px);
  box-shadow: inset 0 0 5px rgba(255,255,255,.05), 0 6px 14px rgba(0,0,0,.3);
  grid-column: span 1; max-width:420px; justify-self:center; max-height:500px; overflow:auto;
}

.entry-top{ display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; border-bottom:1px solid rgba(255,255,255,.1); padding-bottom:15px; }
.entry-stats p{ margin:4px 0; color:#fff; font-size:14px; text-align:left; padding-left:5px; }
.entry-button-wrapper{ display:flex; align-items:center; }
.entry-button.big{ padding:12px 26px; background:#ff8c00; border:none; border-radius:6px; font-weight:bold; font-size:18px; color:#fff; text-decoration:none; transition: background .3s; }
.entry-button.big:hover{ background:#ff7300; }
.entry-bottom{ margin-top:10px; text-align:left; padding-left:5px; }
.entry-bottom h3{ margin:0 0 8px; font-size:16px; color:#fff39c; }
.entry-bottom p{ margin:3px 0; font-size:14px; color:#eee; }
.entry-bottom a{ color:#00d5f0; text-decoration:none; font-weight:bold; }
.entry-bottom a:hover{ text-decoration:underline; }
.warning{ color:#ffcc00; font-weight:bold; }

.image-button-link{ display:inline-block; transition: transform .1s ease-in-out; background:none!important; box-shadow:none!important; padding:0; }
.image-button-link:hover{ transform:scale(1.05); filter: drop-shadow(0 4px 10px rgba(0,191,255,.5)); }
.image-button-link:active{ transform:scale(.95); }
.image-button{ width:300px; height:auto; display:block; border:none; background:transparent!important; }
.entry-greeting{ font-size:16px; font-weight:bold; color:#fff39c; margin-bottom:16px; margin-top:-5px; padding:0 4px; }

.admin-tab-button{ text-decoration:none; color:inherit; }

.news-list{ list-style:none; padding-left:0; margin:0; }
.news-more-btn{ color:#ffd700; text-decoration:none; font-weight:bold; }
.news-more-btn:hover{ text-decoration:underline; }

/* üzenőfal + top5 */
.opwall-card{
  background: rgba(4,18,36,.75); border:1px solid rgba(0,153,255,.18);
  border-radius:14px; box-shadow:0 6px 24px rgba(0,0,0,.35); padding:16px; color:#e5e7eb; margin-top:16px;
}
.opwall-form{ display:flex; gap:10px; align-items:center; margin-bottom:12px; }
.opwall-form input[type="text"]{
  flex:1; padding:10px 12px; border-radius:10px; border:1px solid #3a5582; background:#0f1a2e; color:#e5e7eb; font-size:14px; box-shadow: inset 0 2px 6px rgba(0,0,0,.25);
}
.opwall-form .btn-primary{ background:#00a97f; border:1px solid #00a97f; color:#081226; border-radius:10px; padding:10px 12px; font-weight:700; cursor:pointer; }
.opwall-list{ list-style:none; margin:0; padding:0; }
.opwall-item{ display:flex; gap:10px; align-items:flex-start; padding:8px 0; border-bottom:1px dashed rgba(255,255,255,.08); }
.opwall-head{ font-weight:700; display:flex; gap:8px; align-items:center; }
.opwall-when{ color:#9ab6dd; font-weight:700; font-size:12px; }
.opwall-msg{ white-space:pre-wrap; }
.opwall-actions{ margin-left:auto; display:flex; gap:8px; }
.opwall-actions button{ background:#1b2a40; border:1px solid #2d3a5a; color:#fff; border-radius:8px; padding:6px 8px; cursor:pointer; }
.opwall-pin{ color:#ffe3a1; }

.center-col{ display:flex; flex-direction:column; gap:16px; }
@media (min-width: 992px){ .center-col{ flex:1 1 33%; } }

.opwall-item{ display:flex; flex-direction:column; align-items:flex-start; gap:4px; padding:10px 0; border-bottom:1px dashed rgba(255,255,255,.08); }
.opwall-head{ display:flex; align-items:baseline; gap:10px; width:100%; }
.opwall-when{ margin-left:auto; color:#9ab6dd; font-weight:700; font-size:12px; }
.opwall-msg{ align-self:stretch; white-space:pre-wrap; word-break:break-word; line-height:1.35; color:#e5e7eb; }

.left-stack{ display:flex; flex-direction:column; gap:16px; }
@media (min-width:900px){ .left-stack{ grid-column:1; } }

.top-chatters{ list-style:none; margin:0; padding:0; counter-reset:rank; }
.top-chatters li{
  display:grid; grid-template-columns:32px minmax(0,1fr) auto; column-gap:12px; align-items:center; padding:8px 6px;
}
.top-chatters li .rank::before{ counter-increment:rank; content: counter(rank) "."; color:#9ab6dd; font-weight:700; font-size:16px; }
.top-chatters li .name{ display:flex; align-items:center; gap:10px; min-width:0; font-size:16px; }
.role-icon,.gender-icon{ width:22px; height:22px; display:inline-block; object-fit:contain; vertical-align:middle; }
.top-chatters li .name a{ display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; font-weight:700; font-size:16px; }
.top-chatters li .time{ justify-self:end; white-space:nowrap; color:#cfd9ec; font-weight:500; font-size:15px; }

.opwall-pager{ display:flex; gap:10px; align-items:center; margin-top:8px; }
.btn-ghost{ background:#13233a; border:1px solid #2d3a5a; color:#e5e7eb; padding:6px 10px; border-radius:8px; cursor:pointer; }
.btn-ghost:disabled{ opacity:.5; cursor:default; }
.btn-danger{ background:#7a1f1f; border:1px solid #b23b3b; color:#fff; padding:6px 10px; border-radius:8px; cursor:pointer; }
.btn-danger:hover{ filter:brightness(1.06); }

/* ======== MOBIL / TABLET (<= 992px) — RENDEZETT, DUPLÁZÁS NÉLKÜL ========= */
@media (max-width: 992px){

  /* háttér */
  html, body{ height:auto; min-height:100dvh; }
  body{
    background-attachment: scroll;
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
  }
  .page, .wrapper, .content, .grid-container{ background: transparent !important; }

  /* rács 1 oszlop */
  .grid-container{ display:grid; grid-template-columns:1fr; gap:12px; padding:12px; }

  /* alapból minden hátratéve */
  .grid-container > *{ order:10; }

  /* SORREND: Belépő → Left-stack (opfal+top5) → Hírek */
  .entry-info-box{ order:1; }
  .left-stack{ order:2; }         /* ebben van: opfal, majd alatta top5 */
  .news-box{ order:3; }

  /* csempe méret */
  .tile{ min-width:0; padding:16px; border-radius:12px; }
  .tile h2, .tile h3{ font-size:18px; margin:8px 0 10px; }

  /* formok */
  input[type="text"], input[type="email"], input[type="password"], textarea, select{
    font-size:16px; min-height:44px; width:100%;
  }

  /* footer */
  .footer-top{ height:auto; padding:8px 10px; font-size:12px; line-height:1.4; text-align:center; }
  .footer-columns{ flex-direction:column; gap:8px; padding:16px 12px; }
  .footer-col{ border-left:none; border-top:1px solid rgba(255,255,255,.08); padding:10px 0; margin:0; }

  /* --- MOBIL MENÜ: Menü gomb + lenyíló panel --- */
  .menu-toggle{
    display:inline-flex; align-items:center; gap:8px; padding:10px 14px;
    border-radius:12px; border:1px solid rgba(255,255,255,.14);
    background:
      radial-gradient(140% 60% at 50% 0%, rgba(255,255,255,.18), rgba(255,255,255,.04) 40%, rgba(0,0,0,.08) 70%),
      linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.10));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 24px rgba(0,0,0,.35);
    color:#fff; font-weight:600; border-left:none;
  }

  header .menu{
    position: fixed; left:0; right:0; top:0; z-index:1001;
    padding:12px; display:grid; grid-template-columns:1fr; gap:10px;
    transform: translateY(-110%); opacity:0; pointer-events:none;
    transition: transform .25s ease, opacity .2s ease;
  }
  body.menu-open header .menu{
    transform: translateY(0); opacity:1; pointer-events:auto;
    background: rgba(14,28,46,.95); border:1px solid rgba(255,255,255,.08);
  }
  header .menu .nav-item{
    display:flex; align-items:center; justify-content:center; min-height:44px; gap:8px;
    border-left:none; border-radius:12px; border:1px solid rgba(255,255,255,.14);
    background:
      radial-gradient(140% 60% at 50% 0%, rgba(255,255,255,.18), rgba(255,255,255,.04) 40%, rgba(0,0,0,.08) 70%),
      linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.10));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 24px rgba(0,0,0,.35);
  }
  header .menu .nav-item > a{
    width:100%; display:flex; align-items:center; justify-content:center; gap:8px;
    text-decoration:none; color:inherit; font-weight:600;
  }
  header .menu .nav-item svg,
  header .menu .nav-item img{ width:20px; height:20px; }

  .menu-backdrop{
    position:fixed; inset:0; background:rgba(0,0,0,.55);
    z-index:1000; opacity:0; pointer-events:none; transition:opacity .2s ease;
    backdrop-filter:none !important; -webkit-backdrop-filter:none !important;
  }
  body.menu-open .menu-backdrop{ opacity:1; pointer-events:auto; }

  .nav-header{ position: sticky; top:0; z-index:1002; }
  body.menu-open{ overflow:hidden; }
}
/* === Mobil wrapper igazítás (eltolódás javítás) === */
@media (max-width: 992px){
  .admin-wrapper,
  .admin-content,
  .grid-container{
    width: 100%;
    box-sizing: border-box;   /* padding beszámít a szélességbe */
  }

  /* egyenletes belső tér, ne tolódjon el egyik oldalra sem */
  .admin-wrapper{ padding: 12px; justify-content: center; }
  .admin-content{ padding: 12px; margin: 0 auto; }
  
  /* a grid marad középen, ne legyen rejtett külső margó */
  .grid-container{
    margin: 0 auto;
    padding: 12px;            /* már van, de hagyjuk itt is konzisztensen */
  }
}

/* ==========================================================================
   Reusable button styles for EgyChat portal
   Place in: assets/portal.css
   Used by: Korábbi híreink, Tovább, Vissza a kezdőlapra, Hír mentése, etc.
   ========================================================================== */

/* Generic surface button */
.btn-surface{
  display:inline-flex; align-items:center; gap:8px;
  padding:9px 14px;
  border-radius:12px;
  text-decoration:none;
  font-weight:700;
  letter-spacing:.2px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.15);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 4px 12px rgba(0,0,0,0.25);
  color:inherit;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  cursor:pointer;
}
.btn-surface:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,0.09);
  border-color:rgba(255,255,255,0.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 6px 16px rgba(0,0,0,0.32);
}
.btn-surface:active{ transform:translateY(0); }
.btn-surface:focus-visible{
  outline:2px solid rgba(0,150,255,0.55);
  outline-offset:2px;
}

/* Variants */
.btn-save{
  background:rgba(0, 208, 132, 0.10);
  border-color:rgba(0, 208, 132, 0.35);
}
.btn-save:hover{
  background:rgba(0, 208, 132, 0.18);
  border-color:rgba(0, 208, 132, 0.45);
}

.btn-archive{ /* Korábbi híreink */
  display:inline-flex; align-items:center; gap:10px;
  padding:10px 16px;
  border-radius:14px;
  text-decoration:none;
  font-weight:700;
  letter-spacing:.2px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.15);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 4px 12px rgba(0,0,0,0.25);
  color:inherit;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.btn-archive:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,0.09);
  border-color:rgba(255,255,255,0.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 6px 16px rgba(0,0,0,0.32);
}
.btn-archive:active{ transform:translateY(0); }
.btn-archive:focus-visible{
  outline:2px solid rgba(0,150,255,0.55);
  outline-offset:2px;
}
.btn-archive-icon{ font-size:18px; line-height:1; }
.btn-archive-label{ font-size:15px; }
.news-archive-wrap{ text-align:center; margin-top:20px; }

/* News item "Tovább" button */
.news-more-btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 14px;
  border-radius:12px;
  text-decoration:none;
  font-weight:700;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.15);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 4px 12px rgba(0,0,0,0.25);
  color:inherit;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.news-more-btn:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,0.09);
  border-color:rgba(255,255,255,0.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 6px 16px rgba(0,0,0,0.32);
}
.news-more-btn:active{ transform:translateY(0); }
.news-more-btn:focus-visible{
  outline:2px solid rgba(0,150,255,0.55);
  outline-offset:2px;
}

/* Spacing helpers for common placements */
.back-btn{ margin-top:15px; }

/* Responsive tweaks */
@media (max-width:520px){
  .btn-surface{ padding:8px 12px; border-radius:10px; }
  .btn-archive{ padding:9px 14px; border-radius:12px; }
  .btn-archive-label{ font-size:14px; }
}
/* Admin műveletgombok variánsai */
.btn-edit{
  background:rgba(0, 132, 255, 0.10);
  border-color:rgba(0, 132, 255, 0.35);
}
.btn-edit:hover{
  background:rgba(0, 132, 255, 0.18);
  border-color:rgba(0, 132, 255, 0.45);
}

.btn-danger{
  background:rgba(255, 71, 87, 0.10);
  border-color:rgba(255, 71, 87, 0.35);
}
.btn-danger:hover{
  background:rgba(255, 71, 87, 0.18);
  border-color:rgba(255, 71, 87, 0.45);
}


/* Admin hírlista gombsor – középre igazítás */
.action-btns{
  display:flex;
  gap:8px;
  margin-top:6px;
  flex-wrap:wrap;
  justify-content:center;   /* ⬅️ ez hozza középre */
}

/* (opcionális) a listatétel tartalmát is igazíthatod középre */
.news-list li{
  text-align:center;
}
/* ── Hírszerkesztő – szélesebb TinyMCE ─────────────────────────────── */
.news-editor-form{ 
  max-width: 960px;        /* mennyi legyen a plafon */
  margin: 0 auto;          /* középre */
}
.news-editor-form textarea{
  width: 100%;
  min-height: 420px;
}

/* TinyMCE külső dobozát is húzzuk szélesre és középre */
.news-editor-form .tox.tox-tinymce{
  width: 100% !important;
  max-width: 960px;
  margin: 0 auto;
}
@media (max-width: 1040px){
  .news-editor-form{ max-width: calc(100% - 48px); }
}
