/* ==================================================
   CENTRO YOGA FINALE — ALBUM FOTOGRAFICI
   ================================================== */

.cyf-album-grid,
.cyf-album-single,
.cyf-album-single * {
  box-sizing: border-box;
}

.cyf-album-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 30px;
}

.cyf-album-card {
  position: relative;
  grid-column: span 6;
  min-height: 440px;
  overflow: hidden;
  background: #cbc1b2;
}

.cyf-album-card:nth-child(4n + 1),
.cyf-album-card:nth-child(4n + 4) {
  grid-column: span 7;
}

.cyf-album-card:nth-child(4n + 2),
.cyf-album-card:nth-child(4n + 3) {
  grid-column: span 5;
}

.cyf-album-card:last-child:nth-child(odd),
.cyf-album-card.is-archive:last-child {
  grid-column: span 12;
  min-height: 390px;
}

.cyf-album-card > a {
  position: absolute;
  inset: 0;
  display: block;
  color: #fff !important;
}

.cyf-album-card img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform .55s ease;
}

.cyf-album-card > a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(32, 33, 31, .02) 28%, rgba(32, 33, 31, .82) 100%);
}

.cyf-album-card:hover img,
.cyf-album-card:focus-within img {
  transform: scale(1.025);
}

.cyf-album-card.is-archive img {
  filter: saturate(.78);
}

.cyf-album-card__copy {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 35px 38px;
}

