/*
Theme Name: Astra Child — Aleksandra Szczepanek
Theme URI: https://www.aleksandraszczepanek.pl
Description: Child theme for Aleksandra Szczepanek Beauty Expert — minimalist bridal site.
Author: Aleksandra Szczepanek
Template: astra
Version: 1.0.0
Text Domain: astra-child-as
*/


/* Galerie na podstronach usług (Makijaże / Fryzury / All day) — równe kadry */
.as-el-stack .gallery .gallery-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}

/* Menu: jasny panel zawsze z ciemnym tekstem (na ciemnych sekcjach linki robiły się białe i znikały na telefonie) */
html[data-page-tone] body.as-luxury .as-mega__panel,
html[data-page-tone] body.as-luxury .as-mega__panel a:not(.as-btn),
html[data-page-tone] body.as-luxury .as-mega__panel p,
html[data-page-tone] body.as-luxury .as-mega__panel .as-mega__close,
html[data-page-tone] body.as-luxury .as-mega__panel .as-mega__close span {
  color: var(--as-ink);
}

/* Strona główna na telefonie: krótszy podgląd portfolio (całość pod przyciskiem „Zobacz całe portfolio”) */
@media (max-width: 767px) {
  body.as-front .as-el-portfolio .as-mosaic__item:nth-child(n+9) {
    display: none;
  }
}

