.mi-photography {
  padding-bottom: 70px
}

.mi-photo-heading {
  text-align: center;
  padding: 75px 0 45px
}

.mi-photo-heading h1 {
  font-size: clamp(48px,7vw,88px);
  margin: 12px 0 20px
}

.mi-photo-heading>p:last-child {
  color: var(--muted);
  font-size: 18px
}

.mi-photo-breadcrumb {
  padding-top: 30px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.mi-photo-content {
  overflow-wrap: anywhere
}

.mi-photo-content>p,.mi-photo-content>h2,.mi-photo-content>h3 {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto
}

.mi-photo-content>p {
  color: var(--muted)
}

.mi-photo-content:empty {
  display: none
}

.mi-photo-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 24px
}

.mi-photo-section-heading h2 {
  font-size: 32px;
  margin: 0
}

.mi-photo-section-heading p {
  font-size: 13px;
  color: var(--muted);
  margin: 0
}

.mi-photo-cards {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px
}

.mi-photo-card {
  position: relative;
  display: flex;
  align-items: end;
  min-height: 380px;
  aspect-ratio: 1.5;
  overflow: hidden;
  background: #222;
  color: #fff;
  text-decoration: none
}

.mi-photo-card>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: transform .5s
}

.mi-photo-card:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg,rgba(0,0,0,.85),rgba(0,0,0,.12) 65%,transparent)
}

.mi-photo-card:hover {
  color: #fff
}

.mi-photo-card:hover>img {
  transform: scale(1.025)
}

.mi-photo-card-copy {
  position: relative;
  z-index: 1;
  padding: 32px;
  max-width: 100%
}

.mi-photo-card-copy h3 {
  font-size: clamp(32px,4vw,48px);
  margin: 0 0 12px
}

.mi-photo-card-copy p {
  font-size: 14px;
  margin-bottom: 16px
}

.mi-photo-card-copy>span {
  font-size: 12px;
  letter-spacing: .06em
}

.mi-photo-back {
  border-top: 1px solid var(--line);
  margin-top: 45px;
  padding-top: 25px;
  font-size: 14px
}

@media(max-width:600px) {

.mi-photo-heading {
  padding: 45px 0 25px
}

.mi-photo-card-copy {
  padding: 24px
}

.mi-photo-section-heading {
  align-items: start;
  flex-direction: column;
  gap: 8px
}

.mi-photo-breadcrumb {
  padding-top: 22px
}

.mi-photo-content .wp-block-gallery .wp-block-image {
  flex-basis: 100%!important
}
}

.mi-photo-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 8px
}

.mi-photo-filters[hidden] {
  display: none
}

.mi-photo-filters button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 13px
}

.mi-photo-filters button[aria-pressed=true] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff
}

.mi-photo-results {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  min-height: 1.6em;
  margin: 8px 0
}

.mi-photo-content .wp-block-gallery {
  margin: 36px 0
}

.mi-photo-content .wp-block-gallery .wp-block-image {
  align-self: start
}

.mi-photo-content .wp-block-gallery .wp-block-image img {
  cursor: zoom-in;
  background: none
}
/* =========================================================
   FOTOGRAFIA — GALERIE NA PODSTRONACH
   Pełne kadry, bez wymuszania proporcji 3:2
   ========================================================= */

.mi-photo-content .wp-block-gallery:not(.mi-photo-masonry) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px !important;
}

.mi-photo-content .wp-block-gallery > .wp-block-image {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.mi-photo-content .wp-block-gallery .wp-block-image a {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
}

.mi-photo-content .wp-block-gallery .wp-block-image img {
  display: block !important;
  position: static !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  margin: 0 !important;
}

/* =========================================================
   FOTOGRAFIA — ZBIORCZA MOZAIKA
   ========================================================= */

.mi-photo-content .mi-photo-masonry.wp-block-gallery {
  display: block !important;
  column-count: 3 !important;
  column-width: auto !important;
  column-gap: 8px !important;
  margin: 24px 0 !important;
}

.mi-photo-content .mi-photo-masonry.wp-block-gallery
> .wp-block-image {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  float: none !important;
  break-inside: avoid;
}

.mi-photo-content .mi-photo-masonry.wp-block-gallery
> .wp-block-image[hidden] {
  display: none !important;
}

@media (max-width: 1000px) {

.mi-photo-content .mi-photo-masonry.wp-block-gallery {
  column-count: 2 !important;
}
}

@media (max-width: 600px) {

.mi-photo-content .wp-block-gallery:not(.mi-photo-masonry) {
  grid-template-columns: 1fr;
}

.mi-photo-content .mi-photo-masonry.wp-block-gallery {
  column-count: 1 !important;
}
}

/* Bez ramki pozostającej po zamknięciu lightboxa */

.mi-photo-content .wp-block-gallery a:focus,
.mi-photo-content .wp-block-gallery a:focus-visible,
.mi-photo-content .wp-block-gallery .wp-block-image:focus,
.mi-photo-content .wp-block-gallery .wp-block-image:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Kafle regionów mieszczą się w szerokości telefonu */

@media (max-width: 600px) {

.mi-photography .mi-photo-cards {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
}

.mi-photography .mi-photo-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  height: clamp(260px, 75vw, 360px);
  aspect-ratio: auto;
}

.mi-photography .mi-photo-card-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}
}
/* Ukryj podpisy i ciemne paski na zdjęciach galerii */

.mi-photography .wp-block-gallery figcaption {
  display: none !important;
}
/* Przewodniki powiązane z albumem — końcowy układ */

.mi-photography .mi-photo-guides {
  display: block;
  margin: 36px 0;
  padding: 32px;
  background: #f5f4f0;
  border: 1px solid #deded7
}

.mi-photography .mi-photo-guides>.eyebrow {
  margin: 0 0 10px;
  color: #696962
}

.mi-photography .mi-photo-guides>h2 {
  margin: 0 0 26px;
  font-size: clamp(26px,3vw,36px)
}

.mi-photography .mi-photo-guides>ul {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none
}

.mi-photography .mi-photo-guides li {
  display: flex;
  margin: 0;
  min-width: 0
}

.mi-photography .mi-photo-guides li a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 90px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #deded7;
  color: #191918;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background .2s,color .2s
}

.mi-photography .mi-photo-guides li a:hover {
  background: #191918;
  color: #fff
}

.mi-photography .mi-photo-guides>ul>li:only-child {
  grid-column: 1/-1
}

@media(max-width:700px) {

.mi-photography .mi-photo-guides {
  padding: 24px
}

.mi-photography .mi-photo-guides>ul {
  grid-template-columns: minmax(0,1fr)
}

.mi-photography .mi-photo-guides li a {
  min-height: 72px;
  padding: 18px 20px
}
}