.cyf-album-card__label {
  display: block;
  margin-bottom: 11px;
  color: #f1b29a;
  font-family: "Lato", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.cyf-album-card h3 {
  margin: 0 0 13px;
  color: #fff !important;
  font-family: "Cormorant Garamond", serif !important;
  font-size: clamp(36px, 3vw, 48px) !important;
  font-weight: 500 !important;
  letter-spacing: -.02em;
  line-height: 1 !important;
}

.cyf-album-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #fff;
  font-family: "Lato", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.cyf-album-card__meta span:last-child {
  font-size: 22px;
  font-weight: 400;
  transition: transform .25s ease;
}

.cyf-album-card:hover .cyf-album-card__meta span:last-child,
.cyf-album-card:focus-within .cyf-album-card__meta span:last-child {
  transform: translateX(5px);
}

.cyf-album-empty {
  padding: 48px;
  border: 1px solid rgba(53, 55, 53, .22);
  background: #f8f4ed;
  color: #353735;
}

/* Pagina singola album. */

.cyf-album-single {
  overflow-x: clip;
  overflow-y: visible;
  background: #f8f4ed;
  color: #353735;
}

.cyf-album-single-hero {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  align-items: end;
  gap: 80px;
  width: calc(100% - 96px);
  max-width: 1360px;
  margin: 0 auto;
  padding: 140px 0 78px;
}

.cyf-album-single-hero__title > span {
  display: block;
  margin-bottom: 20px;
  color: #c9866b;
  font-family: "Lato", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.cyf-album-single-hero h1 {
  margin: 0;
  color: #353735 !important;
  font-family: "Cormorant Garamond", serif !important;
  font-size: clamp(62px, 6vw, 86px) !important;
  font-weight: 500 !important;
  letter-spacing: -.035em;
  line-height: .95 !important;
}

.cyf-album-single-hero__copy > p,
.cyf-album-single-intro,
.cyf-album-single-intro p {
  margin: 0 0 14px;
  color: #353735;
  font-family: "Lato", sans-serif;
  font-size: 18px;
  line-height: 1.72;
}

.cyf-album-single-intro p:last-child {
  margin-bottom: 0;
}

.cyf-album-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  width: calc(100% - 96px);
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 0 60px;
}

.cyf-album-single-meta > div {
  min-width: 175px;
  padding-top: 16px;
  border-top: 1px solid rgba(53, 55, 53, .24);
}

.cyf-album-single-meta span,
.cyf-album-single-meta strong {
  display: block;
  font-family: "Lato", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.45;
  text-transform: uppercase;
}

.cyf-album-single-meta span {
  margin-bottom: 5px;
  color: #c9866b;
}

.cyf-album-single-gallery {
  --cyf-album-photo-gap: 20px;
  width: calc(100% - 96px);
  max-width: 1360px;
  margin: 0 auto !important;
  padding: 0 0 120px;
  overflow: visible !important;
}

.cyf-album-single-gallery > ul {
  display: block;
  width: 100%;
  columns: 2;
  column-gap: var(--cyf-album-photo-gap);
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.cyf-album-single-gallery li,
.cyf-album-single-gallery li:nth-child(n) {
  position: relative;
  display: inline-block;
  float: none !important;
  width: 100% !important;
  height: auto !important;
  grid-column: auto;
  grid-row: auto;
  break-inside: avoid;
  page-break-inside: avoid;
  overflow: hidden;
  margin: 0 0 var(--cyf-album-photo-gap) !important;
  padding: 0 !important;
  vertical-align: top;
  background: #cbc1b2;
}

.cyf-album-single-gallery a,
.cyf-album-single-gallery img {
  display: block;
  width: 100%;
}

.cyf-album-single-gallery a {
  position: relative;
  height: auto;
  overflow: hidden;
  color: #fff !important;
  cursor: zoom-in;
}

.cyf-album-single-gallery a.has-ratio {
  aspect-ratio: var(--cyf-album-ratio);
}

.cyf-album-single-gallery img {
  height: auto !important;
  margin: 0;
  object-fit: contain;
  transition: transform .45s ease;
}

.cyf-album-single-gallery a.has-ratio img {
  position: absolute;
  inset: 0;
  height: 100% !important;
}

.cyf-album-single-gallery a::after {
  content: "+";
  position: absolute;
  right: 18px;
  bottom: 12px;
  z-index: 2;
  color: #fff;
  font-family: "Lato", sans-serif;
  font-size: 28px;
  line-height: 1;
  opacity: 0;
  text-shadow: 0 1px 7px rgba(0, 0, 0, .65);
  transition: opacity .25s ease;
}

.cyf-album-single-gallery a:hover img,
.cyf-album-single-gallery a:focus img {
  transform: scale(1.025);
}

.cyf-album-single-gallery a:hover::after,
.cyf-album-single-gallery a:focus::after {
  opacity: 1;
}

.cyf-album-single-gallery a:focus-visible {
  outline: 3px solid #6f3125;
  outline-offset: 4px;
}

.cyf-album-single-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  padding: 42px 16px 13px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .65));
  color: #fff;
  font-family: "Lato", sans-serif;
  font-size: 12px;
  line-height: 1.45;
}

/*
 * Roneous include Lightbox2 con un posizionamento assoluto a 50 px dal bordo
 * superiore. Nell'album lo centriamo rispetto alla finestra del browser senza
 * alterare le dimensioni calcolate dallo script o il funzionamento delle frecce.
 */
:is(.single-cyf_album, .has-cyf-photo-grid) .lightboxOverlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
}

:is(.single-cyf_album, .has-cyf-photo-grid) .lightbox {
  position: fixed !important;
  top: 50% !important;
  right: 0 !important;
  bottom: auto !important;
  left: 0 !important;
  width: 100% !important;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow-y: auto;
  transform: translateY(-50%);
  overscroll-behavior: contain;
}

:is(.single-cyf_album, .has-cyf-photo-grid) .lb-outerContainer,
:is(.single-cyf_album, .has-cyf-photo-grid) .lb-dataContainer {
  max-width: calc(100vw - 32px);
}

.cyf-album-single-back {
  padding: 0 !important;
  background: #ded6ca;
}

.cyf-album-single-back > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: calc(100% - 96px);
  max-width: 1360px;
  margin: 0 auto;
  padding: 52px 0;
}

.cyf-album-single-back h2 {
  margin: 0;
  color: #353735 !important;
  font-family: "Cormorant Garamond", serif !important;
  font-size: clamp(34px, 3vw, 44px) !important;
  font-weight: 500 !important;
  line-height: 1.08 !important;
}