/* Galerie usług: siatka 3 kolumny (telefon: 2) */
.as-el-stack .gallery {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}
.as-el-stack .gallery .gallery-item {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.as-el-stack .gallery br { display: none; }
@media (max-width: 767px) {
  .as-el-stack .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ======================================================================
 * Strona główna — Realizacje „wężyk” (kolaż zdjęć, który układa się w środku ekranu)
 * ==================================================================== */
.as-el-portfolio { overflow-x: clip; }
.as-snake {
  position: relative;
  width: 100%;
  max-width: 1320px;
  margin: clamp(1.5rem, 4vw, 3rem) auto clamp(1rem, 3vw, 2rem);
}
.as-snake__item {
  position: absolute;
  margin: 0;
  opacity: 0;
  will-change: transform, opacity;
  transform-origin: 50% 50%;
}
.as-snake__inner {
  background: #fff;
  padding: clamp(4px, 0.55vw, 9px);
  box-shadow: 0 22px 45px -28px rgba(0, 0, 0, 0.45);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.7s ease;
}
.as-snake__inner img {
  display: block;
  width: 100%;
  height: auto;
}
.as-snake__item:hover { z-index: 500 !important; }
.as-snake__item:hover .as-snake__inner {
  transform: scale(1.14);
  box-shadow: 0 35px 70px -30px rgba(0, 0, 0, 0.55);
}
.as-snake__word {
  position: absolute;
  z-index: 0;
  font-size: clamp(11px, 0.95vw, 14px);
  letter-spacing: 0.08em;
  color: var(--as-ink);
  opacity: 0.75;
  white-space: nowrap;
  pointer-events: none;
}
/* bez JS: zwykła siatka zamiast wężyka */
.as-snake:not(.is-ready) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.as-snake:not(.is-ready) .as-snake__item { position: static; opacity: 1; }
.as-snake:not(.is-ready) .as-snake__word { display: none; }
@media (prefers-reduced-motion: reduce) {
  .as-snake__item { opacity: 1 !important; }
  .as-snake__inner { transition: none; }
}

/* ======================================================================
 * Portfolio — zdjęcia w naturalnych proporcjach (bez ucinania), układ masonry
 * ==================================================================== */
.as-mosaic {
  display: block !important;
  columns: 4 220px;
  column-gap: clamp(0.55rem, 1.2vw, 0.95rem);
}
.as-mosaic .as-mosaic__item,
.as-mosaic .as-mosaic__item:nth-child(n) {
  display: block;
  break-inside: avoid;
  margin: 0 0 clamp(0.55rem, 1.2vw, 0.95rem) !important;
  grid-column: auto !important;
  grid-row: auto !important;
  background: transparent;
}
.as-mosaic .as-mosaic__img,
.as-mosaic .as-mosaic__item img {
  width: 100%;
  height: auto !important;
  object-fit: contain !important;
  transform: none;
  animation: none !important;
}
.as-mosaic .as-mosaic__item:hover img { transform: scale(1.03); }
@media (max-width: 767px) {
  .as-mosaic { columns: 2; column-gap: 0.5rem; }
  .as-mosaic .as-mosaic__item { margin-bottom: 0.5rem !important; }
}

/* ======================================================================
 * Portfolio — rozsypana galeria (pływające zdjęcia + powiększenie na cały ekran)
 * ==================================================================== */
.as-mosaic.as-scatter {
  display: block !important;
  columns: auto !important;
  position: relative;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 !important;
}
.as-mosaic.as-scatter .as-mosaic__item,
.as-mosaic.as-scatter .as-mosaic__item:nth-child(n) {
  position: absolute !important;
  margin: 0 !important;
  overflow: visible;
  background: transparent;
  cursor: zoom-in;
  opacity: 0;
  filter: none !important;
  transition: opacity 0.9s ease;
  will-change: transform;
}
.as-mosaic.as-scatter .as-mosaic__item.is-shown { opacity: 1; }
.as-mosaic.as-scatter .as-mosaic__item::after { display: none; }
.as-mosaic.as-scatter .as-mosaic__item img {
  width: 100%;
  height: auto !important;
  object-fit: contain !important;
  animation: none !important;
  filter: none !important;
  transform: scale(0.86) !important;
  box-shadow: 0 16px 34px -22px rgba(0, 0, 0, 0.45);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
}
.as-mosaic.as-scatter .as-mosaic__item.is-shown img { transform: scale(1) !important; }
.as-mosaic.as-scatter .as-mosaic__item:hover { z-index: 60 !important; }
.as-mosaic.as-scatter .as-mosaic__item.is-shown:hover img {
  transform: scale(1.07) !important;
  box-shadow: 0 28px 55px -26px rgba(0, 0, 0, 0.55);
}
.as-zoom {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(242, 239, 234, 0);
  cursor: zoom-out;
  transition: background 0.6s ease;
}
.as-zoom.is-open { background: rgba(242, 239, 234, 0.97); }
.as-zoom__img {
  position: fixed;
  margin: 0;
  max-width: none;
  transform-origin: 0 0;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.55);
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.as-zoom__close {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 18px;
  z-index: 2;
  border: 0;
  background: none;
  font-size: 30px;
  line-height: 1;
  color: var(--as-ink);
  opacity: 0;
  transition: opacity 0.4s ease 0.3s;
  cursor: pointer;
}
.as-zoom.is-open .as-zoom__close { opacity: 0.8; }
@media (prefers-reduced-motion: reduce) {
  .as-mosaic.as-scatter .as-mosaic__item,
  .as-mosaic.as-scatter .as-mosaic__item img,
  .as-zoom__img { transition: none !important; }
}

/* ======================================================================
 * Megamenu — wersja minimalistyczna (nawigacja + „na skróty”)
 * ==================================================================== */
.as-mega__grid { grid-template-columns: 1.6fr 1fr; }
.as-mega__col--aside { padding-top: 0.4rem; }
.as-mega__col--aside .as-mega__label + .as-mega__mini { margin-bottom: 2rem; }
.as-mega__mini { list-style: none; margin: 0; padding: 0; }
.as-mega__mini li { margin: 0 0 0.55rem; }
.as-mega__mini a {
  color: var(--as-ink);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
  word-break: break-word;
}
.as-mega__mini a:hover { border-color: currentColor; }
@media (max-width: 767px) {
  .as-mega__grid { grid-template-columns: 1fr; }
  .as-mega__col--aside { padding-top: 0; }
}

/* ======================================================================
 * Strona „Usługi” — edytorskie karty
 * ==================================================================== */
.as-svc {
  background: var(--as-cream);
  padding: clamp(2.5rem, 7vw, 6rem) var(--as-pad) clamp(3rem, 8vw, 7rem);
  font-family: var(--as-font);
  color: var(--as-ink);
}
.as-svc__intro {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 3rem;
}
.as-svc__eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--as-muted);
}
.as-svc__title {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 0.95;
}
.as-svc__lead {
  margin: 0;
  max-width: 26rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--as-muted);
}
.as-svc__grid {
  max-width: 1200px;
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.2vw, 28px);
}
.as-svc__help {
  max-width: 1200px;
  margin: clamp(2.5rem, 6vw, 4.5rem) auto 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 2rem;
  text-align: center;
}
.as-svc__help p { margin: 0; font-size: 1.05rem; }

