/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #fff;
  color: #000;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  overflow: hidden;
}

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

/* ─── Mobile header (hidden on desktop) ────────────────── */
.mobile-header { display: none; }
.hamburger-btn { display: none; }

/* ─── Mobile nav overlay (always in DOM, shown via JS) ─── */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 145px 40px 40px;
  gap: 64px;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

body.nav-open {
  overflow: hidden;
}

.mobile-nav a {
  font-family: 'Montserrat', sans-serif;
  font-size: 32px;
  font-weight: 600;
  text-transform: lowercase;
  position: relative;
}

.mobile-nav a.is-active {
  text-decoration: line-through;
}

.mobile-nav-secondary {
  display: flex;
  flex-direction: column;
  gap: 64px;
  margin-top: 28px; /* parent gap (64px) + 28px = 92px separation from categories */
}

/* ─── Site wrapper (3-column layout) ──────────────────── */
.site-wrapper {
  max-width: 1600px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  gap: 52px;
  padding: 0 80px; /* pionowy padding na kolumnach */
}

/* ─── Left column: logo | side-nav | Prints ────────────── */
.col-left {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100vh;
  padding-top: 40px;
  padding-bottom: 90px; /* rezerwuje miejsce dla absolutnie pozycjonowanego nav-prints */
}

.site-logo img {
  display: block;
  height: 56px;
  width: auto;
}

/* Side-nav: always visible, centered between logo and Prints */
.side-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.side-nav a {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 600;
  text-transform: lowercase;
  position: relative;
  white-space: nowrap;
}

.side-nav a.is-active {
  text-decoration: line-through;
}

.nav-prints {
  position: absolute;
  bottom: 40px;
  left: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 32px;
  font-weight: 600;
  white-space: nowrap;
}

/* ─── Middle column (only this scrolls) ───────────────── */
.col-middle {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-top: 40px; /* grid 40px od górnej krawędzi viewport */
  scrollbar-width: none;
}

.col-middle::-webkit-scrollbar { display: none; }

/* ─── Right column: Info (top) | Insta (bottom) ────────── */
.col-right {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  height: 100vh;
  padding-top: 40px;
}

.nav-info {
  font-family: 'Montserrat', sans-serif;
  font-size: 32px;
  font-weight: 600;
  position: relative;
  white-space: nowrap;
}

.nav-insta {
  position: absolute;
  bottom: 40px;
  right: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 32px;
  font-weight: 600;
  white-space: nowrap;
}

/* ─── Hover underline (all nav links) ─────────────────── */
.side-nav a::after,
a.nav-prints::after,
a.nav-info::after,
a.nav-insta::after,
.mobile-nav a::after {
  content: '';
  position: absolute;
  background-color: #000;
  height: 1px;
  left: -4px;
  width: 0;
  top: 50%;
  transition: width 0.3s ease-in-out;
}

.side-nav a:hover::after,
a.nav-prints:hover::after,
a.nav-info:hover::after,
a.nav-insta:hover::after,
.mobile-nav a:hover::after {
  width: calc(100% + 8px);
}

/* ─── Page entry animation ─────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.site-main {
  width: 100%;
  padding-bottom: 40px;
  opacity: 0;
  animation: fadeInUp 0.5s ease 0.1s forwards;
}

/* ─── Photo Grid ───────────────────────────────────────── */
.photo-grid {
  width: min(960px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.photo-row {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: flex-start;
}

.photo-tile {
  display: block;
  min-width: 0;
  cursor: zoom-in;
  overflow: hidden;
}

.photo-tile img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.25s ease;
}

.photo-tile:hover img {
  opacity: 0.85;
}

/* ─── Width classes ────────────────────────────────────── */
.pw-small  { flex-basis: 30%; }
.pw-medium { flex-basis: 45%; }
.pw-large  { flex-basis: 65%; }
.pw-full   { flex-basis: 100%; }

/* ─── Freeform grid (WYSIWYG placement) ───────────────── */
.photo-grid-freeform {
  position: relative;
  width: 960px;
  margin: 0 auto;
  transform-origin: top left;
}

/* ─── WordPress admin bar compensation ────────────────── */
/* WP adds margin-top: 32px to <html> when admin bar is visible,
   pushing col heights (100vh) 32px past the viewport bottom.   */
.admin-bar body,
.admin-bar .site-wrapper,
.admin-bar .col-left,
.admin-bar .col-middle,
.admin-bar .col-right {
  height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
  /* Admin bar is 46px tall on smaller screens */
  .admin-bar body,
  .admin-bar .site-wrapper,
  .admin-bar .col-left,
  .admin-bar .col-middle,
  .admin-bar .col-right {
    height: calc(100vh - 46px);
  }
}

/* ─── Info page ────────────────────────────────────────── */
.info-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}

/* Gutenberg Columns block inside info page */
.info-page .wp-block-columns {
  gap: 60px;
}

.info-page .wp-block-column > *:first-child { margin-top: 0; }

.info-page h2,
.info-page h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  font-weight: 500;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.info-page p {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}
.info-page a:hover { opacity: 0.5; }

/* ─── Dark theme (info page) ───────────────────────────── */
.theme-dark {
  background: #000;
  color: #fff;
}

.theme-dark .site-logo img {
  filter: invert(1);
}

.theme-dark .side-nav a::after,
.theme-dark a.nav-prints::after,
.theme-dark a.nav-info::after,
.theme-dark a.nav-insta::after,
.theme-dark .mobile-nav a::after {
  background-color: #fff;
}

.theme-dark .mobile-header {
  background: #000;
  border-bottom-color: #fff;
}

.theme-dark .hamburger-btn span {
  background: #fff;
}

.theme-dark .mobile-nav {
  background: #000;
}

/* ─── 404 ──────────────────────────────────────────────── */
.error-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 100px 20px;
  text-align: center;
}

.error-page h1 {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ─── Mobile ───────────────────────────────────────────── */
@media (max-width: 920px) {
  body { overflow: auto; height: auto; }

  /* Mobile header bar */
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px;
    border-bottom: 1px solid #000;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 202; /* above mobile-nav overlay (z-index: 200) */
  }

  /* Current page title — centered between logo and hamburger */
  .mobile-page-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 600;
    text-transform: lowercase;
    white-space: nowrap;
    pointer-events: none;
  }

  /* Hamburger button */
  .hamburger-btn {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 201;
    position: relative;
  }

  .hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: #000;
    transition: transform 0.25s ease, opacity 0.25s ease;
    transform-origin: center;
  }

  .hamburger-btn.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger-btn.open span:nth-child(2) { opacity: 0; }
  .hamburger-btn.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* Desktop columns: hidden on mobile */
  .col-left  { display: none; }
  .col-right { display: none; }

  /* Site wrapper: strip desktop layout */
  .site-wrapper {
    height: auto;
    padding: 0;
    gap: 0;
  }

  /* Middle column: full width, natural scroll */
  .col-middle {
    overflow-y: visible;
    height: auto;
    padding-top: 20px;
    padding-bottom: 40px;
    width: 100%;
  }

  /* Grid: full width on mobile */
  .photo-grid,
  .photo-grid-freeform { width: 100%; }

  .photo-row { flex-direction: column; gap: 20px; }
  .photo-tile {
    flex-basis: 100% !important;
    margin-top: 0 !important;
    width: 100%;
  }

  .photo-grid-freeform {
    position: static;
    height: auto !important;
    transform: none !important;
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 20px;
  }

  .photo-grid-freeform .photo-tile {
    position: static !important;
    width: 100% !important;
  }

  /* Mobile nav font size */
  .mobile-nav a { font-size: 28px; }

}
