* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-top: 72px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: rgba(70,70,70,1);
  color: #111827;
}

.page {
  padding: 16px;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(70,70,70,1);;
  /*border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 6px rgba(0,0,0,.08);*/
}

.topbar-inner {
  height: 72px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-title {
  flex: 0 0 auto;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.search-form {
  flex: 1 1 auto;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.search-form input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  border: 0px solid #d1d5db;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  background-color: rgba(100,100,100,1);
  color:#fff;
}

.search-form button,
.menu-button {
  height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: #111827;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.menu-wrap {
  position: relative;
  flex: 0 0 auto;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 46px;
  min-width: 180px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  overflow: hidden;
}

.dropdown-menu.open {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 11px 14px;
  color: #111827;
  text-decoration: none;
  font-size: 14px;
}

.dropdown-menu a:hover {
  background: #f3f4f6;
}

.filter-info {
  margin: 0 0 16px;
  color: #4b5563;
}

.filter-info a {
  margin-left: 8px;
  color: #2563eb;
}

.photo-grid {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  width: 100%;
}

.masonry-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.photo-card {
  width: 100%;
  margin: 0;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}

.thumb-wrap {
  background: #e5e7eb;
}

.thumb-wrap img {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 15px;
}

.photo-meta {
  padding: 10px;
  font-size: 13px;
  line-height: 1.35;
}

.photo-date {
  color: #6b7280;
  font-size: 12px;
  margin-bottom: 4px;
}

.photo-author {
  font-weight: 600;
  margin-bottom: 6px;
}

.photo-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 7px;
}

.keyword {
  background: #e5e7eb;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  color: #374151;
  text-decoration: none;
  display: inline-block;
}

.keyword:hover {
  background: #d1d5db;
}

.photo-desc {
  color: #374151;
  font-size: 13px;
}

.loader {
  text-align: center;
  padding: 24px;
  color: #6b7280;
}

.pagination {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 24px 0;
}

.pagination a {
  color: #2563eb;
}

@media (max-width: 700px) {
  body {
    padding-top: 116px;
  }

  .page {
    padding: 10px;
  }

  .topbar-inner {
    height: 116px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title menu"
      "search search";
    gap: 8px 10px;
  }

  .site-title {
    grid-area: title;
    font-size: 20px;
  }

  .menu-wrap {
    grid-area: menu;
  }

  .search-form {
    grid-area: search;
    width: 100%;
  }

  .search-form input,
  .search-form button {
    height: 42px;
    font-size: 16px;
  }

  .dropdown-menu {
    top: 46px;
  }

  .photo-grid {
    gap: 10px;
  }

  .masonry-col {
    gap: 10px;
  }
}

.photo-thumb {
    cursor: zoom-in;
}





.image-modal[hidden] {
    display: none;
}

.image-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(50, 50, 50, 1);
}

.image-modal-content {
    position: absolute;
    inset: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.image-modal-box {
    position: relative;
    box-sizing: border-box;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    padding: 14px;
    background: rgba(50,50,50,1);
    /*border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.65);*/
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.image-modal-imagewrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.image-modal-imagewrap img {
    display: block;
    max-width: calc(100vw - 80px);
    max-height: calc(100vh - 230px);
    width: auto;
    height: auto;
    object-fit: contain;
    background: #111;
}

.image-modal-caption {
    box-sizing: border-box;
    width: 100%;
    max-width: calc(100vw - 80px);

    min-height: 42px;
    max-height: 120px;
    overflow-y: auto;

    padding: 10px 12px;
    background: rgba(50,50,50,1);
    /*border: 1px solid #ddd;*/
    border-radius: 6px;

    color: #fff;
    font-size: 15px;
    line-height: 1.4;
    text-align: center;

    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.image-modal-close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 10000;
    width: 34px;
    height: 34px;
    border: 1px solid #ccc;
    border-radius: 50%;
    font-size: 26px;
    line-height: 30px;
    cursor: pointer;
    background: #fff;
    color: #111;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    pointer-events: auto;
}


.image-modal-nav {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 0 3px 3px 0;
    transition: 0.3s ease;
    pointer-events: auto;
    z-index: 10;
}

.image-modal-nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Bal és jobb oldalra rendezés */
.prev {
    left: 0;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}



body.modal-open {
    overflow: hidden;
}

[data-fullsrc] {
    cursor: zoom-in;
}


.page-loader {
    position: fixed;
    inset: 0;
    z-index: 20000;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(50, 50, 50, 1);
    color: #222;

    transition: opacity 220ms ease, visibility 220ms ease;
}

.page-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-loader-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;

    padding: 24px 28px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}

.page-loader-spinner {
    width: 38px;
    height: 38px;

    border: 4px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;

    animation: pageLoaderSpin 800ms linear infinite;
}

.page-loader-text {
    font-size: 15px;
    line-height: 1.3;
}

@keyframes pageLoaderSpin {
    to {
        transform: rotate(360deg);
    }
}



.image-modal-box {
    transition:
        opacity 220ms ease,
        transform 220ms ease;
    opacity: 1;
    transform: translateX(0);
    will-change: transform, opacity;
}

/* Régi tartalom jobbra kicsúszik */
.image-modal-box.slide-out-right {
    opacity: 0;
    transform: translateX(900px);
}

/* Régi tartalom balra kicsúszik */
.image-modal-box.slide-out-left {
    opacity: 0;
    transform: translateX(-900px);
}

/* Új tartalom bal oldalról indul */
.image-modal-box.prepare-from-left {
    transition: none;
    opacity: 0;
    transform: translateX(-900px);
}

/* Új tartalom jobb oldalról indul */
.image-modal-box.prepare-from-right {
    transition: none;
    opacity: 0;
    transform: translateX(900px);
}

/* Új tartalom középre érkezik */
.image-modal-box.slide-in {
    transition:
        opacity 220ms ease,
        transform 220ms ease;
    opacity: 1;
    transform: translateX(0);
}



.image-modal-message {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 20;

    padding: 8px 14px;
    border-radius: 999px;

    background: rgba(0, 0, 0, 0.75);
    color: #fff;

    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;

    opacity: 0;
    transition: opacity 180ms ease;
    pointer-events: none;
}

.image-modal-message.is-visible {
    opacity: 1;
}