.as-card {
  container-type: inline-size;
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #fff;
  color: var(--as-ink) !important;
  text-decoration: none !important;
  box-shadow: 0 30px 60px -48px rgba(0, 0, 0, 0.45);
  transition: transform 0.6s var(--as-ease), box-shadow 0.6s var(--as-ease);
}
.as-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 40px 70px -45px rgba(0, 0, 0, 0.5);
}
.as-card > span { position: absolute; display: block; }
.as-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--as-ease);
}
.as-card:hover img { transform: scale(1.045); }
.as-card__media { overflow: hidden; }
.as-card__tag {
  font-size: 4.6cqw;
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.as-card__num, .as-card__name {
  font-size: 4.6cqw;
  line-height: 1.08;
  font-weight: 400;
}
.as-card__meta {
  font-size: clamp(8px, 1.7cqw, 11px);
  line-height: 1.35;
  letter-spacing: 0.04em;
  color: var(--as-muted);
}
.as-card__big {
  font-size: 21cqw;
  line-height: 0.78;
  font-weight: 500;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.as-card__big em { font-style: normal; color: var(--as-gold); }
.as-card__no {
  font-size: clamp(9px, 1.8cqw, 12px);
  letter-spacing: 0.12em;
  color: var(--as-gold);
}
.as-card__more {
  font-size: clamp(9px, 1.9cqw, 12px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s var(--as-ease);
}
.as-card:hover .as-card__more,
.as-card:focus-visible .as-card__more { opacity: 1; transform: none; }
@media (hover: none) {
  .as-card__more { opacity: 1; transform: none; }
}
.as-ring {
  display: inline-block;
  padding: 0 0.45em;
  border: 1.5px solid var(--as-gold);
  border-radius: 999px;
  line-height: 1.05;
}

/* 01 — Ślub: zdjęcie po prawej, wielkie litery */
.as-card--a .as-card__media { top: 0; right: 0; bottom: 0; width: 50%; }
.as-card--a .as-card__meta--top { top: 4.5cqw; left: 5cqw; }
.as-card--a .as-card__tag { top: 26cqw; left: 5cqw; width: 42%; }
.as-card--a .as-card__big { left: 3.5cqw; bottom: 3.2cqw; z-index: 2; mix-blend-mode: multiply; }
.as-card--a .as-card__no { top: 4.5cqw; right: 52.5%; }
.as-card--a .as-card__more { bottom: 4.5cqw; right: 52.5%; display: none; }

/* 02 — Lekcja: tekst u góry, tryptyk na dole */
.as-card--b .as-card__star { top: 6cqw; left: 26cqw; font-size: 8cqw; line-height: 1; color: var(--as-gold); }
.as-card--b .as-card__tag { top: 10cqw; left: 50%; }
.as-card--b .as-card__num { top: 20.5cqw; left: 50%; }
.as-card--b .as-card__name { top: 26cqw; left: 50%; color: var(--as-muted); font-size: 3.2cqw; }
.as-card--b .as-card__trip { left: 0; right: 0; bottom: 0; height: 47%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #fff; }
.as-card--b .as-card__no { top: 4.5cqw; left: 5cqw; }
.as-card--b .as-card__more { top: 4.5cqw; right: 5cqw; }

/* 03 — Makijaże: zdjęcie na całość, tekst na zdjęciu */
.as-card--c .as-card__media { inset: 0; }
.as-card--c .as-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.25) 100%);
  pointer-events: none;
}
.as-card--c .as-card__tag,
.as-card--c .as-card__side,
.as-card--c .as-card__more { color: #fff; z-index: 2; }
.as-card--c .as-card__tag { top: 8cqw; left: 6cqw; font-size: 6.2cqw; }
.as-card--c .as-card__side { top: 8cqw; right: 6cqw; text-align: right; font-size: 4.4cqw; line-height: 1.12; }
.as-card--c .as-ring { border-color: #fff; }
.as-card--c .as-card__no { bottom: 4.5cqw; left: 6cqw; z-index: 2; color: #fff; }
.as-card--c .as-card__more { bottom: 4.5cqw; right: 6cqw; }

/* 04 — All day: kolumna tekstu + zdjęcie, litery z rozstrzeleniem */
.as-card--d .as-card__media { top: 0; right: 0; bottom: 0; width: 46%; }
.as-card--d .as-card__meta--col { top: 4.5cqw; left: 5cqw; width: 30%; }
.as-card--d .as-card__tag { top: 30cqw; left: 5cqw; width: 46%; }
.as-card--d .as-card__spaced {
  left: 5cqw;
  right: 4cqw;
  bottom: 3.5cqw;
  display: flex;
  justify-content: space-between;
  z-index: 2;
  font-size: 3.4cqw;
  letter-spacing: 0.1em;
  color: var(--as-gold);
}
.as-card--d .as-card__spaced i { font-style: normal; }
.as-card--d .as-card__spaced i:nth-child(n+5) { color: #fff; }
.as-card--d .as-card__no { top: 4.5cqw; left: 48%; }

/* 05 — Fryzury: zdjęcie w lewym dolnym rogu, tekst pionowy */
.as-card--e .as-card__tag { top: 6cqw; left: 5cqw; }
.as-card--e .as-card__name { top: 17cqw; left: 5cqw; color: var(--as-muted); font-size: 3.2cqw; }
.as-card--e .as-card__media { left: 0; bottom: 0; width: 58%; height: 58%; }
.as-card--e .as-card__vert {
  top: 6cqw;
  right: 5cqw;
  writing-mode: vertical-rl;
  font-size: clamp(8px, 1.9cqw, 12px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--as-muted);
}
.as-card--e .as-card__no { bottom: 4.5cqw; right: 5cqw; font-size: 6cqw; letter-spacing: 0; }
.as-card--e .as-card__more { top: 25cqw; left: 5cqw; }

/* 06 — Szkolenia: kropki, zdjęcie w środku, rozbite litery */
.as-card--f .as-card__dots { top: 5cqw; left: 5cqw; display: grid; gap: 2.2cqw; }
.as-card--f .as-card__dots i { display: block; width: 2.6cqw; height: 2.6cqw; border-radius: 50%; background: var(--as-gold); }
.as-card--f .as-card__tag { top: 5cqw; left: 16cqw; }
.as-card--f .as-card__num { top: 16cqw; left: 16cqw; color: var(--as-muted); font-size: 3.4cqw; }
.as-card--f .as-card__media { top: 24%; left: 47%; width: 29%; height: 76%; }
.as-card--f .as-card__big { bottom: 3.2cqw; font-size: 17cqw; }
.as-card--f .as-card__big--l { left: 4cqw; }
.as-card--f .as-card__big--r { right: 4cqw; }
.as-card--f .as-card__no { top: 5cqw; right: 5cqw; }

@media (max-width: 700px) {
  .as-svc__grid { grid-template-columns: 1fr; }
  .as-card { aspect-ratio: 4 / 3.4; }
}
@media (prefers-reduced-motion: reduce) {
  .as-card, .as-card img, .as-card__more { transition: none; }
}

.as-svc .as-card img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
}

/* Menu: krzyżyk zamykania zawsze widoczny na jasnym panelu */
body.as-luxury .as-mega__close,
body.as-luxury .as-mega__close span { color: var(--as-ink) !important; }
