* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  --site-footer-height: 0px;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f7f8fc;
  color: #1f2937;
  padding-bottom: calc(var(--site-footer-height) + 24px);
}

body.mobile-menu-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.site-header {
  width: 100%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.container {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-shrink: 0;
}

.brand-image-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #e5e7eb;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10);
  background: #ffffff;
}

.brand-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  align-items: center;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #111827;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
  width: 100%;
}

.nav-list li {
  flex: 0 0 auto;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #4b5563;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-link i {
  font-size: 1rem;
}

.nav-link > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  z-index: 120;
  padding: 6px 9px;
  border-radius: 10px;
  background: #111827;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  background: #eef2f7;
  color: #1f2937;
  transform: translateY(-1px);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-link.active {
  background: #f1f3f9;
  color: #1f2937;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.mobile-header-chat-toggle {
  display: none;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111827;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.25s ease, transform 0.25s ease;
}

.mobile-header-chat-toggle:hover,
.mobile-header-chat-toggle:focus-visible {
  background: transparent;
  outline: none;
}

.mobile-header-chat-toggle i {
  font-size: 1.15rem;
}

.mobile-chat-selector[hidden] {
  display: none;
}

.mobile-chat-selector {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.38);
}

.mobile-chat-selector-card {
  width: min(100%, 520px);
  max-height: min(78vh, 680px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.mobile-chat-selector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #ece7dd;
}

.mobile-chat-selector-head strong,
.mobile-chat-selector-head span {
  display: block;
}

.mobile-chat-selector-head strong {
  color: #111827;
  font-size: 1rem;
}

.mobile-chat-selector-head span {
  margin-top: 2px;
  color: #6b7280;
  font-size: 0.85rem;
}

.mobile-chat-selector-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  cursor: pointer;
}

.mobile-chat-selector-search-wrap {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
}

.mobile-chat-selector-search {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 11px 14px;
  color: #111827;
  font-size: 16px;
  outline: none;
}

.mobile-chat-selector-search:focus {
  border-color: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
}

.mobile-chat-selector-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  padding: 10px;
}

.mobile-chat-selector-friend {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 0;
  border-radius: 16px;
  background: transparent;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.mobile-chat-selector-friend:hover,
.mobile-chat-selector-friend:focus-visible {
  background: #f8fafc;
  outline: none;
}

.mobile-chat-selector-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
}

.mobile-chat-selector-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mobile-chat-selector-meta strong,
.mobile-chat-selector-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-chat-selector-meta strong {
  color: #111827;
  font-size: 0.94rem;
}

.mobile-chat-selector-meta small {
  color: #6b7280;
  font-size: 0.8rem;
}

.mobile-chat-selector-empty,
.mobile-chat-selector-no-result {
  padding: 16px 18px;
  color: #6b7280;
  font-size: 0.92rem;
}

@media (max-width: 991px) {
  .mobile-header-chat-toggle {
    display: inline-flex;
    flex-shrink: 0;
  }
}

@media (max-width: 991px) {
  html.mobile-chat-selector-open,
  body.mobile-chat-selector-open {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.mobile-chat-selector-open {
    padding-bottom: 0;
  }

  body.mobile-chat-selector-open .site-footer,
  body.mobile-chat-selector-open #global-scroll-top {
    display: none;
  }

  .mobile-chat-selector {
    z-index: 1290;
    width: 100%;
    max-width: 100vw;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    background: #ffffff;
    overflow-x: hidden;
  }

  .mobile-chat-selector-card {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    flex: 1 1 100%;
    max-height: none;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    overflow-x: hidden;
  }

  .mobile-chat-selector-head,
  .mobile-chat-selector-search-wrap,
  .mobile-chat-selector-list,
  .mobile-chat-selector-friend {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .mobile-chat-selector-list {
    flex: 1 1 auto;
    min-height: 0;
  }
}

.mobile-menu-toggle {
  display: none;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 0;
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  transition: color 0.25s ease, transform 0.25s ease;
}

.mobile-menu-toggle:hover {
  background: transparent;
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu-toggle-line {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #111827;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  z-index: 1200;
}

.mobile-menu-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1300;
  background: #ffffff;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: 0 -16px 48px rgba(15, 23, 42, 0.22);
  padding: 12px 20px 28px;
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.30s ease, opacity 0.30s ease, visibility 0.30s ease;
  max-height: min(82vh, 760px);
  overflow-y: auto;
}

.mobile-menu-sheet.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-menu-sheet-handle {
  width: 52px;
  height: 5px;
  border-radius: 999px;
  background: #d1d5db;
  margin: 0 auto 14px;
}

.mobile-menu-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.mobile-menu-sheet-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
}