.cyf-album-single-back a {
  flex: none;
  padding-bottom: 7px;
  border-bottom: 1px solid #c9866b;
  color: #353735 !important;
  font-family: "Lato", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.3;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .cyf-album-grid { gap: 20px; }
  .cyf-album-card,
  .cyf-album-card:nth-child(n) { grid-column: span 6; min-height: 400px; }
  .cyf-album-card.is-archive:last-child { grid-column: span 6; }
  .cyf-album-card.is-archive:last-child:nth-child(odd) { grid-column: span 12; }
  .cyf-album-single-hero { grid-template-columns: 1fr; gap: 35px; width: calc(100% - 50px); padding-top: 125px; }
  .cyf-album-single-meta,
  .cyf-album-single-gallery,
  .cyf-album-single-back > div { width: calc(100% - 50px); }
  .cyf-album-single-gallery > ul { columns: 2; }
}

@media (max-width: 600px) {
  .cyf-album-grid { grid-template-columns: 1fr; gap: 18px; }
  .cyf-album-card,
  .cyf-album-card:nth-child(n),
  .cyf-album-card.is-archive:last-child { grid-column: auto; min-height: 390px; }
  .cyf-album-card__copy { padding: 28px 22px; }
  .cyf-album-card h3 { font-size: 37px !important; }
  .cyf-album-single-hero { width: calc(100% - 36px); padding: 118px 0 46px; }
  .cyf-album-single-hero h1 { font-size: clamp(48px, 14vw, 58px) !important; }
  .cyf-album-single-hero__copy > p,
  .cyf-album-single-intro,
  .cyf-album-single-intro p { font-size: 16px; line-height: 1.7; }
  .cyf-album-single-meta { width: calc(100% - 36px); gap: 14px; padding-bottom: 45px; }
  .cyf-album-single-meta > div { flex: 1 1 135px; min-width: 0; }
  .cyf-album-single-gallery { --cyf-album-photo-gap: 14px; width: calc(100% - 36px); padding-bottom: 72px; }
  .cyf-album-single-gallery > ul { columns: 1; }
  .cyf-album-single-gallery a::after { display: none; }
  .cyf-album-single-back > div { display: block; width: calc(100% - 36px); padding: 42px 0; }
  .cyf-album-single-back h2 { font-size: 37px !important; }
  .cyf-album-single-back a { display: inline-block; margin-top: 25px; min-height: 44px; }
  .cyf-album-empty { padding: 32px 22px; }
  :is(.single-cyf_album, .has-cyf-photo-grid) .lightbox { max-height: calc(100dvh - 24px); }
  :is(.single-cyf_album, .has-cyf-photo-grid) .lb-outerContainer,
  :is(.single-cyf_album, .has-cyf-photo-grid) .lb-dataContainer { max-width: calc(100vw - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  .cyf-album-card img,
  .cyf-album-single-gallery img,
  .cyf-album-card__meta span:last-child { transition: none; }
}

/* Galleria di miniature incorporabile nelle pagine WPBakery. */
.cyf-photo-grid,
.cyf-photo-grid * {
  box-sizing: border-box;
}

.cyf-photo-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.cyf-photo-grid > li,
.cyf-photo-grid > li:nth-child(n) {
  float: none !important;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.cyf-photo-grid > li > a {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ded6ca;
  cursor: zoom-in;
}

.cyf-photo-grid > li > a:focus-visible {
  outline: 3px solid #6f3125;
  outline-offset: 4px;
}

.cyf-photo-grid > li > a > img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  object-fit: cover;
  object-position: center;
  transition: transform .25s ease;
}

.cyf-photo-grid > li > a:hover > img,
.cyf-photo-grid > li > a:focus-visible > img {
  transform: scale(1.04);
}

@media (max-width: 1199px) {
  .cyf-photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .cyf-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cyf-photo-grid > li > a > img { transition: none; }
}