.mobile-menu-close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #f3f4f6;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.mobile-menu-close:hover {
  background: #e5e7eb;
}

.mobile-menu-nav {
  width: 100%;
}

.mobile-menu-list {
  display: grid;
  gap: 10px;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #f9fafb;
  color: #374151;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.mobile-menu-link:hover {
  background: #eef2f7;
  color: #111827;
  transform: translateY(-1px);
}

.mobile-menu-link.active {
  background: #eef2ff;
  color: #111827;
}

.mobile-menu-link-icon {
  width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  padding: 18px 0;
  border-top: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer p {
  margin: 0;
  color: #4b5563;
  font-size: 0.95rem;
}

.site-footer a {
  color: #111827;
  font-weight: 600;
}

.site-footer a:hover {
  text-decoration: underline;
}

.page-shell {
  min-height: calc(100vh - 160px);
}

.page-box {
  padding: 32px 0 48px;
}

.page-box h1 {
  margin-bottom: 12px;
  font-size: 2rem;
  color: #111827;
}

.page-box p {
  color: #4b5563;
  line-height: 1.6;
}

@media (max-width: 991px) {
  .header-inner {
    min-height: 78px;
    padding: 14px 0;
  }

  .main-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    flex-shrink: 0;
  }

  .brand {
    min-width: 0;
    flex: 1;
  }

  .brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1200px);
  }

  .header-inner {
    gap: 12px;
  }

  .brand {
    gap: 10px;
  }

  .brand-image-wrap {
    width: 46px;
    height: 46px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .mobile-menu-sheet {
    padding: 10px 16px 24px;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
  }

  .mobile-menu-link {
    padding: 13px 14px;
    font-size: 0.98rem;
  }

  .site-footer {
    padding: 16px 0 22px;
  }
}


.mobile-menu-chat-friend-meta small {
  color: #6b7280;
  font-size: 0.82rem;
}

.nav-logout-form,
.mobile-menu-logout-form {
  margin: 0;
}

.nav-link-button,
.mobile-menu-link-button {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0;
}


/* Publikus MyWorld tájékoztató modal */
.myworld-public-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.myworld-public-modal.is-open {
  display: flex;
}

.myworld-public-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
}

.myworld-public-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.myworld-public-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.myworld-public-modal-close:hover,
.myworld-public-modal-close:focus {
  background: #e2e8f0;
}

.myworld-public-modal-content {
  padding: 34px 24px 24px;
}

.myworld-public-modal-eyebrow {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.myworld-public-modal-content h2 {
  margin: 0 42px 12px 0;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.2;
}

.myworld-public-modal-content p {
  margin: 0;
  color: #475569;
  font-size: 15px;
  line-height: 1.65;
}

.myworld-public-modal-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.myworld-public-modal-primary,
.myworld-public-modal-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
}

.myworld-public-modal-primary {
  background: #0f172a;
  color: #ffffff;
}

.myworld-public-modal-secondary {
  background: #f1f5f9;
  color: #0f172a;
}

.myworld-public-modal-primary:hover,
.myworld-public-modal-primary:focus {
  background: #1e293b;
}

.myworld-public-modal-secondary:hover,
.myworld-public-modal-secondary:focus {
  background: #e2e8f0;
}

body.myworld-public-modal-open {
  overflow: hidden;
}

@media (max-width: 520px) {
  .myworld-public-modal {
    align-items: flex-end;
    padding: 12px;
  }

  .myworld-public-modal-dialog {
    border-radius: 20px;
  }

  .myworld-public-modal-content {
    padding: 32px 18px 18px;
  }

  .myworld-public-modal-content h2 {
    font-size: 21px;
  }
}

@media (max-width: 991px) {
  html.mobile-chat-panel-open,
  body.mobile-chat-panel-open {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.mobile-chat-panel-open {
    padding-bottom: 0;
  }

  body.mobile-chat-panel-open .site-footer,
  body.mobile-chat-panel-open #global-scroll-top {
    display: none;
  }
}

